diff --git a/.gitattributes b/.gitattributes index 7f909e5306..f6a7cb0faa 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,5 +7,5 @@ # chmod a+x ~/.local/bin/podiff # git config diff.podiff.textconv podiff -*.po diff=podiff +*.po diff=podiff merge=po3way *.pot diff=podiff diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3090945448..162c52e974 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,14 +15,15 @@ jobs: strategy: matrix: tool: + - name: sphinx-lint + package: sphinx-lint + command: 'sphinx-lint --enable all --disable line-too-long --ignore .git' - name: Orthographe package: pospell apt_dependencies: hunspell hunspell-fr-comprehensive command: 'pospell -p dict -l fr_FR $CHANGED_PO_FILES' - name: Longueur des lignes - package: powrap - apt_dependencies: gettext - command: 'powrap --check --quiet --diff $CHANGED_PO_FILES' + command: 'awk ''{if (length(gensub(/శ్రీనివాస్/, ".", "g", $0)) > 80 && length(gensub(/[^ ]/, "", "g")) > 1) {print FILENAME ":" FNR, "line too long:", $0; ERRORS+=1}} END {if (ERRORS>0) {exit 1}}'' $CHANGED_PO_FILES' - name: Grammaire package: padpo command: 'padpo -i $CHANGED_PO_FILES 2>&1 | grep -v -Ff padpo.ignore' @@ -42,9 +43,13 @@ jobs: python-version: '3.9' - name: Install ${{ matrix.tool.package }} run: | - [ -n "${{ matrix.tool.apt_dependencies }}" ] && sudo apt-get update && sudo apt-get install -y ${{ matrix.tool.apt_dependencies }} - python -m pip install --upgrade pip setuptools wheel - python -m pip install ${{ matrix.tool.package }} + if [ -n "${{ matrix.tool.apt_dependencies }}" ]; then + sudo apt-get update && sudo apt-get install -y ${{ matrix.tool.apt_dependencies }} + fi + if [ -n "${{ matrix.tool.package }}" ]; then + python -m pip install --upgrade pip setuptools wheel + python -m pip install ${{ matrix.tool.package }} + fi - name: Run ${{ matrix.tool.package }} env: ADDED_FILES: ${{ join(fromJSON(steps.changed_files.outputs.added), ' ') }} @@ -83,7 +88,7 @@ jobs: run: | mkdir -p ~/locales/fr/LC_MESSAGES/ cp -uv --parents *.po */*.po ~/locales/fr/LC_MESSAGES/ - git -C ~/cpython checkout 895591c1f0bdec5ad357fe6a5fd0875990061357 + git -C ~/cpython checkout $(grep ^CPYTHON_CURRENT_COMMIT Makefile| cut -d= -f2) - name: Prepare venv run: | # If the venv exists but is broken, drop it (happens on Python upgrades): @@ -91,4 +96,4 @@ jobs: [ -d $HOME/cpython/Doc/venv/bin/ -a ! -e $HOME/cpython/Doc/venv/bin/python ] && rm -fr $HOME/cpython/Doc/venv make -C $HOME/cpython/Doc venv - name: sphinx-build - run: make -C $HOME/cpython/Doc SPHINXOPTS="-qW -j4 -D locale_dirs=$HOME/locales -D language=fr -D gettext_compact=0" autobuild-dev-html + 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/.tx/config b/.tx/config deleted file mode 100644 index 5de616379d..0000000000 --- a/.tx/config +++ /dev/null @@ -1,2331 +0,0 @@ -[main] -host = https://www.transifex.com -[python-newest.glossary_] -trans.fr = glossary.po -type = PO -source_lang = en - -[python-newest.license] -trans.fr = license.po -type = PO -source_lang = en - -[python-newest.sphinx] -trans.fr = sphinx.po -type = PO -source_lang = en - -[python-newest.about] -trans.fr = about.po -type = PO -source_lang = en - -[python-newest.bugs] -trans.fr = bugs.po -type = PO -source_lang = en - -[python-newest.copyright] -trans.fr = copyright.po -type = PO -source_lang = en - -[python-newest.contents] -trans.fr = contents.po -type = PO -source_lang = en - -[python-newest.library--re] -trans.fr = library/re.po -type = PO -source_lang = en - -[python-newest.library--sysconfig] -trans.fr = library/sysconfig.po -type = PO -source_lang = en - -[python-newest.library--getpass] -trans.fr = library/getpass.po -type = PO -source_lang = en - -[python-newest.library--imghdr] -trans.fr = library/imghdr.po -type = PO -source_lang = en - -[python-newest.library--zipapp] -trans.fr = library/zipapp.po -type = PO -source_lang = en - -[python-newest.library--urllib_error] -trans.fr = library/urllib.error.po -type = PO -source_lang = en - -[python-newest.library--urllib_parse] -trans.fr = library/urllib.parse.po -type = PO -source_lang = en - -[python-newest.library--xml_sax_utils] -trans.fr = library/xml.sax.utils.po -type = PO -source_lang = en - -[python-newest.library--mmap] -trans.fr = library/mmap.po -type = PO -source_lang = en - -[python-newest.library--difflib] -trans.fr = library/difflib.po -type = PO -source_lang = en - -[python-newest.library--tkinter_scrolledtext] -trans.fr = library/tkinter.scrolledtext.po -type = PO -source_lang = en - -[python-newest.library--parser] -trans.fr = library/parser.po -type = PO -source_lang = en - -[python-newest.library--pyexpat] -trans.fr = library/pyexpat.po -type = PO -source_lang = en - -[python-newest.library--curses_panel] -trans.fr = library/curses.panel.po -type = PO -source_lang = en - -[python-newest.library--fractions] -trans.fr = library/fractions.po -type = PO -source_lang = en - -[python-newest.library--asyncio-subprocess] -trans.fr = library/asyncio-subprocess.po -type = PO -source_lang = en - -[python-newest.library--compileall] -trans.fr = library/compileall.po -type = PO -source_lang = en - -[python-newest.library--optparse] -trans.fr = library/optparse.po -type = PO -source_lang = en - -[python-newest.library--imp] -trans.fr = library/imp.po -type = PO -source_lang = en - -[python-newest.library--locale] -trans.fr = library/locale.po -type = PO -source_lang = en - -[python-newest.library--ctypes] -trans.fr = library/ctypes.po -type = PO -source_lang = en - -[python-newest.library--doctest] -trans.fr = library/doctest.po -type = PO -source_lang = en - -[python-newest.library--distribution] -trans.fr = library/distribution.po -type = PO -source_lang = en - -[python-newest.library--ipc] -trans.fr = library/ipc.po -type = PO -source_lang = en - -[python-newest.library--numeric] -trans.fr = library/numeric.po -type = PO -source_lang = en - -[python-newest.library--email_headerregistry] -trans.fr = library/email.headerregistry.po -type = PO -source_lang = en - -[python-newest.library--wave] -trans.fr = library/wave.po -type = PO -source_lang = en - -[python-newest.library--email_errors] -trans.fr = library/email.errors.po -type = PO -source_lang = en - -[python-newest.library--sunau] -trans.fr = library/sunau.po -type = PO -source_lang = en - -[python-newest.library--datetime] -trans.fr = library/datetime.po -type = PO -source_lang = en - -[python-newest.library--macpath] -trans.fr = library/macpath.po -type = PO -source_lang = en - -[python-newest.library--unix] -trans.fr = library/unix.po -type = PO -source_lang = en - -[python-newest.library--array] -trans.fr = library/array.po -type = PO -source_lang = en - -[python-newest.library--email_policy] -trans.fr = library/email.policy.po -type = PO -source_lang = en - -[python-newest.library--sched] -trans.fr = library/sched.po -type = PO -source_lang = en - -[python-newest.library--http_cookies] -trans.fr = library/http.cookies.po -type = PO -source_lang = en - -[python-newest.library--shutil] -trans.fr = library/shutil.po -type = PO -source_lang = en - -[python-newest.library--symbol] -trans.fr = library/symbol.po -type = PO -source_lang = en - -[python-newest.library--xml_dom_minidom] -trans.fr = library/xml.dom.minidom.po -type = PO -source_lang = en - -[python-newest.library--modules] -trans.fr = library/modules.po -type = PO -source_lang = en - -[python-newest.library--unicodedata] -trans.fr = library/unicodedata.po -type = PO -source_lang = en - -[python-newest.library--tkinter_ttk] -trans.fr = library/tkinter.ttk.po -type = PO -source_lang = en - -[python-newest.library--binascii] -trans.fr = library/binascii.po -type = PO -source_lang = en - -[python-newest.library--linecache] -trans.fr = library/linecache.po -type = PO -source_lang = en - -[python-newest.library--functools] -trans.fr = library/functools.po -type = PO -source_lang = en - -[python-newest.library--xml_sax_reader] -trans.fr = library/xml.sax.reader.po -type = PO -source_lang = en - -[python-newest.library--pydoc] -trans.fr = library/pydoc.po -type = PO -source_lang = en - -[python-newest.library--pwd] -trans.fr = library/pwd.po -type = PO -source_lang = en - -[python-newest.library--selectors] -trans.fr = library/selectors.po -type = PO -source_lang = en - -[python-newest.library--os_path] -trans.fr = library/os.path.po -type = PO -source_lang = en - -[python-newest.library--asyncio-sync] -trans.fr = library/asyncio-sync.po -type = PO -source_lang = en - -[python-newest.library--_dummy_thread] -trans.fr = library/_dummy_thread.po -type = PO -source_lang = en - -[python-newest.library--fcntl] -trans.fr = library/fcntl.po -type = PO -source_lang = en - -[python-newest.library--constants] -trans.fr = library/constants.po -type = PO -source_lang = en - -[python-newest.library--statistics] -trans.fr = library/statistics.po -type = PO -source_lang = en - -[python-newest.library--pty] -trans.fr = library/pty.po -type = PO -source_lang = en - -[python-newest.library--crypto] -trans.fr = library/crypto.po -type = PO -source_lang = en - -[python-newest.library--xml] -trans.fr = library/xml.po -type = PO -source_lang = en - -[python-newest.library--imaplib] -trans.fr = library/imaplib.po -type = PO -source_lang = en - -[python-newest.library--text] -trans.fr = library/text.po -type = PO -source_lang = en - -[python-newest.library--mm] -trans.fr = library/mm.po -type = PO -source_lang = en - -[python-newest.library--tempfile] -trans.fr = library/tempfile.po -type = PO -source_lang = en - -[python-newest.library--traceback] -trans.fr = library/traceback.po -type = PO -source_lang = en - -[python-newest.library--itertools] -trans.fr = library/itertools.po -type = PO -source_lang = en - -[python-newest.library--__future__] -trans.fr = library/__future__.po -type = PO -source_lang = en - -[python-newest.library--csv] -trans.fr = library/csv.po -type = PO -source_lang = en - -[python-newest.library--stringprep] -trans.fr = library/stringprep.po -type = PO -source_lang = en - -[python-newest.library--development] -trans.fr = library/development.po -type = PO -source_lang = en - -[python-newest.library--platform] -trans.fr = library/platform.po -type = PO -source_lang = en - -[python-newest.library--time] -trans.fr = library/time.po -type = PO -source_lang = en - -[python-newest.library--pyclbr] -trans.fr = library/pyclbr.po -type = PO -source_lang = en - -[python-newest.library--crypt] -trans.fr = library/crypt.po -type = PO -source_lang = en - -[python-newest.library--token] -trans.fr = library/token.po -type = PO -source_lang = en - -[python-newest.library--spwd] -trans.fr = library/spwd.po -type = PO -source_lang = en - -[python-newest.library--modulefinder] -trans.fr = library/modulefinder.po -type = PO -source_lang = en - -[python-newest.library--argparse] -trans.fr = library/argparse.po -type = PO -source_lang = en - -[python-newest.library--collections] -trans.fr = library/collections.po -type = PO -source_lang = en - -[python-newest.library--http] -trans.fr = library/http.po -type = PO -source_lang = en - -[python-newest.library--email] -trans.fr = library/email.po -type = PO -source_lang = en - -[python-newest.library--http_cookiejar] -trans.fr = library/http.cookiejar.po -type = PO -source_lang = en - -[python-newest.library--cmd] -trans.fr = library/cmd.po -type = PO -source_lang = en - -[python-newest.library--xml_dom_pulldom] -trans.fr = library/xml.dom.pulldom.po -type = PO -source_lang = en - -[python-newest.library--glob] -trans.fr = library/glob.po -type = PO -source_lang = en - -[python-newest.library--keyword] -trans.fr = library/keyword.po -type = PO -source_lang = en - -[python-newest.library--concurrency] -trans.fr = library/concurrency.po -type = PO -source_lang = en - -[python-newest.library--atexit] -trans.fr = library/atexit.po -type = PO -source_lang = en - -[python-newest.library--py_compile] -trans.fr = library/py_compile.po -type = PO -source_lang = en - -[python-newest.library--email_encoders] -trans.fr = library/email.encoders.po -type = PO -source_lang = en - -[python-newest.library--inspect] -trans.fr = library/inspect.po -type = PO -source_lang = en - -[python-newest.library--unittest_mock] -trans.fr = library/unittest.mock.po -type = PO -source_lang = en - -[python-newest.library--asyncio-eventloops] -trans.fr = library/asyncio-eventloops.po -type = PO -source_lang = en - -[python-newest.library--allos] -trans.fr = library/allos.po -type = PO -source_lang = en - -[python-newest.library--stat] -trans.fr = library/stat.po -type = PO -source_lang = en - -[python-newest.library--curses] -trans.fr = library/curses.po -type = PO -source_lang = en - -[python-newest.library--persistence] -trans.fr = library/persistence.po -type = PO -source_lang = en - -[python-newest.library--trace] -trans.fr = library/trace.po -type = PO -source_lang = en - -[python-newest.library--zipfile] -trans.fr = library/zipfile.po -type = PO -source_lang = en - -[python-newest.library--mimetypes] -trans.fr = library/mimetypes.po -type = PO -source_lang = en - -[python-newest.library--superseded] -trans.fr = library/superseded.po -type = PO -source_lang = en - -[python-newest.library--internet] -trans.fr = library/internet.po -type = PO -source_lang = en - -[python-newest.library--poplib] -trans.fr = library/poplib.po -type = PO -source_lang = en - -[python-newest.library--language] -trans.fr = library/language.po -type = PO -source_lang = en - -[python-newest.library--string] -trans.fr = library/string.po -type = PO -source_lang = en - -[python-newest.library--mailcap] -trans.fr = library/mailcap.po -type = PO -source_lang = en - -[python-newest.library--email_parser] -trans.fr = library/email.parser.po -type = PO -source_lang = en - -[python-newest.library--bz2] -trans.fr = library/bz2.po -type = PO -source_lang = en - -[python-newest.library--builtins] -trans.fr = library/builtins.po -type = PO -source_lang = en - -[python-newest.library--logging_config] -trans.fr = library/logging.config.po -type = PO -source_lang = en - -[python-newest.library--xml_sax_handler] -trans.fr = library/xml.sax.handler.po -type = PO -source_lang = en - -[python-newest.library--intro] -trans.fr = library/intro.po -type = PO -source_lang = en - -[python-newest.library--python] -trans.fr = library/python.po -type = PO -source_lang = en - -[python-newest.library--tarfile] -trans.fr = library/tarfile.po -type = PO -source_lang = en - -[python-newest.library--fnmatch] -trans.fr = library/fnmatch.po -type = PO -source_lang = en - -[python-newest.library--tty] -trans.fr = library/tty.po -type = PO -source_lang = en - -[python-newest.library--signal] -trans.fr = library/signal.po -type = PO -source_lang = en - -[python-newest.library--contextlib] -trans.fr = library/contextlib.po -type = PO -source_lang = en - -[python-newest.library--pkgutil] -trans.fr = library/pkgutil.po -type = PO -source_lang = en - -[python-newest.library--codeop] -trans.fr = library/codeop.po -type = PO -source_lang = en - -[python-newest.library--gettext] -trans.fr = library/gettext.po -type = PO -source_lang = en - -[python-newest.library--enum] -trans.fr = library/enum.po -type = PO -source_lang = en - -[python-newest.library--decimal] -trans.fr = library/decimal.po -type = PO -source_lang = en - -[python-newest.library--asyncio] -trans.fr = library/asyncio.po -type = PO -source_lang = en - -[python-newest.library--windows] -trans.fr = library/windows.po -type = PO -source_lang = en - -[python-newest.library--urllib_request] -trans.fr = library/urllib.request.po -type = PO -source_lang = en - -[python-newest.library--socket] -trans.fr = library/socket.po -type = PO -source_lang = en - -[python-newest.library--mailbox] -trans.fr = library/mailbox.po -type = PO -source_lang = en - -[python-newest.library--rlcompleter] -trans.fr = library/rlcompleter.po -type = PO -source_lang = en - -[python-newest.library--gzip] -trans.fr = library/gzip.po -type = PO -source_lang = en - -[python-newest.library--http_client] -trans.fr = library/http.client.po -type = PO -source_lang = en - -[python-newest.library--pickle] -trans.fr = library/pickle.po -type = PO -source_lang = en - -[python-newest.library--concurrent] -trans.fr = library/concurrent.po -type = PO -source_lang = en - -[python-newest.library--timeit] -trans.fr = library/timeit.po -type = PO -source_lang = en - -[python-newest.library--tkinter_tix] -trans.fr = library/tkinter.tix.po -type = PO -source_lang = en - -[python-newest.library--readline] -trans.fr = library/readline.po -type = PO -source_lang = en - -[python-newest.library--netrc] -trans.fr = library/netrc.po -type = PO -source_lang = en - -[python-newest.library--asyncio-dev] -trans.fr = library/asyncio-dev.po -type = PO -source_lang = en - -[python-newest.library--email_charset] -trans.fr = library/email.charset.po -type = PO -source_lang = en - -[python-newest.library--venv] -trans.fr = library/venv.po -type = PO -source_lang = en - -[python-newest.library--struct] -trans.fr = library/struct.po -type = PO -source_lang = en - -[python-newest.library--dbm] -trans.fr = library/dbm.po -type = PO -source_lang = en - -[python-newest.library--xdrlib] -trans.fr = library/xdrlib.po -type = PO -source_lang = en - -[python-newest.library--markup] -trans.fr = library/markup.po -type = PO -source_lang = en - -[python-newest.library--dummy_threading] -trans.fr = library/dummy_threading.po -type = PO -source_lang = en - -[python-newest.library--xml_dom] -trans.fr = library/xml.dom.po -type = PO -source_lang = en - -[python-newest.library--smtpd] -trans.fr = library/smtpd.po -type = PO -source_lang = en - -[python-newest.library--idle] -trans.fr = library/idle.po -type = PO -source_lang = en - -[python-newest.library--pipes] -trans.fr = library/pipes.po -type = PO -source_lang = en - -[python-newest.library--chunk] -trans.fr = library/chunk.po -type = PO -source_lang = en - -[python-newest.library--telnetlib] -trans.fr = library/telnetlib.po -type = PO -source_lang = en - -[python-newest.library--filesys] -trans.fr = library/filesys.po -type = PO -source_lang = en - -[python-newest.library--asynchat] -trans.fr = library/asynchat.po -type = PO -source_lang = en - -[python-newest.library--numbers] -trans.fr = library/numbers.po -type = PO -source_lang = en - -[python-newest.library--xmlrpc_server] -trans.fr = library/xmlrpc.server.po -type = PO -source_lang = en - -[python-newest.library--plistlib] -trans.fr = library/plistlib.po -type = PO -source_lang = en - -[python-newest.library--secrets] -trans.fr = library/secrets.po -type = PO -source_lang = en - -[python-newest.library--marshal] -trans.fr = library/marshal.po -type = PO -source_lang = en - -[python-newest.library--html_parser] -trans.fr = library/html.parser.po -type = PO -source_lang = en - -[python-newest.library--netdata] -trans.fr = library/netdata.po -type = PO -source_lang = en - -[python-newest.library--gc] -trans.fr = library/gc.po -type = PO -source_lang = en - -[python-newest.library--fileformats] -trans.fr = library/fileformats.po -type = PO -source_lang = en - -[python-newest.library--bisect] -trans.fr = library/bisect.po -type = PO -source_lang = en - -[python-newest.library--symtable] -trans.fr = library/symtable.po -type = PO -source_lang = en - -[python-newest.library--nis] -trans.fr = library/nis.po -type = PO -source_lang = en - -[python-newest.library--html] -trans.fr = library/html.po -type = PO -source_lang = en - -[python-newest.library--typing] -trans.fr = library/typing.po -type = PO -source_lang = en - -[python-newest.library--weakref] -trans.fr = library/weakref.po -type = PO -source_lang = en - -[python-newest.library--shlex] -trans.fr = library/shlex.po -type = PO -source_lang = en - -[python-newest.library--binary] -trans.fr = library/binary.po -type = PO -source_lang = en - -[python-newest.library--distutils] -trans.fr = library/distutils.po -type = PO -source_lang = en - -[python-newest.library--email_generator] -trans.fr = library/email.generator.po -type = PO -source_lang = en - -[python-newest.library--ensurepip] -trans.fr = library/ensurepip.po -type = PO -source_lang = en - -[python-newest.library--importlib] -trans.fr = library/importlib.po -type = PO -source_lang = en - -[python-newest.library--warnings] -trans.fr = library/warnings.po -type = PO -source_lang = en - -[python-newest.library--tabnanny] -trans.fr = library/tabnanny.po -type = PO -source_lang = en - -[python-newest.library--json] -trans.fr = library/json.po -type = PO -source_lang = en - -[python-newest.library--reprlib] -trans.fr = library/reprlib.po -type = PO -source_lang = en - -[python-newest.library--concurrent_futures] -trans.fr = library/concurrent.futures.po -type = PO -source_lang = en - -[python-newest.library--tk] -trans.fr = library/tk.po -type = PO -source_lang = en - -[python-newest.library--abc] -trans.fr = library/abc.po -type = PO -source_lang = en - -[python-newest.library--filecmp] -trans.fr = library/filecmp.po -type = PO -source_lang = en - -[python-newest.library--undoc] -trans.fr = library/undoc.po -type = PO -source_lang = en - -[python-newest.library--functions] -trans.fr = library/functions.po -type = PO -source_lang = en - -[python-newest.library--unittest_mock-examples] -trans.fr = library/unittest.mock-examples.po -type = PO -source_lang = en - -[python-newest.library--heapq] -trans.fr = library/heapq.po -type = PO -source_lang = en - -[python-newest.library--termios] -trans.fr = library/termios.po -type = PO -source_lang = en - -[python-newest.library--errno] -trans.fr = library/errno.po -type = PO -source_lang = en - -[python-newest.library--calendar] -trans.fr = library/calendar.po -type = PO -source_lang = en - -[python-newest.library--configparser] -trans.fr = library/configparser.po -type = PO -source_lang = en - -[python-newest.library--unittest] -trans.fr = library/unittest.po -type = PO -source_lang = en - -[python-newest.library--socketserver] -trans.fr = library/socketserver.po -type = PO -source_lang = en - -[python-newest.library--tokenize] -trans.fr = library/tokenize.po -type = PO -source_lang = en - -[python-newest.library--random] -trans.fr = library/random.po -type = PO -source_lang = en - -[python-newest.library--code] -trans.fr = library/code.po -type = PO -source_lang = en - -[python-newest.library--sqlite3] -trans.fr = library/sqlite3.po -type = PO -source_lang = en - -[python-newest.library--colorsys] -trans.fr = library/colorsys.po -type = PO -source_lang = en - -[python-newest.library--quopri] -trans.fr = library/quopri.po -type = PO -source_lang = en - -[python-newest.library--dis] -trans.fr = library/dis.po -type = PO -source_lang = en - -[python-newest.library--stdtypes] -trans.fr = library/stdtypes.po -type = PO -source_lang = en - -[python-newest.library--tracemalloc] -trans.fr = library/tracemalloc.po -type = PO -source_lang = en - -[python-newest.library--queue] -trans.fr = library/queue.po -type = PO -source_lang = en - -[python-newest.library--posix] -trans.fr = library/posix.po -type = PO -source_lang = en - -[python-newest.library--turtle] -trans.fr = library/turtle.po -type = PO -source_lang = en - -[python-newest.library--faulthandler] -trans.fr = library/faulthandler.po -type = PO -source_lang = en - -[python-newest.library--email_examples] -trans.fr = library/email.examples.po -type = PO -source_lang = en - -[python-newest.library--base64] -trans.fr = library/base64.po -type = PO -source_lang = en - -[python-newest.library--index] -trans.fr = library/index.po -type = PO -source_lang = en - -[python-newest.library--email_message] -trans.fr = library/email.message.po -type = PO -source_lang = en - -[python-newest.library--xml_etree_elementtree] -trans.fr = library/xml.etree.elementtree.po -type = PO -source_lang = en - -[python-newest.library--asyncio-task] -trans.fr = library/asyncio-task.po -type = PO -source_lang = en - -[python-newest.library--asyncore] -trans.fr = library/asyncore.po -type = PO -source_lang = en - -[python-newest.library--uu] -trans.fr = library/uu.po -type = PO -source_lang = en - -[python-newest.library--urllib_robotparser] -trans.fr = library/urllib.robotparser.po -type = PO -source_lang = en - -[python-newest.library--cgitb] -trans.fr = library/cgitb.po -type = PO -source_lang = en - -[python-newest.library--pathlib] -trans.fr = library/pathlib.po -type = PO -source_lang = en - -[python-newest.library--misc] -trans.fr = library/misc.po -type = PO -source_lang = en - -[python-newest.library--_thread] -trans.fr = library/_thread.po -type = PO -source_lang = en - -[python-newest.library--email_header] -trans.fr = library/email.header.po -type = PO -source_lang = en - -[python-newest.library--runpy] -trans.fr = library/runpy.po -type = PO -source_lang = en - -[python-newest.library--asyncio-eventloop] -trans.fr = library/asyncio-eventloop.po -type = PO -source_lang = en - -[python-newest.library--textwrap] -trans.fr = library/textwrap.po -type = PO -source_lang = en - -[python-newest.library--msilib] -trans.fr = library/msilib.po -type = PO -source_lang = en - -[python-newest.library--debug] -trans.fr = library/debug.po -type = PO -source_lang = en - -[python-newest.library--nntplib] -trans.fr = library/nntplib.po -type = PO -source_lang = en - -[python-newest.library--ast] -trans.fr = library/ast.po -type = PO -source_lang = en - -[python-newest.library--site] -trans.fr = library/site.po -type = PO -source_lang = en - -[python-newest.library--uuid] -trans.fr = library/uuid.po -type = PO -source_lang = en - -[python-newest.library--email_iterators] -trans.fr = library/email.iterators.po -type = PO -source_lang = en - -[python-newest.library--threading] -trans.fr = library/threading.po -type = PO -source_lang = en - -[python-newest.library--email_mime] -trans.fr = library/email.mime.po -type = PO -source_lang = en - -[python-newest.library--shelve] -trans.fr = library/shelve.po -type = PO -source_lang = en - -[python-newest.library--profile] -trans.fr = library/profile.po -type = PO -source_lang = en - -[python-newest.library--math] -trans.fr = library/math.po -type = PO -source_lang = en - -[python-newest.library--fileinput] -trans.fr = library/fileinput.po -type = PO -source_lang = en - -[python-newest.library--select] -trans.fr = library/select.po -type = PO -source_lang = en - -[python-newest.library--pprint] -trans.fr = library/pprint.po -type = PO -source_lang = en - -[python-newest.library--datatypes] -trans.fr = library/datatypes.po -type = PO -source_lang = en - -[python-newest.library--ssl] -trans.fr = library/ssl.po -type = PO -source_lang = en - -[python-newest.library--asyncio-queue] -trans.fr = library/asyncio-queue.po -type = PO -source_lang = en - -[python-newest.library--binhex] -trans.fr = library/binhex.po -type = PO -source_lang = en - -[python-newest.library--io] -trans.fr = library/io.po -type = PO -source_lang = en - -[python-newest.library--asyncio-protocol] -trans.fr = library/asyncio-protocol.po -type = PO -source_lang = en - -[python-newest.library--othergui] -trans.fr = library/othergui.po -type = PO -source_lang = en - -[python-newest.library--webbrowser] -trans.fr = library/webbrowser.po -type = PO -source_lang = en - -[python-newest.library--hmac] -trans.fr = library/hmac.po -type = PO -source_lang = en - -[python-newest.library--collections_abc] -trans.fr = library/collections.abc.po -type = PO -source_lang = en - -[python-newest.library--ftplib] -trans.fr = library/ftplib.po -type = PO -source_lang = en - -[python-newest.library--multiprocessing] -trans.fr = library/multiprocessing.po -type = PO -source_lang = en - -[python-newest.library--types] -trans.fr = library/types.po -type = PO -source_lang = en - -[python-newest.library--ipaddress] -trans.fr = library/ipaddress.po -type = PO -source_lang = en - -[python-newest.library--fpectl] -trans.fr = library/fpectl.po -type = PO -source_lang = en - -[python-newest.library--exceptions] -trans.fr = library/exceptions.po -type = PO -source_lang = en - -[python-newest.library--asyncio-stream] -trans.fr = library/asyncio-stream.po -type = PO -source_lang = en - -[python-newest.library--custominterp] -trans.fr = library/custominterp.po -type = PO -source_lang = en - -[python-newest.library--codecs] -trans.fr = library/codecs.po -type = PO -source_lang = en - -[python-newest.library--bdb] -trans.fr = library/bdb.po -type = PO -source_lang = en - -[python-newest.library--archiving] -trans.fr = library/archiving.po -type = PO -source_lang = en - -[python-newest.library--hashlib] -trans.fr = library/hashlib.po -type = PO -source_lang = en - -[python-newest.library--tkinter] -trans.fr = library/tkinter.po -type = PO -source_lang = en - -[python-newest.library--sys] -trans.fr = library/sys.po -type = PO -source_lang = en - -[python-newest.library--cmath] -trans.fr = library/cmath.po -type = PO -source_lang = en - -[python-newest.library--functional] -trans.fr = library/functional.po -type = PO -source_lang = en - -[python-newest.library--html_entities] -trans.fr = library/html.entities.po -type = PO -source_lang = en - -[python-newest.library--resource] -trans.fr = library/resource.po -type = PO -source_lang = en - -[python-newest.library--pickletools] -trans.fr = library/pickletools.po -type = PO -source_lang = en - -[python-newest.library--email_util] -trans.fr = library/email.util.po -type = PO -source_lang = en - -[python-newest.library--xmlrpc] -trans.fr = library/xmlrpc.po -type = PO -source_lang = en - -[python-newest.library--lzma] -trans.fr = library/lzma.po -type = PO -source_lang = en - -[python-newest.library--syslog] -trans.fr = library/syslog.po -type = PO -source_lang = en - -[python-newest.library--subprocess] -trans.fr = library/subprocess.po -type = PO -source_lang = en - -[python-newest.library--pdb] -trans.fr = library/pdb.po -type = PO -source_lang = en - -[python-newest.library--wsgiref] -trans.fr = library/wsgiref.po -type = PO -source_lang = en - -[python-newest.library--formatter] -trans.fr = library/formatter.po -type = PO -source_lang = en - -[python-newest.library--getopt] -trans.fr = library/getopt.po -type = PO -source_lang = en - -[python-newest.library--cgi] -trans.fr = library/cgi.po -type = PO -source_lang = en - -[python-newest.library--winsound] -trans.fr = library/winsound.po -type = PO -source_lang = en - -[python-newest.library--audioop] -trans.fr = library/audioop.po -type = PO -source_lang = en - -[python-newest.library--__main__] -trans.fr = library/__main__.po -type = PO -source_lang = en - -[python-newest.library--sndhdr] -trans.fr = library/sndhdr.po -type = PO -source_lang = en - -[python-newest.library--copy] -trans.fr = library/copy.po -type = PO -source_lang = en - -[python-newest.library--email_contentmanager] -trans.fr = library/email.contentmanager.po -type = PO -source_lang = en - -[python-newest.library--aifc] -trans.fr = library/aifc.po -type = PO -source_lang = en - -[python-newest.library--msvcrt] -trans.fr = library/msvcrt.po -type = PO -source_lang = en - -[python-newest.library--xmlrpc_client] -trans.fr = library/xmlrpc.client.po -type = PO -source_lang = en - -[python-newest.library--logging_handlers] -trans.fr = library/logging.handlers.po -type = PO -source_lang = en - -[python-newest.library--grp] -trans.fr = library/grp.po -type = PO -source_lang = en - -[python-newest.library--logging] -trans.fr = library/logging.po -type = PO -source_lang = en - -[python-newest.library--i18n] -trans.fr = library/i18n.po -type = PO -source_lang = en - -[python-newest.library--zipimport] -trans.fr = library/zipimport.po -type = PO -source_lang = en - -[python-newest.library--curses_ascii] -trans.fr = library/curses.ascii.po -type = PO -source_lang = en - -[python-newest.library--operator] -trans.fr = library/operator.po -type = PO -source_lang = en - -[python-newest.library--winreg] -trans.fr = library/winreg.po -type = PO -source_lang = en - -[python-newest.library--frameworks] -trans.fr = library/frameworks.po -type = PO -source_lang = en - -[python-newest.library--ossaudiodev] -trans.fr = library/ossaudiodev.po -type = PO -source_lang = en - -[python-newest.library--urllib] -trans.fr = library/urllib.po -type = PO -source_lang = en - -[python-newest.library--os] -trans.fr = library/os.po -type = PO -source_lang = en - -[python-newest.library--smtplib] -trans.fr = library/smtplib.po -type = PO -source_lang = en - -[python-newest.library--copyreg] -trans.fr = library/copyreg.po -type = PO -source_lang = en - -[python-newest.library--test] -trans.fr = library/test.po -type = PO -source_lang = en - -[python-newest.library--xml_sax] -trans.fr = library/xml.sax.po -type = PO -source_lang = en - -[python-newest.library--2to3] -trans.fr = library/2to3.po -type = PO -source_lang = en - -[python-newest.library--http_server] -trans.fr = library/http.server.po -type = PO -source_lang = en - -[python-newest.library--email_compat32-message] -trans.fr = library/email.compat32-message.po -type = PO -source_lang = en - -[python-newest.library--zlib] -trans.fr = library/zlib.po -type = PO -source_lang = en - -[python-newest.distutils--configfile] -trans.fr = distutils/configfile.po -type = PO -source_lang = en - -[python-newest.distutils--sourcedist] -trans.fr = distutils/sourcedist.po -type = PO -source_lang = en - -[python-newest.distutils--extending] -trans.fr = distutils/extending.po -type = PO -source_lang = en - -[python-newest.distutils--setupscript] -trans.fr = distutils/setupscript.po -type = PO -source_lang = en - -[python-newest.distutils--commandref] -trans.fr = distutils/commandref.po -type = PO -source_lang = en - -[python-newest.distutils--builtdist] -trans.fr = distutils/builtdist.po -type = PO -source_lang = en - -[python-newest.distutils--introduction] -trans.fr = distutils/introduction.po -type = PO -source_lang = en - -[python-newest.distutils--index] -trans.fr = distutils/index.po -type = PO -source_lang = en - -[python-newest.distutils--packageindex] -trans.fr = distutils/packageindex.po -type = PO -source_lang = en - -[python-newest.distutils--examples] -trans.fr = distutils/examples.po -type = PO -source_lang = en - -[python-newest.distutils--uploading] -trans.fr = distutils/uploading.po -type = PO -source_lang = en - -[python-newest.distutils--apiref] -trans.fr = distutils/apiref.po -type = PO -source_lang = en - -[python-newest.distributing--index] -trans.fr = distributing/index.po -type = PO -source_lang = en - -[python-newest.faq--extending] -trans.fr = faq/extending.po -type = PO -source_lang = en - -[python-newest.faq--windows] -trans.fr = faq/windows.po -type = PO -source_lang = en - -[python-newest.faq--general] -trans.fr = faq/general.po -type = PO -source_lang = en - -[python-newest.faq--library] -trans.fr = faq/library.po -type = PO -source_lang = en - -[python-newest.faq--gui] -trans.fr = faq/gui.po -type = PO -source_lang = en - -[python-newest.faq--installed] -trans.fr = faq/installed.po -type = PO -source_lang = en - -[python-newest.faq--index] -trans.fr = faq/index.po -type = PO -source_lang = en - -[python-newest.faq--design] -trans.fr = faq/design.po -type = PO -source_lang = en - -[python-newest.faq--programming] -trans.fr = faq/programming.po -type = PO -source_lang = en - -[python-newest.using--unix] -trans.fr = using/unix.po -type = PO -source_lang = en - -[python-newest.using--mac] -trans.fr = using/mac.po -type = PO -source_lang = en - -[python-newest.using--cmdline] -trans.fr = using/cmdline.po -type = PO -source_lang = en - -[python-newest.using--windows] -trans.fr = using/windows.po -type = PO -source_lang = en - -[python-newest.using--index] -trans.fr = using/index.po -type = PO -source_lang = en - -[python-newest.howto--clinic] -trans.fr = howto/clinic.po -type = PO -source_lang = en - -[python-newest.howto--urllib2] -trans.fr = howto/urllib2.po -type = PO -source_lang = en - -[python-newest.howto--argparse] -trans.fr = howto/argparse.po -type = PO -source_lang = en - -[python-newest.howto--curses] -trans.fr = howto/curses.po -type = PO -source_lang = en - -[python-newest.howto--logging-cookbook] -trans.fr = howto/logging-cookbook.po -type = PO -source_lang = en - -[python-newest.howto--sockets] -trans.fr = howto/sockets.po -type = PO -source_lang = en - -[python-newest.howto--pyporting] -trans.fr = howto/pyporting.po -type = PO -source_lang = en - -[python-newest.howto--index] -trans.fr = howto/index.po -type = PO -source_lang = en - -[python-newest.howto--unicode] -trans.fr = howto/unicode.po -type = PO -source_lang = en - -[python-newest.howto--instrumentation] -trans.fr = howto/instrumentation.po -type = PO -source_lang = en - -[python-newest.howto--cporting] -trans.fr = howto/cporting.po -type = PO -source_lang = en - -[python-newest.howto--ipaddress] -trans.fr = howto/ipaddress.po -type = PO -source_lang = en - -[python-newest.howto--sorting] -trans.fr = howto/sorting.po -type = PO -source_lang = en - -[python-newest.howto--functional] -trans.fr = howto/functional.po -type = PO -source_lang = en - -[python-newest.howto--logging] -trans.fr = howto/logging.po -type = PO -source_lang = en - -[python-newest.howto--regex] -trans.fr = howto/regex.po -type = PO -source_lang = en - -[python-newest.howto--descriptor] -trans.fr = howto/descriptor.po -type = PO -source_lang = en - -[python-newest.install--index] -trans.fr = install/index.po -type = PO -source_lang = en - -[python-newest.reference--simple_stmts] -trans.fr = reference/simple_stmts.po -type = PO -source_lang = en - -[python-newest.reference--expressions] -trans.fr = reference/expressions.po -type = PO -source_lang = en - -[python-newest.reference--compound_stmts] -trans.fr = reference/compound_stmts.po -type = PO -source_lang = en - -[python-newest.reference--introduction] -trans.fr = reference/introduction.po -type = PO -source_lang = en - -[python-newest.reference--import] -trans.fr = reference/import.po -type = PO -source_lang = en - -[python-newest.reference--grammar] -trans.fr = reference/grammar.po -type = PO -source_lang = en - -[python-newest.reference--datamodel] -trans.fr = reference/datamodel.po -type = PO -source_lang = en - -[python-newest.reference--index] -trans.fr = reference/index.po -type = PO -source_lang = en - -[python-newest.reference--toplevel_components] -trans.fr = reference/toplevel_components.po -type = PO -source_lang = en - -[python-newest.reference--lexical_analysis] -trans.fr = reference/lexical_analysis.po -type = PO -source_lang = en - -[python-newest.reference--executionmodel] -trans.fr = reference/executionmodel.po -type = PO -source_lang = en - -[python-newest.whatsnew--2_6] -trans.fr = whatsnew/2.6.po -type = PO -source_lang = en - -[python-newest.whatsnew--2_3] -trans.fr = whatsnew/2.3.po -type = PO -source_lang = en - -[python-newest.whatsnew--changelog] -trans.fr = whatsnew/changelog.po -type = PO -source_lang = en - -[python-newest.whatsnew--2_2] -trans.fr = whatsnew/2.2.po -type = PO -source_lang = en - -[python-newest.whatsnew--3_3] -trans.fr = whatsnew/3.3.po -type = PO -source_lang = en - -[python-newest.whatsnew--3_4] -trans.fr = whatsnew/3.4.po -type = PO -source_lang = en - -[python-newest.whatsnew--3_2] -trans.fr = whatsnew/3.2.po -type = PO -source_lang = en - -[python-newest.whatsnew--2_7] -trans.fr = whatsnew/2.7.po -type = PO -source_lang = en - -[python-newest.whatsnew--3_1] -trans.fr = whatsnew/3.1.po -type = PO -source_lang = en - -[python-newest.whatsnew--3_0] -trans.fr = whatsnew/3.0.po -type = PO -source_lang = en - -[python-newest.whatsnew--index] -trans.fr = whatsnew/index.po -type = PO -source_lang = en - -[python-newest.whatsnew--2_0] -trans.fr = whatsnew/2.0.po -type = PO -source_lang = en - -[python-newest.whatsnew--2_4] -trans.fr = whatsnew/2.4.po -type = PO -source_lang = en - -[python-newest.whatsnew--3_5] -trans.fr = whatsnew/3.5.po -type = PO -source_lang = en - -[python-newest.whatsnew--2_5] -trans.fr = whatsnew/2.5.po -type = PO -source_lang = en - -[python-newest.whatsnew--2_1] -trans.fr = whatsnew/2.1.po -type = PO -source_lang = en - -[python-newest.whatsnew--3_6] -trans.fr = whatsnew/3.6.po -type = PO -source_lang = en - -[python-newest.tutorial--modules] -trans.fr = tutorial/modules.po -type = PO -source_lang = en - -[python-newest.tutorial--stdlib2] -trans.fr = tutorial/stdlib2.po -type = PO -source_lang = en - -[python-newest.tutorial--whatnow] -trans.fr = tutorial/whatnow.po -type = PO -source_lang = en - -[python-newest.tutorial--floatingpoint] -trans.fr = tutorial/floatingpoint.po -type = PO -source_lang = en - -[python-newest.tutorial--inputoutput] -trans.fr = tutorial/inputoutput.po -type = PO -source_lang = en - -[python-newest.tutorial--classes] -trans.fr = tutorial/classes.po -type = PO -source_lang = en - -[python-newest.tutorial--appendix] -trans.fr = tutorial/appendix.po -type = PO -source_lang = en - -[python-newest.tutorial--interactive] -trans.fr = tutorial/interactive.po -type = PO -source_lang = en - -[python-newest.tutorial--venv] -trans.fr = tutorial/venv.po -type = PO -source_lang = en - -[python-newest.tutorial--introduction] -trans.fr = tutorial/introduction.po -type = PO -source_lang = en - -[python-newest.tutorial--index] -trans.fr = tutorial/index.po -type = PO -source_lang = en - -[python-newest.tutorial--controlflow] -trans.fr = tutorial/controlflow.po -type = PO -source_lang = en - -[python-newest.tutorial--appetite] -trans.fr = tutorial/appetite.po -type = PO -source_lang = en - -[python-newest.tutorial--errors] -trans.fr = tutorial/errors.po -type = PO -source_lang = en - -[python-newest.tutorial--interpreter] -trans.fr = tutorial/interpreter.po -type = PO -source_lang = en - -[python-newest.tutorial--datastructures] -trans.fr = tutorial/datastructures.po -type = PO -source_lang = en - -[python-newest.tutorial--stdlib] -trans.fr = tutorial/stdlib.po -type = PO -source_lang = en - -[python-newest.extending--building] -trans.fr = extending/building.po -type = PO -source_lang = en - -[python-newest.extending--extending] -trans.fr = extending/extending.po -type = PO -source_lang = en - -[python-newest.extending--windows] -trans.fr = extending/windows.po -type = PO -source_lang = en - -[python-newest.extending--index] -trans.fr = extending/index.po -type = PO -source_lang = en - -[python-newest.extending--embedding] -trans.fr = extending/embedding.po -type = PO -source_lang = en - -[python-newest.extending--newtypes] -trans.fr = extending/newtypes.po -type = PO -source_lang = en - -[python-newest.installing--index] -trans.fr = installing/index.po -type = PO -source_lang = en - -[python-newest.c-api--conversion] -trans.fr = c-api/conversion.po -type = PO -source_lang = en - -[python-newest.c-api--datetime] -trans.fr = c-api/datetime.po -type = PO -source_lang = en - -[python-newest.c-api--memory] -trans.fr = c-api/memory.po -type = PO -source_lang = en - -[python-newest.c-api--coro] -trans.fr = c-api/coro.po -type = PO -source_lang = en - -[python-newest.c-api--file] -trans.fr = c-api/file.po -type = PO -source_lang = en - -[python-newest.c-api--object] -trans.fr = c-api/object.po -type = PO -source_lang = en - -[python-newest.c-api--capsule] -trans.fr = c-api/capsule.po -type = PO -source_lang = en - -[python-newest.c-api--function] -trans.fr = c-api/function.po -type = PO -source_lang = en - -[python-newest.c-api--refcounting] -trans.fr = c-api/refcounting.po -type = PO -source_lang = en - -[python-newest.c-api--cell] -trans.fr = c-api/cell.po -type = PO -source_lang = en - -[python-newest.c-api--none] -trans.fr = c-api/none.po -type = PO -source_lang = en - -[python-newest.c-api--allocation] -trans.fr = c-api/allocation.po -type = PO -source_lang = en - -[python-newest.c-api--intro] -trans.fr = c-api/intro.po -type = PO -source_lang = en - -[python-newest.c-api--number] -trans.fr = c-api/number.po -type = PO -source_lang = en - -[python-newest.c-api--float] -trans.fr = c-api/float.po -type = PO -source_lang = en - -[python-newest.c-api--list] -trans.fr = c-api/list.po -type = PO -source_lang = en - -[python-newest.c-api--memoryview] -trans.fr = c-api/memoryview.po -type = PO -source_lang = en - -[python-newest.c-api--structures] -trans.fr = c-api/structures.po -type = PO -source_lang = en - -[python-newest.c-api--mapping] -trans.fr = c-api/mapping.po -type = PO -source_lang = en - -[python-newest.c-api--iterator] -trans.fr = c-api/iterator.po -type = PO -source_lang = en - -[python-newest.c-api--abstract] -trans.fr = c-api/abstract.po -type = PO -source_lang = en - -[python-newest.c-api--gen] -trans.fr = c-api/gen.po -type = PO -source_lang = en - -[python-newest.c-api--arg] -trans.fr = c-api/arg.po -type = PO -source_lang = en - -[python-newest.c-api--method] -trans.fr = c-api/method.po -type = PO -source_lang = en - -[python-newest.c-api--sequence] -trans.fr = c-api/sequence.po -type = PO -source_lang = en - -[python-newest.c-api--marshal] -trans.fr = c-api/marshal.po -type = PO -source_lang = en - -[python-newest.c-api--import] -trans.fr = c-api/import.po -type = PO -source_lang = en - -[python-newest.c-api--weakref] -trans.fr = c-api/weakref.po -type = PO -source_lang = en - -[python-newest.c-api--dict] -trans.fr = c-api/dict.po -type = PO -source_lang = en - -[python-newest.c-api--buffer] -trans.fr = c-api/buffer.po -type = PO -source_lang = en - -[python-newest.c-api--code] -trans.fr = c-api/code.po -type = PO -source_lang = en - -[python-newest.c-api--index] -trans.fr = c-api/index.po -type = PO -source_lang = en - -[python-newest.c-api--concrete] -trans.fr = c-api/concrete.po -type = PO -source_lang = en - -[python-newest.c-api--unicode] -trans.fr = c-api/unicode.po -type = PO -source_lang = en - -[python-newest.c-api--bytes] -trans.fr = c-api/bytes.po -type = PO -source_lang = en - -[python-newest.c-api--init] -trans.fr = c-api/init.po -type = PO -source_lang = en - -[python-newest.c-api--bool] -trans.fr = c-api/bool.po -type = PO -source_lang = en - -[python-newest.c-api--reflection] -trans.fr = c-api/reflection.po -type = PO -source_lang = en - -[python-newest.c-api--gcsupport] -trans.fr = c-api/gcsupport.po -type = PO -source_lang = en - -[python-newest.c-api--module] -trans.fr = c-api/module.po -type = PO -source_lang = en - -[python-newest.c-api--veryhigh] -trans.fr = c-api/veryhigh.po -type = PO -source_lang = en - -[python-newest.c-api--exceptions] -trans.fr = c-api/exceptions.po -type = PO -source_lang = en - -[python-newest.c-api--objimpl] -trans.fr = c-api/objimpl.po -type = PO -source_lang = en - -[python-newest.c-api--type] -trans.fr = c-api/type.po -type = PO -source_lang = en - -[python-newest.c-api--set] -trans.fr = c-api/set.po -type = PO -source_lang = en - -[python-newest.c-api--codec] -trans.fr = c-api/codec.po -type = PO -source_lang = en - -[python-newest.c-api--typeobj] -trans.fr = c-api/typeobj.po -type = PO -source_lang = en - -[python-newest.c-api--sys] -trans.fr = c-api/sys.po -type = PO -source_lang = en - -[python-newest.c-api--bytearray] -trans.fr = c-api/bytearray.po -type = PO -source_lang = en - -[python-newest.c-api--tuple] -trans.fr = c-api/tuple.po -type = PO -source_lang = en - -[python-newest.c-api--apiabiversion] -trans.fr = c-api/apiabiversion.po -type = PO -source_lang = en - -[python-newest.c-api--stable] -trans.fr = c-api/stable.po -type = PO -source_lang = en - -[python-newest.c-api--objbuffer] -trans.fr = c-api/objbuffer.po -type = PO -source_lang = en - -[python-newest.c-api--slice] -trans.fr = c-api/slice.po -type = PO -source_lang = en - -[python-newest.c-api--long] -trans.fr = c-api/long.po -type = PO -source_lang = en - -[python-newest.c-api--iter] -trans.fr = c-api/iter.po -type = PO -source_lang = en - -[python-newest.c-api--utilities] -trans.fr = c-api/utilities.po -type = PO -source_lang = en - -[python-newest.c-api--complex] -trans.fr = c-api/complex.po -type = PO -source_lang = en - -[python-newest.c-api--descriptor] -trans.fr = c-api/descriptor.po -type = PO -source_lang = en diff --git a/CONTRIBUTING-CORE.rst b/CONTRIBUTING-CORE.rst index a6326b8158..9701a87ee4 100644 --- a/CONTRIBUTING-CORE.rst +++ b/CONTRIBUTING-CORE.rst @@ -1,41 +1,16 @@ Maintenance ----------- -Les commandes suivantes doivent être exécutées à partir de la racine d'un clone -de ``python-docs-fr`` et certaines s'attendent à trouver un clone de CPython -à jour à proximité : - -.. code-block:: bash - - ~/ - ├── python-docs-fr/ - └── cpython/ - - -Pour cloner CPython, vous pouvez utiliser : - -.. code-block:: bash - - git clone --depth 1 --no-single-branch https://github.com/python/cpython.git - - -Ceci évite de télécharger tout l'historique (inutile pour générer la -documentation) mais récupère néanmoins toutes les branches. - -.. code-block:: bash - - make merge - 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. @@ -43,9 +18,9 @@ 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 @@ -56,10 +31,10 @@ la 3.8 à la 3.7 : 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 @@ -84,4 +59,3 @@ Notes : 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 index 1cf595a078..4c3b595b8e 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,26 +1,125 @@ Guide de contribution à la documentation via GitHub -=================================================== - -Instructions ------------- +################################################### Prérequis -~~~~~~~~~ +========= + +Outils souhaitables +------------------- + +Pour pouvoir participer à la traduction en commun, il est souhaitable +d'installer : + +- un client ``git`` `Linux `_, `MacOS + `_ ou `Windows `_ ; -- un client ``git`` `Linux `_, `MacOS `_ ou `Windows `_ ; - un éditeur de fichier ``.po`` (comme `Poedit `_). -Équipez-vous aussi de quelques outils pour vous aider dans -votre traduction (voir `Outils utiles pour la traduction`_). + +Outils facultatifs +------------------ +De plus, il peut être utile de s'équiper d'utilitaires pour faciliter +la manipulation des fichiers ``.po`` et la traduction. + +`Poutils `_ est un paquet PyPI qui +regroupe un certain nombre d'outils liés à la traduction. Dans un +environnement disposant de Python 3.7 ou plus, installez-le avec :: + + python3 -m pip install poutils + +Dans notre cas, les utilitaires de *Poutils* qui nous intéressent sont : + +Pospell +^^^^^^^ + +Vérificateur d'orthographe fondé sur Hunspell. ``make spell`` exécute +Pospell. Pour l'utiliser, il vous faut installer Hunspell. Attention, +dans Debian notamment (et ses dérivés comme Ubuntu), il existe plusieurs +dictionnaires français qui diffèrent en raison de l'orthographe +réformée. Installez celui qui contient les deux orthographes avec :: + + sudo apt install hunspell hunspell-fr-comprehensive + +Potodo +^^^^^^ + +Permet d'identifier les parties de la documentation qu'il reste à +traduire. ``make todo`` fait appel à Potodo. + +Pogrep +^^^^^^ + +Permet de rechercher dans la documentation des termes. Utile si on a un doute +sur comment traduire un terme ou chercher la traduction d'un terme dans +d'autres fichiers. Pour connaître les options disponibles, tapez :: + + pogrep --help + +Powrap +^^^^^^ + +Formateur de fichier *.po*. C'est l'outil qui se cache derrière ``make +wrap``. + +Padpo (beta) +^^^^^^^^^^^^ + +Analyseur de code qui encapsule notamment `Grammalecte +`_ et qui vérifie la grammaire, l'orthographe +et la syntaxe des fichiers *.po*. + +Configuration des outils +------------------------ + +Configuration de Poedit +^^^^^^^^^^^^^^^^^^^^^^^ +* N'oubliez pas de configurer votre nom et + votre adresse de courriel (Édition → Préférences → Général). +* Vérifiez également qu'il est configuré pour passer à la ligne à 79 + caractères (Édition → Préférences → Avancé → Passer à la ligne à + 79). + +Configuration de Git (rendre plus lisible l'affichage des modifications) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Le résultat de ``git diff`` est souvent encombré de changements inutiles de numéros +de ligne, comme : + +.. code-block:: diff + + -#: ../Doc/library/sys.rst:406 + +#: ../Doc/library/sys.rst:408 -*fork* personnel sur Github -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +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``. -Pour commencer vous aurez besoin de *forker* le dépôt des sources `python-docs-fr -`_ en cliquant sur son bouton -``Fork``. Ceci crée une copie du projet sur votre compte Github, c'est un endroit -où vous avez le droit de faire des modifications. +.. 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 : @@ -40,12 +139,14 @@ où vous avez le droit de faire des modifications. git remote add upstream https://github.com/python/python-docs-fr.git -*fork* personnel sur une autre forge -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Sur une autre forge +------------------- -Si vous n'avez pas de compte Github, il est possible *fork* ce dépôt sur une autre forge. +Si vous n'avez pas de compte Github, il est possible d'utiliser une autre forge. Vous devez dans un premier temps initier un dépôt vide sur la forge où vous voulez héberger le -dépôt. +dépôt puis le peupler. + +Étape par étape : .. code-block:: bash @@ -66,15 +167,49 @@ dépôt. git push -u origin -Réservation d'un fichier -~~~~~~~~~~~~~~~~~~~~~~~~ +Deuxième étape : choisir et réserver le fichier sur lequel travailler +===================================================================== -*Chaque fois que vous commencez un nouveau fichier, suivez cette procédure.* +Note liminaire +-------------- + +Il est vivement conseillé de ne pas travailler sur fichiers des +répertoires *c-api/*, *whatsnew/*, *distutils/* et *install/* : + +- *c-api/* car c'est une partie très technique ; + +- *whatsnew/* car les anciennes versions de Python sont pour la plupart + obsolètes et leurs journaux de modifications ne sont pas les pages les plus + consultées ; + +- *distutils/*, *install/*, et quelques autres parties qui seront bientôt + obsolètes. De manière générale, il n'est pas utile de traduire un module que + sa documentation mentionne comme obsolète. + +Trouver un fichier sur lequel travailler +---------------------------------------- + +Pour vous aiguiller dans votre choix, vous pouvez utiliser ``potodo``, +un outil recherchant des fichiers ``.po`` à traduire. Une fois +installé, utilisez la commande ``make todo`` dans votre clone local. + +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. -Ensuite, vous devez trouver un fichier sur lequel travailler -(pour vous aiguiller, lisez la section `Que traduire ?`_). Nous vous conseillons -de choisir, si possible, un fichier traitant d'un sujet que vous maitrisez, cela -vous aidera grandement à produire une traduction de bonne qualité. +Nous vous conseillons de choisir, si possible, un fichier traitant +d'un sujet que vous maîtrisez, cela vous aidera grandement à produire +une traduction de bonne qualité. Si c'est votre première contribution, commencez par une toute petite traduction, de quelques paragraphes maximum, pour vous familiariser. Il n'est @@ -82,6 +217,11 @@ pas nécessaire de terminer un fichier lorsqu'on le commence, vous pouvez donc prendre n'importe quel fichier, mais ne traduire que quelques paragraphes. +Réserver le fichier +------------------- + +*Chaque fois que vous commencez un nouveau fichier, suivez cette procédure.* + Une fois que vous avez choisi un fichier sur lequel travailler vous pouvez nous le signaler par différents moyens : @@ -100,34 +240,37 @@ dans les tickets et les *pull requests*. `irc://irc.libera.chat/#python-docs-fr `_ pour nous le signaler. -Vous êtes maintenant prêt. Chaque fois que vous commencerez un nouveau fichier, -suivez cette procédure : -Pour travailler, nous avons besoin d'une branche, basée sur une version à jour -(fraîchement récupérée) de la branche « upstream/3.9 ». On met donc à jour notre -version locale. +Création de la branche de traduction +------------------------------------ + +*Chaque fois que vous commencez un nouveau fichier, suivez cette procédure.* + +Vous êtes maintenant prêt. Pour travailler, nous avons besoin d'une +branche, basée sur une version à jour (fraîchement récupérée) de la +branche « upstream/3.11 ». 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.9 », fraîchement récupérée. +On crée ensuite la branche, en la basant sur « upstream/3.11 », 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.9 + git checkout -b library-sys upstream/3.11 + -Vous pouvez maintenant travailler sur le fichier. -Si vous utilisez Poedit, n'oubliez pas de configurer votre nom et votre adresse de courriel -(Édition → Préférences → Général). -Vérifiez aussi qu'il est configuré pour passer à la ligne à 79 caractères -(Édition → Préférences → Avancé → Passer à la ligne à 79). +Troisième étape: Traduction +=========================== +Avec Poedit +--------------- Ici, remplacez « library/sys.po » par le fichier que vous avez choisi précédemment. .. code-block:: bash @@ -138,36 +281,28 @@ Ici, remplacez « library/sys.po » par le fichier que vous avez choisi préc Ou lancez simplement Poedit puis « Fichier » → « Ouvrir ». -Traduction -~~~~~~~~~~ - -Vous pouvez dès à présent commencer à traduire le fichier en respectant les `conventions`_ du projet. -Pour vous aider à ne pas faire de fautes d'orthographe, vous pouvez vérifier que tous les mots utilisés sont -bien dans le dictionnaire (ça ne vérifie 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. - -.. code-block:: bash - - make spell - - -Vous pouvez aussi réindenter les fichiers avec : - -.. code-block:: bash - - make wrap - +Vérifications après traduction +------------------------------ -Et pour faire les deux à la fois, lancez : +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 +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 @@ -180,33 +315,37 @@ documentation local : .. code-block:: bash - make serve + make htmlview + + +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. -La documentation est publiée l'adresse ``_ -(ou tout autre port indiqué par la sortie de la commande précédente). Vous pouvez -recommencer les étapes de cette section autant de fois que nécessaire. +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``. +*affichez et relisez la page HTML produite* avec ``make htmlview``. -*pull request* -~~~~~~~~~~~~~~ +Quatrième étape : publier sa traduction +======================================= Une fois que le *make verifs* ne lève pas d'erreur et que vous êtes certains de bien respecter les `Conventions`_ de traduction, vient le moment d'envoyer votre travail sur le dépôt local. -``git add`` place nos modifications dans l'index de Git en -attendant d'être propagées dans le dépôt local. +* ``git add`` place nos modifications dans l'index de Git en attendant + d'être propagées dans le dépôt local. .. code-block:: bash git add library/sys.po -``git commit`` permet de les propager : +* ``git commit`` permet de les propager : .. code-block:: bash @@ -224,7 +363,7 @@ branche est liée à votre *fork* (et donc que vos futurs ``git pull`` et git push --set-upstream origin Sur Github -++++++++++ +---------- La commande précédente vous affiche un lien pour ouvrir une *pull request* sur Github. Si vous l'avez manqué, allez simplement sur https://github.com/python/python-docs-fr/pulls @@ -252,7 +391,7 @@ GitHub puis relancer ``powrap`` : git push Sur une autre forge -+++++++++++++++++++ +------------------- Quand vous avez poussé vos modifications, il y a plusieurs possibilités. @@ -297,45 +436,22 @@ 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.8, 3.9, etc.), seulement récupéré les +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.9, nous ne voulons pas -traduire directement sur la version Python 3.5. +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 `_. -Que traduire ? --------------- - -Vous pouvez utiliser `potodo`_, un outil fait pour trouver des fichiers *po* -à traduire. Une fois installé, utilisez la commande ``make todo`` dans votre clone -local. - -Vous pouvez choisir n'importe quel fichier non réservé dans la liste -renvoyée par la commande **à l'exception** des fichiers de : - -- *c-api/* car c'est une partie très technique ; -- *whatsnew/* car les anciennes versions de Python sont pour la plupart obsolètes et leurs journaux de modifications ne sont pas les pages les plus consultées ; -- *distutils/* et *install/* car ces pages seront bientôt obsolètes. - -Vous pouvez commencer par des tâches faciles comme réviser les entrées -*fuzzy* pour aider à garder la documentation à jour (trouvez-les à l'aide -de ``make fuzzy``). Une entrée *fuzzy* correspond à une entrée déjà traduite -mais dont la source en anglais a été remodifiée depuis (correction orthographique, -changement d'un terme, ajout ou suppression d'une phrase…). Elles sont -généralement plus « faciles » à traduire. - -Vous pouvez également relire des entrées déjà traduites pour vous faire une -idée, et passer ensuite à la traduction de celles qui ne le sont pas encore. Conventions ------------ +=========== Certaines conventions ont été édictées pour homogénéiser la traduction. Il faut suivre les règles de `style`_ imposées, les `règles rst`_ et @@ -343,7 +459,7 @@ les traductions déjà définies dans le `glossaire`_. Style -~~~~~ +----- Une bonne traduction est une traduction qui transcrit fidèlement l'idée originelle en français, sans rien ajouter ni enlever au fond, tout en restant claire, concise et @@ -354,7 +470,7 @@ documentation anglaise, si le rythme l'exige. Il faut aussi chercher des garde aux anglicismes. Utilisation du futur -++++++++++++++++++++ +^^^^^^^^^^^^^^^^^^^^ Dans la description du comportement de Python (au sens large, c'est-à-dire l'interpréteur lui-même mais aussi toutes les bibliothèques), la version @@ -367,13 +483,13 @@ processus de compilation n'est pas immédiat) ou pour des raisons de concordance des temps. Utilisation du conditionnel -+++++++++++++++++++++++++++ +^^^^^^^^^^^^^^^^^^^^^^^^^^^ La version originale est très polie envers le lecteur ; elle lui intime rarement des obligations, préférant employer « you should ». Cependant, en français, il est d'usage d'être plus direct pour être correctement compris : « vous devez ». *Vous devriez* est en effet généralement compris comme quelque -chose dont l'on peut de temps en temps se passer, alors que c'est très +chose dont on peut de temps en temps se passer, alors que c'est très rarement le cas pour les « you should » de cette documentation. De la même manière, « can » est souvent mieux traduit sans introduire de notion de possibilité, en particulier quand la phrase est à la voix passive ; la @@ -381,20 +497,20 @@ phrase « these objects can be accessed by… » se traduit mieux par « on ac ces objets en… ». Utilisation du masculin -+++++++++++++++++++++++ +^^^^^^^^^^^^^^^^^^^^^^^ Dans un souci de lisibilité et en accord avec la préconisation de l'Académie française, nous utilisons le masculin pour indiquer un genre neutre. Par exemple : l'utilisateur ou le lecteur. Règles rst -~~~~~~~~~~ +---------- Prototypes et exemples -++++++++++++++++++++++ +^^^^^^^^^^^^^^^^^^^^^^ Il ne faut pas traduire le nom des éléments de la bibliothèque standard (noms -de fonctions, paramètres de ces fonctions, constantes etc.) mais les laisser +de fonctions, paramètres de ces fonctions, constantes, etc.) mais les laisser tels quel, entourés d'astérisques dans les blocs de texte. Si la documentation contient des exemples, vous *pouvez* traduire les noms utilisés, en prenant garde d'être cohérent. Vous pouvez ainsi traduire : @@ -425,7 +541,7 @@ mais pas en Liens hypertextes -+++++++++++++++++ +^^^^^^^^^^^^^^^^^ Il faut transformer les liens hypertextes qui redirigent vers une page dont il existe une version française (c'est notamment très souvent le cas pour les @@ -436,11 +552,11 @@ doit devenir ```Jeu de la vie `_``. Balises -+++++++ +^^^^^^^ Ne traduisez pas le contenu des balises comme ``:ref:...`` ou ``:class:...``. Vous devez cependant traduire les balises ``:term:...``, qui font référence à -un concept ou une primitive défini dans le `glossaire Python `_. +une primitive ou un concept défini dans le `glossaire Python `_. La syntaxe est ``:term:nom_français``. Par exemple, traduisez ``:term:`dictionary``` en ``:term:`dictionnaire ```. @@ -449,7 +565,7 @@ terme que vous pouvez rencontrer. Glossaire -~~~~~~~~~ +========= Afin d'assurer la cohérence de la traduction, voici quelques termes fréquents déjà traduits. Une liste blanche de noms propres, comme « Guido », @@ -478,6 +594,7 @@ bytecode code intermédiaire callback fonction de rappel call stack pile d'appels caught (exception) interceptée +daemon *daemon* debugging débogage deep copy copie récursive (préféré), ou copie profonde double quote guillemet @@ -529,11 +646,13 @@ roughly approximativement, à peu près (on ne traduit pas 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 @@ -547,12 +666,12 @@ whitespace caractère d'espacement ========================== =============================================== Ressources de traduction ------------------------- +======================== - les canaux IRC sur irc.libera.chat : - `#python-docs-fr `_ — communauté python autour de la documentation française, - - `#python-fr `_ — communauté python francophone, + - `#python-fr `_ — communauté python francophone, - `#python-doc `_ — communauté python autour de la documentation anglophone ; - les listes de diffusion relatives à la documentation (courriel) : @@ -561,8 +680,8 @@ Ressources de traduction - des glossaires et dictionnaires : - le `glossaire de la documentation Python `_, car il est déjà traduit, - - les `glossaires et dictionnaires de traduc.org `_, en particulier le `grand dictionnaire terminologique `_ de l'Office québécois de la langue française, - - Wikipédia. En consultant un article sur la version anglaise, puis en basculant sur la version francaise pour voir comment le sujet de l'article est traduit ; + - les `glossaires et dictionnaires de traduc.org `_, en particulier le `grand dictionnaire terminologique `_ de l'Office québécois de la langue française, + - Wikipédia. En consultant un article sur la version anglaise, puis en basculant sur la version française pour voir comment le sujet de l'article est traduit ; - le `guide stylistique pour le français de localisation des produits Sun `_ donne beaucoup de conseils pour éviter une traduction trop mot à mot ; @@ -577,10 +696,10 @@ page et génèrent une documentation au style très « lourd ». Caractères spéciaux et typographie ----------------------------------- +================================== La touche de composition -~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------ Cette `touche `_, absente par défaut des claviers, permet de saisir des @@ -605,7 +724,7 @@ simplement fonctionner : - etc. Comment définir la touche de composition ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------------------------ Cela dépend de votre système d'exploitation et de votre clavier. @@ -624,7 +743,7 @@ ajouter l'équivalent de : keycode 115 = Multi_key -Utilisez ``xev`` pour connaitre la bonne correspondance de la touche que vous +Utilisez ``xev`` pour connaître la bonne correspondance de la touche que vous voulez assigner ! Ensuite, dans votre fichier *~/.xsession*, ajoutez : @@ -642,8 +761,8 @@ modifier dans les « Paramètres » → « Clavier » → « Disposition » → ⇒ Sous Windows, vous pouvez utiliser `wincompose `_. -Le cas de « --- », « -- », « ... » -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Le cas de « --- », « -- », « ... » +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ La version anglaise utilise les `smartquotes `_, @@ -659,7 +778,7 @@ Les *smartquotes* sont normalement responsables de la transformation de | « ... » : faites :kbd:`Compose . . .` Le cas de « "…" » -~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^ Les guillemets français ``«`` et ``»`` ne sont pas identiques aux guillemets anglais ``"``. Cependant, Python utilise les guillemets @@ -670,7 +789,7 @@ traduire les guillemets mais pas les délimiteurs de chaîne. | « "…" » : faites :kbd:`Compose < <` ou :kbd:`Compose > >` Le cas de « :: » -~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^ | Du point de vue du langage *reStructuredText* (ou *rst*) utilisé dans la documentation nous voyons soit « bla bla:: », soit « bla bla. :: ». @@ -686,7 +805,7 @@ En français, nous mettons une espace insécable devant nos deux-points, comme : Pour saisir une espace insécable faites :kbd:`Compose SPACE SPACE` Les doubles-espaces -~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^ La documentation originale comporte beaucoup de doubles-espaces. Cela se fait en anglais, mais pas en français. De toute manière, @@ -697,7 +816,7 @@ coté traduction : nous ne les retirons pas et ce n'est pas grave si des traducteurs en retirent par accident. Les énumérations -~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^ Chaque paragraphe d'une énumération introduite par un deux-point doit se terminer par un point-virgule (bien entendu précédé d'une @@ -710,7 +829,7 @@ une virgule et le dernier par un point-virgule. Par exemple : - le premier paragraphe de l'énumération ; -- le deuxième paragraphe, lui-aussi une énumération : +- le deuxième paragraphe, lui aussi une énumération : - premier sous-paragraphe, - second sous-paragraphe ; @@ -722,71 +841,3 @@ entre un paragraphe et sa traduction ; il faut passer outre ses avertissements. Vous pouvez aussi rajouter un commentaire dans le fichier *.po* pour avertir les traducteurs suivants et éviter qu'ils ne « corrigent » par erreur ces avertissements. - -Outils utiles pour la traduction --------------------------------- - -Potodo -~~~~~~ - -| Permet de d'identifier les parties de la documention qu'il reste à traduire. -| Installez-le à l'aide de *pip* (``pip install potodo``) dans un environnement - ``python3.6`` ou plus. -| `Lien vers le dépôt `__ - -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. -| Installez-le à l'aide de *pip* (``pip install pogrep``). -| `Lien vers le dépôt `__ - -Padpo (beta) -~~~~~~~~~~~~ - -| Analyseur de code qui vérifie la grammaire et l'orthographe et la syntaxe - du fichier .po. -| Installez-le à l'aide de *pip* (``pip install padpo``) dans un environnement - ``python3.7`` ou plus. -| `Lien vers le dépôt `__ - -Powrap -~~~~~~ - -| Formateur de fichier .po. -| Installez-le à l'aide de *pip* (``pip install powrap``). -| `Lien vers le dépôt `__ - - -Affichage des modifications par Git -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Le résultat de ``git diff`` est souvent encombré de changements inutiles de numéros -de ligne, comme : - -.. code-block:: diff - - -#: ../Doc/library/sys.rst:406 - +#: ../Doc/library/sys.rst:408 - - -Pour dire à Git que ce ne sont pas des informations utiles, vous pouvez faire -ce qui suit après vous être assuré que ``~/.local/bin/`` se trouve dans votre -``PATH``. - -.. code-block:: bash - - cat < ~/.local/bin/podiff - #!/bin/sh - grep -v '^#:' "\$1" - EOF - - chmod a+x ~/.local/bin/podiff - - git config diff.podiff.textconv podiff - - -Pas d'inquiétude, cela ne change la façon dont Git affiche les changements que sur -les fichiers de la traduction, sans incidence sur les autres. diff --git a/Makefile b/Makefile index c87c500299..7e3521e296 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,12 @@ # Here is what you can do: # # - make # Automatically build an HTML local version -# - make todo # To list remaining tasks +# - make todo # To list remaining tasks and show current progression # - make verifs # To check for correctness: wrapping, spelling -# - make wrap # To check for wrapping +# - make wrap # To rewrap modified files # - make spell # To check for spelling -# - make merge # To merge pot from upstream +# - make clean # To remove build artifacts # - make fuzzy # To find fuzzy strings -# - make progress # To compute current progression # # Modes are: autobuild-stable, autobuild-dev, and autobuild-html, # documented in gen/src/3.6/Doc/Makefile as we're only delegating the @@ -21,14 +20,42 @@ # from which we generated our po files. We use it here so when we # test build, we're building with the .rst files that generated our # .po files. -CPYTHON_CURRENT_COMMIT := eec8e61992fb654d4cf58de4d727c18622b8303e - -CPYTHON_PATH := ../cpython/ - +CPYTHON_CURRENT_COMMIT := 748c83d96da735f8210167d676469860d4e11b80 LANGUAGE := fr -BRANCH := 3.9 - -EXCLUDED := whatsnew/ c-api/ +BRANCH := 3.11 + +EXCLUDED := \ + whatsnew/2.?.po \ + whatsnew/3.[0-8].po \ + c-api/ \ + distutils/ \ + install/ \ + library/2to3.po \ + library/distutils.po \ + library/imp.po \ + library/tkinter.tix.po \ + library/test.po \ + library/aifc.po \ + library/asynchat.po \ + library/asyncore.po \ + library/audioop.po \ + library/cgi.po \ + library/cgitb.po \ + library/chunk.po \ + library/crypt.po \ + library/imghdr.po \ + library/msilib.po \ + library/nntplib.po \ + library/nis.po \ + library/ossaudiodev.po \ + library/pipes.po \ + library/smtpd.po \ + library/sndhdr.po \ + library/spwd.po \ + library/sunau.po \ + library/telnetlib.po \ + library/uu.po \ + library/xdrlib.po # Internal variables @@ -38,6 +65,7 @@ PYTHON := $(shell which python3) MODE := html POSPELL_TMP_DIR := .pospell/ JOBS := auto +SERVE_PORT := # Detect OS @@ -58,60 +86,40 @@ endif .PHONY: all all: ensure_prerequisites - git -C $(CPYTHON_PATH) checkout $(CPYTHON_CURRENT_COMMIT) + git -C venv/cpython checkout $(CPYTHON_CURRENT_COMMIT) || (git -C venv/cpython fetch && git -C venv/cpython checkout $(CPYTHON_CURRENT_COMMIT)) mkdir -p locales/$(LANGUAGE)/LC_MESSAGES/ $(CP_CMD) -u --parents *.po */*.po locales/$(LANGUAGE)/LC_MESSAGES/ - $(MAKE) -C $(CPYTHON_PATH)/Doc/ \ - SPHINXOPTS='-W -j$(JOBS) \ + $(MAKE) -C venv/cpython/Doc/ \ + SPHINXOPTS='-j$(JOBS) \ -D locale_dirs=$(abspath locales) \ -D language=$(LANGUAGE) \ - -D gettext_compact=0 \ + -D gettext_compact=0 \ -D latex_engine=xelatex \ -D latex_elements.inputenc= \ -D latex_elements.fontenc=' \ $(MODE) - @echo "Build success, open file://$(abspath $(CPYTHON_PATH))/Doc/build/html/index.html or run 'make serve' to see them." + @echo "Build success, open file://$(abspath venv/cpython/)/Doc/build/html/index.html or run 'make htmlview' to see them." + + +# We clone cpython/ inside venv/ because venv/ is the only directory +# excluded by cpython' Sphinx configuration. +venv/cpython/.git/HEAD: + git clone https://github.com/python/cpython venv/cpython .PHONY: ensure_prerequisites -ensure_prerequisites: - @if [ -z $(CPYTHON_PATH) ]; then \ - echo "Your CPYTHON_PATH is empty, please provide one."; \ - exit 1; \ - fi - @if ! [ -d $(CPYTHON_PATH) ]; then \ - echo "Building the translation requires a cpython clone."; \ - echo "Please provide the path to a clone using the CPYTHON_PATH variable."; \ - echo "(Currently CPYTHON_PATH is $(CPYTHON_PATH)."; \ - echo "So you may want to run:"; \ - echo ""; \ - echo " git clone $(UPSTREAM) $(CPYTHON_PATH)"; \ - exit 1; \ - fi - @if [ -n "$$(git -C $(CPYTHON_PATH) status --porcelain)" ]; then \ - echo "Your cpython clone at $(CPYTHON_PATH) is not clean."; \ - echo "In order to avoid breaking things, please clean it first."; \ - exit 1; \ - fi +ensure_prerequisites: venv/cpython/.git/HEAD @if ! (blurb help >/dev/null 2>&1 && sphinx-build --version >/dev/null 2>&1); then \ - git -C $(CPYTHON_PATH) checkout $(BRANCH); \ - echo "You're missing dependencies, please enable a venv and install:"; \ + git -C venv/cpython/ checkout $(BRANCH); \ + echo "You're missing dependencies please install:"; \ echo ""; \ - echo " python -m pip install -r requirements.txt -r $(CPYTHON_PATH)/Doc/requirements.txt"; \ + echo " python -m pip install -r requirements.txt -r venv/cpython/Doc/requirements.txt"; \ exit 1; \ fi -.PHONY: serve -serve: - $(MAKE) -C $(CPYTHON_PATH)/Doc/ serve - - -.PHONY: progress -progress: - @$(PYTHON) -c 'import sys; print("{:.1%}".format(int(sys.argv[1]) / int(sys.argv[2])))' \ - $(shell msgcat *.po */*.po | msgattrib --translated | grep -c '^msgid') \ - $(shell msgcat *.po */*.po | grep -c '^msgid') - +.PHONY: htmlview +htmlview: MODE=htmlview +htmlview: all .PHONY: todo todo: ensure_prerequisites @@ -119,8 +127,8 @@ todo: ensure_prerequisites .PHONY: wrap wrap: ensure_prerequisites - @echo "Verify wrapping" - powrap --check --quiet *.po **/*.po + @echo "Re wrapping modified files" + powrap -m SRCS = $(shell git diff --name-only $(BRANCH) | grep '.po$$') # foo/bar.po => $(POSPELL_TMP_DIR)/foo/bar.po.out @@ -139,34 +147,12 @@ fuzzy: ensure_prerequisites potodo -f --exclude venv .venv $(EXCLUDED) .PHONY: verifs -verifs: wrap spell - -.PHONY: merge -merge: ensure_prerequisites - @echo "Merge from $(UPSTREAM)" - git -C $(CPYTHON_PATH) checkout $(BRANCH) - git -C $(CPYTHON_PATH) pull --ff-only - (cd $(CPYTHON_PATH)/Doc; sphinx-build -Q -b gettext -D gettext_compact=0 . ../pot) - find $(CPYTHON_PATH)/pot/ -name '*.pot' |\ - while read -r POT; \ - do \ - PO="./$$(echo "$$POT" | sed "s#$(CPYTHON_PATH)/pot/##; s#\.pot\$$#.po#")"; \ - mkdir -p "$$(dirname "$$PO")"; \ - if [ -f "$$PO" ]; \ - then \ - msgmerge --backup=off --force-po -U "$$PO" "$$POT"; \ - else \ - msgcat -o "$$PO" "$$POT"; \ - fi \ - done - rm -fr $(CPYTHON_PATH)/pot/ - sed -i 's|^#: .*Doc/|#: |' *.po */*.po - powrap -m - @printf "\n%s %s\n" "Replace CPYTHON_CURRENT_COMMIT in Makefile by: " $(shell git -C $(CPYTHON_PATH) rev-parse HEAD) - @printf 'To add, you can use:\n git status -s | grep "^ M .*\.po" | cut -d" " -f3 | while read -r file; do if [ $$(git diff "$$file" | wc -l) -gt 13 ]; then git add "$$file"; fi ; done\n' +verifs: spell .PHONY: clean clean: @echo "Cleaning *.mo and $(POSPELL_TMP_DIR)" rm -fr $(POSPELL_TMP_DIR) find -name '*.mo' -delete + @echo "Cleaning build directory" + $(MAKE) -C venv/cpython/Doc/ clean diff --git a/README.rst b/README.rst index fe4ba11903..85c9cd17af 100644 --- a/README.rst +++ b/README.rst @@ -1,15 +1,6 @@ Traduction française de la documentation Python =============================================== -|build| |progression| - -.. |build| image:: https://travis-ci.org/python/python-docs-fr.svg?branch=3.9 - :target: https://travis-ci.org/python/python-docs-fr - :width: 45% - -.. |progression| image:: https://img.shields.io/badge/dynamic/json.svg?label=fr&query=%24.fr&url=http%3A%2F%2Fgce.zhsj.me%2Fpython/newest - :width: 45% - 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 @@ -26,16 +17,16 @@ 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 + 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 `_ +`guide `_ pour apprendre les conventions à respecter. -Le `coordinateur ` de +Le `coordinateur `_ de cette traduction est `Julien Palard (mdk) `_. Vous pouvez obtenir de l'aide sur le canal `irc://irc.libera.chat/#python-fr `_ @@ -72,6 +63,12 @@ Historique du projet - vers 2000 : `lancement du projet `_ ; - vers 2012 : `reprise `_ par l'`AFPy `_ ; -- 2017 : le projet devient traduction officielle de la documentation Python par la `PEP 545 `_. +- 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 -Une `vidéo `_ de `Jules Lasne `_ montre l'évolution du dépôt. diff --git a/TRANSLATORS b/TRANSLATORS index 1e7d605ff7..6df8140bf5 100644 --- a/TRANSLATORS +++ b/TRANSLATORS @@ -20,3 +20,4 @@ Loc Cosnier Yannick Gingras Martin Chlumsky Stephan Michaud +Edith Viau diff --git a/about.po b/about.po index abd282341b..7f0a550501 100644 --- a/about.po +++ b/about.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2018-07-23 17:55+0200\n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: 2022-07-08 17:54+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -61,17 +61,17 @@ msgstr "" #: about.rst:26 msgid "" -"Fredrik Lundh for his `Alternative Python Reference `_ project from which Sphinx got many good ideas." +"Fredrik Lundh for his Alternative Python Reference project from which Sphinx " +"got many good ideas." msgstr "" -"Fredrik Lundh pour son projet `Alternative Python Reference `_, dont Sphinx a pris beaucoup de bonnes idées." +"Fredrik Lundh pour son projet *Alternative Python Reference*, dont Sphinx a " +"pris beaucoup de bonnes idées." -#: about.rst:32 +#: about.rst:31 msgid "Contributors to the Python Documentation" msgstr "Contributeurs de la documentation Python" -#: about.rst:34 +#: about.rst:33 msgid "" "Many people have contributed to the Python language, the Python standard " "library, and the Python documentation. See :source:`Misc/ACKS` in the " @@ -82,7 +82,7 @@ msgstr "" "sources de la distribution Python pour avoir une liste partielle des " "contributeurs." -#: about.rst:38 +#: about.rst:37 msgid "" "It is only with the input and contributions of the Python community that " "Python has such wonderful documentation -- Thank You!" diff --git a/bugs.po b/bugs.po index 2e0b020397..e40b0a32ce 100644 --- a/bugs.po +++ b/bugs.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2021-05-26 23:13+0200\n" -"Last-Translator: Antoine Wecxsteen\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\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 2.2.3\n" +"X-Generator: Poedit 3.0\n" #: bugs.rst:5 msgid "Dealing with Bugs" @@ -95,7 +95,7 @@ msgstr "" "Vue d'ensemble du processus pour proposer une amélioration avec l'outil de " "suivi." -#: bugs.rst:35 +#: bugs.rst:36 msgid "" "`Helping with Documentation `_" @@ -109,30 +109,49 @@ msgid "" "Python documentation." msgstr "Guide complet pour qui souhaite contribuer à la documentation Python." -#: bugs.rst:41 +#: bugs.rst:38 +msgid "" +"`Documentation Translations `_" +msgstr "" +"`Aider avec la documentation `_" + +#: bugs.rst:39 +msgid "" +"A list of GitHub pages for documentation translation and their primary " +"contacts." +msgstr "" +"Liste de dépôts GitHub où la documentation est traduite, avec les personnes " +"à contacter." + +#: bugs.rst:45 msgid "Using the Python issue tracker" msgstr "Utilisation du gestionnaire de tickets Python" -#: bugs.rst:43 +#: bugs.rst:47 +#, fuzzy msgid "" -"Bug reports for Python itself should be submitted via the Python Bug Tracker " -"(https://bugs.python.org/). The bug tracker offers a Web form which allows " -"pertinent information to be entered and submitted to the developers." +"Issue reports for Python itself should be submitted via the GitHub issues " +"tracker (https://github.com/python/cpython/issues). The GitHub issues " +"tracker offers a web form which allows pertinent information to be entered " +"and submitted to the developers." msgstr "" "Les rapports de bogues pour Python lui-même devraient être soumis via le " "l'outil de suivi des bogues (*Bug Tracker Python* — http://bugs.python." "org/). Le gestionnaire de tickets propose un formulaire Web permettant de " "saisir des informations pertinentes à soumettre aux développeurs." -#: bugs.rst:47 +#: bugs.rst:52 +#, fuzzy msgid "" "The first step in filing a report is to determine whether the problem has " "already been reported. The advantage in doing so, aside from saving the " -"developers time, is that you learn what has been done to fix it; it may be " +"developers' time, is that you learn what has been done to fix it; it may be " "that the problem has already been fixed for the next release, or additional " "information is needed (in which case you are welcome to provide it if you " -"can!). To do this, search the bug database using the search box on the top " -"of the page." +"can!). To do this, search the tracker using the search box at the top of the " +"page." msgstr "" "La première étape pour remplir un rapport est de déterminer si le problème a " "déjà été rapporté. L'avantage de cette approche, en plus d'économiser du " @@ -142,13 +161,13 @@ msgstr "" "contribution est la bienvenue !). Pour ce faire, cherchez dans la base de " "données de bogues grâce à la boîte de recherche en haut de la page." -#: bugs.rst:54 +#: bugs.rst:59 +#, fuzzy msgid "" -"If the problem you're reporting is not already in the bug tracker, go back " -"to the Python Bug Tracker and log in. If you don't already have a tracker " -"account, select the \"Register\" link or, if you use OpenID, one of the " -"OpenID provider logos in the sidebar. It is not possible to submit a bug " -"report anonymously." +"If the problem you're reporting is not already in the list, log in to " +"GitHub. If you don't already have a GitHub account, create a new account " +"using the \"Sign up\" link. It is not possible to submit a bug report " +"anonymously." msgstr "" "Si le problème que vous soumettez n'est pas déjà dans l'outil de suivi des " "bogues, revenez au *Python Bug Tracker* et connectez-vous. Si vous n'avez " @@ -157,29 +176,27 @@ msgstr "" "dans la barre latérale. Il n'est pas possible de soumettre un rapport de " "bogue de manière anonyme." -#: bugs.rst:59 +#: bugs.rst:64 +#, fuzzy msgid "" -"Being now logged in, you can submit a bug. Select the \"Create New\" link " -"in the sidebar to open the bug reporting form." +"Being now logged in, you can submit an issue. Click on the \"New issue\" " +"button in the top bar to report a new issue." msgstr "" "Une fois identifié, pour pouvez rapporter un bogue. Sélectionnez le lien " "*Create New* dans la barre latérale pour ouvrir un nouveau formulaire de " "rapport de bogue." -#: bugs.rst:62 +#: bugs.rst:67 +msgid "The submission form has two fields, \"Title\" and \"Comment\"." +msgstr "" + +#: bugs.rst:69 msgid "" -"The submission form has a number of fields. For the \"Title\" field, enter " -"a *very* short description of the problem; less than ten words is good. In " -"the \"Type\" field, select the type of your problem; also select the " -"\"Component\" and \"Versions\" to which the bug relates." +"For the \"Title\" field, enter a *very* short description of the problem; " +"less than ten words is good." msgstr "" -"Le formulaire de soumission a un certain nombre de champs. Pour le champ " -"« Titre », saisissez une *très* courte description du problème ; moins de " -"dix mots est approprié. Dans le champ « Type », sélectionnez le type de " -"problème ; sélectionnez aussi « Composant » et « Versions » en rapport avec " -"le bogue." -#: bugs.rst:67 +#: bugs.rst:72 msgid "" "In the \"Comment\" field, describe the problem in detail, including what you " "expected to happen and what did happen. Be sure to include whether any " @@ -192,17 +209,18 @@ msgstr "" "plateforme matérielle et logicielle vous utilisiez (en incluant les " "informations de versions)." -#: bugs.rst:72 +#: bugs.rst:77 +#, fuzzy msgid "" -"Each bug report will be assigned to a developer who will determine what " -"needs to be done to correct the problem. You will receive an update each " -"time action is taken on the bug." +"Each issue report will be reviewed by a developer who will determine what " +"needs to be done to correct the problem. You will receive an update each " +"time an action is taken on the issue." msgstr "" "Chaque bogue sera attribué à un développeur qui déterminera ce qui est " "nécessaire d'entreprendre pour corriger le problème. Vous recevrez une " "notification à chaque action effectuée sur le bogue." -#: bugs.rst:81 +#: bugs.rst:86 msgid "" "`How to Report Bugs Effectively `_" @@ -210,7 +228,7 @@ msgstr "" "`Comment signaler des bogues de manière efficace `_ (en anglais)" -#: bugs.rst:80 +#: bugs.rst:85 msgid "" "Article which goes into some detail about how to create a useful bug report. " "This describes what kind of information is useful and why it is useful." @@ -219,15 +237,15 @@ msgstr "" "bogue utile. Il décrit quel genre d'information est utile et pourquoi elle " "est utile." -#: bugs.rst:84 +#: bugs.rst:89 msgid "" -"`Bug Report Writing Guidelines `_" +"`Bug Writing Guidelines `_" msgstr "" -"`Guide pour la rédaction de rapports de bogues `_" +"`Guide pour la rédaction de rapports de bogues `_" -#: bugs.rst:84 +#: bugs.rst:89 msgid "" "Information about writing a good bug report. Some of this is specific to " "the Mozilla project, but describes general good practices." @@ -235,11 +253,11 @@ msgstr "" "Conseils pour écrire un bon rapport de bogue. Certains sont spécifiques au " "projet Mozilla mais présentent des bonnes pratiques générales." -#: bugs.rst:90 +#: bugs.rst:95 msgid "Getting started contributing to Python yourself" msgstr "Commencer à contribuer à Python vous-même" -#: bugs.rst:92 +#: bugs.rst:97 msgid "" "Beyond just reporting bugs that you find, you are also welcome to submit " "patches to fix them. You can find more information on how to get started " @@ -253,3 +271,15 @@ msgstr "" "Developer's Guide`_. Si vous avez des questions, le `core-mentorship mailing " "list`_ est un endroit amical pour obtenir des réponses à toutes les " "questions à propos du processus de corrections de bugs dans Python." + +#~ msgid "" +#~ "The submission form has a number of fields. For the \"Title\" field, " +#~ "enter a *very* short description of the problem; less than ten words is " +#~ "good. In the \"Type\" field, select the type of your problem; also " +#~ "select the \"Component\" and \"Versions\" to which the bug relates." +#~ msgstr "" +#~ "Le formulaire de soumission a un certain nombre de champs. Pour le champ " +#~ "« Titre », saisissez une *très* courte description du problème ; moins de " +#~ "dix mots est approprié. Dans le champ « Type », sélectionnez le type de " +#~ "problème ; sélectionnez aussi « Composant » et « Versions » en rapport " +#~ "avec le bogue." diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po index dc75ce90fd..8fce41dc72 100644 --- a/c-api/apiabiversion.po +++ b/c-api/apiabiversion.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -20,101 +20,192 @@ msgstr "Version des API et ABI" #: c-api/apiabiversion.rst:9 msgid "" -"``PY_VERSION_HEX`` is the Python version number encoded in a single integer." +"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 "" + +#: c-api/apiabiversion.rst:13 +msgid "" +"See :ref:`stable` for a discussion of API and ABI stability across versions." +msgstr "" + +#: c-api/apiabiversion.rst:17 +#, fuzzy +msgid "The ``3`` in ``3.4.1a2``." +msgstr "``PY_MAJOR_VERSION`` (le ``3`` dans ``3.4.1a2``)" + +#: c-api/apiabiversion.rst:21 +#, fuzzy +msgid "The ``4`` in ``3.4.1a2``." +msgstr "``PY_MINOR_VERSION`` (le ``4`` dans ``3.4.1a2``)" + +#: c-api/apiabiversion.rst:25 +#, fuzzy +msgid "The ``1`` in ``3.4.1a2``." +msgstr "``PY_MICRO_VERSION`` (le ``1`` dans ``3.4.1a2``)" + +#: c-api/apiabiversion.rst:29 +#, fuzzy +msgid "" +"The ``a`` in ``3.4.1a2``. This can be ``0xA`` for alpha, ``0xB`` for beta, " +"``0xC`` for release candidate or ``0xF`` for final." +msgstr "" +"``PY_RELEASE_LEVEL`` (``0xA`` pour alpha, ``0xB`` pour bêta, ``0xC`` pour " +"une version candidate et ``0xF`` pour final), dans ce cas c'est alpha." + +#: c-api/apiabiversion.rst:35 +#, fuzzy +msgid "The ``2`` in ``3.4.1a2``. Zero for final releases." +msgstr "" +"``PY_RELEASE_SERIAL`` (le ``2`` au ``3.4.1a2``, zéro pour des versions " +"finales)" + +#: c-api/apiabiversion.rst:39 +#, fuzzy +msgid "The Python version number encoded in a single integer." msgstr "" "``PY_VERSION_HEX`` est le numéro de version de Python encodé en un seul " "entier." -#: c-api/apiabiversion.rst:11 +#: c-api/apiabiversion.rst:41 +#, fuzzy msgid "" -"For example if the ``PY_VERSION_HEX`` is set to ``0x030401a2``, the " -"underlying version information can be found by treating it as a 32 bit " +"The underlying version information can be found by treating it as a 32 bit " "number in the following manner:" msgstr "" "Par exemple si le ``PY_VERSION_HEX` est défini à ``0x030401a2``, la " "version d'information sous-jacente peut être trouvée en la traitant comme un " "nombre sous 32 bits de la manière suivante:" -#: c-api/apiabiversion.rst:16 +#: c-api/apiabiversion.rst:45 msgid "Bytes" msgstr "Bytes" -#: c-api/apiabiversion.rst:16 +#: c-api/apiabiversion.rst:45 msgid "Bits (big endian order)" msgstr "Bits (ordre gros-boutiste)" -#: c-api/apiabiversion.rst:16 +#: c-api/apiabiversion.rst:45 msgid "Meaning" msgstr "Signification" -#: c-api/apiabiversion.rst:18 -msgid "``1``" -msgstr "``1``" +#: c-api/apiabiversion.rst:45 +msgid "Value for ``3.4.1a2``" +msgstr "" + +#: c-api/apiabiversion.rst:47 +msgid "1" +msgstr "" -#: c-api/apiabiversion.rst:18 -msgid "``1-8``" +#: c-api/apiabiversion.rst:47 +#, fuzzy +msgid "1-8" msgstr "``1-8``" -#: c-api/apiabiversion.rst:18 -msgid "``PY_MAJOR_VERSION`` (the ``3`` in ``3.4.1a2``)" -msgstr "``PY_MAJOR_VERSION`` (le ``3`` dans ``3.4.1a2``)" +#: c-api/apiabiversion.rst:47 +msgid "``PY_MAJOR_VERSION``" +msgstr "" -#: c-api/apiabiversion.rst:21 -msgid "``2``" -msgstr "``2``" +#: c-api/apiabiversion.rst:47 +msgid "``0x03``" +msgstr "" -#: c-api/apiabiversion.rst:21 -msgid "``9-16``" +#: c-api/apiabiversion.rst:49 +msgid "2" +msgstr "" + +#: c-api/apiabiversion.rst:49 +#, fuzzy +msgid "9-16" msgstr "``9-16``" -#: c-api/apiabiversion.rst:21 -msgid "``PY_MINOR_VERSION`` (the ``4`` in ``3.4.1a2``)" -msgstr "``PY_MINOR_VERSION`` (le ``4`` dans ``3.4.1a2``)" +#: c-api/apiabiversion.rst:49 +msgid "``PY_MINOR_VERSION``" +msgstr "" + +#: c-api/apiabiversion.rst:49 +msgid "``0x04``" +msgstr "" -#: c-api/apiabiversion.rst:24 -msgid "``3``" -msgstr "``3``" +#: c-api/apiabiversion.rst:51 +msgid "3" +msgstr "" -#: c-api/apiabiversion.rst:24 -msgid "``17-24``" +#: c-api/apiabiversion.rst:51 +#, fuzzy +msgid "17-24" msgstr "``17-24``" -#: c-api/apiabiversion.rst:24 -msgid "``PY_MICRO_VERSION`` (the ``1`` in ``3.4.1a2``)" -msgstr "``PY_MICRO_VERSION`` (le ``1`` dans ``3.4.1a2``)" +#: c-api/apiabiversion.rst:51 +msgid "``PY_MICRO_VERSION``" +msgstr "" -#: c-api/apiabiversion.rst:27 -msgid "``4``" -msgstr "``4``" +#: c-api/apiabiversion.rst:51 +msgid "``0x01``" +msgstr "" + +#: c-api/apiabiversion.rst:53 +msgid "4" +msgstr "" -#: c-api/apiabiversion.rst:27 -msgid "``25-28``" +#: c-api/apiabiversion.rst:53 +#, fuzzy +msgid "25-28" msgstr "``25-28``" -#: c-api/apiabiversion.rst:27 -msgid "" -"``PY_RELEASE_LEVEL`` (``0xA`` for alpha, ``0xB`` for beta, ``0xC`` for " -"release candidate and ``0xF`` for final), in this case it is alpha." +#: c-api/apiabiversion.rst:53 +msgid "``PY_RELEASE_LEVEL``" +msgstr "" + +#: c-api/apiabiversion.rst:53 +msgid "``0xA``" msgstr "" -"``PY_RELEASE_LEVEL`` (``0xA`` pour alpha, ``0xB`` pour bêta, ``0xC`` pour " -"une version candidate et ``0xF`` pour final), dans ce cas c'est alpha." -#: c-api/apiabiversion.rst:32 -msgid "``29-32``" +#: c-api/apiabiversion.rst:55 +#, fuzzy +msgid "29-32" msgstr "``29-32``" -#: c-api/apiabiversion.rst:32 -msgid "" -"``PY_RELEASE_SERIAL`` (the ``2`` in ``3.4.1a2``, zero for final releases)" +#: c-api/apiabiversion.rst:55 +msgid "``PY_RELEASE_SERIAL``" +msgstr "" + +#: c-api/apiabiversion.rst:55 +msgid "``0x2``" msgstr "" -"``PY_RELEASE_SERIAL`` (le ``2`` au ``3.4.1a2``, zéro pour des versions " -"finales)" -#: c-api/apiabiversion.rst:36 -msgid "Thus ``3.4.1a2`` is hexversion ``0x030401a2``." +#: c-api/apiabiversion.rst:58 +#, fuzzy +msgid "" +"Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is hexversion " +"``0x030a00f0``." msgstr "Ainsi ``3.4.1a2`` est une hexane-version ``0x030401a2``." -#: c-api/apiabiversion.rst:38 +#: c-api/apiabiversion.rst:61 +msgid "This version is also available via the symbol :data:`Py_Version`." +msgstr "" + +#: c-api/apiabiversion.rst:65 +msgid "" +"The Python runtime version number encoded in a single constant integer, with " +"the same format as the :c:macro:`PY_VERSION_HEX` macro. This contains the " +"Python version used at run time." +msgstr "" + +#: c-api/apiabiversion.rst:71 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 index 82c7982aa5..fd5bc715e9 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2020-12-10 16:23+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2021-12-11 11:44+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -78,7 +78,7 @@ msgid "" "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 contigüe. Il n'est pas nécessaire d'allouer la mémoire pour " +"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 @@ -129,28 +129,18 @@ msgstr "" #: c-api/arg.rst:58 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`." - -#: c-api/arg.rst:85 +"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:83 msgid "``s`` (:class:`str`) [const char \\*]" msgstr "``s`` (:class:`str`) [``const char *``]" -#: c-api/arg.rst:68 +#: c-api/arg.rst:66 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 " @@ -167,7 +157,7 @@ msgstr "" "le code est *null*. Si elle en contient, une exception :exc:`ValueError` est " "levée. Si la conversion échoue, une :exc:`UnicodeError` est levée." -#: c-api/arg.rst:77 +#: c-api/arg.rst:75 msgid "" "This format does not accept :term:`bytes-like objects `. " "If you want to accept filesystem paths and convert them to C character " @@ -180,7 +170,7 @@ msgstr "" "est préférable d'utiliser le format ``O&`` avec :c:func:" "`PyUnicode_FSConverter` en tant que *converter*." -#: c-api/arg.rst:150 +#: c-api/arg.rst:148 msgid "" "Previously, :exc:`TypeError` was raised when embedded null code points were " "encountered in the Python string." @@ -188,11 +178,11 @@ msgstr "" "Auparavant, une :exc:`TypeError` était levée quand la chaîne de caractères " "Python contenait des codes NULL." -#: c-api/arg.rst:91 +#: c-api/arg.rst:89 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:88 +#: c-api/arg.rst:86 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 " @@ -205,15 +195,16 @@ msgstr "" "octets NULL. Les objets Unicode sont convertis en chaînes de caractères C en " "utilisant l'encodage ``'utf-8'``." -#: c-api/arg.rst:98 +#: c-api/arg.rst:96 +#, fuzzy msgid "" -"``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char \\*, " -"int or :c:type:`Py_ssize_t`]" +"``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:94 +#: c-api/arg.rst:92 msgid "" "Like ``s*``, except that it doesn't accept mutable objects. The result is " "stored into two C variables, the first one a pointer to a C string, the " @@ -226,11 +217,11 @@ msgstr "" "caractères peut contenir des octets NULL. Les objets Unicode sont convertis " "vers des chaînes de caractères C utilisant l'encodage ``'utf-8'``." -#: c-api/arg.rst:566 +#: c-api/arg.rst:565 msgid "``z`` (:class:`str` or ``None``) [const char \\*]" msgstr "``z`` (:class:`str` ou ``None``) [``const char *``]" -#: c-api/arg.rst:101 +#: c-api/arg.rst:99 #, fuzzy msgid "" "Like ``s``, but the Python object may also be ``None``, in which case the C " @@ -239,13 +230,13 @@ msgstr "" "Comme ``s``, mais l'objet Python peut aussi être ``None``, auquel cas le " "pointeur C devient *NULL*." -#: c-api/arg.rst:106 +#: c-api/arg.rst:104 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:105 +#: c-api/arg.rst:103 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``." @@ -253,16 +244,16 @@ 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:110 +#: c-api/arg.rst:108 #, fuzzy msgid "" "``z#`` (:class:`str`, read-only :term:`bytes-like object` or ``None``) " -"[const char \\*, int or :c:type:`Py_ssize_t`]" +"[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:109 +#: c-api/arg.rst:107 #, fuzzy msgid "" "Like ``s#``, but the Python object may also be ``None``, in which case the C " @@ -271,13 +262,13 @@ 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:120 +#: c-api/arg.rst:118 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:113 +#: c-api/arg.rst:111 msgid "" "This format converts a bytes-like object to a C pointer to a character " "string; it does not accept Unicode objects. The bytes buffer must not " @@ -289,7 +280,7 @@ msgstr "" "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:118 +#: c-api/arg.rst:116 msgid "" "Previously, :exc:`TypeError` was raised when embedded null bytes were " "encountered in the bytes buffer." @@ -297,26 +288,26 @@ msgstr "" "Auparavant, :exc:`TypeError` était levée lorsque des octets *null* étaient " "rencontrés dans le tampon d'octets." -#: c-api/arg.rst:125 +#: c-api/arg.rst:123 msgid "``y*`` (:term:`bytes-like object`) [Py_buffer]" msgstr "``y*`` (:term:`bytes-like object`) [``Py_buffer``]" -#: c-api/arg.rst:123 +#: c-api/arg.rst:121 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:129 +#: c-api/arg.rst:127 #, fuzzy msgid "" -"``y#`` (read-only :term:`bytes-like object`) [const char \\*, int or :c:type:" +"``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:128 +#: c-api/arg.rst:126 msgid "" "This variant on ``s#`` doesn't accept Unicode objects, only bytes-like " "objects." @@ -324,11 +315,11 @@ msgstr "" "Cette variante de ``s#`` n'accepte pas les objets Unicode, uniquement des " "objets assimilés à des octets." -#: c-api/arg.rst:134 +#: c-api/arg.rst:132 msgid "``S`` (:class:`bytes`) [PyBytesObject \\*]" msgstr "``S`` (:class:`bytes`) [``PyBytesObject *``]" -#: c-api/arg.rst:132 +#: c-api/arg.rst:130 #, fuzzy msgid "" "Requires that the Python object is a :class:`bytes` object, without " @@ -340,11 +331,11 @@ msgstr "" "type *bytes*. La variable C doit aussi être déclarée en tant que :c:type:" "`PyObject\\*`." -#: c-api/arg.rst:139 +#: c-api/arg.rst:137 msgid "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]" msgstr "``Y`` (:class:`bytearray`) [``PyByteArrayObject *``]" -#: c-api/arg.rst:137 +#: c-api/arg.rst:135 #, fuzzy msgid "" "Requires that the Python object is a :class:`bytearray` object, without " @@ -357,11 +348,11 @@ msgstr "" "type *bytes*. La variable C doit aussi être déclarée en tant que :c:type:" "`PyObject\\*`." -#: c-api/arg.rst:156 +#: c-api/arg.rst:154 msgid "``u`` (:class:`str`) [const Py_UNICODE \\*]" msgstr "``u`` (:class:`str`) [``const Py_UNICODE *``]" -#: c-api/arg.rst:142 +#: c-api/arg.rst:140 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` " @@ -379,30 +370,29 @@ msgstr "" "chaîne de caractères Python ne doit pas contenir de code *NULL*. Si elle en " "contient, une exception :exc:`ValueError` est levée." -#: c-api/arg.rst:174 c-api/arg.rst:182 +#: c-api/arg.rst:172 c-api/arg.rst:180 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsWideCharString`." msgstr "" -#: c-api/arg.rst:165 +#: c-api/arg.rst:163 #, fuzzy -msgid "" -"``u#`` (:class:`str`) [const Py_UNICODE \\*, int or :c:type:`Py_ssize_t`]" +msgid "``u#`` (:class:`str`) [const Py_UNICODE \\*, :c:type:`Py_ssize_t`]" msgstr "``u#`` (:class:`str`) [``const Py_UNICODE *``, ``int``]" -#: c-api/arg.rst:159 +#: c-api/arg.rst:157 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:173 +#: c-api/arg.rst:171 msgid "``Z`` (:class:`str` or ``None``) [const Py_UNICODE \\*]" msgstr "``Z`` (:class:`str` ou ``None``) [``const Py_UNICODE *``]" -#: c-api/arg.rst:168 +#: c-api/arg.rst:166 #, fuzzy msgid "" "Like ``u``, but the Python object may also be ``None``, in which case the :c:" @@ -411,14 +401,14 @@ msgstr "" "Comme ``u``, mais l'objet Python peut aussi être ``None``, auquel cas le " "pointeur :c:type:`Py_UNICODE` vaut *NULL*." -#: c-api/arg.rst:181 +#: c-api/arg.rst:179 #, fuzzy msgid "" -"``Z#`` (:class:`str` or ``None``) [const Py_UNICODE \\*, int or :c:type:" +"``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:176 +#: c-api/arg.rst:174 #, fuzzy msgid "" "Like ``u#``, but the Python object may also be ``None``, in which case the :" @@ -427,11 +417,11 @@ 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:186 +#: c-api/arg.rst:184 msgid "``U`` (:class:`str`) [PyObject \\*]" msgstr "``U`` (:class:`str`) [``PyObject *``]" -#: c-api/arg.rst:184 +#: c-api/arg.rst:182 #, fuzzy msgid "" "Requires that the Python object is a Unicode object, without attempting any " @@ -443,11 +433,11 @@ msgstr "" "type *bytes*. La variable C doit aussi être déclarée en tant que :c:type:" "`PyObject\\*`." -#: c-api/arg.rst:192 +#: c-api/arg.rst:190 msgid "``w*`` (read-write :term:`bytes-like object`) [Py_buffer]" msgstr "``w*`` (lecture-écriture :term:`bytes-like object`) [``Py_buffer``]" -#: c-api/arg.rst:189 +#: c-api/arg.rst:187 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. " @@ -455,17 +445,17 @@ msgid "" "`PyBuffer_Release` when it is done with the buffer." msgstr "" -#: c-api/arg.rst:209 +#: c-api/arg.rst:207 msgid "``es`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer]" msgstr "" -#: c-api/arg.rst:195 +#: c-api/arg.rst:193 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:198 +#: c-api/arg.rst:196 msgid "" "This format requires two arguments. The first is only used as input, and " "must be a :c:type:`const char*` which points to the name of an encoding as a " @@ -476,7 +466,7 @@ msgid "" "The text will be encoded in the encoding specified by the first argument." msgstr "" -#: c-api/arg.rst:206 +#: c-api/arg.rst:204 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 " @@ -484,36 +474,36 @@ msgid "" "`PyMem_Free` to free the allocated buffer after use." msgstr "" -#: c-api/arg.rst:214 +#: c-api/arg.rst:212 msgid "" "``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " "\\*encoding, char \\*\\*buffer]" msgstr "" -#: c-api/arg.rst:212 +#: c-api/arg.rst:210 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:245 +#: c-api/arg.rst:243 #, fuzzy msgid "" -"``es#`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer, int or :c:" -"type:`Py_ssize_t` \\*buffer_length]" +"``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:217 +#: c-api/arg.rst:215 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:221 +#: c-api/arg.rst:219 msgid "" "It requires three arguments. The first is only used as input, and must be " "a :c:type:`const char*` which points to the name of an encoding as a NUL-" @@ -526,20 +516,20 @@ msgid "" "will be set to the number of bytes in the output buffer." msgstr "" -#: c-api/arg.rst:231 +#: c-api/arg.rst:229 msgid "There are two modes of operation:" msgstr "Il existe deux modes de fonctionnement :" -#: c-api/arg.rst:233 +#: c-api/arg.rst:231 msgid "" "If *\\*buffer* points a ``NULL`` pointer, the function will allocate a " -"buffer of the needed size, copy the encoded data into this buffer and set *" -"\\*buffer* to reference the newly allocated storage. The caller is " +"buffer of the needed size, copy the encoded data into this buffer and set " +"*\\*buffer* to reference the newly allocated storage. The caller is " "responsible for calling :c:func:`PyMem_Free` to free the allocated buffer " "after usage." msgstr "" -#: c-api/arg.rst:238 +#: c-api/arg.rst:236 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 " @@ -548,7 +538,7 @@ msgid "" "the buffer is not large enough, a :exc:`ValueError` will be set." msgstr "" -#: c-api/arg.rst:244 +#: c-api/arg.rst:242 msgid "" "In both cases, *\\*buffer_length* is set to the length of the encoded data " "without the trailing NUL byte." @@ -556,31 +546,31 @@ 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:250 +#: c-api/arg.rst:248 #, fuzzy msgid "" "``et#`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " -"\\*encoding, char \\*\\*buffer, int or :c:type:`Py_ssize_t` \\*buffer_length]" +"\\*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:248 +#: c-api/arg.rst:246 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:253 +#: c-api/arg.rst:251 msgid "Numbers" msgstr "Les nombres" -#: c-api/arg.rst:257 +#: c-api/arg.rst:255 msgid "``b`` (:class:`int`) [unsigned char]" msgstr "``b`` (:class:`int`) [``unsigned char``]" -#: c-api/arg.rst:256 +#: c-api/arg.rst:254 msgid "" "Convert a nonnegative Python integer to an unsigned tiny int, stored in a C :" "c:type:`unsigned char`." @@ -588,11 +578,11 @@ 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:600 +#: c-api/arg.rst:599 msgid "``B`` (:class:`int`) [unsigned char]" msgstr "``B`` (:class:`int`) [``unsigned char``]" -#: c-api/arg.rst:260 +#: c-api/arg.rst:258 msgid "" "Convert a Python integer to a tiny int without overflow checking, stored in " "a C :c:type:`unsigned char`." @@ -600,19 +590,19 @@ 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:594 +#: c-api/arg.rst:593 msgid "``h`` (:class:`int`) [short int]" msgstr "``h`` (:class:`int`) [``short int``]" -#: c-api/arg.rst:264 +#: c-api/arg.rst:262 msgid "Convert a Python integer to a C :c:type:`short int`." msgstr "Convertit un entier Python en un :c:type:`short int` C." -#: c-api/arg.rst:603 +#: c-api/arg.rst:602 msgid "``H`` (:class:`int`) [unsigned short int]" msgstr "``H`` (:class:`int`) [``unsigned short int``]" -#: c-api/arg.rst:267 +#: c-api/arg.rst:265 msgid "" "Convert a Python integer to a C :c:type:`unsigned short int`, without " "overflow checking." @@ -620,19 +610,19 @@ msgstr "" "Convertit un entier Python en un :c:type:`unsigned short int` C, sans " "contrôle de débordement." -#: c-api/arg.rst:588 +#: c-api/arg.rst:587 msgid "``i`` (:class:`int`) [int]" msgstr "``i`` (:class:`int`) [``int``]" -#: c-api/arg.rst:271 +#: c-api/arg.rst:269 msgid "Convert a Python integer to a plain C :c:type:`int`." msgstr "Convertit un entier Python en un :c:type:`int` C." -#: c-api/arg.rst:606 +#: c-api/arg.rst:605 msgid "``I`` (:class:`int`) [unsigned int]" msgstr "``I`` (:class:`int`) [``unsigned int``]" -#: c-api/arg.rst:274 +#: c-api/arg.rst:272 msgid "" "Convert a Python integer to a C :c:type:`unsigned int`, without overflow " "checking." @@ -640,19 +630,19 @@ msgstr "" "Convertit un entier Python en un :c:type:`unsigned int` C, sans contrôle de " "le débordement." -#: c-api/arg.rst:597 +#: c-api/arg.rst:596 msgid "``l`` (:class:`int`) [long int]" msgstr "``l`` (:class:`int`) [``long int``]" -#: c-api/arg.rst:278 +#: c-api/arg.rst:276 msgid "Convert a Python integer to a C :c:type:`long int`." msgstr "Convertit un entier Python en un :c:type:`long int`." -#: c-api/arg.rst:609 +#: c-api/arg.rst:608 msgid "``k`` (:class:`int`) [unsigned long]" msgstr "``k`` (:class:`int`) [``unsigned long``]" -#: c-api/arg.rst:281 +#: c-api/arg.rst:279 msgid "" "Convert a Python integer to a C :c:type:`unsigned long` without overflow " "checking." @@ -660,20 +650,20 @@ msgstr "" "Convertit un entier Python en un :c:type:`unsigned long` C sans en vérifier " "le débordement." -#: c-api/arg.rst:612 +#: c-api/arg.rst:611 msgid "``L`` (:class:`int`) [long long]" msgstr "``L`` (:class:`int`) [``long long``]" -#: c-api/arg.rst:285 +#: c-api/arg.rst:283 #, fuzzy msgid "Convert a Python integer to a C :c:type:`long long`." msgstr "Convertit un entier Python en un :c:type:`long int`." -#: c-api/arg.rst:615 +#: c-api/arg.rst:614 msgid "``K`` (:class:`int`) [unsigned long long]" msgstr "``K`` (:class:`int`) [``unsigned long long``]" -#: c-api/arg.rst:288 +#: c-api/arg.rst:286 #, fuzzy msgid "" "Convert a Python integer to a C :c:type:`unsigned long long` without " @@ -682,19 +672,20 @@ msgstr "" "Convertit un entier Python en un :c:type:`unsigned long` C sans en vérifier " "le débordement." -#: c-api/arg.rst:618 -msgid "``n`` (:class:`int`) [Py_ssize_t]" +#: c-api/arg.rst:617 +#, fuzzy +msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" msgstr "``n`` (:class:`int`) [``Py_ssize_t``]" -#: c-api/arg.rst:292 +#: c-api/arg.rst:290 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:299 +#: c-api/arg.rst:297 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:295 +#: c-api/arg.rst:293 msgid "" "Convert a Python byte, represented as a :class:`bytes` or :class:`bytearray` " "object of length 1, to a C :c:type:`char`." @@ -702,15 +693,15 @@ 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:298 +#: c-api/arg.rst:296 msgid "Allow :class:`bytearray` objects." msgstr "" -#: c-api/arg.rst:626 +#: c-api/arg.rst:625 msgid "``C`` (:class:`str` of length 1) [int]" msgstr "``C`` (:class:`str` de longueur 1) [``int``]" -#: c-api/arg.rst:302 +#: c-api/arg.rst:300 msgid "" "Convert a Python character, represented as a :class:`str` object of length " "1, to a C :c:type:`int`." @@ -718,41 +709,41 @@ 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:632 +#: c-api/arg.rst:631 msgid "``f`` (:class:`float`) [float]" msgstr "``f`` (:class:`float`) [``float``]" -#: c-api/arg.rst:306 +#: c-api/arg.rst:304 msgid "Convert a Python floating point number to a C :c:type:`float`." msgstr "Convertit un nombre flottant Python vers un :c:type:`float`." -#: c-api/arg.rst:629 +#: c-api/arg.rst:628 msgid "``d`` (:class:`float`) [double]" msgstr "``d`` (:class:`float`) [``double``]" -#: c-api/arg.rst:309 +#: c-api/arg.rst:307 msgid "Convert a Python floating point number to a C :c:type:`double`." msgstr "Convertit un nombre flottant Python vers un :c:type:`double` C." -#: c-api/arg.rst:312 +#: c-api/arg.rst:310 msgid "``D`` (:class:`complex`) [Py_complex]" msgstr "``D`` (:class:`complex`) [``Py_complex``]" -#: c-api/arg.rst:312 +#: c-api/arg.rst:310 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:315 +#: c-api/arg.rst:313 msgid "Other objects" msgstr "Autres objets" -#: c-api/arg.rst:643 +#: c-api/arg.rst:642 msgid "``O`` (object) [PyObject \\*]" msgstr "``O`` (objet) [``PyObject *``]" -#: c-api/arg.rst:318 +#: c-api/arg.rst:316 #, fuzzy msgid "" "Store a Python object (without any conversion) in a C object pointer. The C " @@ -764,11 +755,11 @@ msgstr "" "référence sur l'objet n'est pas incrémenté. Le pointeur stocké n'est pas " "*NULL*." -#: c-api/arg.rst:327 +#: c-api/arg.rst:325 msgid "``O!`` (object) [*typeobject*, PyObject \\*]" msgstr "``O!`` (objet) [*typeobject*, ``PyObject *``]" -#: c-api/arg.rst:323 +#: c-api/arg.rst:321 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 " @@ -777,11 +768,11 @@ msgid "" "required type, :exc:`TypeError` is raised." msgstr "" -#: c-api/arg.rst:657 +#: c-api/arg.rst:656 msgid "``O&`` (object) [*converter*, *anything*]" msgstr "``O&`` (objet) [*converter*, *anything*]" -#: c-api/arg.rst:332 +#: c-api/arg.rst:330 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 " @@ -789,7 +780,7 @@ msgid "" "*converter* function in turn is called as follows::" msgstr "" -#: c-api/arg.rst:339 +#: c-api/arg.rst:337 msgid "" "where *object* is the Python object to be converted and *address* is the :c:" "type:`void*` argument that was passed to the :c:func:`PyArg_Parse\\*` " @@ -799,7 +790,7 @@ msgid "" "*address* unmodified." msgstr "" -#: c-api/arg.rst:345 +#: c-api/arg.rst:343 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 " @@ -808,15 +799,15 @@ msgid "" "value as in the original call." msgstr "" -#: c-api/arg.rst:351 +#: c-api/arg.rst:349 msgid "``Py_CLEANUP_SUPPORTED`` was added." msgstr "``Py_CLEANUP_SUPPORTED`` à été ajouté." -#: c-api/arg.rst:361 +#: c-api/arg.rst:359 msgid "``p`` (:class:`bool`) [int]" msgstr "``p`` (:class:`bool`) [``int``]" -#: c-api/arg.rst:355 +#: c-api/arg.rst:353 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 " @@ -825,11 +816,11 @@ msgid "" "how Python tests values for truth." msgstr "" -#: c-api/arg.rst:660 +#: c-api/arg.rst:659 msgid "``(items)`` (:class:`tuple`) [*matching-items*]" msgstr "``(items)`` (:class:`tuple`) [*matching-items*]" -#: c-api/arg.rst:364 +#: c-api/arg.rst:362 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 " @@ -840,7 +831,7 @@ msgstr "" "chaque unité de format particulière dans *articles*. Les unités de formats " "pour les séquences peuvent être imbriquées." -#: c-api/arg.rst:368 +#: c-api/arg.rst:366 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 --- " @@ -849,7 +840,7 @@ msgid "" "downcasts in C --- your mileage may vary)." msgstr "" -#: c-api/arg.rst:374 +#: c-api/arg.rst:372 msgid "" "A few other characters have a meaning in a format string. These may not " "occur inside nested parentheses. They are:" @@ -857,11 +848,11 @@ msgstr "" "Quelques autres caractères ont un sens dans une chaîne de format. On ne doit " "pas les trouvées dans des parenthèses imbriquées. Ce sont :" -#: c-api/arg.rst:382 +#: c-api/arg.rst:380 msgid "``|``" msgstr "``|``" -#: c-api/arg.rst:378 +#: c-api/arg.rst:376 msgid "" "Indicates that the remaining arguments in the Python argument list are " "optional. The C variables corresponding to optional arguments should be " @@ -870,11 +861,11 @@ msgid "" "corresponding C variable(s)." msgstr "" -#: c-api/arg.rst:391 +#: c-api/arg.rst:389 msgid "``$``" msgstr "``$``" -#: c-api/arg.rst:385 +#: c-api/arg.rst:383 msgid "" ":c:func:`PyArg_ParseTupleAndKeywords` only: Indicates that the remaining " "arguments in the Python argument list are keyword-only. Currently, all " @@ -882,22 +873,22 @@ msgid "" "be specified before ``$`` in the format string." msgstr "" -#: c-api/arg.rst:396 +#: c-api/arg.rst:394 msgid "``:``" msgstr "" -#: c-api/arg.rst:394 +#: c-api/arg.rst:392 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:401 +#: c-api/arg.rst:399 msgid "``;``" msgstr "" -#: c-api/arg.rst:399 +#: c-api/arg.rst:397 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 ``;" @@ -907,7 +898,7 @@ msgstr "" "virgule est utilise comme message d'erreur *au lieu* du message d'erreur par " "défaut. ``:`` et ``;`` sont mutuellement exclusifs." -#: c-api/arg.rst:403 +#: c-api/arg.rst:401 msgid "" "Note that any Python object references which are provided to the caller are " "*borrowed* references; do not decrement their reference count!" @@ -916,7 +907,7 @@ msgstr "" "à l'appelant sont des références *empruntées* ; ne décrémentez pas leur " "compteur de références !" -#: c-api/arg.rst:406 +#: c-api/arg.rst:404 msgid "" "Additional arguments passed to these functions must be addresses of " "variables whose type is determined by the format string; these are used to " @@ -933,7 +924,7 @@ msgstr "" "devraient correspondre à ce qui est spécifié pour l'unité de format " "correspondante." -#: c-api/arg.rst:412 +#: c-api/arg.rst:410 msgid "" "For the conversion to succeed, the *arg* object must match the format and " "the format must be exhausted. On success, the :c:func:`PyArg_Parse\\*` " @@ -944,24 +935,24 @@ msgid "" "untouched." msgstr "" -#: c-api/arg.rst:421 +#: c-api/arg.rst:419 msgid "API Functions" msgstr "Fonction de l'API" -#: c-api/arg.rst:425 +#: c-api/arg.rst:423 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:432 +#: c-api/arg.rst:430 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:438 +#: c-api/arg.rst:436 msgid "" "Parse the parameters of a function that takes both positional and keyword " "parameters into local variables. The *keywords* argument is a ``NULL``-" @@ -970,26 +961,26 @@ msgid "" "success; on failure, it returns false and raises the appropriate exception." msgstr "" -#: c-api/arg.rst:445 +#: c-api/arg.rst:443 msgid "" "Added support for :ref:`positional-only parameters `." msgstr "" -#: c-api/arg.rst:452 +#: c-api/arg.rst:450 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:458 +#: c-api/arg.rst:456 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:468 +#: c-api/arg.rst:466 msgid "" "Function used to deconstruct the argument lists of \"old-style\" functions " "--- these are functions which use the :const:`METH_OLDARGS` parameter " @@ -1000,7 +991,7 @@ msgid "" "continue to be used for that purpose." msgstr "" -#: c-api/arg.rst:479 +#: c-api/arg.rst:477 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 " @@ -1010,30 +1001,31 @@ msgid "" "tuple must be at least *min* and no more than *max*; *min* and *max* may be " "equal. Additional arguments must be passed to the function, each of which " "should be a pointer to a :c:type:`PyObject*` variable; these will be filled " -"in with the values from *args*; they will contain 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." +"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:493 +#: c-api/arg.rst:492 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:509 +#: c-api/arg.rst:508 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:517 +#: c-api/arg.rst:516 msgid "Building values" msgstr "Construction des valeurs" -#: c-api/arg.rst:521 +#: c-api/arg.rst:520 msgid "" "Create a new value based on a format string similar to those accepted by " "the :c:func:`PyArg_Parse\\*` family of functions and a sequence of values. " @@ -1041,7 +1033,7 @@ msgid "" "raised if ``NULL`` is returned." msgstr "" -#: c-api/arg.rst:526 +#: c-api/arg.rst:525 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 " @@ -1050,7 +1042,7 @@ msgid "" "it to return a tuple of size 0 or one, parenthesize the format string." msgstr "" -#: c-api/arg.rst:532 +#: c-api/arg.rst:531 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. " @@ -1061,7 +1053,7 @@ msgid "" "`Py_BuildValue` returns." msgstr "" -#: c-api/arg.rst:540 +#: c-api/arg.rst:539 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 " @@ -1069,191 +1061,188 @@ msgid "" "be passed." msgstr "" -#: c-api/arg.rst:544 +#: c-api/arg.rst:543 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:550 +#: c-api/arg.rst:549 msgid "``s`` (:class:`str` or ``None``) [const char \\*]" msgstr "``s`` (:class:`str` ou ``None``) [``const char *``]" -#: c-api/arg.rst:549 +#: c-api/arg.rst:548 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:555 +#: c-api/arg.rst:554 #, fuzzy msgid "" -"``s#`` (:class:`str` or ``None``) [const char \\*, int or :c:type:" -"`Py_ssize_t`]" +"``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:553 +#: c-api/arg.rst:552 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:559 +#: c-api/arg.rst:558 msgid "``y`` (:class:`bytes`) [const char \\*]" msgstr "``y`` (:class:`bytes`) [``const char *``]" -#: c-api/arg.rst:558 +#: c-api/arg.rst:557 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:563 +#: c-api/arg.rst:562 #, fuzzy -msgid "``y#`` (:class:`bytes`) [const char \\*, int or :c:type:`Py_ssize_t`]" +msgid "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "``y#`` (:class:`bytes`) [``const char *, int``]" -#: c-api/arg.rst:562 +#: c-api/arg.rst:561 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:582 +#: c-api/arg.rst:581 msgid "Same as ``s``." msgstr "" -#: c-api/arg.rst:569 +#: c-api/arg.rst:568 #, fuzzy msgid "" -"``z#`` (:class:`str` or ``None``) [const char \\*, int or :c:type:" -"`Py_ssize_t`]" +"``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:585 +#: c-api/arg.rst:584 msgid "Same as ``s#``." msgstr "" -#: c-api/arg.rst:574 +#: c-api/arg.rst:573 msgid "``u`` (:class:`str`) [const wchar_t \\*]" msgstr "``u`` (:class:`str`) [``const wchar_t *``]" -#: c-api/arg.rst:572 +#: c-api/arg.rst:571 msgid "" "Convert a null-terminated :c:type:`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:579 +#: c-api/arg.rst:578 #, fuzzy -msgid "``u#`` (:class:`str`) [const wchar_t \\*, int or :c:type:`Py_ssize_t`]" +msgid "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" msgstr "``u#`` (:class:`str`) [``const wchar_t *``, ``int``]" -#: c-api/arg.rst:577 +#: c-api/arg.rst:576 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:582 +#: c-api/arg.rst:581 msgid "``U`` (:class:`str` or ``None``) [const char \\*]" msgstr "``U`` (:class:`str` ou ``None``) [``const char *``]" -#: c-api/arg.rst:585 +#: c-api/arg.rst:584 #, fuzzy msgid "" -"``U#`` (:class:`str` or ``None``) [const char \\*, int or :c:type:" -"`Py_ssize_t`]" +"``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:588 +#: c-api/arg.rst:587 #, fuzzy msgid "Convert a plain C :c:type:`int` to a Python integer object." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:591 +#: c-api/arg.rst:590 msgid "``b`` (:class:`int`) [char]" msgstr "``b`` (:class:`int`) [``char``]" -#: c-api/arg.rst:591 +#: c-api/arg.rst:590 msgid "Convert a plain C :c:type:`char` to a Python integer object." msgstr "" -#: c-api/arg.rst:594 +#: c-api/arg.rst:593 msgid "Convert a plain C :c:type:`short int` to a Python integer object." msgstr "" -#: c-api/arg.rst:597 +#: c-api/arg.rst:596 msgid "Convert a C :c:type:`long int` to a Python integer object." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:600 +#: c-api/arg.rst:599 msgid "Convert a C :c:type:`unsigned char` to a Python integer object." msgstr "" -#: c-api/arg.rst:603 +#: c-api/arg.rst:602 msgid "Convert a C :c:type:`unsigned short int` to a Python integer object." msgstr "" -#: c-api/arg.rst:606 +#: c-api/arg.rst:605 #, fuzzy msgid "Convert a C :c:type:`unsigned int` to a Python integer object." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:609 +#: c-api/arg.rst:608 msgid "Convert a C :c:type:`unsigned long` to a Python integer object." msgstr "" -#: c-api/arg.rst:612 +#: c-api/arg.rst:611 #, fuzzy msgid "Convert a C :c:type:`long long` to a Python integer object." msgstr "Convertit un :c:type:`long int` en un *int* Python." -#: c-api/arg.rst:615 +#: c-api/arg.rst:614 msgid "Convert a C :c:type:`unsigned long long` to a Python integer object." msgstr "" -#: c-api/arg.rst:618 +#: c-api/arg.rst:617 msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." msgstr "" -#: c-api/arg.rst:622 +#: c-api/arg.rst:621 msgid "``c`` (:class:`bytes` of length 1) [char]" msgstr "``c`` (:class:`bytes` de taille 1) [``char``]" -#: c-api/arg.rst:621 +#: c-api/arg.rst:620 msgid "" "Convert a C :c:type:`int` representing a byte to a Python :class:`bytes` " "object of length 1." msgstr "" -#: c-api/arg.rst:625 +#: c-api/arg.rst:624 msgid "" "Convert a C :c:type:`int` representing a character to Python :class:`str` " "object of length 1." msgstr "" -#: c-api/arg.rst:629 +#: c-api/arg.rst:628 msgid "Convert a C :c:type:`double` to a Python floating point number." msgstr "" -#: c-api/arg.rst:632 +#: c-api/arg.rst:631 msgid "Convert a C :c:type:`float` to a Python floating point number." msgstr "" -#: c-api/arg.rst:635 +#: c-api/arg.rst:634 msgid "``D`` (:class:`complex`) [Py_complex \\*]" msgstr "``D`` (:class:`complex`) [``Py_complex *``]" -#: c-api/arg.rst:635 +#: c-api/arg.rst:634 msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number." msgstr "" -#: c-api/arg.rst:638 +#: c-api/arg.rst:637 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 " @@ -1263,26 +1252,26 @@ msgid "" "raised yet, :exc:`SystemError` is set." msgstr "" -#: c-api/arg.rst:646 +#: c-api/arg.rst:645 msgid "``S`` (object) [PyObject \\*]" msgstr "``S`` (objet) [``PyObject *``]" -#: c-api/arg.rst:646 +#: c-api/arg.rst:645 msgid "Same as ``O``." msgstr "" -#: c-api/arg.rst:651 +#: c-api/arg.rst:650 msgid "``N`` (object) [PyObject \\*]" msgstr "``N`` (objet) [``PyObject *``]" -#: c-api/arg.rst:649 +#: c-api/arg.rst:648 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:654 +#: c-api/arg.rst:653 msgid "" "Convert *anything* to a Python object through a *converter* function. The " "function is called with *anything* (which should be compatible with :c:type:" @@ -1290,41 +1279,59 @@ msgid "" "``NULL`` if an error occurred." msgstr "" -#: c-api/arg.rst:660 +#: c-api/arg.rst:659 msgid "" "Convert a sequence of C values to a Python tuple with the same number of " "items." msgstr "" -#: c-api/arg.rst:663 +#: c-api/arg.rst:662 msgid "``[items]`` (:class:`list`) [*matching-items*]" msgstr "``[items]`` (:class:`list`) [*matching-items*]" -#: c-api/arg.rst:663 +#: c-api/arg.rst:662 msgid "" "Convert a sequence of C values to a Python list with the same number of " "items." msgstr "" -#: c-api/arg.rst:668 +#: c-api/arg.rst:667 msgid "``{items}`` (:class:`dict`) [*matching-items*]" msgstr "``{items}`` (:class:`dict`) [*matching-items*]" -#: c-api/arg.rst:666 +#: c-api/arg.rst:665 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:670 +#: c-api/arg.rst:669 msgid "" "If there is an error in the format string, the :exc:`SystemError` exception " "is set and ``NULL`` returned." msgstr "" -#: c-api/arg.rst:675 +#: c-api/arg.rst:674 msgid "" "Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list " "rather than a variable number of arguments." msgstr "" + +#~ 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 index f5f5c1b8a4..4394ddb715 100644 --- a/c-api/bool.po +++ b/c-api/bool.po @@ -5,14 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \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" @@ -32,11 +33,12 @@ msgstr "" "disponibles." #: c-api/bool.rst:16 -#, fuzzy msgid "" "Return true if *o* is of type :c:data:`PyBool_Type`. This function always " "succeeds." -msgstr "Renvoie vrai si *o* est de type :c:data:`PyBook_Type`." +msgstr "" +"Renvoie vrai si *o* est de type :c:data:`PyBook_Type`. Cette fonction " +"réussit systématiquement." #: c-api/bool.rst:22 msgid "" diff --git a/c-api/buffer.po b/c-api/buffer.po index d0d9ee4659..d2a349b848 100644 --- a/c-api/buffer.po +++ b/c-api/buffer.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2018-10-04 12:18+0200\n" -"Last-Translator: \n" +"POT-Creation-Date: 2022-03-23 18:39+0100\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 2.0.2\n" +"X-Generator: Poedit 3.0\n" #: c-api/buffer.rst:11 msgid "Buffer Protocol" @@ -455,7 +455,7 @@ msgstr "oui" #: c-api/buffer.rst:323 c-api/buffer.rst:325 msgid "if needed" -msgstr "" +msgstr "si nécessaire" #: c-api/buffer.rst:278 c-api/buffer.rst:298 c-api/buffer.rst:302 #: c-api/buffer.rst:327 c-api/buffer.rst:331 c-api/buffer.rst:335 @@ -513,7 +513,7 @@ msgstr "" #: c-api/buffer.rst:321 msgid "readonly" -msgstr "" +msgstr "lecture seule" #: c-api/buffer.rst:321 msgid "format" @@ -529,7 +529,7 @@ msgstr "0" #: c-api/buffer.rst:329 c-api/buffer.rst:337 msgid "1 or 0" -msgstr "" +msgstr "0 ou 1" #: c-api/buffer.rst:342 msgid "Complex arrays" @@ -642,6 +642,8 @@ msgid "" "Return the implied :c:data:`~Py_buffer.itemsize` from :c:data:`~Py_buffer." "format`. On error, raise an exception and return -1." msgstr "" +"Retourne l'\\ :c:data:`~Py_buffer.itemsize` du :c:data:`~Py_buffer.format`. " +"En cas d'erreur, lève une exception et retourne -1." #: c-api/buffer.rst:475 msgid "" @@ -677,33 +679,43 @@ msgstr "" #: c-api/buffer.rst:504 msgid "" +"Copy data from *src* to *dest* buffer. Can convert between C-style and or " +"Fortran-style buffers." +msgstr "" + +#: c-api/buffer.rst:507 +msgid "``0`` is returned on success, ``-1`` on error." +msgstr "" + +#: c-api/buffer.rst:511 +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 +#: c-api/buffer.rst:518 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 +#: c-api/buffer.rst:522 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 +#: c-api/buffer.rst:526 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 +#: c-api/buffer.rst:530 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 " diff --git a/c-api/bytearray.po b/c-api/bytearray.po index bdab1641cf..17ae9d475b 100644 --- a/c-api/bytearray.po +++ b/c-api/bytearray.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2021-05-05 14:32+0200\n" "Last-Translator: Mindiell \n" "Language-Team: FRENCH \n" @@ -65,7 +65,7 @@ msgstr "" "Renvoie un nouvel objet *bytearray* depuis n'importe quel objet, *o*, qui " "implémente le :ref:`protocole buffer `." -#: c-api/bytearray.rst:50 +#: c-api/bytearray.rst:48 msgid "" "Create a new bytearray object from *string* and its length, *len*. On " "failure, ``NULL`` is returned." @@ -73,20 +73,20 @@ msgstr "" "Crée un nouvel objet ``bytearray`` à partir d'un objet *string* et de sa " "longueur, *len*. En cas d'échec, ``NULL`` est renvoyé." -#: c-api/bytearray.rst:56 +#: c-api/bytearray.rst:54 msgid "" "Concat bytearrays *a* and *b* and return a new bytearray with the result." msgstr "" "Concatène les ``bytearrays`` *a* et *b* et renvoie un nouveau ``bytearray`` " "avec le résultat." -#: c-api/bytearray.rst:61 +#: c-api/bytearray.rst:59 msgid "Return the size of *bytearray* after checking for a ``NULL`` pointer." msgstr "" "Renvoie la taille de *bytearray* après vérification de la présence d'un " "pointeur ``NULL``." -#: c-api/bytearray.rst:66 +#: c-api/bytearray.rst:64 msgid "" "Return the contents of *bytearray* as a char array after checking for a " "``NULL`` pointer. The returned array always has an extra null byte appended." @@ -95,24 +95,28 @@ msgstr "" "vérifiant que ce n'est pas un pointeur ``NULL``. Le tableau renvoyé a " "toujours un caractère *null* rajouté." -#: c-api/bytearray.rst:73 +#: c-api/bytearray.rst:71 msgid "Resize the internal buffer of *bytearray* to *len*." msgstr "Redimensionne le tampon interne de *bytearray* à la taille *len*." -#: c-api/bytearray.rst:76 +#: c-api/bytearray.rst:74 msgid "Macros" msgstr "Macros" -#: c-api/bytearray.rst:78 +#: c-api/bytearray.rst:76 msgid "These macros trade safety for speed and they don't check pointers." msgstr "" "Ces macros sont taillées pour la vitesse d'exécution et ne vérifient pas les " "pointeurs." -#: c-api/bytearray.rst:82 -msgid "Macro version of :c:func:`PyByteArray_AsString`." +#: c-api/bytearray.rst:80 +#, fuzzy +msgid "Similar to :c:func:`PyByteArray_AsString`, but without error checking." msgstr "Version macro de :c:func:`PyByteArray_AsString`." -#: c-api/bytearray.rst:87 -msgid "Macro version of :c:func:`PyByteArray_Size`." -msgstr "Version macro de :c:func:`PyByteArray_Size`." +#: c-api/bytearray.rst:85 +msgid "Similar to :c:func:`PyByteArray_Size`, but without error checking." +msgstr "" + +#~ msgid "Macro version of :c:func:`PyByteArray_Size`." +#~ msgstr "Version macro de :c:func:`PyByteArray_Size`." diff --git a/c-api/bytes.po b/c-api/bytes.po index a616a8e83f..f8f40a1c7c 100644 --- a/c-api/bytes.po +++ b/c-api/bytes.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2018-07-03 11:50+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -21,7 +21,7 @@ msgstr "Objets *bytes*" #: c-api/bytes.rst:8 msgid "" "These functions raise :exc:`TypeError` when expecting a bytes parameter and " -"are called with a non-bytes parameter." +"called with a non-bytes parameter." msgstr "" #: c-api/bytes.rst:16 @@ -96,7 +96,7 @@ msgstr "Commentaires" #: c-api/bytes.rst:70 msgid ":attr:`%%`" -msgstr "" +msgstr ":attr:`%%`" #: c-api/bytes.rst:70 msgid "*n/a*" @@ -108,7 +108,7 @@ msgstr "" #: c-api/bytes.rst:72 msgid ":attr:`%c`" -msgstr "" +msgstr ":attr:`%c`" #: c-api/bytes.rst:75 c-api/bytes.rst:96 msgid "int" @@ -120,7 +120,7 @@ msgstr "" #: c-api/bytes.rst:75 msgid ":attr:`%d`" -msgstr "" +msgstr ":attr:`%d`" #: c-api/bytes.rst:75 msgid "Equivalent to ``printf(\"%d\")``. [1]_" @@ -128,7 +128,7 @@ msgstr "" #: c-api/bytes.rst:78 msgid ":attr:`%u`" -msgstr "" +msgstr ":attr:`%u`" #: c-api/bytes.rst:78 msgid "unsigned int" @@ -140,7 +140,7 @@ msgstr "" #: c-api/bytes.rst:81 msgid ":attr:`%ld`" -msgstr "" +msgstr ":attr:`%ld`" #: c-api/bytes.rst:81 msgid "long" @@ -152,7 +152,7 @@ msgstr "" #: c-api/bytes.rst:84 msgid ":attr:`%lu`" -msgstr "" +msgstr ":attr:`%lu`" #: c-api/bytes.rst:84 msgid "unsigned long" @@ -164,10 +164,10 @@ msgstr "" #: c-api/bytes.rst:87 msgid ":attr:`%zd`" -msgstr "" +msgstr ":attr:`%zd`" #: c-api/bytes.rst:87 -msgid "Py_ssize_t" +msgid ":c:type:`\\ Py_ssize_t`" msgstr "" #: c-api/bytes.rst:87 @@ -176,7 +176,7 @@ msgstr "" #: c-api/bytes.rst:90 msgid ":attr:`%zu`" -msgstr "" +msgstr ":attr:`%zu`" #: c-api/bytes.rst:90 msgid "size_t" @@ -188,7 +188,7 @@ msgstr "" #: c-api/bytes.rst:93 msgid ":attr:`%i`" -msgstr "" +msgstr ":attr:`%i`" #: c-api/bytes.rst:93 msgid "Equivalent to ``printf(\"%i\")``. [1]_" @@ -196,7 +196,7 @@ msgstr "" #: c-api/bytes.rst:96 msgid ":attr:`%x`" -msgstr "" +msgstr ":attr:`%x`" #: c-api/bytes.rst:96 msgid "Equivalent to ``printf(\"%x\")``. [1]_" @@ -204,7 +204,7 @@ msgstr "" #: c-api/bytes.rst:99 msgid ":attr:`%s`" -msgstr "" +msgstr ":attr:`%s`" #: c-api/bytes.rst:99 msgid "const char\\*" @@ -216,7 +216,7 @@ msgstr "" #: c-api/bytes.rst:102 msgid ":attr:`%p`" -msgstr "" +msgstr ":attr:`%p`" #: c-api/bytes.rst:102 msgid "const void\\*" @@ -224,9 +224,9 @@ msgstr "" #: c-api/bytes.rst:102 msgid "" -"The hex representation of a C pointer. Mostly equivalent to ``printf(\"%p" -"\")`` except that it is guaranteed to start with the literal ``0x`` " -"regardless of what the platform's ``printf`` yields." +"The hex representation of a C pointer. Mostly equivalent to " +"``printf(\"%p\")`` except that it is guaranteed to start with the literal " +"``0x`` regardless of what the platform's ``printf`` yields." msgstr "" #: c-api/bytes.rst:111 @@ -258,7 +258,7 @@ 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." +msgid "Similar to :c:func:`PyBytes_Size`, but without error checking." msgstr "" #: c-api/bytes.rst:142 @@ -273,7 +273,7 @@ msgid "" msgstr "" #: c-api/bytes.rst:154 -msgid "Macro form of :c:func:`PyBytes_AsString` but without error checking." +msgid "Similar to :c:func:`PyBytes_AsString`, but without error checking." msgstr "" #: c-api/bytes.rst:159 @@ -330,7 +330,7 @@ msgid "" "address of an existing bytes object as an lvalue (it may be written into), " "and the new size desired. On success, *\\*bytes* holds the resized bytes " "object and ``0`` is returned; the address in *\\*bytes* may differ from its " -"input value. If the reallocation fails, the original bytes object at *" -"\\*bytes* is deallocated, *\\*bytes* is set to ``NULL``, :exc:`MemoryError` " +"input value. If the reallocation fails, the original bytes object at " +"*\\*bytes* is deallocated, *\\*bytes* is set to ``NULL``, :exc:`MemoryError` " "is set, and ``-1`` is returned." msgstr "" diff --git a/c-api/call.po b/c-api/call.po index 64002794d4..54c13fa855 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2020-07-20 15:07+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -49,8 +49,8 @@ msgstr "" #: c-api/call.rst:29 msgid "" -"To call an object, use :c:func:`PyObject_Call` or other :ref:`call API `." +"To call an object, use :c:func:`PyObject_Call` or another :ref:`call API " +"`." msgstr "" #: c-api/call.rst:36 @@ -250,7 +250,7 @@ msgstr "" msgid "" "Various functions are available for calling a Python object. Each converts " "its arguments to a convention supported by the called object – either " -"*tp_call* or vectorcall. In order to do as litle conversion as possible, " +"*tp_call* or vectorcall. In order to do as little conversion as possible, " "pick one that best fits the format of data you have available." msgstr "" diff --git a/c-api/capsule.po b/c-api/capsule.po index 35f1acdf3e..39e05ebcfd 100644 --- a/c-api/capsule.po +++ b/c-api/capsule.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -139,18 +139,20 @@ 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`)." +"string exactly." msgstr "" -#: c-api/capsule.rst:110 +#: c-api/capsule.rst:108 msgid "" "Return the capsule's internal *pointer* on success. On failure, set an " "exception and return ``NULL``." msgstr "" -#: c-api/capsule.rst:116 +#: c-api/capsule.rst:111 +msgid "*no_block* has no effect anymore." +msgstr "" + +#: c-api/capsule.rst:117 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`` " @@ -159,40 +161,40 @@ msgid "" "compared.)" msgstr "" -#: c-api/capsule.rst:122 +#: c-api/capsule.rst:123 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 +#: c-api/capsule.rst:127 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 +#: c-api/capsule.rst:133 msgid "Set the context pointer inside *capsule* to *context*." msgstr "" -#: c-api/capsule.rst:141 c-api/capsule.rst:158 +#: c-api/capsule.rst:142 c-api/capsule.rst:159 msgid "" "Return ``0`` on success. Return nonzero and set an exception on failure." msgstr "" -#: c-api/capsule.rst:139 +#: c-api/capsule.rst:140 msgid "Set the destructor inside *capsule* to *destructor*." msgstr "" -#: c-api/capsule.rst:146 +#: c-api/capsule.rst:147 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 +#: c-api/capsule.rst:156 msgid "" "Set the void pointer inside *capsule* to *pointer*. The pointer may not be " "``NULL``." diff --git a/c-api/code.po b/c-api/code.po index b7558a9ead..e4993cd263 100644 --- a/c-api/code.po +++ b/c-api/code.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2018-02-15 00:30+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -56,29 +56,78 @@ msgid "Return the number of free variables in *co*." msgstr "Renvoie le nombre de variables libres dans *co*." #: c-api/code.rst:38 +#, fuzzy 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." +"directly will bind you to a precise Python version since the definition of " +"the bytecode changes often. The many arguments of this function are inter-" +"dependent in complex ways, meaning that subtle changes to values are likely " +"to result in incorrect execution or VM crashes. Use this function only with " +"extreme care." 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 +#: c-api/code.rst:55 +msgid "Added ``exceptiontable`` parameter." +msgstr "" + +#: c-api/code.rst:50 msgid "" "Similar to :c:func:`PyCode_New`, but with an extra \"posonlyargcount\" for " -"positional-only arguments." +"positional-only arguments. The same caveats that apply to ``PyCode_New`` " +"also apply to this function." msgstr "" -#: c-api/code.rst:51 +#: c-api/code.rst:60 +#, fuzzy 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." +"and first line number. The resulting code object will raise an ``Exception`` " +"if executed." 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:66 +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:69 +msgid "" +"For efficiently iterating over the line numbers in a code object, use `the " +"API described in PEP 626 `_." +msgstr "" + +#: c-api/code.rst:74 +msgid "" +"Sets the passed ``int`` pointers to the source code line and column numbers " +"for the instruction at ``byte_offset``. Sets the value to ``0`` when " +"information is not available for any particular element." +msgstr "" + +#: c-api/code.rst:78 +msgid "Returns ``1`` if the function succeeds and 0 otherwise." +msgstr "" + +#: c-api/code.rst:82 +msgid "" +"Equivalent to the Python code ``getattr(co, 'co_code')``. Returns a strong " +"reference to a :c:type:`PyBytesObject` representing the bytecode in a code " +"object. On error, ``NULL`` is returned and an exception is raised." +msgstr "" + +#: c-api/code.rst:87 +msgid "" +"This ``PyBytesObject`` may be created on-demand by the interpreter and does " +"not necessarily represent the bytecode actually executed by CPython. The " +"primary use case for this function is debuggers and profilers." +msgstr "" diff --git a/c-api/codec.po b/c-api/codec.po index 565eaa3188..8d0d24baae 100644 --- a/c-api/codec.po +++ b/c-api/codec.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2021-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" @@ -30,15 +30,22 @@ 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:20 +#: c-api/codec.rst:28 msgid "Generic codec based encoding API." msgstr "" -#: c-api/codec.rst:22 +#: 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* " @@ -46,11 +53,11 @@ msgid "" "exc:`LookupError` if no encoder can be found." msgstr "" -#: c-api/codec.rst:29 +#: c-api/codec.rst:37 msgid "Generic codec based decoding API." msgstr "" -#: c-api/codec.rst:31 +#: 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* " @@ -58,11 +65,11 @@ msgid "" "exc:`LookupError` if no encoder can be found." msgstr "" -#: c-api/codec.rst:38 +#: c-api/codec.rst:46 msgid "Codec lookup API" msgstr "" -#: c-api/codec.rst:40 +#: 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 " @@ -70,41 +77,41 @@ msgid "" "`KeyError` is set and ``NULL`` returned." msgstr "" -#: c-api/codec.rst:47 +#: c-api/codec.rst:55 msgid "Get an encoder function for the given *encoding*." msgstr "" -#: c-api/codec.rst:51 +#: c-api/codec.rst:59 msgid "Get a decoder function for the given *encoding*." msgstr "" -#: c-api/codec.rst:55 +#: c-api/codec.rst:63 msgid "" "Get an :class:`~codecs.IncrementalEncoder` object for the given *encoding*." msgstr "" -#: c-api/codec.rst:59 +#: c-api/codec.rst:67 msgid "" "Get an :class:`~codecs.IncrementalDecoder` object for the given *encoding*." msgstr "" -#: c-api/codec.rst:63 +#: c-api/codec.rst:71 msgid "" "Get a :class:`~codecs.StreamReader` factory function for the given " "*encoding*." msgstr "" -#: c-api/codec.rst:67 +#: c-api/codec.rst:75 msgid "" "Get a :class:`~codecs.StreamWriter` factory function for the given " "*encoding*." msgstr "" -#: c-api/codec.rst:71 +#: c-api/codec.rst:79 msgid "Registry API for Unicode encoding error handlers" msgstr "" -#: c-api/codec.rst:75 +#: 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 " @@ -112,7 +119,7 @@ msgid "" "error parameter in the call to the encode/decode function." msgstr "" -#: c-api/codec.rst:80 +#: c-api/codec.rst:88 msgid "" "The callback gets a single argument, an instance of :exc:" "`UnicodeEncodeError`, :exc:`UnicodeDecodeError` or :exc:" @@ -125,39 +132,39 @@ msgid "" "should be resumed." msgstr "" -#: c-api/codec.rst:90 +#: c-api/codec.rst:98 msgid "Return ``0`` on success, ``-1`` on error." msgstr "" -#: c-api/codec.rst:94 +#: 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:100 +#: c-api/codec.rst:108 msgid "Raise *exc* as an exception." msgstr "" -#: c-api/codec.rst:104 +#: c-api/codec.rst:112 msgid "Ignore the unicode error, skipping the faulty input." msgstr "" -#: c-api/codec.rst:108 +#: c-api/codec.rst:116 msgid "Replace the unicode encode error with ``?`` or ``U+FFFD``." msgstr "" -#: c-api/codec.rst:112 +#: c-api/codec.rst:120 msgid "Replace the unicode encode error with XML character references." msgstr "" -#: c-api/codec.rst:116 +#: c-api/codec.rst:124 msgid "" "Replace the unicode encode error with backslash escapes (``\\x``, ``\\u`` " "and ``\\U``)." msgstr "" -#: c-api/codec.rst:121 +#: 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 index b1e78be08e..a06d5f3e72 100644 --- a/c-api/complex.po +++ b/c-api/complex.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2021-06-22 09:58+0200\n" "PO-Revision-Date: 2019-01-14 20:31+0100\n" "Last-Translator: ANTOINE FOURES \n" "Language-Team: FRENCH \n" @@ -74,8 +74,9 @@ msgstr "" "`Py_complex` en C." #: c-api/complex.rst:51 +#, fuzzy msgid "" -"Return the negation of the complex number *complex*, using the C :c:type:" +"Return the negation of the complex number *num*, using the C :c:type:" "`Py_complex` representation." msgstr "" "Renvoie l'opposé du nombre complexe *complex*, sous la forme d'un :c:type:" diff --git a/c-api/conversion.po b/c-api/conversion.po index 5a62d39893..9da64040c2 100644 --- a/c-api/conversion.po +++ b/c-api/conversion.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-24 17:33+0100\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" @@ -50,50 +50,43 @@ msgstr "" 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`` and " -"``format != NULL``." +"into str. Both functions require that ``str != NULL``, ``size > 0``, " +"``format != NULL`` and ``size < INT_MAX``." msgstr "" #: c-api/conversion.rst:33 msgid "" -"If the platform doesn't have :c:func:`vsnprintf` and the buffer size needed " -"to avoid truncation exceeds *size* by more than 512 bytes, Python aborts " -"with a :c:func:`Py_FatalError`." -msgstr "" - -#: c-api/conversion.rst:37 -msgid "" "The return value (*rv*) for these functions should be interpreted as follows:" msgstr "" -#: c-api/conversion.rst:39 +#: c-api/conversion.rst:35 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:43 +#: c-api/conversion.rst:39 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:47 +#: c-api/conversion.rst:43 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:51 +#: c-api/conversion.rst:48 msgid "" "The following functions provide locale-independent string to number " "conversions." msgstr "" -#: c-api/conversion.rst:56 +#: c-api/conversion.rst:52 msgid "" "Convert a string ``s`` to a :c:type:`double`, raising a Python exception on " "failure. The set of accepted strings corresponds to the set of strings " @@ -102,14 +95,14 @@ msgid "" "current locale." msgstr "" -#: c-api/conversion.rst:62 +#: c-api/conversion.rst:58 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:66 +#: c-api/conversion.rst:62 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 " @@ -118,7 +111,7 @@ msgid "" "ValueError, and return ``-1.0``." msgstr "" -#: c-api/conversion.rst:73 +#: c-api/conversion.rst:69 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 " @@ -129,50 +122,50 @@ msgid "" "the first character after the converted value." msgstr "" -#: c-api/conversion.rst:81 +#: c-api/conversion.rst:77 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:90 +#: c-api/conversion.rst:86 msgid "" "Convert a :c:type:`double` *val* to a string using supplied *format_code*, " "*precision*, and *flags*." msgstr "" -#: c-api/conversion.rst:93 +#: c-api/conversion.rst:89 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:98 +#: c-api/conversion.rst:94 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:101 +#: c-api/conversion.rst:97 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:104 +#: c-api/conversion.rst:100 msgid "" "``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look " "like an integer." msgstr "" -#: c-api/conversion.rst:107 +#: c-api/conversion.rst:103 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:111 +#: c-api/conversion.rst:107 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 " @@ -180,20 +173,20 @@ msgid "" "respectively." msgstr "" -#: c-api/conversion.rst:115 +#: c-api/conversion.rst:111 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:124 +#: c-api/conversion.rst:120 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:130 +#: c-api/conversion.rst:126 msgid "" "Case insensitive comparison of strings. The function works almost " "identically to :c:func:`strncmp` except that it ignores the case." diff --git a/c-api/datetime.po b/c-api/datetime.po index cb0b0a25f5..30a33634f4 100644 --- a/c-api/datetime.po +++ b/c-api/datetime.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" -"PO-Revision-Date: 2020-06-28 15:17+0200\n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-12-11 11:57+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -34,7 +34,7 @@ msgstr "" "`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 " +"`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." @@ -259,23 +259,27 @@ msgstr "" "une instance de :c:data:`PyDateTime_DateTime` ou une sous-classe de celle-" "ci. L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" -#: c-api/datetime.rst:200 +#: c-api/datetime.rst:205 msgid "Return the hour, as an int from 0 through 23." msgstr "Renvoie l'heure, sous forme d'entier allant de 0 à 23." -#: c-api/datetime.rst:205 +#: c-api/datetime.rst:210 msgid "Return the minute, as an int from 0 through 59." msgstr "Renvoie la minute, sous forme d'entier allant de 0 à 59." -#: c-api/datetime.rst:210 +#: c-api/datetime.rst:215 msgid "Return the second, as an int from 0 through 59." msgstr "Renvoie la seconde, sous forme d'entier allant de 0 à 59." -#: c-api/datetime.rst:215 +#: c-api/datetime.rst:220 msgid "Return the microsecond, as an int from 0 through 999999." msgstr "Renvoie la microseconde, sous forme d'entier allant de 0 à 999999." -#: c-api/datetime.rst:194 +#: c-api/datetime.rst:224 +msgid "Return the tzinfo (which may be ``None``)." +msgstr "" + +#: c-api/datetime.rst:199 #, fuzzy msgid "" "Macros to extract fields from time objects. The argument must be an " @@ -286,7 +290,7 @@ msgstr "" "instance de :c:data:`PyDateTime_Time` ou une sous-classe de celle-ci. " "L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" -#: c-api/datetime.rst:218 +#: c-api/datetime.rst:229 #, fuzzy msgid "" "Macros to extract fields from time delta objects. The argument must be an " @@ -297,26 +301,26 @@ msgstr "" "être une instance de :c:data:`PyDateTime_Delta` ou une sous-classe de celle-" "ci. L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" -#: c-api/datetime.rst:224 +#: c-api/datetime.rst:235 msgid "Return the number of days, as an int from -999999999 to 999999999." msgstr "" "Renvoie le nombre de jours, sous forme d'entier allant de ``-999999999`` à " "``999999999``." -#: c-api/datetime.rst:231 +#: c-api/datetime.rst:242 msgid "Return the number of seconds, as an int from 0 through 86399." msgstr "Renvoie le nombre de secondes sous forme d'entier allant de 0 à 86399." -#: c-api/datetime.rst:238 +#: c-api/datetime.rst:249 msgid "Return the number of microseconds, as an int from 0 through 999999." msgstr "" "Renvoie le nombre de microsecondes, sous forme d'entier allant de 0 à 999999." -#: c-api/datetime.rst:243 +#: c-api/datetime.rst:254 msgid "Macros for the convenience of modules implementing the DB API:" msgstr "Macros de confort pour les modules implémentant l'API DB :" -#: c-api/datetime.rst:247 +#: c-api/datetime.rst:258 msgid "" "Create and return a new :class:`datetime.datetime` object given an argument " "tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp()`." @@ -324,7 +328,7 @@ msgstr "" "Crée et renvoie un nouvel objet :class:`datetime.datetime` à partir d'un n-" "uplet qui peut être passé à :meth:`datetime.datetime.fromtimestamp()`." -#: c-api/datetime.rst:253 +#: c-api/datetime.rst:264 msgid "" "Create and return a new :class:`datetime.date` object given an argument " "tuple suitable for passing to :meth:`datetime.date.fromtimestamp()`." diff --git a/c-api/decimal.po b/c-api/decimal.po deleted file mode 100644 index f6d9fcd9ec..0000000000 --- a/c-api/decimal.po +++ /dev/null @@ -1,212 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2021, Python Software Foundation -# This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: Python 3.10\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-18 17:40+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: c-api/decimal.rst:7 -msgid "Decimal capsule API" -msgstr "" - -#: c-api/decimal.rst:9 -msgid "" -"Capsule API functions can be used in the same manner as regular library " -"functions, provided that the API has been initialized." -msgstr "" - -#: c-api/decimal.rst:14 -msgid "Initialize" -msgstr "" - -#: c-api/decimal.rst:16 -msgid "" -"Typically, a C extension module that uses the decimal API will do these " -"steps in its init function:" -msgstr "" - -#: c-api/decimal.rst:34 -msgid "Type checking, predicates, accessors" -msgstr "" - -#: c-api/decimal.rst:38 -msgid "" -"Return 1 if ``dec`` is a Decimal, 0 otherwise. This function does not set " -"any exceptions." -msgstr "" - -#: c-api/decimal.rst:44 -msgid "Return 1 if ``dec`` is ``NaN``, ``sNaN`` or ``Infinity``, 0 otherwise." -msgstr "" - -#: c-api/decimal.rst:55 c-api/decimal.rst:64 -msgid "" -"Set TypeError and return -1 if ``dec`` is not a Decimal. It is guaranteed " -"that this is the only failure mode, so if ``dec`` has already been type-" -"checked, no errors can occur and the function can be treated as a simple " -"predicate." -msgstr "" - -#: c-api/decimal.rst:53 -msgid "Return 1 if ``dec`` is ``NaN`` or ``sNaN``, 0 otherwise." -msgstr "" - -#: c-api/decimal.rst:62 -msgid "Return 1 if ``dec`` is ``Infinity``, 0 otherwise." -msgstr "" - -#: c-api/decimal.rst:71 -msgid "" -"Return the number of digits in the coefficient. For ``Infinity``, the " -"number of digits is always zero. Typically, the same applies to ``NaN`` and " -"``sNaN``, but both of these can have a payload that is equivalent to a " -"coefficient. Therefore, ``NaNs`` can have a nonzero return value." -msgstr "" - -#: c-api/decimal.rst:76 -msgid "" -"Set TypeError and return -1 if ``dec`` is not a Decimal. It is guaranteed " -"that this is the only failure mode, so if ``dec`` has already been type-" -"checked, no errors can occur and the function can be treated as a simple " -"accessor." -msgstr "" - -#: c-api/decimal.rst:82 -msgid "Exact conversions between decimals and primitive C types" -msgstr "" - -#: c-api/decimal.rst:84 -msgid "" -"This API supports conversions for decimals with a coefficient up to 38 " -"digits." -msgstr "" - -#: c-api/decimal.rst:87 -msgid "Data structures" -msgstr "" - -#: c-api/decimal.rst:89 -msgid "" -"The conversion functions use the following status codes and data structures:" -msgstr "" - -#: c-api/decimal.rst:110 -msgid "" -"The status cases are explained below. ``sign`` is 0 for positive and 1 for " -"negative. ``((uint128_t)hi << 64) + lo`` is the coefficient, ``exp`` is the " -"exponent." -msgstr "" - -#: c-api/decimal.rst:113 -msgid "" -"The data structure is called \"triple\" because the decimal triple (sign, " -"coeff, exp) is an established term and (``hi``, ``lo``) represents a single " -"``uint128_t`` coefficient." -msgstr "" - -#: c-api/decimal.rst:216 -msgid "Functions" -msgstr "Fonctions" - -#: c-api/decimal.rst:122 -msgid "" -"Convert a decimal to a triple. As above, it is guaranteed that the only " -"Python failure mode is a TypeError, checks can be omitted if the type is " -"known." -msgstr "" - -#: c-api/decimal.rst:126 -msgid "" -"For simplicity, the usage of the function and all special cases are " -"explained in code form and comments:" -msgstr "" - -#: c-api/decimal.rst:180 -msgid "" -"Create a decimal from a triple. The following rules must be observed for " -"initializing the triple:" -msgstr "" - -#: c-api/decimal.rst:183 -msgid "``triple.sign`` must always be 0 (for positive) or 1 (for negative)." -msgstr "" - -#: c-api/decimal.rst:185 -msgid "" -"``MPD_TRIPLE_QNAN``: ``triple.exp`` must be 0. If ``triple.hi`` or ``triple." -"lo`` are nonzero, create a ``NaN`` with a payload." -msgstr "" - -#: c-api/decimal.rst:188 -msgid "" -"``MPD_TRIPLE_SNAN``: ``triple.exp`` must be 0. If ``triple.hi`` or ``triple." -"lo`` are nonzero, create an ``sNaN`` with a payload." -msgstr "" - -#: c-api/decimal.rst:191 -msgid "" -"``MPD_TRIPLE_INF``: ``triple.exp``, ``triple.hi`` and ``triple.lo`` must be " -"zero." -msgstr "" - -#: c-api/decimal.rst:193 -msgid "" -"``MPD_TRIPLE_NORMAL``: ``MPD_MIN_ETINY + 38 < triple.exp < MPD_MAX_EMAX - " -"38``. ``triple.hi`` and ``triple.lo`` can be chosen freely." -msgstr "" - -#: c-api/decimal.rst:196 -msgid "``MPD_TRIPLE_ERROR``: It is always an error to set this tag." -msgstr "" - -#: c-api/decimal.rst:199 -msgid "" -"If one of the above conditions is not met, the function returns ``NaN`` if " -"the ``InvalidOperation`` trap is not set in the thread local context. " -"Otherwise, it sets the ``InvalidOperation`` exception and returns NULL." -msgstr "" - -#: c-api/decimal.rst:203 -msgid "" -"Additionally, though extremely unlikely give the small allocation sizes, the " -"function can set ``MemoryError`` and return ``NULL``." -msgstr "" - -#: c-api/decimal.rst:208 -msgid "Advanced API" -msgstr "" - -#: c-api/decimal.rst:210 -msgid "" -"This API enables the use of ``libmpdec`` functions. Since Python is " -"compiled with hidden symbols, the API requires an external libmpdec and the " -"``mpdecimal.h`` header." -msgstr "" - -#: c-api/decimal.rst:220 -msgid "" -"Return a new decimal that can be used in the ``result`` position of " -"``libmpdec`` functions." -msgstr "" - -#: c-api/decimal.rst:225 -msgid "" -"Get a pointer to the internal ``mpd_t`` of the decimal. Decimals are " -"immutable, so this function must only be used on a new Decimal that has been " -"created by PyDec_Alloc()." -msgstr "" - -#: c-api/decimal.rst:231 -msgid "Get a pointer to the constant internal ``mpd_t`` of the decimal." -msgstr "" diff --git a/c-api/descriptor.po b/c-api/descriptor.po index 2e5a0df7a4..b9eae213d3 100644 --- a/c-api/descriptor.po +++ b/c-api/descriptor.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2021-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" @@ -31,10 +31,11 @@ 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 true if the descriptor objects *descr* describes a data attribute, or " -"false if it describes a method. *descr* must be a descriptor object; there " -"is no error checking." +"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 " diff --git a/c-api/dict.po b/c-api/dict.po index 5fe2e9cd78..98d4e69d0e 100644 --- a/c-api/dict.po +++ b/c-api/dict.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" "PO-Revision-Date: 2018-07-03 11:36+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -116,27 +116,33 @@ msgid "" "`PyDict_GetItemWithError()` instead." msgstr "" -#: c-api/dict.rst:108 +#: 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:116 +#: c-api/dict.rst:120 msgid "" "This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a :c:" "type:`const char*`, rather than a :c:type:`PyObject*`." msgstr "" -#: c-api/dict.rst:119 +#: 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:127 +#: 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 " @@ -146,29 +152,29 @@ msgid "" "the insertion." msgstr "" -#: c-api/dict.rst:137 +#: c-api/dict.rst:141 msgid "" "Return a :c:type:`PyListObject` containing all the items from the dictionary." msgstr "" -#: c-api/dict.rst:142 +#: c-api/dict.rst:146 msgid "" "Return a :c:type:`PyListObject` containing all the keys from the dictionary." msgstr "" -#: c-api/dict.rst:147 +#: c-api/dict.rst:151 msgid "" "Return a :c:type:`PyListObject` containing all the values from the " "dictionary *p*." msgstr "" -#: c-api/dict.rst:155 +#: 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:161 +#: 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 " @@ -182,18 +188,18 @@ msgid "" "structure is sparse, the offsets are not consecutive." msgstr "" -#: c-api/dict.rst:172 +#: c-api/dict.rst:176 msgid "For example::" msgstr "Par exemple ::" -#: c-api/dict.rst:182 +#: 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:207 +#: 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` " @@ -203,7 +209,7 @@ msgid "" "or ``-1`` if an exception was raised." msgstr "" -#: c-api/dict.rst:217 +#: 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 " @@ -212,7 +218,7 @@ msgid "" "exception was raised." msgstr "" -#: c-api/dict.rst:226 +#: 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, " diff --git a/c-api/exceptions.po b/c-api/exceptions.po index 19799c5f2a..a522863854 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2018-10-04 12:24+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -28,8 +28,8 @@ msgid "" "occurred. Most C API functions don't clear this on success, but will set it " "to indicate the cause of the error on failure. Most C API functions also " "return an error indicator, usually ``NULL`` if they are supposed to return a " -"pointer, or ``-1`` if they return an integer (exception: the :c:func:`PyArg_" -"\\*` functions return ``1`` for success and ``0`` for failure)." +"pointer, or ``-1`` if they return an integer (exception: the :c:func:" +"`PyArg_\\*` functions return ``1`` for success and ``0`` for failure)." msgstr "" #: c-api/exceptions.rst:20 @@ -139,7 +139,7 @@ msgid "" "specifies the exception type; it is normally one of the standard exceptions, " "e.g. :c:data:`PyExc_RuntimeError`. You need not increment its reference " "count. The second argument is an error message; it is decoded from " -"``'utf-8``'." +"``'utf-8'``." msgstr "" #: c-api/exceptions.rst:108 @@ -212,8 +212,8 @@ 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 filesystem encoding " -"(:func:`os.fsdecode`)." +"is given as a C string. *filename* is decoded from the :term:`filesystem " +"encoding and error handler`." msgstr "" #: c-api/exceptions.rst:191 @@ -274,25 +274,31 @@ msgstr "" #: c-api/exceptions.rst:258 msgid "" +"Much like :c:func:`PyErr_SetImportError` but this function allows for " +"specifying a subclass of :exc:`ImportError` to raise." +msgstr "" + +#: c-api/exceptions.rst:266 +msgid "" "Set file, line, and offset information for the current exception. If the " "current exception is not a :exc:`SyntaxError`, then it sets additional " "attributes, which make the exception printing subsystem think the exception " "is a :exc:`SyntaxError`." msgstr "" -#: c-api/exceptions.rst:268 +#: c-api/exceptions.rst:276 msgid "" "Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string " -"decoded from the filesystem encoding (:func:`os.fsdecode`)." +"decoded from the :term:`filesystem encoding and error handler`." msgstr "" -#: c-api/exceptions.rst:276 +#: c-api/exceptions.rst:284 msgid "" -"Like :c:func:`PyErr_SyntaxLocationEx`, but the col_offset parameter is " +"Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is " "omitted." msgstr "" -#: c-api/exceptions.rst:282 +#: c-api/exceptions.rst:290 msgid "" "This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, " "where *message* indicates that an internal operation (e.g. a Python/C API " @@ -300,11 +306,11 @@ msgid "" "use." msgstr "" -#: c-api/exceptions.rst:289 +#: c-api/exceptions.rst:297 msgid "Issuing warnings" msgstr "" -#: c-api/exceptions.rst:291 +#: c-api/exceptions.rst:299 msgid "" "Use these functions to issue warnings from C code. They mirror similar " "functions exported by the Python :mod:`warnings` module. They normally " @@ -320,7 +326,7 @@ msgid "" "return an error value)." msgstr "" -#: c-api/exceptions.rst:306 +#: c-api/exceptions.rst:314 msgid "" "Issue a warning message. The *category* argument is a warning category (see " "below) or ``NULL``; the *message* argument is a UTF-8 encoded string. " @@ -330,7 +336,7 @@ msgid "" "`PyErr_WarnEx`, 2 is the function above that, and so forth." msgstr "" -#: c-api/exceptions.rst:313 +#: c-api/exceptions.rst:321 msgid "" "Warning categories must be subclasses of :c:data:`PyExc_Warning`; :c:data:" "`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; the default " @@ -339,65 +345,59 @@ msgid "" "enumerated at :ref:`standardwarningcategories`." msgstr "" -#: c-api/exceptions.rst:319 +#: c-api/exceptions.rst:327 msgid "" "For information about warning control, see the documentation for the :mod:" "`warnings` module and the :option:`-W` option in the command line " "documentation. There is no C API for warning control." msgstr "" -#: c-api/exceptions.rst:325 -msgid "" -"Much like :c:func:`PyErr_SetImportError` but this function allows for " -"specifying a subclass of :exc:`ImportError` to raise." -msgstr "" - -#: c-api/exceptions.rst:333 +#: c-api/exceptions.rst:334 msgid "" "Issue a warning message with explicit control over all warning attributes. " "This is a straightforward wrapper around the Python function :func:`warnings." -"warn_explicit`, see there for more information. The *module* and *registry* " +"warn_explicit`; see there for more information. The *module* and *registry* " "arguments may be set to ``NULL`` to get the default effect described there." msgstr "" -#: c-api/exceptions.rst:344 +#: c-api/exceptions.rst:345 msgid "" "Similar to :c:func:`PyErr_WarnExplicitObject` except that *message* and " -"*module* are UTF-8 encoded strings, and *filename* is decoded from the " -"filesystem encoding (:func:`os.fsdecode`)." +"*module* are UTF-8 encoded strings, and *filename* is decoded from the :term:" +"`filesystem encoding and error handler`." msgstr "" -#: c-api/exceptions.rst:351 +#: c-api/exceptions.rst:352 msgid "" "Function similar to :c:func:`PyErr_WarnEx`, but use :c:func:" "`PyUnicode_FromFormat` to format the warning message. *format* is an ASCII-" "encoded string." msgstr "" -#: c-api/exceptions.rst:360 +#: c-api/exceptions.rst:361 msgid "" "Function similar to :c:func:`PyErr_WarnFormat`, but *category* is :exc:" "`ResourceWarning` and it passes *source* to :func:`warnings.WarningMessage`." msgstr "" -#: c-api/exceptions.rst:367 +#: c-api/exceptions.rst:368 msgid "Querying the error indicator" msgstr "" -#: c-api/exceptions.rst:371 +#: c-api/exceptions.rst:372 msgid "" "Test whether the error indicator is set. If set, return the exception " -"*type* (the first argument to the last call to one of the :c:func:`PyErr_Set" -"\\*` functions or to :c:func:`PyErr_Restore`). If not set, return " +"*type* (the first argument to the last call to one of the :c:func:" +"`PyErr_Set\\*` functions or to :c:func:`PyErr_Restore`). If not set, return " "``NULL``. You do not own a reference to the return value, so you do not " "need to :c:func:`Py_DECREF` it." msgstr "" -#: c-api/exceptions.rst:377 +#: c-api/exceptions.rst:378 msgid "The caller must hold the GIL." msgstr "" -#: c-api/exceptions.rst:381 +#: c-api/exceptions.rst:382 msgid "" "Do not compare the return value to a specific exception; use :c:func:" "`PyErr_ExceptionMatches` instead, shown below. (The comparison could easily " @@ -405,14 +405,14 @@ msgid "" "of a class exception, or it may be a subclass of the expected exception.)" msgstr "" -#: c-api/exceptions.rst:389 +#: c-api/exceptions.rst:390 msgid "" "Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This " "should only be called when an exception is actually set; a memory access " "violation will occur if no exception has been raised." msgstr "" -#: c-api/exceptions.rst:396 +#: c-api/exceptions.rst:397 msgid "" "Return true if the *given* exception matches the exception type in *exc*. " "If *exc* is a class object, this also returns true when *given* is an " @@ -420,7 +420,7 @@ msgid "" "tuple (and recursively in subtuples) are searched for a match." msgstr "" -#: c-api/exceptions.rst:404 +#: c-api/exceptions.rst:405 msgid "" "Retrieve the error indicator into three variables whose addresses are " "passed. If the error indicator is not set, set all three variables to " @@ -429,14 +429,14 @@ msgid "" "the type object is not." msgstr "" -#: c-api/exceptions.rst:411 +#: c-api/exceptions.rst:412 msgid "" "This function is normally only used by code that needs to catch exceptions " "or by code that needs to save and restore the error indicator temporarily, e." "g.::" msgstr "" -#: c-api/exceptions.rst:426 +#: c-api/exceptions.rst:427 msgid "" "Set the error indicator from the three objects. If the error indicator is " "already set, it is cleared first. If the objects are ``NULL``, the error " @@ -449,14 +449,14 @@ msgid "" "function. I warned you.)" msgstr "" -#: c-api/exceptions.rst:438 +#: c-api/exceptions.rst:439 msgid "" "This function is normally only used by code that needs to save and restore " "the error indicator temporarily. Use :c:func:`PyErr_Fetch` to save the " "current error indicator." msgstr "" -#: c-api/exceptions.rst:445 +#: c-api/exceptions.rst:446 msgid "" "Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` " "below can be \"unnormalized\", meaning that ``*exc`` is a class object but " @@ -466,22 +466,55 @@ msgid "" "improve performance." msgstr "" -#: c-api/exceptions.rst:453 +#: c-api/exceptions.rst:454 msgid "" "This function *does not* implicitly set the ``__traceback__`` attribute on " "the exception value. If setting the traceback appropriately is desired, the " "following additional snippet is needed::" msgstr "" -#: c-api/exceptions.rst:464 +#: c-api/exceptions.rst:465 +msgid "" +"Retrieve the active exception instance, as would be returned by :func:`sys." +"exception`. This refers to an exception that was *already caught*, not to an " +"exception that was freshly raised. Returns a new reference to the exception " +"or ``NULL``. Does not modify the interpreter's exception 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_SetHandledException` to restore or " +"clear the exception state." +msgstr "" + +#: c-api/exceptions.rst:481 +msgid "" +"Set the active exception, as known from ``sys.exception()``. This refers to " +"an exception that was *already caught*, not to an exception that was freshly " +"raised. To clear the exception state, pass ``NULL``." +msgstr "" + +#: c-api/exceptions.rst:488 +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_GetHandledException` to get the " +"exception state." +msgstr "" + +#: c-api/exceptions.rst:497 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." +"Retrieve the old-style representation of the exception info, as known from :" +"func:`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. This function is kept for backwards compatibility. Prefer " +"using :c:func:`PyErr_GetHandledException`." msgstr "" -#: c-api/exceptions.rst:471 +#: c-api/exceptions.rst:506 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -489,16 +522,17 @@ msgid "" "exception state." msgstr "" -#: c-api/exceptions.rst:481 +#: c-api/exceptions.rst:516 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`." +"exception state, pass ``NULL`` for all three arguments. This function is " +"kept for backwards compatibility. Prefer using :c:func:" +"`PyErr_SetHandledException`." msgstr "" -#: c-api/exceptions.rst:489 +#: c-api/exceptions.rst:525 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -506,43 +540,104 @@ msgid "" "state." msgstr "" -#: c-api/exceptions.rst:498 +#: c-api/exceptions.rst:532 +msgid "" +"The ``type`` and ``traceback`` arguments are no longer used and can be NULL. " +"The interpreter now derives them from the exception instance (the ``value`` " +"argument). The function still steals references of all three arguments." +msgstr "" + +#: c-api/exceptions.rst:540 msgid "Signal Handling" msgstr "Traitement des signaux" -#: c-api/exceptions.rst:508 +#: c-api/exceptions.rst:550 +msgid "This function interacts with Python's signal handling." +msgstr "" + +#: c-api/exceptions.rst:552 +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:557 +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:563 +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:566 +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:570 +msgid "" +"The default Python signal handler for :const:`SIGINT` raises the :exc:" +"`KeyboardInterrupt` exception." +msgstr "" + +#: c-api/exceptions.rst:581 +msgid "" +"Simulate the effect of a :const:`SIGINT` signal arriving. This is equivalent " +"to ``PyErr_SetInterruptEx(SIGINT)``." +msgstr "" + +#: c-api/exceptions.rst:612 msgid "" -"This function interacts with Python's signal handling. It checks whether a " -"signal has been sent to the processes and if so, invokes the corresponding " -"signal handler. If the :mod:`signal` module is supported, this can invoke a " -"signal handler written in Python. In all cases, the default effect for :" -"const:`SIGINT` is to raise the :exc:`KeyboardInterrupt` exception. If an " -"exception is raised the error indicator is set and the function returns " -"``-1``; otherwise the function returns ``0``. The error indicator may or " -"may not be cleared if it was previously set." +"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:524 +#: c-api/exceptions.rst:595 msgid "" -"Simulate the effect of a :const:`SIGINT` signal arriving. The next time :c:" -"func:`PyErr_CheckSignals` is called, the Python signal handler for :const:" -"`SIGINT` will be called." +"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:528 +#: c-api/exceptions.rst:599 msgid "" -"If :const:`SIGINT` isn't handled by Python (it was set to :data:`signal." -"SIG_DFL` or :data:`signal.SIG_IGN`), this function does nothing." +"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:534 +#: c-api/exceptions.rst:604 +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:607 +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:620 msgid "" "This utility function specifies a file descriptor to which the signal number " "is written as a single byte whenever a signal is received. *fd* must be non-" "blocking. It returns the previous such file descriptor." msgstr "" -#: c-api/exceptions.rst:538 +#: c-api/exceptions.rst:624 msgid "" "The value ``-1`` disables the feature; this is the initial state. This is " "equivalent to :func:`signal.set_wakeup_fd` in Python, but without any error " @@ -550,15 +645,15 @@ msgid "" "be called from the main thread." msgstr "" -#: c-api/exceptions.rst:543 +#: c-api/exceptions.rst:629 msgid "On Windows, the function now also supports socket handles." msgstr "" -#: c-api/exceptions.rst:548 +#: c-api/exceptions.rst:634 msgid "Exception Classes" msgstr "" -#: c-api/exceptions.rst:552 +#: c-api/exceptions.rst:638 msgid "" "This utility function creates and returns a new exception class. The *name* " "argument must be the name of the new exception, a C string of the form " @@ -567,7 +662,7 @@ msgid "" "(accessible in C as :c:data:`PyExc_Exception`)." msgstr "" -#: c-api/exceptions.rst:558 +#: c-api/exceptions.rst:644 msgid "" "The :attr:`__module__` attribute of the new class is set to the first part " "(up to the last dot) of the *name* argument, and the class name is set to " @@ -577,31 +672,31 @@ msgid "" "variables and methods." msgstr "" -#: c-api/exceptions.rst:567 +#: c-api/exceptions.rst:653 msgid "" "Same as :c:func:`PyErr_NewException`, except that the new exception class " "can easily be given a docstring: If *doc* is non-``NULL``, it will be used " "as the docstring for the exception class." msgstr "" -#: c-api/exceptions.rst:575 +#: c-api/exceptions.rst:661 msgid "Exception Objects" msgstr "Objets exception" -#: c-api/exceptions.rst:579 +#: c-api/exceptions.rst:665 msgid "" "Return the traceback associated with the exception as a new reference, as " "accessible from Python through :attr:`__traceback__`. If there is no " "traceback associated, this returns ``NULL``." msgstr "" -#: c-api/exceptions.rst:586 +#: c-api/exceptions.rst:672 msgid "" "Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " "clear it." msgstr "" -#: c-api/exceptions.rst:592 +#: c-api/exceptions.rst:678 msgid "" "Return the context (another exception instance during whose handling *ex* " "was raised) associated with the exception as a new reference, as accessible " @@ -609,127 +704,98 @@ msgid "" "this returns ``NULL``." msgstr "" -#: c-api/exceptions.rst:600 +#: c-api/exceptions.rst:686 msgid "" "Set the context associated with the exception to *ctx*. Use ``NULL`` to " "clear it. There is no type check to make sure that *ctx* is an exception " "instance. This steals a reference to *ctx*." msgstr "" -#: c-api/exceptions.rst:607 +#: c-api/exceptions.rst:693 msgid "" "Return the cause (either an exception instance, or :const:`None`, set by " "``raise ... from ...``) associated with the exception as a new reference, as " "accessible from Python through :attr:`__cause__`." msgstr "" -#: c-api/exceptions.rst:614 +#: c-api/exceptions.rst:700 msgid "" "Set the cause associated with the exception to *cause*. Use ``NULL`` to " "clear it. There is no type check to make sure that *cause* is either an " "exception instance or :const:`None`. This steals a reference to *cause*." msgstr "" -#: c-api/exceptions.rst:618 +#: c-api/exceptions.rst:704 msgid "" ":attr:`__suppress_context__` is implicitly set to ``True`` by this function." msgstr "" -#: c-api/exceptions.rst:624 +#: c-api/exceptions.rst:710 msgid "Unicode Exception Objects" msgstr "Objets exception Unicode" -#: c-api/exceptions.rst:626 +#: c-api/exceptions.rst:712 msgid "" "The following functions are used to create and modify Unicode exceptions " "from C." msgstr "" -#: c-api/exceptions.rst:630 +#: c-api/exceptions.rst:716 msgid "" "Create a :class:`UnicodeDecodeError` object with the attributes *encoding*, " "*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are " "UTF-8 encoded strings." msgstr "" -#: c-api/exceptions.rst:636 -msgid "" -"Create a :class:`UnicodeEncodeError` object with the attributes *encoding*, " -"*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are " -"UTF-8 encoded strings." -msgstr "" - -#: c-api/exceptions.rst:650 -msgid "3.11" -msgstr "" - -#: c-api/exceptions.rst:642 -msgid "" -"``Py_UNICODE`` is deprecated since Python 3.3. Please migrate to " -"``PyObject_CallFunction(PyExc_UnicodeEncodeError, \"sOnns\", ...)``." -msgstr "" - -#: c-api/exceptions.rst:647 -msgid "" -"Create a :class:`UnicodeTranslateError` object with the attributes *object*, " -"*length*, *start*, *end* and *reason*. *reason* is a UTF-8 encoded string." -msgstr "" - -#: c-api/exceptions.rst:652 -msgid "" -"``Py_UNICODE`` is deprecated since Python 3.3. Please migrate to " -"``PyObject_CallFunction(PyExc_UnicodeTranslateError, \"Onns\", ...)``." -msgstr "" - -#: c-api/exceptions.rst:658 +#: c-api/exceptions.rst:723 msgid "Return the *encoding* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:664 +#: c-api/exceptions.rst:729 msgid "Return the *object* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:670 +#: c-api/exceptions.rst:735 msgid "" -"Get the *start* attribute of the given exception object and place it into *" -"\\*start*. *start* must not be ``NULL``. Return ``0`` on success, ``-1`` " +"Get the *start* attribute of the given exception object and place it into " +"*\\*start*. *start* must not be ``NULL``. Return ``0`` on success, ``-1`` " "on failure." msgstr "" -#: c-api/exceptions.rst:678 +#: c-api/exceptions.rst:743 msgid "" "Set the *start* attribute of the given exception object to *start*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: c-api/exceptions.rst:685 +#: c-api/exceptions.rst:750 msgid "" -"Get the *end* attribute of the given exception object and place it into *" -"\\*end*. *end* must not be ``NULL``. Return ``0`` on success, ``-1`` on " +"Get the *end* attribute of the given exception object and place it into " +"*\\*end*. *end* must not be ``NULL``. Return ``0`` on success, ``-1`` on " "failure." msgstr "" -#: c-api/exceptions.rst:693 +#: c-api/exceptions.rst:758 msgid "" "Set the *end* attribute of the given exception object to *end*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: c-api/exceptions.rst:700 +#: c-api/exceptions.rst:765 msgid "Return the *reason* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:706 +#: c-api/exceptions.rst:771 msgid "" "Set the *reason* attribute of the given exception object to *reason*. " "Return ``0`` on success, ``-1`` on failure." msgstr "" -#: c-api/exceptions.rst:713 +#: c-api/exceptions.rst:778 msgid "Recursion Control" msgstr "Contrôle de la récursion" -#: c-api/exceptions.rst:715 +#: c-api/exceptions.rst:780 msgid "" "These two functions provide a way to perform safe recursive calls at the C " "level, both in the core and in extension modules. They are needed if the " @@ -739,42 +805,42 @@ msgid "" "recursion handling." msgstr "" -#: c-api/exceptions.rst:724 +#: c-api/exceptions.rst:789 msgid "Marks a point where a recursive C-level call is about to be performed." msgstr "" -#: c-api/exceptions.rst:726 +#: c-api/exceptions.rst:791 msgid "" "If :const:`USE_STACKCHECK` is defined, this function checks if the OS stack " "overflowed using :c:func:`PyOS_CheckStack`. In this is the case, it sets a :" "exc:`MemoryError` and returns a nonzero value." msgstr "" -#: c-api/exceptions.rst:730 +#: c-api/exceptions.rst:795 msgid "" "The function then checks if the recursion limit is reached. If this is the " "case, a :exc:`RecursionError` is set and a nonzero value is returned. " "Otherwise, zero is returned." msgstr "" -#: c-api/exceptions.rst:734 +#: c-api/exceptions.rst:799 msgid "" "*where* should be a UTF-8 encoded string such as ``\" in instance check\"`` " "to be concatenated to the :exc:`RecursionError` message caused by the " "recursion depth limit." msgstr "" -#: c-api/exceptions.rst:746 +#: c-api/exceptions.rst:811 msgid "This function is now also available in the limited API." msgstr "" -#: c-api/exceptions.rst:743 +#: c-api/exceptions.rst:808 msgid "" "Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each " "*successful* invocation of :c:func:`Py_EnterRecursiveCall`." msgstr "" -#: c-api/exceptions.rst:749 +#: c-api/exceptions.rst:814 msgid "" "Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " "requires special recursion handling. In addition to protecting the stack, :" @@ -783,13 +849,13 @@ msgid "" "Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." msgstr "" -#: c-api/exceptions.rst:757 +#: c-api/exceptions.rst:822 msgid "" "Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " "implementation to detect cycles." msgstr "" -#: c-api/exceptions.rst:760 +#: c-api/exceptions.rst:825 msgid "" "If the object has already been processed, the function returns a positive " "integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " @@ -797,30 +863,30 @@ msgid "" "`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``." msgstr "" -#: c-api/exceptions.rst:766 +#: c-api/exceptions.rst:831 msgid "" "The function will return a negative integer if the recursion limit is " "reached. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " "should typically return ``NULL``." msgstr "" -#: c-api/exceptions.rst:770 +#: c-api/exceptions.rst:835 msgid "" "Otherwise, the function returns zero and the :c:member:`~PyTypeObject." "tp_repr` implementation can continue normally." msgstr "" -#: c-api/exceptions.rst:775 +#: c-api/exceptions.rst:840 msgid "" "Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation of :" "c:func:`Py_ReprEnter` that returns zero." msgstr "" -#: c-api/exceptions.rst:782 +#: c-api/exceptions.rst:847 msgid "Standard Exceptions" msgstr "Exceptions standards" -#: c-api/exceptions.rst:784 +#: c-api/exceptions.rst:849 msgid "" "All standard Python exceptions are available as global variables whose names " "are ``PyExc_`` followed by the Python exception name. These have the type :" @@ -828,452 +894,448 @@ msgid "" "all the variables:" msgstr "" -#: c-api/exceptions.rst:978 c-api/exceptions.rst:1023 +#: c-api/exceptions.rst:1043 c-api/exceptions.rst:1088 msgid "C Name" msgstr "Nom C" -#: c-api/exceptions.rst:1023 +#: c-api/exceptions.rst:1088 msgid "Python Name" msgstr "Nom Python" -#: c-api/exceptions.rst:978 c-api/exceptions.rst:1023 +#: c-api/exceptions.rst:1043 c-api/exceptions.rst:1088 msgid "Notes" msgstr "Notes" -#: c-api/exceptions.rst:847 +#: c-api/exceptions.rst:912 msgid ":c:data:`PyExc_BaseException`" msgstr ":c:data:`PyExc_BaseException`" -#: c-api/exceptions.rst:847 +#: c-api/exceptions.rst:912 msgid ":exc:`BaseException`" msgstr ":exc:`BaseException`" -#: c-api/exceptions.rst:849 c-api/exceptions.rst:897 c-api/exceptions.rst:1025 -msgid "\\(1)" -msgstr "\\(1)" +#: c-api/exceptions.rst:914 c-api/exceptions.rst:962 c-api/exceptions.rst:974 +msgid "[1]_" +msgstr "" -#: c-api/exceptions.rst:849 +#: c-api/exceptions.rst:914 msgid ":c:data:`PyExc_Exception`" msgstr ":c:data:`PyExc_Exception`" -#: c-api/exceptions.rst:849 +#: c-api/exceptions.rst:914 msgid ":exc:`Exception`" msgstr ":exc:`Exception`" -#: c-api/exceptions.rst:851 +#: c-api/exceptions.rst:916 msgid ":c:data:`PyExc_ArithmeticError`" msgstr ":c:data:`PyExc_ArithmeticError`" -#: c-api/exceptions.rst:851 +#: c-api/exceptions.rst:916 msgid ":exc:`ArithmeticError`" msgstr ":exc:`ArithmeticError`" -#: c-api/exceptions.rst:853 +#: c-api/exceptions.rst:918 msgid ":c:data:`PyExc_AssertionError`" msgstr ":c:data:`PyExc_AssertionError`" -#: c-api/exceptions.rst:853 +#: c-api/exceptions.rst:918 msgid ":exc:`AssertionError`" msgstr ":exc:`AssertionError`" -#: c-api/exceptions.rst:855 +#: c-api/exceptions.rst:920 msgid ":c:data:`PyExc_AttributeError`" msgstr ":c:data:`PyExc_AttributeError`" -#: c-api/exceptions.rst:855 +#: c-api/exceptions.rst:920 msgid ":exc:`AttributeError`" msgstr ":exc:`AttributeError`" -#: c-api/exceptions.rst:857 +#: c-api/exceptions.rst:922 msgid ":c:data:`PyExc_BlockingIOError`" msgstr ":c:data:`PyExc_BlockingIOError`" -#: c-api/exceptions.rst:857 +#: c-api/exceptions.rst:922 msgid ":exc:`BlockingIOError`" msgstr ":exc:`BlockingIOError`" -#: c-api/exceptions.rst:859 +#: c-api/exceptions.rst:924 msgid ":c:data:`PyExc_BrokenPipeError`" msgstr ":c:data:`PyExc_BrokenPipeError`" -#: c-api/exceptions.rst:859 +#: c-api/exceptions.rst:924 msgid ":exc:`BrokenPipeError`" msgstr ":exc:`BrokenPipeError`" -#: c-api/exceptions.rst:861 +#: c-api/exceptions.rst:926 msgid ":c:data:`PyExc_BufferError`" msgstr ":c:data:`PyExc_BufferError`" -#: c-api/exceptions.rst:861 +#: c-api/exceptions.rst:926 msgid ":exc:`BufferError`" msgstr ":exc:`BufferError`" -#: c-api/exceptions.rst:863 +#: c-api/exceptions.rst:928 msgid ":c:data:`PyExc_ChildProcessError`" msgstr ":c:data:`PyExc_ChildProcessError`" -#: c-api/exceptions.rst:863 +#: c-api/exceptions.rst:928 msgid ":exc:`ChildProcessError`" msgstr ":exc:`ChildProcessError`" -#: c-api/exceptions.rst:865 +#: c-api/exceptions.rst:930 msgid ":c:data:`PyExc_ConnectionAbortedError`" msgstr ":c:data:`PyExc_ConnectionAbortedError`" -#: c-api/exceptions.rst:865 +#: c-api/exceptions.rst:930 msgid ":exc:`ConnectionAbortedError`" msgstr ":exc:`ConnectionAbortedError`" -#: c-api/exceptions.rst:867 +#: c-api/exceptions.rst:932 msgid ":c:data:`PyExc_ConnectionError`" msgstr ":c:data:`PyExc_ConnectionError`" -#: c-api/exceptions.rst:867 +#: c-api/exceptions.rst:932 msgid ":exc:`ConnectionError`" msgstr ":exc:`ConnectionError`" -#: c-api/exceptions.rst:869 +#: c-api/exceptions.rst:934 msgid ":c:data:`PyExc_ConnectionRefusedError`" msgstr ":c:data:`PyExc_ConnectionRefusedError`" -#: c-api/exceptions.rst:869 +#: c-api/exceptions.rst:934 msgid ":exc:`ConnectionRefusedError`" msgstr ":exc:`ConnectionRefusedError`" -#: c-api/exceptions.rst:871 +#: c-api/exceptions.rst:936 msgid ":c:data:`PyExc_ConnectionResetError`" msgstr ":c:data:`PyExc_ConnectionResetError`" -#: c-api/exceptions.rst:871 +#: c-api/exceptions.rst:936 msgid ":exc:`ConnectionResetError`" msgstr ":exc:`ConnectionResetError`" -#: c-api/exceptions.rst:873 +#: c-api/exceptions.rst:938 msgid ":c:data:`PyExc_EOFError`" msgstr ":c:data:`PyExc_EOFError`" -#: c-api/exceptions.rst:873 +#: c-api/exceptions.rst:938 msgid ":exc:`EOFError`" msgstr ":exc:`EOFError`" -#: c-api/exceptions.rst:875 +#: c-api/exceptions.rst:940 msgid ":c:data:`PyExc_FileExistsError`" msgstr ":c:data:`PyExc_FileExistsError`" -#: c-api/exceptions.rst:875 +#: c-api/exceptions.rst:940 msgid ":exc:`FileExistsError`" msgstr ":exc:`FileExistsError`" -#: c-api/exceptions.rst:877 +#: c-api/exceptions.rst:942 msgid ":c:data:`PyExc_FileNotFoundError`" msgstr ":c:data:`PyExc_FloatingPointError`" -#: c-api/exceptions.rst:877 +#: c-api/exceptions.rst:942 msgid ":exc:`FileNotFoundError`" msgstr ":exc:`FileNotFoundError`" -#: c-api/exceptions.rst:879 +#: c-api/exceptions.rst:944 msgid ":c:data:`PyExc_FloatingPointError`" msgstr ":c:data:`PyExc_FloatingPointError`" -#: c-api/exceptions.rst:879 +#: c-api/exceptions.rst:944 msgid ":exc:`FloatingPointError`" msgstr ":exc:`FloatingPointError`" -#: c-api/exceptions.rst:881 +#: c-api/exceptions.rst:946 msgid ":c:data:`PyExc_GeneratorExit`" msgstr ":c:data:`PyExc_GeneratorExit`" -#: c-api/exceptions.rst:881 +#: c-api/exceptions.rst:946 msgid ":exc:`GeneratorExit`" msgstr ":exc:`GeneratorExit`" -#: c-api/exceptions.rst:883 +#: c-api/exceptions.rst:948 msgid ":c:data:`PyExc_ImportError`" msgstr ":c:data:`PyExc_ImportError`" -#: c-api/exceptions.rst:883 +#: c-api/exceptions.rst:948 msgid ":exc:`ImportError`" msgstr ":exc:`ImportError`" -#: c-api/exceptions.rst:885 +#: c-api/exceptions.rst:950 msgid ":c:data:`PyExc_IndentationError`" msgstr ":c:data:`PyExc_IndentationError`" -#: c-api/exceptions.rst:885 +#: c-api/exceptions.rst:950 msgid ":exc:`IndentationError`" msgstr ":exc:`IndentationError`" -#: c-api/exceptions.rst:887 +#: c-api/exceptions.rst:952 msgid ":c:data:`PyExc_IndexError`" msgstr ":c:data:`PyExc_IndexError`" -#: c-api/exceptions.rst:887 +#: c-api/exceptions.rst:952 msgid ":exc:`IndexError`" msgstr ":exc:`IndexError`" -#: c-api/exceptions.rst:889 +#: c-api/exceptions.rst:954 msgid ":c:data:`PyExc_InterruptedError`" msgstr ":c:data:`PyExc_InterruptedError`" -#: c-api/exceptions.rst:889 +#: c-api/exceptions.rst:954 msgid ":exc:`InterruptedError`" msgstr ":exc:`InterruptedError`" -#: c-api/exceptions.rst:891 +#: c-api/exceptions.rst:956 msgid ":c:data:`PyExc_IsADirectoryError`" msgstr ":c:data:`PyExc_IsADirectoryError`" -#: c-api/exceptions.rst:891 +#: c-api/exceptions.rst:956 msgid ":exc:`IsADirectoryError`" msgstr ":exc:`IsADirectoryError`" -#: c-api/exceptions.rst:893 +#: c-api/exceptions.rst:958 msgid ":c:data:`PyExc_KeyError`" msgstr ":c:data:`PyExc_KeyError`" -#: c-api/exceptions.rst:893 +#: c-api/exceptions.rst:958 msgid ":exc:`KeyError`" msgstr ":exc:`KeyError`" -#: c-api/exceptions.rst:895 +#: c-api/exceptions.rst:960 msgid ":c:data:`PyExc_KeyboardInterrupt`" msgstr ":c:data:`PyExc_KeyboardInterrupt`" -#: c-api/exceptions.rst:895 +#: c-api/exceptions.rst:960 msgid ":exc:`KeyboardInterrupt`" msgstr ":exc:`KeyboardInterrupt`" -#: c-api/exceptions.rst:897 +#: c-api/exceptions.rst:962 msgid ":c:data:`PyExc_LookupError`" msgstr ":c:data:`PyExc_LookupError`" -#: c-api/exceptions.rst:897 +#: c-api/exceptions.rst:962 msgid ":exc:`LookupError`" msgstr ":exc:`LookupError`" -#: c-api/exceptions.rst:899 +#: c-api/exceptions.rst:964 msgid ":c:data:`PyExc_MemoryError`" msgstr ":c:data:`PyExc_MemoryError`" -#: c-api/exceptions.rst:899 +#: c-api/exceptions.rst:964 msgid ":exc:`MemoryError`" msgstr ":exc:`MemoryError`" -#: c-api/exceptions.rst:901 +#: c-api/exceptions.rst:966 #, fuzzy msgid ":c:data:`PyExc_ModuleNotFoundError`" msgstr ":c:data:`PyExc_ModuleNotFoundError`." -#: c-api/exceptions.rst:901 +#: c-api/exceptions.rst:966 msgid ":exc:`ModuleNotFoundError`" -msgstr "" +msgstr ":exc:`ModuleNotFoundError`" -#: c-api/exceptions.rst:903 +#: c-api/exceptions.rst:968 msgid ":c:data:`PyExc_NameError`" msgstr ":c:data:`PyExc_NameError`" -#: c-api/exceptions.rst:903 +#: c-api/exceptions.rst:968 msgid ":exc:`NameError`" msgstr ":exc:`NameError`" -#: c-api/exceptions.rst:905 +#: c-api/exceptions.rst:970 msgid ":c:data:`PyExc_NotADirectoryError`" msgstr ":c:data:`PyExc_NotADirectoryError`" -#: c-api/exceptions.rst:905 +#: c-api/exceptions.rst:970 msgid ":exc:`NotADirectoryError`" msgstr ":exc:`NotADirectoryError`" -#: c-api/exceptions.rst:907 +#: c-api/exceptions.rst:972 msgid ":c:data:`PyExc_NotImplementedError`" msgstr ":c:data:`PyExc_NotImplementedError`" -#: c-api/exceptions.rst:907 +#: c-api/exceptions.rst:972 msgid ":exc:`NotImplementedError`" msgstr ":exc:`NotImplementedError`" -#: c-api/exceptions.rst:909 +#: c-api/exceptions.rst:974 msgid ":c:data:`PyExc_OSError`" msgstr ":c:data:`PyExc_OSError`" -#: c-api/exceptions.rst:909 +#: c-api/exceptions.rst:974 msgid ":exc:`OSError`" msgstr ":exc:`OSError`" -#: c-api/exceptions.rst:911 +#: c-api/exceptions.rst:976 msgid ":c:data:`PyExc_OverflowError`" msgstr ":c:data:`PyExc_OverflowError`" -#: c-api/exceptions.rst:911 +#: c-api/exceptions.rst:976 msgid ":exc:`OverflowError`" msgstr ":exc:`OverflowError`" -#: c-api/exceptions.rst:913 +#: c-api/exceptions.rst:978 msgid ":c:data:`PyExc_PermissionError`" msgstr ":c:data:`PyExc_PermissionError`" -#: c-api/exceptions.rst:913 +#: c-api/exceptions.rst:978 msgid ":exc:`PermissionError`" msgstr ":exc:`PermissionError`" -#: c-api/exceptions.rst:915 +#: c-api/exceptions.rst:980 msgid ":c:data:`PyExc_ProcessLookupError`" msgstr ":c:data:`PyExc_ProcessLookupError`" -#: c-api/exceptions.rst:915 +#: c-api/exceptions.rst:980 msgid ":exc:`ProcessLookupError`" msgstr ":exc:`ProcessLookupError`" -#: c-api/exceptions.rst:917 +#: c-api/exceptions.rst:982 msgid ":c:data:`PyExc_RecursionError`" msgstr ":c:data:`PyExc_ReferenceError`" -#: c-api/exceptions.rst:917 +#: c-api/exceptions.rst:982 msgid ":exc:`RecursionError`" -msgstr "" +msgstr ":exc:`RecursionError`" -#: c-api/exceptions.rst:919 +#: c-api/exceptions.rst:984 msgid ":c:data:`PyExc_ReferenceError`" msgstr ":c:data:`PyExc_ReferenceError`" -#: c-api/exceptions.rst:919 +#: c-api/exceptions.rst:984 msgid ":exc:`ReferenceError`" msgstr ":exc:`ReferenceError`" -#: c-api/exceptions.rst:919 -msgid "\\(2)" -msgstr "\\(2)" - -#: c-api/exceptions.rst:921 +#: c-api/exceptions.rst:986 msgid ":c:data:`PyExc_RuntimeError`" msgstr ":c:data:`PyExc_RuntimeError`" -#: c-api/exceptions.rst:921 +#: c-api/exceptions.rst:986 msgid ":exc:`RuntimeError`" msgstr ":exc:`RuntimeError`" -#: c-api/exceptions.rst:923 +#: c-api/exceptions.rst:988 msgid ":c:data:`PyExc_StopAsyncIteration`" msgstr ":c:data:`PyExc_StopAsyncIteration`" -#: c-api/exceptions.rst:923 +#: c-api/exceptions.rst:988 msgid ":exc:`StopAsyncIteration`" msgstr ":exc:`StopAsyncIteration`" -#: c-api/exceptions.rst:925 +#: c-api/exceptions.rst:990 msgid ":c:data:`PyExc_StopIteration`" msgstr ":c:data:`PyExc_StopIteration`" -#: c-api/exceptions.rst:925 +#: c-api/exceptions.rst:990 msgid ":exc:`StopIteration`" msgstr ":exc:`StopIteration`" -#: c-api/exceptions.rst:927 +#: c-api/exceptions.rst:992 msgid ":c:data:`PyExc_SyntaxError`" msgstr ":c:data:`PyExc_SyntaxError`" -#: c-api/exceptions.rst:927 +#: c-api/exceptions.rst:992 msgid ":exc:`SyntaxError`" msgstr ":exc:`SyntaxError`" -#: c-api/exceptions.rst:929 +#: c-api/exceptions.rst:994 msgid ":c:data:`PyExc_SystemError`" msgstr ":c:data:`PyExc_SystemError`" -#: c-api/exceptions.rst:929 +#: c-api/exceptions.rst:994 msgid ":exc:`SystemError`" msgstr ":exc:`SystemError`" -#: c-api/exceptions.rst:931 +#: c-api/exceptions.rst:996 msgid ":c:data:`PyExc_SystemExit`" msgstr ":c:data:`PyExc_SystemExit`" -#: c-api/exceptions.rst:931 +#: c-api/exceptions.rst:996 msgid ":exc:`SystemExit`" msgstr ":exc:`SystemExit`" -#: c-api/exceptions.rst:933 +#: c-api/exceptions.rst:998 msgid ":c:data:`PyExc_TabError`" msgstr ":c:data:`PyExc_TabError`" -#: c-api/exceptions.rst:933 +#: c-api/exceptions.rst:998 msgid ":exc:`TabError`" msgstr ":exc:`TabError`" -#: c-api/exceptions.rst:935 +#: c-api/exceptions.rst:1000 msgid ":c:data:`PyExc_TimeoutError`" msgstr ":c:data:`PyExc_ImportError`" -#: c-api/exceptions.rst:935 +#: c-api/exceptions.rst:1000 msgid ":exc:`TimeoutError`" msgstr ":exc:`TimeoutError`" -#: c-api/exceptions.rst:937 +#: c-api/exceptions.rst:1002 msgid ":c:data:`PyExc_TypeError`" msgstr ":c:data:`PyExc_TypeError`" -#: c-api/exceptions.rst:937 +#: c-api/exceptions.rst:1002 msgid ":exc:`TypeError`" msgstr ":exc:`TypeError`" -#: c-api/exceptions.rst:939 +#: c-api/exceptions.rst:1004 msgid ":c:data:`PyExc_UnboundLocalError`" msgstr ":c:data:`PyExc_UnboundLocalError`" -#: c-api/exceptions.rst:939 +#: c-api/exceptions.rst:1004 msgid ":exc:`UnboundLocalError`" msgstr ":exc:`UnboundLocalError`" -#: c-api/exceptions.rst:941 +#: c-api/exceptions.rst:1006 msgid ":c:data:`PyExc_UnicodeDecodeError`" msgstr ":c:data:`PyExc_UnicodeDecodeError`" -#: c-api/exceptions.rst:941 +#: c-api/exceptions.rst:1006 msgid ":exc:`UnicodeDecodeError`" msgstr ":exc:`UnicodeDecodeError`" -#: c-api/exceptions.rst:943 +#: c-api/exceptions.rst:1008 msgid ":c:data:`PyExc_UnicodeEncodeError`" msgstr ":c:data:`PyExc_UnicodeEncodeError`" -#: c-api/exceptions.rst:943 +#: c-api/exceptions.rst:1008 msgid ":exc:`UnicodeEncodeError`" msgstr ":exc:`UnicodeEncodeError`" -#: c-api/exceptions.rst:945 +#: c-api/exceptions.rst:1010 msgid ":c:data:`PyExc_UnicodeError`" msgstr ":c:data:`PyExc_UnicodeError`" -#: c-api/exceptions.rst:945 +#: c-api/exceptions.rst:1010 msgid ":exc:`UnicodeError`" msgstr ":exc:`UnicodeError`" -#: c-api/exceptions.rst:947 +#: c-api/exceptions.rst:1012 msgid ":c:data:`PyExc_UnicodeTranslateError`" msgstr ":c:data:`PyExc_UnicodeTranslateError`" -#: c-api/exceptions.rst:947 +#: c-api/exceptions.rst:1012 msgid ":exc:`UnicodeTranslateError`" msgstr ":exc:`UnicodeTranslateError`" -#: c-api/exceptions.rst:949 +#: c-api/exceptions.rst:1014 msgid ":c:data:`PyExc_ValueError`" msgstr ":c:data:`PyExc_ValueError`" -#: c-api/exceptions.rst:949 +#: c-api/exceptions.rst:1014 msgid ":exc:`ValueError`" msgstr ":exc:`ValueError`" -#: c-api/exceptions.rst:951 +#: c-api/exceptions.rst:1016 msgid ":c:data:`PyExc_ZeroDivisionError`" msgstr ":c:data:`PyExc_ZeroDivisionError`" -#: c-api/exceptions.rst:951 +#: c-api/exceptions.rst:1016 msgid ":exc:`ZeroDivisionError`" msgstr ":exc:`ZeroDivisionError`" -#: c-api/exceptions.rst:954 +#: c-api/exceptions.rst:1019 msgid "" ":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" "`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" @@ -1285,57 +1347,57 @@ msgid "" "`PyExc_TimeoutError` were introduced following :pep:`3151`." msgstr "" -#: c-api/exceptions.rst:964 +#: c-api/exceptions.rst:1029 msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." msgstr ":c:data:`PyExc_StopAsyncIteration` et :c:data:`PyExc_RecursionError`." -#: c-api/exceptions.rst:967 +#: c-api/exceptions.rst:1032 msgid ":c:data:`PyExc_ModuleNotFoundError`." msgstr ":c:data:`PyExc_ModuleNotFoundError`." -#: c-api/exceptions.rst:970 +#: c-api/exceptions.rst:1035 msgid "These are compatibility aliases to :c:data:`PyExc_OSError`:" msgstr "" -#: c-api/exceptions.rst:980 +#: c-api/exceptions.rst:1045 msgid ":c:data:`PyExc_EnvironmentError`" msgstr ":c:data:`PyExc_EnvironmentError`" -#: c-api/exceptions.rst:982 +#: c-api/exceptions.rst:1047 msgid ":c:data:`PyExc_IOError`" msgstr ":c:data:`PyExc_IOError`" -#: c-api/exceptions.rst:984 +#: c-api/exceptions.rst:1049 msgid ":c:data:`PyExc_WindowsError`" msgstr ":c:data:`PyExc_WindowsError`" -#: c-api/exceptions.rst:984 -msgid "\\(3)" -msgstr "\\(3)" +#: c-api/exceptions.rst:1049 +msgid "[2]_" +msgstr "" -#: c-api/exceptions.rst:987 +#: c-api/exceptions.rst:1052 msgid "These aliases used to be separate exception types." msgstr "" -#: c-api/exceptions.rst:1051 +#: c-api/exceptions.rst:1116 msgid "Notes:" msgstr "Notes :" -#: c-api/exceptions.rst:993 +#: c-api/exceptions.rst:1058 msgid "This is a base class for other standard exceptions." msgstr "C'est la classe de base pour les autres exceptions standards." -#: c-api/exceptions.rst:996 +#: c-api/exceptions.rst:1061 msgid "" "Only defined on Windows; protect code that uses this by testing that the " "preprocessor macro ``MS_WINDOWS`` is defined." msgstr "" -#: c-api/exceptions.rst:1002 +#: c-api/exceptions.rst:1067 msgid "Standard Warning Categories" msgstr "" -#: c-api/exceptions.rst:1004 +#: c-api/exceptions.rst:1069 msgid "" "All standard Python warning categories are available as global variables " "whose names are ``PyExc_`` followed by the Python exception name. These have " @@ -1343,98 +1405,111 @@ msgid "" "here are all the variables:" msgstr "" -#: c-api/exceptions.rst:1025 +#: c-api/exceptions.rst:1090 msgid ":c:data:`PyExc_Warning`" msgstr ":c:data:`PyExc_Warning`" -#: c-api/exceptions.rst:1025 +#: c-api/exceptions.rst:1090 msgid ":exc:`Warning`" msgstr ":exc:`Warning`" -#: c-api/exceptions.rst:1027 +#: c-api/exceptions.rst:1090 +msgid "[3]_" +msgstr "" + +#: c-api/exceptions.rst:1092 msgid ":c:data:`PyExc_BytesWarning`" msgstr ":c:data:`PyExc_BytesWarning`" -#: c-api/exceptions.rst:1027 +#: c-api/exceptions.rst:1092 msgid ":exc:`BytesWarning`" msgstr ":exc:`BytesWarning`" -#: c-api/exceptions.rst:1029 +#: c-api/exceptions.rst:1094 msgid ":c:data:`PyExc_DeprecationWarning`" msgstr ":c:data:`PyExc_DeprecationWarning`" -#: c-api/exceptions.rst:1029 +#: c-api/exceptions.rst:1094 msgid ":exc:`DeprecationWarning`" msgstr ":exc:`DeprecationWarning`" -#: c-api/exceptions.rst:1031 +#: c-api/exceptions.rst:1096 msgid ":c:data:`PyExc_FutureWarning`" msgstr ":c:data:`PyExc_FutureWarning`" -#: c-api/exceptions.rst:1031 +#: c-api/exceptions.rst:1096 msgid ":exc:`FutureWarning`" msgstr ":exc:`FutureWarning`" -#: c-api/exceptions.rst:1033 +#: c-api/exceptions.rst:1098 msgid ":c:data:`PyExc_ImportWarning`" msgstr ":c:data:`PyExc_ImportWarning`" -#: c-api/exceptions.rst:1033 +#: c-api/exceptions.rst:1098 msgid ":exc:`ImportWarning`" msgstr ":exc:`ImportWarning`" -#: c-api/exceptions.rst:1035 +#: c-api/exceptions.rst:1100 msgid ":c:data:`PyExc_PendingDeprecationWarning`" msgstr ":c:data:`PyExc_PendingDeprecationWarning`" -#: c-api/exceptions.rst:1035 +#: c-api/exceptions.rst:1100 msgid ":exc:`PendingDeprecationWarning`" msgstr ":exc:`PendingDeprecationWarning`" -#: c-api/exceptions.rst:1037 +#: c-api/exceptions.rst:1102 msgid ":c:data:`PyExc_ResourceWarning`" msgstr ":c:data:`PyExc_ResourceWarning`" -#: c-api/exceptions.rst:1037 +#: c-api/exceptions.rst:1102 msgid ":exc:`ResourceWarning`" msgstr ":exc:`ResourceWarning`" -#: c-api/exceptions.rst:1039 +#: c-api/exceptions.rst:1104 msgid ":c:data:`PyExc_RuntimeWarning`" msgstr ":c:data:`PyExc_RuntimeWarning`" -#: c-api/exceptions.rst:1039 +#: c-api/exceptions.rst:1104 msgid ":exc:`RuntimeWarning`" msgstr ":exc:`RuntimeWarning`" -#: c-api/exceptions.rst:1041 +#: c-api/exceptions.rst:1106 msgid ":c:data:`PyExc_SyntaxWarning`" msgstr ":c:data:`PyExc_SyntaxWarning`" -#: c-api/exceptions.rst:1041 +#: c-api/exceptions.rst:1106 msgid ":exc:`SyntaxWarning`" msgstr ":exc:`SyntaxWarning`" -#: c-api/exceptions.rst:1043 +#: c-api/exceptions.rst:1108 msgid ":c:data:`PyExc_UnicodeWarning`" msgstr ":c:data:`PyExc_UnicodeWarning`" -#: c-api/exceptions.rst:1043 +#: c-api/exceptions.rst:1108 msgid ":exc:`UnicodeWarning`" msgstr ":exc:`UnicodeWarning`" -#: c-api/exceptions.rst:1045 +#: c-api/exceptions.rst:1110 msgid ":c:data:`PyExc_UserWarning`" msgstr ":c:data:`PyExc_UserWarning`" -#: c-api/exceptions.rst:1045 +#: c-api/exceptions.rst:1110 msgid ":exc:`UserWarning`" msgstr ":exc:`UserWarning`" -#: c-api/exceptions.rst:1048 +#: c-api/exceptions.rst:1113 msgid ":c:data:`PyExc_ResourceWarning`." msgstr ":c:data:`PyExc_ResourceWarning`." -#: c-api/exceptions.rst:1054 +#: c-api/exceptions.rst:1119 msgid "This is a base class for other standard warning categories." msgstr "C'est la classe de base pour les autres catégories de *warning*." + +#~ msgid "\\(1)" +#~ msgstr "\\(1)" + +#~ msgid "\\(2)" +#~ msgstr "\\(2)" + +#~ msgid "\\(3)" +#~ msgstr "\\(3)" diff --git a/c-api/file.po b/c-api/file.po index 02cf0b7a6a..37f2ce1a5a 100644 --- a/c-api/file.po +++ b/c-api/file.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-03-19 16:59+0100\n" -"PO-Revision-Date: 2018-10-18 09:48+0200\n" +"PO-Revision-Date: 2021-12-11 12:00+0100\n" "Last-Translator: \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -37,7 +37,7 @@ msgstr "" "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 " +"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." diff --git a/c-api/float.po b/c-api/float.po index 7f8321515e..d7598b3b78 100644 --- a/c-api/float.po +++ b/c-api/float.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: 2019-01-14 15:30+0100\n" "Last-Translator: ANTOINE FOURES \n" "Language-Team: FRENCH \n" @@ -123,6 +123,122 @@ msgstr "" "Renvoie le nombre à virgule flottante minimal normalisé *DBL_MIN* sous la " "forme :c:type:`double` en C." +#: c-api/float.rst:82 +msgid "Pack and Unpack functions" +msgstr "" + +#: c-api/float.rst:84 +msgid "" +"The pack and unpack functions provide an efficient platform-independent way " +"to store floating-point values as byte strings. The Pack routines produce a " +"bytes string from a C :c:type:`double`, and the Unpack routines produce a C :" +"c:type:`double` from such a bytes string. The suffix (2, 4 or 8) specifies " +"the number of bytes in the bytes string." +msgstr "" + +#: c-api/float.rst:90 +msgid "" +"On platforms that appear to use IEEE 754 formats these functions work by " +"copying bits. On other platforms, the 2-byte format is identical to the IEEE " +"754 binary16 half-precision format, the 4-byte format (32-bit) is identical " +"to the IEEE 754 binary32 single precision format, and the 8-byte format to " +"the IEEE 754 binary64 double precision format, although the packing of INFs " +"and NaNs (if such things exist on the platform) isn't handled correctly, and " +"attempting to unpack a bytes string containing an IEEE INF or NaN will raise " +"an exception." +msgstr "" + +#: c-api/float.rst:99 +msgid "" +"On non-IEEE platforms with more precision, or larger dynamic range, than " +"IEEE 754 supports, not all values can be packed; on non-IEEE platforms with " +"less precision, or smaller dynamic range, not all values can be unpacked. " +"What happens in such cases is partly accidental (alas)." +msgstr "" + +#: c-api/float.rst:107 +msgid "Pack functions" +msgstr "" + +#: c-api/float.rst:109 +msgid "" +"The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is an :c:type:" +"`int` argument, non-zero if you want the bytes string in little-endian " +"format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` ``p+7``), zero if you " +"want big-endian format (exponent first, at *p*). The :c:data:`PY_BIG_ENDIAN` " +"constant can be used to use the native endian: it is equal to ``1`` on big " +"endian processor, or ``0`` on little endian processor." +msgstr "" + +#: c-api/float.rst:116 +msgid "" +"Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set, " +"most likely :exc:`OverflowError`)." +msgstr "" + +#: c-api/float.rst:119 +msgid "There are two problems on non-IEEE platforms:" +msgstr "" + +#: c-api/float.rst:121 +msgid "What this does is undefined if *x* is a NaN or infinity." +msgstr "" + +#: c-api/float.rst:122 +msgid "``-0.0`` and ``+0.0`` produce the same bytes string." +msgstr "" + +#: c-api/float.rst:126 +msgid "Pack a C double as the IEEE 754 binary16 half-precision format." +msgstr "" + +#: c-api/float.rst:130 +msgid "Pack a C double as the IEEE 754 binary32 single precision format." +msgstr "" + +#: c-api/float.rst:134 +msgid "Pack a C double as the IEEE 754 binary64 double precision format." +msgstr "" + +#: c-api/float.rst:138 +msgid "Unpack functions" +msgstr "" + +#: c-api/float.rst:140 +msgid "" +"The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is an :c:" +"type:`int` argument, non-zero if the bytes string is in little-endian format " +"(exponent last, at ``p+1``, ``p+3`` or ``p+6`` and ``p+7``), zero if big-" +"endian (exponent first, at *p*). The :c:data:`PY_BIG_ENDIAN` constant can be " +"used to use the native endian: it is equal to ``1`` on big endian processor, " +"or ``0`` on little endian processor." +msgstr "" + +#: c-api/float.rst:147 +msgid "" +"Return value: The unpacked double. On error, this is ``-1.0`` and :c:func:" +"`PyErr_Occurred` is true (and an exception is set, most likely :exc:" +"`OverflowError`)." +msgstr "" + +#: c-api/float.rst:151 +msgid "" +"Note that on a non-IEEE platform this will refuse to unpack a bytes string " +"that represents a NaN or infinity." +msgstr "" + +#: c-api/float.rst:156 +msgid "Unpack the IEEE 754 binary16 half-precision format as a C double." +msgstr "" + +#: c-api/float.rst:160 +msgid "Unpack the IEEE 754 binary32 single precision format as a C double." +msgstr "" + +#: c-api/float.rst:164 +msgid "Unpack the IEEE 754 binary64 double precision format as a C double." +msgstr "" + #~ msgid "" #~ "Clear the float free list. Return the number of items that could not be " #~ "freed." diff --git a/c-api/frame.po b/c-api/frame.po new file mode 100644 index 0000000000..2476acc6f4 --- /dev/null +++ b/c-api/frame.po @@ -0,0 +1,106 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001-2022, Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.11\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-05-23 00:48+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/frame.rst:4 +msgid "Frame Objects" +msgstr "" + +#: c-api/frame.rst:8 +msgid "The C structure of the objects used to describe frame objects." +msgstr "" + +#: c-api/frame.rst:10 +msgid "There are no public members in this structure." +msgstr "" + +#: c-api/frame.rst:12 +msgid "" +"The members of this structure were removed from the public C API. Refer to " +"the :ref:`What's New entry ` for details." +msgstr "" + +#: c-api/frame.rst:17 +msgid "" +"The :c:func:`PyEval_GetFrame` and :c:func:`PyThreadState_GetFrame` functions " +"can be used to get a frame object." +msgstr "" + +#: c-api/frame.rst:20 +msgid "See also :ref:`Reflection `." +msgstr "" + +#: c-api/frame.rst:25 +msgid "Get the *frame* next outer frame." +msgstr "" + +#: c-api/frame.rst:27 +msgid "" +"Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer frame." +msgstr "" + +#: c-api/frame.rst:35 +msgid "Get the *frame*'s ``f_builtins`` attribute." +msgstr "" + +#: c-api/frame.rst:68 +msgid "Return a :term:`strong reference`. The result cannot be ``NULL``." +msgstr "" + +#: c-api/frame.rst:44 +msgid "Get the *frame* code." +msgstr "" + +#: c-api/frame.rst:86 +msgid "Return a :term:`strong reference`." +msgstr "" + +#: c-api/frame.rst:48 +msgid "The result (frame code) cannot be ``NULL``." +msgstr "" + +#: c-api/frame.rst:55 +msgid "" +"Get the generator, coroutine, or async generator that owns this frame, or " +"``NULL`` if this frame is not owned by a generator. Does not raise an " +"exception, even if the return value is ``NULL``." +msgstr "" + +#: c-api/frame.rst:59 +msgid "Return a :term:`strong reference`, or ``NULL``." +msgstr "" + +#: c-api/frame.rst:66 +msgid "Get the *frame*'s ``f_globals`` attribute." +msgstr "" + +#: c-api/frame.rst:75 +msgid "Get the *frame*'s ``f_lasti`` attribute." +msgstr "" + +#: c-api/frame.rst:77 +msgid "Returns -1 if ``frame.f_lasti`` is ``None``." +msgstr "" + +#: c-api/frame.rst:84 +msgid "Get the *frame*'s ``f_locals`` attribute (:class:`dict`)." +msgstr "" + +#: c-api/frame.rst:93 +msgid "Return the line number that *frame* is currently executing." +msgstr "" diff --git a/c-api/function.po b/c-api/function.po index c60e6d04a3..3b6b017e79 100644 --- a/c-api/function.po +++ b/c-api/function.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -52,67 +52,72 @@ 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." +"the code object's ``co_qualname`` field." msgstr "" -#: c-api/function.rst:44 +#: c-api/function.rst:45 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." +"value as the code object's ``co_qualname`` field." msgstr "" -#: c-api/function.rst:54 +#: c-api/function.rst:55 msgid "Return the code object associated with the function object *op*." msgstr "" -#: c-api/function.rst:59 +#: c-api/function.rst:60 msgid "Return the globals dictionary associated with the function object *op*." msgstr "" -#: c-api/function.rst:64 +#: c-api/function.rst:65 msgid "" -"Return the *__module__* attribute of the function object *op*. This is " -"normally a string containing the module name, but can be set to any other " -"object by Python code." +"Return a :term:`borrowed reference` to the *__module__* attribute of the " +"function object *op*. It can be *NULL*." msgstr "" -#: c-api/function.rst:71 +#: c-api/function.rst:68 +msgid "" +"This is normally a string containing the module name, but can be set to any " +"other object by Python code." +msgstr "" + +#: c-api/function.rst:74 msgid "" "Return the argument default values of the function object *op*. This can be " "a tuple of arguments or ``NULL``." msgstr "" -#: c-api/function.rst:77 +#: c-api/function.rst:80 msgid "" "Set the argument default values for the function object *op*. *defaults* " "must be ``Py_None`` or a tuple." msgstr "" -#: c-api/function.rst:94 c-api/function.rst:108 +#: c-api/function.rst:97 c-api/function.rst:111 msgid "Raises :exc:`SystemError` and returns ``-1`` on failure." msgstr "" -#: c-api/function.rst:85 +#: c-api/function.rst:88 msgid "" "Return the closure associated with the function object *op*. This can be " "``NULL`` or a tuple of cell objects." msgstr "" -#: c-api/function.rst:91 +#: c-api/function.rst:94 msgid "" "Set the closure associated with the function object *op*. *closure* must be " "``Py_None`` or a tuple of cell objects." msgstr "" -#: c-api/function.rst:99 +#: c-api/function.rst:102 msgid "" "Return the annotations of the function object *op*. This can be a mutable " "dictionary or ``NULL``." msgstr "" -#: c-api/function.rst:105 +#: c-api/function.rst:108 msgid "" "Set the annotations for the function object *op*. *annotations* must be a " "dictionary or ``Py_None``." diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index 7d02c6dea7..cc0eb5ffcc 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-29 16:33+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -21,11 +21,11 @@ msgstr "" #: c-api/gcsupport.rst:8 msgid "" "Python's support for detecting and collecting garbage which involves " -"circular references requires support from object types which are \"containers" -"\" for other objects which may also be containers. Types which do not store " -"references to other objects, or which only store references to atomic types " -"(such as numbers or strings), do not need to provide any explicit support " -"for garbage collection." +"circular references requires support from object types which are " +"\"containers\" for other objects which may also be containers. Types which " +"do not store references to other objects, or which only store references to " +"atomic types (such as numbers or strings), do not need to provide any " +"explicit support for garbage collection." msgstr "" #: c-api/gcsupport.rst:15 @@ -60,14 +60,31 @@ msgid "" "initialized, it must call :c:func:`PyObject_GC_Track`." msgstr "" -#: c-api/gcsupport.rst:37 +#: 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:41 +#: 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 " @@ -78,26 +95,26 @@ msgid "" "include the :const:`Py_TPFLAGS_HAVE_GC` flag." msgstr "" -#: c-api/gcsupport.rst:51 +#: 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:57 +#: 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:63 +#: 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:69 +#: 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 " @@ -106,55 +123,38 @@ msgid "" "usually near the end of the constructor." msgstr "" -#: c-api/gcsupport.rst:78 +#: 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:81 +#: 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:86 +#: 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:89 +#: c-api/gcsupport.rst:97 msgid "This is analogous to the Python function :func:`gc.is_tracked`." msgstr "" -#: c-api/gcsupport.rst:96 +#: 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:99 +#: c-api/gcsupport.rst:107 msgid "This is analogous to the Python function :func:`gc.is_finalized`." msgstr "" -#: c-api/gcsupport.rst:103 -msgid "" -"Similarly, the deallocator for the object must conform to a similar pair of " -"rules:" -msgstr "" - -#: c-api/gcsupport.rst:106 -msgid "" -"Before fields which refer to other containers are invalidated, :c:func:" -"`PyObject_GC_UnTrack` must be called." -msgstr "" - -#: c-api/gcsupport.rst:109 -msgid "" -"The object's memory must be deallocated using :c:func:`PyObject_GC_Del`." -msgstr "" - #: c-api/gcsupport.rst:114 msgid "" "Releases memory allocated to an object using :c:func:`PyObject_GC_New` or :c:" @@ -239,3 +239,45 @@ msgid "" "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/import.po b/c-api/import.po index 339895db92..6bb854630a 100644 --- a/c-api/import.po +++ b/c-api/import.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -270,7 +270,13 @@ msgid "" "h`, is::" msgstr "" -#: c-api/import.rst:264 +#: c-api/import.rst:262 +msgid "" +"The new ``is_package`` field indicates whether the module is a package or " +"not. This replaces setting the ``size`` field to a negative value." +msgstr "" + +#: c-api/import.rst:268 msgid "" "This pointer is initialized to point to an array of :c:type:`struct _frozen` " "records, terminated by one whose members are all ``NULL`` or zero. When a " @@ -284,7 +290,7 @@ msgstr "" "tableau. Du code tiers peut jouer avec pour construire dynamiquement une " "collection de module figés." -#: c-api/import.rst:272 +#: c-api/import.rst:276 msgid "" "Add a single module to the existing table of built-in modules. This is a " "convenience wrapper around :c:func:`PyImport_ExtendInittab`, returning " @@ -294,7 +300,7 @@ msgid "" "before :c:func:`Py_Initialize`." msgstr "" -#: c-api/import.rst:282 +#: c-api/import.rst:286 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 " @@ -304,13 +310,20 @@ msgid "" "structure is defined in :file:`Include/import.h` as::" msgstr "" -#: c-api/import.rst:297 +#: c-api/import.rst:301 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 should be called before :c:func:" +"are added to the internal table. This must be called before :c:func:" "`Py_Initialize`." msgstr "" + +#: c-api/import.rst:308 +msgid "" +"If Python is initialized multiple times, :c:func:`PyImport_AppendInittab` " +"or :c:func:`PyImport_ExtendInittab` must be called before each Python " +"initialization." +msgstr "" diff --git a/c-api/init.po b/c-api/init.po index 5da8f220de..591bb0db6a 100644 --- a/c-api/init.po +++ b/c-api/init.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2018-11-29 18:22+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -233,7 +233,7 @@ msgid "" msgstr "" #: c-api/init.rst:113 -msgid "Private flag used by ``_freeze_importlib`` and ``frozenmain`` programs." +msgid "Private flag used by ``_freeze_module`` and ``frozenmain`` programs." msgstr "" #: c-api/init.rst:117 @@ -289,42 +289,43 @@ msgstr "" #: c-api/init.rst:154 msgid "" -"If the flag is non-zero, use the ``mbcs`` encoding instead of the UTF-8 " -"encoding for the filesystem encoding." +"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:157 +#: 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:160 +#: 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:174 +#: c-api/init.rst:175 msgid ":ref:`Availability `: Windows." msgstr ":ref:`Disponibilité ` : Windows." -#: c-api/init.rst:166 +#: 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:169 +#: 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:172 +#: 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:178 +#: 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 " @@ -336,11 +337,11 @@ msgstr "" "mod:`site` est importé explicitement plus tard (appelez :func:`site.main` si " "vous voulez les déclencher)." -#: c-api/init.rst:183 +#: c-api/init.rst:184 msgid "Set by the :option:`-S` option." msgstr "" -#: c-api/init.rst:187 +#: c-api/init.rst:188 msgid "" "Don't add the :data:`user site-packages directory ` to :data:" "`sys.path`." @@ -348,38 +349,38 @@ msgstr "" "N'ajoute pas le répertoire utilisateur :data:`site-packages ` à :data:`sys.path`." -#: c-api/init.rst:190 +#: 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:195 +#: c-api/init.rst:196 msgid "" "Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment " "variable." msgstr "" -#: c-api/init.rst:200 +#: 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:202 +#: c-api/init.rst:203 msgid "Set by the :option:`-q` option." msgstr "" -#: c-api/init.rst:208 +#: c-api/init.rst:209 msgid "Force the stdout and stderr streams to be unbuffered." msgstr "" -#: c-api/init.rst:210 +#: c-api/init.rst:211 msgid "" "Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED` " "environment variable." msgstr "" -#: c-api/init.rst:215 +#: 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 " @@ -387,24 +388,24 @@ msgid "" "for a module. Also provides information on module cleanup at exit." msgstr "" -#: c-api/init.rst:220 +#: c-api/init.rst:221 msgid "" "Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment " "variable." msgstr "" -#: c-api/init.rst:225 +#: c-api/init.rst:226 msgid "Initializing and finalizing the interpreter" msgstr "" -#: c-api/init.rst:243 +#: 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:247 +#: 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 " @@ -414,27 +415,27 @@ msgid "" "There is no return value; it is a fatal error if the initialization fails." msgstr "" -#: c-api/init.rst:256 +#: 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:262 +#: 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:269 +#: 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:276 +#: 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:" @@ -446,7 +447,7 @@ msgid "" "(flushing buffered data), ``-1`` is returned." msgstr "" -#: c-api/init.rst:285 +#: 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 " @@ -457,7 +458,7 @@ msgid "" "Python before exiting from the application." msgstr "" -#: c-api/init.rst:293 +#: 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) " @@ -472,60 +473,74 @@ msgid "" "than once." msgstr "" -#: c-api/init.rst:304 +#: c-api/init.rst:305 msgid "" "Raises an :ref:`auditing event ` ``cpython." "_PySys_ClearAuditHooks`` with no arguments." msgstr "" -#: c-api/init.rst:310 +#: 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:315 +#: c-api/init.rst:316 msgid "Process-wide parameters" msgstr "" -#: c-api/init.rst:325 +#: c-api/init.rst:326 +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"stdio_encoding` and :c:member:`PyConfig.stdio_errors` should be used " +"instead, see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/init.rst:331 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:329 +#: c-api/init.rst:335 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:332 +#: c-api/init.rst:338 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:336 +#: c-api/init.rst:342 msgid "" "Note that :data:`sys.stderr` always uses the \"backslashreplace\" error " "handler, regardless of this (or any other) setting." msgstr "" -#: c-api/init.rst:339 +#: c-api/init.rst:345 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:342 +#: c-api/init.rst:348 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:355 +#: c-api/init.rst:363 +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"program_name` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +#: c-api/init.rst:367 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 " @@ -539,20 +554,30 @@ msgid "" "this storage." msgstr "" -#: c-api/init.rst:480 c-api/init.rst:613 c-api/init.rst:630 +#: c-api/init.rst:529 c-api/init.rst:680 c-api/init.rst:706 msgid "" "Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:type:" "`wchar_*` string." msgstr "" -#: c-api/init.rst:374 +#: c-api/init.rst:388 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:381 +#: c-api/init.rst:411 c-api/init.rst:471 c-api/init.rst:718 +msgid "" +"This function should not be called before :c:func:`Py_Initialize`, otherwise " +"it returns ``NULL``." +msgstr "" + +#: c-api/init.rst:414 c-api/init.rst:474 c-api/init.rst:721 +msgid "It now returns ``NULL`` if called before :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/init.rst:401 msgid "" "Return the *prefix* for installed platform-independent files. This is " "derived through a number of complicated rules from the program name set " @@ -566,7 +591,7 @@ msgid "" "function." msgstr "" -#: c-api/init.rst:394 +#: c-api/init.rst:420 msgid "" "Return the *exec-prefix* for installed platform-*dependent* files. This is " "derived through a number of complicated rules from the program name set " @@ -580,7 +605,7 @@ msgid "" "on Unix." msgstr "" -#: c-api/init.rst:404 +#: c-api/init.rst:430 msgid "" "Background: The exec-prefix differs from the prefix when platform dependent " "files (such as executables and shared libraries) are installed in a " @@ -589,7 +614,7 @@ msgid "" "independent may be installed in :file:`/usr/local`." msgstr "" -#: c-api/init.rst:410 +#: c-api/init.rst:436 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 " @@ -603,7 +628,7 @@ msgid "" "independent from the Python version by which they were compiled!)." msgstr "" -#: c-api/init.rst:421 +#: c-api/init.rst:447 msgid "" "System administrators will know how to configure the :program:`mount` or :" "program:`automount` programs to share :file:`/usr/local` between platforms " @@ -611,7 +636,7 @@ msgid "" "platform." msgstr "" -#: c-api/init.rst:433 +#: c-api/init.rst:465 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 " @@ -620,31 +645,39 @@ msgid "" "available to Python code as ``sys.executable``." msgstr "" -#: c-api/init.rst:447 +#: c-api/init.rst:485 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 Mac OS X, ``';'`` on Windows. The returned " +"character is ``':'`` on Unix and macOS, ``';'`` on Windows. The returned " "string points into static storage; the caller should not modify its value. " "The list :data:`sys.path` is initialized with this value on interpreter " "startup; it can be (and usually is) modified later to change the search path " "for loading modules." msgstr "" -#: c-api/init.rst:467 +#: c-api/init.rst:511 +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"module_search_paths` and :c:member:`PyConfig.module_search_paths_set` should " +"be used instead, see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/init.rst:516 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 Mac OS X, " -"``';'`` on Windows." +"dependent delimiter character, which is ``':'`` on Unix and macOS, ``';'`` " +"on Windows." msgstr "" -#: c-api/init.rst:475 +#: c-api/init.rst:524 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:" @@ -652,80 +685,92 @@ msgid "" "required after calling :c:func:`Py_Initialize`." msgstr "" -#: c-api/init.rst:483 +#: c-api/init.rst:532 msgid "" "The path argument is copied internally, so the caller may free it after the " "call completes." msgstr "" -#: c-api/init.rst:486 +#: c-api/init.rst:535 msgid "" "The program full path is now used for :data:`sys.executable`, instead of the " "program name." msgstr "" -#: c-api/init.rst:493 +#: c-api/init.rst:544 msgid "" "Return the version of this Python interpreter. This is a string that looks " "something like ::" msgstr "" -#: c-api/init.rst:500 +#: c-api/init.rst:551 msgid "" "The first word (up to the first space character) is the current Python " -"version; the first three characters are the major and minor version " -"separated by a period. The returned string points into static storage; the " -"caller should not modify its value. The value is available to Python code " -"as :data:`sys.version`." +"version; the first characters are the major and minor version separated by a " +"period. The returned string points into static storage; the caller should " +"not modify its value. The value is available to Python code as :data:`sys." +"version`." +msgstr "" + +#: c-api/init.rst:556 +msgid "See also the :c:var:`Py_Version` constant." msgstr "" -#: c-api/init.rst:510 +#: c-api/init.rst:563 msgid "" "Return the platform identifier for the current platform. On Unix, this is " "formed from the \"official\" name of the operating system, converted to " "lower case, followed by the major revision number; e.g., for Solaris 2.x, " -"which is also known as SunOS 5.x, the value is ``'sunos5'``. On Mac OS X, " -"it is ``'darwin'``. On Windows, it is ``'win'``. The returned string " -"points into static storage; the caller should not modify its value. The " -"value is available to Python code as ``sys.platform``." +"which is also known as SunOS 5.x, the value is ``'sunos5'``. On macOS, it " +"is ``'darwin'``. On Windows, it is ``'win'``. The returned string points " +"into static storage; the caller should not modify its value. The value is " +"available to Python code as ``sys.platform``." msgstr "" -#: c-api/init.rst:521 +#: c-api/init.rst:574 msgid "" "Return the official copyright string for the current Python version, for " "example" msgstr "" -#: c-api/init.rst:523 +#: c-api/init.rst:576 msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``" msgstr "" -#: c-api/init.rst:527 +#: c-api/init.rst:580 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:533 +#: c-api/init.rst:586 msgid "" "Return an indication of the compiler used to build the current Python " "version, in square brackets, for example::" msgstr "" -#: c-api/init.rst:554 +#: c-api/init.rst:607 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:547 +#: c-api/init.rst:600 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:566 +#: c-api/init.rst:619 +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"argv`, :c:member:`PyConfig.parse_argv` and :c:member:`PyConfig.safe_path` " +"should be used instead, see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/init.rst:624 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 " @@ -736,28 +781,34 @@ msgid "" "fatal condition is signalled using :c:func:`Py_FatalError`." msgstr "" -#: c-api/init.rst:574 +#: c-api/init.rst:632 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:578 +#: c-api/init.rst:636 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:581 +#: c-api/init.rst:639 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:590 +#: c-api/init.rst:683 +msgid "" +"See also :c:member:`PyConfig.orig_argv` and :c:member:`PyConfig.argv` " +"members of the :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/init.rst:651 msgid "" "It is recommended that applications embedding the Python interpreter for " "purposes other than executing a single script pass ``0`` as *updatepath*, " @@ -765,32 +816,46 @@ msgid "" "`_." msgstr "" -#: c-api/init.rst:595 +#: c-api/init.rst:656 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:609 +#: c-api/init.rst:672 +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"argv` and :c:member:`PyConfig.parse_argv` should be used instead, see :ref:" +"`Python Initialization Configuration `." +msgstr "" + +#: c-api/init.rst:676 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:616 +#: c-api/init.rst:686 msgid "The *updatepath* value depends on :option:`-I`." msgstr "" -#: c-api/init.rst:621 +#: c-api/init.rst:693 +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"home` should be used instead, see :ref:`Python Initialization Configuration " +"`." +msgstr "" + +#: c-api/init.rst:697 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:625 +#: c-api/init.rst:701 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 " @@ -798,18 +863,18 @@ msgid "" "this storage." msgstr "" -#: c-api/init.rst:636 +#: c-api/init.rst:714 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:644 +#: c-api/init.rst:728 msgid "Thread State and the Global Interpreter Lock" msgstr "" -#: c-api/init.rst:651 +#: c-api/init.rst:735 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 " @@ -821,7 +886,7 @@ msgid "" "once instead of twice." msgstr "" -#: c-api/init.rst:661 +#: c-api/init.rst:745 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 " @@ -831,7 +896,7 @@ msgid "" "a file, so that other Python threads can run in the meantime." msgstr "" -#: c-api/init.rst:672 +#: c-api/init.rst:756 msgid "" "The Python interpreter keeps some thread-specific bookkeeping information " "inside a data structure called :c:type:`PyThreadState`. There's also one " @@ -839,32 +904,32 @@ msgid "" "retrieved using :c:func:`PyThreadState_Get`." msgstr "" -#: c-api/init.rst:678 +#: c-api/init.rst:762 msgid "Releasing the GIL from extension code" msgstr "" -#: c-api/init.rst:680 +#: c-api/init.rst:764 msgid "" "Most extension code manipulating the :term:`GIL` has the following simple " "structure::" msgstr "" -#: c-api/init.rst:689 +#: c-api/init.rst:773 msgid "This is so common that a pair of macros exists to simplify it::" msgstr "" -#: c-api/init.rst:699 +#: c-api/init.rst:783 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:703 +#: c-api/init.rst:787 msgid "The block above expands to the following code::" msgstr "" -#: c-api/init.rst:715 +#: c-api/init.rst:799 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 " @@ -875,7 +940,7 @@ msgid "" "state, the lock must be acquired before storing the thread state pointer." msgstr "" -#: c-api/init.rst:724 +#: c-api/init.rst:808 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 " @@ -885,11 +950,11 @@ msgid "" "compressing or hashing data." msgstr "" -#: c-api/init.rst:735 +#: c-api/init.rst:819 msgid "Non-Python created threads" msgstr "" -#: c-api/init.rst:737 +#: c-api/init.rst:821 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 " @@ -899,7 +964,7 @@ msgid "" "for them." msgstr "" -#: c-api/init.rst:744 +#: c-api/init.rst:828 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 " @@ -910,14 +975,14 @@ msgid "" "finally free the thread state data structure." msgstr "" -#: c-api/init.rst:752 +#: c-api/init.rst:836 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:766 +#: c-api/init.rst:850 msgid "" "Note that the :c:func:`PyGILState_\\*` functions assume there is only one " "global interpreter (created automatically by :c:func:`Py_Initialize`). " @@ -926,11 +991,11 @@ msgid "" "`PyGILState_\\*` API is unsupported." msgstr "" -#: c-api/init.rst:776 +#: c-api/init.rst:860 msgid "Cautions about fork()" msgstr "" -#: c-api/init.rst:778 +#: c-api/init.rst:862 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 " @@ -939,7 +1004,7 @@ msgid "" "CPython's runtime." msgstr "" -#: c-api/init.rst:784 +#: c-api/init.rst:868 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` " @@ -956,7 +1021,7 @@ msgid "" "locks, but is not always able to." msgstr "" -#: c-api/init.rst:799 +#: c-api/init.rst:883 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 " @@ -969,18 +1034,18 @@ msgid "" "called immediately after." msgstr "" -#: c-api/init.rst:812 +#: c-api/init.rst:896 #, fuzzy msgid "High-level API" msgstr "Bibliothèques de haut-niveau" -#: c-api/init.rst:814 +#: c-api/init.rst:898 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:819 +#: c-api/init.rst:903 msgid "" "This data structure represents the state shared by a number of cooperating " "threads. Threads belonging to the same interpreter share their module " @@ -988,7 +1053,7 @@ msgid "" "in this structure." msgstr "" -#: c-api/init.rst:824 +#: c-api/init.rst:908 msgid "" "Threads belonging to different interpreters initially share nothing, except " "process state like available memory, open file descriptors and such. The " @@ -996,49 +1061,49 @@ msgid "" "which interpreter they belong." msgstr "" -#: c-api/init.rst:832 +#: c-api/init.rst:916 msgid "" "This data structure represents the state of a single thread. The only " "public data member is :attr:`interp` (:c:type:`PyInterpreterState *`), which " "points to this thread's interpreter state." msgstr "" -#: c-api/init.rst:845 +#: c-api/init.rst:929 msgid "Deprecated function which does nothing." msgstr "" -#: c-api/init.rst:847 +#: c-api/init.rst:931 msgid "" "In Python 3.6 and older, this function created the GIL if it didn't exist." msgstr "" -#: c-api/init.rst:849 +#: c-api/init.rst:933 msgid "The function now does nothing." msgstr "" -#: c-api/init.rst:852 +#: c-api/init.rst:936 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:856 +#: c-api/init.rst:940 msgid "" "This function cannot be called before :c:func:`Py_Initialize()` anymore." msgstr "" -#: c-api/init.rst:866 +#: c-api/init.rst:950 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:870 +#: c-api/init.rst:954 msgid "The :term:`GIL` is now initialized by :c:func:`Py_Initialize()`." msgstr "" -#: c-api/init.rst:878 +#: c-api/init.rst:962 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 " @@ -1046,7 +1111,7 @@ msgid "" "acquired it." msgstr "" -#: c-api/init.rst:886 +#: c-api/init.rst:970 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 " @@ -1054,7 +1119,7 @@ msgid "" "ensues." msgstr "" -#: c-api/init.rst:938 c-api/init.rst:1235 +#: c-api/init.rst:1022 c-api/init.rst:1342 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 " @@ -1063,27 +1128,27 @@ msgid "" "avoid unwanted termination." msgstr "" -#: c-api/init.rst:900 +#: c-api/init.rst:984 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:907 +#: c-api/init.rst:991 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:912 +#: c-api/init.rst:996 msgid "" "The following functions use thread-local storage, and are not compatible " "with sub-interpreters:" msgstr "" -#: c-api/init.rst:917 +#: c-api/init.rst:1001 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 " @@ -1096,7 +1161,7 @@ msgid "" "is acceptable." msgstr "" -#: c-api/init.rst:927 +#: c-api/init.rst:1011 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:" @@ -1106,13 +1171,13 @@ msgid "" "func:`PyGILState_Release`." msgstr "" -#: c-api/init.rst:934 +#: c-api/init.rst:1018 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:946 +#: c-api/init.rst:1030 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:" @@ -1120,13 +1185,13 @@ msgid "" "caller, hence the use of the GILState API)." msgstr "" -#: c-api/init.rst:951 +#: c-api/init.rst:1035 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:957 +#: c-api/init.rst:1041 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 " @@ -1134,7 +1199,7 @@ msgid "" "made on the main thread. This is mainly a helper/diagnostic function." msgstr "" -#: c-api/init.rst:965 +#: c-api/init.rst:1049 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 " @@ -1145,13 +1210,13 @@ msgid "" "otherwise behave differently." msgstr "" -#: c-api/init.rst:977 +#: c-api/init.rst:1061 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:983 +#: c-api/init.rst:1067 msgid "" "This macro expands to ``{ PyThreadState *_save; _save = PyEval_SaveThread();" "``. Note that it contains an opening brace; it must be matched with a " @@ -1159,7 +1224,7 @@ msgid "" "discussion of this macro." msgstr "" -#: c-api/init.rst:991 +#: c-api/init.rst:1075 msgid "" "This macro expands to ``PyEval_RestoreThread(_save); }``. Note that it " "contains a closing brace; it must be matched with an earlier :c:macro:" @@ -1167,92 +1232,92 @@ msgid "" "macro." msgstr "" -#: c-api/init.rst:999 +#: c-api/init.rst:1083 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:1005 +#: c-api/init.rst:1089 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:1011 +#: c-api/init.rst:1095 #, fuzzy msgid "Low-level API" msgstr "Bibliothèques de bas-niveau" -#: c-api/init.rst:1013 +#: c-api/init.rst:1097 msgid "" "All of the following functions must be called after :c:func:`Py_Initialize`." msgstr "" -#: c-api/init.rst:1015 +#: c-api/init.rst:1099 msgid ":c:func:`Py_Initialize()` now initializes the :term:`GIL`." msgstr "" -#: c-api/init.rst:1021 +#: c-api/init.rst:1105 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:1025 +#: c-api/init.rst:1109 msgid "" "Raises an :ref:`auditing event ` ``cpython." "PyInterpreterState_New`` with no arguments." msgstr "" -#: c-api/init.rst:1030 +#: c-api/init.rst:1114 msgid "" "Reset all information in an interpreter state object. The global " "interpreter lock must be held." msgstr "" -#: c-api/init.rst:1033 +#: c-api/init.rst:1117 msgid "" "Raises an :ref:`auditing event ` ``cpython." "PyInterpreterState_Clear`` with no arguments." msgstr "" -#: c-api/init.rst:1038 +#: c-api/init.rst:1122 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:1045 +#: c-api/init.rst:1129 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:1052 +#: c-api/init.rst:1136 msgid "" "Reset all information in a thread state object. The global interpreter lock " "must be held." msgstr "" -#: c-api/init.rst:1055 +#: c-api/init.rst:1139 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:1062 +#: c-api/init.rst:1146 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:1069 +#: c-api/init.rst:1153 msgid "" "Destroy the current thread state and release the global interpreter lock. " "Like :c:func:`PyThreadState_Delete`, the global interpreter lock need not be " @@ -1260,93 +1325,118 @@ msgid "" "`PyThreadState_Clear`." msgstr "" -#: c-api/init.rst:1077 +#: c-api/init.rst:1161 msgid "Get the current frame of the Python thread state *tstate*." msgstr "" -#: c-api/init.rst:1079 +#: c-api/init.rst:1163 msgid "" -"Return a strong reference. Return ``NULL`` if no frame is currently " +"Return a :term:`strong reference`. Return ``NULL`` if no frame is currently " "executing." msgstr "" -#: c-api/init.rst:1082 +#: c-api/init.rst:1166 msgid "See also :c:func:`PyEval_GetFrame`." msgstr "" -#: c-api/init.rst:1093 c-api/init.rst:1102 +#: c-api/init.rst:1177 c-api/init.rst:1186 msgid "*tstate* must not be ``NULL``." msgstr "" -#: c-api/init.rst:1091 +#: c-api/init.rst:1175 msgid "" "Get the unique thread state identifier of the Python thread state *tstate*." msgstr "" -#: c-api/init.rst:1100 +#: c-api/init.rst:1184 msgid "Get the interpreter of the Python thread state *tstate*." msgstr "" -#: c-api/init.rst:1109 +#: c-api/init.rst:1193 +msgid "Suspend tracing and profiling in the Python thread state *tstate*." +msgstr "" + +#: c-api/init.rst:1195 +msgid "Resume them using the :c:func:`PyThreadState_LeaveTracing` function." +msgstr "" + +#: c-api/init.rst:1202 +msgid "" +"Resume tracing and profiling in the Python thread state *tstate* suspended " +"by the :c:func:`PyThreadState_EnterTracing` function." +msgstr "" + +#: c-api/init.rst:1205 +msgid "" +"See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions." +msgstr "" + +#: c-api/init.rst:1213 msgid "Get the current interpreter." msgstr "" -#: c-api/init.rst:1111 +#: c-api/init.rst:1215 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:1124 +#: c-api/init.rst:1228 msgid "The caller must hold the GIL." msgstr "" -#: c-api/init.rst:1121 +#: c-api/init.rst:1225 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:1131 +#: c-api/init.rst:1235 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:1135 +#: c-api/init.rst:1239 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:1142 +#: c-api/init.rst:1246 msgid "Type of a frame evaluation function." msgstr "" -#: c-api/init.rst:1144 +#: c-api/init.rst:1248 msgid "" "The *throwflag* parameter is used by the ``throw()`` method of generators: " "if non-zero, handle the current exception." msgstr "" -#: c-api/init.rst:1147 +#: c-api/init.rst:1251 msgid "The function now takes a *tstate* parameter." msgstr "" -#: c-api/init.rst:1152 +#: c-api/init.rst:1254 +msgid "" +"The *frame* parameter changed from ``PyFrameObject*`` to " +"``_PyInterpreterFrame*``." +msgstr "" + +#: c-api/init.rst:1259 msgid "Get the frame evaluation function." msgstr "" -#: c-api/init.rst:1162 +#: c-api/init.rst:1269 msgid "See the :pep:`523` \"Adding a frame evaluation API to CPython\"." msgstr "" -#: c-api/init.rst:1160 +#: c-api/init.rst:1267 msgid "Set the frame evaluation function." msgstr "" -#: c-api/init.rst:1169 +#: c-api/init.rst:1276 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 " @@ -1355,7 +1445,7 @@ msgid "" "raised and the caller should assume no current thread state is available." msgstr "" -#: c-api/init.rst:1178 +#: c-api/init.rst:1285 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. " @@ -1367,33 +1457,33 @@ msgid "" "raises no exceptions." msgstr "" -#: c-api/init.rst:1186 +#: c-api/init.rst:1293 msgid "" "The type of the *id* parameter changed from :c:type:`long` to :c:type:" "`unsigned long`." msgstr "" -#: c-api/init.rst:1192 +#: c-api/init.rst:1299 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:1241 +#: c-api/init.rst:1348 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:1208 +#: c-api/init.rst:1315 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:1214 +#: c-api/init.rst:1321 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 " @@ -1402,41 +1492,41 @@ msgid "" "isn't, a fatal error is reported." msgstr "" -#: c-api/init.rst:1220 +#: c-api/init.rst:1327 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:1226 +#: c-api/init.rst:1333 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:1229 +#: c-api/init.rst:1336 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:1249 +#: c-api/init.rst:1356 msgid "" "Release the global interpreter lock. The lock must have been created " "earlier." msgstr "" -#: c-api/init.rst:1251 +#: c-api/init.rst:1358 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:1260 +#: c-api/init.rst:1367 msgid "Sub-interpreter support" msgstr "" -#: c-api/init.rst:1262 +#: c-api/init.rst:1369 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 " @@ -1444,7 +1534,7 @@ msgid "" "to do that." msgstr "" -#: c-api/init.rst:1267 +#: c-api/init.rst:1374 msgid "" "The \"main\" interpreter is the first one created when the runtime " "initializes. It is usually the only Python interpreter in a process. Unlike " @@ -1455,14 +1545,14 @@ msgid "" "returns a pointer to its state." msgstr "" -#: c-api/init.rst:1274 +#: c-api/init.rst:1381 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:1288 +#: c-api/init.rst:1395 msgid "" "Create a new sub-interpreter. This is an (almost) totally separate " "environment for the execution of Python code. In particular, the new " @@ -1475,7 +1565,7 @@ msgid "" "underlying file descriptors)." msgstr "" -#: c-api/init.rst:1298 +#: c-api/init.rst:1405 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 " @@ -1489,11 +1579,11 @@ msgid "" "state on entry.)" msgstr "" -#: c-api/init.rst:1313 +#: c-api/init.rst:1420 msgid "Extension modules are shared between (sub-)interpreters as follows:" msgstr "" -#: c-api/init.rst:1315 +#: c-api/init.rst:1422 msgid "" "For modules using multi-phase initialization, e.g. :c:func:" "`PyModule_FromDefAndSpec`, a separate module object is created and " @@ -1501,7 +1591,7 @@ msgid "" "are shared between these module objects." msgstr "" -#: c-api/init.rst:1321 +#: c-api/init.rst:1428 msgid "" "For modules using single-phase initialization, e.g. :c:func:" "`PyModule_Create`, the first time a particular extension is imported, it is " @@ -1513,7 +1603,7 @@ msgid "" "might cause unwanted behavior (see `Bugs and caveats`_ below)." msgstr "" -#: c-api/init.rst:1332 +#: c-api/init.rst:1439 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:" @@ -1523,7 +1613,7 @@ msgid "" "shared between these modules." msgstr "" -#: c-api/init.rst:1346 +#: c-api/init.rst:1453 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 " @@ -1535,11 +1625,11 @@ msgid "" "point." msgstr "" -#: c-api/init.rst:1356 +#: c-api/init.rst:1463 msgid "Bugs and caveats" msgstr "" -#: c-api/init.rst:1358 +#: c-api/init.rst:1465 msgid "" "Because sub-interpreters (and the main interpreter) are part of the same " "process, the insulation between them isn't perfect --- for example, using " @@ -1552,7 +1642,7 @@ msgid "" "should be avoided if possible." msgstr "" -#: c-api/init.rst:1368 +#: c-api/init.rst:1475 msgid "" "Special care should be taken to avoid sharing user-defined functions, " "methods, instances or classes between sub-interpreters, since import " @@ -1561,7 +1651,7 @@ msgid "" "objects from which the above are reachable." msgstr "" -#: c-api/init.rst:1374 +#: c-api/init.rst:1481 msgid "" "Also note that combining this functionality with :c:func:`PyGILState_\\*` " "APIs is delicate, because these APIs assume a bijection between Python " @@ -1573,25 +1663,25 @@ msgid "" "created threads will probably be broken when using sub-interpreters." msgstr "" -#: c-api/init.rst:1385 +#: c-api/init.rst:1492 msgid "Asynchronous Notifications" msgstr "" -#: c-api/init.rst:1387 +#: c-api/init.rst:1494 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:1396 +#: c-api/init.rst:1503 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:1400 +#: c-api/init.rst:1507 msgid "" "When successfully queued, *func* will be *eventually* called from the main " "interpreter thread with the argument *arg*. It will be called " @@ -1599,17 +1689,17 @@ msgid "" "these conditions met:" msgstr "" -#: c-api/init.rst:1405 +#: c-api/init.rst:1512 msgid "on a :term:`bytecode` boundary;" msgstr "" -#: c-api/init.rst:1406 +#: c-api/init.rst:1513 msgid "" "with the main thread holding the :term:`global interpreter lock` (*func* can " "therefore use the full C API)." msgstr "" -#: c-api/init.rst:1409 +#: c-api/init.rst:1516 msgid "" "*func* must return ``0`` on success, or ``-1`` on failure with an exception " "set. *func* won't be interrupted to perform another asynchronous " @@ -1617,20 +1707,20 @@ msgid "" "if the global interpreter lock is released." msgstr "" -#: c-api/init.rst:1414 +#: c-api/init.rst:1521 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:1417 +#: c-api/init.rst:1524 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:1422 +#: c-api/init.rst:1529 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 " @@ -1640,7 +1730,7 @@ msgid "" "`PyGILState API`." msgstr "" -#: c-api/init.rst:1429 +#: c-api/init.rst:1536 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 " @@ -1648,18 +1738,18 @@ msgid "" "scheduled calls." msgstr "" -#: c-api/init.rst:1440 +#: c-api/init.rst:1547 msgid "Profiling and Tracing" msgstr "" -#: c-api/init.rst:1445 +#: c-api/init.rst:1552 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:1449 +#: c-api/init.rst:1556 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 " @@ -1669,7 +1759,7 @@ msgid "" "reported to the Python-level trace functions in previous versions." msgstr "" -#: c-api/init.rst:1459 +#: c-api/init.rst:1566 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 " @@ -1680,64 +1770,64 @@ msgid "" "or :const:`PyTrace_OPCODE`, and *arg* depends on the value of *what*:" msgstr "" -#: c-api/init.rst:1468 +#: c-api/init.rst:1575 msgid "Value of *what*" msgstr "" -#: c-api/init.rst:1468 +#: c-api/init.rst:1575 msgid "Meaning of *arg*" msgstr "" -#: c-api/init.rst:1470 +#: c-api/init.rst:1577 msgid ":const:`PyTrace_CALL`" -msgstr "" +msgstr ":const:`PyTrace_CALL`" -#: c-api/init.rst:1475 c-api/init.rst:1486 +#: c-api/init.rst:1582 c-api/init.rst:1593 msgid "Always :c:data:`Py_None`." msgstr "" -#: c-api/init.rst:1472 +#: c-api/init.rst:1579 msgid ":const:`PyTrace_EXCEPTION`" -msgstr "" +msgstr ":const:`PyTrace_EXCEPTION`" -#: c-api/init.rst:1472 +#: c-api/init.rst:1579 msgid "Exception information as returned by :func:`sys.exc_info`." msgstr "" -#: c-api/init.rst:1475 +#: c-api/init.rst:1582 msgid ":const:`PyTrace_LINE`" -msgstr "" +msgstr ":const:`PyTrace_LINE`" -#: c-api/init.rst:1477 +#: c-api/init.rst:1584 msgid ":const:`PyTrace_RETURN`" -msgstr "" +msgstr ":const:`PyTrace_RETURN`" -#: c-api/init.rst:1477 +#: c-api/init.rst:1584 msgid "" "Value being returned to the caller, or ``NULL`` if caused by an exception." msgstr "" -#: c-api/init.rst:1480 +#: c-api/init.rst:1587 msgid ":const:`PyTrace_C_CALL`" -msgstr "" +msgstr ":const:`PyTrace_C_CALL`" -#: c-api/init.rst:1482 c-api/init.rst:1484 +#: c-api/init.rst:1589 c-api/init.rst:1591 msgid "Function object being called." msgstr "" -#: c-api/init.rst:1482 +#: c-api/init.rst:1589 msgid ":const:`PyTrace_C_EXCEPTION`" -msgstr "" +msgstr ":const:`PyTrace_C_EXCEPTION`" -#: c-api/init.rst:1484 +#: c-api/init.rst:1591 msgid ":const:`PyTrace_C_RETURN`" -msgstr "" +msgstr ":const:`PyTrace_C_RETURN`" -#: c-api/init.rst:1486 +#: c-api/init.rst:1593 msgid ":const:`PyTrace_OPCODE`" -msgstr "" +msgstr ":const:`PyTrace_OPCODE`" -#: c-api/init.rst:1491 +#: c-api/init.rst:1598 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 " @@ -1746,7 +1836,7 @@ msgid "" "the corresponding frame." msgstr "" -#: c-api/init.rst:1500 +#: c-api/init.rst:1607 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 " @@ -1758,7 +1848,7 @@ msgid "" "profiler." msgstr "" -#: c-api/init.rst:1511 +#: c-api/init.rst:1618 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 " @@ -1766,31 +1856,31 @@ msgid "" "*0* on that frame." msgstr "" -#: c-api/init.rst:1518 +#: c-api/init.rst:1625 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:1524 +#: c-api/init.rst:1631 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:1530 +#: c-api/init.rst:1637 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:1536 +#: c-api/init.rst:1643 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " "a C function has returned." msgstr "" -#: c-api/init.rst:1542 +#: c-api/init.rst:1649 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 " @@ -1798,7 +1888,7 @@ msgid "" "attr:`f_trace_opcodes` to *1* on the frame." msgstr "" -#: c-api/init.rst:1550 +#: c-api/init.rst:1657 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``. " @@ -1808,11 +1898,15 @@ msgid "" "`PyTrace_LINE` :const:`PyTrace_OPCODE` and :const:`PyTrace_EXCEPTION`." msgstr "" -#: c-api/init.rst:1569 +#: c-api/init.rst:1664 +msgid "See also the :func:`sys.setprofile` function." +msgstr "" + +#: c-api/init.rst:1680 msgid "The caller must hold the :term:`GIL`." msgstr "" -#: c-api/init.rst:1562 +#: c-api/init.rst:1671 msgid "" "Set the tracing function to *func*. This is similar to :c:func:" "`PyEval_SetProfile`, except the tracing function does receive line-number " @@ -1823,48 +1917,52 @@ msgid "" "parameter." msgstr "" -#: c-api/init.rst:1575 +#: c-api/init.rst:1678 +msgid "See also the :func:`sys.settrace` function." +msgstr "" + +#: c-api/init.rst:1686 msgid "Advanced Debugger Support" msgstr "Support avancé du débogueur" -#: c-api/init.rst:1580 +#: c-api/init.rst:1691 msgid "" "These functions are only intended to be used by advanced debugging tools." msgstr "" -#: c-api/init.rst:1585 +#: c-api/init.rst:1696 msgid "" "Return the interpreter state object at the head of the list of all such " "objects." msgstr "" -#: c-api/init.rst:1590 +#: c-api/init.rst:1701 msgid "Return the main interpreter state object." msgstr "" -#: c-api/init.rst:1595 +#: c-api/init.rst:1706 msgid "" "Return the next interpreter state object after *interp* from the list of all " "such objects." msgstr "" -#: c-api/init.rst:1601 +#: c-api/init.rst:1712 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:1607 +#: c-api/init.rst:1718 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:1614 +#: c-api/init.rst:1725 msgid "Thread Local Storage Support" msgstr "" -#: c-api/init.rst:1618 +#: c-api/init.rst:1729 msgid "" "The Python interpreter provides low-level support for thread-local storage " "(TLS) which wraps the underlying native TLS implementation to support the " @@ -1874,19 +1972,19 @@ msgid "" "thread." msgstr "" -#: c-api/init.rst:1625 +#: c-api/init.rst:1736 msgid "" "The GIL does *not* need to be held when calling these functions; they supply " "their own locking." msgstr "" -#: c-api/init.rst:1628 +#: c-api/init.rst:1739 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:1632 +#: c-api/init.rst:1743 msgid "" "None of these API functions handle memory management on behalf of the :c:" "type:`void*` values. You need to allocate and deallocate them yourself. If " @@ -1894,22 +1992,22 @@ msgid "" "don't do refcount operations on them either." msgstr "" -#: c-api/init.rst:1640 +#: c-api/init.rst:1751 msgid "Thread Specific Storage (TSS) API" msgstr "" -#: c-api/init.rst:1642 +#: c-api/init.rst:1753 msgid "" "TSS API is introduced to supersede the use of the existing TLS API within " "the CPython interpreter. This API uses a new type :c:type:`Py_tss_t` " "instead of :c:type:`int` to represent thread keys." msgstr "" -#: c-api/init.rst:1648 +#: c-api/init.rst:1759 msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)" msgstr "" -#: c-api/init.rst:1653 +#: c-api/init.rst:1764 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 " @@ -1917,52 +2015,52 @@ msgid "" "public members in this structure." msgstr "" -#: c-api/init.rst:1658 +#: c-api/init.rst:1769 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:1664 +#: c-api/init.rst:1775 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:1669 +#: c-api/init.rst:1780 msgid "Dynamic Allocation" msgstr "" -#: c-api/init.rst:1671 +#: c-api/init.rst:1782 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:1678 +#: c-api/init.rst:1789 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:1685 +#: c-api/init.rst:1796 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:1691 +#: c-api/init.rst:1802 msgid "" -"A freed key becomes a dangling pointer, you should reset the key to `NULL`." +"A freed key becomes a dangling pointer. You should reset the key to `NULL`." msgstr "" -#: c-api/init.rst:1696 +#: c-api/init.rst:1807 msgid "Methods" msgstr "Méthodes" -#: c-api/init.rst:1698 +#: c-api/init.rst:1809 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 " @@ -1970,13 +2068,13 @@ msgid "" "func:`PyThread_tss_create`." msgstr "" -#: c-api/init.rst:1706 +#: c-api/init.rst:1817 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:1712 +#: c-api/init.rst:1823 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 " @@ -1985,7 +2083,7 @@ msgid "" "no-op and immediately returns success." msgstr "" -#: c-api/init.rst:1721 +#: c-api/init.rst:1832 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 " @@ -1994,31 +2092,31 @@ msgid "" "key -- calling it on an already destroyed key is a no-op." msgstr "" -#: c-api/init.rst:1730 +#: c-api/init.rst:1841 msgid "" "Return a zero value to indicate successfully associating a :c:type:`void*` " "value with a TSS key in the current thread. Each thread has a distinct " "mapping of the key to a :c:type:`void*` value." msgstr "" -#: c-api/init.rst:1737 +#: c-api/init.rst:1848 msgid "" "Return the :c:type:`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:1745 +#: c-api/init.rst:1856 msgid "Thread Local Storage (TLS) API" msgstr "" -#: c-api/init.rst:1747 +#: c-api/init.rst:1858 msgid "" "This API is superseded by :ref:`Thread Specific Storage (TSS) API `." msgstr "" -#: c-api/init.rst:1752 +#: c-api/init.rst:1863 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 " @@ -2027,7 +2125,7 @@ msgid "" "platforms." msgstr "" -#: c-api/init.rst:1757 +#: c-api/init.rst:1868 msgid "" "Due to the compatibility problem noted above, this version of the API should " "not be used in new code." diff --git a/c-api/init_config.po b/c-api/init_config.po index a54b179975..6b95f368fe 100644 --- a/c-api/init_config.po +++ b/c-api/init_config.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2019-09-04 11:42+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -19,1185 +19,1822 @@ msgid "Python Initialization Configuration" msgstr "" #: c-api/init_config.rst:11 -msgid "Structures:" +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:13 -msgid ":c:type:`PyConfig`" +#: c-api/init_config.rst:15 +msgid "There are two kinds of configuration:" msgstr "" -#: c-api/init_config.rst:14 -msgid ":c:type:`PyPreConfig`" +#: 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:15 -msgid ":c:type:`PyStatus`" +#: 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:16 -msgid ":c:type:`PyWideStringList`" +#: 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:18 +#: 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 #, fuzzy -msgid "Functions:" -msgstr "Fonctions" +msgid "Example" +msgstr "Exemple ::" -#: c-api/init_config.rst:20 -msgid ":c:func:`PyConfig_Clear`" +#: c-api/init_config.rst:39 +msgid "Example of customized Python always running in isolated mode::" msgstr "" -#: c-api/init_config.rst:21 -msgid ":c:func:`PyConfig_InitIsolatedConfig`" +#: c-api/init_config.rst:76 +msgid "PyWideStringList" msgstr "" -#: c-api/init_config.rst:22 -msgid ":c:func:`PyConfig_InitPythonConfig`" +#: c-api/init_config.rst:80 +msgid "List of ``wchar_t*`` strings." msgstr "" -#: c-api/init_config.rst:23 -msgid ":c:func:`PyConfig_Read`" +#: 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:24 -msgid ":c:func:`PyConfig_SetArgv`" +#: 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:25 -msgid ":c:func:`PyConfig_SetBytesArgv`" +#: c-api/init_config.rst:102 +msgid "Python must be preinitialized to call this function." msgstr "" -#: c-api/init_config.rst:26 -msgid ":c:func:`PyConfig_SetBytesString`" +#: c-api/init_config.rst:95 +msgid "Insert *item* into *list* at *index*." msgstr "" -#: c-api/init_config.rst:27 -msgid ":c:func:`PyConfig_SetString`" +#: 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:28 -msgid ":c:func:`PyConfig_SetWideStringList`" +#: c-api/init_config.rst:100 +msgid "*index* must be greater than or equal to ``0``." msgstr "" -#: c-api/init_config.rst:29 -msgid ":c:func:`PyPreConfig_InitIsolatedConfig`" +#: c-api/init_config.rst:124 c-api/init_config.rst:530 +msgid "Structure fields:" msgstr "" -#: c-api/init_config.rst:30 -msgid ":c:func:`PyPreConfig_InitPythonConfig`" +#: c-api/init_config.rst:108 +msgid "List length." msgstr "" -#: c-api/init_config.rst:31 -msgid ":c:func:`PyStatus_Error`" +#: c-api/init_config.rst:112 +msgid "List items." msgstr "" -#: c-api/init_config.rst:32 -msgid ":c:func:`PyStatus_Exception`" +#: c-api/init_config.rst:115 +msgid "PyStatus" msgstr "" -#: c-api/init_config.rst:33 -msgid ":c:func:`PyStatus_Exit`" +#: c-api/init_config.rst:119 +msgid "" +"Structure to store an initialization function status: success, error or exit." msgstr "" -#: c-api/init_config.rst:34 -msgid ":c:func:`PyStatus_IsError`" +#: 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:35 -msgid ":c:func:`PyStatus_IsExit`" +#: c-api/init_config.rst:128 +msgid "Exit code. Argument passed to ``exit()``." msgstr "" -#: c-api/init_config.rst:36 -msgid ":c:func:`PyStatus_NoMemory`" +#: c-api/init_config.rst:132 +msgid "Error message." msgstr "" -#: c-api/init_config.rst:37 -msgid ":c:func:`PyStatus_Ok`" +#: c-api/init_config.rst:136 +msgid "Name of the function which created an error, can be ``NULL``." msgstr "" -#: c-api/init_config.rst:38 -msgid ":c:func:`PyWideStringList_Append`" +#: c-api/init_config.rst:138 +msgid "Functions to create a status:" msgstr "" -#: c-api/init_config.rst:39 -msgid ":c:func:`PyWideStringList_Insert`" +#: c-api/init_config.rst:142 +msgid "Success." msgstr "" -#: c-api/init_config.rst:40 -msgid ":c:func:`Py_ExitStatusException`" +#: c-api/init_config.rst:146 +msgid "Initialization error with a message." msgstr "" -#: c-api/init_config.rst:41 -msgid ":c:func:`Py_InitializeFromConfig`" +#: c-api/init_config.rst:148 +msgid "*err_msg* must not be ``NULL``." msgstr "" -#: c-api/init_config.rst:42 -msgid ":c:func:`Py_PreInitialize`" +#: c-api/init_config.rst:152 +msgid "Memory allocation failure (out of memory)." msgstr "" -#: c-api/init_config.rst:43 -msgid ":c:func:`Py_PreInitializeFromArgs`" +#: c-api/init_config.rst:156 +msgid "Exit Python with the specified exit code." msgstr "" -#: c-api/init_config.rst:44 -msgid ":c:func:`Py_PreInitializeFromBytesArgs`" +#: c-api/init_config.rst:158 +msgid "Functions to handle a status:" msgstr "" -#: c-api/init_config.rst:45 -msgid ":c:func:`Py_RunMain`" +#: 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:46 -msgid ":c:func:`Py_GetArgcArgv`" +#: c-api/init_config.rst:167 +msgid "Is the result an error?" msgstr "" -#: c-api/init_config.rst:48 +#: c-api/init_config.rst:171 +msgid "Is the result an exit?" +msgstr "" + +#: c-api/init_config.rst:175 msgid "" -"The preconfiguration (``PyPreConfig`` type) is stored in ``_PyRuntime." -"preconfig`` and the configuration (``PyConfig`` type) is stored in " -"``PyInterpreterState.config``." +"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:52 +#: c-api/init_config.rst:180 msgid "" -"See also :ref:`Initialization, Finalization, and Threads `." +"Internally, Python uses macros which set ``PyStatus.func``, whereas " +"functions to create a status set ``func`` to ``NULL``." msgstr "" -#: c-api/init_config.rst:55 -msgid ":pep:`587` \"Python Initialization Configuration\"." +#: c-api/init_config.rst:183 +msgid "Example::" +msgstr "Exemple ::" + +#: c-api/init_config.rst:207 +msgid "PyPreConfig" msgstr "" -#: c-api/init_config.rst:59 -msgid "PyWideStringList" +#: c-api/init_config.rst:211 +msgid "Structure used to preinitialize Python." msgstr "" -#: c-api/init_config.rst:63 -msgid "List of ``wchar_t*`` strings." +#: c-api/init_config.rst:213 +msgid "Function to initialize a preconfiguration:" msgstr "" -#: c-api/init_config.rst:65 +#: c-api/init_config.rst:217 msgid "" -"If *length* is non-zero, *items* must be non-``NULL`` and all strings must " -"be non-``NULL``." +"Initialize the preconfiguration with :ref:`Python Configuration `." msgstr "" -#: c-api/init_config.rst:68 -#, fuzzy -msgid "Methods:" -msgstr "Méthodes" +#: c-api/init_config.rst:222 +msgid "" +"Initialize the preconfiguration with :ref:`Isolated Configuration `." +msgstr "" -#: c-api/init_config.rst:72 -msgid "Append *item* to *list*." +#: c-api/init_config.rst:229 +msgid "Name of the Python memory allocators:" msgstr "" -#: c-api/init_config.rst:85 -msgid "Python must be preinitialized to call this function." +#: 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:78 -msgid "Insert *item* into *list* at *index*." +#: c-api/init_config.rst:233 +msgid "" +"``PYMEM_ALLOCATOR_DEFAULT`` (``1``): :ref:`default memory allocators " +"`." msgstr "" -#: c-api/init_config.rst:80 +#: c-api/init_config.rst:235 msgid "" -"If *index* is greater than or equal to *list* length, append *item* to " -"*list*." +"``PYMEM_ALLOCATOR_DEBUG`` (``2``): :ref:`default memory allocators ` with :ref:`debug hooks `." msgstr "" -#: c-api/init_config.rst:83 -msgid "*index* must be greater than or equal to 0." +#: c-api/init_config.rst:238 +msgid "``PYMEM_ALLOCATOR_MALLOC`` (``3``): use ``malloc()`` of the C library." msgstr "" -#: c-api/init_config.rst:107 c-api/init_config.rst:417 -msgid "Structure fields:" +#: 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:91 -msgid "List length." +#: c-api/init_config.rst:241 +msgid "" +"``PYMEM_ALLOCATOR_PYMALLOC`` (``5``): :ref:`Python pymalloc memory allocator " +"`." msgstr "" -#: c-api/init_config.rst:95 -msgid "List items." +#: 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:98 -msgid "PyStatus" +#: 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:102 +#: 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 "" -"Structure to store an initialization function status: success, error or exit." +"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:105 -msgid "For an error, it can store the C function name which created the error." +#: c-api/init_config.rst:273 +msgid "See the :term:`locale encoding`." msgstr "" -#: c-api/init_config.rst:111 -msgid "Exit code. Argument passed to ``exit()``." +#: c-api/init_config.rst:319 c-api/init_config.rst:670 +msgid "Default: ``1`` in Python config, ``0`` in isolated config." msgstr "" -#: c-api/init_config.rst:115 -msgid "Error message." +#: c-api/init_config.rst:268 +msgid "If equals to ``2``, coerce the C locale." msgstr "" -#: c-api/init_config.rst:119 -msgid "Name of the function which created an error, can be ``NULL``." +#: 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:121 -msgid "Functions to create a status:" +#: c-api/init_config.rst:281 +msgid "Default: ``-1`` in Python config, ``0`` in isolated config." msgstr "" -#: c-api/init_config.rst:125 -msgid "Success." +#: 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:129 -msgid "Initialization error with a message." +#: c-api/init_config.rst:285 +msgid "" +":ref:`Python Development Mode `: see :c:member:`PyConfig.dev_mode`." msgstr "" -#: c-api/init_config.rst:133 -msgid "Memory allocation failure (out of memory)." +#: c-api/init_config.rst:679 c-api/init_config.rst:1151 +msgid "Default: ``-1`` in Python mode, ``0`` in isolated mode." msgstr "" -#: c-api/init_config.rst:137 -msgid "Exit Python with the specified exit code." +#: c-api/init_config.rst:292 +msgid "Isolated mode: see :c:member:`PyConfig.isolated`." msgstr "" -#: c-api/init_config.rst:139 -msgid "Functions to handle a status:" +#: c-api/init_config.rst:847 +msgid "Default: ``0`` in Python mode, ``1`` in isolated mode." msgstr "" -#: c-api/init_config.rst:143 +#: 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 "" -"Is the status an error or an exit? If true, the exception must be handled; " -"by calling :c:func:`Py_ExitStatusException` for example." +"Initialized the from :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " +"variable value." msgstr "" -#: c-api/init_config.rst:148 -msgid "Is the result an error?" +#: c-api/init_config.rst:860 +msgid "" +"Only available on Windows. ``#ifdef MS_WINDOWS`` macro can be used for " +"Windows specific code." msgstr "" -#: c-api/init_config.rst:152 -msgid "Is the result an exit?" +#: c-api/init_config.rst:618 c-api/init_config.rst:692 +#: c-api/init_config.rst:816 c-api/init_config.rst:863 +#: c-api/init_config.rst:937 c-api/init_config.rst:1046 +#: c-api/init_config.rst:1115 c-api/init_config.rst:1188 +msgid "Default: ``0``." msgstr "" -#: c-api/init_config.rst:156 +#: c-api/init_config.rst:314 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." +"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:161 +#: c-api/init_config.rst:323 msgid "" -"Internally, Python uses macros which set ``PyStatus.func``, whereas " -"functions to create a status set ``func`` to ``NULL``." +"Use :ref:`environment variables `? See :c:member:`PyConfig." +"use_environment`." msgstr "" -#: c-api/init_config.rst:164 -msgid "Example::" -msgstr "Exemple ::" +#: c-api/init_config.rst:1162 +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 to ``0`` or ``1`` by the :option:`-X utf8 <-X>` command line option and " +"the :envvar:`PYTHONUTF8` environment variable." +msgstr "" + +#: c-api/init_config.rst:335 +msgid "Also set to ``1`` if the ``LC_CTYPE`` locale is ``C`` or ``POSIX``." +msgstr "" + +#: c-api/init_config.rst:337 +msgid "Default: ``-1`` in Python config and ``0`` in isolated config." +msgstr "" + +#: c-api/init_config.rst:343 +msgid "Preinitialize Python with PyPreConfig" +msgstr "" + +#: c-api/init_config.rst:345 +msgid "The preinitialization of Python:" +msgstr "" + +#: c-api/init_config.rst:347 +msgid "Set the Python memory allocators (:c:member:`PyPreConfig.allocator`)" +msgstr "" + +#: c-api/init_config.rst:348 +msgid "Configure the LC_CTYPE locale (:term:`locale encoding`)" +msgstr "" + +#: c-api/init_config.rst:349 +msgid "" +"Set the :ref:`Python UTF-8 Mode ` (:c:member:`PyPreConfig." +"utf8_mode`)" +msgstr "" + +#: c-api/init_config.rst:352 +msgid "" +"The current preconfiguration (``PyPreConfig`` type) is stored in " +"``_PyRuntime.preconfig``." +msgstr "" + +#: c-api/init_config.rst:355 +msgid "Functions to preinitialize Python:" +msgstr "" + +#: c-api/init_config.rst:365 c-api/init_config.rst:374 +msgid "Preinitialize Python from *preconfig* preconfiguration." +msgstr "" + +#: c-api/init_config.rst:370 c-api/init_config.rst:379 +msgid "*preconfig* must not be ``NULL``." +msgstr "" + +#: c-api/init_config.rst:367 +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:376 +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:1250 +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:384 +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:391 +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:396 +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:401 +msgid "" +"Example using the preinitialization to enable the :ref:`Python UTF-8 Mode " +"`::" +msgstr "" + +#: c-api/init_config.rst:423 +msgid "PyConfig" +msgstr "" + +#: c-api/init_config.rst:427 +msgid "Structure containing most parameters to configure Python." +msgstr "" + +#: c-api/init_config.rst:429 +msgid "" +"When done, the :c:func:`PyConfig_Clear` function must be used to release the " +"configuration memory." +msgstr "" + +#: c-api/init_config.rst:432 +msgid "Structure methods:" +msgstr "" + +#: c-api/init_config.rst:436 +msgid "" +"Initialize configuration with the :ref:`Python Configuration `." +msgstr "" + +#: c-api/init_config.rst:441 +msgid "" +"Initialize configuration with the :ref:`Isolated Configuration `." +msgstr "" + +#: c-api/init_config.rst:446 +msgid "Copy the wide character string *str* into ``*config_str``." +msgstr "" + +#: c-api/init_config.rst:455 c-api/init_config.rst:470 +#: c-api/init_config.rst:493 +msgid ":ref:`Preinitialize Python ` if needed." +msgstr "" + +#: c-api/init_config.rst:452 +msgid "" +"Decode *str* using :c:func:`Py_DecodeLocale` and set the result into " +"``*config_str``." +msgstr "" + +#: c-api/init_config.rst:459 +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:466 +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:474 +msgid "Set the list of wide strings *list* to *length* and *items*." +msgstr "" + +#: c-api/init_config.rst:480 +msgid "Read all Python configuration." +msgstr "" + +#: c-api/init_config.rst:482 +msgid "Fields which are already initialized are left unchanged." +msgstr "" + +#: c-api/init_config.rst:484 +msgid "" +"Fields for :ref:`path configuration ` are no longer " +"calculated or modified when calling this function, as of Python 3.11." +msgstr "" + +#: c-api/init_config.rst:966 +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:495 +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:501 +msgid "" +":c:func:`PyConfig_Read` no longer calculates all paths, and so fields listed " +"under :ref:`Python Path Configuration ` may no longer be " +"updated until :c:func:`Py_InitializeFromConfig` is called." +msgstr "" + +#: c-api/init_config.rst:509 +msgid "Release configuration memory." +msgstr "" + +#: c-api/init_config.rst:511 +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:517 +msgid ":c:member:`PyConfig.dev_mode`" +msgstr "" + +#: c-api/init_config.rst:518 +msgid ":c:member:`PyConfig.isolated`" +msgstr "" + +#: c-api/init_config.rst:519 +msgid ":c:member:`PyConfig.parse_argv`" +msgstr "" + +#: c-api/init_config.rst:520 +msgid ":c:member:`PyConfig.use_environment`" +msgstr "" + +#: c-api/init_config.rst:522 +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:527 +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:534 +msgid "Command line arguments: :data:`sys.argv`." +msgstr "" + +#: c-api/init_config.rst:536 +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:541 +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:571 c-api/init_config.rst:591 +#: c-api/init_config.rst:708 c-api/init_config.rst:907 +#: c-api/init_config.rst:1023 c-api/init_config.rst:1054 +#: c-api/init_config.rst:1075 +msgid "Default: ``NULL``." +msgstr "" + +#: c-api/init_config.rst:546 +msgid "See also the :c:member:`~PyConfig.orig_argv` member." +msgstr "" + +#: c-api/init_config.rst:550 +msgid "" +"If equals to zero, ``Py_RunMain()`` prepends a potentially unsafe path to :" +"data:`sys.path` at startup:" +msgstr "" + +#: c-api/init_config.rst:553 +msgid "" +"If :c:member:`argv[0] ` is equal to ``L\"-m\"`` (``python -m " +"module``), prepend the current working directory." +msgstr "" + +#: c-api/init_config.rst:555 +msgid "" +"If running a script (``python script.py``), prepend the script's directory. " +"If it's a symbolic link, resolve symbolic links." +msgstr "" + +#: c-api/init_config.rst:557 +msgid "" +"Otherwise (``python -c code`` and ``python``), prepend an empty string, " +"which means the current working directory." +msgstr "" + +#: c-api/init_config.rst:560 +msgid "" +"Set to ``1`` by the :option:`-P` command line option and the :envvar:" +"`PYTHONSAFEPATH` environment variable." +msgstr "" + +#: c-api/init_config.rst:563 +msgid "Default: ``0`` in Python config, ``1`` in isolated config." +msgstr "" + +#: c-api/init_config.rst:569 +msgid ":data:`sys.base_exec_prefix`." +msgstr "" + +#: c-api/init_config.rst:585 c-api/init_config.rst:701 +#: c-api/init_config.rst:924 c-api/init_config.rst:1007 +msgid "Part of the :ref:`Python Path Configuration ` output." +msgstr "" + +#: c-api/init_config.rst:577 +msgid "Python base executable: :data:`sys._base_executable`." +msgstr "" + +#: c-api/init_config.rst:579 +msgid "Set by the :envvar:`__PYVENV_LAUNCHER__` environment variable." +msgstr "" + +#: c-api/init_config.rst:581 +msgid "Set from :c:member:`PyConfig.executable` if ``NULL``." +msgstr "" + +#: c-api/init_config.rst:589 +msgid ":data:`sys.base_prefix`." +msgstr "" + +#: c-api/init_config.rst:597 +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:600 +msgid "" +"Set to ``0`` by the :option:`-u` command line option and the :envvar:" +"`PYTHONUNBUFFERED` environment variable." +msgstr "" + +#: c-api/init_config.rst:603 +msgid "stdin is always opened in buffered mode." +msgstr "" + +#: c-api/init_config.rst:638 c-api/init_config.rst:1220 +msgid "Default: ``1``." +msgstr "" + +#: c-api/init_config.rst:609 +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:613 +msgid "" +"If equal or greater to ``2``, raise a :exc:`BytesWarning` exception in these " +"cases." +msgstr "" + +#: c-api/init_config.rst:616 +msgid "Incremented by the :option:`-b` command line option." +msgstr "" + +#: c-api/init_config.rst:622 +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:631 +msgid "" +"If equals to ``0``, disables the inclusion of the end line and column " +"mappings in code objects. Also disables traceback printing carets to " +"specific error locations." +msgstr "" + +#: c-api/init_config.rst:635 +msgid "" +"Set to ``0`` by the :envvar:`PYTHONNODEBUGRANGES` environment variable and " +"by the :option:`-X no_debug_ranges <-X>` command line option." +msgstr "" + +#: c-api/init_config.rst:644 +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:647 +msgid "Valid values:" +msgstr "" + +#: c-api/init_config.rst:649 +msgid "" +"``L\"always\"``: Hash the source file for invalidation regardless of value " +"of the 'check_source' flag." +msgstr "" + +#: c-api/init_config.rst:651 +msgid "``L\"never\"``: Assume that hash-based pycs always are valid." +msgstr "" + +#: c-api/init_config.rst:652 +msgid "" +"``L\"default\"``: The 'check_source' flag in hash-based pycs determines " +"invalidation." +msgstr "" + +#: c-api/init_config.rst:655 +msgid "Default: ``L\"default\"``." +msgstr "" + +#: c-api/init_config.rst:657 +msgid "See also :pep:`552` \"Deterministic pycs\"." +msgstr "" + +#: c-api/init_config.rst:661 +msgid "If non-zero, configure C standard streams:" +msgstr "" + +#: c-api/init_config.rst:663 +msgid "" +"On Windows, set the binary mode (``O_BINARY``) on stdin, stdout and stderr." +msgstr "" + +#: c-api/init_config.rst:665 +msgid "" +"If :c:member:`~PyConfig.buffered_stdio` equals zero, disable buffering of " +"stdin, stdout and stderr streams." +msgstr "" + +#: c-api/init_config.rst:667 +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:674 +msgid "If non-zero, enable the :ref:`Python Development Mode `." +msgstr "" + +#: c-api/init_config.rst:676 +msgid "" +"Set to ``1`` by the :option:`-X dev <-X>` option and the :envvar:" +"`PYTHONDEVMODE` environment variable." +msgstr "" + +#: c-api/init_config.rst:683 +msgid "Dump Python references?" +msgstr "" + +#: c-api/init_config.rst:685 +msgid "If non-zero, dump all objects which are still alive at exit." +msgstr "" -#: c-api/init_config.rst:188 -msgid "PyPreConfig" +#: c-api/init_config.rst:687 +msgid "Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable." msgstr "" -#: c-api/init_config.rst:192 -msgid "Structure used to preinitialize Python:" +#: c-api/init_config.rst:689 +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:194 -msgid "Set the Python memory allocator" +#: c-api/init_config.rst:696 +msgid "" +"The site-specific directory prefix where the platform-dependent Python files " +"are installed: :data:`sys.exec_prefix`." msgstr "" -#: c-api/init_config.rst:195 -msgid "Configure the LC_CTYPE locale" +#: c-api/init_config.rst:705 +msgid "" +"The absolute path of the executable binary for the Python interpreter: :data:" +"`sys.executable`." msgstr "" -#: c-api/init_config.rst:196 -msgid "Set the UTF-8 mode" +#: c-api/init_config.rst:714 +msgid "Enable faulthandler?" msgstr "" -#: c-api/init_config.rst:198 -msgid "Function to initialize a preconfiguration:" +#: c-api/init_config.rst:716 +msgid "If non-zero, call :func:`faulthandler.enable` at startup." msgstr "" -#: c-api/init_config.rst:202 +#: c-api/init_config.rst:718 msgid "" -"Initialize the preconfiguration with :ref:`Python Configuration `." +"Set to ``1`` by :option:`-X faulthandler <-X>` and the :envvar:" +"`PYTHONFAULTHANDLER` environment variable." msgstr "" -#: c-api/init_config.rst:207 +#: c-api/init_config.rst:725 msgid "" -"Initialize the preconfiguration with :ref:`Isolated Configuration `." +":term:`Filesystem encoding `: :func:" +"`sys.getfilesystemencoding`." msgstr "" -#: c-api/init_config.rst:214 -msgid "Name of the memory allocator:" +#: c-api/init_config.rst:728 +msgid "On macOS, Android and VxWorks: use ``\"utf-8\"`` by default." msgstr "" -#: c-api/init_config.rst:216 +#: c-api/init_config.rst:730 msgid "" -"``PYMEM_ALLOCATOR_NOT_SET`` (``0``): don't change memory allocators (use " -"defaults)" +"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:734 +msgid "Default encoding on other platforms:" msgstr "" -#: c-api/init_config.rst:218 -msgid "``PYMEM_ALLOCATOR_DEFAULT`` (``1``): default memory allocators" +#: c-api/init_config.rst:736 +msgid "``\"utf-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." msgstr "" -#: c-api/init_config.rst:219 +#: c-api/init_config.rst:737 msgid "" -"``PYMEM_ALLOCATOR_DEBUG`` (``2``): default memory allocators with debug hooks" +"``\"ascii\"`` if Python detects that ``nl_langinfo(CODESET)`` announces the " +"ASCII encoding (or Roman8 encoding on HP-UX), whereas the ``mbstowcs()`` " +"function decodes from a different encoding (usually Latin1)." msgstr "" -#: c-api/init_config.rst:221 -msgid "``PYMEM_ALLOCATOR_MALLOC`` (``3``): force usage of ``malloc()``" +#: c-api/init_config.rst:741 +msgid "``\"utf-8\"`` if ``nl_langinfo(CODESET)`` returns an empty string." msgstr "" -#: c-api/init_config.rst:222 +#: c-api/init_config.rst:742 msgid "" -"``PYMEM_ALLOCATOR_MALLOC_DEBUG`` (``4``): force usage of ``malloc()`` with " -"debug hooks" +"Otherwise, use the :term:`locale encoding`: ``nl_langinfo(CODESET)`` result." msgstr "" -#: c-api/init_config.rst:224 +#: c-api/init_config.rst:745 msgid "" -"``PYMEM_ALLOCATOR_PYMALLOC`` (``5``): :ref:`Python pymalloc memory allocator " -"`" +"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:748 +msgid "See also the :c:member:`~PyConfig.filesystem_errors` member." msgstr "" -#: c-api/init_config.rst:226 +#: c-api/init_config.rst:752 msgid "" -"``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` (``6``): :ref:`Python pymalloc memory " -"allocator ` with debug hooks" +":term:`Filesystem error handler `: :" +"func:`sys.getfilesystemencodeerrors`." msgstr "" -#: c-api/init_config.rst:229 +#: c-api/init_config.rst:755 msgid "" -"``PYMEM_ALLOCATOR_PYMALLOC`` and ``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` are not " -"supported if Python is configured using ``--without-pymalloc``" +"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:232 -msgid "See :ref:`Memory Management `." +#: c-api/init_config.rst:759 +msgid "On other platforms: use ``\"surrogateescape\"`` by default." msgstr "" -#: c-api/init_config.rst:236 -msgid "" -"Set the LC_CTYPE locale to the user preferred locale? If equals to 0, set :c:" -"member:`coerce_c_locale` and :c:member:`coerce_c_locale_warn` to 0." +#: c-api/init_config.rst:761 +msgid "Supported error handlers:" msgstr "" -#: c-api/init_config.rst:241 -msgid "" -"If equals to 2, coerce the C locale; if equals to 1, read the LC_CTYPE " -"locale to decide if it should be coerced." +#: c-api/init_config.rst:763 +msgid "``\"strict\"``" msgstr "" -#: c-api/init_config.rst:246 -msgid "If non-zero, emit a warning if the C locale is coerced." +#: c-api/init_config.rst:764 +msgid "``\"surrogateescape\"``" msgstr "" -#: c-api/init_config.rst:250 -msgid "See :c:member:`PyConfig.dev_mode`." +#: c-api/init_config.rst:765 +msgid "``\"surrogatepass\"`` (only supported with the UTF-8 encoding)" msgstr "" -#: c-api/init_config.rst:254 -msgid "See :c:member:`PyConfig.isolated`." +#: c-api/init_config.rst:767 +msgid "See also the :c:member:`~PyConfig.filesystem_encoding` member." msgstr "" -#: c-api/init_config.rst:258 -msgid "" -"If non-zero, disable UTF-8 Mode, set the Python filesystem encoding to " -"``mbcs``, set the filesystem error handler to ``replace``." +#: c-api/init_config.rst:772 +msgid "Randomized hash function seed." msgstr "" -#: c-api/init_config.rst:555 +#: c-api/init_config.rst:774 msgid "" -"Only available on Windows. ``#ifdef MS_WINDOWS`` macro can be used for " -"Windows specific code." +"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:777 +msgid "Set by the :envvar:`PYTHONHASHSEED` environment variable." msgstr "" -#: c-api/init_config.rst:266 +#: c-api/init_config.rst:779 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 `." +"Default *use_hash_seed* value: ``-1`` in Python mode, ``0`` in isolated mode." msgstr "" -#: c-api/init_config.rst:273 -msgid "See :c:member:`PyConfig.use_environment`." +#: c-api/init_config.rst:784 +msgid "Python home directory." msgstr "" -#: c-api/init_config.rst:277 -msgid "If non-zero, enable the UTF-8 mode." +#: c-api/init_config.rst:786 +msgid "" +"If :c:func:`Py_SetPythonHome` has been called, use its argument if it is not " +"``NULL``." msgstr "" -#: c-api/init_config.rst:280 -msgid "Preinitialization with PyPreConfig" +#: c-api/init_config.rst:789 +msgid "Set by the :envvar:`PYTHONHOME` environment variable." msgstr "" -#: c-api/init_config.rst:282 -msgid "Functions to preinitialize Python:" +#: c-api/init_config.rst:889 c-api/init_config.rst:995 +#: c-api/init_config.rst:1025 +msgid "Part of the :ref:`Python Path Configuration ` input." msgstr "" -#: c-api/init_config.rst:286 -msgid "Preinitialize Python from *preconfig* preconfiguration." +#: c-api/init_config.rst:797 +msgid "If non-zero, profile import time." msgstr "" -#: c-api/init_config.rst:290 +#: c-api/init_config.rst:799 msgid "" -"Preinitialize Python from *preconfig* preconfiguration and command line " -"arguments (bytes strings)." +"Set the ``1`` by the :option:`-X importtime <-X>` option and the :envvar:" +"`PYTHONPROFILEIMPORTTIME` environment variable." msgstr "" -#: c-api/init_config.rst:295 -msgid "" -"Preinitialize Python from *preconfig* preconfiguration and command line " -"arguments (wide strings)." +#: c-api/init_config.rst:806 +msgid "Enter interactive mode after executing a script or a command." msgstr "" -#: c-api/init_config.rst:730 +#: c-api/init_config.rst:808 msgid "" -"The caller is responsible to handle exceptions (error or exit) using :c:func:" -"`PyStatus_Exception` and :c:func:`Py_ExitStatusException`." +"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:301 +#: c-api/init_config.rst:813 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 " -"UTF-8 Mode." +"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:308 -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``." +#: c-api/init_config.rst:820 +msgid "Install Python signal handlers?" msgstr "" -#: c-api/init_config.rst:313 -msgid "" -"Python memory allocation functions like :c:func:`PyMem_RawMalloc` must not " -"be used before Python preinitialization, whereas calling directly " -"``malloc()`` and ``free()`` is always safe. :c:func:`Py_DecodeLocale` must " -"not be called before the preinitialization." +#: c-api/init_config.rst:972 c-api/init_config.rst:1172 +msgid "Default: ``1`` in Python mode, ``0`` in isolated mode." msgstr "" -#: c-api/init_config.rst:318 -msgid "Example using the preinitialization to enable the UTF-8 Mode::" +#: c-api/init_config.rst:826 +msgid "If greater than ``0``, enable the interactive mode (REPL)." msgstr "" -#: c-api/init_config.rst:339 -msgid "PyConfig" +#: c-api/init_config.rst:828 +msgid "Incremented by the :option:`-i` command line option." msgstr "" -#: c-api/init_config.rst:343 -msgid "Structure containing most parameters to configure Python." +#: c-api/init_config.rst:834 +msgid "If greater than ``0``, enable isolated mode:" msgstr "" -#: c-api/init_config.rst:345 -msgid "Structure methods:" +#: c-api/init_config.rst:836 +msgid "" +"Set :c:member:`~PyConfig.safe_path` to ``1``: don't prepend a potentially " +"unsafe path to :data:`sys.path` at Python startup." msgstr "" -#: c-api/init_config.rst:349 +#: c-api/init_config.rst:1470 +msgid "Set :c:member:`~PyConfig.use_environment` to ``0``." +msgstr "" + +#: c-api/init_config.rst:840 msgid "" -"Initialize configuration with :ref:`Python Configuration `." +"Set :c:member:`~PyConfig.user_site_directory` to ``0``: don't add the user " +"site directory to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:354 +#: c-api/init_config.rst:842 msgid "" -"Initialize configuration with :ref:`Isolated Configuration `." +"Python REPL doesn't import :mod:`readline` nor enable default readline " +"configuration on interactive prompts." msgstr "" -#: c-api/init_config.rst:359 -msgid "Copy the wide character string *str* into ``*config_str``." +#: c-api/init_config.rst:845 +msgid "Set to ``1`` by the :option:`-I` command line option." msgstr "" -#: c-api/init_config.rst:367 c-api/init_config.rst:379 -#: c-api/init_config.rst:393 -msgid "Preinitialize Python if needed." +#: c-api/init_config.rst:849 +msgid "See also :c:member:`PyPreConfig.isolated`." msgstr "" -#: c-api/init_config.rst:365 +#: c-api/init_config.rst:853 msgid "" -"Decode *str* using ``Py_DecodeLocale()`` and set the result into " -"``*config_str``." +"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:857 +msgid "" +"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " +"is set to a non-empty string." msgstr "" -#: c-api/init_config.rst:371 -msgid "Set command line arguments from wide character strings." +#: c-api/init_config.rst:865 +msgid "See also the :pep:`528` (Change Windows console encoding to UTF-8)." msgstr "" -#: c-api/init_config.rst:377 +#: c-api/init_config.rst:869 msgid "" -"Set command line arguments: decode bytes using :c:func:`Py_DecodeLocale`." +"If non-zero, dump statistics on :ref:`Python pymalloc memory allocator " +"` at exit." msgstr "" -#: c-api/init_config.rst:383 -msgid "Set the list of wide strings *list* to *length* and *items*." +#: c-api/init_config.rst:872 +msgid "Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable." msgstr "" -#: c-api/init_config.rst:389 -msgid "Read all Python configuration." +#: c-api/init_config.rst:874 +msgid "" +"The option is ignored if Python is :option:`configured using the --without-" +"pymalloc option <--without-pymalloc>`." msgstr "" -#: c-api/init_config.rst:391 -msgid "Fields which are already initialized are left unchanged." +#: c-api/init_config.rst:881 +msgid "Platform library directory name: :data:`sys.platlibdir`." msgstr "" -#: c-api/init_config.rst:397 -msgid "Release configuration memory." +#: c-api/init_config.rst:883 +msgid "Set by the :envvar:`PYTHONPLATLIBDIR` environment variable." msgstr "" -#: c-api/init_config.rst:399 +#: c-api/init_config.rst:885 msgid "" -"Most ``PyConfig`` methods preinitialize Python if needed. In that case, the " -"Python preinitialization configuration 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:" +"Default: value of the ``PLATLIBDIR`` macro which is set by the :option:" +"`configure --with-platlibdir option <--with-platlibdir>` (default: " +"``\"lib\"``, or ``\"DLLs\"`` on Windows)." msgstr "" -#: c-api/init_config.rst:404 -msgid ":c:member:`~PyConfig.dev_mode`" +#: c-api/init_config.rst:893 +msgid "" +"This macro is now used on Windows to locate the standard library extension " +"modules, typically under ``DLLs``. However, for compatibility, note that " +"this value is ignored for any non-standard layouts, including in-tree builds " +"and virtual environments." msgstr "" -#: c-api/init_config.rst:405 -msgid ":c:member:`~PyConfig.isolated`" +#: c-api/init_config.rst:902 +msgid "" +"Module search paths (:data:`sys.path`) as a string separated by ``DELIM`` (:" +"data:`os.path.pathsep`)." msgstr "" -#: c-api/init_config.rst:406 -msgid ":c:member:`~PyConfig.parse_argv`" +#: c-api/init_config.rst:905 +msgid "Set by the :envvar:`PYTHONPATH` environment variable." msgstr "" -#: c-api/init_config.rst:407 -msgid ":c:member:`~PyConfig.use_environment`" +#: c-api/init_config.rst:914 +msgid "Module search paths: :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:409 +#: c-api/init_config.rst:916 msgid "" -"Moreover, if :c:func:`PyConfig_SetArgv` or :c:func:`PyConfig_SetBytesArgv` " -"is used, this method must be called first, before other methods, since the " -"preinitialization configuration depends on command line arguments (if :c:" -"member:`parse_argv` is non-zero)." +"If :c:member:`~PyConfig.module_search_paths_set` is equal to ``0``, :c:func:" +"`Py_InitializeFromConfig` will replace :c:member:`~PyConfig." +"module_search_paths` and sets :c:member:`~PyConfig.module_search_paths_set` " +"to ``1``." msgstr "" -#: c-api/init_config.rst:414 +#: c-api/init_config.rst:921 msgid "" -"The caller of these methods is responsible to handle exceptions (error or " -"exit) using ``PyStatus_Exception()`` and ``Py_ExitStatusException()``." +"Default: empty list (``module_search_paths``) and ``0`` " +"(``module_search_paths_set``)." msgstr "" -#: c-api/init_config.rst:421 -msgid "" -"Command line arguments, :data:`sys.argv`. See :c:member:`~PyConfig." -"parse_argv` to parse :c:member:`~PyConfig.argv` the same way the regular " -"Python parses Python command line arguments. If :c:member:`~PyConfig.argv` " -"is empty, an empty string is added to ensure that :data:`sys.argv` always " -"exists and is never empty." +#: c-api/init_config.rst:928 +msgid "Compilation optimization level:" msgstr "" -#: c-api/init_config.rst:429 -msgid ":data:`sys.base_exec_prefix`." +#: c-api/init_config.rst:930 +msgid "``0``: Peephole optimizer, set ``__debug__`` to ``True``." msgstr "" -#: c-api/init_config.rst:433 -msgid "" -":data:`sys._base_executable`: ``__PYVENV_LAUNCHER__`` environment variable " -"value, or copy of :c:member:`PyConfig.executable`." +#: c-api/init_config.rst:931 +msgid "``1``: Level 0, remove assertions, set ``__debug__`` to ``False``." msgstr "" -#: c-api/init_config.rst:438 -msgid ":data:`sys.base_prefix`." +#: c-api/init_config.rst:932 +msgid "``2``: Level 1, strip docstrings." msgstr "" -#: c-api/init_config.rst:442 +#: c-api/init_config.rst:934 msgid "" -":data:`sys.platlibdir`: platform library directory name, set at configure " -"time by ``--with-platlibdir``, overrideable by the ``PYTHONPLATLIBDIR`` " -"environment variable." +"Incremented by the :option:`-O` command line option. Set to the :envvar:" +"`PYTHONOPTIMIZE` environment variable value." msgstr "" -#: c-api/init_config.rst:450 +#: c-api/init_config.rst:941 msgid "" -"If equals to 0, enable unbuffered mode, making the stdout and stderr streams " -"unbuffered." +"The list of the original command line arguments passed to the Python " +"executable: :data:`sys.orig_argv`." msgstr "" -#: c-api/init_config.rst:453 -msgid "stdin is always opened in buffered mode." +#: c-api/init_config.rst:944 +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:457 +#: c-api/init_config.rst:951 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`. If equal or greater to 2, raise a :exc:`BytesWarning` exception." +"See also the :c:member:`~PyConfig.argv` member and the :c:func:" +"`Py_GetArgcArgv` function." msgstr "" -#: c-api/init_config.rst:464 -msgid "" -"Control the validation behavior of hash-based ``.pyc`` files (see :pep:" -"`552`): :option:`--check-hash-based-pycs` command line option value." +#: c-api/init_config.rst:1207 c-api/init_config.rst:1226 +msgid "Default: empty list." msgstr "" -#: c-api/init_config.rst:467 -msgid "Valid values: ``always``, ``never`` and ``default``." +#: c-api/init_config.rst:960 +msgid "Parse command line arguments?" msgstr "" -#: c-api/init_config.rst:469 -msgid "The default value is: ``default``." +#: c-api/init_config.rst:962 +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:473 +#: c-api/init_config.rst:974 msgid "" -"If non-zero, configure C standard streams (``stdio``, ``stdout``, " -"``stdout``). For example, set their mode to ``O_BINARY`` on Windows." +"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:478 -msgid "If non-zero, enable the :ref:`Python Development Mode `." +#: c-api/init_config.rst:980 +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:482 -msgid "If non-zero, dump all objects which are still alive at exit." +#: c-api/init_config.rst:983 +msgid "" +"Incremented by the :option:`-d` command line option. Set to the :envvar:" +"`PYTHONDEBUG` environment variable value." msgstr "" -#: c-api/init_config.rst:484 -msgid "``Py_TRACE_REFS`` macro must be defined in build." +#: c-api/init_config.rst:990 +msgid "" +"If non-zero, calculation of path configuration is allowed to log warnings " +"into ``stderr``. If equals to ``0``, suppress these warnings." msgstr "" -#: c-api/init_config.rst:488 -msgid ":data:`sys.exec_prefix`." +#: c-api/init_config.rst:997 +msgid "Now also applies on Windows." msgstr "" -#: c-api/init_config.rst:492 -msgid ":data:`sys.executable`." +#: c-api/init_config.rst:1002 +msgid "" +"The site-specific directory prefix where the platform independent Python " +"files are installed: :data:`sys.prefix`." msgstr "" -#: c-api/init_config.rst:496 -msgid "If non-zero, call :func:`faulthandler.enable` at startup." +#: c-api/init_config.rst:1011 +msgid "" +"Program name used to initialize :c:member:`~PyConfig.executable` and in " +"early error messages during Python initialization." msgstr "" -#: c-api/init_config.rst:500 -msgid "Filesystem encoding, :func:`sys.getfilesystemencoding`." +#: c-api/init_config.rst:1014 +msgid "If :func:`Py_SetProgramName` has been called, use its argument." msgstr "" -#: c-api/init_config.rst:504 -msgid "Filesystem encoding errors, :func:`sys.getfilesystemencodeerrors`." +#: c-api/init_config.rst:1015 +msgid "On macOS, use :envvar:`PYTHONEXECUTABLE` environment variable if set." msgstr "" -#: c-api/init_config.rst:509 -msgid "Randomized hash function seed." +#: c-api/init_config.rst:1016 +msgid "" +"If the ``WITH_NEXT_FRAMEWORK`` macro is defined, use :envvar:" +"`__PYVENV_LAUNCHER__` environment variable if set." msgstr "" -#: c-api/init_config.rst:511 +#: c-api/init_config.rst:1018 msgid "" -"If :c:member:`~PyConfig.use_hash_seed` is zero, a seed is chosen randomly at " -"Pythonstartup, and :c:member:`~PyConfig.hash_seed` is ignored." +"Use ``argv[0]`` of :c:member:`~PyConfig.argv` if available and non-empty." msgstr "" -#: c-api/init_config.rst:516 -msgid "Python home directory." +#: c-api/init_config.rst:1020 +msgid "" +"Otherwise, use ``L\"python\"`` on Windows, or ``L\"python3\"`` on other " +"platforms." msgstr "" -#: c-api/init_config.rst:518 +#: c-api/init_config.rst:1029 msgid "" -"Initialized from :envvar:`PYTHONHOME` environment variable value by default." +"Directory where cached ``.pyc`` files are written: :data:`sys." +"pycache_prefix`." msgstr "" -#: c-api/init_config.rst:523 -msgid "If non-zero, profile import time." +#: c-api/init_config.rst:1032 +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:527 -msgid "Enter interactive mode after executing a script or a command." +#: c-api/init_config.rst:1035 +msgid "If ``NULL``, :data:`sys.pycache_prefix` is set to ``None``." msgstr "" -#: c-api/init_config.rst:531 -msgid "Install signal handlers?" +#: c-api/init_config.rst:1041 +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:535 -#, fuzzy -msgid "Interactive mode." -msgstr "Mode interactif" +#: c-api/init_config.rst:1044 +msgid "Incremented by the :option:`-q` command line option." +msgstr "" -#: c-api/init_config.rst:539 -msgid "If greater than 0, enable isolated mode:" +#: c-api/init_config.rst:1050 +msgid "Value of the :option:`-c` command line option." msgstr "" -#: c-api/init_config.rst:541 -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." +#: c-api/init_config.rst:1073 +msgid "Used by :c:func:`Py_RunMain`." msgstr "" -#: c-api/init_config.rst:544 +#: c-api/init_config.rst:1058 msgid "" -"Python REPL doesn't import :mod:`readline` nor enable default readline " -"configuration on interactive prompts." +"Filename passed on the command line: trailing command line argument without :" +"option:`-c` or :option:`-m`. It is used by the :c:func:`Py_RunMain` function." msgstr "" -#: c-api/init_config.rst:546 +#: c-api/init_config.rst:1062 msgid "" -"Set :c:member:`~PyConfig.use_environment` and :c:member:`~PyConfig." -"user_site_directory` to 0." +"For example, it is set to ``script.py`` by the ``python3 script.py arg`` " +"command line." msgstr "" -#: c-api/init_config.rst:551 -msgid "" -"If non-zero, use :class:`io.FileIO` instead of :class:`io.WindowsConsoleIO` " -"for :data:`sys.stdin`, :data:`sys.stdout` and :data:`sys.stderr`." +#: c-api/init_config.rst:1065 +msgid "See also the :c:member:`PyConfig.skip_source_first_line` option." msgstr "" -#: c-api/init_config.rst:560 -msgid "" -"If non-zero, dump statistics on :ref:`Python pymalloc memory allocator " -"` at exit." +#: c-api/init_config.rst:1071 +msgid "Value of the :option:`-m` command line option." msgstr "" -#: c-api/init_config.rst:563 -msgid "The option is ignored if Python is built using ``--without-pymalloc``." +#: c-api/init_config.rst:1079 +msgid "Show total reference count at exit?" +msgstr "" + +#: c-api/init_config.rst:1081 +msgid "Set to ``1`` by :option:`-X showrefcount <-X>` command line option." msgstr "" -#: c-api/init_config.rst:567 +#: c-api/init_config.rst:1083 msgid "" -"Module search paths as a string separated by ``DELIM`` (:data:`os.path." -"pathsep`)." +"Need a :ref:`debug build of Python ` (the ``Py_REF_DEBUG`` " +"macro must be defined)." msgstr "" -#: c-api/init_config.rst:570 +#: c-api/init_config.rst:1090 +msgid "Import the :mod:`site` module at startup?" +msgstr "" + +#: c-api/init_config.rst:1092 msgid "" -"Initialized from :envvar:`PYTHONPATH` environment variable value by default." +"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:576 +#: c-api/init_config.rst:1095 msgid "" -":data:`sys.path`. If :c:member:`~PyConfig.module_search_paths_set` is equal " -"to 0, the :c:member:`~PyConfig.module_search_paths` is overridden by the " -"function calculating the :ref:`Path Configuration `." +"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:583 -msgid "Compilation optimization level:" +#: c-api/init_config.rst:1098 +msgid "Set to ``0`` by the :option:`-S` command line option." msgstr "" -#: c-api/init_config.rst:585 -msgid "0: Peephole optimizer (and ``__debug__`` is set to ``True``)" +#: c-api/init_config.rst:1100 +msgid "" +":data:`sys.flags.no_site` is set to the inverted value of :c:member:" +"`~PyConfig.site_import`." +msgstr "" + +#: c-api/init_config.rst:1107 +msgid "" +"If non-zero, skip the first line of the :c:member:`PyConfig.run_filename` " +"source." msgstr "" -#: c-api/init_config.rst:586 -msgid "1: Remove assertions, set ``__debug__`` to ``False``" +#: c-api/init_config.rst:1110 +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:587 -msgid "2: Strip docstrings" +#: c-api/init_config.rst:1113 +msgid "Set to ``1`` by the :option:`-x` command line option." msgstr "" -#: c-api/init_config.rst:591 +#: c-api/init_config.rst:1120 msgid "" -"If non-zero, parse :c:member:`~PyConfig.argv` the same way the regular " -"Python command line arguments, and strip Python arguments from :c:member:" -"`~PyConfig.argv`: see :ref:`Command Line Arguments `." +"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:598 +#: c-api/init_config.rst:1124 msgid "" -"If non-zero, turn on parser debugging output (for expert only, depending on " -"compilation options)." +"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:603 +#: c-api/init_config.rst:1127 msgid "" -"If equal to 0, suppress warnings when calculating the :ref:`Path " -"Configuration ` (Unix only, Windows does not log any " -"warning). Otherwise, warnings are written into ``stderr``." +"Use the :envvar:`PYTHONIOENCODING` environment variable if it is non-empty." msgstr "" -#: c-api/init_config.rst:609 -msgid ":data:`sys.prefix`." +#: c-api/init_config.rst:1130 +msgid "Default encoding:" msgstr "" -#: c-api/init_config.rst:613 -msgid "" -"Program name. Used to initialize :c:member:`~PyConfig.executable`, and in " -"early error messages." +#: c-api/init_config.rst:1132 +msgid "``\"UTF-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." msgstr "" -#: c-api/init_config.rst:618 -msgid ":data:`sys.pycache_prefix`: ``.pyc`` cache prefix." +#: c-api/init_config.rst:1133 +msgid "Otherwise, use the :term:`locale encoding`." msgstr "" -#: c-api/init_config.rst:620 -msgid "If ``NULL``, :data:`sys.pycache_prefix` is set to ``None``." +#: c-api/init_config.rst:1135 +msgid "Default error handler:" +msgstr "" + +#: c-api/init_config.rst:1137 +msgid "On Windows: use ``\"surrogateescape\"``." msgstr "" -#: c-api/init_config.rst:624 +#: c-api/init_config.rst:1138 msgid "" -"Quiet mode. For example, don't display the copyright and version messages in " -"interactive mode." +"``\"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:629 -msgid "``python3 -c COMMAND`` argument. Used by :c:func:`Py_RunMain`." +#: c-api/init_config.rst:1140 +msgid "``\"strict\"`` otherwise." msgstr "" -#: c-api/init_config.rst:633 -msgid "``python3 FILENAME`` argument. Used by :c:func:`Py_RunMain`." +#: c-api/init_config.rst:1144 +msgid "Enable tracemalloc?" msgstr "" -#: c-api/init_config.rst:637 -msgid "``python3 -m MODULE`` argument. Used by :c:func:`Py_RunMain`." +#: c-api/init_config.rst:1146 +msgid "If non-zero, call :func:`tracemalloc.start` at startup." msgstr "" -#: c-api/init_config.rst:641 -msgid "Show total reference count at exit?" +#: c-api/init_config.rst:1148 +msgid "" +"Set by :option:`-X tracemalloc=N <-X>` command line option and by the :" +"envvar:`PYTHONTRACEMALLOC` environment variable." msgstr "" -#: c-api/init_config.rst:643 -msgid "Set to 1 by :option:`-X showrefcount <-X>` command line option." +#: c-api/init_config.rst:1155 +msgid "Use :ref:`environment variables `?" msgstr "" -#: c-api/init_config.rst:645 -msgid "Need a debug build of Python (``Py_REF_DEBUG`` macro must be defined)." +#: c-api/init_config.rst:1157 +msgid "" +"If equals to zero, ignore the :ref:`environment variables `." msgstr "" -#: c-api/init_config.rst:649 -msgid "Import the :mod:`site` module at startup?" +#: c-api/init_config.rst:1160 +msgid "Set to ``0`` by the :option:`-E` environment variable." msgstr "" -#: c-api/init_config.rst:653 -msgid "Skip the first line of the source?" +#: c-api/init_config.rst:1166 +msgid "If non-zero, add the user site directory to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:658 -msgid "" -"Encoding and encoding errors of :data:`sys.stdin`, :data:`sys.stdout` and :" -"data:`sys.stderr`." +#: c-api/init_config.rst:1168 +msgid "Set to ``0`` by the :option:`-s` and :option:`-I` command line options." msgstr "" -#: c-api/init_config.rst:663 -msgid "If non-zero, call :func:`tracemalloc.start` at startup." +#: c-api/init_config.rst:1170 +msgid "Set to ``0`` by the :envvar:`PYTHONNOUSERSITE` environment variable." msgstr "" -#: c-api/init_config.rst:667 -msgid "If greater than 0, use :ref:`environment variables `." +#: c-api/init_config.rst:1176 +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:1180 +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:671 -msgid "If non-zero, add user site directory to :data:`sys.path`." +#: c-api/init_config.rst:1184 +msgid "Incremented by the :option:`-v` command line option." msgstr "" -#: c-api/init_config.rst:675 -msgid "If non-zero, enable verbose mode." +#: c-api/init_config.rst:1186 +msgid "Set to the :envvar:`PYTHONVERBOSE` environment variable value." msgstr "" -#: c-api/init_config.rst:679 +#: c-api/init_config.rst:1192 msgid "" -":data:`sys.warnoptions`: options of the :mod:`warnings` module to build " -"warnings filters: lowest to highest priority." +"Options of the :mod:`warnings` module to build warnings filters, lowest to " +"highest priority: :data:`sys.warnoptions`." msgstr "" -#: c-api/init_config.rst:682 +#: c-api/init_config.rst:1195 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:689 -msgid "If non-zero, write ``.pyc`` files." +#: c-api/init_config.rst:1200 +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:691 +#: c-api/init_config.rst:1203 msgid "" -":data:`sys.dont_write_bytecode` is initialized to the inverted value of :c:" -"member:`~PyConfig.write_bytecode`." +"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:696 -msgid ":data:`sys._xoptions`." +#: c-api/init_config.rst:1211 +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:700 -msgid "Enable PEG parser? Default: 1." +#: c-api/init_config.rst:1214 +msgid "" +"Set to ``0`` by the :option:`-B` command line option and the :envvar:" +"`PYTHONDONTWRITEBYTECODE` environment variable." msgstr "" -#: c-api/init_config.rst:702 -msgid "Set to 0 by :option:`-X oldparser <-X>` and :envvar:`PYTHONOLDPARSER`." +#: c-api/init_config.rst:1217 +msgid "" +":data:`sys.dont_write_bytecode` is initialized to the inverted value of :c:" +"member:`~PyConfig.write_bytecode`." msgstr "" -#: c-api/init_config.rst:704 -msgid "See also :pep:`617`." +#: c-api/init_config.rst:1224 +msgid "Values of the :option:`-X` command line options: :data:`sys._xoptions`." msgstr "" -#: c-api/init_config.rst:708 +#: c-api/init_config.rst:1228 msgid "" -"If ``parse_argv`` is non-zero, ``argv`` arguments are parsed the same way " -"the regular Python parses command line arguments, and Python arguments are " -"stripped from ``argv``: see :ref:`Command Line Arguments `." +"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:713 +#: c-api/init_config.rst:1233 msgid "" -"The ``xoptions`` options are parsed to set other options: see :option:`-X` " -"option." +"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:718 +#: c-api/init_config.rst:1238 msgid "The ``show_alloc_count`` field has been removed." msgstr "" -#: c-api/init_config.rst:722 +#: c-api/init_config.rst:1242 msgid "Initialization with PyConfig" msgstr "" -#: c-api/init_config.rst:724 +#: c-api/init_config.rst:1244 msgid "Function to initialize Python:" msgstr "" -#: c-api/init_config.rst:728 +#: c-api/init_config.rst:1248 msgid "Initialize Python from *config* configuration." msgstr "" -#: c-api/init_config.rst:733 +#: c-api/init_config.rst:1253 msgid "" -"If ``PyImport_FrozenModules``, ``PyImport_AppendInittab()`` or " -"``PyImport_ExtendInittab()`` are used, they must be set or called after " -"Python preinitialization and before the Python initialization." +"If :c:func:`PyImport_FrozenModules`, :c:func:`PyImport_AppendInittab` or :c:" +"func:`PyImport_ExtendInittab` are used, they must be set or called after " +"Python preinitialization and before the Python initialization. If Python is " +"initialized multiple times, :c:func:`PyImport_AppendInittab` or :c:func:" +"`PyImport_ExtendInittab` must be called before each Python initialization." msgstr "" -#: c-api/init_config.rst:737 +#: c-api/init_config.rst:1260 +msgid "" +"The current configuration (``PyConfig`` type) is stored in " +"``PyInterpreterState.config``." +msgstr "" + +#: c-api/init_config.rst:1263 msgid "Example setting the program name::" msgstr "" -#: c-api/init_config.rst:765 +#: c-api/init_config.rst:1291 msgid "" "More complete example modifying the default configuration, read the " -"configuration, and then override some parameters::" +"configuration, and then override some parameters. Note that since 3.11, many " +"parameters are not calculated until initialization, and so values cannot be " +"read from the configuration structure. Any values set before initialize is " +"called will be left unchanged by initialization::" msgstr "" -#: c-api/init_config.rst:816 +#: c-api/init_config.rst:1354 msgid "Isolated Configuration" msgstr "" -#: c-api/init_config.rst:818 +#: c-api/init_config.rst:1356 msgid "" ":c:func:`PyPreConfig_InitIsolatedConfig` and :c:func:" "`PyConfig_InitIsolatedConfig` functions create a configuration to isolate " "Python from the system. For example, to embed Python into an application." msgstr "" -#: c-api/init_config.rst:823 +#: c-api/init_config.rst:1361 msgid "" -"This configuration ignores global configuration variables, environments " +"This configuration ignores global configuration variables, environment " "variables, command line arguments (:c:member:`PyConfig.argv` is not parsed) " "and user site directory. The C standard streams (ex: ``stdout``) and the " "LC_CTYPE locale are left unchanged. Signal handlers are not installed." msgstr "" -#: c-api/init_config.rst:828 +#: c-api/init_config.rst:1366 msgid "" -"Configuration files are still used with this configuration. Set the :ref:" -"`Path Configuration ` (\"output fields\") to ignore these " -"configuration files and avoid the function computing the default path " -"configuration." +"Configuration files are still used with this configuration to determine " +"paths that are unspecified. Ensure :c:member:`PyConfig.home` is specified to " +"avoid computing the default path configuration." msgstr "" -#: c-api/init_config.rst:837 +#: c-api/init_config.rst:1374 msgid "Python Configuration" msgstr "" -#: c-api/init_config.rst:839 +#: c-api/init_config.rst:1376 msgid "" ":c:func:`PyPreConfig_InitPythonConfig` and :c:func:" "`PyConfig_InitPythonConfig` functions create a configuration to build a " "customized Python which behaves as the regular Python." msgstr "" -#: c-api/init_config.rst:843 +#: c-api/init_config.rst:1380 msgid "" "Environments variables and command line arguments are used to configure " "Python, whereas global configuration variables are ignored." msgstr "" -#: c-api/init_config.rst:846 +#: c-api/init_config.rst:1383 msgid "" -"This function enables C locale coercion (:pep:`538`) and UTF-8 Mode (:pep:" -"`540`) depending on the LC_CTYPE locale, :envvar:`PYTHONUTF8` and :envvar:" -"`PYTHONCOERCECLOCALE` environment variables." -msgstr "" - -#: c-api/init_config.rst:850 -msgid "Example of customized Python always running in isolated mode::" +"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:889 -msgid "Path Configuration" +#: c-api/init_config.rst:1392 +msgid "Python Path Configuration" msgstr "" -#: c-api/init_config.rst:891 +#: c-api/init_config.rst:1394 msgid ":c:type:`PyConfig` contains multiple fields for the path configuration:" msgstr "" -#: c-api/init_config.rst:893 +#: c-api/init_config.rst:1396 msgid "Path configuration inputs:" msgstr "" -#: c-api/init_config.rst:895 +#: c-api/init_config.rst:1398 msgid ":c:member:`PyConfig.home`" msgstr "" -#: c-api/init_config.rst:896 +#: c-api/init_config.rst:1399 msgid ":c:member:`PyConfig.platlibdir`" msgstr "" -#: c-api/init_config.rst:897 +#: c-api/init_config.rst:1400 msgid ":c:member:`PyConfig.pathconfig_warnings`" msgstr "" -#: c-api/init_config.rst:898 +#: c-api/init_config.rst:1401 msgid ":c:member:`PyConfig.program_name`" msgstr "" -#: c-api/init_config.rst:899 +#: c-api/init_config.rst:1402 msgid ":c:member:`PyConfig.pythonpath_env`" msgstr "" -#: c-api/init_config.rst:900 +#: c-api/init_config.rst:1403 msgid "current working directory: to get absolute paths" msgstr "" -#: c-api/init_config.rst:901 +#: c-api/init_config.rst:1404 msgid "" "``PATH`` environment variable to get the program full path (from :c:member:" "`PyConfig.program_name`)" msgstr "" -#: c-api/init_config.rst:903 +#: c-api/init_config.rst:1406 msgid "``__PYVENV_LAUNCHER__`` environment variable" msgstr "" -#: c-api/init_config.rst:904 +#: c-api/init_config.rst:1407 msgid "" -"(Windows only) Application paths in the registry under \"Software\\Python" -"\\PythonCore\\X.Y\\PythonPath\" of HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE " -"(where X.Y is the Python version)." +"(Windows only) Application paths in the registry under " +"\"Software\\Python\\PythonCore\\X.Y\\PythonPath\" of HKEY_CURRENT_USER and " +"HKEY_LOCAL_MACHINE (where X.Y is the Python version)." msgstr "" -#: c-api/init_config.rst:908 +#: c-api/init_config.rst:1411 msgid "Path configuration output fields:" msgstr "" -#: c-api/init_config.rst:910 +#: c-api/init_config.rst:1413 msgid ":c:member:`PyConfig.base_exec_prefix`" msgstr "" -#: c-api/init_config.rst:911 +#: c-api/init_config.rst:1414 msgid ":c:member:`PyConfig.base_executable`" msgstr "" -#: c-api/init_config.rst:912 +#: c-api/init_config.rst:1415 msgid ":c:member:`PyConfig.base_prefix`" msgstr "" -#: c-api/init_config.rst:913 +#: c-api/init_config.rst:1416 msgid ":c:member:`PyConfig.exec_prefix`" msgstr "" -#: c-api/init_config.rst:914 +#: c-api/init_config.rst:1417 msgid ":c:member:`PyConfig.executable`" msgstr "" -#: c-api/init_config.rst:915 +#: c-api/init_config.rst:1418 msgid "" ":c:member:`PyConfig.module_search_paths_set`, :c:member:`PyConfig." "module_search_paths`" msgstr "" -#: c-api/init_config.rst:917 +#: c-api/init_config.rst:1420 msgid ":c:member:`PyConfig.prefix`" msgstr "" -#: c-api/init_config.rst:919 +#: c-api/init_config.rst:1422 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_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." +"module_search_paths_set` is set to ``1``." msgstr "" -#: c-api/init_config.rst:925 +#: c-api/init_config.rst:1428 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." +"is set to ``1``. In this case, ``module_search_paths`` will be used without " +"modification." msgstr "" -#: c-api/init_config.rst:932 +#: c-api/init_config.rst:1435 msgid "" -"Set :c:member:`~PyConfig.pathconfig_warnings` to 0 to suppress warnings when " -"calculating the path configuration (Unix only, Windows does not log any " +"Set :c:member:`~PyConfig.pathconfig_warnings` to ``0`` to suppress warnings " +"when calculating the path configuration (Unix only, Windows does not log any " "warning)." msgstr "" -#: c-api/init_config.rst:935 +#: c-api/init_config.rst:1438 msgid "" "If :c:member:`~PyConfig.base_prefix` or :c:member:`~PyConfig." "base_exec_prefix` fields are not set, they inherit their value from :c:" "member:`~PyConfig.prefix` and :c:member:`~PyConfig.exec_prefix` respectively." msgstr "" -#: c-api/init_config.rst:939 +#: c-api/init_config.rst:1442 msgid ":c:func:`Py_RunMain` and :c:func:`Py_Main` modify :data:`sys.path`:" msgstr "" -#: c-api/init_config.rst:941 +#: c-api/init_config.rst:1444 msgid "" "If :c:member:`~PyConfig.run_filename` is set and is a directory which " "contains a ``__main__.py`` script, prepend :c:member:`~PyConfig." "run_filename` to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:944 +#: c-api/init_config.rst:1447 msgid "If :c:member:`~PyConfig.isolated` is zero:" msgstr "" -#: c-api/init_config.rst:946 +#: c-api/init_config.rst:1449 msgid "" "If :c:member:`~PyConfig.run_module` is set, prepend the current directory " "to :data:`sys.path`. Do nothing if the current directory cannot be read." msgstr "" -#: c-api/init_config.rst:948 +#: c-api/init_config.rst:1451 msgid "" "If :c:member:`~PyConfig.run_filename` is set, prepend the directory of the " "filename to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:950 +#: c-api/init_config.rst:1453 msgid "Otherwise, prepend an empty string to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:952 +#: c-api/init_config.rst:1455 msgid "" "If :c:member:`~PyConfig.site_import` is non-zero, :data:`sys.path` can be " "modified by the :mod:`site` module. If :c:member:`~PyConfig." @@ -1206,152 +1843,172 @@ msgid "" "data:`sys.path`." msgstr "" -#: c-api/init_config.rst:958 +#: c-api/init_config.rst:1461 msgid "The following configuration files are used by the path configuration:" msgstr "" -#: c-api/init_config.rst:960 +#: c-api/init_config.rst:1463 msgid "``pyvenv.cfg``" msgstr "" -#: c-api/init_config.rst:961 -msgid "``python._pth`` (Windows only)" +#: c-api/init_config.rst:1464 +msgid "``._pth`` file (ex: ``python._pth``)" msgstr "" -#: c-api/init_config.rst:962 +#: c-api/init_config.rst:1465 msgid "``pybuilddir.txt`` (Unix only)" msgstr "" -#: c-api/init_config.rst:964 +#: c-api/init_config.rst:1467 +msgid "If a ``._pth`` file is present:" +msgstr "" + +#: c-api/init_config.rst:1469 +msgid "Set :c:member:`~PyConfig.isolated` to ``1``." +msgstr "" + +#: c-api/init_config.rst:1471 +msgid "Set :c:member:`~PyConfig.site_import` to ``0``." +msgstr "" + +#: c-api/init_config.rst:1472 +msgid "Set :c:member:`~PyConfig.safe_path` to ``1``." +msgstr "" + +#: c-api/init_config.rst:1474 msgid "" "The ``__PYVENV_LAUNCHER__`` environment variable is used to set :c:member:" "`PyConfig.base_executable`" msgstr "" -#: c-api/init_config.rst:969 +#: c-api/init_config.rst:1479 msgid "Py_RunMain()" msgstr "" -#: c-api/init_config.rst:973 +#: c-api/init_config.rst:1483 msgid "" "Execute the command (:c:member:`PyConfig.run_command`), the script (:c:" "member:`PyConfig.run_filename`) or the module (:c:member:`PyConfig." "run_module`) specified on the command line or in the configuration." msgstr "" -#: c-api/init_config.rst:978 +#: c-api/init_config.rst:1488 msgid "By default and when if :option:`-i` option is used, run the REPL." msgstr "" -#: c-api/init_config.rst:980 +#: c-api/init_config.rst:1490 msgid "" "Finally, finalizes Python and returns an exit status that can be passed to " "the ``exit()`` function." msgstr "" -#: c-api/init_config.rst:983 +#: c-api/init_config.rst:1493 msgid "" "See :ref:`Python Configuration ` for an example of " "customized Python always running in isolated mode using :c:func:`Py_RunMain`." msgstr "" -#: c-api/init_config.rst:989 +#: c-api/init_config.rst:1499 msgid "Py_GetArgcArgv()" msgstr "" -#: c-api/init_config.rst:993 +#: c-api/init_config.rst:1503 msgid "Get the original command line arguments, before Python modified them." msgstr "" -#: c-api/init_config.rst:997 +#: c-api/init_config.rst:1505 +msgid "See also :c:member:`PyConfig.orig_argv` member." +msgstr "" + +#: c-api/init_config.rst:1509 msgid "Multi-Phase Initialization Private Provisional API" msgstr "" -#: c-api/init_config.rst:999 +#: c-api/init_config.rst:1511 msgid "" "This section is a private provisional API introducing multi-phase " -"initialization, the core feature of the :pep:`432`:" +"initialization, the core feature of :pep:`432`:" msgstr "" -#: c-api/init_config.rst:1002 +#: c-api/init_config.rst:1514 msgid "\"Core\" initialization phase, \"bare minimum Python\":" msgstr "" -#: c-api/init_config.rst:1004 +#: c-api/init_config.rst:1516 msgid "Builtin types;" msgstr "" -#: c-api/init_config.rst:1005 +#: c-api/init_config.rst:1517 msgid "Builtin exceptions;" msgstr "" -#: c-api/init_config.rst:1006 +#: c-api/init_config.rst:1518 msgid "Builtin and frozen modules;" msgstr "" -#: c-api/init_config.rst:1007 +#: c-api/init_config.rst:1519 msgid "" "The :mod:`sys` module is only partially initialized (ex: :data:`sys.path` " "doesn't exist yet)." msgstr "" -#: c-api/init_config.rst:1010 +#: c-api/init_config.rst:1522 msgid "\"Main\" initialization phase, Python is fully initialized:" msgstr "" -#: c-api/init_config.rst:1012 +#: c-api/init_config.rst:1524 msgid "Install and configure :mod:`importlib`;" msgstr "" -#: c-api/init_config.rst:1013 +#: c-api/init_config.rst:1525 msgid "Apply the :ref:`Path Configuration `;" msgstr "" -#: c-api/init_config.rst:1014 +#: c-api/init_config.rst:1526 msgid "Install signal handlers;" msgstr "" -#: c-api/init_config.rst:1015 +#: c-api/init_config.rst:1527 msgid "" "Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` and :" "data:`sys.path`);" msgstr "" -#: c-api/init_config.rst:1017 +#: c-api/init_config.rst:1529 msgid "" "Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`;" msgstr "" -#: c-api/init_config.rst:1018 +#: c-api/init_config.rst:1530 msgid "Import the :mod:`site` module;" msgstr "" -#: c-api/init_config.rst:1019 +#: c-api/init_config.rst:1531 msgid "etc." msgstr "" -#: c-api/init_config.rst:1021 +#: c-api/init_config.rst:1533 msgid "Private provisional API:" msgstr "" -#: c-api/init_config.rst:1023 +#: c-api/init_config.rst:1535 msgid "" -":c:member:`PyConfig._init_main`: if set to 0, :c:func:" +":c:member:`PyConfig._init_main`: if set to ``0``, :c:func:" "`Py_InitializeFromConfig` stops at the \"Core\" initialization phase." msgstr "" -#: c-api/init_config.rst:1025 +#: c-api/init_config.rst:1537 msgid "" ":c:member:`PyConfig._isolated_interpreter`: if non-zero, disallow threads, " "subprocesses and fork." msgstr "" -#: c-api/init_config.rst:1030 +#: c-api/init_config.rst:1542 msgid "" "Move to the \"Main\" initialization phase, finish the Python initialization." msgstr "" -#: c-api/init_config.rst:1032 +#: c-api/init_config.rst:1544 msgid "" "No module is imported during the \"Core\" phase and the ``importlib`` module " "is not configured: the :ref:`Path Configuration ` is only " @@ -1360,14 +2017,14 @@ msgid "" "maybe install a custom :data:`sys.meta_path` importer or an import hook, etc." msgstr "" -#: c-api/init_config.rst:1038 +#: c-api/init_config.rst:1550 msgid "" "It may become possible to calculatin the :ref:`Path Configuration ` in Python, after the Core phase and before the Main phase, which is " "one of the :pep:`432` motivation." msgstr "" -#: c-api/init_config.rst:1042 +#: c-api/init_config.rst:1554 msgid "" "The \"Core\" phase is not properly defined: what should be and what should " "not be available at this phase is not specified yet. The API is marked as " @@ -1375,8 +2032,16 @@ msgid "" "until a proper public API is designed." msgstr "" -#: c-api/init_config.rst:1047 +#: c-api/init_config.rst:1559 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 index 0cb8dfac03..006f916632 100644 --- a/c-api/intro.po +++ b/c-api/intro.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -158,118 +158,159 @@ msgid "" msgstr "" #: c-api/intro.rst:110 +#, fuzzy +msgid "Return the absolute value of ``x``." +msgstr "Renvoie la valeur absolue de *x*." + +#: c-api/intro.rst:116 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." +"Ask the compiler to always inline a static inline function. The compiler can " +"ignore it and decides to not inline the function." msgstr "" -#: c-api/intro.rst:115 +#: c-api/intro.rst:119 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." +"It can be used to inline performance critical static inline functions when " +"building Python in debug mode with function inlining disabled. For example, " +"MSC disables function inlining when building in debug mode." msgstr "" -#: c-api/intro.rst:119 +#: c-api/intro.rst:123 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`." +"Marking blindly a static inline function with Py_ALWAYS_INLINE can result in " +"worse performances (due to increased code size for example). The compiler is " +"usually smarter than the developer for the cost/benefit analysis." msgstr "" -#: c-api/intro.rst:122 +#: c-api/intro.rst:127 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." +"If Python is :ref:`built in debug mode ` (if the ``Py_DEBUG`` " +"macro is defined), the :c:macro:`Py_ALWAYS_INLINE` macro does nothing." 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:130 +msgid "It must be specified before the function return type. Usage::" +msgstr "" #: c-api/intro.rst:138 -msgid "Return the minimum value between ``x`` and ``y``." +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:144 -msgid "Return the maximum value between ``x`` and ``y``." +#: c-api/intro.rst:143 +msgid "" +"Use this for deprecated declarations. The macro must be placed before the " +"symbol name." msgstr "" +#: c-api/intro.rst:232 c-api/intro.rst:250 +msgid "Example::" +msgstr "Exemple ::" + #: c-api/intro.rst:150 +msgid "MSVC support was added." +msgstr "" + +#: c-api/intro.rst:155 msgid "" -"Convert ``x`` to a C string. E.g. ``Py_STRINGIFY(123)`` returns ``\"123\"``." +"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:157 +#: c-api/intro.rst:160 +msgid "Return the maximum value between ``x`` and ``y``." +msgstr "" + +#: c-api/intro.rst:166 msgid "Return the size of a structure (``type``) ``member`` in bytes." msgstr "" -#: c-api/intro.rst:163 +#: c-api/intro.rst:172 +msgid "Return the minimum value between ``x`` and ``y``." +msgstr "" + +#: c-api/intro.rst:178 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``." +"Disable inlining on a function. For example, it reduces the C stack " +"consumption: useful on LTO+PGO builds which heavily inline code (see :issue:" +"`33720`)." msgstr "" -#: c-api/intro.rst:168 +#: c-api/intro.rst:182 +msgid "Usage::" +msgstr "" + +#: c-api/intro.rst:190 msgid "" -"Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the " -"command line (i.e. if ``Py_IgnoreEnvironmentFlag`` is set)." +"Convert ``x`` to a C string. E.g. ``Py_STRINGIFY(123)`` returns ``\"123\"``." msgstr "" -#: c-api/intro.rst:173 +#: c-api/intro.rst:197 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; }``." +"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:180 +#: c-api/intro.rst:202 msgid "" -"Use this for deprecated declarations. The macro must be placed before the " -"symbol name." +"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:198 c-api/intro.rst:216 -msgid "Example::" -msgstr "Exemple ::" +#: c-api/intro.rst:206 +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:187 -msgid "MSVC support was added." +#: c-api/intro.rst:209 +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:192 +#: c-api/intro.rst:219 +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:226 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 +#: c-api/intro.rst:229 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 +#: c-api/intro.rst:244 msgid "" "Creates a docstring for the given input string or an empty string if " "docstrings are disabled." msgstr "" -#: c-api/intro.rst:213 +#: c-api/intro.rst:247 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 +#: c-api/intro.rst:262 msgid "Objects, Types and Reference Counts" msgstr "" -#: c-api/intro.rst:231 +#: c-api/intro.rst:266 msgid "" "Most Python/C API functions have one or more arguments as well as a return " "value of type :c:type:`PyObject*`. This type is a pointer to an opaque data " @@ -284,7 +325,7 @@ msgid "" "objects." msgstr "" -#: c-api/intro.rst:242 +#: c-api/intro.rst:277 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." @@ -295,11 +336,11 @@ msgid "" "a Python list." msgstr "" -#: c-api/intro.rst:253 +#: c-api/intro.rst:288 msgid "Reference Counts" msgstr "Compteurs de références" -#: c-api/intro.rst:255 +#: c-api/intro.rst:290 msgid "" "The reference count is important because today's computers have a finite " "(and often severely limited) memory size; it counts how many different " @@ -313,7 +354,7 @@ msgid "" "for now, the solution is \"don't do that.\")" msgstr "" -#: c-api/intro.rst:270 +#: c-api/intro.rst:305 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 " @@ -331,7 +372,7 @@ msgid "" "reference count increment is a simple operation." msgstr "" -#: c-api/intro.rst:284 +#: c-api/intro.rst:319 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 " @@ -348,7 +389,7 @@ msgid "" "to hold a reference to every argument for the duration of the call." msgstr "" -#: c-api/intro.rst:298 +#: c-api/intro.rst:333 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 " @@ -359,7 +400,7 @@ msgid "" "from a :c:func:`Py_DECREF`, so almost any operation is potentially dangerous." msgstr "" -#: c-api/intro.rst:306 +#: c-api/intro.rst:341 msgid "" "A safe approach is to always use the generic operations (functions whose " "name begins with ``PyObject_``, ``PyNumber_``, ``PySequence_`` or " @@ -369,11 +410,11 @@ msgid "" "becomes second nature." msgstr "" -#: c-api/intro.rst:316 +#: c-api/intro.rst:351 msgid "Reference Count Details" msgstr "" -#: c-api/intro.rst:318 +#: c-api/intro.rst:353 msgid "" "The reference count behavior of functions in the Python/C API is best " "explained in terms of *ownership of references*. Ownership pertains to " @@ -386,11 +427,11 @@ msgid "" "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 borrowed " -"reference." +"said to *borrow* the reference. Nothing needs to be done for a :term:" +"`borrowed reference`." msgstr "" -#: c-api/intro.rst:331 +#: c-api/intro.rst:366 msgid "" "Conversely, when a calling function passes in a reference to an object, " "there are two possibilities: the function *steals* a reference to the " @@ -399,7 +440,7 @@ msgid "" "reference, and you are not responsible for it any longer." msgstr "" -#: c-api/intro.rst:341 +#: c-api/intro.rst:376 msgid "" "Few functions steal references; the two notable exceptions are :c:func:" "`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a reference to " @@ -411,7 +452,7 @@ msgid "" "below)::" msgstr "" -#: c-api/intro.rst:356 +#: c-api/intro.rst:391 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 " @@ -419,7 +460,7 @@ msgid "" "another reference before calling the reference-stealing function." msgstr "" -#: c-api/intro.rst:361 +#: c-api/intro.rst:396 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 " @@ -427,13 +468,13 @@ msgid "" "func:`PyTuple_SetItem` for tuples that you are creating yourself." msgstr "" -#: c-api/intro.rst:366 +#: c-api/intro.rst:401 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 +#: c-api/intro.rst:404 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:" @@ -442,7 +483,7 @@ msgid "" "be replaced by the following (which also takes care of the error checking)::" msgstr "" -#: c-api/intro.rst:380 +#: c-api/intro.rst:415 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 " @@ -453,7 +494,7 @@ msgid "" "sequence) to a given item::" msgstr "" -#: c-api/intro.rst:410 +#: c-api/intro.rst:445 msgid "" "The situation is slightly different for function return values. While " "passing a reference to most functions does not change your ownership " @@ -466,7 +507,7 @@ msgid "" "becomes the owner of the reference)." msgstr "" -#: c-api/intro.rst:419 +#: c-api/intro.rst:454 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 " @@ -477,18 +518,18 @@ msgid "" "the same arguments), you do own a reference to the returned object." msgstr "" -#: c-api/intro.rst:431 +#: c-api/intro.rst:466 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 +#: c-api/intro.rst:530 msgid "Types" msgstr "" -#: c-api/intro.rst:497 +#: c-api/intro.rst:532 msgid "" "There are few other data types that play a significant role in the Python/C " "API; most are simple C types such as :c:type:`int`, :c:type:`long`, :c:type:" @@ -499,11 +540,19 @@ msgid "" "that use them." msgstr "" -#: c-api/intro.rst:509 +#: c-api/intro.rst:542 +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:551 msgid "Exceptions" msgstr "Exceptions" -#: c-api/intro.rst:511 +#: c-api/intro.rst:553 msgid "" "The Python programmer only needs to deal with exceptions if specific error " "handling is required; unhandled exceptions are automatically propagated to " @@ -512,7 +561,7 @@ msgid "" "stack traceback." msgstr "" -#: c-api/intro.rst:519 +#: c-api/intro.rst:561 msgid "" "For C programmers, however, error checking always has to be explicit. All " "functions in the Python/C API can raise exceptions, unless an explicit claim " @@ -527,7 +576,7 @@ msgid "" "explicitly documented." msgstr "" -#: c-api/intro.rst:534 +#: c-api/intro.rst:576 msgid "" "Exception state is maintained in per-thread storage (this is equivalent to " "using global storage in an unthreaded application). A thread can be in one " @@ -540,7 +589,7 @@ msgid "" "clears the exception state." msgstr "" -#: c-api/intro.rst:544 +#: c-api/intro.rst:586 msgid "" "The full exception state consists of three objects (all of which can be " "``NULL``): the exception type, the corresponding exception value, and the " @@ -553,7 +602,7 @@ msgid "" "``sys.exc_info()`` and friends." msgstr "" -#: c-api/intro.rst:556 +#: c-api/intro.rst:598 msgid "" "Note that starting with Python 1.5, the preferred, thread-safe way to access " "the exception state from Python code is to call the function :func:`sys." @@ -567,7 +616,7 @@ msgid "" "referenced by the stack frames in the traceback." msgstr "" -#: c-api/intro.rst:567 +#: c-api/intro.rst:609 msgid "" "As a general principle, a function that calls another function to perform " "some task should check whether the called function raised an exception, and " @@ -578,7 +627,7 @@ msgid "" "of the error." msgstr "" -#: c-api/intro.rst:576 +#: c-api/intro.rst:618 msgid "" "A simple example of detecting exceptions and passing them on is shown in " "the :c:func:`sum_sequence` example above. It so happens that this example " @@ -587,11 +636,11 @@ msgid "" "why you like Python, we show the equivalent Python code::" msgstr "" -#: c-api/intro.rst:591 +#: c-api/intro.rst:633 msgid "Here is the corresponding C code, in all its glory::" msgstr "" -#: c-api/intro.rst:643 +#: c-api/intro.rst:685 msgid "" "This example represents an endorsed use of the ``goto`` statement in C! It " "illustrates the use of :c:func:`PyErr_ExceptionMatches` and :c:func:" @@ -604,11 +653,11 @@ msgid "" "success after the final call made is successful." msgstr "" -#: c-api/intro.rst:657 +#: c-api/intro.rst:699 msgid "Embedding Python" msgstr "Embarquer Python" -#: c-api/intro.rst:659 +#: c-api/intro.rst:701 msgid "" "The one important task that only embedders (as opposed to extension writers) " "of the Python interpreter have to worry about is the initialization, and " @@ -616,7 +665,7 @@ msgid "" "the interpreter can only be used after the interpreter has been initialized." msgstr "" -#: c-api/intro.rst:672 +#: c-api/intro.rst:714 msgid "" "The basic initialization function is :c:func:`Py_Initialize`. This " "initializes the table of loaded modules, and creates the fundamental " @@ -624,15 +673,15 @@ msgid "" "initializes the module search path (``sys.path``)." msgstr "" -#: c-api/intro.rst:679 +#: c-api/intro.rst:719 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`." +"later, setting :c:member:`PyConfig.argv` and :c:member:`PyConfig.parse_argv` " +"must be set: see :ref:`Python Initialization Configuration `." msgstr "" -#: c-api/intro.rst:684 +#: c-api/intro.rst:724 msgid "" "On most systems (in particular, on Unix and Windows, although the details " "are slightly different), :c:func:`Py_Initialize` calculates the module " @@ -644,7 +693,7 @@ msgid "" "on the shell command search path (the environment variable :envvar:`PATH`)." msgstr "" -#: c-api/intro.rst:693 +#: c-api/intro.rst:733 msgid "" "For instance, if the Python executable is found in :file:`/usr/local/bin/" "python`, it will assume that the libraries are in :file:`/usr/local/lib/" @@ -655,7 +704,7 @@ msgid "" "in front of the standard path by setting :envvar:`PYTHONPATH`." msgstr "" -#: c-api/intro.rst:708 +#: c-api/intro.rst:748 msgid "" "The embedding application can steer the search by calling " "``Py_SetProgramName(file)`` *before* calling :c:func:`Py_Initialize`. Note " @@ -666,7 +715,7 @@ msgid "" "func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)." msgstr "" -#: c-api/intro.rst:718 +#: c-api/intro.rst:758 msgid "" "Sometimes, it is desirable to \"uninitialize\" Python. For instance, the " "application may want to start over (make another call to :c:func:" @@ -680,18 +729,18 @@ msgid "" "released." msgstr "" -#: c-api/intro.rst:732 +#: c-api/intro.rst:772 msgid "Debugging Builds" msgstr "" -#: c-api/intro.rst:734 +#: c-api/intro.rst:774 msgid "" "Python can be built with several macros to enable extra checks of the " "interpreter and extension modules. These checks tend to add a large amount " "of overhead to the runtime so they are not enabled by default." msgstr "" -#: c-api/intro.rst:738 +#: c-api/intro.rst:778 msgid "" "A full list of the various types of debugging builds is in the file :file:" "`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are " @@ -701,81 +750,34 @@ msgid "" "section." msgstr "" -#: c-api/intro.rst:744 +#: c-api/intro.rst:784 msgid "" "Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined " -"produces what is generally meant by \"a debug build\" of Python. :c:macro:" -"`Py_DEBUG` is enabled in the Unix build by adding ``--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:751 -msgid "" -"In addition to the reference count debugging described below, the following " -"extra checks are performed:" -msgstr "" - -#: c-api/intro.rst:754 -msgid "Extra checks are added to the object allocator." -msgstr "" - -#: c-api/intro.rst:756 -msgid "Extra checks are added to the parser and compiler." -msgstr "" - -#: c-api/intro.rst:758 -msgid "" -"Downcasts from wide types to narrow types are checked for loss of " -"information." +"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:760 +#: c-api/intro.rst:792 msgid "" -"A number of assertions are added to the dictionary and set implementations. " -"In addition, the set object acquires a :meth:`test_c_api` method." -msgstr "" - -#: c-api/intro.rst:763 -msgid "Sanity checks of the input arguments are added to frame creation." -msgstr "" - -#: c-api/intro.rst:765 -msgid "" -"The storage for ints is initialized with a known invalid pattern to catch " -"reference to uninitialized digits." -msgstr "" - -#: c-api/intro.rst:768 -msgid "" -"Low-level tracing and extra exception checking are added to the runtime " -"virtual machine." -msgstr "" - -#: c-api/intro.rst:771 -msgid "Extra checks are added to the memory arena implementation." -msgstr "" - -#: c-api/intro.rst:773 -msgid "Extra debugging is added to the thread module." -msgstr "" - -#: c-api/intro.rst:775 -msgid "There may be additional checks not mentioned here." +"In addition to the reference count debugging described below, extra checks " +"are performed, see :ref:`Python Debug Build `." msgstr "" -#: c-api/intro.rst:777 +#: c-api/intro.rst:795 msgid "" -"Defining :c:macro:`Py_TRACE_REFS` enables reference tracing. When defined, " -"a circular doubly linked list of active objects is maintained by adding two " +"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.) Implied by :c:" -"macro:`Py_DEBUG`." +"this happens after every statement run by the interpreter.)" msgstr "" -#: c-api/intro.rst:783 +#: c-api/intro.rst:802 msgid "" "Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source " "distribution for more detailed information." diff --git a/c-api/iter.po b/c-api/iter.po index 97199fdd17..dfb7a0e14f 100644 --- a/c-api/iter.po +++ b/c-api/iter.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2018-02-15 00:33+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -25,17 +25,25 @@ msgstr "Il existe deux fonctions dédiées à l'interaction avec les itérateurs #: c-api/iter.rst:12 #, fuzzy msgid "" -"Return true if the object *o* supports the iterator protocol. This function " -"always succeeds." +"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:18 +#: c-api/iter.rst:17 #, fuzzy msgid "" -"Return the next value from the iteration *o*. The object must be an " -"iterator (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." +"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* " @@ -43,10 +51,35 @@ msgstr "" "déclarant une exception si une erreur survient lors de la récupération d'un " "élément." -#: c-api/iter.rst:23 +#: 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/list.po b/c-api/list.po index 42f3d1a4c3..3126c8a6c6 100644 --- a/c-api/list.po +++ b/c-api/list.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -65,7 +65,7 @@ msgid "" msgstr "" #: c-api/list.rst:56 -msgid "Macro form of :c:func:`PyList_Size` without error checking." +msgid "Similar to :c:func:`PyList_Size`, but without error checking." msgstr "" #: c-api/list.rst:61 @@ -77,7 +77,7 @@ msgid "" msgstr "" #: c-api/list.rst:69 -msgid "Macro form of :c:func:`PyList_GetItem` without error checking." +msgid "Similar to :c:func:`PyList_GetItem`, but without error checking." msgstr "" #: c-api/list.rst:74 diff --git a/c-api/long.po b/c-api/long.po index 6d9368fb4c..1e8e4f005d 100644 --- a/c-api/long.po +++ b/c-api/long.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -72,7 +72,7 @@ msgstr "" #: c-api/long.rst:43 msgid "" "The current implementation keeps an array of integer objects for all " -"integers between ``-5`` and ``256``, when you create an int in that range " +"integers between ``-5`` and ``256``. When you create an int in that range " "you actually just get back a reference to the existing object." msgstr "" @@ -126,53 +126,43 @@ msgid "" msgstr "" #: c-api/long.rst:99 -msgid "Convert a sequence of Unicode digits to a Python integer value." -msgstr "" - -#: c-api/long.rst:103 -msgid "" -"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" -"func:`PyLong_FromUnicodeObject`." -msgstr "" - -#: c-api/long.rst:108 msgid "" "Convert a sequence of Unicode digits in the string *u* to a Python integer " "value." msgstr "" -#: c-api/long.rst:116 +#: c-api/long.rst:107 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:146 +#: c-api/long.rst:136 msgid "" "Return a C :c:type:`long` representation of *obj*. If *obj* is not an " -"instance of :c:type:`PyLongObject`, first call its :meth:`__index__` or :" -"meth:`__int__` method (if present) to convert it to a :c:type:`PyLongObject`." +"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:132 +#: c-api/long.rst:122 msgid "" "Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" "type:`long`." msgstr "" -#: c-api/long.rst:156 c-api/long.rst:199 c-api/long.rst:222 +#: c-api/long.rst:145 c-api/long.rst:186 c-api/long.rst:209 msgid "Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: c-api/long.rst:158 c-api/long.rst:203 c-api/long.rst:308 +#: c-api/long.rst:147 c-api/long.rst:190 c-api/long.rst:294 msgid "Use :meth:`__index__` if available." msgstr "" -#: c-api/long.rst:161 c-api/long.rst:206 c-api/long.rst:311 -msgid "Using :meth:`__int__` is deprecated." +#: c-api/long.rst:150 c-api/long.rst:193 c-api/long.rst:297 +msgid "This function will no longer use :meth:`__int__`." msgstr "" -#: c-api/long.rst:151 +#: c-api/long.rst:140 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 " @@ -180,20 +170,20 @@ msgid "" "occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." msgstr "" -#: c-api/long.rst:189 +#: c-api/long.rst:177 msgid "" "Return a C :c:type:`long long` representation of *obj*. If *obj* is not an " -"instance of :c:type:`PyLongObject`, first call its :meth:`__index__` or :" -"meth:`__int__` method (if present) to convert it to a :c:type:`PyLongObject`." +"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:175 +#: c-api/long.rst:163 msgid "" "Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" "type:`long long`." msgstr "" -#: c-api/long.rst:194 +#: c-api/long.rst:181 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 " @@ -201,134 +191,133 @@ msgid "" "occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." msgstr "" -#: c-api/long.rst:216 +#: c-api/long.rst:203 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:219 +#: c-api/long.rst:206 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:231 +#: c-api/long.rst:218 msgid "" "Return a C :c:type:`unsigned long` representation of *pylong*. *pylong* " "must be an instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:234 +#: c-api/long.rst:221 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "type:`unsigned long`." msgstr "" -#: c-api/long.rst:237 +#: c-api/long.rst:224 msgid "" "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:247 +#: c-api/long.rst:234 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:250 +#: c-api/long.rst:237 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "type:`size_t`." msgstr "" -#: c-api/long.rst:253 +#: c-api/long.rst:240 msgid "" "Returns ``(size_t)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:262 +#: c-api/long.rst:249 msgid "" "Return a C :c:type:`unsigned long long` representation of *pylong*. " "*pylong* must be an instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:265 +#: c-api/long.rst:252 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for an :" "c:type:`unsigned long long`." msgstr "" -#: c-api/long.rst:268 +#: c-api/long.rst:255 msgid "" "Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:271 +#: c-api/long.rst:258 msgid "" "A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`." msgstr "" -#: c-api/long.rst:277 +#: c-api/long.rst:264 msgid "" "Return a C :c:type:`unsigned long` representation of *obj*. If *obj* is not " -"an instance of :c:type:`PyLongObject`, first call its :meth:`__index__` or :" -"meth:`__int__` method (if present) to convert it to a :c:type:`PyLongObject`." +"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:282 +#: c-api/long.rst:268 msgid "" "If the value of *obj* is out of range for an :c:type:`unsigned long`, return " "the reduction of that value modulo ``ULONG_MAX + 1``." msgstr "" -#: c-api/long.rst:285 +#: c-api/long.rst:271 msgid "" "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:297 +#: c-api/long.rst:283 msgid "" "Return a C :c:type:`unsigned long long` representation of *obj*. If *obj* " "is not an instance of :c:type:`PyLongObject`, first call its :meth:" -"`__index__` or :meth:`__int__` method (if present) to convert it to a :c:" -"type:`PyLongObject`." +"`__index__` method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:302 +#: c-api/long.rst:288 msgid "" "If the value of *obj* is out of range for an :c:type:`unsigned long long`, " "return the reduction of that value modulo ``ULLONG_MAX + 1``." msgstr "" -#: c-api/long.rst:305 +#: c-api/long.rst:291 msgid "" "Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` " "to disambiguate." msgstr "" -#: c-api/long.rst:317 +#: c-api/long.rst:303 msgid "" "Return a C :c:type:`double` representation of *pylong*. *pylong* must be an " "instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:320 +#: c-api/long.rst:306 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "type:`double`." msgstr "" -#: c-api/long.rst:323 +#: c-api/long.rst:309 msgid "" "Returns ``-1.0`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: c-api/long.rst:328 +#: c-api/long.rst:314 msgid "" "Convert a Python integer *pylong* to a C :c:type:`void` pointer. If *pylong* " "cannot be converted, an :exc:`OverflowError` will be raised. This is only " @@ -336,7 +325,7 @@ msgid "" "c:func:`PyLong_FromVoidPtr`." msgstr "" -#: c-api/long.rst:333 +#: c-api/long.rst:319 msgid "" "Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" diff --git a/c-api/mapping.po b/c-api/mapping.po index 4f1d3a2386..e99c3d4008 100644 --- a/c-api/mapping.po +++ b/c-api/mapping.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2021-01-28 14:58+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -32,11 +32,13 @@ msgstr "" # → pas correct en VO ! # - "This function always succeeds." équivaut-il à "jamais d'erreur" ? #: c-api/mapping.rst:14 +#, fuzzy msgid "" -"Return ``1`` if the object provides mapping protocol or supports slicing, " -"and ``0`` otherwise. Note that it returns ``1`` for Python classes with a :" -"meth:`__getitem__` method since in general case it is impossible to " -"determine what type of keys it supports. This function always succeeds." +"Return ``1`` if the object provides the mapping protocol or supports " +"slicing, and ``0`` otherwise. Note that it returns ``1`` for Python classes " +"with a :meth:`__getitem__` method, since in general it is impossible to " +"determine what type of keys the class supports. This function always " +"succeeds." msgstr "" "Renvoie ``1`` si l'objet prend en charge le protocole de correspondance ou " "le découpage en tranches et ``0`` sinon. Notez qu'elle renvoie ``1`` pour " diff --git a/c-api/memory.po b/c-api/memory.po index 673614bcbc..637efa2eab 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -105,18 +105,71 @@ msgid "" "new pymalloc object arena is created, and on shutdown." msgstr "" -#: c-api/memory.rst:97 +#: c-api/memory.rst:96 +msgid "Allocator Domains" +msgstr "" + +#: c-api/memory.rst:98 +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:110 +msgid "The three allocation domains are:" +msgstr "" + +#: c-api/memory.rst:112 +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:117 +msgid "" +"\"Mem\" domain: intended for allocating memory for Python buffers and " +"general-purpose memory buffers where the allocation must be performed with " +"the :term:`GIL` held. The memory is taken from the Python private heap." +msgstr "" + +#: c-api/memory.rst:121 +msgid "" +"Object domain: intended for allocating memory belonging to Python objects. " +"The memory is taken from the Python private heap." +msgstr "" + +#: c-api/memory.rst:124 +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:129 msgid "Raw Memory Interface" msgstr "" -#: c-api/memory.rst:99 +#: c-api/memory.rst:131 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:103 +#: c-api/memory.rst:135 msgid "" "The :ref:`default raw memory allocator ` uses the " "following functions: :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` " @@ -124,60 +177,60 @@ msgid "" "zero bytes." msgstr "" -#: c-api/memory.rst:183 c-api/memory.rst:285 +#: c-api/memory.rst:215 c-api/memory.rst:323 msgid "" "Allocates *n* bytes and returns a pointer of type :c:type:`void*` to the " "allocated memory, or ``NULL`` if the request fails." msgstr "" -#: c-api/memory.rst:115 +#: c-api/memory.rst:147 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:193 c-api/memory.rst:295 +#: c-api/memory.rst:225 c-api/memory.rst:333 msgid "" "Allocates *nelem* elements each whose size in bytes is *elsize* and returns " "a pointer of type :c:type:`void*` to the allocated memory, or ``NULL`` if " "the request fails. The memory is initialized to zeros." msgstr "" -#: c-api/memory.rst:126 +#: c-api/memory.rst:158 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:206 c-api/memory.rst:308 +#: c-api/memory.rst:238 c-api/memory.rst:346 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:138 +#: c-api/memory.rst:170 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:142 +#: c-api/memory.rst:174 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:146 +#: c-api/memory.rst:178 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:152 +#: c-api/memory.rst:184 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:" @@ -185,72 +238,72 @@ msgid "" "called before, undefined behavior occurs." msgstr "" -#: c-api/memory.rst:227 c-api/memory.rst:329 +#: c-api/memory.rst:259 c-api/memory.rst:367 msgid "If *p* is ``NULL``, no operation is performed." msgstr "" -#: c-api/memory.rst:163 +#: c-api/memory.rst:195 msgid "Memory Interface" msgstr "" -#: c-api/memory.rst:271 +#: c-api/memory.rst:303 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:169 +#: c-api/memory.rst:201 msgid "" "The :ref:`default memory allocator ` uses the :" "ref:`pymalloc memory allocator `." msgstr "" -#: c-api/memory.rst:280 +#: c-api/memory.rst:318 msgid "" "The :term:`GIL ` must be held when using these " "functions." msgstr "" -#: c-api/memory.rst:179 +#: c-api/memory.rst:211 msgid "" "The default allocator is now pymalloc instead of system :c:func:`malloc`." msgstr "" -#: c-api/memory.rst:186 +#: c-api/memory.rst:218 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:197 +#: c-api/memory.rst:229 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:209 +#: c-api/memory.rst:241 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:213 +#: c-api/memory.rst:245 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:216 +#: c-api/memory.rst:248 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:222 +#: c-api/memory.rst:254 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:" @@ -258,20 +311,20 @@ msgid "" "undefined behavior occurs." msgstr "" -#: c-api/memory.rst:229 +#: c-api/memory.rst:261 msgid "" "The following type-oriented macros are provided for convenience. Note that " "*TYPE* refers to any C type." msgstr "" -#: c-api/memory.rst:235 +#: c-api/memory.rst:267 msgid "" "Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes " "of memory. Returns a pointer cast to :c:type:`TYPE*`. The memory will not " "have been initialized in any way." msgstr "" -#: c-api/memory.rst:242 +#: c-api/memory.rst:274 msgid "" "Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n * " "sizeof(TYPE))`` bytes. Returns a pointer cast to :c:type:`TYPE*`. On " @@ -279,17 +332,17 @@ msgid "" "event of failure." msgstr "" -#: c-api/memory.rst:247 +#: c-api/memory.rst:279 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:253 +#: c-api/memory.rst:285 msgid "Same as :c:func:`PyMem_Free`." msgstr "" -#: c-api/memory.rst:255 +#: c-api/memory.rst:287 msgid "" "In addition, the following macro sets are provided for calling the Python " "memory allocator directly, without involving the C API functions listed " @@ -297,75 +350,83 @@ msgid "" "across Python versions and is therefore deprecated in extension modules." msgstr "" -#: c-api/memory.rst:260 +#: c-api/memory.rst:292 msgid "``PyMem_MALLOC(size)``" msgstr "" -#: c-api/memory.rst:261 +#: c-api/memory.rst:293 msgid "``PyMem_NEW(type, size)``" msgstr "" -#: c-api/memory.rst:262 +#: c-api/memory.rst:294 msgid "``PyMem_REALLOC(ptr, size)``" msgstr "" -#: c-api/memory.rst:263 +#: c-api/memory.rst:295 msgid "``PyMem_RESIZE(ptr, type, size)``" msgstr "" -#: c-api/memory.rst:264 +#: c-api/memory.rst:296 msgid "``PyMem_FREE(ptr)``" msgstr "" -#: c-api/memory.rst:265 +#: c-api/memory.rst:297 msgid "``PyMem_DEL(ptr)``" msgstr "" -#: c-api/memory.rst:269 +#: c-api/memory.rst:301 msgid "Object allocators" msgstr "" -#: c-api/memory.rst:275 +#: c-api/memory.rst:308 +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:313 msgid "" "The :ref:`default object allocator ` uses the :" "ref:`pymalloc memory allocator `." msgstr "" -#: c-api/memory.rst:288 +#: c-api/memory.rst:326 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:299 +#: c-api/memory.rst:337 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:311 +#: c-api/memory.rst:349 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:315 +#: c-api/memory.rst:353 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:318 +#: c-api/memory.rst:356 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:324 +#: c-api/memory.rst:362 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:" @@ -373,297 +434,337 @@ msgid "" "called before, undefined behavior occurs." msgstr "" -#: c-api/memory.rst:335 +#: c-api/memory.rst:373 msgid "Default Memory Allocators" msgstr "" -#: c-api/memory.rst:337 +#: c-api/memory.rst:375 msgid "Default memory allocators:" msgstr "" -#: c-api/memory.rst:340 +#: c-api/memory.rst:378 msgid "Configuration" msgstr "Configuration" -#: c-api/memory.rst:340 +#: c-api/memory.rst:378 msgid "Name" msgstr "Nom" -#: c-api/memory.rst:340 +#: c-api/memory.rst:378 msgid "PyMem_RawMalloc" msgstr "" -#: c-api/memory.rst:340 +#: c-api/memory.rst:378 msgid "PyMem_Malloc" msgstr "" -#: c-api/memory.rst:340 +#: c-api/memory.rst:378 msgid "PyObject_Malloc" msgstr "" -#: c-api/memory.rst:342 +#: c-api/memory.rst:380 msgid "Release build" msgstr "" -#: c-api/memory.rst:342 +#: c-api/memory.rst:380 msgid "``\"pymalloc\"``" msgstr "" -#: c-api/memory.rst:344 +#: c-api/memory.rst:382 msgid "``malloc``" msgstr "" -#: c-api/memory.rst:342 +#: c-api/memory.rst:380 msgid "``pymalloc``" msgstr "" -#: c-api/memory.rst:343 +#: c-api/memory.rst:381 msgid "Debug build" msgstr "" -#: c-api/memory.rst:343 +#: c-api/memory.rst:381 msgid "``\"pymalloc_debug\"``" msgstr "" -#: c-api/memory.rst:345 +#: c-api/memory.rst:383 msgid "``malloc`` + debug" msgstr "" -#: c-api/memory.rst:343 +#: c-api/memory.rst:381 msgid "``pymalloc`` + debug" msgstr "" -#: c-api/memory.rst:344 +#: c-api/memory.rst:382 msgid "Release build, without pymalloc" msgstr "" -#: c-api/memory.rst:344 +#: c-api/memory.rst:382 msgid "``\"malloc\"``" msgstr "" -#: c-api/memory.rst:345 +#: c-api/memory.rst:383 msgid "Debug build, without pymalloc" msgstr "" -#: c-api/memory.rst:345 +#: c-api/memory.rst:383 msgid "``\"malloc_debug\"``" msgstr "" -#: c-api/memory.rst:348 +#: c-api/memory.rst:386 msgid "Legend:" msgstr "" -#: c-api/memory.rst:350 -msgid "Name: value for :envvar:`PYTHONMALLOC` environment variable" +#: c-api/memory.rst:388 +msgid "Name: value for :envvar:`PYTHONMALLOC` environment variable." msgstr "" -#: c-api/memory.rst:351 +#: c-api/memory.rst:389 msgid "" "``malloc``: system allocators from the standard C library, C functions: :c:" -"func:`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`" +"func:`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`." msgstr "" -#: c-api/memory.rst:353 -msgid "``pymalloc``: :ref:`pymalloc memory allocator `" +#: c-api/memory.rst:391 +msgid "``pymalloc``: :ref:`pymalloc memory allocator `." msgstr "" -#: c-api/memory.rst:354 +#: c-api/memory.rst:392 msgid "" -"\"+ debug\": with debug hooks installed by :c:func:`PyMem_SetupDebugHooks`" +"\"+ debug\": with :ref:`debug hooks on the Python memory allocators `." +msgstr "" + +#: c-api/memory.rst:394 +msgid "\"Debug build\": :ref:`Python build in debug mode `." msgstr "" -#: c-api/memory.rst:358 +#: c-api/memory.rst:399 msgid "Customize Memory Allocators" msgstr "" -#: c-api/memory.rst:364 +#: c-api/memory.rst:405 msgid "" -"Structure used to describe a memory block allocator. The structure has four " -"fields:" +"Structure used to describe a memory block allocator. The structure has the " +"following fields:" msgstr "" -#: c-api/memory.rst:513 +#: c-api/memory.rst:628 msgid "Field" msgstr "Champ" -#: c-api/memory.rst:513 +#: c-api/memory.rst:628 msgid "Meaning" msgstr "Signification" -#: c-api/memory.rst:515 +#: c-api/memory.rst:630 msgid "``void *ctx``" msgstr "``void *ctx``" -#: c-api/memory.rst:515 +#: c-api/memory.rst:630 msgid "user context passed as first argument" msgstr "" -#: c-api/memory.rst:372 +#: c-api/memory.rst:413 msgid "``void* malloc(void *ctx, size_t size)``" msgstr "``void* malloc(void *ctx, size_t size)``" -#: c-api/memory.rst:372 +#: c-api/memory.rst:413 msgid "allocate a memory block" msgstr "" -#: c-api/memory.rst:374 +#: c-api/memory.rst:415 msgid "``void* calloc(void *ctx, size_t nelem, size_t elsize)``" msgstr "" -#: c-api/memory.rst:374 +#: c-api/memory.rst:415 msgid "allocate a memory block initialized with zeros" msgstr "" -#: c-api/memory.rst:377 +#: c-api/memory.rst:418 msgid "``void* realloc(void *ctx, void *ptr, size_t new_size)``" msgstr "" -#: c-api/memory.rst:377 +#: c-api/memory.rst:418 msgid "allocate or resize a memory block" msgstr "" -#: c-api/memory.rst:379 +#: c-api/memory.rst:420 msgid "``void free(void *ctx, void *ptr)``" msgstr "``void free(void *ctx, void *ptr)``" -#: c-api/memory.rst:379 +#: c-api/memory.rst:420 msgid "free a memory block" msgstr "" -#: c-api/memory.rst:382 +#: c-api/memory.rst:423 msgid "" "The :c:type:`PyMemAllocator` structure was renamed to :c:type:" "`PyMemAllocatorEx` and a new ``calloc`` field was added." msgstr "" -#: c-api/memory.rst:389 +#: c-api/memory.rst:430 msgid "Enum used to identify an allocator domain. Domains:" msgstr "" -#: c-api/memory.rst:402 c-api/memory.rst:411 +#: c-api/memory.rst:443 c-api/memory.rst:452 #, fuzzy msgid "Functions:" msgstr "Fonctions" -#: c-api/memory.rst:395 +#: c-api/memory.rst:436 #, fuzzy msgid ":c:func:`PyMem_RawMalloc`" msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/memory.rst:396 +#: c-api/memory.rst:437 #, fuzzy msgid ":c:func:`PyMem_RawRealloc`" msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/memory.rst:397 +#: c-api/memory.rst:438 #, fuzzy msgid ":c:func:`PyMem_RawCalloc`" msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/memory.rst:398 +#: c-api/memory.rst:439 msgid ":c:func:`PyMem_RawFree`" msgstr "" -#: c-api/memory.rst:404 +#: c-api/memory.rst:445 #, fuzzy msgid ":c:func:`PyMem_Malloc`," msgstr ":c:func:`PyMem_Calloc`," -#: c-api/memory.rst:405 +#: c-api/memory.rst:446 #, fuzzy msgid ":c:func:`PyMem_Realloc`" msgstr ":c:func:`PyMem_Calloc`," -#: c-api/memory.rst:406 +#: c-api/memory.rst:447 #, fuzzy msgid ":c:func:`PyMem_Calloc`" msgstr ":c:func:`PyMem_Calloc`," -#: c-api/memory.rst:407 +#: c-api/memory.rst:448 msgid ":c:func:`PyMem_Free`" msgstr "" -#: c-api/memory.rst:413 +#: c-api/memory.rst:454 msgid ":c:func:`PyObject_Malloc`" msgstr "" -#: c-api/memory.rst:414 +#: c-api/memory.rst:455 msgid ":c:func:`PyObject_Realloc`" msgstr "" -#: c-api/memory.rst:415 +#: c-api/memory.rst:456 msgid ":c:func:`PyObject_Calloc`" msgstr "" -#: c-api/memory.rst:416 +#: c-api/memory.rst:457 msgid ":c:func:`PyObject_Free`" msgstr "" -#: c-api/memory.rst:420 +#: c-api/memory.rst:461 msgid "Get the memory block allocator of the specified domain." msgstr "" -#: c-api/memory.rst:425 +#: c-api/memory.rst:466 msgid "Set the memory block allocator of the specified domain." msgstr "" -#: c-api/memory.rst:427 +#: c-api/memory.rst:468 msgid "" "The new allocator must return a distinct non-``NULL`` pointer when " "requesting zero bytes." msgstr "" -#: c-api/memory.rst:430 +#: c-api/memory.rst:471 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:434 +#: c-api/memory.rst:475 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:441 -msgid "Setup hooks to detect bugs in the Python memory allocator functions." +#: c-api/memory.rst:479 +msgid "" +"See also :c:member:`PyPreConfig.allocator` and :ref:`Preinitialize Python " +"with PyPreConfig `." msgstr "" -#: c-api/memory.rst:443 +#: c-api/memory.rst:484 msgid "" -"Newly allocated memory is filled with the byte ``0xCD`` (``CLEANBYTE``), " -"freed memory is filled with the byte ``0xDD`` (``DEADBYTE``). Memory blocks " -"are surrounded by \"forbidden bytes\" (``FORBIDDENBYTE``: byte ``0xFD``)." +"Setup :ref:`debug hooks in the Python memory allocators ` " +"to detect memory errors." msgstr "" -#: c-api/memory.rst:447 +#: c-api/memory.rst:491 +msgid "Debug hooks on the Python memory allocators" +msgstr "" + +#: c-api/memory.rst:493 +msgid "" +"When :ref:`Python is built in debug mode `, the :c:func:" +"`PyMem_SetupDebugHooks` function is called at the :ref:`Python " +"preinitialization ` to setup debug hooks on Python memory " +"allocators to detect memory errors." +msgstr "" + +#: c-api/memory.rst:498 +msgid "" +"The :envvar:`PYTHONMALLOC` environment variable can be used to install debug " +"hooks on a Python compiled in release mode (ex: ``PYTHONMALLOC=debug``)." +msgstr "" + +#: c-api/memory.rst:501 +msgid "" +"The :c:func:`PyMem_SetupDebugHooks` function can be used to set debug hooks " +"after calling :c:func:`PyMem_SetAllocator`." +msgstr "" + +#: c-api/memory.rst:504 +msgid "" +"These debug hooks fill dynamically allocated memory blocks with special, " +"recognizable bit patterns. Newly allocated memory is filled with the byte " +"``0xCD`` (``PYMEM_CLEANBYTE``), freed memory is filled with the byte " +"``0xDD`` (``PYMEM_DEADBYTE``). Memory blocks are surrounded by \"forbidden " +"bytes\" filled with the byte ``0xFD`` (``PYMEM_FORBIDDENBYTE``). Strings of " +"these bytes are unlikely to be valid addresses, floats, or ASCII strings." +msgstr "" + +#: c-api/memory.rst:511 msgid "Runtime checks:" msgstr "" -#: c-api/memory.rst:449 +#: c-api/memory.rst:513 msgid "" -"Detect API violations, ex: :c:func:`PyObject_Free` called on a buffer " -"allocated by :c:func:`PyMem_Malloc`" +"Detect API violations. For example, detect if :c:func:`PyObject_Free` is " +"called on a memory block allocated by :c:func:`PyMem_Malloc`." msgstr "" -#: c-api/memory.rst:451 -msgid "Detect write before the start of the buffer (buffer underflow)" +#: c-api/memory.rst:515 +msgid "Detect write before the start of the buffer (buffer underflow)." msgstr "" -#: c-api/memory.rst:452 -msgid "Detect write after the end of the buffer (buffer overflow)" +#: c-api/memory.rst:516 +msgid "Detect write after the end of the buffer (buffer overflow)." msgstr "" -#: c-api/memory.rst:453 +#: c-api/memory.rst:517 msgid "" "Check that the :term:`GIL ` is held when allocator " "functions of :c:data:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) and :" -"c:data:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are called" +"c:data:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are called." msgstr "" -#: c-api/memory.rst:458 +#: c-api/memory.rst:522 msgid "" "On error, the debug hooks use the :mod:`tracemalloc` module to get the " "traceback where a memory block was allocated. The traceback is only " @@ -671,35 +772,132 @@ msgid "" "memory block was traced." msgstr "" -#: c-api/memory.rst:463 +#: c-api/memory.rst:527 msgid "" -"These hooks are :ref:`installed by default ` if " -"Python is compiled in debug mode. The :envvar:`PYTHONMALLOC` environment " -"variable can be used to install debug hooks on a Python compiled in release " -"mode." +"Let *S* = ``sizeof(size_t)``. ``2*S`` bytes are added at each end of each " +"block of *N* bytes requested. The memory layout is like so, where p " +"represents the address returned by a malloc-like or realloc-like function " +"(``p[i:j]`` means the slice of bytes from ``*(p+i)`` inclusive up to " +"``*(p+j)`` exclusive; note that the treatment of negative indices differs " +"from a Python slice):" msgstr "" -#: c-api/memory.rst:468 +#: c-api/memory.rst:534 +msgid "``p[-2*S:-S]``" +msgstr "" + +#: c-api/memory.rst:534 msgid "" -"This function now also works on Python compiled in release mode. On error, " -"the debug hooks now use :mod:`tracemalloc` to get the traceback where a " -"memory block was allocated. The debug hooks now also check if the GIL is " -"held when functions of :c:data:`PYMEM_DOMAIN_OBJ` and :c:data:" -"`PYMEM_DOMAIN_MEM` domains are called." +"Number of bytes originally asked for. This is a size_t, big-endian (easier " +"to read in a memory dump)." msgstr "" -#: c-api/memory.rst:475 +#: c-api/memory.rst:541 +msgid "``p[-S]``" +msgstr "" + +#: c-api/memory.rst:537 +msgid "API identifier (ASCII character):" +msgstr "" + +#: c-api/memory.rst:539 +msgid "``'r'`` for :c:data:`PYMEM_DOMAIN_RAW`." +msgstr "" + +#: c-api/memory.rst:540 +msgid "``'m'`` for :c:data:`PYMEM_DOMAIN_MEM`." +msgstr "" + +#: c-api/memory.rst:541 +msgid "``'o'`` for :c:data:`PYMEM_DOMAIN_OBJ`." +msgstr "" + +#: c-api/memory.rst:544 +msgid "``p[-S+1:0]``" +msgstr "" + +#: c-api/memory.rst:544 +msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads." +msgstr "" + +#: c-api/memory.rst:553 +msgid "``p[0:N]``" +msgstr "" + +#: c-api/memory.rst:547 msgid "" -"Byte patterns ``0xCB`` (``CLEANBYTE``), ``0xDB`` (``DEADBYTE``) and ``0xFB`` " -"(``FORBIDDENBYTE``) have been replaced with ``0xCD``, ``0xDD`` and ``0xFD`` " -"to use the same values than Windows CRT debug ``malloc()`` and ``free()``." +"The requested memory, filled with copies of PYMEM_CLEANBYTE, used to catch " +"reference to uninitialized memory. When a realloc-like function is called " +"requesting a larger memory block, the new excess bytes are also filled with " +"PYMEM_CLEANBYTE. When a free-like function is called, these are overwritten " +"with PYMEM_DEADBYTE, to catch reference to freed memory. When a realloc- " +"like function is called requesting a smaller memory block, the excess old " +"bytes are also filled with PYMEM_DEADBYTE." msgstr "" -#: c-api/memory.rst:485 +#: c-api/memory.rst:556 +msgid "``p[N:N+S]``" +msgstr "" + +#: c-api/memory.rst:556 +msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads." +msgstr "" + +#: c-api/memory.rst:567 +msgid "``p[N+S:N+2*S]``" +msgstr "" + +#: c-api/memory.rst:559 +msgid "" +"Only used if the ``PYMEM_DEBUG_SERIALNO`` macro is defined (not defined by " +"default)." +msgstr "" + +#: c-api/memory.rst:562 +msgid "" +"A serial number, incremented by 1 on each call to a malloc-like or realloc-" +"like function. Big-endian ``size_t``. If \"bad memory\" is detected later, " +"the serial number gives an excellent way to set a breakpoint on the next " +"run, to capture the instant at which this block was passed out. The static " +"function bumpserialno() in obmalloc.c is the only place the serial number is " +"incremented, and exists so you can set such a breakpoint easily." +msgstr "" + +#: c-api/memory.rst:569 +msgid "" +"A realloc-like or free-like function first checks that the " +"PYMEM_FORBIDDENBYTE bytes at each end are intact. If they've been altered, " +"diagnostic output is written to stderr, and the program is aborted via " +"Py_FatalError(). The other main failure mode is provoking a memory error " +"when a program reads up one of the special bit patterns and tries to use it " +"as an address. If you get in a debugger then and look at the object, you're " +"likely to see that it's entirely filled with PYMEM_DEADBYTE (meaning freed " +"memory is getting used) or PYMEM_CLEANBYTE (meaning uninitialized memory is " +"getting used)." +msgstr "" + +#: c-api/memory.rst:578 +msgid "" +"The :c:func:`PyMem_SetupDebugHooks` function now also works on Python " +"compiled in release mode. On error, the debug hooks now use :mod:" +"`tracemalloc` to get the traceback where a memory block was allocated. The " +"debug hooks now also check if the GIL is held when functions of :c:data:" +"`PYMEM_DOMAIN_OBJ` and :c:data:`PYMEM_DOMAIN_MEM` domains are called." +msgstr "" + +#: c-api/memory.rst:586 +msgid "" +"Byte patterns ``0xCB`` (``PYMEM_CLEANBYTE``), ``0xDB`` (``PYMEM_DEADBYTE``) " +"and ``0xFB`` (``PYMEM_FORBIDDENBYTE``) have been replaced with ``0xCD``, " +"``0xDD`` and ``0xFD`` to use the same values than Windows CRT debug " +"``malloc()`` and ``free()``." +msgstr "" + +#: c-api/memory.rst:596 msgid "The pymalloc allocator" msgstr "" -#: c-api/memory.rst:487 +#: c-api/memory.rst:598 msgid "" "Python has a *pymalloc* allocator optimized for small objects (smaller or " "equal to 512 bytes) with a short lifetime. It uses memory mappings called " @@ -708,108 +906,115 @@ msgid "" "512 bytes." msgstr "" -#: c-api/memory.rst:492 +#: c-api/memory.rst:603 msgid "" "*pymalloc* is the :ref:`default allocator ` of " "the :c:data:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and :c:data:" "`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) domains." msgstr "" -#: c-api/memory.rst:496 +#: c-api/memory.rst:607 msgid "The arena allocator uses the following functions:" msgstr "" -#: c-api/memory.rst:498 +#: c-api/memory.rst:609 msgid ":c:func:`VirtualAlloc` and :c:func:`VirtualFree` on Windows," msgstr "" -#: c-api/memory.rst:499 +#: c-api/memory.rst:610 msgid ":c:func:`mmap` and :c:func:`munmap` if available," msgstr "" -#: c-api/memory.rst:500 +#: c-api/memory.rst:611 msgid ":c:func:`malloc` and :c:func:`free` otherwise." msgstr "" -#: c-api/memory.rst:503 +#: c-api/memory.rst:613 +msgid "" +"This allocator is disabled if Python is configured with the :option:`--" +"without-pymalloc` option. It can also be disabled at runtime using the :" +"envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``)." +msgstr "" + +#: c-api/memory.rst:618 msgid "Customize pymalloc Arena Allocator" msgstr "" -#: c-api/memory.rst:509 +#: c-api/memory.rst:624 msgid "" "Structure used to describe an arena allocator. The structure has three " "fields:" msgstr "" -#: c-api/memory.rst:517 +#: c-api/memory.rst:632 msgid "``void* alloc(void *ctx, size_t size)``" msgstr "``void* alloc(void *ctx, size_t size)``" -#: c-api/memory.rst:517 +#: c-api/memory.rst:632 msgid "allocate an arena of size bytes" msgstr "" -#: c-api/memory.rst:519 +#: c-api/memory.rst:634 #, fuzzy msgid "``void free(void *ctx, void *ptr, size_t size)``" msgstr "``void free(void *ctx, void *ptr)``" -#: c-api/memory.rst:519 +#: c-api/memory.rst:634 msgid "free an arena" msgstr "" -#: c-api/memory.rst:524 +#: c-api/memory.rst:639 msgid "Get the arena allocator." msgstr "" -#: c-api/memory.rst:528 +#: c-api/memory.rst:643 msgid "Set the arena allocator." msgstr "" -#: c-api/memory.rst:532 +#: c-api/memory.rst:647 msgid "tracemalloc C API" msgstr "" -#: c-api/memory.rst:538 +#: c-api/memory.rst:653 msgid "Track an allocated memory block in the :mod:`tracemalloc` module." msgstr "" -#: c-api/memory.rst:540 +#: c-api/memory.rst:655 msgid "" "Return ``0`` on success, return ``-1`` on error (failed to allocate memory " "to store the trace). Return ``-2`` if tracemalloc is disabled." msgstr "" -#: c-api/memory.rst:543 +#: c-api/memory.rst:658 msgid "If memory block is already tracked, update the existing trace." msgstr "" -#: c-api/memory.rst:547 +#: c-api/memory.rst:662 msgid "" "Untrack an allocated memory block in the :mod:`tracemalloc` module. Do " "nothing if the block was not tracked." msgstr "" -#: c-api/memory.rst:550 +#: c-api/memory.rst:665 msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``." msgstr "" -#: c-api/memory.rst:556 +#: c-api/memory.rst:671 msgid "Examples" msgstr "Exemples" -#: c-api/memory.rst:558 +#: c-api/memory.rst:673 msgid "" "Here is the example from section :ref:`memoryoverview`, rewritten so that " "the I/O buffer is allocated from the Python heap by using the first function " "set::" msgstr "" -#: c-api/memory.rst:571 +#: c-api/memory.rst:686 msgid "The same code using the type-oriented function set::" msgstr "" -#: c-api/memory.rst:583 +#: c-api/memory.rst:698 msgid "" "Note that in the two examples above, the buffer is always manipulated via " "functions belonging to the same set. Indeed, it is required to use the same " @@ -819,14 +1024,14 @@ msgid "" "different allocators operating on different heaps. ::" msgstr "" -#: c-api/memory.rst:598 +#: c-api/memory.rst:713 msgid "" "In addition to the functions aimed at handling raw memory blocks from the " "Python heap, objects in Python are allocated and released with :c:func:" "`PyObject_New`, :c:func:`PyObject_NewVar` and :c:func:`PyObject_Del`." msgstr "" -#: c-api/memory.rst:602 +#: c-api/memory.rst:717 msgid "" "These will be explained in the next chapter on defining and implementing new " "object types in C." diff --git a/c-api/method.po b/c-api/method.po index 4519cfcf4d..bbeda89ead 100644 --- a/c-api/method.po +++ b/c-api/method.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -40,7 +40,7 @@ msgstr "" #: c-api/method.rst:30 msgid "" -"Return a new instance method object, with *func* being any callable object " +"Return a new instance method object, with *func* being any callable object. " "*func* is the function that will be called when the instance method is " "called." msgstr "" diff --git a/c-api/module.po b/c-api/module.po index fd4240f869..b55782c636 100644 --- a/c-api/module.po +++ b/c-api/module.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 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" @@ -213,7 +213,7 @@ msgid "" "``NULL`` if not needed." msgstr "" -#: c-api/module.rst:217 c-api/module.rst:232 +#: c-api/module.rst:217 c-api/module.rst:238 msgid "" "This function is not called if the module state was requested but is not " "allocated yet. This is the case immediately after the module is created and " @@ -223,7 +223,7 @@ msgid "" "``NULL``." msgstr "" -#: c-api/module.rst:224 c-api/module.rst:239 +#: c-api/module.rst:230 c-api/module.rst:245 msgid "No longer called before the module state is allocated." msgstr "" @@ -233,55 +233,64 @@ msgid "" "``NULL`` if not needed." msgstr "" -#: c-api/module.rst:229 +#: c-api/module.rst:224 +msgid "" +"Like :c:member:`PyTypeObject.tp_clear`, this function is not *always* called " +"before a module is deallocated. For example, when reference counting is " +"enough to determine that an object is no longer used, the cyclic garbage " +"collector is not involved and :c:member:`~PyModuleDef.m_free` is called " +"directly." +msgstr "" + +#: c-api/module.rst:235 msgid "" "A function to call during deallocation of the module object, or ``NULL`` if " "not needed." msgstr "" -#: c-api/module.rst:243 +#: c-api/module.rst:249 msgid "Single-phase initialization" msgstr "" -#: c-api/module.rst:245 +#: c-api/module.rst:251 msgid "" "The module initialization function may create and return the module object " "directly. This is referred to as \"single-phase initialization\", and uses " "one of the following two module creation functions:" msgstr "" -#: c-api/module.rst:251 +#: c-api/module.rst:257 msgid "" "Create a new module object, given the definition in *def*. This behaves " "like :c:func:`PyModule_Create2` with *module_api_version* set to :const:" "`PYTHON_API_VERSION`." msgstr "" -#: c-api/module.rst:258 +#: c-api/module.rst:264 msgid "" "Create a new module object, given the definition in *def*, assuming the API " "version *module_api_version*. If that version does not match the version of " "the running interpreter, a :exc:`RuntimeWarning` is emitted." msgstr "" -#: c-api/module.rst:264 +#: c-api/module.rst:270 msgid "" "Most uses of this function should be using :c:func:`PyModule_Create` " "instead; only use this if you are sure you need it." msgstr "" -#: c-api/module.rst:267 +#: c-api/module.rst:273 msgid "" "Before it is returned from in the initialization function, the resulting " "module object is typically populated using functions like :c:func:" -"`PyModule_AddObject`." +"`PyModule_AddObjectRef`." msgstr "" -#: c-api/module.rst:273 +#: c-api/module.rst:279 msgid "Multi-phase initialization" msgstr "" -#: c-api/module.rst:275 +#: c-api/module.rst:281 msgid "" "An alternate way to specify extensions is to request \"multi-phase " "initialization\". Extension modules created this way behave more like Python " @@ -291,7 +300,7 @@ msgid "" "methods of classes." msgstr "" -#: c-api/module.rst:282 +#: c-api/module.rst:288 msgid "" "Unlike modules created using single-phase initialization, these modules are " "not singletons: if the *sys.modules* entry is removed and the module is re-" @@ -304,14 +313,14 @@ msgid "" "or individual classes created with :c:func:`PyType_FromSpec`)." msgstr "" -#: c-api/module.rst:292 +#: c-api/module.rst:298 msgid "" "All modules created using multi-phase initialization are expected to " "support :ref:`sub-interpreters `. Making sure " "multiple modules are independent is typically enough to achieve this." msgstr "" -#: c-api/module.rst:296 +#: c-api/module.rst:302 msgid "" "To request multi-phase initialization, the initialization function " "(PyInit_modulename) returns a :c:type:`PyModuleDef` instance with non-empty :" @@ -319,65 +328,65 @@ msgid "" "instance must be initialized with the following function:" msgstr "" -#: c-api/module.rst:303 +#: c-api/module.rst:309 msgid "" "Ensures a module definition is a properly initialized Python object that " "correctly reports its type and reference count." msgstr "" -#: c-api/module.rst:306 +#: c-api/module.rst:312 msgid "Returns *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." msgstr "" -#: c-api/module.rst:310 +#: c-api/module.rst:316 msgid "" "The *m_slots* member of the module definition must point to an array of " "``PyModuleDef_Slot`` structures:" msgstr "" -#: c-api/module.rst:317 +#: c-api/module.rst:323 msgid "A slot ID, chosen from the available values explained below." msgstr "" -#: c-api/module.rst:321 +#: c-api/module.rst:327 msgid "Value of the slot, whose meaning depends on the slot ID." msgstr "" -#: c-api/module.rst:325 +#: c-api/module.rst:331 msgid "The *m_slots* array must be terminated by a slot with id 0." msgstr "" -#: c-api/module.rst:327 +#: c-api/module.rst:333 msgid "The available slot types are:" msgstr "" -#: c-api/module.rst:331 +#: c-api/module.rst:337 msgid "" "Specifies a function that is called to create the module object itself. The " "*value* pointer of this slot must point to a function of the signature:" msgstr "" -#: c-api/module.rst:336 +#: c-api/module.rst:342 msgid "" "The function receives a :py:class:`~importlib.machinery.ModuleSpec` " "instance, as defined in :PEP:`451`, and the module definition. It should " "return a new module object, or set an error and return ``NULL``." msgstr "" -#: c-api/module.rst:341 +#: c-api/module.rst:347 msgid "" "This function should be kept minimal. In particular, it should not call " "arbitrary Python code, as trying to import the same module again may result " "in an infinite loop." msgstr "" -#: c-api/module.rst:345 +#: c-api/module.rst:351 msgid "" "Multiple ``Py_mod_create`` slots may not be specified in one module " "definition." msgstr "" -#: c-api/module.rst:348 +#: c-api/module.rst:354 msgid "" "If ``Py_mod_create`` is not specified, the import machinery will create a " "normal module object using :c:func:`PyModule_New`. The name is taken from " @@ -386,7 +395,7 @@ msgid "" "through symlinks, all while sharing a single module definition." msgstr "" -#: c-api/module.rst:354 +#: c-api/module.rst:360 msgid "" "There is no requirement for the returned object to be an instance of :c:type:" "`PyModule_Type`. Any type can be used, as long as it supports setting and " @@ -396,7 +405,7 @@ msgid "" "``Py_mod_create``." msgstr "" -#: c-api/module.rst:363 +#: c-api/module.rst:369 msgid "" "Specifies a function that is called to *execute* the module. This is " "equivalent to executing the code of a Python module: typically, this " @@ -404,21 +413,21 @@ msgid "" "function is:" msgstr "" -#: c-api/module.rst:370 +#: c-api/module.rst:376 msgid "" "If multiple ``Py_mod_exec`` slots are specified, they are processed in the " "order they appear in the *m_slots* array." msgstr "" -#: c-api/module.rst:373 +#: c-api/module.rst:379 msgid "See :PEP:`489` for more details on multi-phase initialization." msgstr "" -#: c-api/module.rst:376 +#: c-api/module.rst:382 msgid "Low-level module creation functions" msgstr "" -#: c-api/module.rst:378 +#: c-api/module.rst:384 msgid "" "The following functions are called under the hood when using multi-phase " "initialization. They can be used directly, for example when creating module " @@ -426,14 +435,14 @@ msgid "" "``PyModule_ExecDef`` must be called to fully initialize a module." msgstr "" -#: c-api/module.rst:385 +#: c-api/module.rst:391 msgid "" "Create a new module object, given the definition in *module* and the " "ModuleSpec *spec*. This behaves like :c:func:`PyModule_FromDefAndSpec2` " "with *module_api_version* set to :const:`PYTHON_API_VERSION`." msgstr "" -#: c-api/module.rst:393 +#: c-api/module.rst:399 msgid "" "Create a new module object, given the definition in *module* and the " "ModuleSpec *spec*, assuming the API version *module_api_version*. If that " @@ -441,24 +450,24 @@ msgid "" "`RuntimeWarning` is emitted." msgstr "" -#: c-api/module.rst:400 +#: c-api/module.rst:406 msgid "" "Most uses of this function should be using :c:func:`PyModule_FromDefAndSpec` " "instead; only use this if you are sure you need it." msgstr "" -#: c-api/module.rst:407 +#: c-api/module.rst:413 msgid "Process any execution slots (:c:data:`Py_mod_exec`) given in *def*." msgstr "" -#: c-api/module.rst:413 +#: c-api/module.rst:419 msgid "" "Set the docstring for *module* to *docstring*. This function is called " "automatically when creating a module from ``PyModuleDef``, using either " "``PyModule_Create`` or ``PyModule_FromDefAndSpec``." msgstr "" -#: c-api/module.rst:422 +#: c-api/module.rst:428 msgid "" "Add the functions from the ``NULL`` terminated *functions* array to " "*module*. Refer to the :c:type:`PyMethodDef` documentation for details on " @@ -470,11 +479,11 @@ msgid "" "``PyModule_FromDefAndSpec``." msgstr "" -#: c-api/module.rst:434 +#: c-api/module.rst:440 msgid "Support functions" msgstr "" -#: c-api/module.rst:436 +#: c-api/module.rst:442 msgid "" "The module initialization function (if using single phase initialization) or " "a function called from a module execution slot (if using multi-phase " @@ -482,40 +491,79 @@ msgid "" "module state:" msgstr "" -#: c-api/module.rst:443 +#: c-api/module.rst:449 msgid "" "Add an object to *module* as *name*. This is a convenience function which " -"can be used from the module's initialization function. This steals a " -"reference to *value* on success. Return ``-1`` on error, ``0`` on success." +"can be used from the module's initialization function." msgstr "" -#: c-api/module.rst:449 +#: c-api/module.rst:452 +msgid "" +"On success, return ``0``. On error, raise an exception and return ``-1``." +msgstr "" + +#: c-api/module.rst:454 +msgid "" +"Return ``NULL`` if *value* is ``NULL``. It must be called with an exception " +"raised in this case." +msgstr "" + +#: c-api/module.rst:506 +msgid "Example usage::" +msgstr "" + +#: c-api/module.rst:524 +msgid "" +"The example can also be written without checking explicitly if *obj* is " +"``NULL``::" +msgstr "" + +#: c-api/module.rst:540 +msgid "" +"Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in this " +"case, since *obj* can be ``NULL``." +msgstr "" + +#: c-api/module.rst:491 +msgid "" +"Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to " +"*value* on success (if it returns ``0``)." +msgstr "" + +#: c-api/module.rst:494 +msgid "" +"The new :c:func:`PyModule_AddObjectRef` function is recommended, since it is " +"easy to introduce reference leaks by misusing the :c:func:" +"`PyModule_AddObject` function." +msgstr "" + +#: c-api/module.rst:500 msgid "" "Unlike other functions that steal references, ``PyModule_AddObject()`` only " "decrements the reference count of *value* **on success**." msgstr "" -#: c-api/module.rst:452 +#: c-api/module.rst:503 msgid "" "This means that its return value must be checked, and calling code must :c:" -"func:`Py_DECREF` *value* manually on error. Example usage::" +"func:`Py_DECREF` *value* manually on error." msgstr "" -#: c-api/module.rst:464 +#: c-api/module.rst:546 msgid "" "Add an integer constant to *module* as *name*. This convenience function " "can be used from the module's initialization function. Return ``-1`` on " "error, ``0`` on success." msgstr "" -#: c-api/module.rst:471 +#: c-api/module.rst:553 msgid "" "Add a string constant to *module* as *name*. This convenience function can " "be used from the module's initialization function. The string *value* must " "be ``NULL``-terminated. Return ``-1`` on error, ``0`` on success." msgstr "" -#: c-api/module.rst:478 +#: c-api/module.rst:560 msgid "" "Add an int constant to *module*. The name and the value are taken from " "*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int " @@ -523,11 +571,11 @@ msgid "" "error, ``0`` on success." msgstr "" -#: c-api/module.rst:486 +#: c-api/module.rst:568 msgid "Add a string constant to *module*." msgstr "" -#: c-api/module.rst:490 +#: c-api/module.rst:572 msgid "" "Add a type object to *module*. The type object is finalized by calling " "internally :c:func:`PyType_Ready`. The name of the type object is taken from " @@ -535,25 +583,25 @@ msgid "" "``-1`` on error, ``0`` on success." msgstr "" -#: c-api/module.rst:500 +#: c-api/module.rst:582 msgid "Module lookup" msgstr "" -#: c-api/module.rst:502 +#: c-api/module.rst:584 msgid "" "Single-phase initialization creates singleton modules that can be looked up " "in the context of the current interpreter. This allows the module object to " "be retrieved later with only a reference to the module definition." msgstr "" -#: c-api/module.rst:506 +#: c-api/module.rst:588 msgid "" "These functions will not work on modules created using multi-phase " "initialization, since multiple such modules can be created from a single " "definition." msgstr "" -#: c-api/module.rst:511 +#: c-api/module.rst:593 msgid "" "Returns the module object that was created from *def* for the current " "interpreter. This method requires that the module object has been attached " @@ -562,18 +610,18 @@ msgid "" "to the interpreter state yet, it returns ``NULL``." msgstr "" -#: c-api/module.rst:518 +#: c-api/module.rst:600 msgid "" "Attaches the module object passed to the function to the interpreter state. " "This allows the module object to be accessible via :c:func:" "`PyState_FindModule`." msgstr "" -#: c-api/module.rst:521 +#: c-api/module.rst:603 msgid "Only effective on modules created using single-phase initialization." msgstr "" -#: c-api/module.rst:523 +#: c-api/module.rst:605 msgid "" "Python calls ``PyState_AddModule`` automatically after importing a module, " "so it is unnecessary (but harmless) to call it from module initialization " @@ -584,15 +632,15 @@ msgid "" "state updates)." msgstr "" -#: c-api/module.rst:542 +#: c-api/module.rst:624 msgid "The caller must hold the GIL." msgstr "" -#: c-api/module.rst:533 +#: c-api/module.rst:615 msgid "Return 0 on success or -1 on failure." msgstr "" -#: c-api/module.rst:539 +#: c-api/module.rst:621 msgid "" "Removes the module object created from *def* from the interpreter state. " "Return 0 on success or -1 on failure." diff --git a/c-api/number.po b/c-api/number.po index c024c83250..6bc4ada36d 100644 --- a/c-api/number.po +++ b/c-api/number.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -55,7 +55,7 @@ msgstr "" #: c-api/number.rst:46 msgid "" "Return the floor of *o1* divided by *o2*, or ``NULL`` on failure. This is " -"equivalent to the \"classic\" division of integers." +"the equivalent of the Python expression ``o1 // o2``." msgstr "" #: c-api/number.rst:52 @@ -64,7 +64,8 @@ msgid "" "by *o2*, or ``NULL`` on failure. The return value is \"approximate\" " "because binary floating point numbers are approximate; it is not possible to " "represent all real numbers in base two. This function can return a floating " -"point value when passed two integers." +"point value when passed two integers. This is the equivalent of the Python " +"expression ``o1 / o2``." msgstr "" #: c-api/number.rst:61 @@ -183,17 +184,18 @@ msgid "" "because binary floating point numbers are approximate; it is not possible to " "represent all real numbers in base two. This function can return a floating " "point value when passed two integers. The operation is done *in-place* when " -"*o1* supports it." +"*o1* supports it. This is the equivalent of the Python statement ``o1 /= " +"o2``." msgstr "" -#: c-api/number.rst:187 +#: c-api/number.rst:188 msgid "" "Returns the remainder of dividing *o1* by *o2*, or ``NULL`` on failure. The " "operation is done *in-place* when *o1* supports it. This is the equivalent " "of the Python statement ``o1 %= o2``." msgstr "" -#: c-api/number.rst:196 +#: c-api/number.rst:197 msgid "" "See the built-in function :func:`pow`. Returns ``NULL`` on failure. The " "operation is done *in-place* when *o1* supports it. This is the equivalent " @@ -203,60 +205,66 @@ msgid "" "an illegal memory access)." msgstr "" -#: c-api/number.rst:205 +#: c-api/number.rst:206 msgid "" "Returns the result of left shifting *o1* by *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 <<= o2``." msgstr "" -#: c-api/number.rst:212 +#: c-api/number.rst:213 msgid "" "Returns the result of right shifting *o1* by *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 >>= o2``." msgstr "" -#: c-api/number.rst:219 +#: c-api/number.rst:220 msgid "" "Returns the \"bitwise and\" of *o1* and *o2* on success and ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 &= o2``." msgstr "" -#: c-api/number.rst:226 +#: c-api/number.rst:227 msgid "" "Returns the \"bitwise exclusive or\" of *o1* by *o2* on success, or ``NULL`` " "on failure. The operation is done *in-place* when *o1* supports it. This " "is the equivalent of the Python statement ``o1 ^= o2``." msgstr "" -#: c-api/number.rst:233 +#: c-api/number.rst:234 msgid "" "Returns the \"bitwise or\" of *o1* and *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 |= o2``." msgstr "" -#: c-api/number.rst:242 +#: c-api/number.rst:243 msgid "" "Returns the *o* converted to an integer object on success, or ``NULL`` on " "failure. This is the equivalent of the Python expression ``int(o)``." msgstr "" -#: c-api/number.rst:250 +#: c-api/number.rst:251 msgid "" "Returns the *o* converted to a float object on success, or ``NULL`` on " "failure. This is the equivalent of the Python expression ``float(o)``." msgstr "" -#: c-api/number.rst:256 +#: c-api/number.rst:257 msgid "" "Returns the *o* converted to a Python int on success or ``NULL`` with a :exc:" "`TypeError` exception raised on failure." msgstr "" -#: c-api/number.rst:262 +#: c-api/number.rst:260 +msgid "" +"The result always has exact type :class:`int`. Previously, the result could " +"have been an instance of a subclass of ``int``." +msgstr "" + +#: c-api/number.rst:267 msgid "" "Returns the integer *n* converted to base *base* as a string. The *base* " "argument must be one of 2, 8, 10, or 16. For base 2, 8, or 16, the returned " @@ -265,25 +273,26 @@ msgid "" "`PyNumber_Index` first." msgstr "" -#: c-api/number.rst:271 +#: c-api/number.rst:276 msgid "" -"Returns *o* converted to a Py_ssize_t value if *o* can be interpreted as an " -"integer. If the call fails, an exception is raised and ``-1`` is returned." +"Returns *o* converted to a :c:type:`Py_ssize_t` value if *o* can be " +"interpreted as an integer. If the call fails, an exception is raised and " +"``-1`` is returned." msgstr "" -#: c-api/number.rst:274 +#: c-api/number.rst:279 msgid "" -"If *o* can be converted to a Python int but the attempt to convert to a " -"Py_ssize_t value would raise an :exc:`OverflowError`, then the *exc* " +"If *o* can be converted to a Python int but the attempt to convert to a :c:" +"type:`Py_ssize_t` value would raise an :exc:`OverflowError`, then the *exc* " "argument is the type of exception that will be raised (usually :exc:" "`IndexError` or :exc:`OverflowError`). If *exc* is ``NULL``, then the " "exception is cleared and the value is clipped to ``PY_SSIZE_T_MIN`` for a " "negative integer or ``PY_SSIZE_T_MAX`` for a positive integer." msgstr "" -#: c-api/number.rst:284 +#: c-api/number.rst:289 msgid "" -"Returns ``1`` if *o* is an index integer (has the nb_index slot of the " -"tp_as_number structure filled in), and ``0`` otherwise. This function always " -"succeeds." +"Returns ``1`` if *o* is an index integer (has the ``nb_index`` slot of the " +"``tp_as_number`` structure filled in), and ``0`` otherwise. This function " +"always succeeds." msgstr "" diff --git a/c-api/object.po b/c-api/object.po index 10af58d834..509a3e564d 100644 --- a/c-api/object.po +++ b/c-api/object.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2019-08-16 22:56+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -35,7 +35,7 @@ msgid "" msgstr "" "Traite proprement le renvoi de :c:data:`Py_NotImplemented` depuis " "l'intérieur d'une fonction C (c'est-à-dire, incrémente le compteur de " -"référence de `NotImplemented` et le renvoie)." +"référence de ``NotImplemented`` et le renvoie)." #: c-api/object.rst:24 msgid "" @@ -118,7 +118,7 @@ msgstr "" "attributs d'instance, contrairement aux autres descripteurs. Sinon, une :exc:" "`AttributeError` est levée." -#: c-api/object.rst:90 +#: c-api/object.rst:91 msgid "" "Set the value of the attribute named *attr_name*, for object *o*, to the " "value *v*. Raise an exception and return ``-1`` on failure; return ``0`` on " @@ -132,22 +132,23 @@ msgstr "" #: c-api/object.rst:84 #, fuzzy msgid "" -"If *v* is ``NULL``, the attribute is deleted, however this feature is " -"deprecated in favour of using :c:func:`PyObject_DelAttr`." +"If *v* is ``NULL``, the attribute is deleted. This behaviour is deprecated " +"in favour of using :c:func:`PyObject_DelAttr`, but there are currently no " +"plans to remove it." msgstr "" "Si *v* est *NULL*, l'attribut est supprimé. Cette fonctionnalité est " "obsolète,nous vous conseillons d'utiliser :c:func:`PyObject_DelAttr`." -#: c-api/object.rst:95 +#: c-api/object.rst:96 #, fuzzy msgid "" -"If *v* is ``NULL``, the attribute is deleted, however this feature is " -"deprecated in favour of using :c:func:`PyObject_DelAttrString`." +"If *v* is ``NULL``, the attribute is deleted, but this feature is deprecated " +"in favour of using :c:func:`PyObject_DelAttrString`." msgstr "" "Si *v* est *NULL*, l'attribut est supprimé. Cette fonctionnalité est " "obsolète, nous vous conseillons d'utiliser :c:func:`PyObject_DelAttr`." -#: c-api/object.rst:101 +#: c-api/object.rst:102 msgid "" "Generic attribute setter and deleter function that is meant to be put into a " "type object's :c:member:`~PyTypeObject.tp_setattro` slot. It looks for a " @@ -167,7 +168,7 @@ msgstr "" "attr:`~object.__dict__` de l'objet (si présent). En cas de succès, ``0`` est " "renvoyé, sinon une :exc:`AttributeError` est levée et ``-1`` est renvoyé." -#: c-api/object.rst:119 +#: c-api/object.rst:120 msgid "" "Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on " "failure. This is the equivalent of the Python statement ``del o.attr_name``." @@ -176,7 +177,7 @@ msgstr "" "cas d'échec. Ceci est l'équivalent de l'expression Python ``del o." "attr_name``." -#: c-api/object.rst:125 +#: c-api/object.rst:126 msgid "" "A generic implementation for the getter of a ``__dict__`` descriptor. It " "creates the dictionary if necessary." @@ -184,7 +185,7 @@ msgstr "" "Une implémentation générique de l'accesseur d'un descripteur d'un " "``__dict__``. Crée le dictionnaire si nécessaire." -#: c-api/object.rst:133 +#: c-api/object.rst:134 msgid "" "A generic implementation for the setter of a ``__dict__`` descriptor. This " "implementation does not allow the dictionary to be deleted." @@ -192,7 +193,7 @@ msgstr "" "Une implémentation générique du mutateur d'un descripteur de ``__dict__``. " "Cette implémentation n'autorise pas la suppression du dictionnaire." -#: c-api/object.rst:141 +#: c-api/object.rst:142 #, fuzzy msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " @@ -211,7 +212,7 @@ msgstr "" "*opid*. Renvoie la valeur de la comparaison en cas de succès, ou *NULL* en " "cas d'échec." -#: c-api/object.rst:151 +#: c-api/object.rst:152 msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " "which must be one of :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:" @@ -229,7 +230,7 @@ msgstr "" "l'équivalent de l'expression Python ``o1 op o2``, où ``op`` est l'opérateur " "correspondant à *opid*." -#: c-api/object.rst:160 +#: c-api/object.rst:161 msgid "" "If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` " "will always return ``1`` for :const:`Py_EQ` and ``0`` for :const:`Py_NE`." @@ -237,7 +238,7 @@ msgstr "" "Si *o1* et *o2* sont le même objet, :c:func:`PyObject_RichCompareBool` " "renvoie toujours ``1`` pour :const:`Py_EQ` et ``0`` pour :const:`Py_NE`." -#: c-api/object.rst:167 +#: c-api/object.rst:168 #, fuzzy msgid "" "Compute a string representation of object *o*. Returns the string " @@ -250,7 +251,7 @@ msgstr "" "d'échec. Ceci est l'équivalent de l'expression Python ``repr(o)``. Appelé " "par la fonction native :func:`repr`." -#: c-api/object.rst:195 +#: c-api/object.rst:196 msgid "" "This function now includes a debug assertion to help ensure that it does not " "silently discard an active exception." @@ -258,7 +259,7 @@ msgstr "" "Cette fonction inclut maintenant une assertion de débogage afin d'assurer " "qu'elle ne passe pas sous silence une exception active." -#: c-api/object.rst:179 +#: c-api/object.rst:180 msgid "" "As :c:func:`PyObject_Repr`, compute a string representation of object *o*, " "but escape the non-ASCII characters in the string returned by :c:func:" @@ -268,12 +269,12 @@ msgid "" msgstr "" "Comme :c:Func:`PyObject_Repr`, calcule une représentation en chaîne de " "caractères de l'objet *o*, mais échappe les caractères non ASCII dans la " -"chaîne de caractères renvoyée par :c:Func:`PyObject_Repr` avec' ``\\x``, ``" -"\\u`` ou ``\\U``. Cela génère une chaîne de caractères similaire à celle " +"chaîne de caractères renvoyée par :c:Func:`PyObject_Repr` avec' ``\\x``, " +"``\\u`` ou ``\\U``. Cela génère une chaîne de caractères similaire à celle " "renvoyée par :c:func:`PyObject_Repr` en Python 2. Appelée par la fonction " "native :func:`ascii`." -#: c-api/object.rst:190 +#: c-api/object.rst:191 #, fuzzy msgid "" "Compute a string representation of object *o*. Returns the string " @@ -287,7 +288,7 @@ msgstr "" "par la fonction native :func:`str`, et, par conséquent, par la fonction :" "func:`print`." -#: c-api/object.rst:204 +#: c-api/object.rst:205 #, fuzzy msgid "" "Compute a bytes representation of object *o*. ``NULL`` is returned on " @@ -302,7 +303,7 @@ msgstr "" "entier. Contrairement à ``bytes(o)``, une exception *TypeError* est levée " "lorsque *o* est un entier au lieu d'un objet octet initialisé avec des zéros." -#: c-api/object.rst:213 +#: c-api/object.rst:214 msgid "" "Return ``1`` if the class *derived* is identical to or derived from the " "class *cls*, otherwise return ``0``. In case of an error, return ``-1``." @@ -310,7 +311,7 @@ msgstr "" "Renvoie ``1`` si la classe *derived* est identique à ou dérivée de la classe " "*cls*, renvoie ``0`` sinon. En cas d'erreur, renvoie ``-1``." -#: c-api/object.rst:235 +#: c-api/object.rst:236 msgid "" "If *cls* is a tuple, the check will be done against every entry in *cls*. " "The result will be ``1`` when at least one of the checks returns ``1``, " @@ -320,7 +321,7 @@ msgstr "" "*cls*. Le résultat sera ``1`` quand au moins une des vérifications renvoie " "``1``, sinon ce sera ``0``." -#: c-api/object.rst:220 +#: c-api/object.rst:221 msgid "" "If *cls* has a :meth:`~class.__subclasscheck__` method, it will be called to " "determine the subclass status as described in :pep:`3119`. Otherwise, " @@ -332,7 +333,7 @@ msgstr "" "Sinon, *derived* est une sous-classe de *cls* si c'est une sous-classe " "directe ou indirecte, c'est-à-dire contenue dans ``cls.__mro__``." -#: c-api/object.rst:225 +#: c-api/object.rst:226 msgid "" "Normally only class objects, i.e. instances of :class:`type` or a derived " "class, are considered classes. However, objects can override this by having " @@ -343,7 +344,7 @@ msgstr "" "les objets peuvent surcharger cela en ayant un attribut :attr:`__bases__` " "(qui doit être un *n*-uplet de classes de bases)." -#: c-api/object.rst:232 +#: c-api/object.rst:233 msgid "" "Return ``1`` if *inst* is an instance of the class *cls* or a subclass of " "*cls*, or ``0`` if not. On error, returns ``-1`` and sets an exception." @@ -352,7 +353,7 @@ msgstr "" "classe de *cls*, ou ``0`` sinon. En cas d'erreur, renvoie ``-1`` et " "initialise une exception." -#: c-api/object.rst:239 +#: c-api/object.rst:240 msgid "" "If *cls* has a :meth:`~class.__instancecheck__` method, it will be called to " "determine the subclass status as described in :pep:`3119`. Otherwise, " @@ -363,7 +364,7 @@ msgstr "" "Sinon, *inst* est une instance *cls* si sa classe est une sous-classe de " "*cls*." -#: c-api/object.rst:243 +#: c-api/object.rst:244 msgid "" "An instance *inst* can override what is considered its class by having a :" "attr:`__class__` attribute." @@ -371,7 +372,7 @@ msgstr "" "Une instance *inst* peut surcharger ce qui est considéré comme sa classe en " "ayant un attribut :attr:`__class__`." -#: c-api/object.rst:246 +#: c-api/object.rst:247 msgid "" "An object *cls* can override if it is considered a class, and what its base " "classes are, by having a :attr:`__bases__` attribute (which must be a tuple " @@ -381,19 +382,19 @@ msgstr "" "que ses classes de bases sont, en ayant un attribut :attr:`__bases__` (qui " "doit être un *n*-uplet des classes de base)." -#: c-api/object.rst:255 +#: c-api/object.rst:256 msgid "" "Compute and return the hash value of an object *o*. On failure, return " "``-1``. This is the equivalent of the Python expression ``hash(o)``." msgstr "" -#: c-api/object.rst:258 +#: c-api/object.rst:259 msgid "" -"The return type is now Py_hash_t. This is a signed integer the same size as " -"Py_ssize_t." +"The return type is now Py_hash_t. This is a signed integer the same size " +"as :c:type:`Py_ssize_t`." msgstr "" -#: c-api/object.rst:265 +#: c-api/object.rst:266 msgid "" "Set a :exc:`TypeError` indicating that ``type(o)`` is not hashable and " "return ``-1``. This function receives special treatment when stored in a " @@ -401,38 +402,38 @@ msgid "" "that it is not hashable." msgstr "" -#: c-api/object.rst:273 +#: c-api/object.rst:274 msgid "" "Returns ``1`` if the object *o* is considered to be true, and ``0`` " "otherwise. This is equivalent to the Python expression ``not not o``. On " "failure, return ``-1``." msgstr "" -#: c-api/object.rst:280 +#: c-api/object.rst:281 msgid "" "Returns ``0`` if the object *o* is considered to be true, and ``1`` " "otherwise. This is equivalent to the Python expression ``not o``. On " "failure, return ``-1``." msgstr "" -#: c-api/object.rst:289 +#: c-api/object.rst:290 msgid "" "When *o* is non-``NULL``, returns a type object corresponding to the object " "type of object *o*. On failure, raises :exc:`SystemError` and returns " "``NULL``. This is equivalent to the Python expression ``type(o)``. This " "function increments the reference count of the return value. There's really " -"no reason to use this function instead of the common expression ``o-" -">ob_type``, which returns a pointer of type :c:type:`PyTypeObject*`, except " -"when the incremented reference count is needed." +"no reason to use this function instead of the :c:func:`Py_TYPE()` function, " +"which returns a pointer of type :c:type:`PyTypeObject*`, except when the " +"incremented reference count is needed." msgstr "" -#: c-api/object.rst:300 +#: c-api/object.rst:301 msgid "" -"Return true if the object *o* is of type *type* or a subtype of *type*. " -"Both parameters must be non-``NULL``." +"Return non-zero if the object *o* is of type *type* or a subtype of *type*, " +"and ``0`` otherwise. Both parameters must be non-``NULL``." msgstr "" -#: c-api/object.rst:309 +#: c-api/object.rst:310 msgid "" "Return the length of object *o*. If the object *o* provides either the " "sequence and mapping protocols, the sequence length is returned. On error, " @@ -440,15 +441,16 @@ msgid "" "``len(o)``." msgstr "" -#: c-api/object.rst:316 +#: c-api/object.rst:317 msgid "" "Return an estimated length for the object *o*. First try to return its " "actual length, then an estimate using :meth:`~object.__length_hint__`, and " "finally return the default value. On error return ``-1``. This is the " -"equivalent to the Python expression ``operator.length_hint(o, default)``." +"equivalent to the Python expression ``operator.length_hint(o, " +"defaultvalue)``." msgstr "" -#: c-api/object.rst:326 +#: c-api/object.rst:327 #, fuzzy msgid "" "Return element of *o* corresponding to the object *key* or ``NULL`` on " @@ -458,7 +460,7 @@ msgstr "" "l'attribut en cas de succès, ou *NULL* en cas d'échec. Ceci est équivalent à " "l'expression Python ``o.attr_name``." -#: c-api/object.rst:332 +#: c-api/object.rst:333 #, fuzzy msgid "" "Map the object *key* to the value *v*. Raise an exception and return ``-1`` " @@ -470,7 +472,7 @@ msgstr "" "``0`` en cas de succès. Ceci est équivalent à l'instruction Python ``o." "attr_name = v``." -#: c-api/object.rst:340 +#: c-api/object.rst:341 #, fuzzy msgid "" "Remove the mapping for the object *key* from the object *o*. Return ``-1`` " @@ -480,7 +482,7 @@ msgstr "" "Renvoie ``-1`` en cas d'échec. C'est l'équivalent de la commande Python " "``del o[key]``." -#: c-api/object.rst:346 +#: c-api/object.rst:347 msgid "" "This is equivalent to the Python expression ``dir(o)``, returning a " "(possibly empty) list of strings appropriate for the object argument, or " @@ -490,7 +492,7 @@ msgid "" "`PyErr_Occurred` will return false." msgstr "" -#: c-api/object.rst:355 +#: c-api/object.rst:356 msgid "" "This is equivalent to the Python expression ``iter(o)``. It returns a new " "iterator for the object argument, or the object itself if the object is " @@ -498,6 +500,15 @@ msgid "" "object cannot be iterated." msgstr "" +#: c-api/object.rst:364 +msgid "" +"This is the equivalent to the Python expression ``aiter(o)``. Takes an :" +"class:`AsyncIterable` object and returns an :class:`AsyncIterator` for it. " +"This is typically a new iterator but if the argument is an :class:" +"`AsyncIterator`, this returns itself. Raises :exc:`TypeError` and returns " +"``NULL`` if the object cannot be iterated." +msgstr "" + #~ msgid "" #~ "Determine if the object *o* is callable. Return ``1`` if the object is " #~ "callable and ``0`` otherwise. This function always succeeds." diff --git a/c-api/refcounting.po b/c-api/refcounting.po index 405d98f2c6..91751cf3b6 100644 --- a/c-api/refcounting.po +++ b/c-api/refcounting.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -25,27 +25,93 @@ msgid "" msgstr "" #: c-api/refcounting.rst:16 +msgid "Increment the reference count for object *o*." +msgstr "" + +#: c-api/refcounting.rst:18 msgid "" -"Increment the reference count for object *o*. The object must not be " -"``NULL``; if you aren't sure that it isn't ``NULL``, use :c:func:" -"`Py_XINCREF`." +"This function is usually used to convert a :term:`borrowed reference` to a :" +"term:`strong reference` in-place. The :c:func:`Py_NewRef` function can be " +"used to create a new :term:`strong reference`." msgstr "" #: c-api/refcounting.rst:22 msgid "" +"The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, " +"use :c:func:`Py_XINCREF`." +msgstr "" + +#: c-api/refcounting.rst:28 +msgid "" "Increment the reference count for object *o*. The object may be ``NULL``, " "in which case the macro has no effect." msgstr "" -#: c-api/refcounting.rst:28 +#: c-api/refcounting.rst:31 +msgid "See also :c:func:`Py_XNewRef`." +msgstr "" + +#: c-api/refcounting.rst:36 +msgid "" +"Create a new :term:`strong reference` to an object: increment the reference " +"count of the object *o* and return the object *o*." +msgstr "" + +#: c-api/refcounting.rst:39 msgid "" -"Decrement the reference count for object *o*. The object must not be " -"``NULL``; if you aren't sure that it isn't ``NULL``, use :c:func:" -"`Py_XDECREF`. If the reference count reaches zero, the object's type's " -"deallocation function (which must not be ``NULL``) is invoked." +"When the :term:`strong reference` is no longer needed, :c:func:`Py_DECREF` " +"should be called on it to decrement the object reference count." msgstr "" -#: c-api/refcounting.rst:35 +#: c-api/refcounting.rst:42 +msgid "" +"The object *o* must not be ``NULL``; use :c:func:`Py_XNewRef` if *o* can be " +"``NULL``." +msgstr "" + +#: c-api/refcounting.rst:45 +msgid "For example::" +msgstr "" + +#: c-api/refcounting.rst:50 +msgid "can be written as::" +msgstr "" + +#: c-api/refcounting.rst:54 +msgid "See also :c:func:`Py_INCREF`." +msgstr "" + +#: c-api/refcounting.rst:61 +msgid "Similar to :c:func:`Py_NewRef`, but the object *o* can be NULL." +msgstr "" + +#: c-api/refcounting.rst:63 +msgid "If the object *o* is ``NULL``, the function just returns ``NULL``." +msgstr "" + +#: c-api/refcounting.rst:70 +msgid "Decrement the reference count for object *o*." +msgstr "" + +#: c-api/refcounting.rst:72 +msgid "" +"If the reference count reaches zero, the object's type's deallocation " +"function (which must not be ``NULL``) is invoked." +msgstr "" + +#: c-api/refcounting.rst:75 +msgid "" +"This function is usually used to delete a :term:`strong reference` before " +"exiting its scope." +msgstr "" + +#: c-api/refcounting.rst:78 +msgid "" +"The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, " +"use :c:func:`Py_XDECREF`." +msgstr "" + +#: c-api/refcounting.rst:83 msgid "" "The deallocation function can cause arbitrary Python code to be invoked (e." "g. when a class instance with a :meth:`__del__` method is deallocated). " @@ -58,14 +124,14 @@ msgid "" "temporary variable." msgstr "" -#: c-api/refcounting.rst:47 +#: c-api/refcounting.rst:95 msgid "" "Decrement the reference count for object *o*. The object may be ``NULL``, " "in which case the macro has no effect; otherwise the effect is the same as " "for :c:func:`Py_DECREF`, and the same warning applies." msgstr "" -#: c-api/refcounting.rst:54 +#: c-api/refcounting.rst:102 msgid "" "Decrement the reference count for object *o*. The object may be ``NULL``, " "in which case the macro has no effect; otherwise the effect is the same as " @@ -75,21 +141,25 @@ msgid "" "the argument to ``NULL`` before decrementing its reference count." msgstr "" -#: c-api/refcounting.rst:61 +#: c-api/refcounting.rst:109 msgid "" "It is a good idea to use this macro whenever decrementing the reference " "count of an object that might be traversed during garbage collection." msgstr "" -#: c-api/refcounting.rst:65 +#: c-api/refcounting.rst:114 msgid "" -"The following functions are for runtime dynamic embedding of Python: " -"``Py_IncRef(PyObject *o)``, ``Py_DecRef(PyObject *o)``. They are simply " -"exported function versions of :c:func:`Py_XINCREF` and :c:func:`Py_XDECREF`, " -"respectively." +"Increment the reference count for object *o*. A function version of :c:func:" +"`Py_XINCREF`. It can be used for runtime dynamic embedding of Python." msgstr "" -#: c-api/refcounting.rst:70 +#: c-api/refcounting.rst:120 +msgid "" +"Decrement the reference count for object *o*. A function version of :c:func:" +"`Py_XDECREF`. It can be used for runtime dynamic embedding of Python." +msgstr "" + +#: c-api/refcounting.rst:124 msgid "" "The following functions or macros are only for use within the interpreter " "core: :c:func:`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:" diff --git a/c-api/reflection.po b/c-api/reflection.po index 10deec6abc..c081828e62 100644 --- a/c-api/reflection.po +++ b/c-api/reflection.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: 2019-02-26 12:01+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -59,35 +59,6 @@ msgid "See also :c:func:`PyThreadState_GetFrame`." msgstr "" #: c-api/reflection.rst:36 -msgid "Get the *frame* next outer frame." -msgstr "" - -#: c-api/reflection.rst:38 -msgid "Return a strong reference, or ``NULL`` if *frame* has no outer frame." -msgstr "" - -#: c-api/reflection.rst:60 -msgid "*frame* must not be ``NULL``." -msgstr "" - -#: c-api/reflection.rst:47 -msgid "Get the *frame* code." -msgstr "" - -#: c-api/reflection.rst:49 -msgid "Return a strong reference." -msgstr "" - -#: c-api/reflection.rst:51 -msgid "" -"*frame* must not be ``NULL``. The result (frame code) cannot be ``NULL``." -msgstr "" - -#: c-api/reflection.rst:58 -msgid "Return the line number that *frame* is currently executing." -msgstr "Renvoie le numéro de ligne que *frame* est en train d'exécuter" - -#: c-api/reflection.rst:65 msgid "" "Return the name of *func* if it is a function, class or instance object, " "else the name of *func*\\s type." @@ -95,7 +66,7 @@ msgstr "" "Renvoie le nom de *func* s'il s'agit d'une fonction, d'une classe ou d'un " "objet d'instance, sinon le nom du type de *func*" -#: c-api/reflection.rst:71 +#: c-api/reflection.rst:42 msgid "" "Return a description string, depending on the type of *func*. Return values " "include \"()\" for functions and methods, \" constructor\", \" instance\", " @@ -104,6 +75,9 @@ msgid "" msgstr "" "Renvoie une description en chaîne de caractères, en fonction du type de " "*func*. Les valeurs renvoyées peuvent être ``\"()\"`` pour les fonction et " -"les méthodes, ``\\\" constructor\\\"``, ``\\\" instance\\\"``, ``\\\" object" -"\\\"``. Concaténé avec le résultat de :c:func:`PyEval_GetFuncName`, le " +"les méthodes, ``\\\" constructor\\\"``, ``\\\" instance\\\"``, ``\\\" " +"object\\\"``. Concaténé avec le résultat de :c:func:`PyEval_GetFuncName`, le " "résultat sera une description de *func*" + +#~ msgid "Return the line number that *frame* is currently executing." +#~ msgstr "Renvoie le numéro de ligne que *frame* est en train d'exécuter" diff --git a/c-api/sequence.po b/c-api/sequence.po index 15b5b657ac..b5cf5b641b 100644 --- a/c-api/sequence.po +++ b/c-api/sequence.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -20,11 +20,11 @@ msgstr "" #: c-api/sequence.rst:11 msgid "" -"Return ``1`` if the object provides sequence protocol, and ``0`` otherwise. " -"Note that it returns ``1`` for Python classes with a :meth:`__getitem__` " -"method unless they are :class:`dict` subclasses since in general case it is " -"impossible to determine what the type of keys it supports. This function " -"always succeeds." +"Return ``1`` if the object provides the sequence protocol, and ``0`` " +"otherwise. Note that it returns ``1`` for Python classes with a :meth:" +"`__getitem__` method, unless they are :class:`dict` subclasses, since in " +"general it is impossible to determine what type of keys the class supports. " +"This function always succeeds." msgstr "" #: c-api/sequence.rst:23 @@ -85,8 +85,8 @@ msgstr "" #: c-api/sequence.rst:72 msgid "" -"If *v* is ``NULL``, the element is deleted, however this feature is " -"deprecated in favour of using :c:func:`PySequence_DelItem`." +"If *v* is ``NULL``, the element is deleted, but this feature is deprecated " +"in favour of using :c:func:`PySequence_DelItem`." msgstr "" #: c-api/sequence.rst:78 @@ -166,8 +166,8 @@ msgstr "" #: c-api/sequence.rst:148 msgid "" "Returns the length of *o*, assuming that *o* was returned by :c:func:" -"`PySequence_Fast` and that *o* is not ``NULL``. The size can also be gotten " -"by calling :c:func:`PySequence_Size` on *o*, but :c:func:" +"`PySequence_Fast` and that *o* is not ``NULL``. The size can also be " +"retrieved by calling :c:func:`PySequence_Size` on *o*, but :c:func:" "`PySequence_Fast_GET_SIZE` is faster because it can assume *o* is a list or " "tuple." msgstr "" diff --git a/c-api/set.po b/c-api/set.po index 3a076f7c9c..6bfc46fbcc 100644 --- a/c-api/set.po +++ b/c-api/set.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -21,14 +21,14 @@ msgstr "" #: c-api/set.rst:15 msgid "" "This section details the public API for :class:`set` and :class:`frozenset` " -"objects. Any functionality not listed below is best accessed using the " -"either the abstract object protocol (including :c:func:" -"`PyObject_CallMethod`, :c:func:`PyObject_RichCompareBool`, :c:func:" -"`PyObject_Hash`, :c:func:`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:" -"`PyObject_Print`, and :c:func:`PyObject_GetIter`) or the abstract number " -"protocol (including :c:func:`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:" -"func:`PyNumber_Or`, :c:func:`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, :" -"c:func:`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, and :c:func:" +"objects. Any functionality not listed below is best accessed using either " +"the abstract object protocol (including :c:func:`PyObject_CallMethod`, :c:" +"func:`PyObject_RichCompareBool`, :c:func:`PyObject_Hash`, :c:func:" +"`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:`PyObject_Print`, and :c:" +"func:`PyObject_GetIter`) or the abstract number protocol (including :c:func:" +"`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:func:`PyNumber_Or`, :c:func:" +"`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, :c:func:" +"`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, and :c:func:" "`PyNumber_InPlaceXor`)." msgstr "" @@ -39,9 +39,9 @@ msgid "" "`PyDictObject` in that it is a fixed size for small sets (much like tuple " "storage) and will point to a separate, variable sized block of memory for " "medium and large sized sets (much like list storage). None of the fields of " -"this structure should be considered public and are subject to change. All " -"access should be done through the documented API rather than by manipulating " -"the values in the structure." +"this structure should be considered public and all are subject to change. " +"All access should be done through the documented API rather than by " +"manipulating the values in the structure." msgstr "" #: c-api/set.rst:40 @@ -86,19 +86,25 @@ msgid "" "an instance of a subtype. This function always succeeds." msgstr "" -#: c-api/set.rst:71 +#: c-api/set.rst:70 +msgid "" +"Return true if *p* is a :class:`set` object but not an instance of a " +"subtype. This function always succeeds." +msgstr "" + +#: c-api/set.rst:77 msgid "" "Return true if *p* is a :class:`set` object or a :class:`frozenset` object " "but not an instance of a subtype. This function always succeeds." msgstr "" -#: c-api/set.rst:77 +#: c-api/set.rst:83 msgid "" "Return true if *p* is a :class:`frozenset` object but not an instance of a " "subtype. This function always succeeds." msgstr "" -#: c-api/set.rst:83 +#: c-api/set.rst:89 msgid "" "Return a new :class:`set` containing objects returned by the *iterable*. " "The *iterable* may be ``NULL`` to create a new empty set. Return the new " @@ -107,7 +113,7 @@ msgid "" "(``c=set(s)``)." msgstr "" -#: c-api/set.rst:92 +#: c-api/set.rst:98 msgid "" "Return a new :class:`frozenset` containing objects returned by the " "*iterable*. The *iterable* may be ``NULL`` to create a new empty frozenset. " @@ -115,24 +121,24 @@ msgid "" "`TypeError` if *iterable* is not actually iterable." msgstr "" -#: c-api/set.rst:98 +#: c-api/set.rst:104 msgid "" "The following functions and macros are available for instances of :class:" "`set` or :class:`frozenset` or instances of their subtypes." msgstr "" -#: c-api/set.rst:106 +#: c-api/set.rst:112 msgid "" "Return the length of a :class:`set` or :class:`frozenset` object. Equivalent " "to ``len(anyset)``. Raises a :exc:`PyExc_SystemError` if *anyset* is not a :" "class:`set`, :class:`frozenset`, or an instance of a subtype." msgstr "" -#: c-api/set.rst:113 +#: c-api/set.rst:119 msgid "Macro form of :c:func:`PySet_Size` without error checking." msgstr "" -#: c-api/set.rst:118 +#: c-api/set.rst:124 msgid "" "Return ``1`` if found, ``0`` if not found, and ``-1`` if an error is " "encountered. Unlike the Python :meth:`__contains__` method, this function " @@ -142,10 +148,10 @@ msgid "" "or an instance of a subtype." msgstr "" -#: c-api/set.rst:127 +#: c-api/set.rst:133 msgid "" "Add *key* to a :class:`set` instance. Also works with :class:`frozenset` " -"instances (like :c:func:`PyTuple_SetItem` it can be used to fill-in the " +"instances (like :c:func:`PyTuple_SetItem` it can be used to fill in the " "values of brand new frozensets before they are exposed to other code). " "Return ``0`` on success or ``-1`` on failure. Raise a :exc:`TypeError` if " "the *key* is unhashable. Raise a :exc:`MemoryError` if there is no room to " @@ -153,13 +159,13 @@ msgid "" "`set` or its subtype." msgstr "" -#: c-api/set.rst:136 +#: c-api/set.rst:142 msgid "" "The following functions are available for instances of :class:`set` or its " "subtypes but not for instances of :class:`frozenset` or its subtypes." msgstr "" -#: c-api/set.rst:142 +#: c-api/set.rst:148 msgid "" "Return ``1`` if found and removed, ``0`` if not found (no action taken), and " "``-1`` if an error is encountered. Does not raise :exc:`KeyError` for " @@ -170,7 +176,7 @@ msgid "" "subtype." msgstr "" -#: c-api/set.rst:152 +#: c-api/set.rst:158 msgid "" "Return a new reference to an arbitrary object in the *set*, and removes the " "object from the *set*. Return ``NULL`` on failure. Raise :exc:`KeyError` " @@ -178,6 +184,6 @@ msgid "" "of :class:`set` or its subtype." msgstr "" -#: c-api/set.rst:160 +#: c-api/set.rst:166 msgid "Empty an existing set of all elements." msgstr "" diff --git a/c-api/stable.po b/c-api/stable.po index 0acc383a21..0e0c260777 100644 --- a/c-api/stable.po +++ b/c-api/stable.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" "PO-Revision-Date: 2018-10-04 12:26+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -15,83 +15,291 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: c-api/stable.rst:7 -msgid "Stable Application Binary Interface" -msgstr "ABI Stable" +msgid "C API Stability" +msgstr "" #: c-api/stable.rst:9 +#, fuzzy msgid "" -"Traditionally, the C API of Python will change with every release. Most " -"changes will be source-compatible, typically by only adding API, rather than " -"changing existing API or removing API (although some interfaces do get " -"removed after being deprecated first)." +"Python's C API is covered by the Backwards Compatibility Policy, :pep:`387`. " +"While the C API will change with every minor release (e.g. from 3.9 to " +"3.10), most changes will be source-compatible, typically by only adding new " +"API. Changing existing API or removing API is only done after a deprecation " +"period or to fix serious issues." msgstr "" "L'API C de Python change à chaque version. La majorité de ces changement " "n'affecte cependant pas la compatibilité du code source. Typiquement, des " "API sont ajoutées, mais ni modifiées ni supprimées (bien que certaines " "interfaces puissent être supprimées, après avoir d'abord été dépréciées)." -#: c-api/stable.rst:14 -msgid "" -"Unfortunately, the API compatibility does not extend to binary compatibility " -"(the ABI). The reason is primarily the evolution of struct definitions, " -"where addition of a new field, or changing the type of a field, might not " -"break the API, but can break the ABI. As a consequence, extension modules " -"need to be recompiled for every Python release (although an exception is " -"possible on Unix when none of the affected interfaces are used). In " -"addition, on Windows, extension modules link with a specific pythonXY.dll " -"and need to be recompiled to link with a newer one." -msgstr "" -"Malheureusement, la compatibilité de l'API ne s'étend pas à une " -"compatibilité binaire (l'ABI). L'évolution des structures en est la raison " -"principale : l'ajout de nouveaux attributs, ou le changement du type d'un " -"attribut peut ne pas casser l'API mais casser l'ABI. Par conséquent, les " -"modules d'extension doivent être recompilés à chaque nouvelle version de " -"Python (ce n'est exceptionnellement pas nécessaire sur Unix, si aucune des " -"interfaces modifiées n'est utilisée). De plus, sous Windows, les modules " -"d'extension sont liés à un *pythonXY.dll* spécifique, ils est donc " -"nécessaire de les recompiler pour les lier au nouveau DLL." - -#: c-api/stable.rst:23 -msgid "" -"Since Python 3.2, a subset of the API has been declared to guarantee a " -"stable ABI. Extension modules wishing to use this API (called \"limited API" -"\") need to define ``Py_LIMITED_API``. A number of interpreter details then " -"become hidden from the extension module; in return, a module is built that " -"works on any 3.x version (x>=2) without recompilation." -msgstr "" -"Depuis Python 3.2 il est garanti qu'une certaine partie de l'API gardera une " -"ABI stable. Les modules d'extension souhaitant utiliser cette API (Appellée " -"\"API limitée\") doivent définir ``Py_LIMITED_API``. Des spécificités de " -"l'interpréteur sont alors cachées au module, en contrepartie le module " -"devient compatible avec toutes les versions de Python 3.x (x>=2) sans " -"recompilation." - -#: c-api/stable.rst:29 -msgid "" -"In some cases, the stable ABI needs to be extended with new functions. " -"Extension modules wishing to use these new APIs need to set " -"``Py_LIMITED_API`` to the ``PY_VERSION_HEX`` value (see :ref:" -"`apiabiversion`) of the minimum Python version they want to support (e.g. " -"``0x03030000`` for Python 3.3). Such modules will work on all subsequent " -"Python releases, but fail to load (because of missing symbols) on the older " -"releases." -msgstr "" -"Dans certains cas, il est nécessaire d'étendre l'ABI stable avec de " -"nouvelles fonctions. Les modules d'extension souhaitant utiliser ces " -"nouvelles APIs doivent configurer ``Py_LIMITED_API`` à la valeur " -"``Py_VERSION_HEX`` correspondant à la plus ancienne version de Python qu'ils " -"souhaitent supporter (voir :ref:`apiabiversion`, par exemple ``0x03030000`` " -"pour Python 3.3). De tels modules fonctionneront dans toutes les versions " -"ultérieures de Python, mais ne pourront pas se charger (dû à des symboles " -"manquants) sur les versions plus anciennes." - -#: c-api/stable.rst:36 -msgid "" -"As of Python 3.2, the set of functions available to the limited API is " -"documented in :pep:`384`. In the C API documentation, API elements that are " -"not part of the limited API are marked as \"Not part of the limited API.\"" -msgstr "" -"Depuis Python 3.2, l'ensemble des fonctions exposées par l'API limitée est " -"documentée dans la :pep:`384`. Dans la documentation de l'API C, les " -"éléments ne faisant pas partie de l'API limitée sont notés \"Ne faisant pas " -"partie de l'API limitée\" (*\"Not part of the limited API\"*)." +#: c-api/stable.rst:15 +msgid "" +"CPython's Application Binary Interface (ABI) is forward- and backwards-" +"compatible across a minor release (if these are compiled the same way; see :" +"ref:`stable-abi-platform` below). So, code compiled for Python 3.10.0 will " +"work on 3.10.8 and vice versa, but will need to be compiled separately for " +"3.9.x and 3.10.x." +msgstr "" + +#: c-api/stable.rst:21 +msgid "" +"Names prefixed by an underscore, such as ``_Py_InternalState``, are private " +"API that can change without notice even in patch releases." +msgstr "" + +#: c-api/stable.rst:26 +msgid "Stable Application Binary Interface" +msgstr "ABI Stable" + +#: c-api/stable.rst:28 +msgid "" +"Python 3.2 introduced the *Limited API*, a subset of Python's C API. " +"Extensions that only use the Limited API can be compiled once and work with " +"multiple versions of Python. Contents of the Limited API are :ref:`listed " +"below `." +msgstr "" + +#: c-api/stable.rst:33 +msgid "" +"To enable this, Python provides a *Stable ABI*: a set of symbols that will " +"remain compatible across Python 3.x versions. The Stable ABI contains " +"symbols exposed in the Limited API, but also other ones – for example, " +"functions necessary to support older versions of the Limited API." +msgstr "" + +#: c-api/stable.rst:38 +msgid "" +"(For simplicity, this document talks about *extensions*, but the Limited API " +"and Stable ABI work the same way for all uses of the API – for example, " +"embedding Python.)" +msgstr "" + +#: c-api/stable.rst:44 +msgid "" +"Define this macro before including ``Python.h`` to opt in to only use the " +"Limited API, and to select the Limited API version." +msgstr "" + +#: c-api/stable.rst:47 +msgid "" +"Define ``Py_LIMITED_API`` to the value of :c:data:`PY_VERSION_HEX` " +"corresponding to the lowest Python version your extension supports. The " +"extension will work without recompilation with all Python 3 releases from " +"the specified one onward, and can use Limited API introduced up to that " +"version." +msgstr "" + +#: c-api/stable.rst:53 +msgid "" +"Rather than using the ``PY_VERSION_HEX`` macro directly, hardcode a minimum " +"minor version (e.g. ``0x030A0000`` for Python 3.10) for stability when " +"compiling with future Python versions." +msgstr "" + +#: c-api/stable.rst:57 +msgid "" +"You can also define ``Py_LIMITED_API`` to ``3``. This works the same as " +"``0x03020000`` (Python 3.2, the version that introduced Limited API)." +msgstr "" + +#: c-api/stable.rst:60 +msgid "" +"On Windows, extensions that use the Stable ABI should be linked against " +"``python3.dll`` rather than a version-specific library such as ``python39." +"dll``." +msgstr "" + +#: c-api/stable.rst:64 +msgid "" +"On some platforms, Python will look for and load shared library files named " +"with the ``abi3`` tag (e.g. ``mymodule.abi3.so``). It does not check if such " +"extensions conform to a Stable ABI. The user (or their packaging tools) need " +"to ensure that, for example, extensions built with the 3.10+ Limited API are " +"not installed for lower versions of Python." +msgstr "" + +#: c-api/stable.rst:71 +msgid "" +"All functions in the Stable ABI are present as functions in Python's shared " +"library, not solely as macros. This makes them usable from languages that " +"don't use the C preprocessor." +msgstr "" + +#: c-api/stable.rst:77 +msgid "Limited API Scope and Performance" +msgstr "" + +#: c-api/stable.rst:79 +msgid "" +"The goal for the Limited API is to allow everything that is possible with " +"the full C API, but possibly with a performance penalty." +msgstr "" + +#: c-api/stable.rst:82 +msgid "" +"For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro " +"variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because it " +"can rely on version-specific implementation details of the list object." +msgstr "" + +#: c-api/stable.rst:87 +msgid "" +"Without ``Py_LIMITED_API`` defined, some C API functions are inlined or " +"replaced by macros. Defining ``Py_LIMITED_API`` disables this inlining, " +"allowing stability as Python's data structures are improved, but possibly " +"reducing performance." +msgstr "" + +#: c-api/stable.rst:92 +msgid "" +"By leaving out the ``Py_LIMITED_API`` definition, it is possible to compile " +"a Limited API extension with a version-specific ABI. This can improve " +"performance for that Python version, but will limit compatibility. Compiling " +"with ``Py_LIMITED_API`` will then yield an extension that can be distributed " +"where a version-specific one is not available – for example, for prereleases " +"of an upcoming Python version." +msgstr "" + +#: c-api/stable.rst:101 +msgid "Limited API Caveats" +msgstr "" + +#: c-api/stable.rst:103 +msgid "" +"Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee " +"that code conforms to the Limited API or the Stable ABI. ``Py_LIMITED_API`` " +"only covers definitions, but an API also includes other issues, such as " +"expected semantics." +msgstr "" + +#: c-api/stable.rst:108 +msgid "" +"One issue that ``Py_LIMITED_API`` does not guard against is calling a " +"function with arguments that are invalid in a lower Python version. For " +"example, consider a function that starts accepting ``NULL`` for an argument. " +"In Python 3.9, ``NULL`` now selects a default behavior, but in Python 3.8, " +"the argument will be used directly, causing a ``NULL`` dereference and " +"crash. A similar argument works for fields of structs." +msgstr "" + +#: c-api/stable.rst:115 +msgid "" +"Another issue is that some struct fields are currently not hidden when " +"``Py_LIMITED_API`` is defined, even though they're part of the Limited API." +msgstr "" + +#: c-api/stable.rst:118 +msgid "" +"For these reasons, we recommend testing an extension with *all* minor Python " +"versions it supports, and preferably to build with the *lowest* such version." +msgstr "" + +#: c-api/stable.rst:121 +msgid "" +"We also recommend reviewing documentation of all used API to check if it is " +"explicitly part of the Limited API. Even with ``Py_LIMITED_API`` defined, a " +"few private declarations are exposed for technical reasons (or even " +"unintentionally, as bugs)." +msgstr "" + +#: c-api/stable.rst:126 +msgid "" +"Also note that the Limited API is not necessarily stable: compiling with " +"``Py_LIMITED_API`` with Python 3.8 means that the extension will run with " +"Python 3.12, but it will not necessarily *compile* with Python 3.12. In " +"particular, parts of the Limited API may be deprecated and removed, provided " +"that the Stable ABI stays stable." +msgstr "" + +#: c-api/stable.rst:136 +msgid "Platform Considerations" +msgstr "" + +#: c-api/stable.rst:138 +msgid "" +"ABI stability depends not only on Python, but also on the compiler used, " +"lower-level libraries and compiler options. For the purposes of the Stable " +"ABI, these details define a “platform”. They usually depend on the OS type " +"and processor architecture" +msgstr "" + +#: c-api/stable.rst:143 +msgid "" +"It is the responsibility of each particular distributor of Python to ensure " +"that all Python versions on a particular platform are built in a way that " +"does not break the Stable ABI. This is the case with Windows and macOS " +"releases from ``python.org`` and many third-party distributors." +msgstr "" + +#: c-api/stable.rst:153 +msgid "Contents of Limited API" +msgstr "" + +#: c-api/stable.rst:156 +msgid "Currently, the Limited API includes the following items:" +msgstr "" + +#~ msgid "" +#~ "Unfortunately, the API compatibility does not extend to binary " +#~ "compatibility (the ABI). The reason is primarily the evolution of struct " +#~ "definitions, where addition of a new field, or changing the type of a " +#~ "field, might not break the API, but can break the ABI. As a consequence, " +#~ "extension modules need to be recompiled for every Python release " +#~ "(although an exception is possible on Unix when none of the affected " +#~ "interfaces are used). In addition, on Windows, extension modules link " +#~ "with a specific pythonXY.dll and need to be recompiled to link with a " +#~ "newer one." +#~ msgstr "" +#~ "Malheureusement, la compatibilité de l'API ne s'étend pas à une " +#~ "compatibilité binaire (l'ABI). L'évolution des structures en est la " +#~ "raison principale : l'ajout de nouveaux attributs, ou le changement du " +#~ "type d'un attribut peut ne pas casser l'API mais casser l'ABI. Par " +#~ "conséquent, les modules d'extension doivent être recompilés à chaque " +#~ "nouvelle version de Python (ce n'est exceptionnellement pas nécessaire " +#~ "sur Unix, si aucune des interfaces modifiées n'est utilisée). De plus, " +#~ "sous Windows, les modules d'extension sont liés à un *pythonXY.dll* " +#~ "spécifique, ils est donc nécessaire de les recompiler pour les lier au " +#~ "nouveau DLL." + +#~ msgid "" +#~ "Since Python 3.2, a subset of the API has been declared to guarantee a " +#~ "stable ABI. Extension modules wishing to use this API (called \"limited " +#~ "API\") need to define ``Py_LIMITED_API``. A number of interpreter details " +#~ "then become hidden from the extension module; in return, a module is " +#~ "built that works on any 3.x version (x>=2) without recompilation." +#~ msgstr "" +#~ "Depuis Python 3.2 il est garanti qu'une certaine partie de l'API gardera " +#~ "une ABI stable. Les modules d'extension souhaitant utiliser cette API " +#~ "(Appellée \"API limitée\") doivent définir ``Py_LIMITED_API``. Des " +#~ "spécificités de l'interpréteur sont alors cachées au module, en " +#~ "contrepartie le module devient compatible avec toutes les versions de " +#~ "Python 3.x (x>=2) sans recompilation." + +#~ msgid "" +#~ "In some cases, the stable ABI needs to be extended with new functions. " +#~ "Extension modules wishing to use these new APIs need to set " +#~ "``Py_LIMITED_API`` to the ``PY_VERSION_HEX`` value (see :ref:" +#~ "`apiabiversion`) of the minimum Python version they want to support (e.g. " +#~ "``0x03030000`` for Python 3.3). Such modules will work on all subsequent " +#~ "Python releases, but fail to load (because of missing symbols) on the " +#~ "older releases." +#~ msgstr "" +#~ "Dans certains cas, il est nécessaire d'étendre l'ABI stable avec de " +#~ "nouvelles fonctions. Les modules d'extension souhaitant utiliser ces " +#~ "nouvelles APIs doivent configurer ``Py_LIMITED_API`` à la valeur " +#~ "``Py_VERSION_HEX`` correspondant à la plus ancienne version de Python " +#~ "qu'ils souhaitent supporter (voir :ref:`apiabiversion`, par exemple " +#~ "``0x03030000`` pour Python 3.3). De tels modules fonctionneront dans " +#~ "toutes les versions ultérieures de Python, mais ne pourront pas se " +#~ "charger (dû à des symboles manquants) sur les versions plus anciennes." + +#~ msgid "" +#~ "As of Python 3.2, the set of functions available to the limited API is " +#~ "documented in :pep:`384`. In the C API documentation, API elements that " +#~ "are not part of the limited API are marked as \"Not part of the limited " +#~ "API.\"" +#~ msgstr "" +#~ "Depuis Python 3.2, l'ensemble des fonctions exposées par l'API limitée " +#~ "est documentée dans la :pep:`384`. Dans la documentation de l'API C, les " +#~ "éléments ne faisant pas partie de l'API limitée sont notés \"Ne faisant " +#~ "pas partie de l'API limitée\" (*\"Not part of the limited API\"*)." diff --git a/c-api/structures.po b/c-api/structures.po index a41d6e49f7..74eac27f73 100644 --- a/c-api/structures.po +++ b/c-api/structures.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -81,58 +81,112 @@ msgstr "" #: c-api/structures.rst:67 msgid "" -"This macro is used to access the :attr:`ob_type` member of a Python object. " -"It expands to::" +"Test if the *x* object is the *y* object, the same as ``x is y`` in Python." msgstr "" -#: c-api/structures.rst:75 +#: c-api/structures.rst:74 +msgid "" +"Test if an object is the ``None`` singleton, the same as ``x is None`` in " +"Python." +msgstr "" + +#: c-api/structures.rst:82 +msgid "" +"Test if an object is the ``True`` singleton, the same as ``x is True`` in " +"Python." +msgstr "" + +#: c-api/structures.rst:90 +msgid "" +"Test if an object is the ``False`` singleton, the same as ``x is False`` in " +"Python." +msgstr "" + +#: c-api/structures.rst:98 +msgid "Get the type of the Python object *o*." +msgstr "" + +#: c-api/structures.rst:100 +msgid "Return a :term:`borrowed reference`." +msgstr "" + +#: c-api/structures.rst:102 +msgid "Use the :c:func:`Py_SET_TYPE` function to set an object type." +msgstr "" + +#: c-api/structures.rst:104 +msgid "" +":c:func:`Py_TYPE()` is changed to an inline static function. The parameter " +"type is no longer :c:type:`const PyObject*`." +msgstr "" + +#: c-api/structures.rst:111 msgid "" "Return non-zero if the object *o* type is *type*. Return zero otherwise. " "Equivalent to: ``Py_TYPE(o) == type``." msgstr "" -#: c-api/structures.rst:83 +#: c-api/structures.rst:119 msgid "Set the object *o* type to *type*." msgstr "" -#: c-api/structures.rst:90 +#: c-api/structures.rst:126 +msgid "Get the reference count of the Python object *o*." +msgstr "" + +#: c-api/structures.rst:128 msgid "" -"This macro is used to access the :attr:`ob_refcnt` member of a Python " -"object. It expands to::" +"Use the :c:func:`Py_SET_REFCNT()` function to set an object reference count." +msgstr "" + +#: c-api/structures.rst:130 +msgid "The parameter type is no longer :c:type:`const PyObject*`." msgstr "" -#: c-api/structures.rst:99 +#: c-api/structures.rst:133 +msgid ":c:func:`Py_REFCNT()` is changed to the inline static function." +msgstr "" + +#: c-api/structures.rst:139 msgid "Set the object *o* reference counter to *refcnt*." msgstr "" -#: c-api/structures.rst:106 +#: c-api/structures.rst:146 +msgid "Get the size of the Python object *o*." +msgstr "" + +#: c-api/structures.rst:148 +msgid "Use the :c:func:`Py_SET_SIZE` function to set an object size." +msgstr "" + +#: c-api/structures.rst:150 msgid "" -"This macro is used to access the :attr:`ob_size` member of a Python object. " -"It expands to::" +":c:func:`Py_SIZE()` is changed to an inline static function. The parameter " +"type is no longer :c:type:`const PyVarObject*`." msgstr "" -#: c-api/structures.rst:114 +#: c-api/structures.rst:157 msgid "Set the object *o* size to *size*." msgstr "" -#: c-api/structures.rst:121 +#: c-api/structures.rst:164 msgid "" "This is a macro which expands to initialization values for a new :c:type:" "`PyObject` type. This macro expands to::" msgstr "" -#: c-api/structures.rst:130 +#: c-api/structures.rst:173 msgid "" "This is a macro which expands to initialization values for a new :c:type:" "`PyVarObject` type, including the :attr:`ob_size` field. This macro expands " "to::" msgstr "" -#: c-api/structures.rst:139 +#: c-api/structures.rst:182 msgid "Implementing functions and methods" msgstr "" -#: c-api/structures.rst:143 +#: c-api/structures.rst:186 msgid "" "Type of the functions used to implement most Python callables in C. " "Functions of this type take two :c:type:`PyObject*` parameters and return " @@ -142,99 +196,99 @@ msgid "" "reference." msgstr "" -#: c-api/structures.rst:150 +#: c-api/structures.rst:193 msgid "The function signature is::" msgstr "" -#: c-api/structures.rst:157 +#: c-api/structures.rst:200 msgid "" "Type of the functions used to implement Python callables in C with " "signature :const:`METH_VARARGS | METH_KEYWORDS`. The function signature is::" msgstr "" -#: c-api/structures.rst:168 +#: c-api/structures.rst:211 msgid "" "Type of the functions used to implement Python callables in C with " "signature :const:`METH_FASTCALL`. The function signature is::" msgstr "" -#: c-api/structures.rst:178 +#: c-api/structures.rst:221 msgid "" "Type of the functions used to implement Python callables in C with " "signature :const:`METH_FASTCALL | METH_KEYWORDS`. The function signature is::" msgstr "" -#: c-api/structures.rst:189 +#: c-api/structures.rst:232 msgid "" "Type of the functions used to implement Python callables in C with " "signature :const:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`. The function " "signature is::" msgstr "" -#: c-api/structures.rst:204 +#: c-api/structures.rst:247 msgid "" "Structure used to describe a method of an extension type. This structure " "has four fields:" msgstr "" -#: c-api/structures.rst:364 c-api/structures.rst:445 +#: c-api/structures.rst:412 c-api/structures.rst:508 msgid "Field" msgstr "Champ" -#: c-api/structures.rst:364 c-api/structures.rst:445 +#: c-api/structures.rst:412 c-api/structures.rst:508 msgid "C Type" msgstr "Type C" -#: c-api/structures.rst:364 c-api/structures.rst:445 +#: c-api/structures.rst:412 c-api/structures.rst:508 msgid "Meaning" msgstr "Signification" -#: c-api/structures.rst:210 +#: c-api/structures.rst:253 msgid ":attr:`ml_name`" -msgstr "" +msgstr ":attr:`ml_name`" -#: c-api/structures.rst:218 c-api/structures.rst:379 c-api/structures.rst:447 -#: c-api/structures.rst:455 +#: c-api/structures.rst:261 c-api/structures.rst:427 c-api/structures.rst:510 +#: c-api/structures.rst:518 msgid "const char \\*" msgstr "" -#: c-api/structures.rst:210 +#: c-api/structures.rst:253 msgid "name of the method" msgstr "" -#: c-api/structures.rst:212 +#: c-api/structures.rst:255 msgid ":attr:`ml_meth`" -msgstr "" +msgstr ":attr:`ml_meth`" -#: c-api/structures.rst:212 +#: c-api/structures.rst:255 msgid "PyCFunction" msgstr "PyCFunction" -#: c-api/structures.rst:212 +#: c-api/structures.rst:255 msgid "pointer to the C implementation" msgstr "" -#: c-api/structures.rst:215 +#: c-api/structures.rst:258 msgid ":attr:`ml_flags`" -msgstr "" +msgstr ":attr:`ml_flags`" -#: c-api/structures.rst:368 c-api/structures.rst:391 +#: c-api/structures.rst:416 c-api/structures.rst:439 msgid "int" msgstr "*int*" -#: c-api/structures.rst:215 +#: c-api/structures.rst:258 msgid "flag bits indicating how the call should be constructed" msgstr "" -#: c-api/structures.rst:218 +#: c-api/structures.rst:261 msgid ":attr:`ml_doc`" -msgstr "" +msgstr ":attr:`ml_doc`" -#: c-api/structures.rst:379 +#: c-api/structures.rst:427 msgid "points to the contents of the docstring" msgstr "" -#: c-api/structures.rst:222 +#: c-api/structures.rst:265 msgid "" "The :attr:`ml_meth` is a C function pointer. The functions may be of " "different types, but they always return :c:type:`PyObject*`. If the " @@ -244,18 +298,18 @@ msgid "" "implementation uses the specific C type of the *self* object." msgstr "" -#: c-api/structures.rst:229 +#: c-api/structures.rst:272 msgid "" "The :attr:`ml_flags` field is a bitfield which can include the following " "flags. The individual flags indicate either a calling convention or a " "binding convention." msgstr "" -#: c-api/structures.rst:233 +#: c-api/structures.rst:276 msgid "There are these calling conventions:" msgstr "" -#: c-api/structures.rst:237 +#: c-api/structures.rst:280 msgid "" "This is the typical calling convention, where the methods have the type :c:" "type:`PyCFunction`. The function expects two :c:type:`PyObject*` values. The " @@ -265,7 +319,7 @@ msgid "" "func:`PyArg_ParseTuple` or :c:func:`PyArg_UnpackTuple`." msgstr "" -#: c-api/structures.rst:247 +#: c-api/structures.rst:290 msgid "" "Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`. " "The function expects three parameters: *self*, *args*, *kwargs* where " @@ -274,7 +328,7 @@ msgid "" "using :c:func:`PyArg_ParseTupleAndKeywords`." msgstr "" -#: c-api/structures.rst:256 +#: c-api/structures.rst:299 msgid "" "Fast calling convention supporting only positional arguments. The methods " "have the type :c:type:`_PyCFunctionFast`. The first parameter is *self*, the " @@ -283,11 +337,11 @@ msgid "" "the array)." msgstr "" -#: c-api/structures.rst:279 -msgid "This is not part of the :ref:`limited API `." +#: c-api/structures.rst:309 +msgid "``METH_FASTCALL`` is now part of the stable ABI." msgstr "" -#: c-api/structures.rst:269 +#: c-api/structures.rst:314 msgid "" "Extension of :const:`METH_FASTCALL` supporting also keyword arguments, with " "methods of type :c:type:`_PyCFunctionFastWithKeywords`. Keyword arguments " @@ -299,21 +353,25 @@ msgid "" "arguments." msgstr "" -#: c-api/structures.rst:286 +#: c-api/structures.rst:324 +msgid "This is not part of the :ref:`limited API `." +msgstr "" + +#: c-api/structures.rst:331 msgid "" "Extension of :const:`METH_FASTCALL | METH_KEYWORDS` supporting the *defining " "class*, that is, the class that contains the method in question. The " "defining class might be a superclass of ``Py_TYPE(self)``." msgstr "" -#: c-api/structures.rst:290 +#: c-api/structures.rst:335 msgid "" "The method needs to be of type :c:type:`PyCMethod`, the same as for " "``METH_FASTCALL | METH_KEYWORDS`` with ``defining_class`` argument added " "after ``self``." msgstr "" -#: c-api/structures.rst:299 +#: c-api/structures.rst:344 msgid "" "Methods without parameters don't need to check whether arguments are given " "if they are listed with the :const:`METH_NOARGS` flag. They need to be of " @@ -322,7 +380,13 @@ msgid "" "the second parameter will be ``NULL``." msgstr "" -#: c-api/structures.rst:308 +#: c-api/structures.rst:350 +msgid "" +"The function must have 2 parameters. Since the second parameter is unused, :" +"c:macro:`Py_UNUSED` can be used to prevent a compiler warning." +msgstr "" + +#: c-api/structures.rst:356 msgid "" "Methods with a single object argument can be listed with the :const:`METH_O` " "flag, instead of invoking :c:func:`PyArg_ParseTuple` with a ``\"O\"`` " @@ -331,7 +395,7 @@ msgid "" "argument." msgstr "" -#: c-api/structures.rst:314 +#: c-api/structures.rst:362 msgid "" "These two constants are not used to indicate the calling convention but the " "binding when use with methods of classes. These may not be used for " @@ -339,27 +403,27 @@ msgid "" "any given method." msgstr "" -#: c-api/structures.rst:324 +#: c-api/structures.rst:372 msgid "" "The method will be passed the type object as the first parameter rather than " "an instance of the type. This is used to create *class methods*, similar to " "what is created when using the :func:`classmethod` built-in function." msgstr "" -#: c-api/structures.rst:334 +#: c-api/structures.rst:382 msgid "" "The method will be passed ``NULL`` as the first parameter rather than an " "instance of the type. This is used to create *static methods*, similar to " "what is created when using the :func:`staticmethod` built-in function." msgstr "" -#: c-api/structures.rst:338 +#: c-api/structures.rst:386 msgid "" "One other constant controls whether a method is loaded in place of another " "definition with the same method name." msgstr "" -#: c-api/structures.rst:344 +#: c-api/structures.rst:392 msgid "" "The method will be loaded in place of existing definitions. Without " "*METH_COEXIST*, the default is to skip repeated definitions. Since slot " @@ -372,193 +436,193 @@ msgid "" "calls." msgstr "" -#: c-api/structures.rst:356 +#: c-api/structures.rst:404 msgid "Accessing attributes of extension types" msgstr "" -#: c-api/structures.rst:360 +#: c-api/structures.rst:408 msgid "" "Structure which describes an attribute of a type which corresponds to a C " "struct member. Its fields are:" msgstr "" -#: c-api/structures.rst:366 +#: c-api/structures.rst:414 msgid ":attr:`name`" -msgstr "" +msgstr ":attr:`name`" -#: c-api/structures.rst:366 +#: c-api/structures.rst:414 msgid "name of the member" msgstr "" -#: c-api/structures.rst:368 +#: c-api/structures.rst:416 msgid ":attr:`!type`" -msgstr "" +msgstr ":attr:`!type`" -#: c-api/structures.rst:368 +#: c-api/structures.rst:416 msgid "the type of the member in the C struct" msgstr "" -#: c-api/structures.rst:371 +#: c-api/structures.rst:419 msgid ":attr:`offset`" -msgstr "" +msgstr ":attr:`offset`" -#: c-api/structures.rst:407 +#: c-api/structures.rst:455 msgid "Py_ssize_t" msgstr "" -#: c-api/structures.rst:371 +#: c-api/structures.rst:419 msgid "" "the offset in bytes that the member is located on the type's object struct" msgstr "" -#: c-api/structures.rst:375 +#: c-api/structures.rst:423 msgid ":attr:`flags`" -msgstr "" +msgstr ":attr:`flags`" -#: c-api/structures.rst:375 +#: c-api/structures.rst:423 msgid "flag bits indicating if the field should be read-only or writable" msgstr "" -#: c-api/structures.rst:379 +#: c-api/structures.rst:427 msgid ":attr:`doc`" -msgstr "" +msgstr ":attr:`doc`" -#: c-api/structures.rst:383 +#: c-api/structures.rst:431 msgid "" ":attr:`!type` can be one of many ``T_`` macros corresponding to various C " "types. When the member is accessed in Python, it will be converted to the " "equivalent Python type." msgstr "" -#: c-api/structures.rst:388 +#: c-api/structures.rst:436 msgid "Macro name" msgstr "" -#: c-api/structures.rst:388 +#: c-api/structures.rst:436 msgid "C type" msgstr "Type C" -#: c-api/structures.rst:390 +#: c-api/structures.rst:438 msgid "T_SHORT" msgstr "" -#: c-api/structures.rst:390 +#: c-api/structures.rst:438 msgid "short" msgstr "" -#: c-api/structures.rst:391 +#: c-api/structures.rst:439 msgid "T_INT" msgstr "" -#: c-api/structures.rst:392 +#: c-api/structures.rst:440 msgid "T_LONG" msgstr "" -#: c-api/structures.rst:392 +#: c-api/structures.rst:440 msgid "long" msgstr "" -#: c-api/structures.rst:393 +#: c-api/structures.rst:441 msgid "T_FLOAT" msgstr "" -#: c-api/structures.rst:393 +#: c-api/structures.rst:441 msgid "float" msgstr "*float*" -#: c-api/structures.rst:394 +#: c-api/structures.rst:442 msgid "T_DOUBLE" msgstr "" -#: c-api/structures.rst:394 +#: c-api/structures.rst:442 msgid "double" msgstr "double" -#: c-api/structures.rst:395 +#: c-api/structures.rst:443 msgid "T_STRING" msgstr "" -#: c-api/structures.rst:396 +#: c-api/structures.rst:444 msgid "T_OBJECT" msgstr "" -#: c-api/structures.rst:397 +#: c-api/structures.rst:445 msgid "PyObject \\*" msgstr "PyObject \\*" -#: c-api/structures.rst:397 +#: c-api/structures.rst:445 msgid "T_OBJECT_EX" msgstr "" -#: c-api/structures.rst:398 +#: c-api/structures.rst:446 msgid "T_CHAR" msgstr "" -#: c-api/structures.rst:399 c-api/structures.rst:404 +#: c-api/structures.rst:447 c-api/structures.rst:452 msgid "char" msgstr "char" -#: c-api/structures.rst:399 +#: c-api/structures.rst:447 msgid "T_BYTE" msgstr "" -#: c-api/structures.rst:400 +#: c-api/structures.rst:448 msgid "T_UBYTE" msgstr "" -#: c-api/structures.rst:400 +#: c-api/structures.rst:448 msgid "unsigned char" msgstr "``unsigned char``" -#: c-api/structures.rst:401 +#: c-api/structures.rst:449 msgid "T_UINT" msgstr "" -#: c-api/structures.rst:401 +#: c-api/structures.rst:449 msgid "unsigned int" msgstr "``unsigned int``" -#: c-api/structures.rst:402 +#: c-api/structures.rst:450 msgid "T_USHORT" msgstr "" -#: c-api/structures.rst:402 +#: c-api/structures.rst:450 msgid "unsigned short" msgstr "``unsigned short``" -#: c-api/structures.rst:403 +#: c-api/structures.rst:451 msgid "T_ULONG" msgstr "" -#: c-api/structures.rst:403 +#: c-api/structures.rst:451 msgid "unsigned long" msgstr "``unsigned long``" -#: c-api/structures.rst:404 +#: c-api/structures.rst:452 msgid "T_BOOL" msgstr "" -#: c-api/structures.rst:405 +#: c-api/structures.rst:453 msgid "T_LONGLONG" msgstr "" -#: c-api/structures.rst:405 +#: c-api/structures.rst:453 msgid "long long" msgstr "" -#: c-api/structures.rst:406 +#: c-api/structures.rst:454 msgid "T_ULONGLONG" msgstr "" -#: c-api/structures.rst:406 +#: c-api/structures.rst:454 msgid "unsigned long long" msgstr "``unsigned long long``" -#: c-api/structures.rst:407 +#: c-api/structures.rst:455 msgid "T_PYSSIZET" msgstr "" -#: c-api/structures.rst:410 +#: c-api/structures.rst:458 msgid "" ":c:macro:`T_OBJECT` and :c:macro:`T_OBJECT_EX` differ in that :c:macro:" "`T_OBJECT` returns ``None`` if the member is ``NULL`` and :c:macro:" @@ -568,7 +632,7 @@ msgid "" "than :c:macro:`T_OBJECT`." msgstr "" -#: c-api/structures.rst:417 +#: c-api/structures.rst:465 msgid "" ":attr:`flags` can be ``0`` for write and read access or :c:macro:`READONLY` " "for read-only access. Using :c:macro:`T_STRING` for :attr:`type` implies :c:" @@ -577,7 +641,7 @@ msgid "" "are set to ``NULL``)." msgstr "" -#: c-api/structures.rst:425 +#: c-api/structures.rst:473 msgid "" "Heap allocated types (created using :c:func:`PyType_FromSpec` or similar), " "``PyMemberDef`` may contain definitions for the special members " @@ -588,86 +652,99 @@ msgid "" "``T_PYSSIZET`` and ``READONLY``, for example::" msgstr "" -#: c-api/structures.rst:441 +#: c-api/structures.rst:490 +msgid "" +"Get an attribute belonging to the object at address *obj_addr*. The " +"attribute is described by ``PyMemberDef`` *m*. Returns ``NULL`` on error." +msgstr "" + +#: c-api/structures.rst:497 +msgid "" +"Set an attribute belonging to the object at address *obj_addr* to object " +"*o*. The attribute to set is described by ``PyMemberDef`` *m*. Returns " +"``0`` if successful and a negative value on failure." +msgstr "" + +#: c-api/structures.rst:504 msgid "" "Structure to define property-like access for a type. See also description of " "the :c:member:`PyTypeObject.tp_getset` slot." msgstr "" -#: c-api/structures.rst:447 +#: c-api/structures.rst:510 msgid "name" msgstr "" -#: c-api/structures.rst:447 +#: c-api/structures.rst:510 msgid "attribute name" msgstr "" -#: c-api/structures.rst:449 +#: c-api/structures.rst:512 msgid "get" msgstr "" -#: c-api/structures.rst:449 +#: c-api/structures.rst:512 msgid "getter" msgstr "" -#: c-api/structures.rst:449 -msgid "C Function to get the attribute" +#: c-api/structures.rst:512 +msgid "C function to get the attribute" msgstr "" -#: c-api/structures.rst:451 +#: c-api/structures.rst:514 msgid "set" msgstr "" -#: c-api/structures.rst:451 +#: c-api/structures.rst:514 msgid "setter" msgstr "" -#: c-api/structures.rst:451 +#: c-api/structures.rst:514 msgid "" "optional C function to set or delete the attribute, if omitted the attribute " "is readonly" msgstr "" -#: c-api/structures.rst:455 +#: c-api/structures.rst:518 msgid "doc" msgstr "" -#: c-api/structures.rst:455 +#: c-api/structures.rst:518 msgid "optional docstring" msgstr "" -#: c-api/structures.rst:457 +#: c-api/structures.rst:520 msgid "closure" msgstr "" -#: c-api/structures.rst:457 +#: c-api/structures.rst:520 msgid "void \\*" msgstr "" -#: c-api/structures.rst:457 +#: c-api/structures.rst:520 msgid "" "optional function pointer, providing additional data for getter and setter" msgstr "" -#: c-api/structures.rst:462 +#: c-api/structures.rst:525 msgid "" "The ``get`` function takes one :c:type:`PyObject*` parameter (the instance) " "and a function pointer (the associated ``closure``)::" msgstr "" -#: c-api/structures.rst:467 +#: c-api/structures.rst:530 msgid "" "It should return a new reference on success or ``NULL`` with a set exception " "on failure." msgstr "" -#: c-api/structures.rst:470 +#: c-api/structures.rst:533 msgid "" "``set`` functions take two :c:type:`PyObject*` parameters (the instance and " "the value to be set) and a function pointer (the associated ``closure``)::" msgstr "" -#: c-api/structures.rst:475 +#: c-api/structures.rst:538 msgid "" "In case the attribute should be deleted the second parameter is ``NULL``. " "Should return ``0`` on success or ``-1`` with a set exception on failure." diff --git a/c-api/sys.po b/c-api/sys.po index fb2d949cd9..f8135e95d3 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -108,9 +108,9 @@ msgstr "" msgid "" "Return true when the interpreter runs out of stack space. This is a " "reliable check, but is only available when :const:`USE_STACKCHECK` is " -"defined (currently on Windows using the Microsoft Visual C++ compiler). :" -"const:`USE_STACKCHECK` will be defined automatically; you should never " -"change the definition in your own code." +"defined (currently on certain versions of Windows using the Microsoft Visual " +"C++ compiler). :const:`USE_STACKCHECK` will be defined automatically; you " +"should never change the definition in your own code." msgstr "" #: c-api/sys.rst:106 @@ -129,125 +129,124 @@ msgid "" "`PyOS_sighandler_t` is a typedef alias for :c:type:`void (\\*)(int)`." msgstr "" -#: c-api/sys.rst:121 +#: c-api/sys.rst:122 msgid "" -"Decode a byte string from the locale encoding with the :ref:`surrogateescape " -"error handler `: undecodable bytes are decoded as " -"characters in range U+DC80..U+DCFF. If a byte sequence can be decoded as a " -"surrogate character, escape the bytes using the surrogateescape error " -"handler instead of decoding them." +"This function should not be called directly: use the :c:type:`PyConfig` API " +"with the :c:func:`PyConfig_SetBytesString` function which ensures that :ref:" +"`Python is preinitialized `." msgstr "" -#: c-api/sys.rst:173 -msgid "Encoding, highest priority to lowest priority:" -msgstr "" - -#: c-api/sys.rst:175 -msgid "``UTF-8`` on macOS, Android, and VxWorks;" -msgstr "" - -#: c-api/sys.rst:176 +#: c-api/sys.rst:193 msgid "" -"``UTF-8`` on Windows if :c:data:`Py_LegacyWindowsFSEncodingFlag` is zero;" +"This function must not be called before :ref:`Python is preinitialized ` and so that the LC_CTYPE locale is properly configured: see the :c:" +"func:`Py_PreInitialize` function." msgstr "" -#: c-api/sys.rst:177 -msgid "``UTF-8`` if the Python UTF-8 mode is enabled;" -msgstr "" - -#: c-api/sys.rst:178 +#: c-api/sys.rst:130 msgid "" -"``ASCII`` if the ``LC_CTYPE`` locale is ``\"C\"``, ``nl_langinfo(CODESET)`` " -"returns the ``ASCII`` encoding (or an alias), and :c:func:`mbstowcs` and :c:" -"func:`wcstombs` functions uses the ``ISO-8859-1`` encoding." -msgstr "" - -#: c-api/sys.rst:182 -msgid "the current locale encoding." +"Decode a byte string from the :term:`filesystem encoding and error handler`. " +"If the error handler is :ref:`surrogateescape error handler " +"`, undecodable bytes are decoded as characters in range " +"U+DC80..U+DCFF; and if a byte sequence can be decoded as a surrogate " +"character, the bytes are escaped using the surrogateescape error handler " +"instead of decoding them." msgstr "" -#: c-api/sys.rst:138 +#: c-api/sys.rst:137 msgid "" "Return a pointer to a newly allocated wide character string, use :c:func:" "`PyMem_RawFree` to free the memory. If size is not ``NULL``, write the " "number of wide characters excluding the null character into ``*size``" msgstr "" -#: c-api/sys.rst:142 +#: c-api/sys.rst:141 msgid "" "Return ``NULL`` on decoding error or memory allocation error. If *size* is " "not ``NULL``, ``*size`` is set to ``(size_t)-1`` on memory error or set to " "``(size_t)-2`` on decoding error." msgstr "" -#: c-api/sys.rst:146 +#: c-api/sys.rst:185 msgid "" -"Decoding errors should never happen, unless there is a bug in the C library." +"The :term:`filesystem encoding and error handler` are selected by :c:func:" +"`PyConfig_Read`: see :c:member:`~PyConfig.filesystem_encoding` and :c:member:" +"`~PyConfig.filesystem_errors` members of :c:type:`PyConfig`." msgstr "" #: c-api/sys.rst:149 msgid "" +"Decoding errors should never happen, unless there is a bug in the C library." +msgstr "" + +#: c-api/sys.rst:152 +msgid "" "Use the :c:func:`Py_EncodeLocale` function to encode the character string " "back to a byte string." msgstr "" -#: c-api/sys.rst:154 +#: c-api/sys.rst:157 msgid "" "The :c:func:`PyUnicode_DecodeFSDefaultAndSize` and :c:func:" "`PyUnicode_DecodeLocaleAndSize` functions." msgstr "" -#: c-api/sys.rst:203 -msgid "The function now uses the UTF-8 encoding in the UTF-8 mode." +#: c-api/sys.rst:204 +msgid "" +"The function now uses the UTF-8 encoding in the :ref:`Python UTF-8 Mode " +"`." msgstr "" -#: c-api/sys.rst:206 +#: c-api/sys.rst:166 msgid "" "The function now uses the UTF-8 encoding on Windows if :c:data:" "`Py_LegacyWindowsFSEncodingFlag` is zero;" msgstr "" -#: c-api/sys.rst:169 +#: c-api/sys.rst:173 msgid "" -"Encode a wide character string to the locale encoding with the :ref:" -"`surrogateescape error handler `: surrogate characters in " -"the range U+DC80..U+DCFF are converted to bytes 0x80..0xFF." -msgstr "" - -#: c-api/sys.rst:184 -msgid "The function uses the UTF-8 encoding in the Python UTF-8 mode." +"Encode a wide character string to the :term:`filesystem encoding and error " +"handler`. If the error handler is :ref:`surrogateescape error handler " +"`, surrogate characters in the range U+DC80..U+DCFF are " +"converted to bytes 0x80..0xFF." msgstr "" -#: c-api/sys.rst:186 +#: c-api/sys.rst:178 msgid "" "Return a pointer to a newly allocated byte string, use :c:func:`PyMem_Free` " "to free the memory. Return ``NULL`` on encoding error or memory allocation " -"error" +"error." msgstr "" -#: c-api/sys.rst:190 +#: c-api/sys.rst:182 msgid "" "If error_pos is not ``NULL``, ``*error_pos`` is set to ``(size_t)-1`` on " "success, or set to the index of the invalid character on encoding error." msgstr "" -#: c-api/sys.rst:193 +#: c-api/sys.rst:189 msgid "" "Use the :c:func:`Py_DecodeLocale` function to decode the bytes string back " "to a wide character string." msgstr "" -#: c-api/sys.rst:198 +#: c-api/sys.rst:199 msgid "" "The :c:func:`PyUnicode_EncodeFSDefault` and :c:func:`PyUnicode_EncodeLocale` " "functions." msgstr "" -#: c-api/sys.rst:214 -msgid "System Functions" +#: c-api/sys.rst:208 +msgid "" +"The function now uses the UTF-8 encoding on Windows if :c:data:" +"`Py_LegacyWindowsFSEncodingFlag` is zero." msgstr "" #: c-api/sys.rst:216 +msgid "System Functions" +msgstr "" + +#: c-api/sys.rst:218 msgid "" "These are utility functions that make functionality from the :mod:`sys` " "module accessible to C code. They all work with the current interpreter " @@ -255,36 +254,43 @@ msgid "" "state structure." msgstr "" -#: c-api/sys.rst:222 +#: c-api/sys.rst:224 msgid "" "Return the object *name* from the :mod:`sys` module or ``NULL`` if it does " "not exist, without setting an exception." msgstr "" -#: c-api/sys.rst:227 +#: c-api/sys.rst:229 msgid "" "Set *name* in the :mod:`sys` module to *v* unless *v* is ``NULL``, in which " "case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` " "on error." msgstr "" -#: c-api/sys.rst:233 +#: c-api/sys.rst:235 msgid "" "Reset :data:`sys.warnoptions` to an empty list. This function may be called " "prior to :c:func:`Py_Initialize`." msgstr "" -#: c-api/sys.rst:238 +#: c-api/sys.rst:251 +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"warnoptions` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +#: c-api/sys.rst:244 msgid "" "Append *s* to :data:`sys.warnoptions`. This function must be called prior " "to :c:func:`Py_Initialize` in order to affect the warnings filter list." msgstr "" -#: c-api/sys.rst:243 +#: c-api/sys.rst:255 msgid "Append *unicode* to :data:`sys.warnoptions`." msgstr "" -#: c-api/sys.rst:245 +#: c-api/sys.rst:257 msgid "" "Note: this function is not currently usable from outside the CPython " "implementation, as it must be called prior to the implicit import of :mod:" @@ -293,20 +299,28 @@ msgid "" "Unicode objects." msgstr "" -#: c-api/sys.rst:253 +#: c-api/sys.rst:267 +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"module_search_paths` and :c:member:`PyConfig.module_search_paths_set` should " +"be used instead, see :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/sys.rst:272 msgid "" "Set :data:`sys.path` to a list object of paths found in *path* which should " "be a list of paths separated with the platform's search path delimiter (``:" "`` on Unix, ``;`` on Windows)." msgstr "" -#: c-api/sys.rst:259 +#: c-api/sys.rst:280 msgid "" "Write the output string described by *format* to :data:`sys.stdout`. No " "exceptions are raised, even if truncation occurs (see below)." msgstr "" -#: c-api/sys.rst:262 +#: c-api/sys.rst:283 msgid "" "*format* should limit the total size of the formatted output string to 1000 " "bytes or less -- after 1000 bytes, the output string is truncated. In " @@ -317,51 +331,58 @@ msgid "" "of digits for very large numbers." msgstr "" -#: c-api/sys.rst:270 +#: c-api/sys.rst:291 msgid "" "If a problem occurs, or :data:`sys.stdout` is unset, the formatted message " "is written to the real (C level) *stdout*." msgstr "" -#: c-api/sys.rst:275 +#: c-api/sys.rst:296 msgid "" "As :c:func:`PySys_WriteStdout`, but write to :data:`sys.stderr` or *stderr* " "instead." msgstr "" -#: c-api/sys.rst:280 +#: c-api/sys.rst:301 msgid "" "Function similar to PySys_WriteStdout() but format the message using :c:func:" "`PyUnicode_FromFormatV` and don't truncate the message to an arbitrary " "length." msgstr "" -#: c-api/sys.rst:288 +#: c-api/sys.rst:309 msgid "" "As :c:func:`PySys_FormatStdout`, but write to :data:`sys.stderr` or *stderr* " "instead." msgstr "" -#: c-api/sys.rst:295 +#: c-api/sys.rst:316 +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"xoptions` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +#: c-api/sys.rst:320 msgid "" "Parse *s* as a set of :option:`-X` options and add them to the current " "options mapping as returned by :c:func:`PySys_GetXOptions`. This function " "may be called prior to :c:func:`Py_Initialize`." msgstr "" -#: c-api/sys.rst:303 +#: c-api/sys.rst:330 msgid "" "Return the current dictionary of :option:`-X` options, similarly to :data:" "`sys._xoptions`. On error, ``NULL`` is returned and an exception is set." msgstr "" -#: c-api/sys.rst:312 +#: c-api/sys.rst:339 msgid "" "Raise an auditing event with any active hooks. Return zero for success and " "non-zero with an exception set on failure." msgstr "" -#: c-api/sys.rst:315 +#: c-api/sys.rst:342 msgid "" "If any hooks have been added, *format* and other arguments will be used to " "construct a tuple to pass. Apart from ``N``, the same format characters as " @@ -372,38 +393,38 @@ msgid "" "leaks.)" msgstr "" -#: c-api/sys.rst:323 +#: c-api/sys.rst:350 msgid "" -"Note that ``#`` format characters should always be treated as " -"``Py_ssize_t``, regardless of whether ``PY_SSIZE_T_CLEAN`` was defined." +"Note that ``#`` format characters should always be treated as :c:type:" +"`Py_ssize_t`, regardless of whether ``PY_SSIZE_T_CLEAN`` was defined." msgstr "" -#: c-api/sys.rst:326 +#: c-api/sys.rst:353 msgid ":func:`sys.audit` performs the same function from Python code." msgstr "" -#: c-api/sys.rst:332 +#: c-api/sys.rst:359 msgid "" -"Require ``Py_ssize_t`` for ``#`` format characters. Previously, an " +"Require :c:type:`Py_ssize_t` for ``#`` format characters. Previously, an " "unavoidable deprecation warning was raised." msgstr "" -#: c-api/sys.rst:338 +#: c-api/sys.rst:365 msgid "" "Append the callable *hook* to the list of active auditing hooks. Return zero " -"for success and non-zero on failure. If the runtime has been initialized, " +"on success and non-zero on failure. If the runtime has been initialized, " "also set an error on failure. Hooks added through this API are called for " "all interpreters created by the runtime." msgstr "" -#: c-api/sys.rst:344 +#: c-api/sys.rst:371 msgid "" "The *userData* pointer is passed into the hook function. Since hook " "functions may be called from different runtimes, this pointer should not " "refer directly to Python state." msgstr "" -#: c-api/sys.rst:348 +#: c-api/sys.rst:375 msgid "" "This function is safe to call before :c:func:`Py_Initialize`. When called " "after runtime initialization, existing audit hooks are notified and may " @@ -411,7 +432,7 @@ msgid "" "`Exception` (other errors will not be silenced)." msgstr "" -#: c-api/sys.rst:353 +#: c-api/sys.rst:380 msgid "" "The hook function is of type :c:type:`int (*)(const char *event, PyObject " "*args, void *userData)`, where *args* is guaranteed to be a :c:type:" @@ -419,14 +440,14 @@ msgid "" "Python interpreter that raised the event." msgstr "" -#: c-api/sys.rst:358 +#: c-api/sys.rst:385 msgid "" "See :pep:`578` for a detailed description of auditing. Functions in the " "runtime and standard library that raise events are listed in the :ref:`audit " "events table `. Details are in each function's documentation." msgstr "" -#: c-api/sys.rst:363 +#: c-api/sys.rst:390 msgid "" "Raises an :ref:`auditing event ` ``sys.addaudithook`` with no " "arguments." @@ -434,7 +455,7 @@ msgstr "" "Déclenche un :ref:`événement d'audit ` ``sys.addaudithook`` sans " "arguments." -#: c-api/sys.rst:365 +#: c-api/sys.rst:392 msgid "" "If the interpreter is initialized, this function raises a auditing event " "``sys.addaudithook`` with no arguments. If any existing hooks raise an " @@ -443,11 +464,11 @@ msgid "" "hook has been added unless they control all existing hooks." msgstr "" -#: c-api/sys.rst:377 +#: c-api/sys.rst:404 msgid "Process Control" msgstr "" -#: c-api/sys.rst:384 +#: c-api/sys.rst:411 msgid "" "Print a fatal error message and kill the process. No cleanup is performed. " "This function should only be invoked when a condition is detected that would " @@ -457,29 +478,29 @@ msgid "" "file:`core` file." msgstr "" -#: c-api/sys.rst:391 +#: c-api/sys.rst:418 msgid "" "The ``Py_FatalError()`` function is replaced with a macro which logs " "automatically the name of the current function, unless the " "``Py_LIMITED_API`` macro is defined." msgstr "" -#: c-api/sys.rst:395 +#: c-api/sys.rst:422 msgid "Log the function name automatically." msgstr "" -#: c-api/sys.rst:405 +#: c-api/sys.rst:432 msgid "" "Exit the current process. This calls :c:func:`Py_FinalizeEx` and then calls " "the standard C library function ``exit(status)``. If :c:func:" "`Py_FinalizeEx` indicates an error, the exit status is set to 120." msgstr "" -#: c-api/sys.rst:409 +#: c-api/sys.rst:436 msgid "Errors from finalization no longer ignored." msgstr "" -#: c-api/sys.rst:419 +#: c-api/sys.rst:446 msgid "" "Register a cleanup function to be called by :c:func:`Py_FinalizeEx`. The " "cleanup function will be called with no arguments and should return no " diff --git a/c-api/tuple.po b/c-api/tuple.po index 270d4a0770..be21e6af29 100644 --- a/c-api/tuple.po +++ b/c-api/tuple.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -70,8 +70,8 @@ msgstr "" #: c-api/tuple.rst:59 msgid "" "Return the object at position *pos* in the tuple pointed to by *p*. If " -"*pos* is out of bounds, return ``NULL`` and set an :exc:`IndexError` " -"exception." +"*pos* is negative or out of bounds, return ``NULL`` and set an :exc:" +"`IndexError` exception." msgstr "" #: c-api/tuple.rst:65 @@ -106,7 +106,7 @@ msgstr "" #: c-api/tuple.rst:94 msgid "" -"This macro \"steals\" a reference to *o*, and, unlike :c:func:" +"This function \"steals\" a reference to *o*, and, unlike :c:func:" "`PyTuple_SetItem`, does *not* discard a reference to any item that is being " "replaced; any reference in the tuple at position *pos* will be leaked." msgstr "" @@ -264,10 +264,12 @@ msgid "" "new instances." msgstr "" -#: c-api/tuple.rst:222 +#: c-api/tuple.rst:223 msgid "This function \"steals\" a reference to *o*." msgstr "" #: c-api/tuple.rst:218 -msgid "Macro equivalent of :c:func:`PyStructSequence_SetItem`." +msgid "" +"Similar to :c:func:`PyStructSequence_SetItem`, but implemented as a static " +"inlined function." msgstr "" diff --git a/c-api/type.po b/c-api/type.po index 171ab67bf9..6fb1145dbf 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-29 16:33+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2018-02-15 00:33+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -122,147 +122,184 @@ msgstr "" #: c-api/type.rst:111 msgid "" +"Return the type's name. Equivalent to getting the type's ``__name__`` " +"attribute." +msgstr "" + +#: c-api/type.rst:117 +msgid "" +"Return the type's qualified name. Equivalent to getting the type's " +"``__qualname__`` attribute." +msgstr "" + +#: c-api/type.rst:124 +msgid "" "Return the function pointer stored in the given slot. If the result is " "``NULL``, this indicates that either the slot is ``NULL``, or that the " "function was called with invalid parameters. Callers will typically cast the " "result pointer into the appropriate function type." msgstr "" -#: c-api/type.rst:117 +#: c-api/type.rst:130 msgid "" "See :c:member:`PyType_Slot.slot` for possible values of the *slot* argument." msgstr "" -#: c-api/type.rst:119 -msgid "An exception is raised if *type* is not a heap type." +#: c-api/type.rst:134 +msgid "" +":c:func:`PyType_GetSlot` can now accept all types. Previously, it was " +"limited to :ref:`heap types `." msgstr "" -#: c-api/type.rst:125 +#: c-api/type.rst:140 msgid "" "Return the module object associated with the given type when the type was " "created using :c:func:`PyType_FromModuleAndSpec`." msgstr "" -#: c-api/type.rst:146 +#: c-api/type.rst:163 msgid "" "If no module is associated with the given type, sets :py:class:`TypeError` " "and returns ``NULL``." msgstr "" -#: c-api/type.rst:131 +#: c-api/type.rst:146 msgid "" "This function is usually used to get the module in which a method is " "defined. Note that in such a method, ``PyType_GetModule(Py_TYPE(self))`` may " "not return the intended result. ``Py_TYPE(self)`` may be a *subclass* of the " "intended class, and subclasses are not necessarily defined in the same " "module as their superclass. See :c:type:`PyCMethod` to get the class that " -"defines the method." +"defines the method. See :c:func:`PyType_GetModuleByDef` for cases when " +"``PyCMethod`` cannot be used." msgstr "" -#: c-api/type.rst:142 +#: c-api/type.rst:159 msgid "" "Return the state of the module object associated with the given type. This " "is a shortcut for calling :c:func:`PyModule_GetState()` on the result of :c:" "func:`PyType_GetModule`." msgstr "" -#: c-api/type.rst:149 +#: c-api/type.rst:166 msgid "" "If the *type* has an associated module but its state is ``NULL``, returns " "``NULL`` without setting an exception." msgstr "" -#: c-api/type.rst:156 +#: c-api/type.rst:173 +msgid "" +"Find the first superclass whose module was created from the given :c:type:" +"`PyModuleDef` *def*, and return that module." +msgstr "" + +#: c-api/type.rst:176 +msgid "" +"If no module is found, raises a :py:class:`TypeError` and returns ``NULL``." +msgstr "" + +#: c-api/type.rst:178 +msgid "" +"This function is intended to be used together with :c:func:" +"`PyModule_GetState()` to get module state from slot methods (such as :c:" +"member:`~PyTypeObject.tp_init` or :c:member:`~PyNumberMethods.nb_add`) and " +"other places where a method's defining class cannot be passed using the :c:" +"type:`PyCMethod` calling convention." +msgstr "" + +#: c-api/type.rst:188 msgid "Creating Heap-Allocated Types" msgstr "" -#: c-api/type.rst:158 +#: c-api/type.rst:190 msgid "" "The following functions and structs are used to create :ref:`heap types " "`." msgstr "" -#: c-api/type.rst:163 +#: c-api/type.rst:195 msgid "" -"Creates and returns a heap type object from the *spec* (:const:" +"Creates and returns a :ref:`heap type ` from the *spec* (:const:" "`Py_TPFLAGS_HEAPTYPE`)." msgstr "" -#: c-api/type.rst:166 +#: c-api/type.rst:198 msgid "" -"If *bases* is a tuple, the created heap type contains all types contained in " -"it as base types." +"The *bases* argument can be used to specify base classes; it can either be " +"only one class or a tuple of classes. If *bases* is ``NULL``, the " +"*Py_tp_bases* slot is used instead. If that also is ``NULL``, the " +"*Py_tp_base* slot is used instead. If that also is ``NULL``, the new type " +"derives from :class:`object`." msgstr "" -#: c-api/type.rst:169 -msgid "" -"If *bases* is ``NULL``, the *Py_tp_bases* slot is used instead. If that also " -"is ``NULL``, the *Py_tp_base* slot is used instead. If that also is " -"``NULL``, the new type derives from :class:`object`." -msgstr "" - -#: c-api/type.rst:173 +#: c-api/type.rst:204 msgid "" "The *module* argument can be used to record the module in which the new " "class is defined. It must be a module object or ``NULL``. If not ``NULL``, " -"the module is associated with the new type and can later be retreived with :" +"the module is associated with the new type and can later be retrieved with :" "c:func:`PyType_GetModule`. The associated module is not inherited by " "subclasses; it must be specified for each class individually." msgstr "" -#: c-api/type.rst:180 +#: c-api/type.rst:211 msgid "This function calls :c:func:`PyType_Ready` on the new type." msgstr "" -#: c-api/type.rst:186 +#: c-api/type.rst:217 +msgid "" +"The function now accepts a single class as the *bases* argument and ``NULL`` " +"as the ``tp_doc`` slot." +msgstr "" + +#: c-api/type.rst:222 msgid "Equivalent to ``PyType_FromModuleAndSpec(NULL, spec, bases)``." msgstr "" -#: c-api/type.rst:192 +#: c-api/type.rst:228 msgid "Equivalent to ``PyType_FromSpecWithBases(spec, NULL)``." msgstr "" -#: c-api/type.rst:196 +#: c-api/type.rst:232 msgid "Structure defining a type's behavior." msgstr "" -#: c-api/type.rst:200 +#: c-api/type.rst:236 msgid "Name of the type, used to set :c:member:`PyTypeObject.tp_name`." msgstr "" -#: c-api/type.rst:205 +#: c-api/type.rst:241 msgid "" "Size of the instance in bytes, used to set :c:member:`PyTypeObject." "tp_basicsize` and :c:member:`PyTypeObject.tp_itemsize`." msgstr "" -#: c-api/type.rst:211 +#: c-api/type.rst:247 msgid "Type flags, used to set :c:member:`PyTypeObject.tp_flags`." msgstr "" -#: c-api/type.rst:213 +#: c-api/type.rst:249 msgid "" "If the ``Py_TPFLAGS_HEAPTYPE`` flag is not set, :c:func:" "`PyType_FromSpecWithBases` sets it automatically." msgstr "" -#: c-api/type.rst:218 +#: c-api/type.rst:254 msgid "" "Array of :c:type:`PyType_Slot` structures. Terminated by the special slot " "value ``{0, NULL}``." msgstr "" -#: c-api/type.rst:223 +#: c-api/type.rst:259 msgid "" "Structure defining optional functionality of a type, containing a slot ID " "and a value pointer." msgstr "" -#: c-api/type.rst:228 +#: c-api/type.rst:264 msgid "A slot ID." msgstr "" -#: c-api/type.rst:230 +#: c-api/type.rst:266 msgid "" "Slot IDs are named like the field names of the structures :c:type:" "`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:" @@ -270,97 +307,89 @@ msgid "" "prefix. For example, use:" msgstr "" -#: c-api/type.rst:236 +#: c-api/type.rst:272 msgid "``Py_tp_dealloc`` to set :c:member:`PyTypeObject.tp_dealloc`" msgstr "" -#: c-api/type.rst:237 +#: c-api/type.rst:273 msgid "``Py_nb_add`` to set :c:member:`PyNumberMethods.nb_add`" msgstr "" -#: c-api/type.rst:238 +#: c-api/type.rst:274 msgid "``Py_sq_length`` to set :c:member:`PySequenceMethods.sq_length`" msgstr "" -#: c-api/type.rst:240 +#: c-api/type.rst:276 msgid "" "The following fields cannot be set at all using :c:type:`PyType_Spec` and :c:" "type:`PyType_Slot`:" msgstr "" -#: c-api/type.rst:243 +#: c-api/type.rst:279 msgid ":c:member:`~PyTypeObject.tp_dict`" msgstr "" -#: c-api/type.rst:244 +#: c-api/type.rst:280 msgid ":c:member:`~PyTypeObject.tp_mro`" msgstr "" -#: c-api/type.rst:245 +#: c-api/type.rst:281 msgid ":c:member:`~PyTypeObject.tp_cache`" msgstr "" -#: c-api/type.rst:246 +#: c-api/type.rst:282 msgid ":c:member:`~PyTypeObject.tp_subclasses`" msgstr "" -#: c-api/type.rst:247 +#: c-api/type.rst:283 msgid ":c:member:`~PyTypeObject.tp_weaklist`" msgstr "" -#: c-api/type.rst:248 +#: c-api/type.rst:284 msgid ":c:member:`~PyTypeObject.tp_vectorcall`" msgstr "" -#: c-api/type.rst:249 +#: c-api/type.rst:285 msgid "" ":c:member:`~PyTypeObject.tp_weaklistoffset` (see :ref:`PyMemberDef " "`)" msgstr "" -#: c-api/type.rst:251 +#: c-api/type.rst:287 msgid "" ":c:member:`~PyTypeObject.tp_dictoffset` (see :ref:`PyMemberDef `)" msgstr "" -#: c-api/type.rst:253 +#: c-api/type.rst:289 msgid "" ":c:member:`~PyTypeObject.tp_vectorcall_offset` (see :ref:`PyMemberDef " "`)" msgstr "" -#: c-api/type.rst:256 -msgid "" -"The following fields cannot be set using :c:type:`PyType_Spec` and :c:type:" -"`PyType_Slot` under the limited API:" -msgstr "" - -#: c-api/type.rst:259 -msgid ":c:member:`~PyBufferProcs.bf_getbuffer`" -msgstr "" - -#: c-api/type.rst:260 -msgid ":c:member:`~PyBufferProcs.bf_releasebuffer`" -msgstr "" - -#: c-api/type.rst:262 +#: c-api/type.rst:292 msgid "" "Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be problematic on " "some platforms. To avoid issues, use the *bases* argument of :py:func:" "`PyType_FromSpecWithBases` instead." msgstr "" -#: c-api/type.rst:269 -msgid "Slots in :c:type:`PyBufferProcs` in may be set in the unlimited API." +#: c-api/type.rst:299 +msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." msgstr "" -#: c-api/type.rst:273 +#: c-api/type.rst:301 +msgid "" +":c:member:`~PyBufferProcs.bf_getbuffer` and :c:member:`~PyBufferProcs." +"bf_releasebuffer` are now available under the limited API." +msgstr "" + +#: c-api/type.rst:308 msgid "" "The desired value of the slot. In most cases, this is a pointer to a " "function." msgstr "" -#: c-api/type.rst:276 -msgid "May not be ``NULL``." +#: c-api/type.rst:311 +msgid "Slots other than ``Py_tp_doc`` may not be ``NULL``." msgstr "" diff --git a/c-api/typehints.po b/c-api/typehints.po new file mode 100644 index 0000000000..10b81e0280 --- /dev/null +++ b/c-api/typehints.po @@ -0,0 +1,55 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 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/typehints.rst:6 +msgid "Objects for Type Hinting" +msgstr "" + +#: c-api/typehints.rst:8 +msgid "" +"Various built-in types for type hinting are provided. Currently, two types " +"exist -- :ref:`GenericAlias ` and :ref:`Union `. Only ``GenericAlias`` is exposed to C." +msgstr "" + +#: c-api/typehints.rst:14 +msgid "" +"Create a :ref:`GenericAlias ` object. Equivalent to " +"calling the Python class :class:`types.GenericAlias`. The *origin* and " +"*args* arguments set the ``GenericAlias``\\ 's ``__origin__`` and " +"``__args__`` attributes respectively. *origin* should be a :c:type:" +"`PyTypeObject*`, and *args* can be a :c:type:`PyTupleObject*` or any " +"``PyObject*``. If *args* passed is not a tuple, a 1-tuple is automatically " +"constructed and ``__args__`` is set to ``(args,)``. Minimal checking is done " +"for the arguments, so the function will succeed even if *origin* is not a " +"type. The ``GenericAlias``\\ 's ``__parameters__`` attribute is constructed " +"lazily from ``__args__``. On failure, an exception is raised and ``NULL`` " +"is returned." +msgstr "" + +#: c-api/typehints.rst:28 +msgid "Here's an example of how to make an extension type generic::" +msgstr "" + +#: c-api/typehints.rst:38 +msgid "The data model method :meth:`__class_getitem__`." +msgstr "" + +#: c-api/typehints.rst:44 +msgid "" +"The C type of the object returned by :c:func:`Py_GenericAlias`. Equivalent " +"to :class:`types.GenericAlias` in Python." +msgstr "" diff --git a/c-api/typeobj.po b/c-api/typeobj.po index 170b5188ff..86e9e890d5 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -22,11 +22,11 @@ msgstr "Objets type" msgid "" "Perhaps one of the most important structures of the Python object system is " "the structure that defines a new type: the :c:type:`PyTypeObject` " -"structure. Type objects can be handled using any of the :c:func:`PyObject_" -"\\*` or :c:func:`PyType_\\*` functions, but do not offer much that's " -"interesting to most Python applications. These objects are fundamental to " -"how objects behave, so they are very important to the interpreter itself and " -"to any extension module that implements new types." +"structure. Type objects can be handled using any of the :c:func:" +"`PyObject_\\*` or :c:func:`PyType_\\*` functions, but do not offer much " +"that's interesting to most Python applications. These objects are " +"fundamental to how objects behave, so they are very important to the " +"interpreter itself and to any extension module that implements new types." msgstr "" #: c-api/typeobj.rst:16 @@ -112,8 +112,8 @@ msgid ":c:member:`~PyTypeObject.tp_basicsize`" msgstr "" #: c-api/typeobj.rst:48 c-api/typeobj.rst:99 c-api/typeobj.rst:0 -#: c-api/typeobj.rst:406 -msgid "Py_ssize_t" +#: c-api/typeobj.rst:408 +msgid ":c:type:`Py_ssize_t`" msgstr "" #: c-api/typeobj.rst:48 @@ -124,7 +124,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_dealloc`" msgstr "" -#: c-api/typeobj.rst:142 c-api/typeobj.rst:336 +#: c-api/typeobj.rst:142 c-api/typeobj.rst:338 msgid ":c:type:`destructor`" msgstr "" @@ -136,7 +136,7 @@ msgstr "" msgid "(:c:member:`~PyTypeObject.tp_getattr`)" msgstr "" -#: c-api/typeobj.rst:360 +#: c-api/typeobj.rst:362 msgid ":c:type:`getattrfunc`" msgstr "" @@ -153,7 +153,7 @@ msgstr "" msgid "(:c:member:`~PyTypeObject.tp_setattr`)" msgstr "" -#: c-api/typeobj.rst:365 +#: c-api/typeobj.rst:367 msgid ":c:type:`setattrfunc`" msgstr "" @@ -171,7 +171,7 @@ msgstr "" #: c-api/typeobj.rst:64 c-api/typeobj.rst:68 msgid ":ref:`sub-slots`" -msgstr "" +msgstr ":ref:`sub-slots`" #: c-api/typeobj.rst:64 c-api/typeobj.rst:68 c-api/typeobj.rst:82 msgid "%" @@ -181,7 +181,7 @@ msgstr "%" msgid ":c:member:`~PyTypeObject.tp_repr`" msgstr "" -#: c-api/typeobj.rst:74 c-api/typeobj.rst:358 +#: c-api/typeobj.rst:74 c-api/typeobj.rst:360 msgid ":c:type:`reprfunc`" msgstr "" @@ -217,7 +217,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_hash`" msgstr "" -#: c-api/typeobj.rst:394 +#: c-api/typeobj.rst:396 msgid ":c:type:`hashfunc`" msgstr "" @@ -229,7 +229,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_call`" msgstr "" -#: c-api/typeobj.rst:227 c-api/typeobj.rst:430 +#: c-api/typeobj.rst:229 c-api/typeobj.rst:432 msgid ":c:type:`ternaryfunc`" msgstr "" @@ -249,7 +249,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_getattro`" msgstr "" -#: c-api/typeobj.rst:371 +#: c-api/typeobj.rst:373 msgid ":c:type:`getattrofunc`" msgstr "" @@ -257,7 +257,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_setattro`" msgstr "" -#: c-api/typeobj.rst:376 +#: c-api/typeobj.rst:378 msgid ":c:type:`setattrofunc`" msgstr "" @@ -294,7 +294,7 @@ msgstr "__doc__" msgid ":c:member:`~PyTypeObject.tp_traverse`" msgstr "" -#: c-api/typeobj.rst:340 +#: c-api/typeobj.rst:342 msgid ":c:type:`traverseproc`" msgstr "" @@ -302,7 +302,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_clear`" msgstr "" -#: c-api/typeobj.rst:130 c-api/typeobj.rst:419 +#: c-api/typeobj.rst:130 c-api/typeobj.rst:421 msgid ":c:type:`inquiry`" msgstr "" @@ -310,7 +310,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_richcompare`" msgstr "" -#: c-api/typeobj.rst:396 +#: c-api/typeobj.rst:398 msgid ":c:type:`richcmpfunc`" msgstr "" @@ -326,7 +326,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_iter`" msgstr "" -#: c-api/typeobj.rst:402 +#: c-api/typeobj.rst:404 msgid ":c:type:`getiterfunc`" msgstr "" @@ -338,7 +338,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_iternext`" msgstr "" -#: c-api/typeobj.rst:404 +#: c-api/typeobj.rst:406 msgid ":c:type:`iternextfunc`" msgstr "" @@ -387,9 +387,9 @@ msgid ":c:member:`~PyTypeObject.tp_dict`" msgstr "" #: c-api/typeobj.rst:132 c-api/typeobj.rst:136 c-api/typeobj.rst:140 -#: c-api/typeobj.rst:0 c-api/typeobj.rst:358 c-api/typeobj.rst:371 -#: c-api/typeobj.rst:394 c-api/typeobj.rst:402 c-api/typeobj.rst:406 -#: c-api/typeobj.rst:425 c-api/typeobj.rst:436 +#: c-api/typeobj.rst:0 c-api/typeobj.rst:360 c-api/typeobj.rst:373 +#: c-api/typeobj.rst:396 c-api/typeobj.rst:404 c-api/typeobj.rst:408 +#: c-api/typeobj.rst:427 c-api/typeobj.rst:438 msgid ":c:type:`PyObject` *" msgstr "" @@ -401,7 +401,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_descr_get`" msgstr "" -#: c-api/typeobj.rst:382 +#: c-api/typeobj.rst:384 msgid ":c:type:`descrgetfunc`" msgstr "" @@ -413,7 +413,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_descr_set`" msgstr "" -#: c-api/typeobj.rst:388 +#: c-api/typeobj.rst:390 msgid ":c:type:`descrsetfunc`" msgstr "" @@ -429,7 +429,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_init`" msgstr "" -#: c-api/typeobj.rst:352 +#: c-api/typeobj.rst:354 msgid ":c:type:`initproc`" msgstr "" @@ -441,7 +441,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_alloc`" msgstr "" -#: c-api/typeobj.rst:331 +#: c-api/typeobj.rst:333 msgid ":c:type:`allocfunc`" msgstr "" @@ -449,7 +449,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_new`" msgstr "" -#: c-api/typeobj.rst:346 +#: c-api/typeobj.rst:348 msgid ":c:type:`newfunc`" msgstr "" @@ -461,7 +461,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_free`" msgstr "" -#: c-api/typeobj.rst:338 +#: c-api/typeobj.rst:340 msgid ":c:type:`freefunc`" msgstr "" @@ -584,8 +584,8 @@ msgstr "méthode spéciale" msgid ":c:member:`~PyAsyncMethods.am_await`" msgstr "" -#: c-api/typeobj.rst:198 c-api/typeobj.rst:232 c-api/typeobj.rst:236 -#: c-api/typeobj.rst:267 c-api/typeobj.rst:281 c-api/typeobj.rst:421 +#: c-api/typeobj.rst:198 c-api/typeobj.rst:234 c-api/typeobj.rst:238 +#: c-api/typeobj.rst:269 c-api/typeobj.rst:283 c-api/typeobj.rst:423 msgid ":c:type:`unaryfunc`" msgstr "" @@ -609,247 +609,255 @@ msgstr "" msgid "__anext__" msgstr "" -#: c-api/typeobj.rst:204 +#: c-api/typeobj.rst:202 +msgid ":c:member:`~PyAsyncMethods.am_send`" +msgstr "" + +#: c-api/typeobj.rst:202 +msgid ":c:type:`sendfunc`" +msgstr "" + +#: c-api/typeobj.rst:206 msgid ":c:member:`~PyNumberMethods.nb_add`" msgstr "" -#: c-api/typeobj.rst:207 c-api/typeobj.rst:212 c-api/typeobj.rst:217 -#: c-api/typeobj.rst:222 c-api/typeobj.rst:242 c-api/typeobj.rst:247 -#: c-api/typeobj.rst:252 c-api/typeobj.rst:257 c-api/typeobj.rst:262 -#: c-api/typeobj.rst:273 c-api/typeobj.rst:277 c-api/typeobj.rst:283 -#: c-api/typeobj.rst:292 c-api/typeobj.rst:312 c-api/typeobj.rst:425 +#: c-api/typeobj.rst:209 c-api/typeobj.rst:214 c-api/typeobj.rst:219 +#: c-api/typeobj.rst:224 c-api/typeobj.rst:244 c-api/typeobj.rst:249 +#: c-api/typeobj.rst:254 c-api/typeobj.rst:259 c-api/typeobj.rst:264 +#: c-api/typeobj.rst:275 c-api/typeobj.rst:279 c-api/typeobj.rst:285 +#: c-api/typeobj.rst:294 c-api/typeobj.rst:314 c-api/typeobj.rst:427 msgid ":c:type:`binaryfunc`" msgstr "" -#: c-api/typeobj.rst:204 +#: c-api/typeobj.rst:206 msgid "__add__ __radd__" msgstr "" -#: c-api/typeobj.rst:207 +#: c-api/typeobj.rst:209 msgid ":c:member:`~PyNumberMethods.nb_inplace_add`" msgstr "" -#: c-api/typeobj.rst:312 +#: c-api/typeobj.rst:314 msgid "__iadd__" msgstr "" -#: c-api/typeobj.rst:209 +#: c-api/typeobj.rst:211 msgid ":c:member:`~PyNumberMethods.nb_subtract`" msgstr "" -#: c-api/typeobj.rst:209 +#: c-api/typeobj.rst:211 msgid "__sub__ __rsub__" msgstr "" -#: c-api/typeobj.rst:212 +#: c-api/typeobj.rst:214 msgid ":c:member:`~PyNumberMethods.nb_inplace_subtract`" msgstr "" -#: c-api/typeobj.rst:212 -msgid "__sub__" +#: c-api/typeobj.rst:214 +msgid "__isub__" msgstr "" -#: c-api/typeobj.rst:214 +#: c-api/typeobj.rst:216 msgid ":c:member:`~PyNumberMethods.nb_multiply`" msgstr "" -#: c-api/typeobj.rst:214 +#: c-api/typeobj.rst:216 msgid "__mul__ __rmul__" msgstr "" -#: c-api/typeobj.rst:217 +#: c-api/typeobj.rst:219 msgid ":c:member:`~PyNumberMethods.nb_inplace_multiply`" msgstr "" -#: c-api/typeobj.rst:303 -msgid "__mul__" +#: c-api/typeobj.rst:316 +msgid "__imul__" msgstr "" -#: c-api/typeobj.rst:219 +#: c-api/typeobj.rst:221 msgid ":c:member:`~PyNumberMethods.nb_remainder`" msgstr "" -#: c-api/typeobj.rst:219 +#: c-api/typeobj.rst:221 msgid "__mod__ __rmod__" msgstr "" -#: c-api/typeobj.rst:222 +#: c-api/typeobj.rst:224 msgid ":c:member:`~PyNumberMethods.nb_inplace_remainder`" msgstr "" -#: c-api/typeobj.rst:222 -msgid "__mod__" +#: c-api/typeobj.rst:224 +msgid "__imod__" msgstr "" -#: c-api/typeobj.rst:224 +#: c-api/typeobj.rst:226 msgid ":c:member:`~PyNumberMethods.nb_divmod`" msgstr "" -#: c-api/typeobj.rst:224 +#: c-api/typeobj.rst:226 msgid "__divmod__ __rdivmod__" msgstr "" -#: c-api/typeobj.rst:227 +#: c-api/typeobj.rst:229 msgid ":c:member:`~PyNumberMethods.nb_power`" msgstr "" -#: c-api/typeobj.rst:227 +#: c-api/typeobj.rst:229 msgid "__pow__ __rpow__" msgstr "" -#: c-api/typeobj.rst:230 +#: c-api/typeobj.rst:232 msgid ":c:member:`~PyNumberMethods.nb_inplace_power`" msgstr "" -#: c-api/typeobj.rst:230 -msgid "__pow__" +#: c-api/typeobj.rst:232 +msgid "__ipow__" msgstr "" -#: c-api/typeobj.rst:232 +#: c-api/typeobj.rst:234 msgid ":c:member:`~PyNumberMethods.nb_negative`" msgstr "" -#: c-api/typeobj.rst:232 +#: c-api/typeobj.rst:234 msgid "__neg__" msgstr "" -#: c-api/typeobj.rst:234 +#: c-api/typeobj.rst:236 msgid ":c:member:`~PyNumberMethods.nb_positive`" msgstr "" -#: c-api/typeobj.rst:234 +#: c-api/typeobj.rst:236 msgid "__pos__" msgstr "" -#: c-api/typeobj.rst:236 +#: c-api/typeobj.rst:238 msgid ":c:member:`~PyNumberMethods.nb_absolute`" msgstr "" -#: c-api/typeobj.rst:236 +#: c-api/typeobj.rst:238 msgid "__abs__" msgstr "" -#: c-api/typeobj.rst:238 +#: c-api/typeobj.rst:240 msgid ":c:member:`~PyNumberMethods.nb_bool`" msgstr "" -#: c-api/typeobj.rst:238 +#: c-api/typeobj.rst:240 msgid "__bool__" msgstr "" -#: c-api/typeobj.rst:240 +#: c-api/typeobj.rst:242 msgid ":c:member:`~PyNumberMethods.nb_invert`" msgstr "" -#: c-api/typeobj.rst:240 +#: c-api/typeobj.rst:242 msgid "__invert__" msgstr "" -#: c-api/typeobj.rst:242 +#: c-api/typeobj.rst:244 msgid ":c:member:`~PyNumberMethods.nb_lshift`" msgstr "" -#: c-api/typeobj.rst:242 +#: c-api/typeobj.rst:244 msgid "__lshift__ __rlshift__" msgstr "" -#: c-api/typeobj.rst:245 +#: c-api/typeobj.rst:247 msgid ":c:member:`~PyNumberMethods.nb_inplace_lshift`" msgstr "" -#: c-api/typeobj.rst:245 -msgid "__lshift__" +#: c-api/typeobj.rst:247 +msgid "__ilshift__" msgstr "" -#: c-api/typeobj.rst:247 +#: c-api/typeobj.rst:249 msgid ":c:member:`~PyNumberMethods.nb_rshift`" msgstr "" -#: c-api/typeobj.rst:247 +#: c-api/typeobj.rst:249 msgid "__rshift__ __rrshift__" msgstr "" -#: c-api/typeobj.rst:250 +#: c-api/typeobj.rst:252 msgid ":c:member:`~PyNumberMethods.nb_inplace_rshift`" msgstr "" -#: c-api/typeobj.rst:250 -msgid "__rshift__" +#: c-api/typeobj.rst:252 +msgid "__irshift__" msgstr "" -#: c-api/typeobj.rst:252 +#: c-api/typeobj.rst:254 msgid ":c:member:`~PyNumberMethods.nb_and`" msgstr "" -#: c-api/typeobj.rst:252 +#: c-api/typeobj.rst:254 msgid "__and__ __rand__" msgstr "" -#: c-api/typeobj.rst:255 +#: c-api/typeobj.rst:257 msgid ":c:member:`~PyNumberMethods.nb_inplace_and`" msgstr "" -#: c-api/typeobj.rst:255 -msgid "__and__" +#: c-api/typeobj.rst:257 +msgid "__iand__" msgstr "" -#: c-api/typeobj.rst:257 +#: c-api/typeobj.rst:259 msgid ":c:member:`~PyNumberMethods.nb_xor`" msgstr "" -#: c-api/typeobj.rst:257 +#: c-api/typeobj.rst:259 msgid "__xor__ __rxor__" msgstr "" -#: c-api/typeobj.rst:260 +#: c-api/typeobj.rst:262 msgid ":c:member:`~PyNumberMethods.nb_inplace_xor`" msgstr "" -#: c-api/typeobj.rst:260 -msgid "__xor__" +#: c-api/typeobj.rst:262 +msgid "__ixor__" msgstr "" -#: c-api/typeobj.rst:262 +#: c-api/typeobj.rst:264 msgid ":c:member:`~PyNumberMethods.nb_or`" msgstr "" -#: c-api/typeobj.rst:262 +#: c-api/typeobj.rst:264 msgid "__or__ __ror__" msgstr "" -#: c-api/typeobj.rst:265 +#: c-api/typeobj.rst:267 msgid ":c:member:`~PyNumberMethods.nb_inplace_or`" msgstr "" -#: c-api/typeobj.rst:265 -msgid "__or__" +#: c-api/typeobj.rst:267 +msgid "__ior__" msgstr "" -#: c-api/typeobj.rst:267 +#: c-api/typeobj.rst:269 msgid ":c:member:`~PyNumberMethods.nb_int`" msgstr "" -#: c-api/typeobj.rst:267 +#: c-api/typeobj.rst:269 msgid "__int__" msgstr "" -#: c-api/typeobj.rst:269 +#: c-api/typeobj.rst:271 msgid ":c:member:`~PyNumberMethods.nb_reserved`" msgstr "" -#: c-api/typeobj.rst:336 c-api/typeobj.rst:0 c-api/typeobj.rst:419 +#: c-api/typeobj.rst:338 c-api/typeobj.rst:0 c-api/typeobj.rst:421 msgid "void *" msgstr "" -#: c-api/typeobj.rst:271 +#: c-api/typeobj.rst:273 msgid ":c:member:`~PyNumberMethods.nb_float`" msgstr "" -#: c-api/typeobj.rst:271 +#: c-api/typeobj.rst:273 msgid "__float__" msgstr "" -#: c-api/typeobj.rst:273 +#: c-api/typeobj.rst:275 msgid ":c:member:`~PyNumberMethods.nb_floor_divide`" msgstr "" @@ -857,11 +865,15 @@ msgstr "" msgid "__floordiv__" msgstr "" -#: c-api/typeobj.rst:275 +#: c-api/typeobj.rst:277 msgid ":c:member:`~PyNumberMethods.nb_inplace_floor_divide`" msgstr "" #: c-api/typeobj.rst:277 +msgid "__ifloordiv__" +msgstr "" + +#: c-api/typeobj.rst:279 msgid ":c:member:`~PyNumberMethods.nb_true_divide`" msgstr "" @@ -869,159 +881,163 @@ msgstr "" msgid "__truediv__" msgstr "" -#: c-api/typeobj.rst:279 +#: c-api/typeobj.rst:281 msgid ":c:member:`~PyNumberMethods.nb_inplace_true_divide`" msgstr "" #: c-api/typeobj.rst:281 +msgid "__itruediv__" +msgstr "" + +#: c-api/typeobj.rst:283 msgid ":c:member:`~PyNumberMethods.nb_index`" msgstr "" -#: c-api/typeobj.rst:281 +#: c-api/typeobj.rst:283 msgid "__index__" msgstr "" -#: c-api/typeobj.rst:283 +#: c-api/typeobj.rst:285 msgid ":c:member:`~PyNumberMethods.nb_matrix_multiply`" msgstr "" -#: c-api/typeobj.rst:283 +#: c-api/typeobj.rst:285 msgid "__matmul__ __rmatmul__" msgstr "" -#: c-api/typeobj.rst:286 +#: c-api/typeobj.rst:288 msgid ":c:member:`~PyNumberMethods.nb_inplace_matrix_multiply`" msgstr "" -#: c-api/typeobj.rst:286 -msgid "__matmul__" +#: c-api/typeobj.rst:288 +msgid "__imatmul__" msgstr "" -#: c-api/typeobj.rst:290 +#: c-api/typeobj.rst:292 msgid ":c:member:`~PyMappingMethods.mp_length`" msgstr "" -#: c-api/typeobj.rst:299 c-api/typeobj.rst:406 +#: c-api/typeobj.rst:301 c-api/typeobj.rst:408 msgid ":c:type:`lenfunc`" msgstr "" -#: c-api/typeobj.rst:299 +#: c-api/typeobj.rst:301 msgid "__len__" msgstr "" -#: c-api/typeobj.rst:292 +#: c-api/typeobj.rst:294 msgid ":c:member:`~PyMappingMethods.mp_subscript`" msgstr "" -#: c-api/typeobj.rst:305 +#: c-api/typeobj.rst:307 msgid "__getitem__" msgstr "" -#: c-api/typeobj.rst:294 +#: c-api/typeobj.rst:296 msgid ":c:member:`~PyMappingMethods.mp_ass_subscript`" msgstr "" -#: c-api/typeobj.rst:451 +#: c-api/typeobj.rst:453 msgid ":c:type:`objobjargproc`" msgstr "" -#: c-api/typeobj.rst:294 +#: c-api/typeobj.rst:296 msgid "__setitem__, __delitem__" msgstr "" -#: c-api/typeobj.rst:299 +#: c-api/typeobj.rst:301 msgid ":c:member:`~PySequenceMethods.sq_length`" msgstr "" -#: c-api/typeobj.rst:301 +#: c-api/typeobj.rst:303 msgid ":c:member:`~PySequenceMethods.sq_concat`" msgstr "" -#: c-api/typeobj.rst:301 +#: c-api/typeobj.rst:303 msgid "__add__" msgstr "" -#: c-api/typeobj.rst:303 +#: c-api/typeobj.rst:305 msgid ":c:member:`~PySequenceMethods.sq_repeat`" msgstr "" -#: c-api/typeobj.rst:305 c-api/typeobj.rst:436 +#: c-api/typeobj.rst:307 c-api/typeobj.rst:438 msgid ":c:type:`ssizeargfunc`" msgstr "" #: c-api/typeobj.rst:305 -msgid ":c:member:`~PySequenceMethods.sq_item`" +msgid "__mul__" msgstr "" #: c-api/typeobj.rst:307 +msgid ":c:member:`~PySequenceMethods.sq_item`" +msgstr "" + +#: c-api/typeobj.rst:309 msgid ":c:member:`~PySequenceMethods.sq_ass_item`" msgstr "" -#: c-api/typeobj.rst:441 +#: c-api/typeobj.rst:443 msgid ":c:type:`ssizeobjargproc`" msgstr "" -#: c-api/typeobj.rst:307 +#: c-api/typeobj.rst:309 msgid "__setitem__ __delitem__" msgstr "" -#: c-api/typeobj.rst:310 +#: c-api/typeobj.rst:312 msgid ":c:member:`~PySequenceMethods.sq_contains`" msgstr "" -#: c-api/typeobj.rst:446 +#: c-api/typeobj.rst:448 msgid ":c:type:`objobjproc`" msgstr "" -#: c-api/typeobj.rst:310 +#: c-api/typeobj.rst:312 msgid "__contains__" msgstr "" -#: c-api/typeobj.rst:312 +#: c-api/typeobj.rst:314 msgid ":c:member:`~PySequenceMethods.sq_inplace_concat`" msgstr "" -#: c-api/typeobj.rst:314 +#: c-api/typeobj.rst:316 msgid ":c:member:`~PySequenceMethods.sq_inplace_repeat`" msgstr "" -#: c-api/typeobj.rst:314 -msgid "__imul__" -msgstr "" - -#: c-api/typeobj.rst:318 +#: c-api/typeobj.rst:320 msgid ":c:member:`~PyBufferProcs.bf_getbuffer`" msgstr "" -#: c-api/typeobj.rst:318 +#: c-api/typeobj.rst:320 msgid ":c:func:`getbufferproc`" msgstr "" -#: c-api/typeobj.rst:320 +#: c-api/typeobj.rst:322 msgid ":c:member:`~PyBufferProcs.bf_releasebuffer`" msgstr "" -#: c-api/typeobj.rst:320 +#: c-api/typeobj.rst:322 msgid ":c:func:`releasebufferproc`" msgstr "" -#: c-api/typeobj.rst:326 +#: c-api/typeobj.rst:328 msgid "slot typedefs" msgstr "" -#: c-api/typeobj.rst:329 +#: c-api/typeobj.rst:331 msgid "typedef" msgstr "" -#: c-api/typeobj.rst:329 +#: c-api/typeobj.rst:331 msgid "Parameter Types" msgstr "" -#: c-api/typeobj.rst:329 +#: c-api/typeobj.rst:331 msgid "Return Type" msgstr "" -#: c-api/typeobj.rst:338 c-api/typeobj.rst:414 +#: c-api/typeobj.rst:340 c-api/typeobj.rst:416 msgid "void" msgstr "" @@ -1029,16 +1045,16 @@ msgstr "" msgid ":c:type:`visitproc`" msgstr "" -#: c-api/typeobj.rst:352 c-api/typeobj.rst:376 c-api/typeobj.rst:0 -#: c-api/typeobj.rst:419 c-api/typeobj.rst:446 c-api/typeobj.rst:451 +#: c-api/typeobj.rst:354 c-api/typeobj.rst:378 c-api/typeobj.rst:0 +#: c-api/typeobj.rst:421 c-api/typeobj.rst:448 c-api/typeobj.rst:453 msgid "int" msgstr "*int*" -#: c-api/typeobj.rst:394 +#: c-api/typeobj.rst:396 msgid "Py_hash_t" msgstr "" -#: c-api/typeobj.rst:408 +#: c-api/typeobj.rst:410 msgid ":c:type:`getbufferproc`" msgstr "" @@ -1046,83 +1062,68 @@ msgstr "" msgid ":c:type:`Py_buffer` *" msgstr "" -#: c-api/typeobj.rst:414 +#: c-api/typeobj.rst:416 msgid ":c:type:`releasebufferproc`" msgstr "" -#: c-api/typeobj.rst:458 +#: c-api/typeobj.rst:460 msgid "See :ref:`slot-typedefs` below for more detail." msgstr "" -#: c-api/typeobj.rst:462 +#: c-api/typeobj.rst:464 msgid "PyTypeObject Definition" msgstr "" -#: c-api/typeobj.rst:464 +#: c-api/typeobj.rst:466 msgid "" "The structure definition for :c:type:`PyTypeObject` can be found in :file:" "`Include/object.h`. For convenience of reference, this repeats the " "definition found there:" msgstr "" -#: c-api/typeobj.rst:474 +#: c-api/typeobj.rst:476 #, fuzzy msgid "PyObject Slots" msgstr "Objets type" -#: c-api/typeobj.rst:476 +#: c-api/typeobj.rst:478 msgid "" "The type object structure extends the :c:type:`PyVarObject` structure. The :" -"attr:`ob_size` field is used for dynamic types (created by :func:" -"`type_new`, usually called from a class statement). Note that :c:data:" -"`PyType_Type` (the metatype) initializes :c:member:`~PyTypeObject." -"tp_itemsize`, which means that its instances (i.e. type objects) *must* have " -"the :attr:`ob_size` field." +"attr:`ob_size` field is used for dynamic types (created by :func:`type_new`, " +"usually called from a class statement). Note that :c:data:`PyType_Type` (the " +"metatype) initializes :c:member:`~PyTypeObject.tp_itemsize`, which means " +"that its instances (i.e. type objects) *must* have the :attr:`ob_size` field." msgstr "" -#: c-api/typeobj.rst:486 -msgid "" -"These fields are only present when the macro ``Py_TRACE_REFS`` is defined. " -"Their initialization to ``NULL`` is taken care of by the " -"``PyObject_HEAD_INIT`` macro. For statically allocated objects, these " -"fields always remain ``NULL``. For dynamically allocated objects, these two " -"fields are used to link the object into a doubly-linked list of *all* live " -"objects on the heap. This could be used for various debugging purposes; " -"currently the only use is to print the objects that are still alive at the " -"end of a run when the environment variable :envvar:`PYTHONDUMPREFS` is set." -msgstr "" - -#: c-api/typeobj.rst:508 c-api/typeobj.rst:544 c-api/typeobj.rst:629 -#: c-api/typeobj.rst:719 c-api/typeobj.rst:755 c-api/typeobj.rst:797 -#: c-api/typeobj.rst:826 c-api/typeobj.rst:871 c-api/typeobj.rst:909 -#: c-api/typeobj.rst:956 c-api/typeobj.rst:991 c-api/typeobj.rst:1039 -#: c-api/typeobj.rst:1059 c-api/typeobj.rst:1092 c-api/typeobj.rst:1162 -#: c-api/typeobj.rst:1245 c-api/typeobj.rst:1365 c-api/typeobj.rst:1427 -#: c-api/typeobj.rst:1463 c-api/typeobj.rst:1492 c-api/typeobj.rst:1542 -#: c-api/typeobj.rst:1586 c-api/typeobj.rst:1677 c-api/typeobj.rst:1732 -#: c-api/typeobj.rst:1785 c-api/typeobj.rst:1813 c-api/typeobj.rst:1832 -#: c-api/typeobj.rst:1856 c-api/typeobj.rst:1911 -msgid "**Inheritance:**" -msgstr "" - -#: c-api/typeobj.rst:497 -msgid "These fields are not inherited by subtypes." -msgstr "" - -#: c-api/typeobj.rst:502 +#: c-api/typeobj.rst:487 msgid "" "This is the type object's reference count, initialized to ``1`` by the " -"``PyObject_HEAD_INIT`` macro. Note that for statically allocated type " -"objects, the type's instances (objects whose :attr:`ob_type` points back to " -"the type) do *not* count as references. But for dynamically allocated type " -"objects, the instances *do* count as references." +"``PyObject_HEAD_INIT`` macro. Note that for :ref:`statically allocated type " +"objects `, the type's instances (objects whose :attr:`ob_type` " +"points back to the type) do *not* count as references. But for :ref:" +"`dynamically allocated type objects `, the instances *do* count " +"as references." +msgstr "" + +#: c-api/typeobj.rst:517 c-api/typeobj.rst:553 c-api/typeobj.rst:640 +#: c-api/typeobj.rst:742 c-api/typeobj.rst:779 c-api/typeobj.rst:821 +#: c-api/typeobj.rst:850 c-api/typeobj.rst:895 c-api/typeobj.rst:933 +#: c-api/typeobj.rst:980 c-api/typeobj.rst:1015 c-api/typeobj.rst:1063 +#: c-api/typeobj.rst:1083 c-api/typeobj.rst:1115 c-api/typeobj.rst:1185 +#: c-api/typeobj.rst:1219 c-api/typeobj.rst:1260 c-api/typeobj.rst:1344 +#: c-api/typeobj.rst:1470 c-api/typeobj.rst:1532 c-api/typeobj.rst:1568 +#: c-api/typeobj.rst:1597 c-api/typeobj.rst:1647 c-api/typeobj.rst:1691 +#: c-api/typeobj.rst:1782 c-api/typeobj.rst:1840 c-api/typeobj.rst:1894 +#: c-api/typeobj.rst:1922 c-api/typeobj.rst:1941 c-api/typeobj.rst:1965 +#: c-api/typeobj.rst:2031 +msgid "**Inheritance:**" msgstr "" -#: c-api/typeobj.rst:546 c-api/typeobj.rst:588 +#: c-api/typeobj.rst:555 c-api/typeobj.rst:599 msgid "This field is not inherited by subtypes." msgstr "" -#: c-api/typeobj.rst:515 +#: c-api/typeobj.rst:501 msgid "" "This is the type's type, in other words its metatype. It is initialized by " "the argument to the ``PyObject_HEAD_INIT`` macro, and its value should " @@ -1134,7 +1135,7 @@ msgid "" "doing anything else. This is typically done like this::" msgstr "" -#: c-api/typeobj.rst:526 +#: c-api/typeobj.rst:512 msgid "" "This should be done before any instances of the type are created. :c:func:" "`PyType_Ready` checks if :attr:`ob_type` is ``NULL``, and if so, initializes " @@ -1142,28 +1143,55 @@ msgid "" "will not change this field if it is non-zero." msgstr "" -#: c-api/typeobj.rst:677 c-api/typeobj.rst:891 c-api/typeobj.rst:1429 -#: c-api/typeobj.rst:1570 c-api/typeobj.rst:1679 c-api/typeobj.rst:1896 +#: c-api/typeobj.rst:700 c-api/typeobj.rst:915 c-api/typeobj.rst:1534 +#: c-api/typeobj.rst:1675 c-api/typeobj.rst:1784 c-api/typeobj.rst:2016 msgid "This field is inherited by subtypes." msgstr "" -#: c-api/typeobj.rst:537 -msgid "PyVarObject Slots" +#: c-api/typeobj.rst:525 +msgid "" +"These fields are only present when the macro ``Py_TRACE_REFS`` is defined " +"(see the :option:`configure --with-trace-refs option <--with-trace-refs>`)." +msgstr "" + +#: c-api/typeobj.rst:528 +msgid "" +"Their initialization to ``NULL`` is taken care of by the " +"``PyObject_HEAD_INIT`` macro. For :ref:`statically allocated objects " +"`, these fields always remain ``NULL``. For :ref:`dynamically " +"allocated objects `, these two fields are used to link the " +"object into a doubly-linked list of *all* live objects on the heap." +msgstr "" + +#: c-api/typeobj.rst:534 +msgid "" +"This could be used for various debugging purposes; currently the only uses " +"are the :func:`sys.getobjects` function and to print the objects that are " +"still alive at the end of a run when the environment variable :envvar:" +"`PYTHONDUMPREFS` is set." msgstr "" #: c-api/typeobj.rst:541 +msgid "These fields are not inherited by subtypes." +msgstr "" + +#: c-api/typeobj.rst:545 +msgid "PyVarObject Slots" +msgstr "" + +#: c-api/typeobj.rst:549 msgid "" -"For statically allocated type objects, this should be initialized to zero. " -"For dynamically allocated type objects, this field has a special internal " -"meaning." +"For :ref:`statically allocated type objects `, this should be " +"initialized to zero. For :ref:`dynamically allocated type objects `, this field has a special internal meaning." msgstr "" -#: c-api/typeobj.rst:550 +#: c-api/typeobj.rst:559 #, fuzzy msgid "PyTypeObject Slots" msgstr "Objets type" -#: c-api/typeobj.rst:552 +#: c-api/typeobj.rst:561 msgid "" "Each slot has a section describing inheritance. If :c:func:`PyType_Ready` " "may set a value when the field is set to ``NULL`` then there will also be a " @@ -1171,7 +1199,7 @@ msgid "" "`PyBaseObject_Type` and :c:type:`PyType_Type` effectively act as defaults.)" msgstr "" -#: c-api/typeobj.rst:559 +#: c-api/typeobj.rst:568 msgid "" "Pointer to a NUL-terminated string containing the name of the type. For " "types that are accessible as module globals, the string should be the full " @@ -1183,22 +1211,22 @@ msgid "" "tp_name` initializer ``\"P.Q.M.T\"``." msgstr "" -#: c-api/typeobj.rst:567 +#: c-api/typeobj.rst:576 msgid "" -"For dynamically allocated type objects, this should just be the type name, " -"and the module name explicitly stored in the type dict as the value for key " -"``'__module__'``." +"For :ref:`dynamically allocated type objects `, this should just " +"be the type name, and the module name explicitly stored in the type dict as " +"the value for key ``'__module__'``." msgstr "" -#: c-api/typeobj.rst:571 +#: c-api/typeobj.rst:581 msgid "" -"For statically allocated type objects, the tp_name field should contain a " -"dot. Everything before the last dot is made accessible as the :attr:" -"`__module__` attribute, and everything after the last dot is made accessible " -"as the :attr:`~definition.__name__` attribute." +"For :ref:`statically allocated type objects `, the *tp_name* " +"field should contain a dot. Everything before the last dot is made " +"accessible as the :attr:`__module__` attribute, and everything after the " +"last dot is made accessible as the :attr:`~definition.__name__` attribute." msgstr "" -#: c-api/typeobj.rst:576 +#: c-api/typeobj.rst:587 msgid "" "If no dot is present, the entire :c:member:`~PyTypeObject.tp_name` field is " "made accessible as the :attr:`~definition.__name__` attribute, and the :attr:" @@ -1208,19 +1236,19 @@ msgid "" "created with pydoc." msgstr "" -#: c-api/typeobj.rst:582 +#: c-api/typeobj.rst:593 msgid "" "This field must not be ``NULL``. It is the only required field in :c:func:" "`PyTypeObject` (other than potentially :c:member:`~PyTypeObject." "tp_itemsize`)." msgstr "" -#: c-api/typeobj.rst:594 +#: c-api/typeobj.rst:605 msgid "" "These fields allow calculating the size in bytes of instances of the type." msgstr "" -#: c-api/typeobj.rst:596 +#: c-api/typeobj.rst:607 msgid "" "There are two kinds of types: types with fixed-length instances have a zero :" "c:member:`~PyTypeObject.tp_itemsize` field, types with variable-length " @@ -1229,7 +1257,7 @@ msgid "" "in :c:member:`~PyTypeObject.tp_basicsize`." msgstr "" -#: c-api/typeobj.rst:601 +#: c-api/typeobj.rst:612 msgid "" "For a type with variable-length instances, the instances must have an :attr:" "`ob_size` field, and the instance size is :c:member:`~PyTypeObject." @@ -1243,7 +1271,7 @@ msgid "" "instances, yet those instances have a meaningful :attr:`ob_size` field)." msgstr "" -#: c-api/typeobj.rst:612 +#: c-api/typeobj.rst:623 msgid "" "The basic size includes the fields in the instance declared by the macro :c:" "macro:`PyObject_HEAD` or :c:macro:`PyObject_VAR_HEAD` (whichever is used to " @@ -1255,7 +1283,7 @@ msgid "" "size." msgstr "" -#: c-api/typeobj.rst:620 +#: c-api/typeobj.rst:631 msgid "" "A note about alignment: if the variable items require a particular " "alignment, this should be taken care of by the value of :c:member:" @@ -1266,12 +1294,12 @@ msgid "" "alignment requirement for ``double``)." msgstr "" -#: c-api/typeobj.rst:627 +#: c-api/typeobj.rst:638 msgid "" "For any type with variable-length instances, this field must not be ``NULL``." msgstr "" -#: c-api/typeobj.rst:631 +#: c-api/typeobj.rst:642 msgid "" "These fields are inherited separately by subtypes. If the base type has a " "non-zero :c:member:`~PyTypeObject.tp_itemsize`, it is generally not safe to " @@ -1279,7 +1307,7 @@ msgid "" "subtype (though this depends on the implementation of the base type)." msgstr "" -#: c-api/typeobj.rst:639 +#: c-api/typeobj.rst:650 msgid "" "A pointer to the instance destructor function. This function must be " "defined unless the type guarantees that its instances will never be " @@ -1287,7 +1315,7 @@ msgid "" "The function signature is::" msgstr "" -#: c-api/typeobj.rst:645 +#: c-api/typeobj.rst:656 msgid "" "The destructor function is called by the :c:func:`Py_DECREF` and :c:func:" "`Py_XDECREF` macros when the new reference count is zero. At this point, " @@ -1305,7 +1333,14 @@ msgid "" "allocated using :c:func:`PyObject_GC_New` or :c:func:`PyObject_GC_NewVar`." msgstr "" -#: c-api/typeobj.rst:660 +#: c-api/typeobj.rst:671 +msgid "" +"If the type supports garbage collection (has the :const:`Py_TPFLAGS_HAVE_GC` " +"flag bit set), the destructor should call :c:func:`PyObject_GC_UnTrack` " +"before clearing any member fields." +msgstr "" + +#: c-api/typeobj.rst:683 msgid "" "Finally, if the type is heap allocated (:const:`Py_TPFLAGS_HEAPTYPE`), the " "deallocator should decrement the reference count for its type object after " @@ -1313,28 +1348,28 @@ msgid "" "recommended way to achieve this is:" msgstr "" -#: c-api/typeobj.rst:682 +#: c-api/typeobj.rst:705 msgid "" "An optional offset to a per-instance function that implements calling the " "object using the :ref:`vectorcall protocol `, a more efficient " "alternative of the simpler :c:member:`~PyTypeObject.tp_call`." msgstr "" -#: c-api/typeobj.rst:687 +#: c-api/typeobj.rst:710 msgid "" "This field is only used if the flag :const:`Py_TPFLAGS_HAVE_VECTORCALL` is " "set. If so, this must be a positive integer containing the offset in the " "instance of a :c:type:`vectorcallfunc` pointer." msgstr "" -#: c-api/typeobj.rst:691 +#: c-api/typeobj.rst:714 msgid "" "The *vectorcallfunc* pointer may be ``NULL``, in which case the instance " "behaves as if :const:`Py_TPFLAGS_HAVE_VECTORCALL` was not set: calling the " "instance falls back to :c:member:`~PyTypeObject.tp_call`." msgstr "" -#: c-api/typeobj.rst:695 +#: c-api/typeobj.rst:718 msgid "" "Any class that sets ``Py_TPFLAGS_HAVE_VECTORCALL`` must also set :c:member:" "`~PyTypeObject.tp_call` and make sure its behaviour is consistent with the " @@ -1342,41 +1377,42 @@ msgid "" "`PyVectorcall_Call`." msgstr "" -#: c-api/typeobj.rst:702 +#: c-api/typeobj.rst:725 msgid "" -"It is not recommended for :ref:`heap types ` to implement the " -"vectorcall protocol. When a user sets :attr:`__call__` in Python code, only " -"*tp_call* is updated, likely making it inconsistent with the vectorcall " -"function." +"It is not recommended for :ref:`mutable heap types ` to " +"implement the vectorcall protocol. When a user sets :attr:`__call__` in " +"Python code, only *tp_call* is updated, likely making it inconsistent with " +"the vectorcall function." msgstr "" -#: c-api/typeobj.rst:709 +#: c-api/typeobj.rst:732 msgid "" "The semantics of the ``tp_vectorcall_offset`` slot are provisional and " "expected to be finalized in Python 3.9. If you use vectorcall, plan for " "updating your code for Python 3.9." msgstr "" -#: c-api/typeobj.rst:715 +#: c-api/typeobj.rst:738 msgid "" "Before version 3.8, this slot was named ``tp_print``. In Python 2.x, it was " "used for printing to a file. In Python 3.0 to 3.7, it was unused." msgstr "" -#: c-api/typeobj.rst:721 +#: c-api/typeobj.rst:744 msgid "" "This field is always inherited. However, the :const:" "`Py_TPFLAGS_HAVE_VECTORCALL` flag is not always inherited. If it's not, then " "the subclass won't use :ref:`vectorcall `, except when :c:func:" "`PyVectorcall_Call` is explicitly called. This is in particular the case for " -"`heap types`_ (including subclasses defined in Python)." +"types without the :const:`Py_TPFLAGS_IMMUTABLETYPE` flag set (including " +"subclasses defined in Python)." msgstr "" -#: c-api/typeobj.rst:732 +#: c-api/typeobj.rst:756 msgid "An optional pointer to the get-attribute-string function." msgstr "" -#: c-api/typeobj.rst:734 +#: c-api/typeobj.rst:758 msgid "" "This field is deprecated. When it is defined, it should point to a function " "that acts the same as the :c:member:`~PyTypeObject.tp_getattro` function, " @@ -1384,11 +1420,11 @@ msgid "" "attribute name." msgstr "" -#: c-api/typeobj.rst:932 +#: c-api/typeobj.rst:956 msgid "Group: :attr:`tp_getattr`, :attr:`tp_getattro`" msgstr "" -#: c-api/typeobj.rst:742 +#: c-api/typeobj.rst:766 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_getattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " @@ -1397,12 +1433,12 @@ msgid "" "tp_getattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:945 +#: c-api/typeobj.rst:969 msgid "" "An optional pointer to the function for setting and deleting attributes." msgstr "" -#: c-api/typeobj.rst:751 +#: c-api/typeobj.rst:775 msgid "" "This field is deprecated. When it is defined, it should point to a function " "that acts the same as the :c:member:`~PyTypeObject.tp_setattro` function, " @@ -1410,11 +1446,11 @@ msgid "" "attribute name." msgstr "" -#: c-api/typeobj.rst:958 +#: c-api/typeobj.rst:982 msgid "Group: :attr:`tp_setattr`, :attr:`tp_setattro`" msgstr "" -#: c-api/typeobj.rst:759 +#: c-api/typeobj.rst:783 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_setattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " @@ -1423,34 +1459,34 @@ msgid "" "tp_setattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:766 +#: c-api/typeobj.rst:790 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement :term:`awaitable` and :term:`asynchronous iterator` " "protocols at the C-level. See :ref:`async-structs` for details." msgstr "" -#: c-api/typeobj.rst:770 +#: c-api/typeobj.rst:794 msgid "Formerly known as ``tp_compare`` and ``tp_reserved``." msgstr "" -#: c-api/typeobj.rst:775 +#: c-api/typeobj.rst:799 msgid "" "The :c:member:`~PyTypeObject.tp_as_async` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:783 +#: c-api/typeobj.rst:807 msgid "" "An optional pointer to a function that implements the built-in function :" "func:`repr`." msgstr "" -#: c-api/typeobj.rst:786 +#: c-api/typeobj.rst:810 msgid "The signature is the same as for :c:func:`PyObject_Repr`::" msgstr "" -#: c-api/typeobj.rst:790 +#: c-api/typeobj.rst:814 msgid "" "The function must return a string or a Unicode object. Ideally, this " "function should return a string that, when passed to :func:`eval`, given a " @@ -1459,83 +1495,83 @@ msgid "" "``'>'`` from which both the type and the value of the object can be deduced." msgstr "" -#: c-api/typeobj.rst:913 c-api/typeobj.rst:964 c-api/typeobj.rst:1374 -#: c-api/typeobj.rst:1547 c-api/typeobj.rst:1681 c-api/typeobj.rst:1737 -#: c-api/typeobj.rst:1789 +#: c-api/typeobj.rst:937 c-api/typeobj.rst:988 c-api/typeobj.rst:1479 +#: c-api/typeobj.rst:1652 c-api/typeobj.rst:1786 c-api/typeobj.rst:1846 +#: c-api/typeobj.rst:1898 msgid "**Default:**" msgstr "" -#: c-api/typeobj.rst:803 +#: c-api/typeobj.rst:827 msgid "" "When this field is not set, a string of the form ``<%s object at %p>`` is " "returned, where ``%s`` is replaced by the type name, and ``%p`` by the " "object's memory address." msgstr "" -#: c-api/typeobj.rst:810 +#: c-api/typeobj.rst:834 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the number protocol. These fields are documented " "in :ref:`number-structs`." msgstr "" -#: c-api/typeobj.rst:816 +#: c-api/typeobj.rst:840 msgid "" "The :c:member:`~PyTypeObject.tp_as_number` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:822 +#: c-api/typeobj.rst:846 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the sequence protocol. These fields are documented " "in :ref:`sequence-structs`." msgstr "" -#: c-api/typeobj.rst:828 +#: c-api/typeobj.rst:852 msgid "" "The :c:member:`~PyTypeObject.tp_as_sequence` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:834 +#: c-api/typeobj.rst:858 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the mapping protocol. These fields are documented " "in :ref:`mapping-structs`." msgstr "" -#: c-api/typeobj.rst:840 +#: c-api/typeobj.rst:864 msgid "" "The :c:member:`~PyTypeObject.tp_as_mapping` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:848 +#: c-api/typeobj.rst:872 msgid "" "An optional pointer to a function that implements the built-in function :" "func:`hash`." msgstr "" -#: c-api/typeobj.rst:851 +#: c-api/typeobj.rst:875 msgid "The signature is the same as for :c:func:`PyObject_Hash`::" msgstr "" -#: c-api/typeobj.rst:855 +#: c-api/typeobj.rst:879 msgid "" "The value ``-1`` should not be returned as a normal return value; when an " "error occurs during the computation of the hash value, the function should " "set an exception and return ``-1``." msgstr "" -#: c-api/typeobj.rst:859 +#: c-api/typeobj.rst:883 msgid "" "When this field is not set (*and* :attr:`tp_richcompare` is not set), an " "attempt to take the hash of the object raises :exc:`TypeError`. This is the " "same as setting it to :c:func:`PyObject_HashNotImplemented`." msgstr "" -#: c-api/typeobj.rst:863 +#: c-api/typeobj.rst:887 msgid "" "This field can be set explicitly to :c:func:`PyObject_HashNotImplemented` to " "block inheritance of the hash method from a parent type. This is interpreted " @@ -1546,11 +1582,11 @@ msgid "" "`PyObject_HashNotImplemented`." msgstr "" -#: c-api/typeobj.rst:1367 +#: c-api/typeobj.rst:1472 msgid "Group: :attr:`tp_hash`, :attr:`tp_richcompare`" msgstr "" -#: c-api/typeobj.rst:875 +#: c-api/typeobj.rst:899 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_richcompare`: a subtype inherits both of :c:member:`~PyTypeObject." @@ -1559,14 +1595,14 @@ msgid "" "are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:883 +#: c-api/typeobj.rst:907 msgid "" "An optional pointer to a function that implements calling the object. This " "should be ``NULL`` if the object is not callable. The signature is the same " "as for :c:func:`PyObject_Call`::" msgstr "" -#: c-api/typeobj.rst:896 +#: c-api/typeobj.rst:920 msgid "" "An optional pointer to a function that implements the built-in operation :" "func:`str`. (Note that :class:`str` is a type now, and :func:`str` calls " @@ -1575,11 +1611,11 @@ msgid "" "this handler.)" msgstr "" -#: c-api/typeobj.rst:901 +#: c-api/typeobj.rst:925 msgid "The signature is the same as for :c:func:`PyObject_Str`::" msgstr "" -#: c-api/typeobj.rst:905 +#: c-api/typeobj.rst:929 msgid "" "The function must return a string or a Unicode object. It should be a " "\"friendly\" string representation of the object, as this is the " @@ -1587,28 +1623,28 @@ msgid "" "function." msgstr "" -#: c-api/typeobj.rst:915 +#: c-api/typeobj.rst:939 msgid "" "When this field is not set, :c:func:`PyObject_Repr` is called to return a " "string representation." msgstr "" -#: c-api/typeobj.rst:921 +#: c-api/typeobj.rst:945 msgid "An optional pointer to the get-attribute function." msgstr "" -#: c-api/typeobj.rst:923 +#: c-api/typeobj.rst:947 msgid "The signature is the same as for :c:func:`PyObject_GetAttr`::" msgstr "" -#: c-api/typeobj.rst:927 +#: c-api/typeobj.rst:951 msgid "" "It is usually convenient to set this field to :c:func:" "`PyObject_GenericGetAttr`, which implements the normal way of looking for " "object attributes." msgstr "" -#: c-api/typeobj.rst:934 +#: c-api/typeobj.rst:958 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_getattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " @@ -1617,15 +1653,15 @@ msgid "" "tp_getattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:940 +#: c-api/typeobj.rst:964 msgid ":c:type:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`." msgstr "" -#: c-api/typeobj.rst:947 +#: c-api/typeobj.rst:971 msgid "The signature is the same as for :c:func:`PyObject_SetAttr`::" msgstr "" -#: c-api/typeobj.rst:951 +#: c-api/typeobj.rst:975 msgid "" "In addition, setting *value* to ``NULL`` to delete an attribute must be " "supported. It is usually convenient to set this field to :c:func:" @@ -1633,7 +1669,7 @@ msgid "" "attributes." msgstr "" -#: c-api/typeobj.rst:960 +#: c-api/typeobj.rst:984 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_setattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " @@ -1642,24 +1678,24 @@ msgid "" "tp_setattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:966 +#: c-api/typeobj.rst:990 msgid ":c:type:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`." msgstr "" -#: c-api/typeobj.rst:971 +#: c-api/typeobj.rst:995 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the buffer interface. These fields are documented " "in :ref:`buffer-structs`." msgstr "" -#: c-api/typeobj.rst:977 +#: c-api/typeobj.rst:1001 msgid "" "The :c:member:`~PyTypeObject.tp_as_buffer` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:983 +#: c-api/typeobj.rst:1007 msgid "" "This field is a bit mask of various flags. Some flags indicate variant " "semantics for certain situations; others are used to indicate that certain " @@ -1671,7 +1707,7 @@ msgid "" "accessed and must be considered to have a zero or ``NULL`` value instead." msgstr "" -#: c-api/typeobj.rst:993 +#: c-api/typeobj.rst:1017 msgid "" "Inheritance of this field is complicated. Most flag bits are inherited " "individually, i.e. if the base type has a flag bit set, the subtype inherits " @@ -1686,17 +1722,17 @@ msgid "" "the subtype exist and have ``NULL`` values." msgstr "" -#: c-api/typeobj.rst:1008 +#: c-api/typeobj.rst:1032 msgid "" ":c:type:`PyBaseObject_Type` uses ``Py_TPFLAGS_DEFAULT | " "Py_TPFLAGS_BASETYPE``." msgstr "" -#: c-api/typeobj.rst:1011 +#: c-api/typeobj.rst:1035 msgid "**Bit Masks:**" msgstr "" -#: c-api/typeobj.rst:1013 +#: c-api/typeobj.rst:1037 msgid "" "The following bit masks are currently defined; these can be ORed together " "using the ``|`` operator to form the value of the :c:member:`~PyTypeObject." @@ -1705,7 +1741,7 @@ msgid "" "zero." msgstr "" -#: c-api/typeobj.rst:1020 +#: c-api/typeobj.rst:1044 msgid "" "This bit is set when the type object itself is allocated on the heap, for " "example, types created dynamically using :c:func:`PyType_FromSpec`. In this " @@ -1716,30 +1752,30 @@ msgid "" "gets INCREF'ed or DECREF'ed)." msgstr "" -#: c-api/typeobj.rst:1041 c-api/typeobj.rst:1061 c-api/typeobj.rst:1094 +#: c-api/typeobj.rst:1065 c-api/typeobj.rst:1085 c-api/typeobj.rst:1117 msgid "???" msgstr "" -#: c-api/typeobj.rst:1035 +#: c-api/typeobj.rst:1059 msgid "" "This bit is set when the type can be used as the base type of another type. " "If this bit is clear, the type cannot be subtyped (similar to a \"final\" " "class in Java)." msgstr "" -#: c-api/typeobj.rst:1046 +#: c-api/typeobj.rst:1070 msgid "" "This bit is set when the type object has been fully initialized by :c:func:" "`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1056 +#: c-api/typeobj.rst:1080 msgid "" "This bit is set while :c:func:`PyType_Ready` is in the process of " "initializing the type object." msgstr "" -#: c-api/typeobj.rst:1066 +#: c-api/typeobj.rst:1090 msgid "" "This bit is set when the object supports garbage collection. If this bit is " "set, instances must be created using :c:func:`PyObject_GC_New` and destroyed " @@ -1749,12 +1785,12 @@ msgid "" "tp_clear` are present in the type object." msgstr "" -#: c-api/typeobj.rst:1247 c-api/typeobj.rst:1308 +#: c-api/typeobj.rst:1346 c-api/typeobj.rst:1413 msgid "" "Group: :const:`Py_TPFLAGS_HAVE_GC`, :attr:`tp_traverse`, :attr:`tp_clear`" msgstr "" -#: c-api/typeobj.rst:1077 +#: c-api/typeobj.rst:1101 msgid "" "The :const:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with the :" "attr:`tp_traverse` and :attr:`tp_clear` fields, i.e. if the :const:" @@ -1763,48 +1799,48 @@ msgid "" "``NULL`` values." msgstr "" -#: c-api/typeobj.rst:1087 +#: c-api/typeobj.rst:1111 msgid "" "This is a bitmask of all the bits that pertain to the existence of certain " "fields in the type object and its extension structures. Currently, it " -"includes the following bits: :const:`Py_TPFLAGS_HAVE_STACKLESS_EXTENSION`, :" -"const:`Py_TPFLAGS_HAVE_VERSION_TAG`." +"includes the following bits: :const:`Py_TPFLAGS_HAVE_STACKLESS_EXTENSION`." msgstr "" -#: c-api/typeobj.rst:1099 +#: c-api/typeobj.rst:1122 msgid "This bit indicates that objects behave like unbound methods." msgstr "" -#: c-api/typeobj.rst:1101 +#: c-api/typeobj.rst:1124 msgid "If this flag is set for ``type(meth)``, then:" msgstr "" -#: c-api/typeobj.rst:1103 +#: c-api/typeobj.rst:1126 msgid "" "``meth.__get__(obj, cls)(*args, **kwds)`` (with ``obj`` not None) must be " "equivalent to ``meth(obj, *args, **kwds)``." msgstr "" -#: c-api/typeobj.rst:1106 +#: c-api/typeobj.rst:1129 msgid "" "``meth.__get__(None, cls)(*args, **kwds)`` must be equivalent to " "``meth(*args, **kwds)``." msgstr "" -#: c-api/typeobj.rst:1109 +#: c-api/typeobj.rst:1132 msgid "" "This flag enables an optimization for typical method calls like ``obj." "meth()``: it avoids creating a temporary \"bound method\" object for ``obj." "meth``." msgstr "" -#: c-api/typeobj.rst:1117 +#: c-api/typeobj.rst:1140 msgid "" -"This flag is never inherited by heap types. For extension types, it is " -"inherited whenever :c:member:`~PyTypeObject.tp_descr_get` is inherited." +"This flag is never inherited by types without the :const:" +"`Py_TPFLAGS_IMMUTABLETYPE` flag set. For extension types, it is inherited " +"whenever :c:member:`~PyTypeObject.tp_descr_get` is inherited." msgstr "" -#: c-api/typeobj.rst:1134 +#: c-api/typeobj.rst:1157 msgid "" "These flags are used by functions such as :c:func:`PyLong_Check` to quickly " "determine if a type is a subclass of a built-in type; such specific checks " @@ -1814,57 +1850,129 @@ msgid "" "behave differently depending on what kind of check is used." msgstr "" -#: c-api/typeobj.rst:1145 +#: c-api/typeobj.rst:1168 msgid "" "This bit is set when the :c:member:`~PyTypeObject.tp_finalize` slot is " "present in the type structure." msgstr "" -#: c-api/typeobj.rst:1150 +#: c-api/typeobj.rst:1173 msgid "" "This flag isn't necessary anymore, as the interpreter assumes the :c:member:" "`~PyTypeObject.tp_finalize` slot is always present in the type structure." msgstr "" -#: c-api/typeobj.rst:1158 +#: c-api/typeobj.rst:1181 msgid "" "This bit is set when the class implements the :ref:`vectorcall protocol " "`. See :c:member:`~PyTypeObject.tp_vectorcall_offset` for " "details." msgstr "" -#: c-api/typeobj.rst:1164 +#: c-api/typeobj.rst:1187 msgid "" -"This bit is inherited for *static* subtypes if :c:member:`~PyTypeObject." -"tp_call` is also inherited. `Heap types`_ do not inherit " -"``Py_TPFLAGS_HAVE_VECTORCALL``." +"This bit is inherited for types with the :const:`Py_TPFLAGS_IMMUTABLETYPE` " +"flag set, if :c:member:`~PyTypeObject.tp_call` is also inherited." msgstr "" -#: c-api/typeobj.rst:1173 +#: c-api/typeobj.rst:1195 +msgid "" +"This bit is set for type objects that are immutable: type attributes cannot " +"be set nor deleted." +msgstr "" + +#: c-api/typeobj.rst:1197 +msgid "" +":c:func:`PyType_Ready` automatically applies this flag to :ref:`static types " +"`." +msgstr "" + +#: c-api/typeobj.rst:1221 +msgid "This flag is not inherited." +msgstr "" + +#: c-api/typeobj.rst:1208 +msgid "" +"Disallow creating instances of the type: set :c:member:`~PyTypeObject." +"tp_new` to NULL and don't create the ``__new__`` key in the type dictionary." +msgstr "" + +#: c-api/typeobj.rst:1212 +msgid "" +"The flag must be set before creating the type, not after. For example, it " +"must be set before :c:func:`PyType_Ready` is called on the type." +msgstr "" + +#: c-api/typeobj.rst:1215 +msgid "" +"The flag is set automatically on :ref:`static types ` if :c:" +"member:`~PyTypeObject.tp_base` is NULL or ``&PyBaseObject_Type`` and :c:" +"member:`~PyTypeObject.tp_new` is NULL." +msgstr "" + +#: c-api/typeobj.rst:1228 +msgid "" +"This bit indicates that instances of the class may match mapping patterns " +"when used as the subject of a :keyword:`match` block. It is automatically " +"set when registering or subclassing :class:`collections.abc.Mapping`, and " +"unset when registering :class:`collections.abc.Sequence`." +msgstr "" + +#: c-api/typeobj.rst:1257 +msgid "" +":const:`Py_TPFLAGS_MAPPING` and :const:`Py_TPFLAGS_SEQUENCE` are mutually " +"exclusive; it is an error to enable both flags simultaneously." +msgstr "" + +#: c-api/typeobj.rst:1240 +msgid "" +"This flag is inherited by types that do not already set :const:" +"`Py_TPFLAGS_SEQUENCE`." +msgstr "" + +#: c-api/typeobj.rst:1265 +msgid ":pep:`634` -- Structural Pattern Matching: Specification" +msgstr "" + +#: c-api/typeobj.rst:1250 +msgid "" +"This bit indicates that instances of the class may match sequence patterns " +"when used as the subject of a :keyword:`match` block. It is automatically " +"set when registering or subclassing :class:`collections.abc.Sequence`, and " +"unset when registering :class:`collections.abc.Mapping`." +msgstr "" + +#: c-api/typeobj.rst:1262 +msgid "" +"This flag is inherited by types that do not already set :const:" +"`Py_TPFLAGS_MAPPING`." +msgstr "" + +#: c-api/typeobj.rst:1272 msgid "" "An optional pointer to a NUL-terminated C string giving the docstring for " "this type object. This is exposed as the :attr:`__doc__` attribute on the " "type and instances of the type." msgstr "" -#: c-api/typeobj.rst:1179 +#: c-api/typeobj.rst:1278 msgid "This field is *not* inherited by subtypes." msgstr "" -#: c-api/typeobj.rst:1184 +#: c-api/typeobj.rst:1283 msgid "" "An optional pointer to a traversal function for the garbage collector. This " "is only used if the :const:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " "signature is::" msgstr "" -#: c-api/typeobj.rst:1303 +#: c-api/typeobj.rst:1408 msgid "" "More information about Python's garbage collection scheme can be found in " "section :ref:`supporting-cycle-detection`." msgstr "" -#: c-api/typeobj.rst:1192 +#: c-api/typeobj.rst:1291 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage " "collector to detect reference cycles. A typical implementation of a :c:" @@ -1874,7 +1982,7 @@ msgid "" "`_thread` extension module::" msgstr "" -#: c-api/typeobj.rst:1207 +#: c-api/typeobj.rst:1306 msgid "" "Note that :c:func:`Py_VISIT` is called only on those members that can " "participate in reference cycles. Although there is also a ``self->key`` " @@ -1882,51 +1990,50 @@ msgid "" "part of a reference cycle." msgstr "" -#: c-api/typeobj.rst:1211 +#: c-api/typeobj.rst:1310 msgid "" "On the other hand, even if you know a member can never be part of a cycle, " "as a debugging aid you may want to visit it anyway just so the :mod:`gc` " "module's :func:`~gc.get_referents` function will include it." msgstr "" -#: c-api/typeobj.rst:1216 +#: c-api/typeobj.rst:1315 msgid "" "When implementing :c:member:`~PyTypeObject.tp_traverse`, only the members " -"that the instance *owns* (by having strong references to them) must be " -"visited. For instance, if an object supports weak references via the :c:" -"member:`~PyTypeObject.tp_weaklist` slot, the pointer supporting the linked " -"list (what *tp_weaklist* points to) must **not** be visited as the instance " -"does not directly own the weak references to itself (the weakreference list " -"is there to support the weak reference machinery, but the instance has no " -"strong reference to the elements inside it, as they are allowed to be " -"removed even if the instance is still alive)." +"that the instance *owns* (by having :term:`strong references ` to them) must be visited. For instance, if an object supports " +"weak references via the :c:member:`~PyTypeObject.tp_weaklist` slot, the " +"pointer supporting the linked list (what *tp_weaklist* points to) must " +"**not** be visited as the instance does not directly own the weak references " +"to itself (the weakreference list is there to support the weak reference " +"machinery, but the instance has no strong reference to the elements inside " +"it, as they are allowed to be removed even if the instance is still alive)." msgstr "" -#: c-api/typeobj.rst:1226 +#: c-api/typeobj.rst:1326 msgid "" "Note that :c:func:`Py_VISIT` requires the *visit* and *arg* parameters to :c:" "func:`local_traverse` to have these specific names; don't name them just " "anything." msgstr "" -#: c-api/typeobj.rst:1230 +#: c-api/typeobj.rst:1330 msgid "" -"Heap-allocated types (:const:`Py_TPFLAGS_HEAPTYPE`, such as those created " -"with :c:func:`PyType_FromSpec` and similar APIs) hold a reference to their " -"type. Their traversal function must therefore either visit :c:func:" +"Instances of :ref:`heap-allocated types ` hold a reference to " +"their type. Their traversal function must therefore either visit :c:func:" "`Py_TYPE(self) `, or delegate this responsibility by calling " "``tp_traverse`` of another heap-allocated type (such as a heap-allocated " "superclass). If they do not, the type object may not be garbage-collected." msgstr "" -#: c-api/typeobj.rst:1240 +#: c-api/typeobj.rst:1339 msgid "" "Heap-allocated types are expected to visit ``Py_TYPE(self)`` in " "``tp_traverse``. In earlier versions of Python, due to `bug 40217 `_, doing this may lead to crashes in subclasses." msgstr "" -#: c-api/typeobj.rst:1249 +#: c-api/typeobj.rst:1348 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_clear` and the :const:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:" @@ -1934,14 +2041,14 @@ msgid "" "are all inherited from the base type if they are all zero in the subtype." msgstr "" -#: c-api/typeobj.rst:1257 +#: c-api/typeobj.rst:1356 msgid "" "An optional pointer to a clear function for the garbage collector. This is " "only used if the :const:`Py_TPFLAGS_HAVE_GC` flag bit is set. The signature " "is::" msgstr "" -#: c-api/typeobj.rst:1262 +#: c-api/typeobj.rst:1361 msgid "" "The :c:member:`~PyTypeObject.tp_clear` member function is used to break " "reference cycles in cyclic garbage detected by the garbage collector. Taken " @@ -1956,7 +2063,7 @@ msgid "" "good reason to avoid implementing :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: c-api/typeobj.rst:1272 +#: c-api/typeobj.rst:1371 msgid "" "Implementations of :c:member:`~PyTypeObject.tp_clear` should drop the " "instance's references to those of its members that may be Python objects, " @@ -1964,7 +2071,7 @@ msgid "" "example::" msgstr "" -#: c-api/typeobj.rst:1286 +#: c-api/typeobj.rst:1385 msgid "" "The :c:func:`Py_CLEAR` macro should be used, because clearing references is " "delicate: the reference to the contained object must not be decremented " @@ -1979,7 +2086,15 @@ msgid "" "in a safe order." msgstr "" -#: c-api/typeobj.rst:1297 +#: c-api/typeobj.rst:1396 +msgid "" +"Note that :c:member:`~PyTypeObject.tp_clear` is not *always* called before " +"an instance is deallocated. For example, when reference counting is enough " +"to determine that an object is no longer used, the cyclic garbage collector " +"is not involved and :c:member:`~PyTypeObject.tp_dealloc` is called directly." +msgstr "" + +#: c-api/typeobj.rst:1402 msgid "" "Because the goal of :c:member:`~PyTypeObject.tp_clear` functions is to break " "reference cycles, it's not necessary to clear contained objects like Python " @@ -1989,7 +2104,7 @@ msgid "" "invoke :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: c-api/typeobj.rst:1310 +#: c-api/typeobj.rst:1415 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_traverse` and the :const:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:" @@ -1997,18 +2112,18 @@ msgid "" "are all inherited from the base type if they are all zero in the subtype." msgstr "" -#: c-api/typeobj.rst:1318 +#: c-api/typeobj.rst:1423 msgid "" "An optional pointer to the rich comparison function, whose signature is::" msgstr "" -#: c-api/typeobj.rst:1322 +#: c-api/typeobj.rst:1427 msgid "" "The first parameter is guaranteed to be an instance of the type that is " "defined by :c:type:`PyTypeObject`." msgstr "" -#: c-api/typeobj.rst:1325 +#: c-api/typeobj.rst:1430 msgid "" "The function should return the result of the comparison (usually ``Py_True`` " "or ``Py_False``). If the comparison is undefined, it must return " @@ -2016,74 +2131,74 @@ msgid "" "set an exception condition." msgstr "" -#: c-api/typeobj.rst:1330 +#: c-api/typeobj.rst:1435 msgid "" "The following constants are defined to be used as the third argument for :c:" "member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:" msgstr "" -#: c-api/typeobj.rst:1334 +#: c-api/typeobj.rst:1439 msgid "Constant" msgstr "Constante" -#: c-api/typeobj.rst:1334 +#: c-api/typeobj.rst:1439 msgid "Comparison" msgstr "Comparaison" -#: c-api/typeobj.rst:1336 +#: c-api/typeobj.rst:1441 msgid ":const:`Py_LT`" -msgstr "" +msgstr ":const:`Py_LT`" -#: c-api/typeobj.rst:1336 +#: c-api/typeobj.rst:1441 msgid "``<``" msgstr "``<``" -#: c-api/typeobj.rst:1338 +#: c-api/typeobj.rst:1443 msgid ":const:`Py_LE`" -msgstr "" +msgstr ":const:`Py_LE`" -#: c-api/typeobj.rst:1338 +#: c-api/typeobj.rst:1443 msgid "``<=``" msgstr "``<=``" -#: c-api/typeobj.rst:1340 +#: c-api/typeobj.rst:1445 msgid ":const:`Py_EQ`" -msgstr "" +msgstr ":const:`Py_EQ`" -#: c-api/typeobj.rst:1340 +#: c-api/typeobj.rst:1445 msgid "``==``" msgstr "``==``" -#: c-api/typeobj.rst:1342 +#: c-api/typeobj.rst:1447 msgid ":const:`Py_NE`" -msgstr "" +msgstr ":const:`Py_NE`" -#: c-api/typeobj.rst:1342 +#: c-api/typeobj.rst:1447 msgid "``!=``" msgstr "``!=``" -#: c-api/typeobj.rst:1344 +#: c-api/typeobj.rst:1449 msgid ":const:`Py_GT`" -msgstr "" +msgstr ":const:`Py_GT`" -#: c-api/typeobj.rst:1344 +#: c-api/typeobj.rst:1449 msgid "``>``" msgstr "``>``" -#: c-api/typeobj.rst:1346 +#: c-api/typeobj.rst:1451 msgid ":const:`Py_GE`" -msgstr "" +msgstr ":const:`Py_GE`" -#: c-api/typeobj.rst:1346 +#: c-api/typeobj.rst:1451 msgid "``>=``" msgstr "``>=``" -#: c-api/typeobj.rst:1349 +#: c-api/typeobj.rst:1454 msgid "" "The following macro is defined to ease writing rich comparison functions:" msgstr "" -#: c-api/typeobj.rst:1353 +#: c-api/typeobj.rst:1458 msgid "" "Return ``Py_True`` or ``Py_False`` from the function, depending on the " "result of a comparison. VAL_A and VAL_B must be orderable by C comparison " @@ -2091,15 +2206,15 @@ msgid "" "specifies the requested operation, as for :c:func:`PyObject_RichCompare`." msgstr "" -#: c-api/typeobj.rst:1359 +#: c-api/typeobj.rst:1464 msgid "The return value's reference count is properly incremented." msgstr "" -#: c-api/typeobj.rst:1361 +#: c-api/typeobj.rst:1466 msgid "On error, sets an exception and returns ``NULL`` from the function." msgstr "" -#: c-api/typeobj.rst:1369 +#: c-api/typeobj.rst:1474 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_hash`: a subtype inherits :c:member:`~PyTypeObject.tp_richcompare` and :c:" @@ -2107,7 +2222,7 @@ msgid "" "tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:1376 +#: c-api/typeobj.rst:1481 msgid "" ":c:type:`PyBaseObject_Type` provides a :attr:`tp_richcompare` " "implementation, which may be inherited. However, if only :attr:`tp_hash` is " @@ -2115,7 +2230,7 @@ msgid "" "will not be able to participate in any comparisons." msgstr "" -#: c-api/typeobj.rst:1385 +#: c-api/typeobj.rst:1490 msgid "" "If the instances of this type are weakly referenceable, this field is " "greater than zero and contains the offset in the instance structure of the " @@ -2125,13 +2240,13 @@ msgid "" "`PyObject*` which is initialized to ``NULL``." msgstr "" -#: c-api/typeobj.rst:1392 +#: c-api/typeobj.rst:1497 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that " "is the list head for weak references to the type object itself." msgstr "" -#: c-api/typeobj.rst:1397 +#: c-api/typeobj.rst:1502 msgid "" "This field is inherited by subtypes, but see the rules listed below. A " "subtype may override this offset; this means that the subtype uses a " @@ -2140,7 +2255,7 @@ msgid "" "not be a problem." msgstr "" -#: c-api/typeobj.rst:1402 +#: c-api/typeobj.rst:1507 msgid "" "When a type defined by a class statement has no :attr:`~object.__slots__` " "declaration, and none of its base types are weakly referenceable, the type " @@ -2149,7 +2264,7 @@ msgid "" "tp_weaklistoffset` of that slot's offset." msgstr "" -#: c-api/typeobj.rst:1407 +#: c-api/typeobj.rst:1512 msgid "" "When a type's :attr:`__slots__` declaration contains a slot named :attr:" "`__weakref__`, that slot becomes the weak reference list head for instances " @@ -2157,31 +2272,31 @@ msgid "" "`~PyTypeObject.tp_weaklistoffset`." msgstr "" -#: c-api/typeobj.rst:1412 +#: c-api/typeobj.rst:1517 msgid "" "When a type's :attr:`__slots__` declaration does not contain a slot named :" "attr:`__weakref__`, the type inherits its :c:member:`~PyTypeObject." "tp_weaklistoffset` from its base type." msgstr "" -#: c-api/typeobj.rst:1419 +#: c-api/typeobj.rst:1524 msgid "" -"An optional pointer to a function that returns an iterator for the object. " -"Its presence normally signals that the instances of this type are iterable " -"(although sequences may be iterable without this function)." +"An optional pointer to a function that returns an :term:`iterator` for the " +"object. Its presence normally signals that the instances of this type are :" +"term:`iterable` (although sequences may be iterable without this function)." msgstr "" -#: c-api/typeobj.rst:1423 +#: c-api/typeobj.rst:1528 msgid "This function has the same signature as :c:func:`PyObject_GetIter`::" msgstr "" -#: c-api/typeobj.rst:1434 +#: c-api/typeobj.rst:1539 msgid "" -"An optional pointer to a function that returns the next item in an iterator. " -"The signature is::" +"An optional pointer to a function that returns the next item in an :term:" +"`iterator`. The signature is::" msgstr "" -#: c-api/typeobj.rst:1439 +#: c-api/typeobj.rst:1544 msgid "" "When the iterator is exhausted, it must return ``NULL``; a :exc:" "`StopIteration` exception may or may not be set. When another error occurs, " @@ -2189,74 +2304,74 @@ msgid "" "this type are iterators." msgstr "" -#: c-api/typeobj.rst:1444 +#: c-api/typeobj.rst:1549 msgid "" "Iterator types should also define the :c:member:`~PyTypeObject.tp_iter` " "function, and that function should return the iterator instance itself (not " "a new iterator instance)." msgstr "" -#: c-api/typeobj.rst:1448 +#: c-api/typeobj.rst:1553 msgid "This function has the same signature as :c:func:`PyIter_Next`." msgstr "" -#: c-api/typeobj.rst:1457 +#: c-api/typeobj.rst:1562 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMethodDef` structures, declaring regular methods of this type." msgstr "" -#: c-api/typeobj.rst:1460 +#: c-api/typeobj.rst:1565 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a method descriptor." msgstr "" -#: c-api/typeobj.rst:1465 +#: c-api/typeobj.rst:1570 msgid "" "This field is not inherited by subtypes (methods are inherited through a " "different mechanism)." msgstr "" -#: c-api/typeobj.rst:1471 +#: c-api/typeobj.rst:1576 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMemberDef` structures, declaring regular data members (fields or slots) " "of instances of this type." msgstr "" -#: c-api/typeobj.rst:1475 +#: c-api/typeobj.rst:1580 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a member descriptor." msgstr "" -#: c-api/typeobj.rst:1480 +#: c-api/typeobj.rst:1585 msgid "" "This field is not inherited by subtypes (members are inherited through a " "different mechanism)." msgstr "" -#: c-api/typeobj.rst:1486 +#: c-api/typeobj.rst:1591 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyGetSetDef` structures, declaring computed attributes of instances of this " "type." msgstr "" -#: c-api/typeobj.rst:1489 +#: c-api/typeobj.rst:1594 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a getset descriptor." msgstr "" -#: c-api/typeobj.rst:1494 +#: c-api/typeobj.rst:1599 msgid "" "This field is not inherited by subtypes (computed attributes are inherited " "through a different mechanism)." msgstr "" -#: c-api/typeobj.rst:1500 +#: c-api/typeobj.rst:1605 msgid "" "An optional pointer to a base type from which type properties are " "inherited. At this level, only single inheritance is supported; multiple " @@ -2264,7 +2379,7 @@ msgid "" "metatype." msgstr "" -#: c-api/typeobj.rst:1508 +#: c-api/typeobj.rst:1613 msgid "" "Slot initialization is subject to the rules of initializing globals. C99 " "requires the initializers to be \"address constants\". Function designators " @@ -2272,7 +2387,7 @@ msgid "" "valid C99 address constants." msgstr "" -#: c-api/typeobj.rst:1513 +#: c-api/typeobj.rst:1618 msgid "" "However, the unary '&' operator applied to a non-static variable like :c:" "func:`PyBaseObject_Type` is not required to produce an address constant. " @@ -2280,27 +2395,27 @@ msgid "" "strictly standard conforming in this particular behavior." msgstr "" -#: c-api/typeobj.rst:1519 +#: c-api/typeobj.rst:1624 msgid "" "Consequently, :c:member:`~PyTypeObject.tp_base` should be set in the " "extension module's init function." msgstr "" -#: c-api/typeobj.rst:1524 +#: c-api/typeobj.rst:1629 msgid "This field is not inherited by subtypes (obviously)." msgstr "" -#: c-api/typeobj.rst:1528 +#: c-api/typeobj.rst:1633 msgid "" "This field defaults to ``&PyBaseObject_Type`` (which to Python programmers " "is known as the type :class:`object`)." msgstr "" -#: c-api/typeobj.rst:1534 +#: c-api/typeobj.rst:1639 msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1536 +#: c-api/typeobj.rst:1641 msgid "" "This field should normally be initialized to ``NULL`` before PyType_Ready is " "called; it may also be initialized to a dictionary containing initial " @@ -2309,43 +2424,43 @@ msgid "" "they don't correspond to overloaded operations (like :meth:`__add__`)." msgstr "" -#: c-api/typeobj.rst:1544 +#: c-api/typeobj.rst:1649 msgid "" "This field is not inherited by subtypes (though the attributes defined in " "here are inherited through a different mechanism)." msgstr "" -#: c-api/typeobj.rst:1549 +#: c-api/typeobj.rst:1654 msgid "" "If this field is ``NULL``, :c:func:`PyType_Ready` will assign a new " "dictionary to it." msgstr "" -#: c-api/typeobj.rst:1554 +#: c-api/typeobj.rst:1659 msgid "" "It is not safe to use :c:func:`PyDict_SetItem` on or otherwise modify :c:" "member:`~PyTypeObject.tp_dict` with the dictionary C-API." msgstr "" -#: c-api/typeobj.rst:1560 +#: c-api/typeobj.rst:1665 msgid "An optional pointer to a \"descriptor get\" function." msgstr "" -#: c-api/typeobj.rst:1578 c-api/typeobj.rst:1690 c-api/typeobj.rst:1714 +#: c-api/typeobj.rst:1683 c-api/typeobj.rst:1795 c-api/typeobj.rst:1819 msgid "The function signature is::" msgstr "" -#: c-api/typeobj.rst:1575 +#: c-api/typeobj.rst:1680 msgid "" "An optional pointer to a function for setting and deleting a descriptor's " "value." msgstr "" -#: c-api/typeobj.rst:1582 +#: c-api/typeobj.rst:1687 msgid "The *value* argument is set to ``NULL`` to delete the value." msgstr "" -#: c-api/typeobj.rst:1593 +#: c-api/typeobj.rst:1698 msgid "" "If the instances of this type have a dictionary containing instance " "variables, this field is non-zero and contains the offset in the instances " @@ -2353,13 +2468,13 @@ msgid "" "func:`PyObject_GenericGetAttr`." msgstr "" -#: c-api/typeobj.rst:1598 +#: c-api/typeobj.rst:1703 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_dict`; that is " "the dictionary for attributes of the type object itself." msgstr "" -#: c-api/typeobj.rst:1601 +#: c-api/typeobj.rst:1706 msgid "" "If the value of this field is greater than zero, it specifies the offset " "from the start of the instance structure. If the value is less than zero, " @@ -2375,13 +2490,13 @@ msgid "" "the very end of the structure." msgstr "" -#: c-api/typeobj.rst:1613 +#: c-api/typeobj.rst:1718 msgid "" "The real dictionary offset in an instance can be computed from a negative :c:" "member:`~PyTypeObject.tp_dictoffset` as follows::" msgstr "" -#: c-api/typeobj.rst:1620 +#: c-api/typeobj.rst:1725 msgid "" "where :c:member:`~PyTypeObject.tp_basicsize`, :c:member:`~PyTypeObject." "tp_itemsize` and :c:member:`~PyTypeObject.tp_dictoffset` are taken from the " @@ -2391,7 +2506,7 @@ msgid "" "it is done for you by :c:func:`_PyObject_GetDictPtr`.)" msgstr "" -#: c-api/typeobj.rst:1628 +#: c-api/typeobj.rst:1733 msgid "" "This field is inherited by subtypes, but see the rules listed below. A " "subtype may override this offset; this means that the subtype instances " @@ -2400,7 +2515,7 @@ msgid "" "should not be a problem." msgstr "" -#: c-api/typeobj.rst:1633 +#: c-api/typeobj.rst:1738 msgid "" "When a type defined by a class statement has no :attr:`~object.__slots__` " "declaration, and none of its base types has an instance variable dictionary, " @@ -2408,14 +2523,14 @@ msgid "" "`~PyTypeObject.tp_dictoffset` is set to that slot's offset." msgstr "" -#: c-api/typeobj.rst:1638 +#: c-api/typeobj.rst:1743 msgid "" "When a type defined by a class statement has a :attr:`__slots__` " "declaration, the type inherits its :c:member:`~PyTypeObject.tp_dictoffset` " "from its base type." msgstr "" -#: c-api/typeobj.rst:1641 +#: c-api/typeobj.rst:1746 msgid "" "(Adding a slot named :attr:`~object.__dict__` to the :attr:`__slots__` " "declaration does not have the expected effect, it just causes confusion. " @@ -2423,17 +2538,17 @@ msgid "" "though.)" msgstr "" -#: c-api/typeobj.rst:1647 +#: c-api/typeobj.rst:1752 msgid "" -"This slot has no default. For static types, if the field is ``NULL`` then " -"no :attr:`__dict__` gets created for instances." +"This slot has no default. For :ref:`static types `, if the " +"field is ``NULL`` then no :attr:`__dict__` gets created for instances." msgstr "" -#: c-api/typeobj.rst:1653 +#: c-api/typeobj.rst:1758 msgid "An optional pointer to an instance initialization function." msgstr "" -#: c-api/typeobj.rst:1655 +#: c-api/typeobj.rst:1760 msgid "" "This function corresponds to the :meth:`__init__` method of classes. Like :" "meth:`__init__`, it is possible to create an instance without calling :meth:" @@ -2441,14 +2556,14 @@ msgid "" "meth:`__init__` method again." msgstr "" -#: c-api/typeobj.rst:1664 +#: c-api/typeobj.rst:1769 msgid "" "The self argument is the instance to be initialized; the *args* and *kwds* " "arguments represent positional and keyword arguments of the call to :meth:" "`__init__`." msgstr "" -#: c-api/typeobj.rst:1668 +#: c-api/typeobj.rst:1773 msgid "" "The :c:member:`~PyTypeObject.tp_init` function, if not ``NULL``, is called " "when an instance is created normally by calling its type, after the type's :" @@ -2460,42 +2575,43 @@ msgid "" "subtype's :c:member:`~PyTypeObject.tp_init` is called." msgstr "" -#: c-api/typeobj.rst:1675 +#: c-api/typeobj.rst:1780 msgid "Returns ``0`` on success, ``-1`` and sets an exception on error." msgstr "" -#: c-api/typeobj.rst:1683 -msgid "For static types this field does not have a default." +#: c-api/typeobj.rst:1788 +msgid "" +"For :ref:`static types ` this field does not have a default." msgstr "" -#: c-api/typeobj.rst:1688 +#: c-api/typeobj.rst:1793 msgid "An optional pointer to an instance allocation function." msgstr "" -#: c-api/typeobj.rst:1696 +#: c-api/typeobj.rst:1801 msgid "" "This field is inherited by static subtypes, but not by dynamic subtypes " "(subtypes created by a class statement)." msgstr "" -#: c-api/typeobj.rst:1701 +#: c-api/typeobj.rst:1806 msgid "" "For dynamic subtypes, this field is always set to :c:func:" "`PyType_GenericAlloc`, to force a standard heap allocation strategy." msgstr "" -#: c-api/typeobj.rst:1705 +#: c-api/typeobj.rst:1810 msgid "" "For static subtypes, :c:type:`PyBaseObject_Type` uses :c:func:" "`PyType_GenericAlloc`. That is the recommended value for all statically " "defined types." msgstr "" -#: c-api/typeobj.rst:1712 +#: c-api/typeobj.rst:1817 msgid "An optional pointer to an instance creation function." msgstr "" -#: c-api/typeobj.rst:1718 +#: c-api/typeobj.rst:1823 msgid "" "The *subtype* argument is the type of the object being created; the *args* " "and *kwds* arguments represent positional and keyword arguments of the call " @@ -2504,7 +2620,7 @@ msgid "" "that type (but not an unrelated type)." msgstr "" -#: c-api/typeobj.rst:1724 +#: c-api/typeobj.rst:1829 msgid "" "The :c:member:`~PyTypeObject.tp_new` function should call ``subtype-" ">tp_alloc(subtype, nitems)`` to allocate space for the object, and then do " @@ -2516,54 +2632,60 @@ msgid "" "be deferred to :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: c-api/typeobj.rst:1734 +#: c-api/typeobj.rst:1837 msgid "" -"This field is inherited by subtypes, except it is not inherited by static " -"types whose :c:member:`~PyTypeObject.tp_base` is ``NULL`` or " -"``&PyBaseObject_Type``." +"Set the :const:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag to disallow creating " +"instances of the type in Python." msgstr "" -#: c-api/typeobj.rst:1739 +#: c-api/typeobj.rst:1842 msgid "" -"For static types this field has no default. This means if the slot is " -"defined as ``NULL``, the type cannot be called to create new instances; " -"presumably there is some other way to create instances, like a factory " -"function." +"This field is inherited by subtypes, except it is not inherited by :ref:" +"`static types ` whose :c:member:`~PyTypeObject.tp_base` is " +"``NULL`` or ``&PyBaseObject_Type``." +msgstr "" + +#: c-api/typeobj.rst:1848 +msgid "" +"For :ref:`static types ` this field has no default. This means " +"if the slot is defined as ``NULL``, the type cannot be called to create new " +"instances; presumably there is some other way to create instances, like a " +"factory function." msgstr "" -#: c-api/typeobj.rst:1747 +#: c-api/typeobj.rst:1856 msgid "" "An optional pointer to an instance deallocation function. Its signature is::" msgstr "" -#: c-api/typeobj.rst:1751 +#: c-api/typeobj.rst:1860 msgid "" "An initializer that is compatible with this signature is :c:func:" "`PyObject_Free`." msgstr "" -#: c-api/typeobj.rst:1755 +#: c-api/typeobj.rst:1864 msgid "" "This field is inherited by static subtypes, but not by dynamic subtypes " "(subtypes created by a class statement)" msgstr "" -#: c-api/typeobj.rst:1760 +#: c-api/typeobj.rst:1869 msgid "" "In dynamic subtypes, this field is set to a deallocator suitable to match :c:" "func:`PyType_GenericAlloc` and the value of the :const:`Py_TPFLAGS_HAVE_GC` " "flag bit." msgstr "" -#: c-api/typeobj.rst:1764 +#: c-api/typeobj.rst:1873 msgid "For static subtypes, :c:type:`PyBaseObject_Type` uses PyObject_Del." msgstr "" -#: c-api/typeobj.rst:1769 +#: c-api/typeobj.rst:1878 msgid "An optional pointer to a function called by the garbage collector." msgstr "" -#: c-api/typeobj.rst:1771 +#: c-api/typeobj.rst:1880 msgid "" "The garbage collector needs to know whether a particular object is " "collectible or not. Normally, it is sufficient to look at the object's " @@ -2575,74 +2697,74 @@ msgid "" "instance. The signature is::" msgstr "" -#: c-api/typeobj.rst:1781 +#: c-api/typeobj.rst:1890 msgid "" "(The only example of this are types themselves. The metatype, :c:data:" -"`PyType_Type`, defines this function to distinguish between statically and " -"dynamically allocated types.)" +"`PyType_Type`, defines this function to distinguish between statically and :" +"ref:`dynamically allocated types `.)" msgstr "" -#: c-api/typeobj.rst:1791 +#: c-api/typeobj.rst:1900 msgid "" "This slot has no default. If this field is ``NULL``, :const:" "`Py_TPFLAGS_HAVE_GC` is used as the functional equivalent." msgstr "" -#: c-api/typeobj.rst:1797 +#: c-api/typeobj.rst:1906 msgid "Tuple of base types." msgstr "" -#: c-api/typeobj.rst:1799 +#: c-api/typeobj.rst:1908 msgid "" "This is set for types created by a class statement. It should be ``NULL`` " "for statically defined types." msgstr "" -#: c-api/typeobj.rst:1825 c-api/typeobj.rst:1844 c-api/typeobj.rst:1858 +#: c-api/typeobj.rst:1934 c-api/typeobj.rst:1953 c-api/typeobj.rst:1967 msgid "This field is not inherited." msgstr "" -#: c-api/typeobj.rst:1809 +#: c-api/typeobj.rst:1918 msgid "" "Tuple containing the expanded set of base types, starting with the type " "itself and ending with :class:`object`, in Method Resolution Order." msgstr "" -#: c-api/typeobj.rst:1815 +#: c-api/typeobj.rst:1924 msgid "" "This field is not inherited; it is calculated fresh by :c:func:" "`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1821 +#: c-api/typeobj.rst:1930 msgid "Unused. Internal use only." msgstr "" -#: c-api/typeobj.rst:1830 +#: c-api/typeobj.rst:1939 msgid "List of weak references to subclasses. Internal use only." msgstr "" -#: c-api/typeobj.rst:1839 +#: c-api/typeobj.rst:1948 msgid "" "Weak reference list head, for weak references to this type object. Not " "inherited. Internal use only." msgstr "" -#: c-api/typeobj.rst:1849 +#: c-api/typeobj.rst:1958 msgid "" "This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead." msgstr "" -#: c-api/typeobj.rst:1854 +#: c-api/typeobj.rst:1963 msgid "Used to index into the method cache. Internal use only." msgstr "" -#: c-api/typeobj.rst:1863 +#: c-api/typeobj.rst:1972 msgid "" "An optional pointer to an instance finalization function. Its signature is::" msgstr "" -#: c-api/typeobj.rst:1867 +#: c-api/typeobj.rst:1976 msgid "" "If :c:member:`~PyTypeObject.tp_finalize` is set, the interpreter calls it " "once when finalizing an instance. It is called either from the garbage " @@ -2652,24 +2774,37 @@ msgid "" "object in a sane state." msgstr "" -#: c-api/typeobj.rst:1874 +#: c-api/typeobj.rst:1983 msgid "" ":c:member:`~PyTypeObject.tp_finalize` should not mutate the current " "exception status; therefore, a recommended way to write a non-trivial " "finalizer is::" msgstr "" -#: c-api/typeobj.rst:1891 +#: c-api/typeobj.rst:2000 msgid "" "For this field to be taken into account (even through inheritance), you must " "also set the :const:`Py_TPFLAGS_HAVE_FINALIZE` flags bit." msgstr "" -#: c-api/typeobj.rst:1900 +#: c-api/typeobj.rst:2003 +msgid "" +"Also, note that, in a garbage collected Python, :c:member:`~PyTypeObject." +"tp_dealloc` may be called from any Python thread, not just the thread which " +"created the object (if the object becomes part of a refcount cycle, that " +"cycle might be collected by a garbage collection on any thread). This is " +"not a problem for Python API calls, since the thread on which tp_dealloc is " +"called will own the Global Interpreter Lock (GIL). However, if the object " +"being destroyed in turn destroys objects from some other C or C++ library, " +"care should be taken to ensure that destroying those objects on the thread " +"which called tp_dealloc will not violate any assumptions of the library." +msgstr "" + +#: c-api/typeobj.rst:2020 msgid "\"Safe object finalization\" (:pep:`442`)" msgstr "" -#: c-api/typeobj.rst:1905 +#: c-api/typeobj.rst:2025 msgid "" "Vectorcall function to use for calls of this type object. In other words, it " "is used to implement :ref:`vectorcall ` for ``type.__call__``. " @@ -2677,98 +2812,91 @@ msgid "" "attr:`__new__` and :attr:`__init__` is used." msgstr "" -#: c-api/typeobj.rst:1913 +#: c-api/typeobj.rst:2033 msgid "This field is never inherited." msgstr "" -#: c-api/typeobj.rst:1915 +#: c-api/typeobj.rst:2035 msgid "(the field exists since 3.8 but it's only used since 3.9)" msgstr "" -#: c-api/typeobj.rst:1918 -msgid "" -"Also, note that, in a garbage collected Python, :c:member:`~PyTypeObject." -"tp_dealloc` may be called from any Python thread, not just the thread which " -"created the object (if the object becomes part of a refcount cycle, that " -"cycle might be collected by a garbage collection on any thread). This is " -"not a problem for Python API calls, since the thread on which tp_dealloc is " -"called will own the Global Interpreter Lock (GIL). However, if the object " -"being destroyed in turn destroys objects from some other C or C++ library, " -"care should be taken to ensure that destroying those objects on the thread " -"which called tp_dealloc will not violate any assumptions of the library." +#: c-api/typeobj.rst:2041 +msgid "Static Types" msgstr "" -#: c-api/typeobj.rst:1932 -msgid "Heap Types" -msgstr "" - -#: c-api/typeobj.rst:1934 +#: c-api/typeobj.rst:2043 msgid "" "Traditionally, types defined in C code are *static*, that is, a static :c:" "type:`PyTypeObject` structure is defined directly in code and initialized " "using :c:func:`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1938 +#: c-api/typeobj.rst:2047 msgid "" "This results in types that are limited relative to types defined in Python:" msgstr "" -#: c-api/typeobj.rst:1940 +#: c-api/typeobj.rst:2049 msgid "" "Static types are limited to one base, i.e. they cannot use multiple " "inheritance." msgstr "" -#: c-api/typeobj.rst:1942 +#: c-api/typeobj.rst:2051 msgid "" "Static type objects (but not necessarily their instances) are immutable. It " "is not possible to add or modify the type object's attributes from Python." msgstr "" -#: c-api/typeobj.rst:1944 +#: c-api/typeobj.rst:2053 msgid "" "Static type objects are shared across :ref:`sub-interpreters `, so they should not include any subinterpreter-" "specific state." msgstr "" -#: c-api/typeobj.rst:1948 +#: c-api/typeobj.rst:2057 msgid "" "Also, since :c:type:`PyTypeObject` is not part of the :ref:`stable ABI " "`, any extension modules using static types must be compiled for a " "specific Python minor version." msgstr "" -#: c-api/typeobj.rst:1952 +#: c-api/typeobj.rst:2065 +msgid "Heap Types" +msgstr "" + +#: c-api/typeobj.rst:2067 msgid "" -"An alternative to static types is *heap-allocated types*, or *heap types* " -"for short, which correspond closely to classes created by Python's ``class`` " -"statement." +"An alternative to :ref:`static types ` is *heap-allocated " +"types*, or *heap types* for short, which correspond closely to classes " +"created by Python's ``class`` statement. Heap types have the :const:" +"`Py_TPFLAGS_HEAPTYPE` flag set." msgstr "" -#: c-api/typeobj.rst:1956 +#: c-api/typeobj.rst:2072 msgid "" "This is done by filling a :c:type:`PyType_Spec` structure and calling :c:" -"func:`PyType_FromSpecWithBases`." +"func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`, or :c:func:" +"`PyType_FromModuleAndSpec`." msgstr "" -#: c-api/typeobj.rst:1963 +#: c-api/typeobj.rst:2080 msgid "Number Object Structures" msgstr "" -#: c-api/typeobj.rst:1970 +#: c-api/typeobj.rst:2087 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the number protocol. Each function is used by the function of " "similar name documented in the :ref:`number` section." msgstr "" -#: c-api/typeobj.rst:2300 +#: c-api/typeobj.rst:2417 msgid "Here is the structure definition::" msgstr "" -#: c-api/typeobj.rst:2023 +#: c-api/typeobj.rst:2140 msgid "" "Binary and ternary functions must check the type of all their operands, and " "implement the necessary conversions (at least one of the operands is an " @@ -2778,30 +2906,30 @@ msgid "" "and set an exception." msgstr "" -#: c-api/typeobj.rst:2032 +#: c-api/typeobj.rst:2149 msgid "" "The :c:data:`nb_reserved` field should always be ``NULL``. It was " "previously called :c:data:`nb_long`, and was renamed in Python 3.0.1." msgstr "" -#: c-api/typeobj.rst:2077 +#: c-api/typeobj.rst:2194 msgid "Mapping Object Structures" msgstr "" -#: c-api/typeobj.rst:2084 +#: c-api/typeobj.rst:2201 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the mapping protocol. It has three members:" msgstr "" -#: c-api/typeobj.rst:2089 +#: c-api/typeobj.rst:2206 msgid "" "This function is used by :c:func:`PyMapping_Size` and :c:func:" "`PyObject_Size`, and has the same signature. This slot may be set to " "``NULL`` if the object has no defined length." msgstr "" -#: c-api/typeobj.rst:2095 +#: c-api/typeobj.rst:2212 msgid "" "This function is used by :c:func:`PyObject_GetItem` and :c:func:" "`PySequence_GetSlice`, and has the same signature as :c:func:`!" @@ -2809,7 +2937,7 @@ msgid "" "`PyMapping_Check` function to return ``1``, it can be ``NULL`` otherwise." msgstr "" -#: c-api/typeobj.rst:2103 +#: c-api/typeobj.rst:2220 msgid "" "This function is used by :c:func:`PyObject_SetItem`, :c:func:" "`PyObject_DelItem`, :c:func:`PyObject_SetSlice` and :c:func:" @@ -2819,17 +2947,17 @@ msgid "" "deletion." msgstr "" -#: c-api/typeobj.rst:2114 +#: c-api/typeobj.rst:2231 msgid "Sequence Object Structures" msgstr "" -#: c-api/typeobj.rst:2121 +#: c-api/typeobj.rst:2238 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the sequence protocol." msgstr "" -#: c-api/typeobj.rst:2126 +#: c-api/typeobj.rst:2243 msgid "" "This function is used by :c:func:`PySequence_Size` and :c:func:" "`PyObject_Size`, and has the same signature. It is also used for handling " @@ -2837,21 +2965,21 @@ msgid "" "member:`~PySequenceMethods.sq_ass_item` slots." msgstr "" -#: c-api/typeobj.rst:2133 +#: c-api/typeobj.rst:2250 msgid "" "This function is used by :c:func:`PySequence_Concat` and has the same " "signature. It is also used by the ``+`` operator, after trying the numeric " "addition via the :c:member:`~PyNumberMethods.nb_add` slot." msgstr "" -#: c-api/typeobj.rst:2139 +#: c-api/typeobj.rst:2256 msgid "" "This function is used by :c:func:`PySequence_Repeat` and has the same " "signature. It is also used by the ``*`` operator, after trying numeric " "multiplication via the :c:member:`~PyNumberMethods.nb_multiply` slot." msgstr "" -#: c-api/typeobj.rst:2145 +#: c-api/typeobj.rst:2262 msgid "" "This function is used by :c:func:`PySequence_GetItem` and has the same " "signature. It is also used by :c:func:`PyObject_GetItem`, after trying the " @@ -2860,7 +2988,7 @@ msgid "" "``1``, it can be ``NULL`` otherwise." msgstr "" -#: c-api/typeobj.rst:2151 +#: c-api/typeobj.rst:2268 msgid "" "Negative indexes are handled as follows: if the :attr:`sq_length` slot is " "filled, it is called and the sequence length is used to compute a positive " @@ -2868,7 +2996,7 @@ msgid "" "the index is passed as is to the function." msgstr "" -#: c-api/typeobj.rst:2158 +#: c-api/typeobj.rst:2275 msgid "" "This function is used by :c:func:`PySequence_SetItem` and has the same " "signature. It is also used by :c:func:`PyObject_SetItem` and :c:func:" @@ -2877,14 +3005,14 @@ msgid "" "``NULL`` if the object does not support item assignment and deletion." msgstr "" -#: c-api/typeobj.rst:2167 +#: c-api/typeobj.rst:2284 msgid "" "This function may be used by :c:func:`PySequence_Contains` and has the same " "signature. This slot may be left to ``NULL``, in this case :c:func:`!" "PySequence_Contains` simply traverses the sequence until it finds a match." msgstr "" -#: c-api/typeobj.rst:2174 +#: c-api/typeobj.rst:2291 msgid "" "This function is used by :c:func:`PySequence_InPlaceConcat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -2894,7 +3022,7 @@ msgid "" "c:member:`~PyNumberMethods.nb_inplace_add` slot." msgstr "" -#: c-api/typeobj.rst:2183 +#: c-api/typeobj.rst:2300 msgid "" "This function is used by :c:func:`PySequence_InPlaceRepeat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -2904,70 +3032,70 @@ msgid "" "via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot." msgstr "" -#: c-api/typeobj.rst:2194 +#: c-api/typeobj.rst:2311 msgid "Buffer Object Structures" msgstr "" -#: c-api/typeobj.rst:2202 +#: c-api/typeobj.rst:2319 msgid "" "This structure holds pointers to the functions required by the :ref:`Buffer " "protocol `. The protocol defines how an exporter object can " "expose its internal data to consumer objects." msgstr "" -#: c-api/typeobj.rst:2257 c-api/typeobj.rst:2321 c-api/typeobj.rst:2332 +#: c-api/typeobj.rst:2374 c-api/typeobj.rst:2439 c-api/typeobj.rst:2460 msgid "The signature of this function is::" msgstr "" -#: c-api/typeobj.rst:2212 +#: c-api/typeobj.rst:2329 msgid "" "Handle a request to *exporter* to fill in *view* as specified by *flags*. " "Except for point (3), an implementation of this function MUST take these " "steps:" msgstr "" -#: c-api/typeobj.rst:2216 +#: c-api/typeobj.rst:2333 msgid "" "Check if the request can be met. If not, raise :c:data:`PyExc_BufferError`, " "set :c:data:`view->obj` to ``NULL`` and return ``-1``." msgstr "" -#: c-api/typeobj.rst:2219 +#: c-api/typeobj.rst:2336 msgid "Fill in the requested fields." msgstr "" -#: c-api/typeobj.rst:2221 +#: c-api/typeobj.rst:2338 msgid "Increment an internal counter for the number of exports." msgstr "" -#: c-api/typeobj.rst:2223 +#: c-api/typeobj.rst:2340 msgid "" "Set :c:data:`view->obj` to *exporter* and increment :c:data:`view->obj`." msgstr "" -#: c-api/typeobj.rst:2225 +#: c-api/typeobj.rst:2342 msgid "Return ``0``." msgstr "" -#: c-api/typeobj.rst:2227 +#: c-api/typeobj.rst:2344 msgid "" "If *exporter* is part of a chain or tree of buffer providers, two main " "schemes can be used:" msgstr "" -#: c-api/typeobj.rst:2230 +#: c-api/typeobj.rst:2347 msgid "" "Re-export: Each member of the tree acts as the exporting object and sets :c:" "data:`view->obj` to a new reference to itself." msgstr "" -#: c-api/typeobj.rst:2233 +#: c-api/typeobj.rst:2350 msgid "" "Redirect: The buffer request is redirected to the root object of the tree. " "Here, :c:data:`view->obj` will be a new reference to the root object." msgstr "" -#: c-api/typeobj.rst:2237 +#: c-api/typeobj.rst:2354 msgid "" "The individual fields of *view* are described in section :ref:`Buffer " "structure `, the rules how an exporter must react to " @@ -2975,7 +3103,7 @@ msgid "" "types>`." msgstr "" -#: c-api/typeobj.rst:2242 +#: c-api/typeobj.rst:2359 msgid "" "All memory pointed to in the :c:type:`Py_buffer` structure belongs to the " "exporter and must remain valid until there are no consumers left. :c:member:" @@ -2984,19 +3112,19 @@ msgid "" "internal` are read-only for the consumer." msgstr "" -#: c-api/typeobj.rst:2249 +#: c-api/typeobj.rst:2366 msgid "" ":c:func:`PyBuffer_FillInfo` provides an easy way of exposing a simple bytes " "buffer while dealing correctly with all request types." msgstr "" -#: c-api/typeobj.rst:2252 +#: c-api/typeobj.rst:2369 msgid "" ":c:func:`PyObject_GetBuffer` is the interface for the consumer that wraps " "this function." msgstr "" -#: c-api/typeobj.rst:2261 +#: c-api/typeobj.rst:2378 msgid "" "Handle a request to release the resources of the buffer. If no resources " "need to be released, :c:member:`PyBufferProcs.bf_releasebuffer` may be " @@ -3004,15 +3132,15 @@ msgid "" "these optional steps:" msgstr "" -#: c-api/typeobj.rst:2266 +#: c-api/typeobj.rst:2383 msgid "Decrement an internal counter for the number of exports." msgstr "" -#: c-api/typeobj.rst:2268 +#: c-api/typeobj.rst:2385 msgid "If the counter is ``0``, free all memory associated with *view*." msgstr "" -#: c-api/typeobj.rst:2270 +#: c-api/typeobj.rst:2387 msgid "" "The exporter MUST use the :c:member:`~Py_buffer.internal` field to keep " "track of buffer-specific resources. This field is guaranteed to remain " @@ -3020,62 +3148,68 @@ msgid "" "*view* argument." msgstr "" -#: c-api/typeobj.rst:2276 +#: c-api/typeobj.rst:2393 msgid "" "This function MUST NOT decrement :c:data:`view->obj`, since that is done " "automatically in :c:func:`PyBuffer_Release` (this scheme is useful for " "breaking reference cycles)." msgstr "" -#: c-api/typeobj.rst:2281 +#: c-api/typeobj.rst:2398 msgid "" ":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this " "function." msgstr "" -#: c-api/typeobj.rst:2289 +#: c-api/typeobj.rst:2406 msgid "Async Object Structures" msgstr "" -#: c-api/typeobj.rst:2297 +#: c-api/typeobj.rst:2414 msgid "" "This structure holds pointers to the functions required to implement :term:" "`awaitable` and :term:`asynchronous iterator` objects." msgstr "" -#: c-api/typeobj.rst:2314 +#: c-api/typeobj.rst:2432 msgid "" -"The returned object must be an iterator, i.e. :c:func:`PyIter_Check` must " -"return ``1`` for it." +"The returned object must be an :term:`iterator`, i.e. :c:func:`PyIter_Check` " +"must return ``1`` for it." msgstr "" -#: c-api/typeobj.rst:2317 +#: c-api/typeobj.rst:2435 msgid "" "This slot may be set to ``NULL`` if an object is not an :term:`awaitable`." msgstr "" -#: c-api/typeobj.rst:2325 +#: c-api/typeobj.rst:2443 msgid "" -"Must return an :term:`awaitable` object. See :meth:`__anext__` for details." +"Must return an :term:`asynchronous iterator` object. See :meth:`__anext__` " +"for details." msgstr "" -#: c-api/typeobj.rst:2327 +#: c-api/typeobj.rst:2446 msgid "" "This slot may be set to ``NULL`` if an object does not implement " "asynchronous iteration protocol." msgstr "" -#: c-api/typeobj.rst:2336 +#: c-api/typeobj.rst:2455 msgid "" "Must return an :term:`awaitable` object. See :meth:`__anext__` for details. " "This slot may be set to ``NULL``." msgstr "" -#: c-api/typeobj.rst:2343 +#: c-api/typeobj.rst:2464 +msgid "" +"See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``." +msgstr "" + +#: c-api/typeobj.rst:2473 msgid "Slot Type typedefs" msgstr "" -#: c-api/typeobj.rst:2347 +#: c-api/typeobj.rst:2477 msgid "" "The purpose of this function is to separate memory allocation from memory " "initialization. It should return a pointer to a block of memory of adequate " @@ -3089,76 +3223,80 @@ msgid "" "member:`~PyTypeObject.tp_basicsize`." msgstr "" -#: c-api/typeobj.rst:2357 +#: c-api/typeobj.rst:2487 msgid "" "This function should not do any other instance initialization, not even to " "allocate additional memory; that should be done by :c:member:`~PyTypeObject." "tp_new`." msgstr "" -#: c-api/typeobj.rst:2364 +#: c-api/typeobj.rst:2494 msgid "See :c:member:`~PyTypeObject.tp_free`." msgstr "" -#: c-api/typeobj.rst:2368 +#: c-api/typeobj.rst:2498 msgid "See :c:member:`~PyTypeObject.tp_new`." msgstr "" -#: c-api/typeobj.rst:2372 +#: c-api/typeobj.rst:2502 msgid "See :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: c-api/typeobj.rst:2376 +#: c-api/typeobj.rst:2506 msgid "See :c:member:`~PyTypeObject.tp_repr`." msgstr "" -#: c-api/typeobj.rst:2389 +#: c-api/typeobj.rst:2519 msgid "Return the value of the named attribute for the object." msgstr "" -#: c-api/typeobj.rst:2395 +#: c-api/typeobj.rst:2525 msgid "" "Set the value of the named attribute for the object. The value argument is " "set to ``NULL`` to delete the attribute." msgstr "" -#: c-api/typeobj.rst:2391 +#: c-api/typeobj.rst:2521 msgid "See :c:member:`~PyTypeObject.tp_getattro`." msgstr "" -#: c-api/typeobj.rst:2398 +#: c-api/typeobj.rst:2528 msgid "See :c:member:`~PyTypeObject.tp_setattro`." msgstr "" -#: c-api/typeobj.rst:2402 +#: c-api/typeobj.rst:2532 msgid "See :c:member:`~PyTypeObject.tp_descrget`." msgstr "" -#: c-api/typeobj.rst:2406 +#: c-api/typeobj.rst:2536 msgid "See :c:member:`~PyTypeObject.tp_descrset`." msgstr "" -#: c-api/typeobj.rst:2410 +#: c-api/typeobj.rst:2540 msgid "See :c:member:`~PyTypeObject.tp_hash`." msgstr "" -#: c-api/typeobj.rst:2414 +#: c-api/typeobj.rst:2544 msgid "See :c:member:`~PyTypeObject.tp_richcompare`." msgstr "" -#: c-api/typeobj.rst:2418 +#: c-api/typeobj.rst:2548 msgid "See :c:member:`~PyTypeObject.tp_iter`." msgstr "" -#: c-api/typeobj.rst:2422 +#: c-api/typeobj.rst:2552 msgid "See :c:member:`~PyTypeObject.tp_iternext`." msgstr "" -#: c-api/typeobj.rst:2448 +#: c-api/typeobj.rst:2566 +msgid "See :c:member:`~PyAsyncMethods.am_send`." +msgstr "" + +#: c-api/typeobj.rst:2582 msgid "Examples" msgstr "Exemples" -#: c-api/typeobj.rst:2450 +#: c-api/typeobj.rst:2584 msgid "" "The following are simple examples of Python type definitions. They include " "common usage you may encounter. Some demonstrate tricky corner cases. For " @@ -3166,30 +3304,34 @@ msgid "" "and :ref:`new-types-topics`." msgstr "" -#: c-api/typeobj.rst:2455 -msgid "A basic static type::" +#: c-api/typeobj.rst:2589 +msgid "A basic :ref:`static type `::" msgstr "" -#: c-api/typeobj.rst:2472 +#: c-api/typeobj.rst:2606 msgid "" "You may also find older code (especially in the CPython code base) with a " "more verbose initializer::" msgstr "" -#: c-api/typeobj.rst:2516 +#: c-api/typeobj.rst:2650 msgid "A type that supports weakrefs, instance dicts, and hashing::" msgstr "" -#: c-api/typeobj.rst:2543 +#: c-api/typeobj.rst:2677 msgid "" "A str subclass that cannot be subclassed and cannot be called to create " -"instances (e.g. uses a separate factory func)::" +"instances (e.g. uses a separate factory func) using :c:data:" +"`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::" msgstr "" -#: c-api/typeobj.rst:2562 -msgid "The simplest static type (with fixed-length instances)::" +#: c-api/typeobj.rst:2696 +msgid "" +"The simplest :ref:`static type ` with fixed-length instances::" msgstr "" -#: c-api/typeobj.rst:2573 -msgid "The simplest static type (with variable-length instances)::" +#: c-api/typeobj.rst:2707 +msgid "" +"The simplest :ref:`static type ` with variable-length " +"instances::" msgstr "" diff --git a/c-api/unicode.po b/c-api/unicode.po index 3093ad98d6..bd5c282bcf 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2018-10-04 12:27+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -112,8 +112,8 @@ msgstr "" #: c-api/unicode.rst:87 msgid "" -"The following APIs are really C macros and can be used to do fast checks and " -"to access internal read-only data of Unicode objects:" +"The following APIs are C macros and static inlined functions for fast checks " +"and access to internal read-only data of Unicode objects:" msgstr "" #: c-api/unicode.rst:92 @@ -183,53 +183,53 @@ msgstr "" #: c-api/unicode.rst:174 msgid "" "Write into a canonical representation *data* (as obtained with :c:func:" -"`PyUnicode_DATA`). This macro does not do any sanity checks and is intended " +"`PyUnicode_DATA`). This function performs no sanity checks, and is intended " "for usage in loops. The caller should cache the *kind* value and *data* " -"pointer as obtained from other macro calls. *index* is the index in the " -"string (starts at 0) and *value* is the new code point value which should be " +"pointer as obtained from other calls. *index* is the index in the string " +"(starts at 0) and *value* is the new code point value which should be " "written to that location." msgstr "" -#: c-api/unicode.rst:186 +#: c-api/unicode.rst:187 msgid "" "Read a code point from a canonical representation *data* (as obtained with :" "c:func:`PyUnicode_DATA`). No checks or ready calls are performed." msgstr "" -#: c-api/unicode.rst:194 +#: c-api/unicode.rst:195 msgid "" -"Read a character from a Unicode object *o*, which must be in the \"canonical" -"\" representation. This is less efficient than :c:func:`PyUnicode_READ` if " -"you do multiple consecutive reads." +"Read a character from a Unicode object *o*, which must be in the " +"\"canonical\" representation. This is less efficient than :c:func:" +"`PyUnicode_READ` if you do multiple consecutive reads." msgstr "" -#: c-api/unicode.rst:203 +#: c-api/unicode.rst:204 msgid "" "Return the maximum code point that is suitable for creating another string " "based on *o*, which must be in the \"canonical\" representation. This is " "always an approximation but more efficient than iterating over the string." msgstr "" -#: c-api/unicode.rst:212 +#: c-api/unicode.rst:213 msgid "" "Return the size of the deprecated :c:type:`Py_UNICODE` representation, in " "code units (this includes surrogate pairs as 2 units). *o* has to be a " "Unicode object (not checked)." msgstr "" -#: c-api/unicode.rst:228 c-api/unicode.rst:772 +#: c-api/unicode.rst:229 c-api/unicode.rst:752 msgid "" "Part of the old-style Unicode API, please migrate to using :c:func:" "`PyUnicode_GET_LENGTH`." msgstr "" -#: c-api/unicode.rst:223 +#: c-api/unicode.rst:224 msgid "" "Return the size of the deprecated :c:type:`Py_UNICODE` representation in " "bytes. *o* has to be a Unicode object (not checked)." msgstr "" -#: c-api/unicode.rst:234 +#: c-api/unicode.rst:235 msgid "" "Return a pointer to a :c:type:`Py_UNICODE` representation of the object. " "The returned buffer is always terminated with an extra null code point. It " @@ -239,92 +239,92 @@ msgid "" "object (not checked)." msgstr "" -#: c-api/unicode.rst:241 +#: c-api/unicode.rst:242 msgid "" -"This macro is now inefficient -- because in many cases the :c:type:" +"This function is now inefficient -- because in many cases the :c:type:" "`Py_UNICODE` representation does not exist and needs to be created -- and " "can fail (return ``NULL`` with an exception set). Try to port the code to " "use the new :c:func:`PyUnicode_nBYTE_DATA` macros or use :c:func:" "`PyUnicode_WRITE` or :c:func:`PyUnicode_READ`." msgstr "" -#: c-api/unicode.rst:250 +#: c-api/unicode.rst:251 msgid "" "Part of the old-style Unicode API, please migrate to using the :c:func:" "`PyUnicode_nBYTE_DATA` family of macros." msgstr "" -#: c-api/unicode.rst:255 +#: c-api/unicode.rst:256 msgid "" "Return ``1`` if the string is a valid identifier according to the language " "definition, section :ref:`identifiers`. Return ``0`` otherwise." msgstr "" -#: c-api/unicode.rst:258 +#: c-api/unicode.rst:259 msgid "" "The function does not call :c:func:`Py_FatalError` anymore if the string is " "not ready." msgstr "" -#: c-api/unicode.rst:264 +#: c-api/unicode.rst:265 msgid "Unicode Character Properties" msgstr "" -#: c-api/unicode.rst:266 +#: c-api/unicode.rst:267 msgid "" "Unicode provides many different character properties. The most often needed " "ones are available through these macros which are mapped to C functions " "depending on the Python configuration." msgstr "" -#: c-api/unicode.rst:273 +#: c-api/unicode.rst:274 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a whitespace character." msgstr "" -#: c-api/unicode.rst:278 +#: c-api/unicode.rst:279 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a lowercase character." msgstr "" -#: c-api/unicode.rst:283 +#: c-api/unicode.rst:284 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an uppercase character." msgstr "" -#: c-api/unicode.rst:288 +#: c-api/unicode.rst:289 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a titlecase character." msgstr "" -#: c-api/unicode.rst:293 +#: c-api/unicode.rst:294 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a linebreak character." msgstr "" -#: c-api/unicode.rst:298 +#: c-api/unicode.rst:299 msgid "Return ``1`` or ``0`` depending on whether *ch* is a decimal character." msgstr "" -#: c-api/unicode.rst:303 +#: c-api/unicode.rst:304 msgid "Return ``1`` or ``0`` depending on whether *ch* is a digit character." msgstr "" -#: c-api/unicode.rst:308 +#: c-api/unicode.rst:309 msgid "Return ``1`` or ``0`` depending on whether *ch* is a numeric character." msgstr "" -#: c-api/unicode.rst:313 +#: c-api/unicode.rst:314 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an alphabetic character." msgstr "" -#: c-api/unicode.rst:318 +#: c-api/unicode.rst:319 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an alphanumeric character." msgstr "" -#: c-api/unicode.rst:323 +#: c-api/unicode.rst:324 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a printable character. " "Nonprintable characters are those characters defined in the Unicode " @@ -335,91 +335,91 @@ msgid "" "to :data:`sys.stdout` or :data:`sys.stderr`.)" msgstr "" -#: c-api/unicode.rst:332 +#: c-api/unicode.rst:333 msgid "These APIs can be used for fast direct character conversions:" msgstr "" -#: c-api/unicode.rst:337 +#: c-api/unicode.rst:338 msgid "Return the character *ch* converted to lower case." msgstr "" -#: c-api/unicode.rst:347 c-api/unicode.rst:355 +#: c-api/unicode.rst:348 c-api/unicode.rst:356 msgid "This function uses simple case mappings." msgstr "" -#: c-api/unicode.rst:345 +#: c-api/unicode.rst:346 msgid "Return the character *ch* converted to upper case." msgstr "" -#: c-api/unicode.rst:353 +#: c-api/unicode.rst:354 msgid "Return the character *ch* converted to title case." msgstr "" -#: c-api/unicode.rst:361 +#: c-api/unicode.rst:362 msgid "" "Return the character *ch* converted to a decimal positive integer. Return " "``-1`` if this is not possible. This macro does not raise exceptions." msgstr "" -#: c-api/unicode.rst:367 +#: c-api/unicode.rst:368 msgid "" "Return the character *ch* converted to a single digit integer. Return ``-1`` " "if this is not possible. This macro does not raise exceptions." msgstr "" -#: c-api/unicode.rst:373 +#: c-api/unicode.rst:374 msgid "" "Return the character *ch* converted to a double. Return ``-1.0`` if this is " "not possible. This macro does not raise exceptions." msgstr "" -#: c-api/unicode.rst:377 +#: c-api/unicode.rst:378 msgid "These APIs can be used to work with surrogates:" msgstr "" -#: c-api/unicode.rst:381 +#: c-api/unicode.rst:382 msgid "Check if *ch* is a surrogate (``0xD800 <= ch <= 0xDFFF``)." msgstr "" -#: c-api/unicode.rst:385 +#: c-api/unicode.rst:386 msgid "Check if *ch* is a high surrogate (``0xD800 <= ch <= 0xDBFF``)." msgstr "" -#: c-api/unicode.rst:389 +#: c-api/unicode.rst:390 msgid "Check if *ch* is a low surrogate (``0xDC00 <= ch <= 0xDFFF``)." msgstr "" -#: c-api/unicode.rst:393 +#: c-api/unicode.rst:394 msgid "" "Join two surrogate characters and return a single Py_UCS4 value. *high* and " "*low* are respectively the leading and trailing surrogates in a surrogate " "pair." msgstr "" -#: c-api/unicode.rst:399 +#: c-api/unicode.rst:400 msgid "Creating and accessing Unicode strings" msgstr "" -#: c-api/unicode.rst:401 +#: c-api/unicode.rst:402 msgid "" "To create Unicode objects and access their basic sequence properties, use " "these APIs:" msgstr "" -#: c-api/unicode.rst:406 +#: c-api/unicode.rst:407 msgid "" "Create a new Unicode object. *maxchar* should be the true maximum code " "point to be placed in the string. As an approximation, it can be rounded up " "to the nearest value in the sequence 127, 255, 65535, 1114111." msgstr "" -#: c-api/unicode.rst:410 +#: c-api/unicode.rst:411 msgid "" "This is the recommended way to allocate a new Unicode object. Objects " "created using this function are not resizable." msgstr "" -#: c-api/unicode.rst:419 +#: c-api/unicode.rst:420 msgid "" "Create a new Unicode object with the given *kind* (possible values are :c:" "macro:`PyUnicode_1BYTE_KIND` etc., as returned by :c:func:" @@ -427,7 +427,15 @@ msgid "" "1, 2 or 4 bytes per character, as given by the kind." msgstr "" -#: c-api/unicode.rst:429 +#: c-api/unicode.rst:425 +msgid "" +"If necessary, the input *buffer* is copied and transformed into the " +"canonical representation. For example, if the *buffer* is a UCS4 string (:c:" +"macro:`PyUnicode_4BYTE_KIND`) and it consists only of codepoints in the UCS1 " +"range, it will be transformed into UCS1 (:c:macro:`PyUnicode_1BYTE_KIND`)." +msgstr "" + +#: c-api/unicode.rst:436 msgid "" "Create a Unicode object from the char buffer *u*. The bytes will be " "interpreted as being UTF-8 encoded. The buffer is copied into the new " @@ -435,7 +443,7 @@ msgid "" "object, i.e. modification of the data is not allowed." msgstr "" -#: c-api/unicode.rst:434 +#: c-api/unicode.rst:441 msgid "" "If *u* is ``NULL``, this function behaves like :c:func:" "`PyUnicode_FromUnicode` with the buffer set to ``NULL``. This usage is " @@ -443,12 +451,12 @@ msgid "" "Python 3.12." msgstr "" -#: c-api/unicode.rst:441 +#: c-api/unicode.rst:448 msgid "" "Create a Unicode object from a UTF-8 encoded null-terminated char buffer *u*." msgstr "" -#: c-api/unicode.rst:447 +#: c-api/unicode.rst:454 msgid "" "Take a C :c:func:`printf`\\ -style *format* string and a variable number of " "arguments, calculate the size of the resulting Python Unicode string and " @@ -457,261 +465,261 @@ msgid "" "*format* ASCII-encoded string. The following format characters are allowed:" msgstr "" -#: c-api/unicode.rst:462 +#: c-api/unicode.rst:469 msgid "Format Characters" msgstr "Caractères de format" -#: c-api/unicode.rst:462 +#: c-api/unicode.rst:469 msgid "Type" msgstr "Type" -#: c-api/unicode.rst:462 +#: c-api/unicode.rst:469 #, fuzzy msgid "Comment" msgstr "Commentaires" -#: c-api/unicode.rst:464 +#: c-api/unicode.rst:471 msgid ":attr:`%%`" -msgstr "" +msgstr ":attr:`%%`" -#: c-api/unicode.rst:464 +#: c-api/unicode.rst:471 msgid "*n/a*" msgstr "" -#: c-api/unicode.rst:464 +#: c-api/unicode.rst:471 msgid "The literal % character." msgstr "" -#: c-api/unicode.rst:466 +#: c-api/unicode.rst:473 msgid ":attr:`%c`" -msgstr "" +msgstr ":attr:`%c`" -#: c-api/unicode.rst:469 c-api/unicode.rst:505 +#: c-api/unicode.rst:476 c-api/unicode.rst:512 msgid "int" msgstr "*int*" -#: c-api/unicode.rst:466 +#: c-api/unicode.rst:473 msgid "A single character, represented as a C int." msgstr "" -#: c-api/unicode.rst:469 +#: c-api/unicode.rst:476 msgid ":attr:`%d`" -msgstr "" +msgstr ":attr:`%d`" -#: c-api/unicode.rst:469 +#: c-api/unicode.rst:476 msgid "Equivalent to ``printf(\"%d\")``. [1]_" msgstr "" -#: c-api/unicode.rst:472 +#: c-api/unicode.rst:479 msgid ":attr:`%u`" -msgstr "" +msgstr ":attr:`%u`" -#: c-api/unicode.rst:472 +#: c-api/unicode.rst:479 msgid "unsigned int" msgstr "``unsigned int``" -#: c-api/unicode.rst:472 +#: c-api/unicode.rst:479 msgid "Equivalent to ``printf(\"%u\")``. [1]_" msgstr "" -#: c-api/unicode.rst:475 +#: c-api/unicode.rst:482 msgid ":attr:`%ld`" -msgstr "" +msgstr ":attr:`%ld`" -#: c-api/unicode.rst:478 +#: c-api/unicode.rst:485 msgid "long" msgstr "" -#: c-api/unicode.rst:475 +#: c-api/unicode.rst:482 msgid "Equivalent to ``printf(\"%ld\")``. [1]_" msgstr "" -#: c-api/unicode.rst:478 +#: c-api/unicode.rst:485 msgid ":attr:`%li`" -msgstr "" +msgstr ":attr:`%li`" -#: c-api/unicode.rst:478 +#: c-api/unicode.rst:485 msgid "Equivalent to ``printf(\"%li\")``. [1]_" msgstr "" -#: c-api/unicode.rst:481 +#: c-api/unicode.rst:488 msgid ":attr:`%lu`" -msgstr "" +msgstr ":attr:`%lu`" -#: c-api/unicode.rst:481 +#: c-api/unicode.rst:488 msgid "unsigned long" msgstr "``unsigned long``" -#: c-api/unicode.rst:481 +#: c-api/unicode.rst:488 msgid "Equivalent to ``printf(\"%lu\")``. [1]_" msgstr "" -#: c-api/unicode.rst:484 +#: c-api/unicode.rst:491 msgid ":attr:`%lld`" -msgstr "" +msgstr ":attr:`%lld`" -#: c-api/unicode.rst:487 +#: c-api/unicode.rst:494 msgid "long long" msgstr "" -#: c-api/unicode.rst:484 +#: c-api/unicode.rst:491 msgid "Equivalent to ``printf(\"%lld\")``. [1]_" msgstr "" -#: c-api/unicode.rst:487 +#: c-api/unicode.rst:494 msgid ":attr:`%lli`" -msgstr "" +msgstr ":attr:`%lli`" -#: c-api/unicode.rst:487 +#: c-api/unicode.rst:494 msgid "Equivalent to ``printf(\"%lli\")``. [1]_" msgstr "" -#: c-api/unicode.rst:490 +#: c-api/unicode.rst:497 msgid ":attr:`%llu`" -msgstr "" +msgstr ":attr:`%llu`" -#: c-api/unicode.rst:490 +#: c-api/unicode.rst:497 msgid "unsigned long long" msgstr "``unsigned long long``" -#: c-api/unicode.rst:490 +#: c-api/unicode.rst:497 msgid "Equivalent to ``printf(\"%llu\")``. [1]_" msgstr "" -#: c-api/unicode.rst:493 +#: c-api/unicode.rst:500 msgid ":attr:`%zd`" -msgstr "" +msgstr ":attr:`%zd`" -#: c-api/unicode.rst:496 -msgid "Py_ssize_t" +#: c-api/unicode.rst:503 +msgid ":c:type:`\\ Py_ssize_t`" msgstr "" -#: c-api/unicode.rst:493 +#: c-api/unicode.rst:500 msgid "Equivalent to ``printf(\"%zd\")``. [1]_" msgstr "" -#: c-api/unicode.rst:496 +#: c-api/unicode.rst:503 msgid ":attr:`%zi`" -msgstr "" +msgstr ":attr:`%zi`" -#: c-api/unicode.rst:496 +#: c-api/unicode.rst:503 msgid "Equivalent to ``printf(\"%zi\")``. [1]_" msgstr "" -#: c-api/unicode.rst:499 +#: c-api/unicode.rst:506 msgid ":attr:`%zu`" -msgstr "" +msgstr ":attr:`%zu`" -#: c-api/unicode.rst:499 +#: c-api/unicode.rst:506 msgid "size_t" msgstr "" -#: c-api/unicode.rst:499 +#: c-api/unicode.rst:506 msgid "Equivalent to ``printf(\"%zu\")``. [1]_" msgstr "" -#: c-api/unicode.rst:502 +#: c-api/unicode.rst:509 msgid ":attr:`%i`" -msgstr "" +msgstr ":attr:`%i`" -#: c-api/unicode.rst:502 +#: c-api/unicode.rst:509 msgid "Equivalent to ``printf(\"%i\")``. [1]_" msgstr "" -#: c-api/unicode.rst:505 +#: c-api/unicode.rst:512 msgid ":attr:`%x`" -msgstr "" +msgstr ":attr:`%x`" -#: c-api/unicode.rst:505 +#: c-api/unicode.rst:512 msgid "Equivalent to ``printf(\"%x\")``. [1]_" msgstr "" -#: c-api/unicode.rst:508 +#: c-api/unicode.rst:515 msgid ":attr:`%s`" -msgstr "" +msgstr ":attr:`%s`" -#: c-api/unicode.rst:508 +#: c-api/unicode.rst:515 msgid "const char\\*" msgstr "" -#: c-api/unicode.rst:508 +#: c-api/unicode.rst:515 msgid "A null-terminated C character array." msgstr "" -#: c-api/unicode.rst:511 +#: c-api/unicode.rst:518 msgid ":attr:`%p`" -msgstr "" +msgstr ":attr:`%p`" -#: c-api/unicode.rst:511 +#: c-api/unicode.rst:518 msgid "const void\\*" msgstr "" -#: c-api/unicode.rst:511 +#: c-api/unicode.rst:518 msgid "" -"The hex representation of a C pointer. Mostly equivalent to ``printf(\"%p" -"\")`` except that it is guaranteed to start with the literal ``0x`` " -"regardless of what the platform's ``printf`` yields." +"The hex representation of a C pointer. Mostly equivalent to " +"``printf(\"%p\")`` except that it is guaranteed to start with the literal " +"``0x`` regardless of what the platform's ``printf`` yields." msgstr "" -#: c-api/unicode.rst:519 +#: c-api/unicode.rst:526 msgid ":attr:`%A`" -msgstr "" +msgstr ":attr:`%A`" -#: c-api/unicode.rst:522 c-api/unicode.rst:534 +#: c-api/unicode.rst:529 c-api/unicode.rst:541 msgid "PyObject\\*" msgstr "PyObject\\*" -#: c-api/unicode.rst:519 +#: c-api/unicode.rst:526 msgid "The result of calling :func:`ascii`." msgstr "" -#: c-api/unicode.rst:522 +#: c-api/unicode.rst:529 msgid ":attr:`%U`" -msgstr "" +msgstr ":attr:`%U`" -#: c-api/unicode.rst:522 +#: c-api/unicode.rst:529 #, fuzzy msgid "A Unicode object." msgstr "Un objet Unicode." -#: c-api/unicode.rst:524 +#: c-api/unicode.rst:531 msgid ":attr:`%V`" -msgstr "" +msgstr ":attr:`%V`" -#: c-api/unicode.rst:524 +#: c-api/unicode.rst:531 msgid "PyObject\\*, const char\\*" msgstr "" -#: c-api/unicode.rst:524 +#: c-api/unicode.rst:531 msgid "" "A Unicode object (which may be ``NULL``) and a null-terminated C character " "array as a second parameter (which will be used, if the first parameter is " "``NULL``)." msgstr "" -#: c-api/unicode.rst:531 +#: c-api/unicode.rst:538 msgid ":attr:`%S`" -msgstr "" +msgstr ":attr:`%S`" -#: c-api/unicode.rst:531 +#: c-api/unicode.rst:538 msgid "The result of calling :c:func:`PyObject_Str`." msgstr "" -#: c-api/unicode.rst:534 +#: c-api/unicode.rst:541 msgid ":attr:`%R`" -msgstr "" +msgstr ":attr:`%R`" -#: c-api/unicode.rst:534 +#: c-api/unicode.rst:541 msgid "The result of calling :c:func:`PyObject_Repr`." msgstr "" -#: c-api/unicode.rst:538 +#: c-api/unicode.rst:545 msgid "" "An unrecognized format character causes all the rest of the format string to " "be copied as-is to the result string, and any extra arguments discarded." msgstr "" -#: c-api/unicode.rst:542 +#: c-api/unicode.rst:549 msgid "" "The width formatter unit is number of characters rather than bytes. The " "precision formatter unit is number of bytes for ``\"%s\"`` and ``\"%V\"`` " @@ -720,37 +728,37 @@ msgid "" "``PyObject*`` argument is not ``NULL``)." msgstr "" -#: c-api/unicode.rst:548 +#: c-api/unicode.rst:555 msgid "" "For integer specifiers (d, u, ld, li, lu, lld, lli, llu, zd, zi, zu, i, x): " "the 0-conversion flag has effect even when a precision is given." msgstr "" -#: c-api/unicode.rst:551 +#: c-api/unicode.rst:558 msgid "Support for ``\"%lld\"`` and ``\"%llu\"`` added." msgstr "" -#: c-api/unicode.rst:554 +#: c-api/unicode.rst:561 msgid "Support for ``\"%li\"``, ``\"%lli\"`` and ``\"%zi\"`` added." msgstr "" -#: c-api/unicode.rst:557 +#: c-api/unicode.rst:564 msgid "" -"Support width and precision formatter for ``\"%s\"``, ``\"%A\"``, ``\"%U" -"\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"`` added." +"Support width and precision formatter for ``\"%s\"``, ``\"%A\"``, " +"``\"%U\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"`` added." msgstr "" -#: c-api/unicode.rst:564 +#: c-api/unicode.rst:571 msgid "" "Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two " "arguments." msgstr "" -#: c-api/unicode.rst:571 +#: c-api/unicode.rst:578 msgid "Decode an encoded object *obj* to a Unicode object." msgstr "" -#: c-api/unicode.rst:573 +#: c-api/unicode.rst:580 msgid "" ":class:`bytes`, :class:`bytearray` and other :term:`bytes-like objects " "` are decoded according to the given *encoding* and using " @@ -758,23 +766,23 @@ msgid "" "interface use the default values (see :ref:`builtincodecs` for details)." msgstr "" -#: c-api/unicode.rst:579 +#: c-api/unicode.rst:586 msgid "" "All other objects, including Unicode objects, cause a :exc:`TypeError` to be " "set." msgstr "" -#: c-api/unicode.rst:582 +#: c-api/unicode.rst:589 msgid "" "The API returns ``NULL`` if there was an error. The caller is responsible " "for decref'ing the returned objects." msgstr "" -#: c-api/unicode.rst:588 +#: c-api/unicode.rst:595 msgid "Return the length of the Unicode object, in code points." msgstr "" -#: c-api/unicode.rst:599 +#: c-api/unicode.rst:606 msgid "" "Copy characters from one Unicode object into another. This function " "performs character conversion when necessary and falls back to :c:func:" @@ -782,52 +790,52 @@ msgid "" "otherwise returns the number of copied characters." msgstr "" -#: c-api/unicode.rst:610 +#: c-api/unicode.rst:617 msgid "" -"Fill a string with a character: write *fill_char* into ``unicode[start:start" -"+length]``." +"Fill a string with a character: write *fill_char* into ``unicode[start:" +"start+length]``." msgstr "" -#: c-api/unicode.rst:613 +#: c-api/unicode.rst:620 msgid "" "Fail if *fill_char* is bigger than the string maximum character, or if the " "string has more than 1 reference." msgstr "" -#: c-api/unicode.rst:616 +#: c-api/unicode.rst:623 msgid "" "Return the number of written character, or return ``-1`` and raise an " "exception on error." msgstr "" -#: c-api/unicode.rst:625 +#: c-api/unicode.rst:632 msgid "" "Write a character to a string. The string must have been created through :c:" "func:`PyUnicode_New`. Since Unicode strings are supposed to be immutable, " "the string must not be shared, or have been hashed yet." msgstr "" -#: c-api/unicode.rst:629 +#: c-api/unicode.rst:636 msgid "" "This function checks that *unicode* is a Unicode object, that the index is " "not out of bounds, and that the object can be modified safely (i.e. that it " "its reference count is one)." msgstr "" -#: c-api/unicode.rst:638 +#: c-api/unicode.rst:645 msgid "" "Read a character from a string. This function checks that *unicode* is a " -"Unicode object and the index is not out of bounds, in contrast to the macro " -"version :c:func:`PyUnicode_READ_CHAR`." +"Unicode object and the index is not out of bounds, in contrast to :c:func:" +"`PyUnicode_READ_CHAR`, which performs no error checking." msgstr "" -#: c-api/unicode.rst:648 +#: c-api/unicode.rst:655 msgid "" "Return a substring of *str*, from character index *start* (included) to " "character index *end* (excluded). Negative indices are not supported." msgstr "" -#: c-api/unicode.rst:657 +#: c-api/unicode.rst:664 msgid "" "Copy the string *u* into a UCS4 buffer, including a null character, if " "*copy_null* is set. Returns ``NULL`` and sets an exception on error (in " @@ -835,7 +843,7 @@ msgid "" "*u*). *buffer* is returned on success." msgstr "" -#: c-api/unicode.rst:667 +#: c-api/unicode.rst:674 msgid "" "Copy the string *u* into a new UCS4 buffer that is allocated using :c:func:" "`PyMem_Malloc`. If this fails, ``NULL`` is returned with a :exc:" @@ -843,11 +851,11 @@ msgid "" "appended." msgstr "" -#: c-api/unicode.rst:676 +#: c-api/unicode.rst:683 msgid "Deprecated Py_UNICODE APIs" msgstr "" -#: c-api/unicode.rst:680 +#: c-api/unicode.rst:687 msgid "" "These API functions are deprecated with the implementation of :pep:`393`. " "Extension modules can continue using them, as they will not be removed in " @@ -855,7 +863,7 @@ msgid "" "and memory hits." msgstr "" -#: c-api/unicode.rst:687 +#: c-api/unicode.rst:694 msgid "" "Create a Unicode object from the Py_UNICODE buffer *u* of the given size. " "*u* may be ``NULL`` which causes the contents to be undefined. It is the " @@ -863,28 +871,28 @@ msgid "" "the new object." msgstr "" -#: c-api/unicode.rst:692 +#: c-api/unicode.rst:699 msgid "" "If the buffer is not ``NULL``, the return value might be a shared object. " "Therefore, modification of the resulting Unicode object is only allowed when " "*u* is ``NULL``." msgstr "" -#: c-api/unicode.rst:696 +#: c-api/unicode.rst:703 msgid "" "If the buffer is ``NULL``, :c:func:`PyUnicode_READY` must be called once the " "string content has been filled before using any of the access macros such " "as :c:func:`PyUnicode_KIND`." msgstr "" -#: c-api/unicode.rst:703 +#: c-api/unicode.rst:710 msgid "" "Part of the old-style Unicode API, please migrate to using :c:func:" "`PyUnicode_FromKindAndData`, :c:func:`PyUnicode_FromWideChar`, or :c:func:" "`PyUnicode_New`." msgstr "" -#: c-api/unicode.rst:708 +#: c-api/unicode.rst:715 msgid "" "Return a read-only pointer to the Unicode object's internal :c:type:" "`Py_UNICODE` buffer, or ``NULL`` on error. This will create the :c:type:" @@ -895,27 +903,14 @@ msgid "" "functions." msgstr "" -#: c-api/unicode.rst:748 +#: c-api/unicode.rst:742 msgid "" "Part of the old-style Unicode API, please migrate to using :c:func:" "`PyUnicode_AsUCS4`, :c:func:`PyUnicode_AsWideChar`, :c:func:" "`PyUnicode_ReadChar` or similar new APIs." msgstr "" -#: c-api/unicode.rst:726 -msgid "" -"Create a Unicode object by replacing all decimal digits in :c:type:" -"`Py_UNICODE` buffer of the given *size* by ASCII digits 0--9 according to " -"their decimal value. Return ``NULL`` if an exception occurs." -msgstr "" - -#: c-api/unicode.rst:732 -msgid "" -"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" -"func:`Py_UNICODE_TODECIMAL`." -msgstr "" - -#: c-api/unicode.rst:737 +#: c-api/unicode.rst:731 msgid "" "Like :c:func:`PyUnicode_AsUnicode`, but also saves the :c:func:`Py_UNICODE` " "array length (excluding the extra null terminator) in *size*. Note that the " @@ -924,74 +919,59 @@ msgid "" "functions." msgstr "" -#: c-api/unicode.rst:753 -msgid "" -"Create a copy of a Unicode string ending with a null code point. Return " -"``NULL`` and raise a :exc:`MemoryError` exception on memory allocation " -"failure, otherwise return a new allocated buffer (use :c:func:`PyMem_Free` " -"to free the buffer). Note that the resulting :c:type:`Py_UNICODE*` string " -"may contain embedded null code points, which would cause the string to be " -"truncated when used in most C functions." -msgstr "" - -#: c-api/unicode.rst:762 -msgid "" -"Please migrate to using :c:func:`PyUnicode_AsUCS4Copy` or similar new APIs." -msgstr "" - -#: c-api/unicode.rst:767 +#: c-api/unicode.rst:747 msgid "" "Return the size of the deprecated :c:type:`Py_UNICODE` representation, in " "code units (this includes surrogate pairs as 2 units)." msgstr "" -#: c-api/unicode.rst:777 +#: c-api/unicode.rst:757 msgid "" "Copy an instance of a Unicode subtype to a new true Unicode object if " "necessary. If *obj* is already a true Unicode object (not a subtype), return " "the reference with incremented refcount." msgstr "" -#: c-api/unicode.rst:781 +#: c-api/unicode.rst:761 msgid "" "Objects other than Unicode or its subtypes will cause a :exc:`TypeError`." msgstr "" -#: c-api/unicode.rst:785 +#: c-api/unicode.rst:765 msgid "Locale Encoding" msgstr "" -#: c-api/unicode.rst:787 +#: c-api/unicode.rst:767 msgid "" "The current locale encoding can be used to decode text from the operating " "system." msgstr "" -#: c-api/unicode.rst:794 +#: c-api/unicode.rst:774 msgid "" "Decode a string from UTF-8 on Android and VxWorks, or from the current " -"locale encoding on other platforms. The supported error handlers are ``" -"\"strict\"`` and ``\"surrogateescape\"`` (:pep:`383`). The decoder uses ``" -"\"strict\"`` error handler if *errors* is ``NULL``. *str* must end with a " +"locale encoding on other platforms. The supported error handlers are " +"``\"strict\"`` and ``\"surrogateescape\"`` (:pep:`383`). The decoder uses " +"``\"strict\"`` error handler if *errors* is ``NULL``. *str* must end with a " "null character but cannot contain embedded null characters." msgstr "" -#: c-api/unicode.rst:801 +#: c-api/unicode.rst:781 msgid "" "Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from :c:" "data:`Py_FileSystemDefaultEncoding` (the locale encoding read at Python " "startup)." msgstr "" -#: c-api/unicode.rst:841 -msgid "This function ignores the Python UTF-8 mode." +#: c-api/unicode.rst:821 +msgid "This function ignores the :ref:`Python UTF-8 Mode `." msgstr "" -#: c-api/unicode.rst:913 +#: c-api/unicode.rst:892 msgid "The :c:func:`Py_DecodeLocale` function." msgstr "" -#: c-api/unicode.rst:813 +#: c-api/unicode.rst:793 msgid "" "The function now also uses the current locale encoding for the " "``surrogateescape`` error handler, except on Android. Previously, :c:func:" @@ -999,32 +979,32 @@ msgid "" "locale encoding was used for ``strict``." msgstr "" -#: c-api/unicode.rst:822 +#: c-api/unicode.rst:802 msgid "" "Similar to :c:func:`PyUnicode_DecodeLocaleAndSize`, but compute the string " "length using :c:func:`strlen`." msgstr "" -#: c-api/unicode.rst:830 +#: c-api/unicode.rst:810 msgid "" "Encode a Unicode object to UTF-8 on Android and VxWorks, or to the current " -"locale encoding on other platforms. The supported error handlers are ``" -"\"strict\"`` and ``\"surrogateescape\"`` (:pep:`383`). The encoder uses ``" -"\"strict\"`` error handler if *errors* is ``NULL``. Return a :class:`bytes` " -"object. *unicode* cannot contain embedded null characters." +"locale encoding on other platforms. The supported error handlers are " +"``\"strict\"`` and ``\"surrogateescape\"`` (:pep:`383`). The encoder uses " +"``\"strict\"`` error handler if *errors* is ``NULL``. Return a :class:" +"`bytes` object. *unicode* cannot contain embedded null characters." msgstr "" -#: c-api/unicode.rst:837 +#: c-api/unicode.rst:817 msgid "" "Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to :c:data:" "`Py_FileSystemDefaultEncoding` (the locale encoding read at Python startup)." msgstr "" -#: c-api/unicode.rst:949 +#: c-api/unicode.rst:928 msgid "The :c:func:`Py_EncodeLocale` function." msgstr "" -#: c-api/unicode.rst:849 +#: c-api/unicode.rst:829 msgid "" "The function now also uses the current locale encoding for the " "``surrogateescape`` error handler, except on Android. Previously, :c:func:" @@ -1032,11 +1012,11 @@ msgid "" "locale encoding was used for ``strict``." msgstr "" -#: c-api/unicode.rst:858 +#: c-api/unicode.rst:838 msgid "File System Encoding" msgstr "" -#: c-api/unicode.rst:860 +#: c-api/unicode.rst:840 msgid "" "To encode and decode file names and other environment strings, :c:data:" "`Py_FileSystemDefaultEncoding` should be used as the encoding, and :c:data:" @@ -1046,7 +1026,7 @@ msgid "" "`PyUnicode_FSConverter` as the conversion function:" msgstr "" -#: c-api/unicode.rst:869 +#: c-api/unicode.rst:849 msgid "" "ParseTuple converter: encode :class:`str` objects -- obtained directly or " "through the :class:`os.PathLike` interface -- to :class:`bytes` using :c:" @@ -1055,18 +1035,18 @@ msgid "" "is no longer used." msgstr "" -#: c-api/unicode.rst:894 +#: c-api/unicode.rst:874 msgid "Accepts a :term:`path-like object`." msgstr "Accepte un :term:`path-like object`." -#: c-api/unicode.rst:880 +#: c-api/unicode.rst:860 msgid "" "To decode file names to :class:`str` during argument parsing, the ``\"O&\"`` " "converter should be used, passing :c:func:`PyUnicode_FSDecoder` as the " "conversion function:" msgstr "" -#: c-api/unicode.rst:886 +#: c-api/unicode.rst:866 msgid "" "ParseTuple converter: decode :class:`bytes` objects -- obtained either " "directly or indirectly through the :class:`os.PathLike` interface -- to :" @@ -1075,19 +1055,17 @@ msgid "" "which must be released when it is no longer used." msgstr "" -#: c-api/unicode.rst:900 -msgid "" -"Decode a string using :c:data:`Py_FileSystemDefaultEncoding` and the :c:data:" -"`Py_FileSystemDefaultEncodeErrors` error handler." +#: c-api/unicode.rst:880 +msgid "Decode a string from the :term:`filesystem encoding and error handler`." msgstr "" -#: c-api/unicode.rst:924 c-api/unicode.rst:940 +#: c-api/unicode.rst:903 c-api/unicode.rst:919 msgid "" "If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to the " "locale encoding." msgstr "" -#: c-api/unicode.rst:906 +#: c-api/unicode.rst:885 msgid "" ":c:data:`Py_FileSystemDefaultEncoding` is initialized at startup from the " "locale encoding and cannot be modified later. If you need to decode a string " @@ -1095,22 +1073,22 @@ msgid "" "`PyUnicode_DecodeLocaleAndSize`." msgstr "" -#: c-api/unicode.rst:929 c-api/unicode.rst:953 +#: c-api/unicode.rst:908 c-api/unicode.rst:932 msgid "Use :c:data:`Py_FileSystemDefaultEncodeErrors` error handler." msgstr "" -#: c-api/unicode.rst:921 +#: c-api/unicode.rst:900 msgid "" -"Decode a null-terminated string using :c:data:`Py_FileSystemDefaultEncoding` " -"and the :c:data:`Py_FileSystemDefaultEncodeErrors` error handler." +"Decode a null-terminated string from the :term:`filesystem encoding and " +"error handler`." msgstr "" -#: c-api/unicode.rst:927 +#: c-api/unicode.rst:906 msgid "" "Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` if you know the string length." msgstr "" -#: c-api/unicode.rst:935 +#: c-api/unicode.rst:914 msgid "" "Encode a Unicode object to :c:data:`Py_FileSystemDefaultEncoding` with the :" "c:data:`Py_FileSystemDefaultEncodeErrors` error handler, and return :class:" @@ -1118,29 +1096,29 @@ msgid "" "bytes." msgstr "" -#: c-api/unicode.rst:943 +#: c-api/unicode.rst:922 msgid "" ":c:data:`Py_FileSystemDefaultEncoding` is initialized at startup from the " "locale encoding and cannot be modified later. If you need to encode a string " "to the current locale encoding, use :c:func:`PyUnicode_EncodeLocale`." msgstr "" -#: c-api/unicode.rst:957 +#: c-api/unicode.rst:936 msgid "wchar_t Support" msgstr "" -#: c-api/unicode.rst:959 +#: c-api/unicode.rst:938 msgid ":c:type:`wchar_t` support for platforms which support it:" msgstr "" -#: c-api/unicode.rst:963 +#: c-api/unicode.rst:942 msgid "" "Create a Unicode object from the :c:type:`wchar_t` buffer *w* of the given " "*size*. Passing ``-1`` as the *size* indicates that the function must itself " "compute the length, using wcslen. Return ``NULL`` on failure." msgstr "" -#: c-api/unicode.rst:971 +#: c-api/unicode.rst:950 msgid "" "Copy the Unicode object contents into the :c:type:`wchar_t` buffer *w*. At " "most *size* :c:type:`wchar_t` characters are copied (excluding a possibly " @@ -1153,7 +1131,7 @@ msgid "" "would cause the string to be truncated when used with most C functions." msgstr "" -#: c-api/unicode.rst:984 +#: c-api/unicode.rst:963 msgid "" "Convert the Unicode object to a wide character string. The output string " "always ends with a null character. If *size* is not ``NULL``, write the " @@ -1164,38 +1142,38 @@ msgid "" "`wchar_t*` string contains null characters a :exc:`ValueError` is raised." msgstr "" -#: c-api/unicode.rst:992 +#: c-api/unicode.rst:971 msgid "" "Returns a buffer allocated by :c:func:`PyMem_Alloc` (use :c:func:" -"`PyMem_Free` to free it) on success. On error, returns ``NULL`` and *" -"\\*size* is undefined. Raises a :exc:`MemoryError` if memory allocation is " +"`PyMem_Free` to free it) on success. On error, returns ``NULL`` and " +"*\\*size* is undefined. Raises a :exc:`MemoryError` if memory allocation is " "failed." msgstr "" -#: c-api/unicode.rst:999 +#: c-api/unicode.rst:978 msgid "" "Raises a :exc:`ValueError` if *size* is ``NULL`` and the :c:type:`wchar_t*` " "string contains null characters." msgstr "" -#: c-api/unicode.rst:1007 +#: c-api/unicode.rst:986 msgid "Built-in Codecs" msgstr "" -#: c-api/unicode.rst:1009 +#: c-api/unicode.rst:988 msgid "" "Python provides a set of built-in codecs which are written in C for speed. " "All of these codecs are directly usable via the following functions." msgstr "" -#: c-api/unicode.rst:1012 +#: c-api/unicode.rst:991 msgid "" "Many of the following APIs take two arguments encoding and errors, and they " "have the same semantics as the ones of the built-in :func:`str` string " "object constructor." msgstr "" -#: c-api/unicode.rst:1016 +#: c-api/unicode.rst:995 msgid "" "Setting encoding to ``NULL`` causes the default encoding to be used which is " "UTF-8. The file system calls should use :c:func:`PyUnicode_FSConverter` for " @@ -1206,28 +1184,28 @@ msgid "" "setlocale)." msgstr "" -#: c-api/unicode.rst:1024 +#: c-api/unicode.rst:1003 msgid "" "Error handling is set by errors which may also be set to ``NULL`` meaning to " "use the default handling defined for the codec. Default error handling for " "all built-in codecs is \"strict\" (:exc:`ValueError` is raised)." msgstr "" -#: c-api/unicode.rst:1028 +#: c-api/unicode.rst:1007 msgid "" -"The codecs all use a similar interface. Only deviation from the following " +"The codecs all use a similar interface. Only deviations from the following " "generic ones are documented for simplicity." msgstr "" -#: c-api/unicode.rst:1033 +#: c-api/unicode.rst:1012 msgid "Generic Codecs" msgstr "" -#: c-api/unicode.rst:1035 +#: c-api/unicode.rst:1014 msgid "These are the generic codec APIs:" msgstr "" -#: c-api/unicode.rst:1041 +#: c-api/unicode.rst:1020 msgid "" "Create a Unicode object by decoding *size* bytes of the encoded string *s*. " "*encoding* and *errors* have the same meaning as the parameters of the same " @@ -1236,7 +1214,7 @@ msgid "" "raised by the codec." msgstr "" -#: c-api/unicode.rst:1051 +#: c-api/unicode.rst:1030 msgid "" "Encode a Unicode object and return the result as Python bytes object. " "*encoding* and *errors* have the same meaning as the parameters of the same " @@ -1245,36 +1223,21 @@ msgid "" "was raised by the codec." msgstr "" -#: c-api/unicode.rst:1061 -msgid "" -"Encode the :c:type:`Py_UNICODE` buffer *s* of the given *size* and return a " -"Python bytes object. *encoding* and *errors* have the same meaning as the " -"parameters of the same name in the Unicode :meth:`~str.encode` method. The " -"codec to be used is looked up using the Python codec registry. Return " -"``NULL`` if an exception was raised by the codec." -msgstr "" - -#: c-api/unicode.rst:1326 -msgid "" -"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" -"func:`PyUnicode_AsEncodedString`." -msgstr "" - -#: c-api/unicode.rst:1073 +#: c-api/unicode.rst:1038 msgid "UTF-8 Codecs" msgstr "" -#: c-api/unicode.rst:1075 +#: c-api/unicode.rst:1040 msgid "These are the UTF-8 codec APIs:" msgstr "" -#: c-api/unicode.rst:1080 +#: c-api/unicode.rst:1045 msgid "" "Create a Unicode object by decoding *size* bytes of the UTF-8 encoded string " "*s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1087 +#: c-api/unicode.rst:1052 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF8`. If " "*consumed* is not ``NULL``, trailing incomplete UTF-8 byte sequences will " @@ -1282,14 +1245,14 @@ msgid "" "of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1095 +#: c-api/unicode.rst:1060 msgid "" "Encode a Unicode object using UTF-8 and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1102 +#: c-api/unicode.rst:1067 msgid "" "Return a pointer to the UTF-8 encoding of the Unicode object, and store the " "size of the encoded representation (in bytes) in *size*. The *size* " @@ -1298,63 +1261,55 @@ msgid "" "regardless of whether there are any other null code points." msgstr "" -#: c-api/unicode.rst:1108 +#: c-api/unicode.rst:1073 msgid "" "In the case of an error, ``NULL`` is returned with an exception set and no " "*size* is stored." msgstr "" -#: c-api/unicode.rst:1111 +#: c-api/unicode.rst:1076 msgid "" "This caches the UTF-8 representation of the string in the Unicode object, " "and subsequent calls will return a pointer to the same buffer. The caller " -"is not responsible for deallocating the buffer." +"is not responsible for deallocating the buffer. The buffer is deallocated " +"and pointers to it become invalid when the Unicode object is garbage " +"collected." msgstr "" -#: c-api/unicode.rst:1127 +#: c-api/unicode.rst:1096 msgid "The return type is now ``const char *`` rather of ``char *``." msgstr "" -#: c-api/unicode.rst:1123 -msgid "As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size." -msgstr "" - -#: c-api/unicode.rst:1133 -msgid "" -"Encode the :c:type:`Py_UNICODE` buffer *s* of the given *size* using UTF-8 " -"and return a Python bytes object. Return ``NULL`` if an exception was " -"raised by the codec." +#: c-api/unicode.rst:1086 +msgid "This function is a part of the :ref:`limited API `." msgstr "" -#: c-api/unicode.rst:1140 -msgid "" -"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" -"func:`PyUnicode_AsUTF8String`, :c:func:`PyUnicode_AsUTF8AndSize` or :c:func:" -"`PyUnicode_AsEncodedString`." +#: c-api/unicode.rst:1092 +msgid "As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size." msgstr "" -#: c-api/unicode.rst:1144 +#: c-api/unicode.rst:1101 msgid "UTF-32 Codecs" msgstr "" -#: c-api/unicode.rst:1146 +#: c-api/unicode.rst:1103 msgid "These are the UTF-32 codec APIs:" msgstr "" -#: c-api/unicode.rst:1152 +#: c-api/unicode.rst:1109 msgid "" "Decode *size* bytes from a UTF-32 encoded buffer string and return the " "corresponding Unicode object. *errors* (if non-``NULL``) defines the error " "handling. It defaults to \"strict\"." msgstr "" -#: c-api/unicode.rst:1229 +#: c-api/unicode.rst:1163 msgid "" "If *byteorder* is non-``NULL``, the decoder starts decoding using the given " "byte order::" msgstr "" -#: c-api/unicode.rst:1163 +#: c-api/unicode.rst:1120 msgid "" "If ``*byteorder`` is zero, and the first four bytes of the input data are a " "byte order mark (BOM), the decoder switches to this byte order and the BOM " @@ -1362,21 +1317,21 @@ msgid "" "``-1`` or ``1``, any byte order mark is copied to the output." msgstr "" -#: c-api/unicode.rst:1242 +#: c-api/unicode.rst:1125 msgid "" "After completion, *\\*byteorder* is set to the current byte order at the end " "of input data." msgstr "" -#: c-api/unicode.rst:1245 +#: c-api/unicode.rst:1179 msgid "If *byteorder* is ``NULL``, the codec starts in native order mode." msgstr "" -#: c-api/unicode.rst:1209 c-api/unicode.rst:1284 +#: c-api/unicode.rst:1181 msgid "Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1179 +#: c-api/unicode.rst:1136 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF32`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF32Stateful` will not " @@ -1385,53 +1340,29 @@ msgid "" "number of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1188 +#: c-api/unicode.rst:1145 msgid "" "Return a Python byte string using the UTF-32 encoding in native byte order. " "The string always starts with a BOM mark. Error handling is \"strict\". " "Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1196 -msgid "" -"Return a Python bytes object holding the UTF-32 encoded value of the Unicode " -"data in *s*. Output is written according to the following byte order::" -msgstr "" - -#: c-api/unicode.rst:1277 -msgid "" -"If byteorder is ``0``, the output string will always start with the Unicode " -"BOM mark (U+FEFF). In the other two modes, no BOM mark is prepended." -msgstr "" - -#: c-api/unicode.rst:1206 -msgid "" -"If ``Py_UNICODE_WIDE`` is not defined, surrogate pairs will be output as a " -"single code point." -msgstr "" - -#: c-api/unicode.rst:1213 -msgid "" -"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" -"func:`PyUnicode_AsUTF32String` or :c:func:`PyUnicode_AsEncodedString`." -msgstr "" - -#: c-api/unicode.rst:1217 +#: c-api/unicode.rst:1151 msgid "UTF-16 Codecs" msgstr "" -#: c-api/unicode.rst:1219 +#: c-api/unicode.rst:1153 msgid "These are the UTF-16 codec APIs:" msgstr "" -#: c-api/unicode.rst:1225 +#: c-api/unicode.rst:1159 msgid "" "Decode *size* bytes from a UTF-16 encoded buffer string and return the " "corresponding Unicode object. *errors* (if non-``NULL``) defines the error " "handling. It defaults to \"strict\"." msgstr "" -#: c-api/unicode.rst:1236 +#: c-api/unicode.rst:1170 msgid "" "If ``*byteorder`` is zero, and the first two bytes of the input data are a " "byte order mark (BOM), the decoder switches to this byte order and the BOM " @@ -1440,7 +1371,13 @@ msgid "" "result in either a ``\\ufeff`` or a ``\\ufffe`` character)." msgstr "" -#: c-api/unicode.rst:1253 +#: c-api/unicode.rst:1176 +msgid "" +"After completion, ``*byteorder`` is set to the current byte order at the end " +"of input data." +msgstr "" + +#: c-api/unicode.rst:1187 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF16`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF16Stateful` will not " @@ -1450,47 +1387,28 @@ msgid "" "*consumed*." msgstr "" -#: c-api/unicode.rst:1262 +#: c-api/unicode.rst:1196 msgid "" "Return a Python byte string using the UTF-16 encoding in native byte order. " "The string always starts with a BOM mark. Error handling is \"strict\". " "Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1270 -msgid "" -"Return a Python bytes object holding the UTF-16 encoded value of the Unicode " -"data in *s*. Output is written according to the following byte order::" -msgstr "" - -#: c-api/unicode.rst:1280 -msgid "" -"If ``Py_UNICODE_WIDE`` is defined, a single :c:type:`Py_UNICODE` value may " -"get represented as a surrogate pair. If it is not defined, each :c:type:" -"`Py_UNICODE` values is interpreted as a UCS-2 character." -msgstr "" - -#: c-api/unicode.rst:1288 -msgid "" -"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" -"func:`PyUnicode_AsUTF16String` or :c:func:`PyUnicode_AsEncodedString`." -msgstr "" - -#: c-api/unicode.rst:1292 +#: c-api/unicode.rst:1202 msgid "UTF-7 Codecs" msgstr "" -#: c-api/unicode.rst:1294 +#: c-api/unicode.rst:1204 msgid "These are the UTF-7 codec APIs:" msgstr "" -#: c-api/unicode.rst:1299 +#: c-api/unicode.rst:1209 msgid "" "Create a Unicode object by decoding *size* bytes of the UTF-7 encoded string " "*s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1306 +#: c-api/unicode.rst:1216 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF7`. If " "*consumed* is not ``NULL``, trailing incomplete UTF-7 base-64 sections will " @@ -1498,188 +1416,120 @@ msgid "" "of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1315 -msgid "" -"Encode the :c:type:`Py_UNICODE` buffer of the given size using UTF-7 and " -"return a Python bytes object. Return ``NULL`` if an exception was raised by " -"the codec." -msgstr "" - -#: c-api/unicode.rst:1319 -msgid "" -"If *base64SetO* is nonzero, \"Set O\" (punctuation that has no otherwise " -"special meaning) will be encoded in base-64. If *base64WhiteSpace* is " -"nonzero, whitespace will be encoded in base-64. Both are set to zero for " -"the Python \"utf-7\" codec." -msgstr "" - -#: c-api/unicode.rst:1330 +#: c-api/unicode.rst:1223 msgid "Unicode-Escape Codecs" msgstr "" -#: c-api/unicode.rst:1332 +#: c-api/unicode.rst:1225 msgid "These are the \"Unicode Escape\" codec APIs:" msgstr "" -#: c-api/unicode.rst:1338 +#: c-api/unicode.rst:1231 msgid "" "Create a Unicode object by decoding *size* bytes of the Unicode-Escape " "encoded string *s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1344 +#: c-api/unicode.rst:1237 msgid "" "Encode a Unicode object using Unicode-Escape and return the result as a " "bytes object. Error handling is \"strict\". Return ``NULL`` if an " "exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1351 -msgid "" -"Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Unicode-" -"Escape and return a bytes object. Return ``NULL`` if an exception was " -"raised by the codec." -msgstr "" - -#: c-api/unicode.rst:1356 -msgid "" -"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" -"func:`PyUnicode_AsUnicodeEscapeString`." -msgstr "" - -#: c-api/unicode.rst:1360 +#: c-api/unicode.rst:1243 msgid "Raw-Unicode-Escape Codecs" msgstr "" -#: c-api/unicode.rst:1362 +#: c-api/unicode.rst:1245 msgid "These are the \"Raw Unicode Escape\" codec APIs:" msgstr "" -#: c-api/unicode.rst:1368 +#: c-api/unicode.rst:1251 msgid "" "Create a Unicode object by decoding *size* bytes of the Raw-Unicode-Escape " "encoded string *s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1374 +#: c-api/unicode.rst:1257 msgid "" "Encode a Unicode object using Raw-Unicode-Escape and return the result as a " "bytes object. Error handling is \"strict\". Return ``NULL`` if an " "exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1382 -msgid "" -"Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Raw-Unicode-" -"Escape and return a bytes object. Return ``NULL`` if an exception was " -"raised by the codec." -msgstr "" - -#: c-api/unicode.rst:1388 -msgid "" -"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" -"func:`PyUnicode_AsRawUnicodeEscapeString` or :c:func:" -"`PyUnicode_AsEncodedString`." -msgstr "" - -#: c-api/unicode.rst:1392 +#: c-api/unicode.rst:1263 msgid "Latin-1 Codecs" msgstr "" -#: c-api/unicode.rst:1394 +#: c-api/unicode.rst:1265 msgid "" "These are the Latin-1 codec APIs: Latin-1 corresponds to the first 256 " "Unicode ordinals and only these are accepted by the codecs during encoding." msgstr "" -#: c-api/unicode.rst:1400 +#: c-api/unicode.rst:1271 msgid "" "Create a Unicode object by decoding *size* bytes of the Latin-1 encoded " "string *s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1406 +#: c-api/unicode.rst:1277 msgid "" "Encode a Unicode object using Latin-1 and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1413 -msgid "" -"Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Latin-1 and " -"return a Python bytes object. Return ``NULL`` if an exception was raised by " -"the codec." -msgstr "" - -#: c-api/unicode.rst:1420 -msgid "" -"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" -"func:`PyUnicode_AsLatin1String` or :c:func:`PyUnicode_AsEncodedString`." -msgstr "" - -#: c-api/unicode.rst:1424 +#: c-api/unicode.rst:1283 msgid "ASCII Codecs" msgstr "" -#: c-api/unicode.rst:1426 +#: c-api/unicode.rst:1285 msgid "" "These are the ASCII codec APIs. Only 7-bit ASCII data is accepted. All " "other codes generate errors." msgstr "" -#: c-api/unicode.rst:1432 +#: c-api/unicode.rst:1291 msgid "" "Create a Unicode object by decoding *size* bytes of the ASCII encoded string " "*s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1438 +#: c-api/unicode.rst:1297 msgid "" "Encode a Unicode object using ASCII and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1445 -msgid "" -"Encode the :c:type:`Py_UNICODE` buffer of the given *size* using ASCII and " -"return a Python bytes object. Return ``NULL`` if an exception was raised by " -"the codec." -msgstr "" - -#: c-api/unicode.rst:1452 -msgid "" -"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" -"func:`PyUnicode_AsASCIIString` or :c:func:`PyUnicode_AsEncodedString`." -msgstr "" - -#: c-api/unicode.rst:1456 +#: c-api/unicode.rst:1303 msgid "Character Map Codecs" msgstr "" -#: c-api/unicode.rst:1458 +#: c-api/unicode.rst:1305 msgid "" "This codec is special in that it can be used to implement many different " "codecs (and this is in fact what was done to obtain most of the standard " -"codecs included in the :mod:`encodings` package). The codec uses mapping to " +"codecs included in the :mod:`encodings` package). The codec uses mappings to " "encode and decode characters. The mapping objects provided must support " "the :meth:`__getitem__` mapping interface; dictionaries and sequences work " "well." msgstr "" -#: c-api/unicode.rst:1464 +#: c-api/unicode.rst:1311 msgid "These are the mapping codec APIs:" msgstr "" -#: c-api/unicode.rst:1469 +#: c-api/unicode.rst:1316 msgid "" "Create a Unicode object by decoding *size* bytes of the encoded string *s* " "using the given *mapping* object. Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1473 +#: c-api/unicode.rst:1320 msgid "" "If *mapping* is ``NULL``, Latin-1 decoding will be applied. Else *mapping* " "must map bytes ordinals (integers in the range from 0 to 255) to Unicode " @@ -1689,14 +1539,14 @@ msgid "" "treated as undefined mappings and cause an error." msgstr "" -#: c-api/unicode.rst:1484 +#: c-api/unicode.rst:1331 msgid "" "Encode a Unicode object using the given *mapping* object and return the " "result as a bytes object. Error handling is \"strict\". Return ``NULL`` if " "an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1488 +#: c-api/unicode.rst:1335 msgid "" "The *mapping* object must map Unicode ordinal integers to bytes objects, " "integers in the range from 0 to 255 or ``None``. Unmapped character " @@ -1704,68 +1554,41 @@ msgid "" "``None`` are treated as \"undefined mapping\" and cause an error." msgstr "" -#: c-api/unicode.rst:1497 -msgid "" -"Encode the :c:type:`Py_UNICODE` buffer of the given *size* using the given " -"*mapping* object and return the result as a bytes object. Return ``NULL`` " -"if an exception was raised by the codec." -msgstr "" - -#: c-api/unicode.rst:1504 -msgid "" -"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" -"func:`PyUnicode_AsCharmapString` or :c:func:`PyUnicode_AsEncodedString`." -msgstr "" - -#: c-api/unicode.rst:1507 +#: c-api/unicode.rst:1341 msgid "The following codec API is special in that maps Unicode to Unicode." msgstr "" -#: c-api/unicode.rst:1511 +#: c-api/unicode.rst:1345 msgid "" "Translate a string by applying a character mapping table to it and return " "the resulting Unicode object. Return ``NULL`` if an exception was raised by " "the codec." msgstr "" -#: c-api/unicode.rst:1515 +#: c-api/unicode.rst:1349 msgid "" "The mapping table must map Unicode ordinal integers to Unicode ordinal " "integers or ``None`` (causing deletion of the character)." msgstr "" -#: c-api/unicode.rst:1518 +#: c-api/unicode.rst:1352 msgid "" "Mapping tables need only provide the :meth:`__getitem__` interface; " "dictionaries and sequences work well. Unmapped character ordinals (ones " "which cause a :exc:`LookupError`) are left untouched and are copied as-is." msgstr "" -#: c-api/unicode.rst:1522 +#: c-api/unicode.rst:1356 msgid "" "*errors* has the usual meaning for codecs. It may be ``NULL`` which " "indicates to use the default error handling." msgstr "" -#: c-api/unicode.rst:1529 -msgid "" -"Translate a :c:type:`Py_UNICODE` buffer of the given *size* by applying a " -"character *mapping* table to it and return the resulting Unicode object. " -"Return ``NULL`` when an exception was raised by the codec." -msgstr "" - -#: c-api/unicode.rst:1536 -msgid "" -"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" -"func:`PyUnicode_Translate`. or :ref:`generic codec based API `" -msgstr "" - -#: c-api/unicode.rst:1540 +#: c-api/unicode.rst:1361 msgid "MBCS codecs for Windows" msgstr "" -#: c-api/unicode.rst:1542 +#: c-api/unicode.rst:1363 msgid "" "These are the MBCS codec APIs. They are currently only available on Windows " "and use the Win32 MBCS converters to implement the conversions. Note that " @@ -1773,13 +1596,13 @@ msgid "" "is defined by the user settings on the machine running the codec." msgstr "" -#: c-api/unicode.rst:1549 +#: c-api/unicode.rst:1370 msgid "" "Create a Unicode object by decoding *size* bytes of the MBCS encoded string " "*s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1556 +#: c-api/unicode.rst:1377 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeMBCS`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeMBCSStateful` will not " @@ -1787,58 +1610,44 @@ msgid "" "will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1564 +#: c-api/unicode.rst:1385 msgid "" "Encode a Unicode object using MBCS and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1571 +#: c-api/unicode.rst:1392 msgid "" "Encode the Unicode object using the specified code page and return a Python " "bytes object. Return ``NULL`` if an exception was raised by the codec. Use :" "c:data:`CP_ACP` code page to get the MBCS encoder." msgstr "" -#: c-api/unicode.rst:1580 -msgid "" -"Encode the :c:type:`Py_UNICODE` buffer of the given *size* using MBCS and " -"return a Python bytes object. Return ``NULL`` if an exception was raised by " -"the codec." -msgstr "" - -#: c-api/unicode.rst:1587 -msgid "" -"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" -"func:`PyUnicode_AsMBCSString`, :c:func:`PyUnicode_EncodeCodePage` or :c:func:" -"`PyUnicode_AsEncodedString`." -msgstr "" - -#: c-api/unicode.rst:1591 +#: c-api/unicode.rst:1400 msgid "Methods & Slots" msgstr "" -#: c-api/unicode.rst:1597 +#: c-api/unicode.rst:1406 msgid "Methods and Slot Functions" msgstr "" -#: c-api/unicode.rst:1599 +#: c-api/unicode.rst:1408 msgid "" "The following APIs are capable of handling Unicode objects and strings on " "input (we refer to them as strings in the descriptions) and return Unicode " "objects or integers as appropriate." msgstr "" -#: c-api/unicode.rst:1603 +#: c-api/unicode.rst:1412 msgid "They all return ``NULL`` or ``-1`` if an exception occurs." msgstr "" -#: c-api/unicode.rst:1608 +#: c-api/unicode.rst:1417 msgid "Concat two strings giving a new Unicode string." msgstr "" -#: c-api/unicode.rst:1613 +#: c-api/unicode.rst:1422 msgid "" "Split a string giving a list of Unicode strings. If *sep* is ``NULL``, " "splitting will be done at all whitespace substrings. Otherwise, splits " @@ -1847,27 +1656,27 @@ msgid "" "list." msgstr "" -#: c-api/unicode.rst:1621 +#: c-api/unicode.rst:1430 msgid "" "Split a Unicode string at line breaks, returning a list of Unicode strings. " -"CRLF is considered to be one line break. If *keepend* is ``0``, the Line " +"CRLF is considered to be one line break. If *keepend* is ``0``, the line " "break characters are not included in the resulting strings." msgstr "" -#: c-api/unicode.rst:1628 +#: c-api/unicode.rst:1437 msgid "" "Join a sequence of strings using the given *separator* and return the " "resulting Unicode string." msgstr "" -#: c-api/unicode.rst:1635 +#: c-api/unicode.rst:1444 msgid "" "Return ``1`` if *substr* matches ``str[start:end]`` at the given tail end " "(*direction* == ``-1`` means to do a prefix match, *direction* == ``1`` a " "suffix match), ``0`` otherwise. Return ``-1`` if an error occurred." msgstr "" -#: c-api/unicode.rst:1643 +#: c-api/unicode.rst:1452 msgid "" "Return the first position of *substr* in ``str[start:end]`` using the given " "*direction* (*direction* == ``1`` means to do a forward search, *direction* " @@ -1876,7 +1685,7 @@ msgid "" "indicates that an error occurred and an exception has been set." msgstr "" -#: c-api/unicode.rst:1653 +#: c-api/unicode.rst:1462 msgid "" "Return the first position of the character *ch* in ``str[start:end]`` using " "the given *direction* (*direction* == ``1`` means to do a forward search, " @@ -1885,36 +1694,36 @@ msgid "" "``-2`` indicates that an error occurred and an exception has been set." msgstr "" -#: c-api/unicode.rst:1661 +#: c-api/unicode.rst:1470 msgid "*start* and *end* are now adjusted to behave like ``str[start:end]``." msgstr "" -#: c-api/unicode.rst:1668 +#: c-api/unicode.rst:1477 msgid "" "Return the number of non-overlapping occurrences of *substr* in ``str[start:" "end]``. Return ``-1`` if an error occurred." msgstr "" -#: c-api/unicode.rst:1675 +#: c-api/unicode.rst:1484 msgid "" "Replace at most *maxcount* occurrences of *substr* in *str* with *replstr* " "and return the resulting Unicode object. *maxcount* == ``-1`` means replace " "all occurrences." msgstr "" -#: c-api/unicode.rst:1682 +#: c-api/unicode.rst:1491 msgid "" "Compare two strings and return ``-1``, ``0``, ``1`` for less than, equal, " "and greater than, respectively." msgstr "" -#: c-api/unicode.rst:1685 +#: c-api/unicode.rst:1494 msgid "" "This function returns ``-1`` upon failure, so one should call :c:func:" "`PyErr_Occurred` to check for errors." msgstr "" -#: c-api/unicode.rst:1691 +#: c-api/unicode.rst:1500 msgid "" "Compare a Unicode object, *uni*, with *string* and return ``-1``, ``0``, " "``1`` for less than, equal, and greater than, respectively. It is best to " @@ -1922,56 +1731,56 @@ msgid "" "string as ISO-8859-1 if it contains non-ASCII characters." msgstr "" -#: c-api/unicode.rst:1696 +#: c-api/unicode.rst:1505 msgid "This function does not raise exceptions." msgstr "" -#: c-api/unicode.rst:1701 +#: c-api/unicode.rst:1510 msgid "Rich compare two Unicode strings and return one of the following:" msgstr "" -#: c-api/unicode.rst:1703 +#: c-api/unicode.rst:1512 msgid "``NULL`` in case an exception was raised" msgstr "" -#: c-api/unicode.rst:1704 +#: c-api/unicode.rst:1513 msgid ":const:`Py_True` or :const:`Py_False` for successful comparisons" msgstr "" -#: c-api/unicode.rst:1705 +#: c-api/unicode.rst:1514 msgid ":const:`Py_NotImplemented` in case the type combination is unknown" msgstr "" -#: c-api/unicode.rst:1707 +#: c-api/unicode.rst:1516 msgid "" "Possible values for *op* are :const:`Py_GT`, :const:`Py_GE`, :const:" "`Py_EQ`, :const:`Py_NE`, :const:`Py_LT`, and :const:`Py_LE`." msgstr "" -#: c-api/unicode.rst:1713 +#: c-api/unicode.rst:1522 msgid "" "Return a new string object from *format* and *args*; this is analogous to " "``format % args``." msgstr "" -#: c-api/unicode.rst:1719 +#: c-api/unicode.rst:1528 msgid "" "Check whether *element* is contained in *container* and return true or false " "accordingly." msgstr "" -#: c-api/unicode.rst:1722 +#: c-api/unicode.rst:1531 msgid "" "*element* has to coerce to a one element Unicode string. ``-1`` is returned " "if there was an error." msgstr "" -#: c-api/unicode.rst:1728 +#: c-api/unicode.rst:1537 msgid "" "Intern the argument *\\*string* in place. The argument must be the address " "of a pointer variable pointing to a Python Unicode string object. If there " -"is an existing interned string that is the same as *\\*string*, it sets *" -"\\*string* to it (decrementing the reference count of the old string object " +"is an existing interned string that is the same as *\\*string*, it sets " +"*\\*string* to it (decrementing the reference count of the old string object " "and incrementing the reference count of the interned string object), " "otherwise it leaves *\\*string* alone and interns it (incrementing its " "reference count). (Clarification: even though there is a lot of talk about " @@ -1979,7 +1788,7 @@ msgid "" "the object after the call if and only if you owned it before the call.)" msgstr "" -#: c-api/unicode.rst:1741 +#: c-api/unicode.rst:1550 msgid "" "A combination of :c:func:`PyUnicode_FromString` and :c:func:" "`PyUnicode_InternInPlace`, returning either a new Unicode string object that " diff --git a/c-api/veryhigh.po b/c-api/veryhigh.po index 0fe7861b5c..e1f3005710 100644 --- a/c-api/veryhigh.po +++ b/c-api/veryhigh.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -94,16 +94,17 @@ msgid "" "`PyRun_InteractiveLoop`, otherwise return the result of :c:func:" "`PyRun_SimpleFile`. *filename* is decoded from the filesystem encoding (:" "func:`sys.getfilesystemencoding`). If *filename* is ``NULL``, this function " -"uses ``\"???\"`` as the filename." +"uses ``\"???\"`` as the filename. If *closeit* is true, the file is closed " +"before ``PyRun_SimpleFileExFlags()`` returns." msgstr "" -#: c-api/veryhigh.rst:82 +#: c-api/veryhigh.rst:84 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleStringFlags` below, " "leaving the :c:type:`PyCompilerFlags`\\* argument set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:88 +#: c-api/veryhigh.rst:90 msgid "" "Executes the Python source code from *command* in the :mod:`__main__` module " "according to the *flags* argument. If :mod:`__main__` does not already " @@ -112,56 +113,56 @@ msgid "" "information. For the meaning of *flags*, see below." msgstr "" -#: c-api/veryhigh.rst:94 +#: c-api/veryhigh.rst:96 msgid "" "Note that if an otherwise unhandled :exc:`SystemExit` is raised, this " "function will not return ``-1``, but exit the process, as long as " "``Py_InspectFlag`` is not set." msgstr "" -#: c-api/veryhigh.rst:101 +#: c-api/veryhigh.rst:103 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, " "leaving *closeit* set to ``0`` and *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:107 +#: c-api/veryhigh.rst:109 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, " "leaving *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:113 +#: c-api/veryhigh.rst:115 msgid "" "Similar to :c:func:`PyRun_SimpleStringFlags`, but the Python source code is " "read from *fp* instead of an in-memory string. *filename* should be the name " -"of the file, it is decoded from the filesystem encoding (:func:`sys." -"getfilesystemencoding`). If *closeit* is true, the file is closed before " -"PyRun_SimpleFileExFlags returns." +"of the file, it is decoded from :term:`filesystem encoding and error " +"handler`. If *closeit* is true, the file is closed before " +"``PyRun_SimpleFileExFlags()`` returns." msgstr "" -#: c-api/veryhigh.rst:120 +#: c-api/veryhigh.rst:122 msgid "" -"On Windows, *fp* should be opened as binary mode (e.g. ``fopen(filename, \"rb" -"\")``). Otherwise, Python may not handle script file with LF line ending " +"On Windows, *fp* should be opened as binary mode (e.g. ``fopen(filename, " +"\"rb\")``). Otherwise, Python may not handle script file with LF line ending " "correctly." msgstr "" -#: c-api/veryhigh.rst:126 +#: c-api/veryhigh.rst:128 msgid "" "This is a simplified interface to :c:func:`PyRun_InteractiveOneFlags` below, " "leaving *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:132 +#: c-api/veryhigh.rst:134 msgid "" "Read and execute a single statement from a file associated with an " "interactive device according to the *flags* argument. The user will be " -"prompted using ``sys.ps1`` and ``sys.ps2``. *filename* is decoded from the " -"filesystem encoding (:func:`sys.getfilesystemencoding`)." +"prompted using ``sys.ps1`` and ``sys.ps2``. *filename* is decoded from the :" +"term:`filesystem encoding and error handler`." msgstr "" -#: c-api/veryhigh.rst:137 +#: c-api/veryhigh.rst:139 msgid "" "Returns ``0`` when the input was executed successfully, ``-1`` if there was " "an exception, or an error code from the :file:`errcode.h` include file " @@ -170,22 +171,21 @@ msgid "" "specifically if needed.)" msgstr "" -#: c-api/veryhigh.rst:146 +#: c-api/veryhigh.rst:148 msgid "" "This is a simplified interface to :c:func:`PyRun_InteractiveLoopFlags` " "below, leaving *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:152 +#: c-api/veryhigh.rst:154 msgid "" "Read and execute statements from a file associated with an interactive " "device until EOF is reached. The user will be prompted using ``sys.ps1`` " -"and ``sys.ps2``. *filename* is decoded from the filesystem encoding (:func:" -"`sys.getfilesystemencoding`). Returns ``0`` at EOF or a negative number " -"upon failure." +"and ``sys.ps2``. *filename* is decoded from the :term:`filesystem encoding " +"and error handler`. Returns ``0`` at EOF or a negative number upon failure." msgstr "" -#: c-api/veryhigh.rst:161 +#: c-api/veryhigh.rst:162 msgid "" "Can be set to point to a function with the prototype ``int func(void)``. " "The function will be called when Python's interpreter prompt is about to " @@ -195,7 +195,7 @@ msgid "" "the Python source code." msgstr "" -#: c-api/veryhigh.rst:172 +#: c-api/veryhigh.rst:173 msgid "" "Can be set to point to a function with the prototype ``char *func(FILE " "*stdin, FILE *stdout, char *prompt)``, overriding the default function used " @@ -206,13 +206,13 @@ msgid "" "line-editing and tab-completion features." msgstr "" -#: c-api/veryhigh.rst:181 +#: c-api/veryhigh.rst:182 msgid "" "The result must be a string allocated by :c:func:`PyMem_RawMalloc` or :c:" "func:`PyMem_RawRealloc`, or ``NULL`` if an error occurred." msgstr "" -#: c-api/veryhigh.rst:184 +#: c-api/veryhigh.rst:185 msgid "" "The result must be allocated by :c:func:`PyMem_RawMalloc` or :c:func:" "`PyMem_RawRealloc`, instead of being allocated by :c:func:`PyMem_Malloc` or :" @@ -221,46 +221,11 @@ msgstr "" #: c-api/veryhigh.rst:192 msgid "" -"This is a simplified interface to :c:func:" -"`PyParser_SimpleParseStringFlagsFilename` below, leaving *filename* set to " -"``NULL`` and *flags* set to ``0``." -msgstr "" - -#: c-api/veryhigh.rst:201 -msgid "" -"This is a simplified interface to :c:func:" -"`PyParser_SimpleParseStringFlagsFilename` below, leaving *filename* set to " -"``NULL``." -msgstr "" - -#: c-api/veryhigh.rst:210 -msgid "" -"Parse Python source code from *str* using the start token *start* according " -"to the *flags* argument. The result can be used to create a code object " -"which can be evaluated efficiently. This is useful if a code fragment must " -"be evaluated many times. *filename* is decoded from the filesystem encoding " -"(:func:`sys.getfilesystemencoding`)." -msgstr "" - -#: c-api/veryhigh.rst:221 -msgid "" -"This is a simplified interface to :c:func:`PyParser_SimpleParseFileFlags` " -"below, leaving *flags* set to ``0``." -msgstr "" - -#: c-api/veryhigh.rst:229 -msgid "" -"Similar to :c:func:`PyParser_SimpleParseStringFlagsFilename`, but the Python " -"source code is read from *fp* instead of an in-memory string." -msgstr "" - -#: c-api/veryhigh.rst:237 -msgid "" "This is a simplified interface to :c:func:`PyRun_StringFlags` below, leaving " "*flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:243 +#: c-api/veryhigh.rst:198 msgid "" "Execute Python source code from *str* in the context specified by the " "objects *globals* and *locals* with the compiler flags specified by " @@ -269,52 +234,52 @@ msgid "" "token that should be used to parse the source code." msgstr "" -#: c-api/veryhigh.rst:249 +#: c-api/veryhigh.rst:204 msgid "" "Returns the result of executing the code as a Python object, or ``NULL`` if " "an exception was raised." msgstr "" -#: c-api/veryhigh.rst:255 +#: c-api/veryhigh.rst:210 msgid "" "This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " "*closeit* set to ``0`` and *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:261 +#: c-api/veryhigh.rst:216 msgid "" "This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " "*flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:267 +#: c-api/veryhigh.rst:222 msgid "" "This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " "*closeit* set to ``0``." msgstr "" -#: c-api/veryhigh.rst:273 +#: c-api/veryhigh.rst:228 msgid "" "Similar to :c:func:`PyRun_StringFlags`, but the Python source code is read " "from *fp* instead of an in-memory string. *filename* should be the name of " -"the file, it is decoded from the filesystem encoding (:func:`sys." -"getfilesystemencoding`). If *closeit* is true, the file is closed before :c:" -"func:`PyRun_FileExFlags` returns." +"the file, it is decoded from the :term:`filesystem encoding and error " +"handler`. If *closeit* is true, the file is closed before :c:func:" +"`PyRun_FileExFlags` returns." msgstr "" -#: c-api/veryhigh.rst:282 +#: c-api/veryhigh.rst:237 msgid "" "This is a simplified interface to :c:func:`Py_CompileStringFlags` below, " "leaving *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:288 +#: c-api/veryhigh.rst:243 msgid "" "This is a simplified interface to :c:func:`Py_CompileStringExFlags` below, " "with *optimize* set to ``-1``." msgstr "" -#: c-api/veryhigh.rst:294 +#: c-api/veryhigh.rst:249 msgid "" "Parse and compile the Python source code in *str*, returning the resulting " "code object. The start token is given by *start*; this can be used to " @@ -325,7 +290,7 @@ msgid "" "returns ``NULL`` if the code cannot be parsed or compiled." msgstr "" -#: c-api/veryhigh.rst:302 +#: c-api/veryhigh.rst:257 msgid "" "The integer *optimize* specifies the optimization level of the compiler; a " "value of ``-1`` selects the optimization level of the interpreter as given " @@ -334,20 +299,20 @@ msgid "" "or ``2`` (docstrings are removed too)." msgstr "" -#: c-api/veryhigh.rst:313 +#: c-api/veryhigh.rst:268 msgid "" "Like :c:func:`Py_CompileStringObject`, but *filename* is a byte string " -"decoded from the filesystem encoding (:func:`os.fsdecode`)." +"decoded from the :term:`filesystem encoding and error handler`." msgstr "" -#: c-api/veryhigh.rst:320 +#: c-api/veryhigh.rst:275 msgid "" "This is a simplified interface to :c:func:`PyEval_EvalCodeEx`, with just the " "code object, and global and local variables. The other arguments are set to " "``NULL``." msgstr "" -#: c-api/veryhigh.rst:327 +#: c-api/veryhigh.rst:282 msgid "" "Evaluate a precompiled code object, given a particular environment for its " "evaluation. This environment consists of a dictionary of global variables, " @@ -356,22 +321,13 @@ msgid "" "only_parameter>` arguments and a closure tuple of cells." msgstr "" -#: c-api/veryhigh.rst:336 -#, fuzzy -msgid "" -"The C structure of the objects used to describe frame objects. The fields of " -"this type are subject to change at any time." -msgstr "" -"La structure C utilisée pour décrire les objets *Code*. Les attributs de " -"cette structure sont sujets à changer à tout moment." - -#: c-api/veryhigh.rst:342 +#: c-api/veryhigh.rst:291 msgid "" "Evaluate an execution frame. This is a simplified interface to :c:func:" "`PyEval_EvalFrameEx`, for backward compatibility." msgstr "" -#: c-api/veryhigh.rst:348 +#: c-api/veryhigh.rst:297 msgid "" "This is the main, unvarnished function of Python interpretation. The code " "object associated with the execution frame *f* is executed, interpreting " @@ -381,7 +337,7 @@ msgid "" "of generator objects." msgstr "" -#: c-api/veryhigh.rst:355 +#: c-api/veryhigh.rst:304 msgid "" "This function now includes a debug assertion to help ensure that it does not " "silently discard an active exception." @@ -389,33 +345,33 @@ msgstr "" "Cette fonction inclut maintenant une assertion de débogage afin d'assurer " "qu'elle ne passe pas sous silence une exception active." -#: c-api/veryhigh.rst:362 +#: c-api/veryhigh.rst:311 msgid "" "This function changes the flags of the current evaluation frame, and returns " "true on success, false on failure." msgstr "" -#: c-api/veryhigh.rst:370 +#: c-api/veryhigh.rst:319 msgid "" "The start symbol from the Python grammar for isolated expressions; for use " "with :c:func:`Py_CompileString`." msgstr "" -#: c-api/veryhigh.rst:378 +#: c-api/veryhigh.rst:327 msgid "" "The start symbol from the Python grammar for sequences of statements as read " "from a file or other source; for use with :c:func:`Py_CompileString`. This " "is the symbol to use when compiling arbitrarily long Python source code." msgstr "" -#: c-api/veryhigh.rst:387 +#: c-api/veryhigh.rst:336 msgid "" "The start symbol from the Python grammar for a single statement; for use " "with :c:func:`Py_CompileString`. This is the symbol used for the interactive " "interpreter loop." msgstr "" -#: c-api/veryhigh.rst:394 +#: c-api/veryhigh.rst:343 msgid "" "This is the structure used to hold compiler flags. In cases where code is " "only being compiled, it is passed as ``int flags``, and in cases where code " @@ -423,35 +379,43 @@ msgid "" "case, ``from __future__ import`` can modify *flags*." msgstr "" -#: c-api/veryhigh.rst:399 +#: c-api/veryhigh.rst:348 msgid "" "Whenever ``PyCompilerFlags *flags`` is ``NULL``, :attr:`cf_flags` is treated " "as equal to ``0``, and any modification due to ``from __future__ import`` is " "discarded." msgstr "" -#: c-api/veryhigh.rst:405 +#: c-api/veryhigh.rst:354 msgid "Compiler flags." msgstr "" -#: c-api/veryhigh.rst:409 +#: c-api/veryhigh.rst:358 msgid "" "*cf_feature_version* is the minor Python version. It should be initialized " "to ``PY_MINOR_VERSION``." msgstr "" -#: c-api/veryhigh.rst:412 +#: c-api/veryhigh.rst:361 msgid "" "The field is ignored by default, it is used if and only if ``PyCF_ONLY_AST`` " "flag is set in *cf_flags*." msgstr "" -#: c-api/veryhigh.rst:415 +#: c-api/veryhigh.rst:364 msgid "Added *cf_feature_version* field." msgstr "" -#: c-api/veryhigh.rst:421 +#: c-api/veryhigh.rst:370 msgid "" "This bit can be set in *flags* to cause division operator ``/`` to be " "interpreted as \"true division\" according to :pep:`238`." msgstr "" + +#, fuzzy +#~ msgid "" +#~ "The C structure of the objects used to describe frame objects. The fields " +#~ "of this type are subject to change at any time." +#~ msgstr "" +#~ "La structure C utilisée pour décrire les objets *Code*. Les attributs de " +#~ "cette structure sont sujets à changer à tout moment." diff --git a/c-api/weakref.po b/c-api/weakref.po index 903485d4fe..6e36f0e5b6 100644 --- a/c-api/weakref.po +++ b/c-api/weakref.po @@ -5,8 +5,8 @@ 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-29 14:17+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2021-12-16 17:25+0100\n" "Last-Translator: Andy Kwok \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -69,7 +69,7 @@ msgstr "" "collected* en anglais) ; il doit accepter un paramètre unique, qui est " "l'objet référence faible lui-même. *callback* peut aussi être positionné à " "``None`` ou à *NULL*. Si *ob* n'est pas un objet faiblement référençable, " -"ou si *callback* n'est pas appelable, ``None``` ou *NULL*, ceci retourne " +"ou si *callback* n'est pas appelable, ``None`` ou *NULL*, ceci retourne " "*NULL* et lève une :exc:`TypeError`." #: c-api/weakref.rst:44 @@ -90,8 +90,8 @@ msgstr "" "paramètre, *callback*, peut être un objet appelable qui reçoit une " "notification lorsque *ob* est collecté ; il doit accepter un seul paramètre, " "qui sera l'objet de référence faible lui-même. *callback* peut aussi être " -"``None`` ou *NULLL*. Si *ob* n'est pas un objet faiblement référençable, ou " -"si *callback* n'est pas appelable, ``None``` ou *NULL*, ceci renvoie *NULL* " +"``None`` ou *NULL*. Si *ob* n'est pas un objet faiblement référençable, ou " +"si *callback* n'est pas appelable, ``None`` ou *NULL*, ceci renvoie *NULL* " "et lève une :exc:`TypeError`." #: c-api/weakref.rst:56 @@ -103,10 +103,12 @@ msgstr "" "référence n'existe plus, alors l'objet renvoie :const:`Py_None`." #: c-api/weakref.rst:61 +#, fuzzy msgid "" -"This function returns a **borrowed reference** to the referenced object. " +"This function returns a :term:`borrowed reference` to the referenced object. " "This means that you should always call :c:func:`Py_INCREF` on the object " -"except if you know that it cannot be destroyed while you are still using it." +"except when it cannot be destroyed before the last usage of the borrowed " +"reference." msgstr "" "Cette fonction renvoie une **référence empruntée** à l'objet référencé. Cela " "signifie que vous devez toujours appeler :c:func:`Py_INCREF` sur l'objet " @@ -114,9 +116,8 @@ msgstr "" "encore." #: c-api/weakref.rst:69 -msgid "" -"Similar to :c:func:`PyWeakref_GetObject`, but implemented as a macro that " -"does no error checking." +#, fuzzy +msgid "Similar to :c:func:`PyWeakref_GetObject`, but does no error checking." msgstr "" "Similaire à :c:func:`PyWeakref_GetObject`, mais implémenté comme une macro " "qui ne vérifie pas les erreurs." diff --git a/copyright.po b/copyright.po index 96aaceeadc..ad505fb760 100644 --- a/copyright.po +++ b/copyright.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" -"PO-Revision-Date: 2021-01-28 14:22+0100\n" -"Last-Translator: Jules Lasne \n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2022-04-07 14:48-0400\n" +"Last-Translator: Jean-Michel Laprise \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.2\n" +"X-Generator: Poedit 3.0.1\n" #: copyright.rst:3 msgid "Copyright" @@ -24,9 +24,9 @@ msgid "Python and this documentation is:" msgstr "Python et cette documentation sont :" #: copyright.rst:7 -msgid "Copyright © 2001-2021 Python Software Foundation. All rights reserved." +msgid "Copyright © 2001-2022 Python Software Foundation. All rights reserved." msgstr "" -"Copyright © 2001-2021 Python Software Foundation. Tous droits réservés." +"Copyright © 2001-2022 Python Software Foundation. Tous droits réservés." #: copyright.rst:9 msgid "Copyright © 2000 BeOpen.com. All rights reserved." diff --git a/dict b/dict index b967430053..e577577936 100644 --- a/dict +++ b/dict @@ -5,9 +5,11 @@ -uplets 017f 212a +abi ahlstrom allocateur allocateurs +alpn base16 base32 base64 @@ -23,6 +25,7 @@ c99 chacha20 cadriciel cadriciels +capturants catucci cobjects composabilité @@ -34,6 +37,7 @@ contribués coroutine coroutines cpython +CSV curryfication cython d'allocateurs @@ -51,6 +55,7 @@ déserialise déserialiser déserialiseur déserialiseurs +désérialisation désérialiseur désérialiseurs déserialisées @@ -63,6 +68,7 @@ désérialisées Distutils encodable ethnomathématiques +Excel farrugia finaliseur frederik @@ -70,6 +76,7 @@ fredrik freeze glibc guido +gzip hachabilité hachable hachables @@ -100,8 +107,10 @@ l'itérateur lexicographiquement lorsqu'aucune lorsqu'aucun +macos mar mar. +marshal marc-andré mersenne mertz @@ -122,8 +131,11 @@ n-ième namespace non-hachable non-hachables +npn +openssl POSIX pdb +peg pip pourcent proleptique @@ -131,6 +143,7 @@ précompilé préemptif préremplis py2exe +pybsddb pyc pychecker pydb @@ -172,6 +185,8 @@ sérialisé sérialisée sérialisées sérialisés +sqlite +sqlite3 tk tokenisation tokenisé diff --git a/distributing/index.po b/distributing/index.po index 209183aef8..7631c7f827 100644 --- a/distributing/index.po +++ b/distributing/index.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2020-02-04 09:33+0100\n" -"Last-Translator: Julien Palard \n" +"POT-Creation-Date: 2021-10-21 15:04+0200\n" +"PO-Revision-Date: 2021-12-16 02:36+0100\n" +"Last-Translator: Fipaddict \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.4\n" +"X-Generator: Poedit 3.0\n" #: distributing/index.rst:5 msgid "Distributing Python Modules" @@ -46,8 +46,8 @@ msgid "" "the common pool." msgstr "" "Cela permet aux utilisateurs de Python de partager et de collaborer " -"efficacement, bénéficiant des solutions que les autres ont déjà crées pour " -"résoudre les problèmes communs (ou même, parfois, rares !), aussi que de " +"efficacement, bénéficiant des solutions que les autres ont déjà créées pour " +"résoudre les problèmes communs (ou même, parfois, rares !), aussi que de " "partager leurs propres solutions à tous." #: distributing/index.rst:19 @@ -78,12 +78,12 @@ msgstr "Vocabulaire" #: distributing/index.rst:34 msgid "" -"the `Python Packaging Index `__ is a public repository of " +"the `Python Package Index `__ is a public repository of " "open source licensed packages made available for use by other Python users" msgstr "" -"le `Python Packaging Index `__ est un dépôt public de " +"Le `Python Package Index `__ est un dépôt public de " "paquets sous licence libre rendus disponibles par d'autres utilisateurs " -"Python" +"Python." #: distributing/index.rst:37 msgid "" @@ -94,7 +94,7 @@ msgid "" "issue trackers on both `GitHub `__ and `Bitbucket " "`__." msgstr "" -"le `Python Packaging Authority `__ est le groupe de " +"Le `Python Packaging Authority `__ est le groupe de " "développeurs et d'auteurs de documentation responsables de la maintenance et " "de l'évolution des outils standards de création de paquets, des métadonnées, " "et des formats de fichiers standards. Ils maintiennent quelques outils, " @@ -114,7 +114,7 @@ msgstr "" "ajouté à la bibliothèque standard en 1998. Bien que l'utilisation directe " "de :mod:`distutils` est progressivement supprimée, elle reste le fondement " "de l'infrastructure actuelle de construction de paquet et de distribution. " -"Au delà de rester dans la bibliothèque standard, son nom vit aussi sous " +"Au-delà de rester dans la bibliothèque standard, son nom vit aussi sous " "d'autres formes, tel que la liste de diffusion utilisée pour coordonner le " "développement et les standards de la création de paquet." @@ -128,7 +128,7 @@ msgid "" "standards across a wide range of Python versions." msgstr "" "`setuptools`_, d'abord publié en 2004, est (en grande partie) le remplaçant " -"de :mod:`distutils`. La nouveauté la plus notable, au delà des outils non " +"de :mod:`distutils`. La nouveauté la plus notable, au-delà des outils non " "modifiés de :mod:`distutils` est la possibilité de déclarer des dépendances " "à d'autres paquets. C'est l'alternative actuellement recommandée car plus " "régulièrement mise à jour que :mod:`distutils` et gère mieux les standards " @@ -144,7 +144,7 @@ msgid "" msgstr "" "`wheel`_ (dans ce contexte) est un projet qui ajoute la commande " "``bdist_wheel`` à :mod:`distutils`/`setuptools`_. Cela produit un paquet " -"binaire multiplateforme (nommé \"*wheels*\" ou \"*wheel files*\" et définis " +"binaire multiplateformes (nommé \"*wheels*\" ou \"*wheel files*\" et définis " "dans la :pep:`427`) qui permet aux bibliothèques Python, même celles " "incluant des extensions binaires, d'être installées sur un système sans " "avoir à les compiler localement." @@ -177,7 +177,7 @@ msgstr "" "et collaborer efficacement en rendant des solutions communes à divers " "problèmes librement disponibles. Cela laisse beaucoup de développeurs libres " "de dépenser plus de temps concentrés sur des problèmes relativement uniques " -"à leur cas spécifiques." +"à leur cas spécifique." #: distributing/index.rst:80 msgid "" @@ -187,7 +187,7 @@ msgid "" msgstr "" "Les outils de distribution fournis avec Python sont conçus pour rendre la " "vie des développeurs relativement simple lorsqu'ils souhaitent contribuer, " -"s'il le désirent, à ces ressources communes." +"s'ils le désirent, à ces ressources communes." #: distributing/index.rst:84 msgid "" @@ -210,8 +210,8 @@ msgid "" "important to have standard tools that work consistently, even on older " "versions of Python." msgstr "" -"La bibliothèque standard n'inclut pas d'outils capable de créer des paquets " -"selon les standards modernes, car l'équipe fondamentale de développement à " +"La bibliothèque standard n'inclut pas d'outils capables de créer des paquets " +"selon les standards modernes, car l'équipe fondamentale de développement a " "trouvé qu'il était plus important d'avoir des outils standards qui " "fonctionnent de manière cohérente, même avec de plus vieilles versions de " "Python." @@ -227,12 +227,12 @@ msgstr "" #: distributing/index.rst:104 msgid "" -"For POSIX users (including Mac OS X and Linux users), these instructions " -"assume the use of a :term:`virtual environment`." +"For POSIX users (including macOS and Linux users), these instructions assume " +"the use of a :term:`virtual environment`." msgstr "" -"Pour les utilisateurs d'environnements POSIX (incluant Mac OS X et les " -"utilisateurs de Linux), ces instructions supposent l'utilisation d'un :term:" -"`environnement virtuel`." +"Pour les utilisateurs d'environnements POSIX (dont macOS et Linux), ces " +"instructions supposent l'utilisation d'un :term:`environnement virtuel " +"`." #: distributing/index.rst:107 msgid "" @@ -240,7 +240,7 @@ msgid "" "system PATH environment variable was selected when installing Python." msgstr "" "Pour les utilisateurs de Windows, ces instructions supposent que l'option " -"proposant de modifier la variable d'environnement PATH à été cochée lors de " +"proposant de modifier la variable d'environnement PATH a été cochée lors de " "l'installation de Python." #: distributing/index.rst:111 @@ -265,27 +265,27 @@ msgstr "" #: distributing/index.rst:128 msgid "`Project structure`_" -msgstr "`(en) Structure d'un projet `_" +msgstr "`(en) Structure d'un projet `_ ;" #: distributing/index.rst:129 msgid "`Building and packaging the project`_" msgstr "" "`(en) Construire et empaqueter le projet `_" +"project_>`_ ;" #: distributing/index.rst:130 -msgid "`Uploading the project to the Python Packaging Index`_" +msgid "`Uploading the project to the Python Package Index`_" msgstr "" "`(en) Téléverser le projet sur le Python Packaging Index `_" +"project to the Python Packaging Index_>`_ ;" #: distributing/index.rst:131 msgid "`The .pypirc file`_" -msgstr "" +msgstr "`(en) Le fichier .pypirc `_." #: distributing/index.rst:144 msgid "How do I...?" -msgstr "Comment puis-je ...?" +msgstr "Comment puis-je… ?" #: distributing/index.rst:146 msgid "These are quick answers or links for some common tasks." @@ -294,15 +294,15 @@ msgstr "" #: distributing/index.rst:149 msgid "... choose a name for my project?" -msgstr "... choisir un nom pour mon projet ?" +msgstr "… choisir un nom pour mon projet ?" #: distributing/index.rst:151 msgid "This isn't an easy topic, but here are a few tips:" -msgstr "Ce n'est pas un sujet facile, mais voici quelques conseils :" +msgstr "Ce n'est pas un sujet facile, mais voici quelques conseils :" #: distributing/index.rst:153 -msgid "check the Python Packaging Index to see if the name is already in use" -msgstr "vérifiez dans le *Python Packaging Index* si le nom est déjà utilisé" +msgid "check the Python Package Index to see if the name is already in use" +msgstr "vérifiez dans le *Python Package Index* si le nom est déjà utilisé ;" #: distributing/index.rst:154 msgid "" @@ -310,12 +310,12 @@ msgid "" "already a project with that name" msgstr "" "vérifiez sur quelques sites d'hébergement populaires tels que GitHub, " -"Bitbucket, etc pour voir s'il y existe déjà un projet avec ce nom" +"Bitbucket, etc pour voir s'il y existe déjà un projet avec ce nom ;" #: distributing/index.rst:156 msgid "check what comes up in a web search for the name you're considering" msgstr "" -"vérifiez ce qui sort en recherchant sur le web le nom que vous envisagez" +"vérifiez ce qui sort en recherchant sur le web le nom que vous envisagez ;" #: distributing/index.rst:157 msgid "" @@ -325,11 +325,11 @@ msgid "" msgstr "" "évitez les mots trop communs, plus particulièrement ceux ayant plusieurs " "significations, car pour vos utilisateurs, cela complique la recherche de " -"votre logiciel" +"votre logiciel." #: distributing/index.rst:163 msgid "... create and distribute binary extensions?" -msgstr "... créer et distribuer des extensions binaires ?" +msgstr "… créer et distribuer des extensions binaires ?" #: distributing/index.rst:165 msgid "" diff --git a/distutils/apiref.po b/distutils/apiref.po index e593d0ccde..b873e6c37b 100644 --- a/distutils/apiref.po +++ b/distutils/apiref.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2021-03-29 15:44+0200\n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2022-10-18 12:23+0200\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -368,7 +368,7 @@ msgid "" "*stop_after* tells :func:`setup` when to stop processing; possible values:" msgstr "*stop_after* dit à :func:`setup` quand s'arrêter ; valeurs possibles :" -#: distutils/apiref.rst:562 distutils/apiref.rst:1601 +#: distutils/apiref.rst:562 distutils/apiref.rst:1606 msgid "description" msgstr "description" @@ -1369,8 +1369,8 @@ msgid "" "component). These are on top of the system default and those supplied to :" "meth:`add_library_dir` and/or :meth:`set_library_dirs`. " "*runtime_library_dirs* is a list of directories that will be embedded into " -"the shared library and used to search for other shared libraries that \\*it" -"\\* depends on at run-time. (This may only be relevant on Unix.)" +"the shared library and used to search for other shared libraries that " +"\\*it\\* depends on at run-time. (This may only be relevant on Unix.)" msgstr "" "*library_dirs*, s'il est fourni, doit être une liste de répertoires à " "rechercher pour les bibliothèques qui ont été spécifiées comme des " @@ -2078,8 +2078,9 @@ msgstr "" "platform``." #: distutils/apiref.rst:1122 +#, fuzzy msgid "" -"For Mac OS X systems the OS version reflects the minimal version on which " +"For macOS systems the OS version reflects the minimal version on which " "binaries will run (that is, the value of ``MACOSX_DEPLOYMENT_TARGET`` during " "the build of Python), not the OS version of the current system." msgstr "" @@ -2089,8 +2090,9 @@ msgstr "" "compilation de Python), et non la version du système actuel." #: distutils/apiref.rst:1126 +#, fuzzy msgid "" -"For universal binary builds on Mac OS X the architecture value reflects the " +"For universal binary builds on macOS the architecture value reflects the " "universal binary status instead of the architecture of the current " "processor. For 32-bit universal binaries the architecture is ``fat``, for 64-" "bit universal binaries the architecture is ``fat64``, and for 4-way " @@ -2110,7 +2112,8 @@ msgstr "" "compilation universelle avec les architectures *i386* et *x86_64*" #: distutils/apiref.rst:1135 -msgid "Examples of returned values on Mac OS X:" +#, fuzzy +msgid "Examples of returned values on macOS:" msgstr "Exemples de valeurs renvoyées sous Mac OS X :" #: distutils/apiref.rst:1137 @@ -2140,10 +2143,11 @@ msgid "" msgstr "" "Pour AIX, à partir de Python 3.9, une chaîne de caractères est renvoyée " "commençant par ``aix``, puis des champs additionnels (séparés par ``'-'``) " -"qui représentent les valeurs combinées de `AIX Version`, `Release and " -"Technology Level` (premier champ), `Build Date` (deuxième champ) et taille " -"en bits (troisième champ). En Python 3.8 et avant, seul un champ additionnel " -"avec la version d'AIX et la `Release` étaient renvoyés." +"qui représentent les valeurs combinées de la version d'AIX accompagnée du " +"numéro de publication et du « niveau de technologie » (premier champ), la " +"date de la version (deuxième champ), et taille en bits (troisième champ). En " +"Python 3.8 et avant, seul un champ additionnel avec la version d'AIX et le " +"numéro de publication étaient renvoyés." #: distutils/apiref.rst:1151 msgid "Examples of returned values on AIX:" @@ -2382,7 +2386,7 @@ msgstr "" "avec le module standard :mod:`py_compile`, soit indirectement en écrivant un " "script temporaire et en l'exécutant. Normalement, vous devez laisser :func:" "`byte_compile` choisir d'utiliser la compilation directe ou non (voir le " -"code-source pour les détails). Le paramètre *direct* est utilisé par le " +"code source pour les détails). Le paramètre *direct* est utilisé par le " "script généré en mode indirect ; à moins que vous ne sachiez ce que vous " "faites, laissez le paramètre à ``None`` (Aucun)." @@ -2551,7 +2555,7 @@ msgid "" "a corresponding *short_option*. All option tuples must have long options." msgstr "" "Si une option prend un argument, sa *long_option* doit se terminer par " -"``'='``. *short_option* doit être un seul caractère, jamais ``':'`'. " +"``'='``. *short_option* doit être un seul caractère, jamais ``':'``. " "*short_option* doit être ``None`` si l'option n'a pas de forme courte " "correspondante. Tous les triplets d'options doivent avoir des options " "longues." @@ -2643,7 +2647,11 @@ msgstr "" msgid ":mod:`distutils.sysconfig` --- System configuration information" msgstr ":mod:`distutils.sysconfig` — Informations de configuration du système" -#: distutils/apiref.rst:1460 +#: distutils/apiref.rst:1455 +msgid ":mod:`distutils.sysconfig` has been merged into :mod:`sysconfig`." +msgstr "" + +#: distutils/apiref.rst:1462 msgid "" "The :mod:`distutils.sysconfig` module provides access to Python's low-level " "configuration information. The specific configuration variables available " @@ -2665,7 +2673,7 @@ msgstr "" "de Python commençant par 2.2, et :file:`config.h` pour les versions " "antérieures de Python." -#: distutils/apiref.rst:1469 +#: distutils/apiref.rst:1471 msgid "" "Some additional functions are provided which perform some useful " "manipulations for other parts of the :mod:`distutils` package." @@ -2673,15 +2681,15 @@ msgstr "" "Quelques fonctions supplémentaires sont fournies pour effectuer des " "manipulations utiles pour d'autres parties du paquet :mod:`distutils`." -#: distutils/apiref.rst:1475 +#: distutils/apiref.rst:1477 msgid "The result of ``os.path.normpath(sys.prefix)``." msgstr "Le résultat de ``os.path.normpath(sys.prefix)``." -#: distutils/apiref.rst:1480 +#: distutils/apiref.rst:1482 msgid "The result of ``os.path.normpath(sys.exec_prefix)``." msgstr "Le résultat de ``os.path.normpath(sys.exec_prefix)``." -#: distutils/apiref.rst:1485 +#: distutils/apiref.rst:1487 msgid "" "Return the value of a single variable. This is equivalent to " "``get_config_vars().get(name)``." @@ -2689,7 +2697,7 @@ msgstr "" "Renvoie la valeur d'une seule variable. C'est l'équivalent de " "``get_config_vars().get(name)``." -#: distutils/apiref.rst:1491 +#: distutils/apiref.rst:1493 msgid "" "Return a set of variable definitions. If there are no arguments, this " "returns a dictionary mapping names of configuration variables to values. If " @@ -2704,7 +2712,7 @@ msgstr "" "donnant les valeurs correspondantes. Si un nom donné n'a pas de valeur " "correspondante, la valeur ``None`` sera utilisée pour cette variable." -#: distutils/apiref.rst:1500 +#: distutils/apiref.rst:1502 msgid "" "Return the full path name of the configuration header. For Unix, this will " "be the header generated by the :program:`configure` script; for other " @@ -2716,7 +2724,7 @@ msgstr "" "les autres plates-formes, l'en-tête provient directement de la distribution " "source Python. Le fichier est un fichier texte spécifique à la plate-forme." -#: distutils/apiref.rst:1508 +#: distutils/apiref.rst:1510 msgid "" "Return the full path name of the :file:`Makefile` used to build Python. For " "Unix, this will be a file generated by the :program:`configure` script; the " @@ -2729,7 +2737,13 @@ msgstr "" "existe, il s'agit d'un fichier texte spécifique à la plate-forme. Cette " "fonction n'est utile que sur les plates-formes POSIX." -#: distutils/apiref.rst:1516 +#: distutils/apiref.rst:1515 +msgid "" +"The following functions are deprecated together with this module and they " +"have no direct replacement." +msgstr "" + +#: distutils/apiref.rst:1521 msgid "" "Return the directory for either the general or platform-dependent C include " "files. If *plat_specific* is true, the platform-dependent include directory " @@ -2746,7 +2760,7 @@ msgstr "" "`PREFIX`, soit comme préfixe d'exécution au lieu de :const:`EXEC_PREFIX` si " "*plat_specific* est vrai." -#: distutils/apiref.rst:1526 +#: distutils/apiref.rst:1531 msgid "" "Return the directory for either the general or platform-dependent library " "installation. If *plat_specific* is true, the platform-dependent include " @@ -2767,7 +2781,7 @@ msgstr "" "bibliothèque standard est renvoyé plutôt que le répertoire d'installation " "des extensions tierces." -#: distutils/apiref.rst:1535 +#: distutils/apiref.rst:1540 msgid "" "The following function is only intended for use within the :mod:`distutils` " "package." @@ -2775,7 +2789,7 @@ msgstr "" "La fonction suivante est uniquement destinée à être utilisée dans le paquet :" "mod:`distutils`." -#: distutils/apiref.rst:1541 +#: distutils/apiref.rst:1546 msgid "" "Do any platform-specific customization of a :class:`distutils.ccompiler." "CCompiler` instance." @@ -2783,7 +2797,7 @@ msgstr "" "Exécute toute personnalisation spécifique à la plate-forme d'une instance :" "class:`distutils.ccompiler.CCompiler`." -#: distutils/apiref.rst:1544 +#: distutils/apiref.rst:1549 msgid "" "This function is only needed on Unix at this time, but should be called " "consistently to support forward-compatibility. It inserts the information " @@ -2799,7 +2813,7 @@ msgstr "" "liens sélectionnés, ainsi que l'extension utilisée par l'éditeur de liens " "pour les objets partagés." -#: distutils/apiref.rst:1550 +#: distutils/apiref.rst:1555 msgid "" "This function is even more special-purpose, and should only be used from " "Python's own build procedures." @@ -2807,7 +2821,7 @@ msgstr "" "Cette fonction est encore plus spéciale, et ne devrait être utilisée que " "dans les procédures de compilation de Python." -#: distutils/apiref.rst:1556 +#: distutils/apiref.rst:1561 msgid "" "Inform the :mod:`distutils.sysconfig` module that it is being used as part " "of the build process for Python. This changes a lot of relative locations " @@ -2819,11 +2833,11 @@ msgstr "" "relatifs pour les fichiers, ce qui les place dans la zone de compilation " "plutôt que dans un interpréteur Python installé." -#: distutils/apiref.rst:1563 +#: distutils/apiref.rst:1568 msgid ":mod:`distutils.text_file` --- The TextFile class" msgstr ":mod:`distutils.text_file` — La classe TextFile" -#: distutils/apiref.rst:1569 +#: distutils/apiref.rst:1574 msgid "" "This module provides the :class:`TextFile` class, which gives an interface " "to text files that (optionally) takes care of stripping comments, ignoring " @@ -2833,7 +2847,7 @@ msgstr "" "fichiers texte qui s'occupe (optionnellement) de supprimer les commentaires, " "d'ignorer les lignes vides et de joindre les lignes avec des antislashs." -#: distutils/apiref.rst:1576 +#: distutils/apiref.rst:1581 msgid "" "This class provides a file-like object that takes care of all the things " "you commonly want to do when processing a text file that has some line-by-" @@ -2850,7 +2864,7 @@ msgstr "" "ligne, supprimer les blancs avant et après le texte. Toutes ces fonctions " "sont optionnelles et peuvent être commandées indépendamment." -#: distutils/apiref.rst:1583 +#: distutils/apiref.rst:1588 msgid "" "The class provides a :meth:`warn` method so you can generate warning " "messages that report physical line number, even if the logical line in " @@ -2862,7 +2876,7 @@ msgstr "" "logique en question couvre plusieurs lignes physiques. Fournit également :" "meth:`unreadline` pour implémenter un système prospectif ligne par ligne." -#: distutils/apiref.rst:1588 +#: distutils/apiref.rst:1593 msgid "" ":class:`TextFile` instances are create with either *filename*, *file*, or " "both. :exc:`RuntimeError` is raised if both are ``None``. *filename* should " @@ -2881,7 +2895,7 @@ msgstr "" "Si *file* n'est pas fourni, :class:`TextFile` crée son propre fichier en " "utilisant la fonction :func:`open`." -#: distutils/apiref.rst:1596 +#: distutils/apiref.rst:1601 msgid "" "The options are all boolean, and affect the values returned by :meth:" "`readline`" @@ -2889,19 +2903,19 @@ msgstr "" "Les options sont toutes booléennes et affectent les valeurs renvoyées par :" "meth:`readline`." -#: distutils/apiref.rst:1601 +#: distutils/apiref.rst:1606 msgid "option name" msgstr "Nom des options" -#: distutils/apiref.rst:1601 +#: distutils/apiref.rst:1606 msgid "default" msgstr "default" -#: distutils/apiref.rst:1603 +#: distutils/apiref.rst:1608 msgid "*strip_comments*" msgstr "*strip_comments*" -#: distutils/apiref.rst:1603 +#: distutils/apiref.rst:1608 msgid "" "strip from ``'#'`` to end-of-line, as well as any whitespace leading up to " "the ``'#'``\\ ---unless it is escaped by a backslash" @@ -2910,28 +2924,28 @@ msgstr "" "ainsi que tout espace blanc menant au premier ``'#'`` — à moins qu'il ne " "soit échappé par un antislash" -#: distutils/apiref.rst:1612 distutils/apiref.rst:1617 +#: distutils/apiref.rst:1617 distutils/apiref.rst:1622 msgid "true" msgstr "*true*" -#: distutils/apiref.rst:1609 +#: distutils/apiref.rst:1614 msgid "*lstrip_ws*" msgstr "*lstrip_ws*" -#: distutils/apiref.rst:1609 +#: distutils/apiref.rst:1614 msgid "strip leading whitespace from each line before returning it" msgstr "" "Efface les espaces blancs en début de chaque ligne avant de la renvoyer." -#: distutils/apiref.rst:1627 distutils/apiref.rst:1638 +#: distutils/apiref.rst:1632 distutils/apiref.rst:1643 msgid "false" msgstr "*false*" -#: distutils/apiref.rst:1612 +#: distutils/apiref.rst:1617 msgid "*rstrip_ws*" msgstr "*rstrip_ws*" -#: distutils/apiref.rst:1612 +#: distutils/apiref.rst:1617 msgid "" "strip trailing whitespace (including line terminator!) from each line before " "returning it." @@ -2939,11 +2953,11 @@ msgstr "" "Efface les espaces blancs de fin de ligne (y compris le terminateur de " "ligne !) de chaque ligne avant de la renvoyer." -#: distutils/apiref.rst:1617 +#: distutils/apiref.rst:1622 msgid "*skip_blanks*" msgstr "*skip_blanks*" -#: distutils/apiref.rst:1617 +#: distutils/apiref.rst:1622 msgid "" "skip lines that are empty \\*after\\* stripping comments and whitespace. " "(If both lstrip_ws and rstrip_ws are false, then some lines may consist of " @@ -2955,11 +2969,11 @@ msgstr "" "alors certaines lignes peuvent être composées uniquement d'espaces : elles " "ne seront pas ignorées, même si *skip_blanks* est vrai." -#: distutils/apiref.rst:1627 +#: distutils/apiref.rst:1632 msgid "*join_lines*" msgstr "*join_lines*" -#: distutils/apiref.rst:1627 +#: distutils/apiref.rst:1632 msgid "" "if a backslash is the last non-newline character on a line after stripping " "comments and whitespace, join the following line to it to form one logical " @@ -2972,11 +2986,11 @@ msgstr "" "antislash, alors N+1 lignes physiques seront liées pour former une seule " "ligne logique." -#: distutils/apiref.rst:1638 +#: distutils/apiref.rst:1643 msgid "*collapse_join*" msgstr "*collapse_join*" -#: distutils/apiref.rst:1638 +#: distutils/apiref.rst:1643 msgid "" "strip leading whitespace from lines that are joined to their predecessor; " "only matters if ``(join_lines and not lstrip_ws)``" @@ -2984,7 +2998,7 @@ msgstr "" "Supprime les espaces blancs des lignes qui sont jointes à leur " "prédécesseur ; n'est utile que si ``(join_lines and not lstrip_ws)``." -#: distutils/apiref.rst:1645 +#: distutils/apiref.rst:1650 msgid "" "Note that since *rstrip_ws* can strip the trailing newline, the semantics " "of :meth:`readline` must differ from those of the built-in file object's :" @@ -2999,7 +3013,7 @@ msgstr "" "juste une ligne blanche (ou une ligne entièrement blanche), si *rstrip_ws* " "est vrai mais pas si *skip_blanks* est faux." -#: distutils/apiref.rst:1654 +#: distutils/apiref.rst:1659 msgid "" "Open a new file *filename*. This overrides any *file* or *filename* " "constructor arguments." @@ -3007,7 +3021,7 @@ msgstr "" "Ouvre un nouveau fichier *filename*. Remplace tous les arguments du " "constructeur *file* ou *filename*." -#: distutils/apiref.rst:1660 +#: distutils/apiref.rst:1665 msgid "" "Close the current file and forget everything we know about it (including the " "filename and the current line number)." @@ -3015,7 +3029,7 @@ msgstr "" "Ferme le fichier courant et oublie toutes les informations connues à son " "sujet (y compris le nom du fichier et le numéro de la ligne courante)." -#: distutils/apiref.rst:1666 +#: distutils/apiref.rst:1671 msgid "" "Print (to stderr) a warning message tied to the current logical line in the " "current file. If the current logical line in the file spans multiple " @@ -3032,7 +3046,7 @@ msgstr "" "liste ou d'un couple pour indiquer une plage de lignes physiques, ou d'un " "entier pour une seule ligne physique." -#: distutils/apiref.rst:1676 +#: distutils/apiref.rst:1681 msgid "" "Read and return a single logical line from the current file (or from an " "internal buffer if lines have previously been \"unread\" with :meth:" @@ -3053,7 +3067,7 @@ msgstr "" "puisque la chaîne vide peut se produire si *rstrip_ws* est vrai mais pas si " "*strip_blanks* est faux." -#: distutils/apiref.rst:1687 +#: distutils/apiref.rst:1692 msgid "" "Read and return the list of all logical lines remaining in the current file. " "This updates the current line number to the last line of the file." @@ -3062,7 +3076,7 @@ msgstr "" "fichier courant. Met à jour le numéro de la ligne courante à la dernière " "ligne du fichier." -#: distutils/apiref.rst:1693 +#: distutils/apiref.rst:1698 msgid "" "Push *line* (a string) onto an internal buffer that will be checked by " "future :meth:`readline` calls. Handy for implementing a parser with line-at-" @@ -3081,21 +3095,21 @@ msgstr "" "appel à :meth:`readline`, les lignes sont renvoyées dans l'ordre de la plus " "récente première à la plus ancienne." -#: distutils/apiref.rst:1702 +#: distutils/apiref.rst:1707 msgid ":mod:`distutils.version` --- Version number classes" msgstr ":mod:`distutils.version` — Classes de numéros de version" -#: distutils/apiref.rst:1717 +#: distutils/apiref.rst:1722 msgid ":mod:`distutils.cmd` --- Abstract base class for Distutils commands" msgstr "" ":mod:`distutils.cmd` — Classe de base abstraite pour les commandes " "*Distutils*" -#: distutils/apiref.rst:1724 +#: distutils/apiref.rst:1729 msgid "This module supplies the abstract base class :class:`Command`." msgstr "Ce module fournit la classe de base abstraite :class:`Command`." -#: distutils/apiref.rst:1729 +#: distutils/apiref.rst:1734 msgid "" "Abstract base class for defining command classes, the \"worker bees\" of the " "Distutils. A useful analogy for command classes is to think of them as " @@ -3124,7 +3138,7 @@ msgstr "" "s'effectue tout le travail est basé sur les valeurs de ses options, est la " "méthode :meth:`run`, qui doit être implémentée par chaque classe de commande." -#: distutils/apiref.rst:1742 +#: distutils/apiref.rst:1747 msgid "" "The class constructor takes a single argument *dist*, a :class:`~distutils." "core.Distribution` instance." @@ -3132,16 +3146,16 @@ msgstr "" "Le constructeur prend un seul argument, *dist*, une instance de :class:" "`~distutils.core.Distribution`." -#: distutils/apiref.rst:1747 +#: distutils/apiref.rst:1752 msgid "Creating a new Distutils command" msgstr "Créer une nouvelle commande *Distutils*" -#: distutils/apiref.rst:1749 +#: distutils/apiref.rst:1754 msgid "This section outlines the steps to create a new Distutils command." msgstr "" "Cette section décrit les étapes pour créer une nouvelle commande *Distutils*." -#: distutils/apiref.rst:1751 +#: distutils/apiref.rst:1756 msgid "" "A new command lives in a module in the :mod:`distutils.command` package. " "There is a sample template in that directory called :file:" @@ -3164,13 +3178,13 @@ msgstr "" "peel_banana.py`, puis l'éditer pour qu'il implémente la classe :class:" "`peel_banana`, une sous-classe de la classe :class:`distutils.cmd.Command`." -#: distutils/apiref.rst:1761 +#: distutils/apiref.rst:1766 msgid "Subclasses of :class:`Command` must define the following methods." msgstr "" "Les sous-classes de la classe :class:`Command` doivent définir les méthodes " "suivantes." -#: distutils/apiref.rst:1765 +#: distutils/apiref.rst:1770 msgid "" "Set default values for all the options that this command supports. Note " "that these defaults may be overridden by other commands, by the setup " @@ -3187,7 +3201,7 @@ msgstr "" "méthodes suivantes :meth:`initialize_options` ne font que des assignations " "de type ``self.truc = None``." -#: distutils/apiref.rst:1774 +#: distutils/apiref.rst:1779 msgid "" "Set final values for all the options that this command supports. This is " "always called as late as possible, ie. after any option assignments from " @@ -3205,7 +3219,7 @@ msgstr "" "toujours la même valeur qui lui a été attribué par :meth:" "`initialize_options`." -#: distutils/apiref.rst:1784 +#: distutils/apiref.rst:1789 msgid "" "A command's raison d'etre: carry out the action it exists to perform, " "controlled by the options initialized in :meth:`initialize_options`, " @@ -3220,7 +3234,7 @@ msgstr "" "meth:`finalize_options`. Toutes les interactions avec le système de fichiers " "et la sortie du terminal doivent être effectuées par :meth:`run`." -#: distutils/apiref.rst:1793 +#: distutils/apiref.rst:1798 msgid "" "*sub_commands* formalizes the notion of a \"family\" of commands, e.g. " "``install`` as the parent with sub-commands ``install_lib``, " @@ -3244,7 +3258,7 @@ msgstr "" "n'est applicable que s'il existe des fichiers d'en-tête C à installer. Si " "*predicate* est ``None``, cette commande est toujours effectuée." -#: distutils/apiref.rst:1804 +#: distutils/apiref.rst:1809 msgid "" "*sub_commands* is usually defined at the *end* of a class, because " "predicates can be methods of the class, so they must already have been " @@ -3254,55 +3268,28 @@ msgstr "" "prédicats peuvent être des méthodes de la classe, ils doivent donc déjà " "avoir été définis. L'exemple canonique est la commande :command:`install`." -#: distutils/apiref.rst:1810 +#: distutils/apiref.rst:1815 msgid ":mod:`distutils.command` --- Individual Distutils commands" msgstr ":mod:`distutils.command` — Commandes *Distutils* individuelles" -#: distutils/apiref.rst:1821 +#: distutils/apiref.rst:1826 msgid ":mod:`distutils.command.bdist` --- Build a binary installer" msgstr ":mod:`distutils.command.bdist` — Construit un installateur binaire" -#: distutils/apiref.rst:1831 +#: distutils/apiref.rst:1836 msgid "" ":mod:`distutils.command.bdist_packager` --- Abstract base class for packagers" msgstr "" ":mod:`distutils.command.bdist_packager` — Classe de base abstraite pour " "empaqueteurs" -#: distutils/apiref.rst:1841 +#: distutils/apiref.rst:1846 msgid ":mod:`distutils.command.bdist_dumb` --- Build a \"dumb\" installer" msgstr "" ":mod:`distutils.command.bdist_dumb` — Construit un installateur passif " "(*dumb*)" -#: distutils/apiref.rst:1851 -msgid "" -":mod:`distutils.command.bdist_msi` --- Build a Microsoft Installer binary " -"package" -msgstr "" -":mod:`distutils.command.bdist_msi` — Construit un installateur Microsoft" - -#: distutils/apiref.rst:1887 -msgid "Use bdist_wheel (wheel packages) instead." -msgstr "Utilisez *bdist_wheel* (paquet au format *wheel*) à la place." - -#: distutils/apiref.rst:1861 -msgid "Builds a `Windows Installer`_ (.msi) binary package." -msgstr "Construit un installateur `Windows Installeur`_ (*.msi*)" - -#: distutils/apiref.rst:1865 -msgid "" -"In most cases, the ``bdist_msi`` installer is a better choice than the " -"``bdist_wininst`` installer, because it provides better support for Win64 " -"platforms, allows administrators to perform non-interactive installations, " -"and allows installation through group policies." -msgstr "" -"Dans la plupart des cas, l'installateur ``bdist_msi`` est un meilleur choix " -"que l'installateur ``bdist_wininst``, car il gère mieux les plates-formes " -"*Win64*, et permet en plus aux administrateurs d'effectuer des installations " -"non interactives ainsi que des installations via des stratégies de groupe." - -#: distutils/apiref.rst:1872 +#: distutils/apiref.rst:1856 msgid "" ":mod:`distutils.command.bdist_rpm` --- Build a binary distribution as a " "Redhat RPM and SRPM" @@ -3310,42 +3297,37 @@ msgstr "" ":mod:`distutils.command.bdist_rpm` — Construit une distribution binaire au " "format Redhat RPM et SRPM" -#: distutils/apiref.rst:1882 -msgid ":mod:`distutils.command.bdist_wininst` --- Build a Windows installer" -msgstr "" -":mod:`distutils.command.bdist_wininst` — Construit un installateur Windows" - -#: distutils/apiref.rst:1895 +#: distutils/apiref.rst:1866 msgid ":mod:`distutils.command.sdist` --- Build a source distribution" msgstr ":mod:`distutils.command.sdist` — Construit une distribution source" -#: distutils/apiref.rst:1905 +#: distutils/apiref.rst:1876 msgid ":mod:`distutils.command.build` --- Build all files of a package" msgstr "" ":mod:`distutils.command.build` — Construit tous les fichiers d'un paquet" -#: distutils/apiref.rst:1915 +#: distutils/apiref.rst:1886 msgid "" ":mod:`distutils.command.build_clib` --- Build any C libraries in a package" msgstr "" ":mod:`distutils.command.build_clib` — Construit toutes les bibliothèques C " "d'un paquet" -#: distutils/apiref.rst:1925 +#: distutils/apiref.rst:1896 msgid "" ":mod:`distutils.command.build_ext` --- Build any extensions in a package" msgstr "" ":mod:`distutils.command.build_ext` — Construit toutes les extensions d'un " "paquet" -#: distutils/apiref.rst:1935 +#: distutils/apiref.rst:1906 msgid "" ":mod:`distutils.command.build_py` --- Build the .py/.pyc files of a package" msgstr "" ":mod:`distutils.command.build_py` — Construit les fichiers *.py/.pyc* d'un " "paquet" -#: distutils/apiref.rst:1945 +#: distutils/apiref.rst:1916 msgid "" "Alternative implementation of build_py which also runs the 2to3 conversion " "library on each .py file that is going to be installed. To use this in a " @@ -3357,27 +3339,27 @@ msgstr "" "installé. Pour l'utiliser dans un fichier *setup.py* pour une distribution " "conçue pour fonctionner avec *Python 2.x* et *3.x*, ajouter ::" -#: distutils/apiref.rst:1955 +#: distutils/apiref.rst:1926 msgid "to your setup.py, and later::" msgstr "à votre *setup.py* et, plus tard ::" -#: distutils/apiref.rst:1959 +#: distutils/apiref.rst:1930 msgid "to the invocation of setup()." msgstr "à l'appel de *setup()*." -#: distutils/apiref.rst:1963 +#: distutils/apiref.rst:1934 msgid "" ":mod:`distutils.command.build_scripts` --- Build the scripts of a package" msgstr "" ":mod:`distutils.command.build_scripts` — Construit les scripts d'un paquet" -#: distutils/apiref.rst:1973 +#: distutils/apiref.rst:1944 msgid ":mod:`distutils.command.clean` --- Clean a package build area" msgstr "" ":mod:`distutils.command.clean` — Nettoie un dossier de compilation d'un " "paquet" -#: distutils/apiref.rst:1978 +#: distutils/apiref.rst:1949 msgid "" "This command removes the temporary files created by :command:`build` and its " "subcommands, like intermediary compiled object files. With the ``--all`` " @@ -3388,7 +3370,7 @@ msgstr "" "intermédiaires. Avec l'option ``--all``, le répertoire de compilation sera " "supprimé." -#: distutils/apiref.rst:1982 +#: distutils/apiref.rst:1953 msgid "" "Extension modules built :ref:`in place ` will " "not be cleaned, as they are not in the build directory." @@ -3397,23 +3379,23 @@ msgstr "" "inplace>` ne seront pas effacés, car ils ne sont pas dans le répertoire " "*build*." -#: distutils/apiref.rst:1987 +#: distutils/apiref.rst:1958 msgid ":mod:`distutils.command.config` --- Perform package configuration" msgstr "" ":mod:`distutils.command.config` — Effectue la configuration d'un paquet" -#: distutils/apiref.rst:1997 +#: distutils/apiref.rst:1968 msgid ":mod:`distutils.command.install` --- Install a package" msgstr ":mod:`distutils.command.install` — Installe un paquet" -#: distutils/apiref.rst:2007 +#: distutils/apiref.rst:1978 msgid "" ":mod:`distutils.command.install_data` --- Install data files from a package" msgstr "" ":mod:`distutils.command.install_data` — Installe les fichiers de données " "d'un paquet" -#: distutils/apiref.rst:2017 +#: distutils/apiref.rst:1988 msgid "" ":mod:`distutils.command.install_headers` --- Install C/C++ header files from " "a package" @@ -3421,14 +3403,14 @@ msgstr "" ":mod:`distutils.command.install_headers` — Installe les fichiers d'en-tête C/" "C++ d'un paquet" -#: distutils/apiref.rst:2027 +#: distutils/apiref.rst:1998 msgid "" ":mod:`distutils.command.install_lib` --- Install library files from a package" msgstr "" ":mod:`distutils.command.install_lib` — Installe les fichiers de bibliothèque " "à partir d'un paquet" -#: distutils/apiref.rst:2037 +#: distutils/apiref.rst:2008 msgid "" ":mod:`distutils.command.install_scripts` --- Install script files from a " "package" @@ -3436,7 +3418,7 @@ msgstr "" ":mod:`distutils.command.install_scripts` — Installe les fichiers de script " "d'un paquet" -#: distutils/apiref.rst:2047 +#: distutils/apiref.rst:2018 msgid "" ":mod:`distutils.command.register` --- Register a module with the Python " "Package Index" @@ -3444,7 +3426,7 @@ msgstr "" ":mod:`distutils.command.register` — Enregistre un module dans l'Index des " "paquets Python (*Python Package Index* ou *PyPI* en anglais)" -#: distutils/apiref.rst:2053 +#: distutils/apiref.rst:2024 msgid "" "The ``register`` command registers the package with the Python Package " "Index. This is described in more detail in :pep:`301`." @@ -3452,11 +3434,11 @@ msgstr "" "La commande ``register`` enregistre le paquet dans l'index des paquets " "Python. Plus de détails à ce sujet dans la :pep:`301`." -#: distutils/apiref.rst:2060 +#: distutils/apiref.rst:2031 msgid ":mod:`distutils.command.check` --- Check the meta-data of a package" msgstr ":mod:`distutils.command.check` — Vérifie les méta-données d'un paquet" -#: distutils/apiref.rst:2066 +#: distutils/apiref.rst:2037 msgid "" "The ``check`` command performs some tests on the meta-data of a package. For " "example, it verifies that all required meta-data are provided as the " @@ -3465,3 +3447,31 @@ msgstr "" "La commande ``check`` effectue des tests sur les méta-données d'un paquet. " "Par exemple, elle vérifie que toutes les méta-données requises sont fournies " "lorsque les arguments sont passés à la fonction :func:`setup`." + +#~ msgid "" +#~ ":mod:`distutils.command.bdist_msi` --- Build a Microsoft Installer binary " +#~ "package" +#~ msgstr "" +#~ ":mod:`distutils.command.bdist_msi` — Construit un installateur Microsoft" + +#~ msgid "Use bdist_wheel (wheel packages) instead." +#~ msgstr "Utilisez *bdist_wheel* (paquet au format *wheel*) à la place." + +#~ msgid "Builds a `Windows Installer`_ (.msi) binary package." +#~ msgstr "Construit un installateur `Windows Installeur`_ (*.msi*)" + +#~ msgid "" +#~ "In most cases, the ``bdist_msi`` installer is a better choice than the " +#~ "``bdist_wininst`` installer, because it provides better support for Win64 " +#~ "platforms, allows administrators to perform non-interactive " +#~ "installations, and allows installation through group policies." +#~ msgstr "" +#~ "Dans la plupart des cas, l'installateur ``bdist_msi`` est un meilleur " +#~ "choix que l'installateur ``bdist_wininst``, car il gère mieux les plates-" +#~ "formes *Win64*, et permet en plus aux administrateurs d'effectuer des " +#~ "installations non interactives ainsi que des installations via des " +#~ "stratégies de groupe." + +#~ msgid ":mod:`distutils.command.bdist_wininst` --- Build a Windows installer" +#~ msgstr "" +#~ ":mod:`distutils.command.bdist_wininst` — Construit un installateur Windows" diff --git a/distutils/builtdist.po b/distutils/builtdist.po index bdcb5b63f8..798b142b7c 100644 --- a/distutils/builtdist.po +++ b/distutils/builtdist.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2021-01-28 15:11+0100\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2021-12-11 12:33+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -39,12 +39,12 @@ msgid "" "word is already spoken for in Python. (And \"installer\" is a term specific " "to the world of mainstream desktop systems.)" msgstr "" -"Une \"distribution compilée\" vous fait surement penser à un \"paquet binaire" -"\" ou à un \"installateur\" (tout dépend de votre environnement). Ce n'est " -"cependant pas forcément un binaire, il peut ne contenir que des sources " -"Python et / ou du *byte-code* ; et nous n'appelons pas ça un *package* parce " -"que ce mot est déjà utilisé dans Python (et \"installateur\" est un terme " -"spécifique au monde des systèmes de bureau)." +"Une \"distribution compilée\" vous fait sûrement penser à un \"paquet " +"binaire\" ou à un \"installateur\" (tout dépend de votre environnement). Ce " +"n'est cependant pas forcément un binaire, il peut ne contenir que des " +"sources Python et / ou du *byte-code* ; et nous n'appelons pas ça un " +"*package* parce que ce mot est déjà utilisé dans Python (et \"installateur\" " +"est un terme spécifique au monde des systèmes de bureau)." #: distutils/builtdist.rst:16 msgid "" @@ -277,46 +277,34 @@ msgid "HP-UX :program:`swinstall`" msgstr "HP-UX :program:`swinstall`" #: distutils/builtdist.rst:99 -msgid "``wininst``" -msgstr "``wininst``" - -#: distutils/builtdist.rst:99 -msgid "self-extracting ZIP file for Windows" -msgstr "fichier zip auto-extracteur Windows" - -#: distutils/builtdist.rst:99 -msgid "\\(4)" -msgstr "\\(4)" - -#: distutils/builtdist.rst:102 msgid "``msi``" msgstr "``msi``" -#: distutils/builtdist.rst:102 +#: distutils/builtdist.rst:99 msgid "Microsoft Installer." msgstr "Installateur Microsoft." -#: distutils/builtdist.rst:105 +#: distutils/builtdist.rst:102 msgid "Added support for the ``xztar`` format." msgstr "Ajout du support des fichiers ``xztar``." -#: distutils/builtdist.rst:109 +#: distutils/builtdist.rst:106 msgid "Notes:" msgstr "Notes :" -#: distutils/builtdist.rst:112 +#: distutils/builtdist.rst:109 msgid "default on Unix" msgstr "par défaut sur Unix" -#: distutils/builtdist.rst:115 +#: distutils/builtdist.rst:112 msgid "default on Windows" msgstr "par défaut sur Windows" -#: distutils/builtdist.rst:118 +#: distutils/builtdist.rst:115 msgid "requires external :program:`compress` utility." msgstr "nécessite un programme externe :program:`compress`." -#: distutils/builtdist.rst:121 +#: distutils/builtdist.rst:118 msgid "" "requires either external :program:`zip` utility or :mod:`zipfile` module " "(part of the standard Python library since Python 1.6)" @@ -324,7 +312,7 @@ msgstr "" "nécessite soit un utilitaire :program:`zip` extérieur ou le module :mod:" "`zipfile` (inclut dans la bibliothèque standard depuis Python 1.6)" -#: distutils/builtdist.rst:125 +#: distutils/builtdist.rst:122 msgid "" "requires external :program:`rpm` utility, version 3.0.4 or better (use ``rpm " "--version`` to find out which version you have)" @@ -332,16 +320,16 @@ msgstr "" "nécessite un programme externe :program:`rpm`, version 3.0.4 ou mieux " "(utilisez ``rpm --version`` pour connaître quelle version vous avez)" -#: distutils/builtdist.rst:128 +#: distutils/builtdist.rst:125 msgid "" "You don't have to use the :command:`bdist` command with the :option:`!--" "formats` option; you can also use the command that directly implements the " -"format you're interested in. Some of these :command:`bdist` \"sub-commands" -"\" actually generate several similar formats; for instance, the :command:" -"`bdist_dumb` command generates all the \"dumb\" archive formats (``tar``, " -"``gztar``, ``bztar``, ``xztar``, ``ztar``, and ``zip``), and :command:" -"`bdist_rpm` generates both binary and source RPMs. The :command:`bdist` sub-" -"commands, and the formats generated by each, are:" +"format you're interested in. Some of these :command:`bdist` \"sub-" +"commands\" actually generate several similar formats; for instance, the :" +"command:`bdist_dumb` command generates all the \"dumb\" archive formats " +"(``tar``, ``gztar``, ``bztar``, ``xztar``, ``ztar``, and ``zip``), and :" +"command:`bdist_rpm` generates both binary and source RPMs. The :command:" +"`bdist` sub-commands, and the formats generated by each, are:" msgstr "" "Vous ne devez pas utiliser la commande :command:`bdist` avec l'option :" "option:`!--formats` ; Vous pouvez également utiliser la commande qui " @@ -353,55 +341,31 @@ msgstr "" "Les sous-commandes :command:`bdist`, et les formats générés par chacun, " "sont :" -#: distutils/builtdist.rst:138 +#: distutils/builtdist.rst:135 msgid "Command" msgstr "Commande" -#: distutils/builtdist.rst:138 +#: distutils/builtdist.rst:135 msgid "Formats" msgstr "Formats" -#: distutils/builtdist.rst:140 +#: distutils/builtdist.rst:137 msgid ":command:`bdist_dumb`" msgstr ":command:`bdist_dumb`" -#: distutils/builtdist.rst:140 +#: distutils/builtdist.rst:137 msgid "tar, gztar, bztar, xztar, ztar, zip" msgstr "tar, gztar, bztar, xztar, ztar, zip" -#: distutils/builtdist.rst:142 +#: distutils/builtdist.rst:139 msgid ":command:`bdist_rpm`" msgstr ":command:`bdist_rpm`" -#: distutils/builtdist.rst:142 +#: distutils/builtdist.rst:139 msgid "rpm, srpm" msgstr "rpm, srpm" -#: distutils/builtdist.rst:144 -msgid ":command:`bdist_wininst`" -msgstr ":command:`bdist_wininst`" - -#: distutils/builtdist.rst:144 -msgid "wininst" -msgstr "`wininst`" - -#: distutils/builtdist.rst:146 -msgid ":command:`bdist_msi`" -msgstr ":command:`bdist_msi`" - -#: distutils/builtdist.rst:146 -msgid "msi" -msgstr "`msi`" - -#: distutils/builtdist.rst:308 distutils/builtdist.rst:476 -msgid "bdist_wininst is deprecated since Python 3.8." -msgstr "`bdist_wininst` est obsolète depuis Python 3.8." - -#: distutils/builtdist.rst:311 distutils/builtdist.rst:479 -msgid "bdist_msi is deprecated since Python 3.9." -msgstr "`bdist_msi` est obsolète depuis Python 3.9." - -#: distutils/builtdist.rst:155 +#: distutils/builtdist.rst:142 msgid "" "The following sections give details on the individual :command:`bdist_\\*` " "commands." @@ -409,11 +373,11 @@ msgstr "" "Le chapitre suivant donne des détails individuel sur les commandes :command:" "`bdist_\\*`." -#: distutils/builtdist.rst:171 +#: distutils/builtdist.rst:158 msgid "Creating RPM packages" msgstr "Créer un paquet RPM" -#: distutils/builtdist.rst:173 +#: distutils/builtdist.rst:160 msgid "" "The RPM format is used by many popular Linux distributions, including Red " "Hat, SuSE, and Mandrake. If one of these (or any of the other RPM-based " @@ -431,7 +395,7 @@ msgstr "" "entre les distributions Linux, vous pourrez aussi créer des RPM qui " "fonctionneront sur des distributions RPM différentes." -#: distutils/builtdist.rst:180 +#: distutils/builtdist.rst:167 msgid "" "The usual way to create an RPM of your module distribution is to run the :" "command:`bdist_rpm` command::" @@ -439,11 +403,11 @@ msgstr "" "La manière habituelle de créer un RPM de votre module est d'utiliser la " "commande :command:`bdist_rpm` ::" -#: distutils/builtdist.rst:185 +#: distutils/builtdist.rst:172 msgid "or the :command:`bdist` command with the :option:`!--format` option::" msgstr "ou la commande :command:`bdist` avec l'option :option:`!--format` ::" -#: distutils/builtdist.rst:189 +#: distutils/builtdist.rst:176 msgid "" "The former allows you to specify RPM-specific options; the latter allows " "you to easily specify multiple formats in one run. If you need to do both, " @@ -455,7 +419,7 @@ msgstr "" "avez besoin d'utiliser les deux, vous pouvez explicitement spécifier " "plusieurs commandes :command:`bdist_\\*` et leurs options ::" -#: distutils/builtdist.rst:196 +#: distutils/builtdist.rst:182 msgid "" "Creating RPM packages is driven by a :file:`.spec` file, much as using the " "Distutils is driven by the setup script. To make your life easier, the :" @@ -472,43 +436,43 @@ msgstr "" "Beaucoup d'options du fichier :file:`.spec` sont dérivées des options du " "script de préparation suivant :" -#: distutils/builtdist.rst:228 +#: distutils/builtdist.rst:214 msgid "RPM :file:`.spec` file option or section" msgstr "Option de fichier RPM :file:`.spec`" -#: distutils/builtdist.rst:204 +#: distutils/builtdist.rst:190 msgid "Distutils setup script option" msgstr "Options du script de préparation Distutils" -#: distutils/builtdist.rst:206 +#: distutils/builtdist.rst:192 msgid "Name" msgstr "Nom" -#: distutils/builtdist.rst:206 +#: distutils/builtdist.rst:192 msgid "``name``" msgstr "``name``" -#: distutils/builtdist.rst:208 +#: distutils/builtdist.rst:194 msgid "Summary (in preamble)" msgstr "*Summary* (dans le préambule)" -#: distutils/builtdist.rst:208 +#: distutils/builtdist.rst:194 msgid "``description``" msgstr "``description``" -#: distutils/builtdist.rst:210 +#: distutils/builtdist.rst:196 msgid "Version" msgstr "Version" -#: distutils/builtdist.rst:210 +#: distutils/builtdist.rst:196 msgid "``version``" msgstr "``version``" -#: distutils/builtdist.rst:235 +#: distutils/builtdist.rst:221 msgid "Vendor" msgstr "Vendor" -#: distutils/builtdist.rst:212 +#: distutils/builtdist.rst:198 msgid "" "``author`` and ``author_email``, or --- & ``maintainer`` and " "``maintainer_email``" @@ -516,31 +480,31 @@ msgstr "" "``author`` et ``author_email``, ou --- & ``maintainer`` et " "``maintainer_email``" -#: distutils/builtdist.rst:216 +#: distutils/builtdist.rst:202 msgid "Copyright" msgstr "Copyright" -#: distutils/builtdist.rst:216 +#: distutils/builtdist.rst:202 msgid "``license``" msgstr "``license``" -#: distutils/builtdist.rst:218 +#: distutils/builtdist.rst:204 msgid "Url" msgstr "Url" -#: distutils/builtdist.rst:218 +#: distutils/builtdist.rst:204 msgid "``url``" msgstr "``url``" -#: distutils/builtdist.rst:220 +#: distutils/builtdist.rst:206 msgid "%description (section)" msgstr "%description (section)" -#: distutils/builtdist.rst:220 +#: distutils/builtdist.rst:206 msgid "``long_description``" msgstr "``long_description``" -#: distutils/builtdist.rst:223 +#: distutils/builtdist.rst:209 msgid "" "Additionally, there are many options in :file:`.spec` files that don't have " "corresponding options in the setup script. Most of these are handled " @@ -550,116 +514,116 @@ msgstr "" "aucun équivalent dans le script de préparation. La plupart de celles ci sont " "gérées par les options de la commande :command:`bdist_rpm` suivant :" -#: distutils/builtdist.rst:228 +#: distutils/builtdist.rst:214 msgid ":command:`bdist_rpm` option" msgstr "Option de :command:`bdist_rpm`" -#: distutils/builtdist.rst:228 +#: distutils/builtdist.rst:214 msgid "default value" msgstr "valeur par défaut" -#: distutils/builtdist.rst:231 +#: distutils/builtdist.rst:217 msgid "Release" msgstr "Version" -#: distutils/builtdist.rst:231 +#: distutils/builtdist.rst:217 msgid "``release``" msgstr "``release``" -#: distutils/builtdist.rst:231 +#: distutils/builtdist.rst:217 msgid "\"1\"" msgstr "\"1\"" -#: distutils/builtdist.rst:233 +#: distutils/builtdist.rst:219 msgid "Group" msgstr "Group" -#: distutils/builtdist.rst:233 +#: distutils/builtdist.rst:219 msgid "``group``" msgstr "``group``" -#: distutils/builtdist.rst:233 +#: distutils/builtdist.rst:219 msgid "\"Development/Libraries\"" msgstr "\"Développement/Bibliothèques\"" -#: distutils/builtdist.rst:235 +#: distutils/builtdist.rst:221 msgid "``vendor``" msgstr "``vendor``" -#: distutils/builtdist.rst:235 +#: distutils/builtdist.rst:221 msgid "(see above)" msgstr "(voir au-dessus)" -#: distutils/builtdist.rst:237 +#: distutils/builtdist.rst:223 msgid "Packager" msgstr "Packager" -#: distutils/builtdist.rst:237 +#: distutils/builtdist.rst:223 msgid "``packager``" msgstr "``packager``" -#: distutils/builtdist.rst:239 distutils/builtdist.rst:243 -#: distutils/builtdist.rst:247 distutils/builtdist.rst:251 +#: distutils/builtdist.rst:225 distutils/builtdist.rst:229 +#: distutils/builtdist.rst:233 distutils/builtdist.rst:237 msgid "(none)" msgstr "(none)" -#: distutils/builtdist.rst:239 +#: distutils/builtdist.rst:225 msgid "Provides" msgstr "Provides" -#: distutils/builtdist.rst:239 +#: distutils/builtdist.rst:225 msgid "``provides``" msgstr "``provides``" -#: distutils/builtdist.rst:241 +#: distutils/builtdist.rst:227 msgid "Requires" msgstr "Requires" -#: distutils/builtdist.rst:241 +#: distutils/builtdist.rst:227 msgid "``requires``" msgstr "``requires``" -#: distutils/builtdist.rst:243 +#: distutils/builtdist.rst:229 msgid "Conflicts" msgstr "Conflicts" -#: distutils/builtdist.rst:243 +#: distutils/builtdist.rst:229 msgid "``conflicts``" msgstr "``conflicts``" -#: distutils/builtdist.rst:245 +#: distutils/builtdist.rst:231 msgid "Obsoletes" msgstr "Obsoletes" -#: distutils/builtdist.rst:245 +#: distutils/builtdist.rst:231 msgid "``obsoletes``" msgstr "``obsoletes``" -#: distutils/builtdist.rst:247 +#: distutils/builtdist.rst:233 msgid "Distribution" msgstr "Distribution" -#: distutils/builtdist.rst:247 +#: distutils/builtdist.rst:233 msgid "``distribution_name``" msgstr "``distribution_name``" -#: distutils/builtdist.rst:249 +#: distutils/builtdist.rst:235 msgid "BuildRequires" msgstr "BuildRequires" -#: distutils/builtdist.rst:249 +#: distutils/builtdist.rst:235 msgid "``build_requires``" msgstr "``build_requires``" -#: distutils/builtdist.rst:251 +#: distutils/builtdist.rst:237 msgid "Icon" msgstr "Icon" -#: distutils/builtdist.rst:251 +#: distutils/builtdist.rst:237 msgid "``icon``" msgstr "``icon``" -#: distutils/builtdist.rst:254 +#: distutils/builtdist.rst:240 msgid "" "Obviously, supplying even a few of these options on the command-line would " "be tedious and error-prone, so it's usually best to put them in the setup " @@ -679,7 +643,7 @@ msgstr "" "pydistutils.cfg`). Si vous voulez temporairement désactiver ce fichier, vous " "pouvez passer l'option :option:`!--no-user-cfg` à :file:`setup.py`." -#: distutils/builtdist.rst:262 +#: distutils/builtdist.rst:248 msgid "" "There are three steps to building a binary RPM package, all of which are " "handled automatically by the Distutils:" @@ -687,7 +651,7 @@ msgstr "" "La création de binaire RPM se fait en trois étapes, chacune gérée " "automatiquement par Distutils :" -#: distutils/builtdist.rst:265 +#: distutils/builtdist.rst:251 msgid "" "create a :file:`.spec` file, which describes the package (analogous to the " "Distutils setup script; in fact, much of the information in the setup " @@ -697,11 +661,11 @@ msgstr "" "préparation Distutils, en réalité la plupart des informations du script de " "préparation se retrouve dans le fichier :file:`.spec`)" -#: distutils/builtdist.rst:269 +#: distutils/builtdist.rst:255 msgid "create the source RPM" msgstr "crée un RPM source" -#: distutils/builtdist.rst:271 +#: distutils/builtdist.rst:257 msgid "" "create the \"binary\" RPM (which may or may not contain binary code, " "depending on whether your module distribution contains Python extensions)" @@ -709,7 +673,7 @@ msgstr "" "crée le RPM \"binaire\" (qui peut ou non contenir des binaires, tout dépend " "de si votre module contiens des extensions)" -#: distutils/builtdist.rst:274 +#: distutils/builtdist.rst:260 msgid "" "Normally, RPM bundles the last two steps together; when you use the " "Distutils, all three steps are typically bundled together." @@ -717,7 +681,7 @@ msgstr "" "Normalement, RPM réunit les deux dernières étapes ensemble ; quand vous " "utilisez Distutils, les trois étapes sont regroupées." -#: distutils/builtdist.rst:277 +#: distutils/builtdist.rst:263 msgid "" "If you wish, you can separate these three steps. You can use the :option:" "`!--spec-only` option to make :command:`bdist_rpm` just create the :file:`." @@ -736,114 +700,11 @@ msgstr "" "fichier :file:`.spec` se retrouve profondément enfoui dans l'arborescence, " "dans un dossier temporaire créé par la commande :command:`bdist_rpm`.)" -#: distutils/builtdist.rst:305 -msgid "Creating Windows Installers" -msgstr "Créer un installateur Windows" - -#: distutils/builtdist.rst:313 -msgid "" -"Executable installers are the natural format for binary distributions on " -"Windows. They display a nice graphical user interface, display some " -"information about the module distribution to be installed taken from the " -"metadata in the setup script, let the user select a few options, and start " -"or cancel the installation." -msgstr "" -"Les installateurs exécutables sont le format naturel pour les distributions " -"sur Windows. Ils affichent une jolie interface graphique, montrent quelques " -"informations à propos du module qui va être installé, tiré des métadonnées " -"dans le script de préparation, laisse l'utilisateur choisir quelques options " -"et démarrer ou annuler l'installation." - -#: distutils/builtdist.rst:319 -msgid "" -"Since the metadata is taken from the setup script, creating Windows " -"installers is usually as easy as running::" -msgstr "" -"Étant donné que les métadonnées sont tirées du script de préparation, créer " -"un installateur Windows est généralement facile, il suffit de lancer ::" - -#: distutils/builtdist.rst:324 -msgid "or the :command:`bdist` command with the :option:`!--formats` option::" -msgstr "ou la commande :command:`bdist` avec l'option :option:`!--formats` ::" - -#: distutils/builtdist.rst:328 -msgid "" -"If you have a pure module distribution (only containing pure Python modules " -"and packages), the resulting installer will be version independent and have " -"a name like :file:`foo-1.0.win32.exe`. Note that creating ``wininst`` binary " -"distributions in only supported on Windows systems." -msgstr "" -"Si vous avez une distribution de modules purs (contenant seulement des " -"modules et des packages en Python pur), l'installateur produit n'est lié à " -"aucune version de Python et a un nom du type :file:`foo-1.0.win32.exe`. " -"Notez que la création de distributions binaires ``wininst`` n'est prise en " -"charge que sur les systèmes Windows." - -#: distutils/builtdist.rst:333 -msgid "" -"If you have a non-pure distribution, the extensions can only be created on a " -"Windows platform, and will be Python version dependent. The installer " -"filename will reflect this and now has the form :file:`foo-1.0.win32-py2.0." -"exe`. You have to create a separate installer for every Python version you " -"want to support." -msgstr "" -"Si vous avez une distribution \"non-pure\", l'extension peut être créée " -"uniquement pour les plateformes Windows et sera lié à une version de Python. " -"Le nom de l'installateur reflétera ça et sera de format :file:`foo-1.0.win32-" -"py2.0.exe`. Vous devrez créer un installateur pour chaque version de Python " -"que vous voulez supporter." - -#: distutils/builtdist.rst:339 -msgid "" -"The installer will try to compile pure modules into :term:`bytecode` after " -"installation on the target system in normal and optimizing mode. If you " -"don't want this to happen for some reason, you can run the :command:" -"`bdist_wininst` command with the :option:`!--no-target-compile` and/or the :" -"option:`!--no-target-optimize` option." -msgstr "" -"L'installeur essaiera de compiler les modules purs en :term:`bytecode` après " -"installation sur le système cible dans les modes normaux et optimisé. Si " -"vous ne voulez pas que ce soit fait, vous pouvez lancer la commande :command:" -"`bdist_wininst` avec l'option :option:`!--no-target-compile` et/ou l'option :" -"option:`!--no-target-optimize`." - -#: distutils/builtdist.rst:345 -msgid "" -"By default the installer will display the cool \"Python Powered\" logo when " -"it is run, but you can also supply your own 152x261 bitmap which must be a " -"Windows :file:`.bmp` file with the :option:`!--bitmap` option." -msgstr "" -"Par défaut l'installateur affichera le super logo \"Python Powered\", mais " -"vous pouvez aussi donnez votre propre bitmap de *152×261* qui doit être un " -"fichier :file:`.bmp` Windows avec l'option :option:`!--bitmap`." - -#: distutils/builtdist.rst:349 -msgid "" -"The installer will also display a large title on the desktop background " -"window when it is run, which is constructed from the name of your " -"distribution and the version number. This can be changed to another text by " -"using the :option:`!--title` option." -msgstr "" -"L'installateur affichera aussi un grand titre en arrière plan de la fenêtre " -"quand exécuté, qui est composé du nom de votre distribution et du numéro de " -"version. Cela peut être changé avec un autre texte avec l'option :option:`!--" -"title`." - -#: distutils/builtdist.rst:354 -msgid "" -"The installer file will be written to the \"distribution directory\" --- " -"normally :file:`dist/`, but customizable with the :option:`!--dist-dir` " -"option." -msgstr "" -"Le fichier d'installation sera écrit dans le dossier de distribution " -"(\"*distribution directory*\") --- normalement :file:`dist/`, mais " -"personnalisable avec l'option :option:`!--dist-dir`." - -#: distutils/builtdist.rst:360 +#: distutils/builtdist.rst:291 msgid "Cross-compiling on Windows" msgstr "Compiler pour toute les plateformes Windows" -#: distutils/builtdist.rst:362 +#: distutils/builtdist.rst:293 msgid "" "Starting with Python 2.6, distutils is capable of cross-compiling between " "Windows platforms. In practice, this means that with the correct tools " @@ -855,7 +716,7 @@ msgstr "" "installés, vous pouvez utiliser une version 32 bits de Windows pour créer " "une extension 64 bits et vice-versa." -#: distutils/builtdist.rst:367 +#: distutils/builtdist.rst:298 msgid "" "To build for an alternate platform, specify the :option:`!--plat-name` " "option to the build command. Valid values are currently 'win32', and 'win-" @@ -866,15 +727,11 @@ msgstr "" "actuellement **'win32'**, et **'win-amd64'**. Par exemple, sur une version " "*32bit* de Windows, vous pourriez exécuter ::" -#: distutils/builtdist.rst:373 -msgid "" -"to build a 64bit version of your extension. The Windows Installers also " -"support this option, so the command::" +#: distutils/builtdist.rst:304 +msgid "to build a 64bit version of your extension." msgstr "" -"pour construire une version 64 bits de votre module. L'installateur Windows " -"supporte aussi cette option, donc la commande ::" -#: distutils/builtdist.rst:378 +#: distutils/builtdist.rst:306 msgid "" "would create a 64bit installation executable on your 32bit version of " "Windows." @@ -882,7 +739,7 @@ msgstr "" "créera un installateur exécutable 64 bits depuis votre version 32 bits de " "Windows." -#: distutils/builtdist.rst:380 +#: distutils/builtdist.rst:308 msgid "" "To cross-compile, you must download the Python source code and cross-compile " "Python itself for the platform you are targeting - it is not possible from a " @@ -902,7 +759,7 @@ msgstr "" "l'arborescence des sources de Python et construire la version *x64* du " "projet *pythoncore* avant de pouvoir compiler son extension." -#: distutils/builtdist.rst:389 +#: distutils/builtdist.rst:317 msgid "" "Note that by default, Visual Studio 2008 does not install 64bit compilers or " "tools. You may need to reexecute the Visual Studio setup process and select " @@ -915,11 +772,11 @@ msgstr "" "> [Ajouter/Supprimer]* est un bon moyen de vérifier ou modifier votre " "installation existante.)" -#: distutils/builtdist.rst:397 +#: distutils/builtdist.rst:325 msgid "The Postinstallation script" msgstr "Le script de post-installation" -#: distutils/builtdist.rst:399 +#: distutils/builtdist.rst:327 msgid "" "Starting with Python 2.3, a postinstallation script can be specified with " "the :option:`!--install-script` option. The basename of the script must be " @@ -930,7 +787,7 @@ msgstr "" "l'option :option:`!--install-script`. Le nom du script doit être spécifié et " "présent dans l'argument \"scripts\" de la fonction ``setup``." -#: distutils/builtdist.rst:404 +#: distutils/builtdist.rst:332 msgid "" "This script will be run at installation time on the target system after all " "the files have been copied, with ``argv[1]`` set to :option:`!-install`, and " @@ -943,7 +800,7 @@ msgstr "" "que les fichiers soient supprimés avec la valeur de ``argv[1]`` à :option:`!-" "remove`." -#: distutils/builtdist.rst:409 +#: distutils/builtdist.rst:337 msgid "" "The installation script runs embedded in the windows installer, every output " "(``sys.stdout``, ``sys.stderr``) is redirected into a buffer and will be " @@ -953,7 +810,7 @@ msgstr "" "chaque sortie (``sys.stdout``, ``sys.stderr``) est redirigé dans le tampon " "et sera affiché dans le GUI après que les scripts soient finis." -#: distutils/builtdist.rst:413 +#: distutils/builtdist.rst:341 msgid "" "Some functions especially useful in this context are available as additional " "built-in functions in the installation script." @@ -961,7 +818,7 @@ msgstr "" "Certaines fonctions spécialement utiles dans ce contexte sont disponibles " "comme fonctions natives additionnelles dans le script d'installation." -#: distutils/builtdist.rst:420 +#: distutils/builtdist.rst:348 msgid "" "These functions should be called when a directory or file is created by the " "postinstall script at installation time. It will register *path* with the " @@ -974,7 +831,7 @@ msgstr "" "lors de la des-installation de la distribution. pour être sûr, les " "répertoires sont uniquement retirés s'ils sont vides." -#: distutils/builtdist.rst:428 +#: distutils/builtdist.rst:356 msgid "" "This function can be used to retrieve special folder locations on Windows " "like the Start Menu or the Desktop. It returns the full path to the folder. " @@ -985,11 +842,11 @@ msgstr "" "renvoie le chemin complet pour le fichier. *csidl_string* doit être unes des " "chaines suivantes ::" -#: distutils/builtdist.rst:448 +#: distutils/builtdist.rst:376 msgid "If the folder cannot be retrieved, :exc:`OSError` is raised." msgstr "Si le fichier ne peut être extrait, :exc:`OSError` est obtenu.." -#: distutils/builtdist.rst:450 +#: distutils/builtdist.rst:378 msgid "" "Which folders are available depends on the exact Windows version, and " "probably also the configuration. For details refer to Microsoft's " @@ -999,7 +856,7 @@ msgstr "" "probablement aussi de la configuration. pour des détails se référer à la " "documentation Microsoft de la fonction :c:func:`SHGetSpecialFolderPath`." -#: distutils/builtdist.rst:457 +#: distutils/builtdist.rst:385 msgid "" "This function creates a shortcut. *target* is the path to the program to be " "started by the shortcut. *description* is the description of the shortcut. " @@ -1019,21 +876,150 @@ msgstr "" "l’icône dans le fichier *cheminIcone*. Encore, pour les détails consulter la " "documentation Microsoft pour l'interface :class:`ILienShell`." -#: distutils/builtdist.rst:468 -msgid "Vista User Access Control (UAC)" -msgstr "Contrôle d'accès utilisateur Vista (UAC)" - -#: distutils/builtdist.rst:470 -msgid "" -"Starting with Python 2.6, bdist_wininst supports a :option:`!--user-access-" -"control` option. The default is 'none' (meaning no UAC handling is done), " -"and other valid values are 'auto' (meaning prompt for UAC elevation if " -"Python was installed for all users) and 'force' (meaning always prompt for " -"elevation)." -msgstr "" -"Depuis Python 2.6, *bdist_wininst* accepte une option :option:`!--user-" -"access-control`. Sa valeur par défaut est 'none' (Ce qui veut dire que aucun " -"UAC est fait), et les autres valeurs valides sont 'auto' (ce qui veut dire " -"qu'il faut demander une élévation de privilèges UAC si Python a été installé " -"pour tous les utilisateurs) et 'force' (Toujours demander une élévation de " -"privilèges)." +#~ msgid ":command:`bdist_msi`" +#~ msgstr ":command:`bdist_msi`" + +#~ msgid "msi" +#~ msgstr "msi" + +#~ msgid "bdist_msi is deprecated since Python 3.9." +#~ msgstr "``bdist_msi`` est obsolète depuis Python 3.9." + +#~ msgid "``wininst``" +#~ msgstr "``wininst``" + +#~ msgid "self-extracting ZIP file for Windows" +#~ msgstr "fichier zip auto-extracteur Windows" + +#~ msgid "\\(4)" +#~ msgstr "\\(4)" + +#~ msgid ":command:`bdist_wininst`" +#~ msgstr ":command:`bdist_wininst`" + +#~ msgid "wininst" +#~ msgstr "`wininst`" + +#~ msgid "bdist_wininst is deprecated since Python 3.8." +#~ msgstr "`bdist_wininst` est obsolète depuis Python 3.8." + +#~ msgid "Creating Windows Installers" +#~ msgstr "Créer un installateur Windows" + +#~ msgid "" +#~ "Executable installers are the natural format for binary distributions on " +#~ "Windows. They display a nice graphical user interface, display some " +#~ "information about the module distribution to be installed taken from the " +#~ "metadata in the setup script, let the user select a few options, and " +#~ "start or cancel the installation." +#~ msgstr "" +#~ "Les installateurs exécutables sont le format naturel pour les " +#~ "distributions sur Windows. Ils affichent une jolie interface graphique, " +#~ "montrent quelques informations à propos du module qui va être installé, " +#~ "tiré des métadonnées dans le script de préparation, laisse l'utilisateur " +#~ "choisir quelques options et démarrer ou annuler l'installation." + +#~ msgid "" +#~ "Since the metadata is taken from the setup script, creating Windows " +#~ "installers is usually as easy as running::" +#~ msgstr "" +#~ "Étant donné que les métadonnées sont tirées du script de préparation, " +#~ "créer un installateur Windows est généralement facile, il suffit de " +#~ "lancer ::" + +#~ msgid "" +#~ "or the :command:`bdist` command with the :option:`!--formats` option::" +#~ msgstr "" +#~ "ou la commande :command:`bdist` avec l'option :option:`!--formats` ::" + +#~ msgid "" +#~ "If you have a pure module distribution (only containing pure Python " +#~ "modules and packages), the resulting installer will be version " +#~ "independent and have a name like :file:`foo-1.0.win32.exe`. Note that " +#~ "creating ``wininst`` binary distributions in only supported on Windows " +#~ "systems." +#~ msgstr "" +#~ "Si vous avez une distribution de modules purs (contenant seulement des " +#~ "modules et des packages en Python pur), l'installateur produit n'est lié " +#~ "à aucune version de Python et a un nom du type :file:`foo-1.0.win32.exe`. " +#~ "Notez que la création de distributions binaires ``wininst`` n'est prise " +#~ "en charge que sur les systèmes Windows." + +#~ msgid "" +#~ "If you have a non-pure distribution, the extensions can only be created " +#~ "on a Windows platform, and will be Python version dependent. The " +#~ "installer filename will reflect this and now has the form :file:`foo-1.0." +#~ "win32-py2.0.exe`. You have to create a separate installer for every " +#~ "Python version you want to support." +#~ msgstr "" +#~ "Si vous avez une distribution \"non-pure\", l'extension peut être créée " +#~ "uniquement pour les plateformes Windows et sera lié à une version de " +#~ "Python. Le nom de l'installateur reflétera ça et sera de format :file:" +#~ "`foo-1.0.win32-py2.0.exe`. Vous devrez créer un installateur pour chaque " +#~ "version de Python que vous voulez supporter." + +#~ msgid "" +#~ "The installer will try to compile pure modules into :term:`bytecode` " +#~ "after installation on the target system in normal and optimizing mode. " +#~ "If you don't want this to happen for some reason, you can run the :" +#~ "command:`bdist_wininst` command with the :option:`!--no-target-compile` " +#~ "and/or the :option:`!--no-target-optimize` option." +#~ msgstr "" +#~ "L'installeur essaiera de compiler les modules purs en :term:`bytecode` " +#~ "après installation sur le système cible dans les modes normaux et " +#~ "optimisé. Si vous ne voulez pas que ce soit fait, vous pouvez lancer la " +#~ "commande :command:`bdist_wininst` avec l'option :option:`!--no-target-" +#~ "compile` et/ou l'option :option:`!--no-target-optimize`." + +#~ msgid "" +#~ "By default the installer will display the cool \"Python Powered\" logo " +#~ "when it is run, but you can also supply your own 152x261 bitmap which " +#~ "must be a Windows :file:`.bmp` file with the :option:`!--bitmap` option." +#~ msgstr "" +#~ "Par défaut l'installateur affichera le super logo \"Python Powered\", " +#~ "mais vous pouvez aussi donnez votre propre bitmap de *152×261* qui doit " +#~ "être un fichier :file:`.bmp` Windows avec l'option :option:`!--bitmap`." + +#~ msgid "" +#~ "The installer will also display a large title on the desktop background " +#~ "window when it is run, which is constructed from the name of your " +#~ "distribution and the version number. This can be changed to another text " +#~ "by using the :option:`!--title` option." +#~ msgstr "" +#~ "L'installateur affichera aussi un grand titre en arrière plan de la " +#~ "fenêtre quand exécuté, qui est composé du nom de votre distribution et du " +#~ "numéro de version. Cela peut être changé avec un autre texte avec " +#~ "l'option :option:`!--title`." + +#~ msgid "" +#~ "The installer file will be written to the \"distribution directory\" --- " +#~ "normally :file:`dist/`, but customizable with the :option:`!--dist-dir` " +#~ "option." +#~ msgstr "" +#~ "Le fichier d'installation sera écrit dans le dossier de distribution " +#~ "(\"*distribution directory*\") --- normalement :file:`dist/`, mais " +#~ "personnalisable avec l'option :option:`!--dist-dir`." + +#~ msgid "" +#~ "to build a 64bit version of your extension. The Windows Installers also " +#~ "support this option, so the command::" +#~ msgstr "" +#~ "pour construire une version 64 bits de votre module. L'installateur " +#~ "Windows supporte aussi cette option, donc la commande ::" + +#~ msgid "Vista User Access Control (UAC)" +#~ msgstr "Contrôle d'accès utilisateur Vista (UAC)" + +#~ msgid "" +#~ "Starting with Python 2.6, bdist_wininst supports a :option:`!--user-" +#~ "access-control` option. The default is 'none' (meaning no UAC handling " +#~ "is done), and other valid values are 'auto' (meaning prompt for UAC " +#~ "elevation if Python was installed for all users) and 'force' (meaning " +#~ "always prompt for elevation)." +#~ msgstr "" +#~ "Depuis Python 2.6, *bdist_wininst* accepte une option :option:`!--user-" +#~ "access-control`. Sa valeur par défaut est 'none' (Ce qui veut dire que " +#~ "aucun UAC est fait), et les autres valeurs valides sont 'auto' (ce qui " +#~ "veut dire qu'il faut demander une élévation de privilèges UAC si Python a " +#~ "été installé pour tous les utilisateurs) et 'force' (Toujours demander " +#~ "une élévation de privilèges)." diff --git a/distutils/extending.po b/distutils/extending.po index cb50f1ea9d..3c447134a9 100644 --- a/distutils/extending.po +++ b/distutils/extending.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2020-02-04 21:20+0100\n" +"PO-Revision-Date: 2021-12-11 12:35+0100\n" "Last-Translator: ZepmanBC \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -140,7 +140,7 @@ msgstr "" "être fixée dans la section ``[global]`` d'un fichier de configuration, ou " "avant n'importe quelle commande dans un shell. Si définie dans un fichier de " "configuration, elle peut être écrasée depuis la ligne de commande. Mettre " -"une chaine de caractères vide en valeur de cette option forcera " +"une chaîne de caractères vide en valeur de cette option forcera " "l'utilisation de la valeur par défaut. Cela ne devrait jamais être fixé dans " "un fichier de configuration donné avec un paquet." diff --git a/distutils/index.po b/distutils/index.po index f3179492e1..1e69bc4e61 100644 --- a/distutils/index.po +++ b/distutils/index.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" "PO-Revision-Date: 2021-01-28 15:55+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -43,6 +43,14 @@ msgstr ":ref:`distributing-index`" msgid "The up to date module distribution documentations" msgstr "La documentation actuelle de distribution de modules" +#: distutils/index.rst:17 +msgid "" +"The entire ``distutils`` package has been deprecated and will be removed in " +"Python 3.12. This documentation is retained as a reference only, and will be " +"removed with the package. See the :ref:`What's New ` " +"entry for more information." +msgstr "" + #: distutils/_setuptools_disclaimer.rst:3 msgid "" "This document is being retained solely until the ``setuptools`` " @@ -54,7 +62,7 @@ msgstr "" "html couvre de manière indépendante toutes les informations pertinentes " "actuellement incluses ici." -#: distutils/index.rst:19 +#: distutils/index.rst:26 msgid "" "This guide only covers the basic tools for building and distributing " "extensions that are provided as part of this version of Python. Third party " @@ -69,7 +77,7 @@ msgstr "" "recommendations/>`__ dans le *Python Packaging User Guide* pour plus " "d'informations." -#: distutils/index.rst:25 +#: distutils/index.rst:32 msgid "" "This document describes the Python Distribution Utilities (\"Distutils\") " "from the module developer's point of view, describing the underlying " diff --git a/distutils/introduction.po b/distutils/introduction.po index a4c38e32f4..b21a656223 100644 --- a/distutils/introduction.po +++ b/distutils/introduction.po @@ -3,10 +3,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Python 3.8\n" +"Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2020-03-23 14:58+0100\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2022-10-18 12:31+0200\n" "Last-Translator: Eric Régnier \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -119,7 +119,7 @@ msgstr "" "pas ?). Veillez d'ailleurs à ne pas surcharger ce script avec des opérations " "coûteuses car, contrairement aux scripts de configuration façon Autoconf, le " "script d'installation peut être amené à être exécuté plusieurs fois au cours " -"de la compilation et de l'installation du module. " +"de la compilation et de l'installation du module." #: distutils/introduction.rst:58 msgid "" @@ -140,7 +140,7 @@ msgid "" "arguments to the :func:`setup` function" msgstr "" "la plupart des informations que vous fournissez à Distutils sont fournies en " -"tant que qu'arguments nommés à la fonction :func:`setup`;" +"tant qu'arguments nommés à la fonction :func:`setup`;" #: distutils/introduction.rst:72 msgid "" @@ -150,7 +150,7 @@ msgid "" msgstr "" "ces arguments nommés tombent dans deux catégories : métadonnées du paquet " "(nom, numéro de version) et des informations sur le contenu du paquet paquet " -"(une liste de purs modules Python, dans ce cas) ; " +"(une liste de purs modules Python, dans ce cas) ;" #: distutils/introduction.rst:76 msgid "" @@ -239,31 +239,6 @@ msgstr "" #: distutils/introduction.rst:115 msgid "" -"If you want to make things really easy for your users, you can create one or " -"more built distributions for them. For instance, if you are running on a " -"Windows machine, and want to make things easy for other Windows users, you " -"can create an executable installer (the most appropriate type of built " -"distribution for this platform) with the :command:`bdist_wininst` command. " -"For example::" -msgstr "" -"Si vous voulez rendre les choses vraiment faciles pour vos utilisateurs, " -"vous pouvez créer on ou plusieurs distributions compilées pour eux. En " -"l’occurrence, si vous tournez sous une machine Windows, et que vous voulez " -"rendre les choses faciles pour les autres utilisateurs Windows, vous pouvez " -"créer un installateur exécutable (le mode de distribution le plus approprié " -"pour cette plateforme) avec la commande :command:`bdist_wininst`. Par " -"exemple :" - -#: distutils/introduction.rst:123 -msgid "" -"will create an executable installer, :file:`foo-1.0.win32.exe`, in the " -"current directory." -msgstr "" -"va créer une installeur exécutable, :file:`foo-1.0.win32.exe`, dans le " -"répertoire courant." - -#: distutils/introduction.rst:126 -msgid "" "Other useful built distribution formats are RPM, implemented by the :command:" "`bdist_rpm` command, Solaris :program:`pkgtool` (:command:`bdist_pkgtool`), " "and HP-UX :program:`swinstall` (:command:`bdist_sdux`). For example, the " @@ -275,7 +250,7 @@ msgstr "" "exemple, la commande suivante va créer un fichier RPM appelé :file:`foo-1.0." "noarch.rpm`::" -#: distutils/introduction.rst:134 +#: distutils/introduction.rst:123 msgid "" "(The :command:`bdist_rpm` command uses the :command:`rpm` executable, " "therefore this has to be run on an RPM-based system such as Red Hat Linux, " @@ -285,7 +260,7 @@ msgstr "" "cependant cela doit être exécuté sur un système basé sur RPM tel que Red Hat " "Linux, SuSE Linux, or Mandrake Linux.)" -#: distutils/introduction.rst:138 +#: distutils/introduction.rst:127 msgid "" "You can find out what distribution formats are available at any time by " "running ::" @@ -293,11 +268,11 @@ msgstr "" "Vous pouvez trouver quelles sont les formats de distribution disponibles à " "n'importe quel moment en exécutant :" -#: distutils/introduction.rst:147 +#: distutils/introduction.rst:136 msgid "General Python terminology" msgstr "Terminologie Python générale" -#: distutils/introduction.rst:149 +#: distutils/introduction.rst:138 msgid "" "If you're reading this document, you probably have a good idea of what " "modules, extensions, and so forth are. Nevertheless, just to be sure that " @@ -309,11 +284,11 @@ msgstr "" "le monde opère depuis un point d'entrée commun, nous reprécisons le " "glossaire suivant des termes Python communs :" -#: distutils/introduction.rst:157 +#: distutils/introduction.rst:146 msgid "module" msgstr "module" -#: distutils/introduction.rst:155 +#: distutils/introduction.rst:144 msgid "" "the basic unit of code reusability in Python: a block of code imported by " "some other code. Three types of modules concern us here: pure Python " @@ -323,11 +298,11 @@ msgstr "" "un autre code. Trois types de modules nous concernent ici : les purs modules " "Python, les modules d'extension, et les packages." -#: distutils/introduction.rst:162 +#: distutils/introduction.rst:151 msgid "pure Python module" msgstr "pur module Python" -#: distutils/introduction.rst:160 +#: distutils/introduction.rst:149 msgid "" "a module written in Python and contained in a single :file:`.py` file (and " "possibly associated :file:`.pyc` files). Sometimes referred to as a \"pure " @@ -336,11 +311,11 @@ msgstr "" "un module écrit en Python et contenu dans un seul fichier :file:`.py` (et " "possiblement un fichier :file:`.pyc` associé). Parfois appelé \"pur module.\"" -#: distutils/introduction.rst:170 +#: distutils/introduction.rst:159 msgid "extension module" msgstr "module d'extension" -#: distutils/introduction.rst:165 +#: distutils/introduction.rst:154 msgid "" "a module written in the low-level language of the Python implementation: C/C+" "+ for Python, Java for Jython. Typically contained in a single dynamically " @@ -350,19 +325,19 @@ msgid "" "(Note that currently, the Distutils only handles C/C++ extensions for " "Python.)" msgstr "" -"un module écrit dans un langage de bas niveau de l'implémentation Python: C/C" -"++ pour Python, Java pour Jython. Typiquement contenu dans un unique fichier " -"pré-compilé chargeable, p. ex. un fichier objet partagé (:file:`.so`) pour " -"des extensions Python sous Unix, un fichier DLL (étant donné l'extension :" -"file:`.pyd`) pour les extensions Python sous Windows, ou un fichier de " -"classe Java pour les extensions Jython (notez qu'actuellement, Distutils " -"gère seulement les extensions Python C/C++)." - -#: distutils/introduction.rst:175 +"un module écrit dans un langage de bas niveau de l'implémentation Python: C/" +"C++ pour Python, Java pour Jython. Typiquement contenu dans un unique " +"fichier pré-compilé chargeable, p. ex. un fichier objet partagé (:file:`." +"so`) pour des extensions Python sous Unix, un fichier DLL (étant donné " +"l'extension :file:`.pyd`) pour les extensions Python sous Windows, ou un " +"fichier de classe Java pour les extensions Jython (notez qu'actuellement, " +"Distutils gère seulement les extensions Python C/C++)." + +#: distutils/introduction.rst:164 msgid "package" msgstr "paquet" -#: distutils/introduction.rst:173 +#: distutils/introduction.rst:162 msgid "" "a module that contains other modules; typically contained in a directory in " "the filesystem and distinguished from other directories by the presence of a " @@ -372,11 +347,11 @@ msgstr "" "répertoire du système de fichier et qui se distingue des autres répertoires " "par la présence d'un fichier :file:`__init__.py`." -#: distutils/introduction.rst:185 +#: distutils/introduction.rst:174 msgid "root package" msgstr "paquet racine" -#: distutils/introduction.rst:178 +#: distutils/introduction.rst:167 msgid "" "the root of the hierarchy of packages. (This isn't really a package, since " "it doesn't have an :file:`__init__.py` file. But we have to call it " @@ -395,11 +370,11 @@ msgstr "" "plusieurs répertoires : en effet, tous les répertoires listés ``sys.path`` " "contribuent à faire partie du package racine." -#: distutils/introduction.rst:190 +#: distutils/introduction.rst:179 msgid "Distutils-specific terminology" msgstr "Terminologie spécifique à Distutils" -#: distutils/introduction.rst:192 +#: distutils/introduction.rst:181 msgid "" "The following terms apply more specifically to the domain of distributing " "Python modules using the Distutils:" @@ -407,11 +382,11 @@ msgstr "" "Les termes suivant s'appliquent plus spécifiquement au domaine de la " "distribution de modules Python en utilisant les Distutils :" -#: distutils/introduction.rst:201 +#: distutils/introduction.rst:190 msgid "module distribution" msgstr "module de distribution" -#: distutils/introduction.rst:196 +#: distutils/introduction.rst:185 msgid "" "a collection of Python modules distributed together as a single downloadable " "resource and meant to be installed *en masse*. Examples of some well-known " @@ -426,11 +401,11 @@ msgstr "" "soit déjà pris dans le contexte Python : une distribution de module simple " "pourrait contenir zéro, on ou plusieurs packages Python" -#: distutils/introduction.rst:205 +#: distutils/introduction.rst:194 msgid "pure module distribution" msgstr "distribution de modules purs" -#: distutils/introduction.rst:204 +#: distutils/introduction.rst:193 msgid "" "a module distribution that contains only pure Python modules and packages. " "Sometimes referred to as a \"pure distribution.\"" @@ -438,11 +413,11 @@ msgstr "" "une distribution de module qui contient seulement des modules purs et " "packages Python. Parfois appelée « distribution pure »." -#: distutils/introduction.rst:209 +#: distutils/introduction.rst:198 msgid "non-pure module distribution" msgstr "distribution de module non pur" -#: distutils/introduction.rst:208 +#: distutils/introduction.rst:197 msgid "" "a module distribution that contains at least one extension module. " "Sometimes referred to as a \"non-pure distribution.\"" @@ -450,11 +425,11 @@ msgstr "" "une distribution de module qui contient au moins un module d'extension. " "Parfois appelée « distribution non-pure »." -#: distutils/introduction.rst:213 +#: distutils/introduction.rst:202 msgid "distribution root" msgstr "distribution racine" -#: distutils/introduction.rst:212 +#: distutils/introduction.rst:201 msgid "" "the top-level directory of your source tree (or source distribution); the " "directory where :file:`setup.py` exists. Generally :file:`setup.py` will " @@ -463,3 +438,26 @@ msgstr "" "le répertoire de plus haut niveau de votre arborescence (ou distribution " "source) ; le répertoire ou :file:`setup.py` existe. Généralement :file:" "`setup.py` est exécuté depuis ce répertoire." + +#~ msgid "" +#~ "If you want to make things really easy for your users, you can create one " +#~ "or more built distributions for them. For instance, if you are running " +#~ "on a Windows machine, and want to make things easy for other Windows " +#~ "users, you can create an executable installer (the most appropriate type " +#~ "of built distribution for this platform) with the :command:" +#~ "`bdist_wininst` command. For example::" +#~ msgstr "" +#~ "Si vous voulez rendre les choses vraiment faciles pour vos utilisateurs, " +#~ "vous pouvez créer on ou plusieurs distributions compilées pour eux. En " +#~ "l’occurrence, si vous tournez sous une machine Windows, et que vous " +#~ "voulez rendre les choses faciles pour les autres utilisateurs Windows, " +#~ "vous pouvez créer un installateur exécutable (le mode de distribution le " +#~ "plus approprié pour cette plateforme) avec la commande :command:" +#~ "`bdist_wininst`. Par exemple :" + +#~ msgid "" +#~ "will create an executable installer, :file:`foo-1.0.win32.exe`, in the " +#~ "current directory." +#~ msgstr "" +#~ "va créer une installeur exécutable, :file:`foo-1.0.win32.exe`, dans le " +#~ "répertoire courant." diff --git a/distutils/setupscript.po b/distutils/setupscript.po index 699a6ac282..5bbe202dcf 100644 --- a/distutils/setupscript.po +++ b/distutils/setupscript.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2020-04-16 22:30+0200\n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2022-10-18 16:06+0200\n" "Last-Translator: Philippe GALVAN\n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -894,7 +894,7 @@ msgstr "" "au répertoire contenant le paquet (l'information du mappage ``package_dir`` " "est utilisée le cas échéant) ; ceci étant, il convient que les fichiers " "fassent partie du répertoire source du paquet. Ils peuvent également " -"contenir des motifs `glob`." +"contenir des motifs ``glob``." #: distutils/setupscript.rst:484 msgid "" @@ -983,7 +983,7 @@ msgstr "" "installations ``système`` ; ``site.USER_BASE`` pour les installations " "``utilisateur``). *Distutils* permet à *répertoire* d'être un chemin " "d'installation absolu, mais cela est déconseillé dans la mesure où c'est " -"incompatible avec la mise au format `wheel` du paquet. Aucune information de " +"incompatible avec la mise au format *wheel* du paquet. Aucune information de " "répertoire provenant de *fichiers* n'est utilisée pour déterminer " "l’emplacement final d'installation du fichier ; seul le nom du fichier est " "utilisé." @@ -1262,7 +1262,7 @@ msgid "" "``['foo', 'bar']``, Otherwise, it will be converted to a list of one string." msgstr "" "Pour préserver la rétrocompatibilité, ce champ accepte aussi une chaîne de " -"caractères. Si vous passez une chaine de caractères séparée par des virgules " +"caractères. Si vous passez une chaîne de caractères séparée par des virgules " "``'truc, machin'``, elle sera convertie en ``['truc', 'machin']``, " "Autrement, elle sera convertie en une liste d'une chaîne de caractères." diff --git a/distutils/sourcedist.po b/distutils/sourcedist.po index 287064dae9..ece1130b5c 100644 --- a/distutils/sourcedist.po +++ b/distutils/sourcedist.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2020-02-04 21:21+0100\n" "Last-Translator: ZepmanBC \n" "Language-Team: FRENCH \n" @@ -110,6 +110,10 @@ msgstr "``bztar``" msgid "bzip2'ed tar file (:file:`.tar.bz2`)" msgstr "Fichier *tar* compressé par *bzip2* (:file:`.tar.bz2`)" +#: distutils/sourcedist.rst:37 distutils/sourcedist.rst:43 +msgid "\\(5)" +msgstr "" + #: distutils/sourcedist.rst:37 msgid "``xztar``" msgstr "``xztar``" @@ -127,8 +131,8 @@ msgid "compressed tar file (:file:`.tar.Z`)" msgstr "Fichier *tar* compressé par *compress* (:file:`.tar.Z`)" #: distutils/sourcedist.rst:40 -msgid "\\(4)" -msgstr "\\(4)" +msgid "(4),(5)" +msgstr "" #: distutils/sourcedist.rst:43 msgid "``tar``" @@ -172,6 +176,12 @@ msgstr "" #: distutils/sourcedist.rst:65 msgid "" +"deprecated by `PEP 527 `_; `PyPI `_ only accepts ``.zip`` and ``.tar.gz`` files." +msgstr "" + +#: distutils/sourcedist.rst:68 +msgid "" "When using any ``tar`` format (``gztar``, ``bztar``, ``xztar``, ``ztar`` or " "``tar``), under Unix you can specify the ``owner`` and ``group`` names that " "will be set for each member of the archive." @@ -181,17 +191,17 @@ msgstr "" "propriétaire et le groupe qui seront appliqué pour chaque fichier de " "l'archive." -#: distutils/sourcedist.rst:69 +#: distutils/sourcedist.rst:72 msgid "For example, if you want all files of the archive to be owned by root::" msgstr "" "Par exemple, si vous voulez que tous les fichiers de l'archive soient détenu " "par *root* ::" -#: distutils/sourcedist.rst:77 +#: distutils/sourcedist.rst:80 msgid "Specifying the files to distribute" msgstr "Spécifier les fichiers à distribuer" -#: distutils/sourcedist.rst:79 +#: distutils/sourcedist.rst:82 msgid "" "If you don't supply an explicit list of files (or instructions on how to " "generate one), the :command:`sdist` command puts a minimal default set into " @@ -201,7 +211,7 @@ msgstr "" "instructions pour la générer), la commande :command:`sdist` en met par " "défaut le minimum dans la distribution source :" -#: distutils/sourcedist.rst:83 +#: distutils/sourcedist.rst:86 msgid "" "all Python source files implied by the ``py_modules`` and ``packages`` " "options" @@ -209,14 +219,14 @@ msgstr "" "tous les fichiers source Python sous-entendus par les options ``py_modules`` " "et ``packages``" -#: distutils/sourcedist.rst:86 +#: distutils/sourcedist.rst:89 msgid "" "all C source files mentioned in the ``ext_modules`` or ``libraries`` options" msgstr "" "tous les fichiers source C mentionnés dans les arguments ``ext_modules`` ou " "``libraries``" -#: distutils/sourcedist.rst:92 +#: distutils/sourcedist.rst:95 msgid "" "scripts identified by the ``scripts`` option See :ref:`distutils-installing-" "scripts`." @@ -224,7 +234,7 @@ msgstr "" "scripts identifiés par l'argument ``scripts``. Voir :ref:`distutils-" "installing-scripts`." -#: distutils/sourcedist.rst:95 +#: distutils/sourcedist.rst:98 msgid "" "anything that looks like a test script: :file:`test/test\\*.py` (currently, " "the Distutils don't do anything with test scripts except include them in " @@ -236,7 +246,7 @@ msgstr "" "inclure dans les distributions sources, mais dans le futur un standard sera " "implémenté pour tester les distributions de module Python)" -#: distutils/sourcedist.rst:100 +#: distutils/sourcedist.rst:103 msgid "" "Any of the standard README files (:file:`README`, :file:`README.txt`, or :" "file:`README.rst`), :file:`setup.py` (or whatever you called your setup " @@ -247,7 +257,7 @@ msgstr "" "script d'installation si vous l'avez appelé autrement) et le fichier :file:" "`setup.cfg`." -#: distutils/sourcedist.rst:104 +#: distutils/sourcedist.rst:107 msgid "" "all files that matches the ``package_data`` metadata. See :ref:`distutils-" "installing-package-data`." @@ -255,7 +265,7 @@ msgstr "" "tous les fichiers associés aux méta-données ``package_data``. Voir :ref:" "`distutils-installing-package-data`." -#: distutils/sourcedist.rst:107 +#: distutils/sourcedist.rst:110 msgid "" "all files that matches the ``data_files`` metadata. See :ref:`distutils-" "additional-files`." @@ -263,7 +273,7 @@ msgstr "" "tous les fichiers associés aux méta-données ``data_files``. Voir :ref:" "`distutils-additional-files`." -#: distutils/sourcedist.rst:110 +#: distutils/sourcedist.rst:113 msgid "" "Sometimes this is enough, but usually you will want to specify additional " "files to distribute. The typical way to do this is to write a *manifest " @@ -283,7 +293,7 @@ msgstr "" "`sdist` traite ce modèle et génère un manifeste à partir de ces instructions " "et de ce qu'elle trouve dans le système de fichiers." -#: distutils/sourcedist.rst:118 +#: distutils/sourcedist.rst:121 msgid "" "If you prefer to roll your own manifest file, the format is simple: one " "filename per line, regular files (or symlinks to them) only. If you do " @@ -296,7 +306,7 @@ msgstr "" "vous devez tout spécifier : les groupes de fichiers par défaut décrits au-" "dessus ne sont pas inclus automatiquement dans ce cas." -#: distutils/sourcedist.rst:123 +#: distutils/sourcedist.rst:126 msgid "" "An existing generated :file:`MANIFEST` will be regenerated without :command:" "`sdist` comparing its modification time to the one of :file:`MANIFEST.in` " @@ -306,7 +316,7 @@ msgstr "" "command:`sdist` ne compare son heure de modification à :file:`MANIFEST.in` " "ou :file:`setup.py`." -#: distutils/sourcedist.rst:128 +#: distutils/sourcedist.rst:131 msgid "" ":file:`MANIFEST` files start with a comment indicating they are generated. " "Files without this comment are not overwritten or removed." @@ -315,7 +325,7 @@ msgstr "" "sont générés. Les fichiers sans ce commentaire ne sont pas réécrits ou " "supprimés." -#: distutils/sourcedist.rst:132 +#: distutils/sourcedist.rst:135 msgid "" ":command:`sdist` will read a :file:`MANIFEST` file if no :file:`MANIFEST.in` " "exists, like it used to do." @@ -323,14 +333,14 @@ msgstr "" ":command:`sdist` lira un ficher :file:`MANIFEST` s'il n'existe pas de :file:" "`MANIFEST.in` , tel qu'il en avait l'habitude." -#: distutils/sourcedist.rst:136 +#: distutils/sourcedist.rst:139 msgid "" ":file:`README.rst` is now included in the list of distutils standard READMEs." msgstr "" "Le fichier :file:`README.rst` est maintenant inclus dans la liste des " "fichiers *README* standards de *distutils*." -#: distutils/sourcedist.rst:140 +#: distutils/sourcedist.rst:143 msgid "" "The manifest template has one command per line, where each command specifies " "a set of files to include or exclude from the source distribution. For an " @@ -340,7 +350,7 @@ msgstr "" "spécifie un ensemble de fichiers à inclure ou à exclure de la distribution " "source. Par exemple, regardons à nouveau le propre manifeste de Distutils :" -#: distutils/sourcedist.rst:150 +#: distutils/sourcedist.rst:153 msgid "" "The meanings should be fairly clear: include all files in the distribution " "root matching :file:`\\*.txt`, all files anywhere under the :file:`examples` " @@ -363,7 +373,7 @@ msgstr "" "inclusions standards). Il existe d'autres commandes dans le langage du " "fichier manifeste, consultez le chapitre :ref:`sdist-cmd`." -#: distutils/sourcedist.rst:160 +#: distutils/sourcedist.rst:163 msgid "" "The order of commands in the manifest template matters: initially, we have " "the list of default files as described above, and each command in the " @@ -377,13 +387,13 @@ msgstr "" "Une fois que le traitement du manifeste modèle est fini, nous enlevons les " "fichiers qui ne doivent pas être inclus dans la distribution source :" -#: distutils/sourcedist.rst:166 +#: distutils/sourcedist.rst:169 msgid "all files in the Distutils \"build\" tree (default :file:`build/`)" msgstr "" "tous les fichiers dans l'arborescence de *build* de Distutils (par défaut :" "file:`build/`)" -#: distutils/sourcedist.rst:168 +#: distutils/sourcedist.rst:171 msgid "" "all files in directories named :file:`RCS`, :file:`CVS`, :file:`.svn`, :file:" "`.hg`, :file:`.git`, :file:`.bzr` or :file:`_darcs`" @@ -391,7 +401,7 @@ msgstr "" "tous les fichiers dans les dossiers nommés :file:`RCS`, :file:`CVS`, :file:`." "svn`, :file:`.hg`, :file:`.git`, :file:`.bzr` ou :file:`_darcs`" -#: distutils/sourcedist.rst:171 +#: distutils/sourcedist.rst:174 msgid "" "Now we have our complete list of files, which is written to the manifest for " "future reference, and then used to build the source distribution archive(s)." @@ -400,7 +410,7 @@ msgstr "" "écrite dans le manifeste pour une utilisation future et sera utilisée pour " "construire la ou les archive(s) de notre distribution source." -#: distutils/sourcedist.rst:174 +#: distutils/sourcedist.rst:177 msgid "" "You can disable the default set of included files with the :option:`!--no-" "defaults` option, and you can disable the standard exclude set with :option:" @@ -410,7 +420,7 @@ msgstr "" "utilisant l'option :option:`!--no-defaults`, ainsi que désactiver les " "exclusions standards avec l'option :option:`!--no-prune`." -#: distutils/sourcedist.rst:178 +#: distutils/sourcedist.rst:181 msgid "" "Following the Distutils' own manifest template, let's trace how the :command:" "`sdist` command builds the list of files to include in the Distutils source " @@ -420,7 +430,7 @@ msgstr "" "`sdist` construit la liste des fichiers à inclure dans la distribution " "source de Distutils." -#: distutils/sourcedist.rst:182 +#: distutils/sourcedist.rst:185 msgid "" "include all Python source files in the :file:`distutils` and :file:" "`distutils/command` subdirectories (because packages corresponding to those " @@ -433,7 +443,7 @@ msgstr "" "``packages`` du script d'installation --- voir le chapitre :ref:`setup-" "script`)" -#: distutils/sourcedist.rst:187 +#: distutils/sourcedist.rst:190 msgid "" "include :file:`README.txt`, :file:`setup.py`, and :file:`setup.cfg` " "(standard files)" @@ -441,11 +451,11 @@ msgstr "" "inclure :file:`README.txt`, :file:`setup.py` et :file:`setup.cfg` (fichiers " "standards)" -#: distutils/sourcedist.rst:190 +#: distutils/sourcedist.rst:193 msgid "include :file:`test/test\\*.py` (standard files)" msgstr "inclure :file:`test/test\\*.py` (fichiers standard)" -#: distutils/sourcedist.rst:192 +#: distutils/sourcedist.rst:195 msgid "" "include :file:`\\*.txt` in the distribution root (this will find :file:" "`README.txt` a second time, but such redundancies are weeded out later)" @@ -454,7 +464,7 @@ msgstr "" "`README.txt` une seconde fois, mais les redondances sont supprimées plus " "tard)" -#: distutils/sourcedist.rst:195 +#: distutils/sourcedist.rst:198 msgid "" "include anything matching :file:`\\*.txt` or :file:`\\*.py` in the sub-tree " "under :file:`examples`," @@ -462,7 +472,7 @@ msgstr "" "inclure tout fichier de la forme :file:`\\*.txt` ou :file:`\\*.py` dans la " "sous-arborescence de :file:`examples`," -#: distutils/sourcedist.rst:198 +#: distutils/sourcedist.rst:201 msgid "" "exclude all files in the sub-trees starting at directories matching :file:" "`examples/sample?/build`\\ ---this may exclude files included by the " @@ -475,7 +485,7 @@ msgstr "" "important que la commande ``prune`` dans le manifeste modèle vienne après la " "commande ``recursive-include``" -#: distutils/sourcedist.rst:203 +#: distutils/sourcedist.rst:206 msgid "" "exclude the entire :file:`build` tree, and any :file:`RCS`, :file:`CVS`, :" "file:`.svn`, :file:`.hg`, :file:`.git`, :file:`.bzr` and :file:`_darcs` " @@ -485,7 +495,7 @@ msgstr "" "`RCS`, :file:`CVS`, :file:`.svn`, :file:`.hg`, :file:`.git`, :file:`.bzr` " "et :file:`_darcs`" -#: distutils/sourcedist.rst:207 +#: distutils/sourcedist.rst:210 msgid "" "Just like in the setup script, file and directory names in the manifest " "template should always be slash-separated; the Distutils will take care of " @@ -498,11 +508,11 @@ msgstr "" "la représentation standard de votre plateforme. De cette manière, le " "manifeste modèle est portable sur tout système d'exploitation." -#: distutils/sourcedist.rst:216 +#: distutils/sourcedist.rst:219 msgid "Manifest-related options" msgstr "Options pour le manifeste" -#: distutils/sourcedist.rst:218 +#: distutils/sourcedist.rst:221 msgid "" "The normal course of operations for the :command:`sdist` command is as " "follows:" @@ -510,7 +520,7 @@ msgstr "" "L'ordre normal des opérations pour la commande :command:`sdist` est le " "suivant :" -#: distutils/sourcedist.rst:220 +#: distutils/sourcedist.rst:223 msgid "" "if the manifest file (:file:`MANIFEST` by default) exists and the first line " "does not have a comment indicating it is generated from :file:`MANIFEST.in`, " @@ -520,7 +530,7 @@ msgstr "" "première ligne n'a pas de commentaire indiquant qu'il a été généré par :file:" "`MANIFEST.in`, alors il est utilisé tel quel, inchangé" -#: distutils/sourcedist.rst:224 +#: distutils/sourcedist.rst:227 msgid "" "if the manifest file doesn't exist or has been previously automatically " "generated, read :file:`MANIFEST.in` and create the manifest" @@ -528,7 +538,7 @@ msgstr "" "si le manifeste n'existe pas ou s'il a été généré automatiquement, lire :" "file:`MANIFEST.in` et créer le manifeste" -#: distutils/sourcedist.rst:227 +#: distutils/sourcedist.rst:230 msgid "" "if neither :file:`MANIFEST` nor :file:`MANIFEST.in` exist, create a manifest " "with just the default file set" @@ -536,7 +546,7 @@ msgstr "" "s'il n'existe ni :file:`MANIFEST`, ni :file:`MANIFEST.in`, alors créer un " "manifeste contenant uniquement le groupe de fichiers par défaut" -#: distutils/sourcedist.rst:230 +#: distutils/sourcedist.rst:233 msgid "" "use the list of files now in :file:`MANIFEST` (either just generated or read " "in) to create the source distribution archive(s)" @@ -544,7 +554,7 @@ msgstr "" "utiliser maintenant la liste de fichiers de :file:`MANIFEST` (qu'il ait été " "généré ou lu) pour créer la ou les archive(s) de la distribution source" -#: distutils/sourcedist.rst:233 +#: distutils/sourcedist.rst:236 msgid "" "There are a couple of options that modify this behaviour. First, use the :" "option:`!--no-defaults` and :option:`!--no-prune` to disable the standard " @@ -554,7 +564,7 @@ msgstr "" "options :option:`!--no-defaults` et :option:`!--no-prune` pour désactiver " "les inclusions et exclusions standards." -#: distutils/sourcedist.rst:237 +#: distutils/sourcedist.rst:240 msgid "" "Second, you might just want to (re)generate the manifest, but not create a " "source distribution::" @@ -562,8 +572,11 @@ msgstr "" "Ensuite, si vous ne voulez que (ré)générer le manifeste, mais pas créer la " "distribution source ::" -#: distutils/sourcedist.rst:242 +#: distutils/sourcedist.rst:245 msgid ":option:`!-o` is a shortcut for :option:`!--manifest-only`." msgstr "" "L'option :option:`!-o` est un raccourci pour l'option :option:`!--manifest-" "only`." + +#~ msgid "\\(4)" +#~ msgstr "\\(4)" diff --git a/extending/building.po b/extending/building.po index e4d7f735ac..3b85e33cd3 100644 --- a/extending/building.po +++ b/extending/building.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2019-10-19 23:06+0200\n" +"PO-Revision-Date: 2021-12-11 12:46+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -140,7 +140,7 @@ msgstr "" "précédent n'utilise qu'une partie. L'exemple précise des méta-informations " "pour construire les paquets, et définir le contenu du paquet. Normalement un " "paquet contient des modules additionnels, comme des modules sources, " -"documentation, sous paquets, etc. Referez-vous à la documentation de " +"documentation, sous paquets, etc. Référez-vous à la documentation de " "*distutils* dans :ref:`distutils-index` pour en apprendre plus sur les " "fonctionnalités de *distutils*. Cette section n'explique que la construction " "de modules d'extension." diff --git a/extending/extending.po b/extending/extending.po index cd580e4c33..62c39ea252 100644 --- a/extending/extending.po +++ b/extending/extending.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2021-02-07 22:27+0100\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2021-12-11 12:50+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -143,19 +143,19 @@ msgstr "" msgid "" "All user-visible symbols defined by :file:`Python.h` have a prefix of ``Py`` " "or ``PY``, except those defined in standard header files. For convenience, " -"and since they are used extensively by the Python interpreter, ``\"Python.h" -"\"`` includes a few standard header files: ````, ````, " +"and since they are used extensively by the Python interpreter, ``\"Python." +"h\"`` includes a few standard header files: ````, ````, " "````, and ````. If the latter header file does not exist " "on your system, it declares the functions :c:func:`malloc`, :c:func:`free` " "and :c:func:`realloc` directly." msgstr "" "Tous les symboles exposés par :file:`Python.h` sont préfixés de ``Py`` ou " "``PY``, sauf ceux qui sont définis dans les en-têtes standard. Pour le " -"confort, et comme ils sont largement utilisés par l'interpréteur Python, ``" -"\"Python.h\"`` inclut lui-même quelques d'en-têtes standard : ````, " -"````, ```` et ````. Si ce dernier n'existe pas " -"sur votre système, il déclare les fonctions :c:func:`malloc`, :c:func:`free` " -"et :c:func:`realloc` directement." +"confort, et comme ils sont largement utilisés par l'interpréteur Python, " +"``\"Python.h\"`` inclut lui-même quelques d'en-têtes standard : ````, ````, ```` et ````. Si ce dernier " +"n'existe pas sur votre système, il déclare les fonctions :c:func:`malloc`, :" +"c:func:`free` et :c:func:`realloc` directement." #: extending/extending.rst:83 msgid "" @@ -230,18 +230,16 @@ msgid "Intermezzo: Errors and Exceptions" msgstr "Intermezzo : Les erreurs et les exceptions" #: extending/extending.rst:128 +#, fuzzy msgid "" "An important convention throughout the Python interpreter is the following: " "when a function fails, it should set an exception condition and return an " -"error value (usually a ``NULL`` pointer). Exceptions are stored in a static " -"global variable inside the interpreter; if this variable is ``NULL`` no " -"exception has occurred. A second global variable stores the \"associated " -"value\" of the exception (the second argument to :keyword:`raise`). A third " -"variable contains the stack traceback in case the error originated in Python " -"code. These three variables are the C equivalents of the result in Python " -"of :meth:`sys.exc_info` (see the section on module :mod:`sys` in the Python " -"Library Reference). It is important to know about them to understand how " -"errors are passed around." +"error value (usually ``-1`` or a ``NULL`` pointer). Exception information " +"is stored in three members of the interpreter's thread state. These are " +"``NULL`` if there is no exception. Otherwise they are the C equivalents of " +"the members of the Python tuple returned by :meth:`sys.exc_info`. These are " +"the exception type, exception instance, and a traceback object. It is " +"important to know about them to understand how errors are passed around." msgstr "" "Une convention primordiale imprégnant tout l'interpréteur Python est : quand " "une fonction échoue, elle devrait laisser une exception et renvoyer une " @@ -256,7 +254,7 @@ msgstr "" "Reference*). Il est important de les connaître pour comprendre comment les " "erreurs sont propagées." -#: extending/extending.rst:139 +#: extending/extending.rst:137 msgid "" "The Python API defines a number of functions to set various types of " "exceptions." @@ -264,7 +262,7 @@ msgstr "" "L'API Python définit un certain nombre de fonctions pour créer différents " "types d'exceptions." -#: extending/extending.rst:141 +#: extending/extending.rst:139 msgid "" "The most common one is :c:func:`PyErr_SetString`. Its arguments are an " "exception object and a C string. The exception object is usually a " @@ -278,7 +276,7 @@ msgstr "" "cause de l'erreur et est convertie en une chaîne Python puis stockée en tant " "que \"valeur associée\" à l'exception." -#: extending/extending.rst:147 +#: extending/extending.rst:145 msgid "" "Another useful function is :c:func:`PyErr_SetFromErrno`, which only takes an " "exception argument and constructs the associated value by inspection of the " @@ -293,7 +291,7 @@ msgstr "" "arguments : l'exception et sa valeur associée. Vous ne devez pas appliquer :" "c:func:`Py_INCREF` aux objets transmis à ces fonctions." -#: extending/extending.rst:154 +#: extending/extending.rst:152 msgid "" "You can test non-destructively whether an exception has been set with :c:" "func:`PyErr_Occurred`. This returns the current exception object, or " @@ -308,7 +306,7 @@ msgstr "" "survenue durant l'appel d'une fonction, puisque vous devriez être en mesure " "de le déterminer à partir de la valeur renvoyée." -#: extending/extending.rst:160 +#: extending/extending.rst:158 #, fuzzy msgid "" "When a function *f* that calls another function *g* detects that the latter " @@ -334,7 +332,7 @@ msgstr "" "interrompt le code en cours d'exécution et essaie de trouver un gestionnaire " "d'exception spécifié par le développeur Python." -#: extending/extending.rst:170 +#: extending/extending.rst:168 msgid "" "(There are situations where a module can actually give a more detailed error " "message by calling another :c:func:`PyErr_\\*` function, and in such cases " @@ -349,7 +347,7 @@ msgstr "" "sur la cause de l'erreur : la plupart des opérations peuvent échouer pour " "tout un tas de raisons.)" -#: extending/extending.rst:176 +#: extending/extending.rst:174 msgid "" "To ignore an exception set by a function call that failed, the exception " "condition must be cleared explicitly by calling :c:func:`PyErr_Clear`. The " @@ -364,7 +362,7 @@ msgstr "" "l'interpréteur, mais souhaite la gérer lui-même (peut-être en essayant " "quelque chose d'autre, ou en prétendant que rien n'a mal tourné)." -#: extending/extending.rst:182 +#: extending/extending.rst:180 msgid "" "Every failing :c:func:`malloc` call must be turned into an exception --- the " "direct caller of :c:func:`malloc` (or :c:func:`realloc`) must call :c:func:" @@ -379,7 +377,7 @@ msgstr "" "`PyLong_FromLong`) le font déjà, donc cette note ne concerne que ceux qui " "appellent :c:func:`malloc` directement." -#: extending/extending.rst:188 +#: extending/extending.rst:186 msgid "" "Also note that, with the important exception of :c:func:`PyArg_ParseTuple` " "and friends, functions that return an integer status usually return a " @@ -391,7 +389,7 @@ msgstr "" "donnent généralement une valeur positive ou zéro en cas de succès et ``-1`` " "en cas d'échec, comme les appels du système Unix." -#: extending/extending.rst:192 +#: extending/extending.rst:190 msgid "" "Finally, be careful to clean up garbage (by making :c:func:`Py_XDECREF` or :" "c:func:`Py_DECREF` calls for objects you have already created) when you " @@ -401,7 +399,7 @@ msgstr "" "de nettoyage (en appelant :c:func:`Py_XDECREF` ou :c:func:`Py_DECREF` avec " "les objets que vous auriez déjà créés) !" -#: extending/extending.rst:196 +#: extending/extending.rst:194 msgid "" "The choice of which exception to raise is entirely yours. There are " "predeclared C objects corresponding to all built-in Python exceptions, such " @@ -425,7 +423,7 @@ msgstr "" "satisfaire d'autres conditions, :c:data:`PyExc_ValueError` sera plus " "appropriée." -#: extending/extending.rst:206 +#: extending/extending.rst:204 msgid "" "You can also define a new exception that is unique to your module. For this, " "you usually declare a static object variable at the beginning of your file::" @@ -433,7 +431,7 @@ msgstr "" "Vous pouvez également créer une exception spécifique à votre module. Pour " "cela, déclarez simplement une variable statique au début de votre fichier ::" -#: extending/extending.rst:211 +#: extending/extending.rst:209 msgid "" "and initialize it in your module's initialization function (:c:func:" "`PyInit_spam`) with an exception object::" @@ -441,7 +439,7 @@ msgstr "" "et initialisez-la dans la fonction d'initialisation de votre module (:c:func:" "`PyInit_spam`) avec un objet exception ::" -#: extending/extending.rst:235 +#: extending/extending.rst:233 msgid "" "Note that the Python name for the exception object is :exc:`spam.error`. " "The :c:func:`PyErr_NewException` function may create a class with the base " @@ -453,7 +451,7 @@ msgstr "" "`Exception` (à moins qu'une autre classe ne lui soit fournie à la place de " "``NULL``), voir :ref:`bltin-exceptions`." -#: extending/extending.rst:240 +#: extending/extending.rst:238 msgid "" "Note also that the :c:data:`SpamError` variable retains a reference to the " "newly created exception class; this is intentional! Since the exception " @@ -471,7 +469,7 @@ msgstr "" "code qui lève cette exception peut engendrer un *core dump* ou des effets " "secondaires inattendus." -#: extending/extending.rst:247 +#: extending/extending.rst:245 msgid "" "We discuss the use of ``PyMODINIT_FUNC`` as a function return type later in " "this sample." @@ -479,7 +477,7 @@ msgstr "" "Nous traiterons de l'utilisation de ``PyMODINIT_FUNC`` comme un type de " "renvoi de fonction plus tard dans cette section." -#: extending/extending.rst:250 +#: extending/extending.rst:248 msgid "" "The :exc:`spam.error` exception can be raised in your extension module using " "a call to :c:func:`PyErr_SetString` as shown below::" @@ -487,11 +485,11 @@ msgstr "" "L'exception :exc:`spam.error` peut être levée dans votre module d'extension " "en appelant :c:func:`PyErr_SetString` comme montré ci-dessous ::" -#: extending/extending.rst:273 +#: extending/extending.rst:271 msgid "Back to the Example" msgstr "Retour vers l'exemple" -#: extending/extending.rst:275 +#: extending/extending.rst:273 msgid "" "Going back to our example function, you should now be able to understand " "this statement::" @@ -499,7 +497,7 @@ msgstr "" "En revenant vers notre fonction exemple, vous devriez maintenant être " "capable de comprendre cette affirmation ::" -#: extending/extending.rst:281 +#: extending/extending.rst:279 msgid "" "It returns ``NULL`` (the error indicator for functions returning object " "pointers) if an error is detected in the argument list, relying on the " @@ -518,7 +516,7 @@ msgstr "" "Standard, la variable :c:data:`command` doit être clairement déclarée comme " "``const char *command``)." -#: extending/extending.rst:289 +#: extending/extending.rst:287 msgid "" "The next statement is a call to the Unix function :c:func:`system`, passing " "it the string we just got from :c:func:`PyArg_ParseTuple`::" @@ -527,7 +525,7 @@ msgstr "" "en lui passant la chaîne que nous venons d'obtenir à partir de :c:func:" "`PyArg_ParseTuple` ::" -#: extending/extending.rst:294 +#: extending/extending.rst:292 msgid "" "Our :func:`spam.system` function must return the value of :c:data:`sts` as a " "Python object. This is done using the function :c:func:`PyLong_FromLong`. ::" @@ -536,7 +534,7 @@ msgstr "" "comme un objet Python. Cela est effectué par l'utilisation de la fonction :c:" "func:`PyLong_FromLong`. ::" -#: extending/extending.rst:299 +#: extending/extending.rst:297 msgid "" "In this case, it will return an integer object. (Yes, even integers are " "objects on the heap in Python!)" @@ -544,7 +542,7 @@ msgstr "" "Dans ce cas, elle renverra un objet entier. (Oui, même les entiers sont des " "objets dans le tas en Python !)" -#: extending/extending.rst:302 +#: extending/extending.rst:300 msgid "" "If you have a C function that returns no useful argument (a function " "returning :c:type:`void`), the corresponding Python function must return " @@ -556,7 +554,7 @@ msgstr "" "renvoyer ``None``. Vous aurez besoin de cette locution pour cela (qui est " "implémentée par la macro :c:macro:`Py_RETURN_NONE`) ::" -#: extending/extending.rst:310 +#: extending/extending.rst:308 msgid "" ":c:data:`Py_None` is the C name for the special Python object ``None``. It " "is a genuine Python object rather than a ``NULL`` pointer, which means " @@ -567,11 +565,11 @@ msgstr "" "qui signifie qu'une erreur est survenue, dans la plupart des situations, " "comme nous l'avons vu." -#: extending/extending.rst:318 +#: extending/extending.rst:316 msgid "The Module's Method Table and Initialization Function" msgstr "La fonction d'initialisation et le tableau des méthodes du module" -#: extending/extending.rst:320 +#: extending/extending.rst:318 msgid "" "I promised to show how :c:func:`spam_system` is called from Python programs. " "First, we need to list its name and address in a \"method table\"::" @@ -580,7 +578,7 @@ msgstr "" "depuis les programmes Python. D'abord, nous avons besoin d'avoir son nom et " "son adresse dans un « tableau des méthodes » ::" -#: extending/extending.rst:331 +#: extending/extending.rst:329 msgid "" "Note the third entry (``METH_VARARGS``). This is a flag telling the " "interpreter the calling convention to be used for the C function. It should " @@ -594,7 +592,7 @@ msgstr "" "METH_KEYWORDS`` ; la valeur ``0`` indique qu'une variante obsolète de :c:" "func:`PyArg_ParseTuple` est utilisée." -#: extending/extending.rst:336 +#: extending/extending.rst:334 msgid "" "When using only ``METH_VARARGS``, the function should expect the Python-" "level parameters to be passed in as a tuple acceptable for parsing via :c:" @@ -605,7 +603,7 @@ msgstr "" "*via* :c:func:`PyArg_ParseTuple` ; des informations supplémentaires sont " "fournies plus bas." -#: extending/extending.rst:340 +#: extending/extending.rst:338 msgid "" "The :const:`METH_KEYWORDS` bit may be set in the third field if keyword " "arguments should be passed to the function. In this case, the C function " @@ -614,19 +612,19 @@ msgid "" "to such a function." msgstr "" "Le bit :const:`METH_KEYWORDS` peut être mis à un dans le troisième champ si " -"des arguments par mot-clés doivent être passés à la fonction. Dans ce cas, " +"des arguments par mots-clés doivent être passés à la fonction. Dans ce cas, " "la fonction C doit accepter un troisième paramètre ``PyObject *`` qui est un " "dictionnaire des mots-clés. Utilisez :c:func:`PyArg_ParseTupleAndKeywords` " "pour analyser les arguments d'une telle fonction." -#: extending/extending.rst:346 +#: extending/extending.rst:344 msgid "" "The method table must be referenced in the module definition structure::" msgstr "" "Le tableau des méthodes doit être référencé dans la structure de définition " "du module ::" -#: extending/extending.rst:357 +#: extending/extending.rst:355 msgid "" "This structure, in turn, must be passed to the interpreter in the module's " "initialization function. The initialization function must be named :c:func:" @@ -638,7 +636,7 @@ msgstr "" "nommée :c:func:`PyInit_name`, où *nom* est le nom du module, et doit être le " "seul élément non ``static`` défini dans le fichier du module ::" -#: extending/extending.rst:368 +#: extending/extending.rst:366 msgid "" "Note that PyMODINIT_FUNC declares the function as ``PyObject *`` return " "type, declares any special linkage declarations required by the platform, " @@ -649,7 +647,7 @@ msgstr "" "spéciale requise par la plate-forme, et pour le C++ déclare la fonction " "comme un C ``extern``." -#: extending/extending.rst:372 +#: extending/extending.rst:370 msgid "" "When the Python program imports module :mod:`spam` for the first time, :c:" "func:`PyInit_spam` is called. (See below for comments about embedding " @@ -674,7 +672,7 @@ msgstr "" "manière satisfaisante. La fonction `*init* doit renvoyer l'objet module à " "son appelant, afin qu'il soit ensuite inséré dans ``sys.modules``." -#: extending/extending.rst:383 +#: extending/extending.rst:381 msgid "" "When embedding Python, the :c:func:`PyInit_spam` function is not called " "automatically unless there's an entry in the :c:data:`PyImport_Inittab` " @@ -687,7 +685,7 @@ msgstr "" "utilisez :c:func:`PyImport_AppendInittab`, suivi éventuellement d'une " "importation du module ::" -#: extending/extending.rst:427 +#: extending/extending.rst:425 msgid "" "Removing entries from ``sys.modules`` or importing compiled modules into " "multiple interpreters within a process (or following a :c:func:`fork` " @@ -702,7 +700,7 @@ msgstr "" "doivent faire preuve de prudence lorsqu'ils initialisent des structures de " "données internes." -#: extending/extending.rst:433 +#: extending/extending.rst:431 msgid "" "A more substantial example module is included in the Python source " "distribution as :file:`Modules/xxmodule.c`. This file may be used as a " @@ -712,7 +710,7 @@ msgstr "" "sources Python sous le nom :file:`Modules/xxmodule.c`. Ce fichier peut être " "utilisé comme modèle ou simplement lu comme exemple." -#: extending/extending.rst:439 +#: extending/extending.rst:437 msgid "" "Unlike our ``spam`` example, ``xxmodule`` uses *multi-phase initialization* " "(new in Python 3.5), where a PyModuleDef structure is returned from " @@ -725,11 +723,11 @@ msgstr "" "module est laissée au mécanisme d'importation. Pour plus de détails sur " "l'initialisation multi-phase, voir :PEP:`489`." -#: extending/extending.rst:448 +#: extending/extending.rst:446 msgid "Compilation and Linkage" msgstr "Compilation et liaison" -#: extending/extending.rst:450 +#: extending/extending.rst:448 msgid "" "There are two more things to do before you can use your new extension: " "compiling and linking it with the Python system. If you use dynamic " @@ -739,7 +737,7 @@ msgid "" "Windows (chapter :ref:`building-on-windows`) for more information about this." msgstr "" -#: extending/extending.rst:457 +#: extending/extending.rst:455 msgid "" "If you can't use dynamic loading, or if you want to make your module a " "permanent part of the Python interpreter, you will have to change the " @@ -749,7 +747,7 @@ msgid "" "line to the file :file:`Modules/Setup.local` describing your file:" msgstr "" -#: extending/extending.rst:468 +#: extending/extending.rst:466 msgid "" "and rebuild the interpreter by running :program:`make` in the toplevel " "directory. You can also run :program:`make` in the :file:`Modules/` " @@ -758,17 +756,17 @@ msgid "" "the :file:`Setup` file.)" msgstr "" -#: extending/extending.rst:474 +#: extending/extending.rst:472 msgid "" "If your module requires additional libraries to link with, these can be " "listed on the line in the configuration file as well, for instance:" msgstr "" -#: extending/extending.rst:485 +#: extending/extending.rst:483 msgid "Calling Python Functions from C" msgstr "Appeler des fonctions Python en C" -#: extending/extending.rst:487 +#: extending/extending.rst:485 msgid "" "So far we have concentrated on making C functions callable from Python. The " "reverse is also useful: calling Python functions from C. This is especially " @@ -779,7 +777,7 @@ msgid "" "uses are also imaginable." msgstr "" -#: extending/extending.rst:495 +#: extending/extending.rst:493 msgid "" "Fortunately, the Python interpreter is easily called recursively, and there " "is a standard interface to call a Python function. (I won't dwell on how to " @@ -788,7 +786,7 @@ msgid "" "line option in :file:`Modules/main.c` from the Python source code.)" msgstr "" -#: extending/extending.rst:501 +#: extending/extending.rst:499 msgid "" "Calling a Python function is easy. First, the Python program must somehow " "pass you the Python function object. You should provide a function (or some " @@ -798,7 +796,7 @@ msgid "" "function might be part of a module definition::" msgstr "" -#: extending/extending.rst:531 +#: extending/extending.rst:529 msgid "" "This function must be registered with the interpreter using the :const:" "`METH_VARARGS` flag; this is described in section :ref:`methodtable`. The :" @@ -810,7 +808,7 @@ msgstr "" "fonction :c:func:`PyArg_ParseTuple` et ses arguments sont documentés dans la " "section :ref:`parsetuple`." -#: extending/extending.rst:536 +#: extending/extending.rst:534 msgid "" "The macros :c:func:`Py_XINCREF` and :c:func:`Py_XDECREF` increment/decrement " "the reference count of an object and are safe in the presence of ``NULL`` " @@ -823,7 +821,7 @@ msgstr "" "dans ce contexte). Plus d'informations à ce sujet dans la section :ref:" "`refcounts`." -#: extending/extending.rst:543 +#: extending/extending.rst:541 msgid "" "Later, when it is time to call the function, you call the C function :c:func:" "`PyObject_CallObject`. This function has two arguments, both pointers to " @@ -835,7 +833,7 @@ msgid "" "or more format codes between parentheses. For example::" msgstr "" -#: extending/extending.rst:563 +#: extending/extending.rst:561 msgid "" ":c:func:`PyObject_CallObject` returns a Python object pointer: this is the " "return value of the Python function. :c:func:`PyObject_CallObject` is " @@ -844,7 +842,7 @@ msgid "" "`Py_DECREF`\\ -ed immediately after the :c:func:`PyObject_CallObject` call." msgstr "" -#: extending/extending.rst:570 +#: extending/extending.rst:568 msgid "" "The return value of :c:func:`PyObject_CallObject` is \"new\": either it is a " "brand new object, or it is an existing object whose reference count has been " @@ -853,7 +851,7 @@ msgid "" "not interested in its value." msgstr "" -#: extending/extending.rst:576 +#: extending/extending.rst:574 msgid "" "Before you do this, however, it is important to check that the return value " "isn't ``NULL``. If it is, the Python function terminated by raising an " @@ -873,7 +871,7 @@ msgstr "" "souhaitable, l'exception doit être effacée en appelant :c:func:" "`PyErr_Clear`. Par exemple ::" -#: extending/extending.rst:589 +#: extending/extending.rst:587 msgid "" "Depending on the desired interface to the Python callback function, you may " "also have to provide an argument list to :c:func:`PyObject_CallObject`. In " @@ -895,7 +893,7 @@ msgstr "" "`Py_BuildValue`. Par exemple, si vous voulez passer un code d'événement " "intégral, vous pouvez utiliser le code suivant ::" -#: extending/extending.rst:608 +#: extending/extending.rst:606 msgid "" "Note the placement of ``Py_DECREF(arglist)`` immediately after the call, " "before the error check! Also note that strictly speaking this code is not " @@ -903,7 +901,7 @@ msgid "" "checked." msgstr "" -#: extending/extending.rst:612 +#: extending/extending.rst:610 msgid "" "You may also call a function with keyword arguments by using :c:func:" "`PyObject_Call`, which supports arguments and keyword arguments. As in the " @@ -914,15 +912,15 @@ msgstr "" "arguments nommés. Comme dans l'exemple ci-dessus, nous utilisons :c:func:" "`Py_BuildValue` pour construire le dictionnaire. ::" -#: extending/extending.rst:630 +#: extending/extending.rst:628 msgid "Extracting Parameters in Extension Functions" msgstr "Extraire des paramètres dans des fonctions d'extension" -#: extending/extending.rst:634 +#: extending/extending.rst:632 msgid "The :c:func:`PyArg_ParseTuple` function is declared as follows::" msgstr "La fonction :c:func:`PyArg_ParseTuple` est déclarée ainsi ::" -#: extending/extending.rst:638 +#: extending/extending.rst:636 msgid "" "The *arg* argument must be a tuple object containing an argument list passed " "from Python to a C function. The *format* argument must be a format string, " @@ -931,7 +929,7 @@ msgid "" "whose type is determined by the format string." msgstr "" -#: extending/extending.rst:644 +#: extending/extending.rst:642 msgid "" "Note that while :c:func:`PyArg_ParseTuple` checks that the Python arguments " "have the required types, it cannot check the validity of the addresses of C " @@ -939,7 +937,7 @@ msgid "" "probably crash or at least overwrite random bits in memory. So be careful!" msgstr "" -#: extending/extending.rst:649 +#: extending/extending.rst:647 msgid "" "Note that any Python object references which are provided to the caller are " "*borrowed* references; do not decrement their reference count!" @@ -948,21 +946,21 @@ msgstr "" "à l'appelant sont des références *empruntées* ; ne décrémentez pas leur " "compteur de références !" -#: extending/extending.rst:652 +#: extending/extending.rst:650 msgid "Some example calls::" msgstr "Quelques exemples d'appels ::" -#: extending/extending.rst:722 +#: extending/extending.rst:720 msgid "Keyword Parameters for Extension Functions" msgstr "Paramètres nommés pour des fonctions d'extension" -#: extending/extending.rst:726 +#: extending/extending.rst:724 msgid "" "The :c:func:`PyArg_ParseTupleAndKeywords` function is declared as follows::" msgstr "" "La fonction :c:func:`PyArg_ParseTupleAndKeywords` est déclarée ainsi ::" -#: extending/extending.rst:731 +#: extending/extending.rst:729 msgid "" "The *arg* and *format* parameters are identical to those of the :c:func:" "`PyArg_ParseTuple` function. The *kwdict* parameter is the dictionary of " @@ -982,7 +980,7 @@ msgstr "" "processus, :c:func:`PyArg_ParseTupleAndKeywords` renvoie vrai, sinon il " "renvoie faux et lève une exception appropriée." -#: extending/extending.rst:741 +#: extending/extending.rst:739 msgid "" "Nested tuples cannot be parsed when using keyword arguments! Keyword " "parameters passed in which are not present in the *kwlist* will cause :exc:" @@ -992,7 +990,7 @@ msgstr "" "arguments de type mot-clé ! Ceux-ci doivent apparaître dans dans *kwlist*, " "dans le cas contraire une exception :exc:`TypeError` est levée." -#: extending/extending.rst:747 +#: extending/extending.rst:745 msgid "" "Here is an example module which uses keywords, based on an example by Geoff " "Philbrick (philbrick@hks.com)::" @@ -1000,11 +998,11 @@ msgstr "" "Voici un exemple de module qui utilise des mots-clés, basé sur un exemple de " "*Geoff Philbrick* (philbrick@hks.com) ::" -#: extending/extending.rst:802 +#: extending/extending.rst:800 msgid "Building Arbitrary Values" msgstr "Créer des valeurs arbitraires" -#: extending/extending.rst:804 +#: extending/extending.rst:802 msgid "" "This function is the counterpart to :c:func:`PyArg_ParseTuple`. It is " "declared as follows::" @@ -1012,7 +1010,7 @@ msgstr "" "Cette fonction est le complément de :c:func:`PyArg_ParseTuple`. Elle est " "déclarée comme suit ::" -#: extending/extending.rst:809 +#: extending/extending.rst:807 msgid "" "It recognizes a set of format units similar to the ones recognized by :c:" "func:`PyArg_ParseTuple`, but the arguments (which are input to the function, " @@ -1025,7 +1023,7 @@ msgstr "" "mais juste des valeurs. Il renvoie un nouvel objet Python, adapté pour être " "renvoyé par une fonction C appelée depuis Python." -#: extending/extending.rst:814 +#: extending/extending.rst:812 #, fuzzy msgid "" "One difference with :c:func:`PyArg_ParseTuple`: while the latter requires " @@ -1041,17 +1039,17 @@ msgstr "" "dernier nécessite que son premier argument soit un *n*-uplet (puisque les " "listes d'arguments Python sont toujours représentées par des *n*-uplets en " -#: extending/extending.rst:822 +#: extending/extending.rst:820 msgid "" "Examples (to the left the call, to the right the resulting Python value):" msgstr "" "Exemples (à gauche l'appel, à droite la valeur résultante, en Python) :" -#: extending/extending.rst:848 +#: extending/extending.rst:846 msgid "Reference Counts" msgstr "Compteurs de références" -#: extending/extending.rst:850 +#: extending/extending.rst:848 msgid "" "In languages like C or C++, the programmer is responsible for dynamic " "allocation and deallocation of memory on the heap. In C, this is done using " @@ -1066,7 +1064,7 @@ msgstr "" "essentiellement la même signification et nous limiterons la discussion " "suivante au cas du C." -#: extending/extending.rst:856 +#: extending/extending.rst:854 msgid "" "Every block of memory allocated with :c:func:`malloc` should eventually be " "returned to the pool of available memory by exactly one call to :c:func:" @@ -1081,7 +1079,7 @@ msgid "" "crashes." msgstr "" -#: extending/extending.rst:867 +#: extending/extending.rst:865 msgid "" "Common causes of memory leaks are unusual paths through the code. For " "instance, a function may allocate a block of memory, do some calculation, " @@ -1098,7 +1096,7 @@ msgid "" "of errors." msgstr "" -#: extending/extending.rst:880 +#: extending/extending.rst:878 msgid "" "Since Python makes heavy use of :c:func:`malloc` and :c:func:`free`, it " "needs a strategy to avoid memory leaks as well as the use of freed memory. " @@ -1117,7 +1115,7 @@ msgstr "" "supprimée. Lorsque le compteur atteint zéro, la dernière référence à l'objet " "a été supprimée et l'objet est libéré." -#: extending/extending.rst:888 +#: extending/extending.rst:886 msgid "" "An alternative strategy is called :dfn:`automatic garbage collection`. " "(Sometimes, reference counting is also referred to as a garbage collection " @@ -1146,7 +1144,7 @@ msgstr "" "ramasse-miettes suffisamment portable sera disponible pour C. D'ici là, nous " "devrons utiliser les compteurs des références." -#: extending/extending.rst:900 +#: extending/extending.rst:898 msgid "" "While Python uses the traditional reference counting implementation, it also " "offers a cycle detector that works to detect reference cycles. This allows " @@ -1172,23 +1170,19 @@ msgstr "" "référencés à partir des objets dans le cycle, même s'il n'y a pas d'autres " "références au cycle lui-même." -#: extending/extending.rst:911 +#: extending/extending.rst:909 msgid "" "The cycle detector is able to detect garbage cycles and can reclaim them. " "The :mod:`gc` module exposes a way to run the detector (the :func:`~gc." "collect` function), as well as configuration interfaces and the ability to " -"disable the detector at runtime. The cycle detector is considered an " -"optional component; though it is included by default, it can be disabled at " -"build time using the :option:`!--without-cycle-gc` option to the :program:" -"`configure` script on Unix platforms (including Mac OS X). If the cycle " -"detector is disabled in this way, the :mod:`gc` module will not be available." +"disable the detector at runtime." msgstr "" -#: extending/extending.rst:925 +#: extending/extending.rst:918 msgid "Reference Counting in Python" msgstr "Comptage de références en Python" -#: extending/extending.rst:927 +#: extending/extending.rst:920 msgid "" "There are two macros, ``Py_INCREF(x)`` and ``Py_DECREF(x)``, which handle " "the incrementing and decrementing of the reference count. :c:func:" @@ -1206,7 +1200,7 @@ msgstr "" "objet` de l'objet. À cette fin (et pour d'autres), chaque objet contient " "également un pointeur vers son objet type." -#: extending/extending.rst:934 +#: extending/extending.rst:927 msgid "" "The big question now remains: when to use ``Py_INCREF(x)`` and " "``Py_DECREF(x)``? Let's first introduce some terms. Nobody \"owns\" an " @@ -1229,7 +1223,7 @@ msgstr "" "c:func:`Py_DECREF`. Oublier de se débarrasser d'une référence crée une fuite " "de mémoire." -#: extending/extending.rst:943 +#: extending/extending.rst:936 msgid "" "It is also possible to :dfn:`borrow` [#]_ a reference to an object. The " "borrower of a reference should not call :c:func:`Py_DECREF`. The borrower " @@ -1238,7 +1232,7 @@ msgid "" "risks using freed memory and should be avoided completely [#]_." msgstr "" -#: extending/extending.rst:949 +#: extending/extending.rst:942 msgid "" "The advantage of borrowing over owning a reference is that you don't need to " "take care of disposing of the reference on all possible paths through the " @@ -1257,7 +1251,7 @@ msgstr "" "correct, une référence empruntée peut être utilisée après que le " "propriétaire auquel elle a été empruntée l'a en fait éliminée." -#: extending/extending.rst:957 +#: extending/extending.rst:950 msgid "" "A borrowed reference can be changed into an owned reference by calling :c:" "func:`Py_INCREF`. This does not affect the status of the owner from which " @@ -1266,11 +1260,11 @@ msgid "" "properly, as well as the previous owner)." msgstr "" -#: extending/extending.rst:967 +#: extending/extending.rst:960 msgid "Ownership Rules" msgstr "Règles concernant la propriété de références" -#: extending/extending.rst:969 +#: extending/extending.rst:962 msgid "" "Whenever an object reference is passed into or out of a function, it is part " "of the function's interface specification whether ownership is transferred " @@ -1281,7 +1275,7 @@ msgstr "" "l'interface de la fonction, peu importe que la propriété soit transférée " "avec la référence ou non." -#: extending/extending.rst:973 +#: extending/extending.rst:966 msgid "" "Most functions that return a reference to an object pass on ownership with " "the reference. In particular, all functions whose function it is to create " @@ -1292,7 +1286,7 @@ msgid "" "reference to a cached item." msgstr "" -#: extending/extending.rst:981 +#: extending/extending.rst:974 msgid "" "Many functions that extract objects from other objects also transfer " "ownership with the reference, for instance :c:func:" @@ -1303,14 +1297,14 @@ msgid "" "list or dictionary." msgstr "" -#: extending/extending.rst:988 +#: extending/extending.rst:981 msgid "" "The function :c:func:`PyImport_AddModule` also returns a borrowed reference, " "even though it may actually create the object it returns: this is possible " "because an owned reference to the object is stored in ``sys.modules``." msgstr "" -#: extending/extending.rst:992 +#: extending/extending.rst:985 msgid "" "When you pass an object reference into another function, in general, the " "function borrows the reference from you --- if it needs to store it, it will " @@ -1321,7 +1315,7 @@ msgid "" "don't take over ownership --- they are \"normal.\")" msgstr "" -#: extending/extending.rst:1000 +#: extending/extending.rst:993 msgid "" "When a C function is called from Python, it borrows references to its " "arguments from the caller. The caller owns a reference to the object, so " @@ -1330,18 +1324,18 @@ msgid "" "turned into an owned reference by calling :c:func:`Py_INCREF`." msgstr "" -#: extending/extending.rst:1006 +#: extending/extending.rst:999 msgid "" "The object reference returned from a C function that is called from Python " "must be an owned reference --- ownership is transferred from the function to " "its caller." msgstr "" -#: extending/extending.rst:1014 +#: extending/extending.rst:1007 msgid "Thin Ice" msgstr "Terrain dangereux" -#: extending/extending.rst:1016 +#: extending/extending.rst:1009 msgid "" "There are a few situations where seemingly harmless use of a borrowed " "reference can lead to problems. These all have to do with implicit " @@ -1353,7 +1347,7 @@ msgstr "" "lien avec des invocations implicites de l’interpréteur, et peuvent amener le " "propriétaire d'une référence à s'en défaire." -#: extending/extending.rst:1020 +#: extending/extending.rst:1013 msgid "" "The first and most important case to know about is using :c:func:`Py_DECREF` " "on an unrelated object while borrowing a reference to a list item. For " @@ -1363,7 +1357,7 @@ msgstr "" "de :c:func:`Py_DECREF` à un objet non relié, tout en empruntant une " "référence à un élément de liste. Par exemple ::" -#: extending/extending.rst:1032 +#: extending/extending.rst:1025 msgid "" "This function first borrows a reference to ``list[0]``, then replaces " "``list[1]`` with the value ``0``, and finally prints the borrowed reference. " @@ -1373,7 +1367,7 @@ msgstr "" "``list[1]`` par la valeur ``0``, et enfin affiche la référence empruntée. " "Ça a l'air inoffensif, n'est-ce pas ? Mais ce n'est pas le cas !" -#: extending/extending.rst:1036 +#: extending/extending.rst:1029 msgid "" "Let's follow the control flow into :c:func:`PyList_SetItem`. The list owns " "references to all its items, so when item 1 is replaced, it has to dispose " @@ -1390,7 +1384,7 @@ msgstr "" "meth:`__del__`. Si l'instance de cette classe a un nombre des références de " "1, sa destruction appellera sa méthode :meth:`__del__`." -#: extending/extending.rst:1043 +#: extending/extending.rst:1036 msgid "" "Since it is written in Python, the :meth:`__del__` method can execute " "arbitrary Python code. Could it perhaps do something to invalidate the " @@ -1408,20 +1402,20 @@ msgstr "" "supposant que ce soit la dernière référence à cet objet, elle libérerait la " "mémoire qui lui est associée, invalidant ainsi ``item``." -#: extending/extending.rst:1051 +#: extending/extending.rst:1044 msgid "" "The solution, once you know the source of the problem, is easy: temporarily " "increment the reference count. The correct version of the function reads::" msgstr "" -#: extending/extending.rst:1065 +#: extending/extending.rst:1058 msgid "" "This is a true story. An older version of Python contained variants of this " "bug and someone spent a considerable amount of time in a C debugger to " "figure out why his :meth:`__del__` methods would fail..." msgstr "" -#: extending/extending.rst:1069 +#: extending/extending.rst:1062 msgid "" "The second case of problems with a borrowed reference is a variant involving " "threads. Normally, multiple threads in the Python interpreter can't get in " @@ -1444,11 +1438,11 @@ msgstr "" "processeur en attendant que les E/S soient terminées. Évidemment, la " "fonction suivante a le même problème que la précédente ::" -#: extending/extending.rst:1092 +#: extending/extending.rst:1085 msgid "NULL Pointers" msgstr "Pointeurs ``NULL``" -#: extending/extending.rst:1094 +#: extending/extending.rst:1087 msgid "" "In general, functions that take object references as arguments do not expect " "you to pass them ``NULL`` pointers, and will dump core (or cause later core " @@ -1470,7 +1464,7 @@ msgstr "" "devait tester pour ``NULL``, il y aurait beaucoup de tests redondants et le " "code s'exécuterait plus lentement." -#: extending/extending.rst:1102 +#: extending/extending.rst:1095 msgid "" "It is better to test for ``NULL`` only at the \"source:\" when a pointer " "that may be ``NULL`` is received, for example, from :c:func:`malloc` or from " @@ -1480,7 +1474,7 @@ msgstr "" "lorsqu'un pointeur qui peut être ``NULL`` est reçu, par exemple, de :c:func:" "`malloc` ou d'une fonction qui peut lever une exception." -#: extending/extending.rst:1106 +#: extending/extending.rst:1099 msgid "" "The macros :c:func:`Py_INCREF` and :c:func:`Py_DECREF` do not check for " "``NULL`` pointers --- however, their variants :c:func:`Py_XINCREF` and :c:" @@ -1490,7 +1484,7 @@ msgstr "" "pointeurs ``NULL``. Cependant, leurs variantes :c:func:`Py_XINCREF` et :c:" "func:`Py_XDECREF` le font." -#: extending/extending.rst:1110 +#: extending/extending.rst:1103 msgid "" "The macros for checking for a particular object type (``Pytype_Check()``) " "don't check for ``NULL`` pointers --- again, there is much code that calls " @@ -1499,7 +1493,7 @@ msgid "" "variants with ``NULL`` checking." msgstr "" -#: extending/extending.rst:1116 +#: extending/extending.rst:1109 msgid "" "The C function calling mechanism guarantees that the argument list passed to " "C functions (``args`` in the examples) is never ``NULL`` --- in fact it " @@ -1509,7 +1503,7 @@ msgstr "" "aux fonctions C (``args`` dans les exemples) n'est jamais ``NULL``. En fait, " "il garantit qu'il s'agit toujours d'un n-uplet [#]_." -#: extending/extending.rst:1120 +#: extending/extending.rst:1113 msgid "" "It is a severe error to ever let a ``NULL`` pointer \"escape\" to the Python " "user." @@ -1517,11 +1511,11 @@ msgstr "" "C'est une grave erreur de laisser un pointeur ``NULL`` \"échapper\" à " "l'utilisateur Python." -#: extending/extending.rst:1131 +#: extending/extending.rst:1124 msgid "Writing Extensions in C++" msgstr "Écrire des extensions en C++" -#: extending/extending.rst:1133 +#: extending/extending.rst:1126 msgid "" "It is possible to write extension modules in C++. Some restrictions apply. " "If the main program (the Python interpreter) is compiled and linked by the C " @@ -1545,11 +1539,11 @@ msgstr "" "``__cplusplus`` est défini (tous les compilateurs C++ récents définissent ce " "symbole)." -#: extending/extending.rst:1147 +#: extending/extending.rst:1140 msgid "Providing a C API for an Extension Module" msgstr "Fournir une API en langage C pour un module d'extension" -#: extending/extending.rst:1152 +#: extending/extending.rst:1145 msgid "" "Many extension modules just provide new functions and types to be used from " "Python, but sometimes the code in an extension module can be useful for " @@ -1569,7 +1563,7 @@ msgstr "" "collection devrait posséder un ensemble de fonctions C pour une manipulation " "directe à partir d'autres modules d'extension." -#: extending/extending.rst:1160 +#: extending/extending.rst:1153 msgid "" "At first sight this seems easy: just write the functions (without declaring " "them ``static``, of course), provide an appropriate header file, and " @@ -1599,7 +1593,7 @@ msgstr "" "*Unix*). Et même si les symboles sont globalement visibles, le module dont " "on souhaite appeler les fonctions n'est peut-être pas encore chargé !" -#: extending/extending.rst:1172 +#: extending/extending.rst:1165 msgid "" "Portability therefore requires not to make any assumptions about symbol " "visibility. This means that all symbols in extension modules should be " @@ -1617,7 +1611,7 @@ msgstr "" "accessibles à partir d'autres modules d'extension doivent être exportés " "d'une manière différente." -#: extending/extending.rst:1179 +#: extending/extending.rst:1172 msgid "" "Python provides a special mechanism to pass C-level information (pointers) " "from one extension module to another one: Capsules. A Capsule is a Python " @@ -1629,7 +1623,7 @@ msgid "" "the Capsule." msgstr "" -#: extending/extending.rst:1187 +#: extending/extending.rst:1180 msgid "" "There are many ways in which Capsules can be used to export the C API of an " "extension module. Each function could get its own Capsule, or all C API " @@ -1646,7 +1640,7 @@ msgstr "" "différentes manières entre le module fournissant le code et les modules " "clients." -#: extending/extending.rst:1193 +#: extending/extending.rst:1186 #, fuzzy msgid "" "Whichever method you choose, it's important to name your Capsules properly. " @@ -1664,13 +1658,13 @@ msgstr "" "concernant un éventuel conflit de types, car il n'y a pas de moyen de " "distinguer deux ou plusieurs Capsules non nommée entre elles." -#: extending/extending.rst:1200 +#: extending/extending.rst:1193 msgid "" "In particular, Capsules used to expose C APIs should be given a name " "following this convention::" msgstr "" -#: extending/extending.rst:1205 +#: extending/extending.rst:1198 #, fuzzy msgid "" "The convenience function :c:func:`PyCapsule_Import` makes it easy to load a " @@ -1684,7 +1678,7 @@ msgstr "" "utilisateurs d'API C un degré élevé de certitude que la Capsule qu'ils " "chargent contient l'API C correcte." -#: extending/extending.rst:1210 +#: extending/extending.rst:1203 msgid "" "The following example demonstrates an approach that puts most of the burden " "on the writer of the exporting module, which is appropriate for commonly " @@ -1703,7 +1697,7 @@ msgstr "" "le module et de récupérer ses pointeurs d'API C. Les modules clients n'ont " "qu'à appeler cette macro avant d'accéder à l'API C." -#: extending/extending.rst:1218 +#: extending/extending.rst:1211 msgid "" "The exporting module is a modification of the :mod:`spam` module from " "section :ref:`extending-simpleexample`. The function :func:`spam.system` " @@ -1720,25 +1714,25 @@ msgstr "" "Cette fonction :c:func:`PySpam_System` est également exportée vers d'autres " "modules d'extension." -#: extending/extending.rst:1225 +#: extending/extending.rst:1218 msgid "" "The function :c:func:`PySpam_System` is a plain C function, declared " "``static`` like everything else::" msgstr "" -#: extending/extending.rst:1234 +#: extending/extending.rst:1227 msgid "The function :c:func:`spam_system` is modified in a trivial way::" msgstr "La fonction :c:func:`spam_system` est modifiée de manière simple ::" -#: extending/extending.rst:1248 +#: extending/extending.rst:1241 msgid "In the beginning of the module, right after the line ::" msgstr "Au début du module, immédiatement après la ligne ::" -#: extending/extending.rst:1252 +#: extending/extending.rst:1245 msgid "two more lines must be added::" msgstr "on doit ajouter deux lignes supplémentaires ::" -#: extending/extending.rst:1257 +#: extending/extending.rst:1250 msgid "" "The ``#define`` is used to tell the header file that it is being included in " "the exporting module, not a client module. Finally, the module's " @@ -1750,15 +1744,15 @@ msgstr "" "Enfin, la fonction d'initialisation du module doit prendre en charge " "l'initialisation du tableau de pointeurs de l'API C ::" -#: extending/extending.rst:1287 +#: extending/extending.rst:1280 msgid "" "Note that ``PySpam_API`` is declared ``static``; otherwise the pointer array " "would disappear when :func:`PyInit_spam` terminates!" msgstr "" "Notez que ``PySpam_API`` est déclaré ``static`` ; sinon le tableau de " -"pointeurs disparaîtrait lorsque :func:`PyInit_spam`` se finit !" +"pointeurs disparaîtrait lorsque :func:`PyInit_spam` se finit !" -#: extending/extending.rst:1290 +#: extending/extending.rst:1283 msgid "" "The bulk of the work is in the header file :file:`spammodule.h`, which looks " "like this::" @@ -1766,7 +1760,7 @@ msgstr "" "L'essentiel du travail se trouve dans le fichier d'en-tête :file:`spammodule." "h`, qui ressemble à ceci ::" -#: extending/extending.rst:1341 +#: extending/extending.rst:1334 msgid "" "All that a client module must do in order to have access to the function :c:" "func:`PySpam_System` is to call the function (or rather macro) :c:func:" @@ -1776,7 +1770,7 @@ msgstr "" "func:`PySpam_System` est d'appeler la fonction (ou plutôt la macro) :c:func:" "`import_spam` dans sa fonction d'initialisation ::" -#: extending/extending.rst:1359 +#: extending/extending.rst:1352 msgid "" "The main disadvantage of this approach is that the file :file:`spammodule.h` " "is rather complicated. However, the basic structure is the same for each " @@ -1787,7 +1781,7 @@ msgstr "" "même pour chaque fonction exportée, ce qui fait qu'elle ne doit être apprise " "qu'une seule fois." -#: extending/extending.rst:1363 +#: extending/extending.rst:1356 msgid "" "Finally it should be mentioned that Capsules offer additional functionality, " "which is especially useful for memory allocation and deallocation of the " @@ -1804,11 +1798,11 @@ msgstr "" "file:`Include/pycapsule.h` et :file:`Objects/pycapsule.c` dans la " "distribution du code source Python)." -#: extending/extending.rst:1371 +#: extending/extending.rst:1364 msgid "Footnotes" msgstr "Notes" -#: extending/extending.rst:1372 +#: extending/extending.rst:1365 msgid "" "An interface for this function already exists in the standard module :mod:" "`os` --- it was chosen as a simple and straightforward example." @@ -1816,7 +1810,7 @@ msgstr "" "Une interface pour cette fonction existe déjà dans le module standard :mod:" "`os`, elle a été choisie comme un exemple simple et direct." -#: extending/extending.rst:1375 +#: extending/extending.rst:1368 msgid "" "The metaphor of \"borrowing\" a reference is not completely correct: the " "owner still has a copy of the reference." @@ -1824,7 +1818,7 @@ msgstr "" "L'expression « emprunter une référence » n'est pas tout à fait correcte, car " "le propriétaire a toujours une copie de la référence." -#: extending/extending.rst:1378 +#: extending/extending.rst:1371 msgid "" "Checking that the reference count is at least 1 **does not work** --- the " "reference count itself could be in freed memory and may thus be reused for " @@ -1834,7 +1828,7 @@ msgstr "" "pas**, le compte de référence lui-même pourrait être en mémoire libérée et " "peut donc être réutilisé pour un autre objet !" -#: extending/extending.rst:1382 +#: extending/extending.rst:1375 msgid "" "These guarantees don't hold when you use the \"old\" style calling " "convention --- this is still found in much existing code." diff --git a/extending/newtypes.po b/extending/newtypes.po index 8b66b30ef1..55d9f74d62 100644 --- a/extending/newtypes.po +++ b/extending/newtypes.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-24 17:33+0100\n" +"POT-Creation-Date: 2021-11-04 18:14+0100\n" "PO-Revision-Date: 2021-02-07 20:03+0100\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -28,7 +28,7 @@ msgstr "" #: extending/newtypes.rst:14 msgid "" "Here is the definition of :c:type:`PyTypeObject`, with some fields only used " -"in debug builds omitted:" +"in :ref:`debug builds ` omitted:" msgstr "" #: extending/newtypes.rst:20 @@ -94,7 +94,13 @@ msgid "" "of this function::" msgstr "" -#: extending/newtypes.rst:83 +#: extending/newtypes.rst:79 +msgid "" +"If your type supports garbage collection, the destructor should call :c:func:" +"`PyObject_GC_UnTrack` before clearing any member fields::" +msgstr "" + +#: extending/newtypes.rst:95 msgid "" "One important requirement of the deallocator function is that it leaves any " "pending exceptions alone. This is important since deallocators are " @@ -109,7 +115,7 @@ msgid "" "c:func:`PyErr_Fetch` and :c:func:`PyErr_Restore` functions::" msgstr "" -#: extending/newtypes.rst:122 +#: extending/newtypes.rst:134 msgid "" "There are limitations to what you can safely do in a deallocator function. " "First, if your type supports garbage collection (using :c:member:" @@ -122,43 +128,43 @@ msgid "" "tp_dealloc` again, causing a double free and a crash." msgstr "" -#: extending/newtypes.rst:131 +#: extending/newtypes.rst:143 msgid "" "Starting with Python 3.4, it is recommended not to put any complex " "finalization code in :c:member:`~PyTypeObject.tp_dealloc`, and instead use " "the new :c:member:`~PyTypeObject.tp_finalize` type method." msgstr "" -#: extending/newtypes.rst:136 +#: extending/newtypes.rst:148 msgid ":pep:`442` explains the new finalization scheme." msgstr ":pep:`442` explique le nouveau schéma de finalisation." -#: extending/newtypes.rst:143 +#: extending/newtypes.rst:155 msgid "Object Presentation" msgstr "Présentation de l'objet" -#: extending/newtypes.rst:145 +#: extending/newtypes.rst:157 msgid "" "In Python, there are two ways to generate a textual representation of an " "object: the :func:`repr` function, and the :func:`str` function. (The :func:" "`print` function just calls :func:`str`.) These handlers are both optional." msgstr "" -#: extending/newtypes.rst:154 +#: extending/newtypes.rst:166 msgid "" "The :c:member:`~PyTypeObject.tp_repr` handler should return a string object " "containing a representation of the instance for which it is called. Here is " "a simple example::" msgstr "" -#: extending/newtypes.rst:165 +#: extending/newtypes.rst:177 msgid "" "If no :c:member:`~PyTypeObject.tp_repr` handler is specified, the " "interpreter will supply a representation that uses the type's :c:member:" "`~PyTypeObject.tp_name` and a uniquely-identifying value for the object." msgstr "" -#: extending/newtypes.rst:169 +#: extending/newtypes.rst:181 msgid "" "The :c:member:`~PyTypeObject.tp_str` handler is to :func:`str` what the :c:" "member:`~PyTypeObject.tp_repr` handler described above is to :func:`repr`; " @@ -169,15 +175,15 @@ msgid "" "the :c:member:`~PyTypeObject.tp_repr` handler is used instead." msgstr "" -#: extending/newtypes.rst:176 +#: extending/newtypes.rst:188 msgid "Here is a simple example::" msgstr "Voici un exemple simple ::" -#: extending/newtypes.rst:188 +#: extending/newtypes.rst:200 msgid "Attribute Management" msgstr "Gestion des attributs" -#: extending/newtypes.rst:190 +#: extending/newtypes.rst:202 msgid "" "For every object which can support attributes, the corresponding type must " "provide the functions that control how the attributes are resolved. There " @@ -187,7 +193,7 @@ msgid "" "handler is ``NULL``." msgstr "" -#: extending/newtypes.rst:196 +#: extending/newtypes.rst:208 msgid "" "Python supports two pairs of attribute handlers; a type that supports " "attributes only needs to implement the functions for one pair. The " @@ -196,7 +202,7 @@ msgid "" "use whichever pair makes more sense for the implementation's convenience. ::" msgstr "" -#: extending/newtypes.rst:208 +#: extending/newtypes.rst:220 msgid "" "If accessing attributes of an object is always a simple operation (this will " "be explained shortly), there are generic implementations which can be used " @@ -207,17 +213,17 @@ msgid "" "mechanism that is available." msgstr "" -#: extending/newtypes.rst:219 +#: extending/newtypes.rst:231 msgid "Generic Attribute Management" msgstr "Gestion des attributs génériques" -#: extending/newtypes.rst:221 +#: extending/newtypes.rst:233 msgid "" "Most extension types only use *simple* attributes. So, what makes the " "attributes simple? There are only a couple of conditions that must be met:" msgstr "" -#: extending/newtypes.rst:224 +#: extending/newtypes.rst:236 msgid "" "The name of the attributes must be known when :c:func:`PyType_Ready` is " "called." @@ -225,19 +231,19 @@ msgstr "" "Le nom des attributs doivent être déjà connus lorsqu'on lance :c:func:" "`PyType_Ready`." -#: extending/newtypes.rst:227 +#: extending/newtypes.rst:239 msgid "" "No special processing is needed to record that an attribute was looked up or " "set, nor do actions need to be taken based on the value." msgstr "" -#: extending/newtypes.rst:230 +#: extending/newtypes.rst:242 msgid "" "Note that this list does not place any restrictions on the values of the " "attributes, when the values are computed, or how relevant data is stored." msgstr "" -#: extending/newtypes.rst:233 +#: extending/newtypes.rst:245 msgid "" "When :c:func:`PyType_Ready` is called, it uses three tables referenced by " "the type object to create :term:`descriptor`\\s which are placed in the " @@ -249,19 +255,19 @@ msgid "" "``NULL`` as well, allowing the base type to handle attributes." msgstr "" -#: extending/newtypes.rst:241 +#: extending/newtypes.rst:253 msgid "The tables are declared as three fields of the type object::" msgstr "" "Les tables sont déclarées sous la forme de trois champs de type objet ::" -#: extending/newtypes.rst:247 +#: extending/newtypes.rst:259 msgid "" "If :c:member:`~PyTypeObject.tp_methods` is not ``NULL``, it must refer to an " "array of :c:type:`PyMethodDef` structures. Each entry in the table is an " "instance of this structure::" msgstr "" -#: extending/newtypes.rst:258 +#: extending/newtypes.rst:270 msgid "" "One entry should be defined for each method provided by the type; no entries " "are needed for methods inherited from a base type. One additional entry is " @@ -269,7 +275,7 @@ msgid "" "attr:`ml_name` field of the sentinel must be ``NULL``." msgstr "" -#: extending/newtypes.rst:263 +#: extending/newtypes.rst:275 msgid "" "The second table is used to define attributes which map directly to data " "stored in the instance. A variety of primitive C types are supported, and " @@ -277,7 +283,7 @@ msgid "" "defined as::" msgstr "" -#: extending/newtypes.rst:275 +#: extending/newtypes.rst:287 msgid "" "For each entry in the table, a :term:`descriptor` will be constructed and " "added to the type which will be able to extract a value from the instance " @@ -288,53 +294,48 @@ msgid "" "accessed." msgstr "" -#: extending/newtypes.rst:282 +#: extending/newtypes.rst:294 msgid "" "The following flag constants are defined in :file:`structmember.h`; they may " "be combined using bitwise-OR." msgstr "" -#: extending/newtypes.rst:286 +#: extending/newtypes.rst:298 msgid "Constant" msgstr "Constante" -#: extending/newtypes.rst:286 +#: extending/newtypes.rst:298 msgid "Meaning" msgstr "Signification" -#: extending/newtypes.rst:288 +#: extending/newtypes.rst:300 msgid ":const:`READONLY`" msgstr ":const:`READONLY`" -#: extending/newtypes.rst:288 +#: extending/newtypes.rst:300 msgid "Never writable." msgstr "Jamais disponible en écriture." -#: extending/newtypes.rst:290 -msgid ":const:`READ_RESTRICTED`" -msgstr ":const:`READ_RESTRICTED`" - -#: extending/newtypes.rst:290 -msgid "Not readable in restricted mode." -msgstr "Non disponible en lecture, dans le mode restreint." - -#: extending/newtypes.rst:292 -msgid ":const:`WRITE_RESTRICTED`" -msgstr ":const:`WRITE_RESTRICTED`" - -#: extending/newtypes.rst:292 -msgid "Not writable in restricted mode." -msgstr "Non disponible en écriture dans le mode restreint." +#: extending/newtypes.rst:302 +#, fuzzy +msgid ":const:`PY_AUDIT_READ`" +msgstr ":const:`READONLY`" -#: extending/newtypes.rst:294 -msgid ":const:`RESTRICTED`" -msgstr ":const:`RESTRICTED`" +#: extending/newtypes.rst:302 +msgid "" +"Emit an ``object.__getattr__`` :ref:`audit events ` before " +"reading." +msgstr "" -#: extending/newtypes.rst:294 -msgid "Not readable or writable in restricted mode." -msgstr "Non disponible en lecture ou écriture, en mode restreint." +#: extending/newtypes.rst:307 +msgid "" +":const:`RESTRICTED`, :const:`READ_RESTRICTED` and :const:`WRITE_RESTRICTED` " +"are deprecated. However, :const:`READ_RESTRICTED` is an alias for :const:" +"`PY_AUDIT_READ`, so fields that specify either :const:`RESTRICTED` or :const:" +"`READ_RESTRICTED` will also raise an audit event." +msgstr "" -#: extending/newtypes.rst:303 +#: extending/newtypes.rst:320 msgid "" "An interesting advantage of using the :c:member:`~PyTypeObject.tp_members` " "table to build descriptors that are used at runtime is that any attribute " @@ -351,17 +352,17 @@ msgstr "" "descripteur de l'objet de classe, et utiliser son attribut :attr:`__doc__` " "pour renvoyer le *docstring*." -#: extending/newtypes.rst:309 +#: extending/newtypes.rst:326 msgid "" "As with the :c:member:`~PyTypeObject.tp_methods` table, a sentinel entry " "with a :attr:`name` value of ``NULL`` is required." msgstr "" -#: extending/newtypes.rst:323 +#: extending/newtypes.rst:340 msgid "Type-specific Attribute Management" msgstr "Gestion des attributs de type spécifiques" -#: extending/newtypes.rst:325 +#: extending/newtypes.rst:342 msgid "" "For simplicity, only the :c:type:`char\\*` version will be demonstrated " "here; the type of the name parameter is the only difference between the :c:" @@ -372,18 +373,18 @@ msgid "" "functionality, you'll understand what needs to be done." msgstr "" -#: extending/newtypes.rst:333 +#: extending/newtypes.rst:350 msgid "" "The :c:member:`~PyTypeObject.tp_getattr` handler is called when the object " "requires an attribute look-up. It is called in the same situations where " "the :meth:`__getattr__` method of a class would be called." msgstr "" -#: extending/newtypes.rst:337 +#: extending/newtypes.rst:354 msgid "Here is an example::" msgstr "Voici un exemple ::" -#: extending/newtypes.rst:353 +#: extending/newtypes.rst:370 msgid "" "The :c:member:`~PyTypeObject.tp_setattr` handler is called when the :meth:" "`__setattr__` or :meth:`__delattr__` method of a class instance would be " @@ -393,11 +394,11 @@ msgid "" "should be set to ``NULL``. ::" msgstr "" -#: extending/newtypes.rst:367 +#: extending/newtypes.rst:384 msgid "Object Comparison" msgstr "Comparaison des objets" -#: extending/newtypes.rst:373 +#: extending/newtypes.rst:390 msgid "" "The :c:member:`~PyTypeObject.tp_richcompare` handler is called when " "comparisons are needed. It is analogous to the :ref:`rich comparison " @@ -405,34 +406,34 @@ msgid "" "`PyObject_RichCompare` and :c:func:`PyObject_RichCompareBool`." msgstr "" -#: extending/newtypes.rst:378 +#: extending/newtypes.rst:395 msgid "" "This function is called with two Python objects and the operator as " "arguments, where the operator is one of ``Py_EQ``, ``Py_NE``, ``Py_LE``, " -"``Py_GT``, ``Py_LT`` or ``Py_GT``. It should compare the two objects with " +"``Py_GE``, ``Py_LT`` or ``Py_GT``. It should compare the two objects with " "respect to the specified operator and return ``Py_True`` or ``Py_False`` if " "the comparison is successful, ``Py_NotImplemented`` to indicate that " "comparison is not implemented and the other object's comparison method " "should be tried, or ``NULL`` if an exception was set." msgstr "" -#: extending/newtypes.rst:386 +#: extending/newtypes.rst:403 msgid "" "Here is a sample implementation, for a datatype that is considered equal if " "the size of an internal pointer is equal::" msgstr "" -#: extending/newtypes.rst:416 +#: extending/newtypes.rst:433 msgid "Abstract Protocol Support" msgstr "Support pour le protocole abstrait" -#: extending/newtypes.rst:418 +#: extending/newtypes.rst:435 msgid "" "Python supports a variety of *abstract* 'protocols;' the specific interfaces " "provided to use these interfaces are documented in :ref:`abstract`." msgstr "" -#: extending/newtypes.rst:422 +#: extending/newtypes.rst:439 msgid "" "A number of these abstract interfaces were defined early in the development " "of the Python implementation. In particular, the number, mapping, and " @@ -447,7 +448,7 @@ msgid "" "slot, but a slot may still be unfilled.) ::" msgstr "" -#: extending/newtypes.rst:437 +#: extending/newtypes.rst:454 msgid "" "If you wish your object to be able to act like a number, a sequence, or a " "mapping object, then you place the address of a structure that implements " @@ -458,13 +459,13 @@ msgid "" "distribution. ::" msgstr "" -#: extending/newtypes.rst:446 +#: extending/newtypes.rst:463 msgid "" "This function, if you choose to provide it, should return a hash number for " "an instance of your data type. Here is a simple example::" msgstr "" -#: extending/newtypes.rst:459 +#: extending/newtypes.rst:476 msgid "" ":c:type:`Py_hash_t` is a signed integer type with a platform-varying width. " "Returning ``-1`` from :c:member:`~PyTypeObject.tp_hash` indicates an error, " @@ -472,7 +473,7 @@ msgid "" "computation is successful, as seen above." msgstr "" -#: extending/newtypes.rst:468 +#: extending/newtypes.rst:485 msgid "" "This function is called when an instance of your data type is \"called\", " "for example, if ``obj1`` is an instance of your data type and the Python " @@ -480,23 +481,23 @@ msgid "" "handler is invoked." msgstr "" -#: extending/newtypes.rst:472 +#: extending/newtypes.rst:489 msgid "This function takes three arguments:" msgstr "Cette fonction prend trois arguments :" -#: extending/newtypes.rst:474 +#: extending/newtypes.rst:491 msgid "" "*self* is the instance of the data type which is the subject of the call. If " "the call is ``obj1('hello')``, then *self* is ``obj1``." msgstr "" -#: extending/newtypes.rst:477 +#: extending/newtypes.rst:494 msgid "" "*args* is a tuple containing the arguments to the call. You can use :c:func:" "`PyArg_ParseTuple` to extract the arguments." msgstr "" -#: extending/newtypes.rst:480 +#: extending/newtypes.rst:497 msgid "" "*kwds* is a dictionary of keyword arguments that were passed. If this is non-" "``NULL`` and you support keyword arguments, use :c:func:" @@ -505,11 +506,11 @@ msgid "" "`TypeError` with a message saying that keyword arguments are not supported." msgstr "" -#: extending/newtypes.rst:486 +#: extending/newtypes.rst:503 msgid "Here is a toy ``tp_call`` implementation::" msgstr "Ceci est une implémentation ``tp_call`` très simple ::" -#: extending/newtypes.rst:512 +#: extending/newtypes.rst:529 msgid "" "These functions provide support for the iterator protocol. Both handlers " "take exactly one parameter, the instance for which they are being called, " @@ -520,7 +521,7 @@ msgid "" "__next__` method." msgstr "" -#: extending/newtypes.rst:519 +#: extending/newtypes.rst:536 msgid "" "Any :term:`iterable` object must implement the :c:member:`~PyTypeObject." "tp_iter` handler, which must return an :term:`iterator` object. Here the " @@ -531,7 +532,7 @@ msgstr "" "`iterator`. Ici, les mêmes directives s'appliquent de la même façon que " "pour les classes *Python* :" -#: extending/newtypes.rst:523 +#: extending/newtypes.rst:540 msgid "" "For collections (such as lists and tuples) which can support multiple " "independent iterators, a new iterator should be created and returned by each " @@ -541,7 +542,7 @@ msgstr "" "implémenter plusieurs itérateurs indépendants, un nouvel itérateur doit être " "créé et renvoyé par chaque appel de type :c:member:`~PyTypeObject.tp_iter`." -#: extending/newtypes.rst:526 +#: extending/newtypes.rst:543 msgid "" "Objects which can only be iterated over once (usually due to side effects of " "iteration, such as file objects) can implement :c:member:`~PyTypeObject." @@ -549,7 +550,7 @@ msgid "" "therefore implement the :c:member:`~PyTypeObject.tp_iternext` handler." msgstr "" -#: extending/newtypes.rst:531 +#: extending/newtypes.rst:548 msgid "" "Any :term:`iterator` object should implement both :c:member:`~PyTypeObject." "tp_iter` and :c:member:`~PyTypeObject.tp_iternext`. An iterator's :c:member:" @@ -564,11 +565,11 @@ msgid "" "``NULL``." msgstr "" -#: extending/newtypes.rst:547 +#: extending/newtypes.rst:564 msgid "Weak Reference Support" msgstr "Prise en charge de la référence faible" -#: extending/newtypes.rst:549 +#: extending/newtypes.rst:566 msgid "" "One of the goals of Python's weak reference implementation is to allow any " "type to participate in the weak reference mechanism without incurring the " @@ -579,11 +580,11 @@ msgstr "" "faible sans avoir à supporter le surcoût de la performance critique des " "certains objets, tels que les nombres." -#: extending/newtypes.rst:554 +#: extending/newtypes.rst:571 msgid "Documentation for the :mod:`weakref` module." msgstr "Documentation pour le module :mod:`weakref`." -#: extending/newtypes.rst:556 +#: extending/newtypes.rst:573 msgid "" "For an object to be weakly referencable, the extension type must do two " "things:" @@ -591,7 +592,7 @@ msgstr "" "Pour qu'un objet soit faiblement référençable, le type d'extension doit " "faire deux choses :" -#: extending/newtypes.rst:558 +#: extending/newtypes.rst:575 msgid "" "Include a :c:type:`PyObject\\*` field in the C object structure dedicated to " "the weak reference mechanism. The object's constructor should leave it " @@ -603,7 +604,7 @@ msgstr "" "la valeur ``NULL`` (ce qui est automatique lorsque l'on utilise le champ par " "défaut :c:member:`~PyTypeObject.tp_alloc`)." -#: extending/newtypes.rst:563 +#: extending/newtypes.rst:580 msgid "" "Set the :c:member:`~PyTypeObject.tp_weaklistoffset` type member to the " "offset of the aforementioned field in the C object structure, so that the " @@ -614,7 +615,7 @@ msgstr "" "l'objet *C*, afin que l'interpréteur sache comment accéder à ce champ et le " "modifier." -#: extending/newtypes.rst:567 +#: extending/newtypes.rst:584 msgid "" "Concretely, here is how a trivial object structure would be augmented with " "the required field::" @@ -622,12 +623,12 @@ msgstr "" "Concrètement, voici comment une structure d'objet simple serait complétée " "par le champ requis ::" -#: extending/newtypes.rst:575 +#: extending/newtypes.rst:592 msgid "And the corresponding member in the statically-declared type object::" msgstr "" "Et le membre correspondant dans l'objet de type déclaré statiquement ::" -#: extending/newtypes.rst:583 +#: extending/newtypes.rst:600 msgid "" "The only further addition is that ``tp_dealloc`` needs to clear any weak " "references (by calling :c:func:`PyObject_ClearWeakRefs`) if the field is non-" @@ -637,11 +638,11 @@ msgstr "" "référence faible (en appelant :c:func:`PyObject_ClearWeakRefs`) si le champ " "est non ``NULL`` ::" -#: extending/newtypes.rst:599 +#: extending/newtypes.rst:616 msgid "More Suggestions" msgstr "Plus de suggestions" -#: extending/newtypes.rst:601 +#: extending/newtypes.rst:618 msgid "" "In order to learn how to implement any specific method for your new data " "type, get the :term:`CPython` source code. Go to the :file:`Objects` " @@ -656,7 +657,7 @@ msgstr "" "``tp_richcompare``). Vous trouverez des exemples de la fonction que vous " "voulez implémenter." -#: extending/newtypes.rst:607 +#: extending/newtypes.rst:624 msgid "" "When you need to verify that an object is a concrete instance of the type " "you are implementing, use the :c:func:`PyObject_TypeCheck` function. A " @@ -666,20 +667,38 @@ msgstr "" "du type que vous implémentez, utilisez la fonction :c:func:" "`PyObject_TypeCheck`. Voici un exemple de son utilisation ::" -#: extending/newtypes.rst:618 +#: extending/newtypes.rst:635 msgid "Download CPython source releases." msgstr "Télécharger les versions sources de *CPython*." -#: extending/newtypes.rst:618 +#: extending/newtypes.rst:635 msgid "https://www.python.org/downloads/source/" msgstr "https://www.python.org/downloads/source/" -#: extending/newtypes.rst:620 +#: extending/newtypes.rst:637 msgid "" "The CPython project on GitHub, where the CPython source code is developed." msgstr "" "Le projet *CPython* sur *GitHub*, où se trouve le code source *CPython*." -#: extending/newtypes.rst:621 +#: extending/newtypes.rst:638 msgid "https://github.com/python/cpython" msgstr "https://github.com/python/cpython" + +#~ msgid ":const:`READ_RESTRICTED`" +#~ msgstr ":const:`READ_RESTRICTED`" + +#~ msgid "Not readable in restricted mode." +#~ msgstr "Non disponible en lecture, dans le mode restreint." + +#~ msgid ":const:`WRITE_RESTRICTED`" +#~ msgstr ":const:`WRITE_RESTRICTED`" + +#~ msgid "Not writable in restricted mode." +#~ msgstr "Non disponible en écriture dans le mode restreint." + +#~ msgid ":const:`RESTRICTED`" +#~ msgstr ":const:`RESTRICTED`" + +#~ msgid "Not readable or writable in restricted mode." +#~ msgstr "Non disponible en lecture ou écriture, en mode restreint." diff --git a/extending/newtypes_tutorial.po b/extending/newtypes_tutorial.po index 13887d06bb..bdad340ada 100644 --- a/extending/newtypes_tutorial.po +++ b/extending/newtypes_tutorial.po @@ -5,9 +5,9 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2018-06-17 10:15+0200\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-10-18 12:22+0200\n" +"Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -16,7 +16,7 @@ msgstr "" #: extending/newtypes_tutorial.rst:7 msgid "Defining Extension Types: Tutorial" -msgstr "" +msgstr "Tutoriel : définir des types dans des extensions" #: extending/newtypes_tutorial.rst:14 msgid "" @@ -26,10 +26,15 @@ msgid "" "pattern, but there are some details that you need to understand before you " "can get started. This document is a gentle introduction to the topic." msgstr "" +"Python permet à l'auteur d'un module d'extension C de définir de nouveaux " +"types qui peuvent être manipulés depuis du code Python, à la manière des " +"types natifs :class:`str` et :class:`list`. Les implémentations de tous les " +"types d'extension ont des similarités, mais quelques subtilités doivent être " +"abordées avant de commencer." #: extending/newtypes_tutorial.rst:24 msgid "The Basics" -msgstr "" +msgstr "Les bases" #: extending/newtypes_tutorial.rst:26 msgid "" @@ -42,12 +47,23 @@ msgid "" "an object, a method called, or it is multiplied by another object. These C " "functions are called \"type methods\"." msgstr "" +":term:`CPython` considère que tous les objets Python sont des variables de " +"type :c:type:`PyObject\\*`, qui sert de type de base pour tous les objets " +"Python. La structure de :c:type:`PyObject` ne contient que le :term:" +"`compteur de références ` et un pointeur vers un objet de " +"type « type de l'objet ». C'est ici que tout se joue : l'objet type " +"détermine quelle fonction C doit être appelée par l'interpréteur quand, par " +"exemple, un attribut est recherché sur un objet, quand une méthode est " +"appelée, ou quand l'objet est multiplié par un autre objet. Ces fonctions C " +"sont appelées des « méthodes de type »." #: extending/newtypes_tutorial.rst:35 msgid "" "So, if you want to define a new extension type, you need to create a new " "type object." msgstr "" +"Donc, pour définir un nouveau type dans une extension, vous devez créer un " +"nouvel objet type." #: extending/newtypes_tutorial.rst:38 msgid "" @@ -55,6 +71,9 @@ msgid "" "but complete, module that defines a new type named :class:`Custom` inside a " "C extension module :mod:`custom`:" msgstr "" +"Ce genre de chose ne s'explique correctement qu'avec des exemples, voici " +"donc un module minimaliste mais suffisant qui définit un nouveau type nommé :" +"class:`Custom` dans le module d'extension :mod:`custom` :" #: extending/newtypes_tutorial.rst:43 msgid "" @@ -63,18 +82,27 @@ msgid "" "allows defining heap-allocated extension types using the :c:func:" "`PyType_FromSpec` function, which isn't covered in this tutorial." msgstr "" +"Ce qui est montré ici est la manière traditionnelle de définir des types " +"d'extension *statiques*, et cela convient dans la majorité des cas. L'API C " +"permet aussi de définir des types alloués sur le tas, via la fonction :c:" +"func:`PyType_FromSpec`, mais ce n'est pas couvert par ce tutoriel." #: extending/newtypes_tutorial.rst:50 msgid "" "Now that's quite a bit to take in at once, but hopefully bits will seem " "familiar from the previous chapter. This file defines three things:" msgstr "" +"C'est un peu long, mais vous devez déjà reconnaître quelques morceaux " +"expliqués au chapitre précédent. Ce fichier définit trois choses :" #: extending/newtypes_tutorial.rst:53 msgid "" "What a :class:`Custom` **object** contains: this is the ``CustomObject`` " "struct, which is allocated once for each :class:`Custom` instance." msgstr "" +"Ce qu'un **objet** :class:`Custom` contient : c'est la structure " +"``CustomObject``, qui est allouée une fois pour chaque instance de :class:" +"`Custom`." #: extending/newtypes_tutorial.rst:55 msgid "" @@ -82,76 +110,109 @@ msgid "" "which defines a set of flags and function pointers that the interpreter " "inspects when specific operations are requested." msgstr "" +"Comment le **type** :class:`Custom` se comporte : c'est la structure " +"``CustomType``, qui définit l'ensemble des options et pointeurs de fonction " +"utilisés par l'interpréteur." #: extending/newtypes_tutorial.rst:58 msgid "" "How to initialize the :mod:`custom` module: this is the ``PyInit_custom`` " "function and the associated ``custommodule`` struct." msgstr "" +"Comment initialiser le module :mod:`custom` : c'est la fonction " +"``PyInit_custom`` et la structure associée ``custommodule``." #: extending/newtypes_tutorial.rst:61 msgid "The first bit is::" -msgstr "" +msgstr "Commençons par ::" #: extending/newtypes_tutorial.rst:67 +#, fuzzy msgid "" "This is what a Custom object will contain. ``PyObject_HEAD`` is mandatory " "at the start of each object struct and defines a field called ``ob_base`` of " "type :c:type:`PyObject`, containing a pointer to a type object and a " -"reference count (these can be accessed using the macros :c:macro:`Py_REFCNT` " -"and :c:macro:`Py_TYPE` respectively). The reason for the macro is to " -"abstract away the layout and to enable additional fields in debug builds." +"reference count (these can be accessed using the macros :c:macro:`Py_TYPE` " +"and :c:macro:`Py_REFCNT` respectively). The reason for the macro is to " +"abstract away the layout and to enable additional fields in :ref:`debug " +"builds `." msgstr "" +"C'est ce qu'un objet ``Custom`` contient. ``PyObject_HEAD`` est " +"obligatoirement au début de chaque structure d'objet et définit un champ " +"appelé ``ob_base`` de type :c:type:`PyObject`, contenant un pointeur vers un " +"objet type et un compteur de références (on peut y accéder en utilisant les " +"macros :c:macro:`Py_TYPE` et :c:macro:`Py_REFCNT`, respectivement). La " +"raison d'être de ces macros est d'abstraire l'agencement de la structure, et " +"ainsi de permettre l'ajout de champs en :ref:`mode débogage `." -#: extending/newtypes_tutorial.rst:75 +#: extending/newtypes_tutorial.rst:76 msgid "" "There is no semicolon above after the :c:macro:`PyObject_HEAD` macro. Be " "wary of adding one by accident: some compilers will complain." msgstr "" +"Il n'y a pas de point-virgule après la macro :c:macro:`PyObject_HEAD`. " +"Attention à ne pas l'ajouter par accident : certains compilateurs pourraient " +"s'en plaindre." -#: extending/newtypes_tutorial.rst:78 +#: extending/newtypes_tutorial.rst:79 msgid "" "Of course, objects generally store additional data besides the standard " "``PyObject_HEAD`` boilerplate; for example, here is the definition for " "standard Python floats::" msgstr "" +"Bien sûr, les objets ajoutent généralement des données supplémentaires après " +"l'entête standard ``PyObject_HEAD``. Par exemple voici la définition du type " +"standard Python ``float`` ::" -#: extending/newtypes_tutorial.rst:87 +#: extending/newtypes_tutorial.rst:88 msgid "The second bit is the definition of the type object. ::" -msgstr "" +msgstr "La deuxième partie est la définition de l'objet type ::" -#: extending/newtypes_tutorial.rst:100 +#: extending/newtypes_tutorial.rst:101 msgid "" "We recommend using C99-style designated initializers as above, to avoid " "listing all the :c:type:`PyTypeObject` fields that you don't care about and " "also to avoid caring about the fields' declaration order." msgstr "" +"Nous recommandons d'utiliser la syntaxe d'initialisation nommée (C99) pour " +"remplir la structure, comme ci-dessus, afin d'éviter d'avoir à lister les " +"champs de :c:type:`PyTypeObject` dont vous n'avez pas besoin, et de ne pas " +"vous soucier de leur ordre." -#: extending/newtypes_tutorial.rst:104 +#: extending/newtypes_tutorial.rst:105 msgid "" "The actual definition of :c:type:`PyTypeObject` in :file:`object.h` has many " "more :ref:`fields ` than the definition above. The remaining " "fields will be filled with zeros by the C compiler, and it's common practice " "to not specify them explicitly unless you need them." msgstr "" +"La définition de :c:type:`PyTypeObject` dans :file:`object.h` contient en " +"fait bien plus de :ref:`champs ` que la définition ci-dessus. " +"Les champs restants sont mis à zéro par le compilateur C, et c'est une " +"pratique répandue de ne pas spécifier les champs dont vous n'avez pas besoin." -#: extending/newtypes_tutorial.rst:109 +#: extending/newtypes_tutorial.rst:110 msgid "We're going to pick it apart, one field at a time::" -msgstr "" +msgstr "Regardons les champs de cette structure, un par un ::" -#: extending/newtypes_tutorial.rst:113 +#: extending/newtypes_tutorial.rst:114 msgid "" "This line is mandatory boilerplate to initialize the ``ob_base`` field " "mentioned above. ::" msgstr "" +"Cette ligne, obligatoire, initialise le champ ``ob_base`` mentionné " +"précédemment." -#: extending/newtypes_tutorial.rst:118 +#: extending/newtypes_tutorial.rst:119 msgid "" "The name of our type. This will appear in the default textual " "representation of our objects and in some error messages, for example:" msgstr "" +"C'est le nom de notre type. Il apparaît dans la représentation textuelle par " +"défaut de nos objets, ainsi que dans quelques messages d'erreur, par " +"exemple :" -#: extending/newtypes_tutorial.rst:128 +#: extending/newtypes_tutorial.rst:129 msgid "" "Note that the name is a dotted name that includes both the module name and " "the name of the type within the module. The module in this case is :mod:" @@ -159,15 +220,24 @@ msgid "" "`custom.Custom`. Using the real dotted import path is important to make your " "type compatible with the :mod:`pydoc` and :mod:`pickle` modules. ::" msgstr "" +"Notez que le nom comporte un point : il inclut le nom du module et le nom du " +"type. Dans ce cas le module est :mod:`custom`, et le type est :class:" +"`Custom`, donc nous donnons comme nom :class:`custom.Custom`. Nommer " +"correctement son type, avec le point, est important pour le rendre " +"compatible avec :mod:`pydoc` et :mod:`pickle`. ::" -#: extending/newtypes_tutorial.rst:137 +#: extending/newtypes_tutorial.rst:138 msgid "" "This is so that Python knows how much memory to allocate when creating new :" "class:`Custom` instances. :c:member:`~PyTypeObject.tp_itemsize` is only " "used for variable-sized objects and should otherwise be zero." msgstr "" +"C'est pour que Python sache combien de mémoire allouer à la création d'une " +"nouvelle instance de :class:`Custom`. :c:member:`~PyTypeObject.tp_itemsize` " +"n'est utilisé que pour les objets de taille variable, sinon il doit rester à " +"zéro." -#: extending/newtypes_tutorial.rst:143 +#: extending/newtypes_tutorial.rst:144 msgid "" "If you want your type to be subclassable from Python, and your type has the " "same :c:member:`~PyTypeObject.tp_basicsize` as its base type, you may have " @@ -180,24 +250,42 @@ msgid "" "type will be :class:`object`, or else you will be adding data members to " "your base type, and therefore increasing its size." msgstr "" - -#: extending/newtypes_tutorial.rst:153 +"Si vous voulez qu'une classe en Python puisse hériter de votre type, et que " +"votre type a le même :c:member:`~PyTypeObject.tp_basicsize` que son parent, " +"vous rencontrerez des problèmes avec l'héritage multiple. Une sous-classe " +"Python de votre type devra lister votre type en premier dans son :attr:" +"`~class.__bases__`, sans quoi elle ne sera pas capable d'appeler la méthode :" +"meth:`__new__` de votre type sans erreur. Vous pouvez éviter ce problème en " +"vous assurant que votre type a un :c:member:`~PyTypeObject.tp_basicsize` " +"plus grand que son parent. La plupart du temps ce sera vrai (soit son parent " +"sera :class:`object`, soit vous ajouterez des attributs à votre type, " +"augmentant ainsi sa taille)." + +#: extending/newtypes_tutorial.rst:154 msgid "We set the class flags to :const:`Py_TPFLAGS_DEFAULT`. ::" msgstr "" +"On utilise la constante :const:`Py_TPFLAGS_DEFAULT` comme seule option de " +"type. ::" -#: extending/newtypes_tutorial.rst:157 +#: extending/newtypes_tutorial.rst:158 msgid "" "All types should include this constant in their flags. It enables all of " "the members defined until at least Python 3.3. If you need further members, " "you will need to OR the corresponding flags." msgstr "" +"Chaque type doit inclure cette constante dans ses options : elle active tous " +"les membres définis jusqu'à au moins Python 3.3. Si vous avez besoin de plus " +"de membres, vous pouvez la combiner à d'autres constantes avec un *ou* " +"binaire." -#: extending/newtypes_tutorial.rst:161 +#: extending/newtypes_tutorial.rst:162 msgid "" "We provide a doc string for the type in :c:member:`~PyTypeObject.tp_doc`. ::" msgstr "" +"On fournit une *docstring* pour ce type via le membre :c:member:" +"`~PyTypeObject.tp_doc`. ::" -#: extending/newtypes_tutorial.rst:165 +#: extending/newtypes_tutorial.rst:166 msgid "" "To enable object creation, we have to provide a :c:member:`~PyTypeObject." "tp_new` handler. This is the equivalent of the Python method :meth:" @@ -205,54 +293,68 @@ msgid "" "use the default implementation provided by the API function :c:func:" "`PyType_GenericNew`. ::" msgstr "" +"Pour permettre la création d'une instance, nous devons fournir un *handler* :" +"c:member:`~PyTypeObject.tp_new`, qui est l'équivalent de la méthode Python :" +"meth:`__new__`, mais elle a besoin d'être spécifiée explicitement. Dans ce " +"cas, on se contente de l'implémentation par défaut fournie par la fonction :" +"c:func:`PyType_GenericNew` de l'API." -#: extending/newtypes_tutorial.rst:172 +#: extending/newtypes_tutorial.rst:173 msgid "" "Everything else in the file should be familiar, except for some code in :c:" "func:`PyInit_custom`::" msgstr "" +"Le reste du fichier doit vous être familier, en dehors du code de :c:func:" +"`PyInit_custom` ::" -#: extending/newtypes_tutorial.rst:178 +#: extending/newtypes_tutorial.rst:179 msgid "" "This initializes the :class:`Custom` type, filling in a number of members to " "the appropriate default values, including :attr:`ob_type` that we initially " "set to ``NULL``. ::" msgstr "" +"Il initialise le type :class:`Custom`, en assignant quelques membres à leurs " +"valeurs par défaut, tel que :attr:`ob_type` qui valait initialement " +"``NULL``. ::" -#: extending/newtypes_tutorial.rst:189 +#: extending/newtypes_tutorial.rst:190 msgid "" "This adds the type to the module dictionary. This allows us to create :" "class:`Custom` instances by calling the :class:`Custom` class:" msgstr "" +"Ici on ajoute le type au dictionnaire du module. Cela permet de créer une " +"instance de :class:`Custom` en appelant la classe :class:`Custom` :" -#: extending/newtypes_tutorial.rst:197 +#: extending/newtypes_tutorial.rst:198 msgid "" "That's it! All that remains is to build it; put the above code in a file " "called :file:`custom.c` and:" msgstr "" +"C'est tout ! Il ne reste plus qu'à compiler, placez le code ci-dessus dans " +"un fichier :file:`custom.c` et :" -#: extending/newtypes_tutorial.rst:206 +#: extending/newtypes_tutorial.rst:207 msgid "in a file called :file:`setup.py`; then typing" msgstr "" -#: extending/newtypes_tutorial.rst:212 +#: extending/newtypes_tutorial.rst:213 msgid "" "at a shell should produce a file :file:`custom.so` in a subdirectory; move " "to that directory and fire up Python --- you should be able to ``import " "custom`` and play around with Custom objects." msgstr "" -#: extending/newtypes_tutorial.rst:216 +#: extending/newtypes_tutorial.rst:217 msgid "That wasn't so hard, was it?" msgstr "" -#: extending/newtypes_tutorial.rst:218 +#: extending/newtypes_tutorial.rst:219 msgid "" "Of course, the current Custom type is pretty uninteresting. It has no data " "and doesn't do anything. It can't even be subclassed." msgstr "" -#: extending/newtypes_tutorial.rst:222 +#: extending/newtypes_tutorial.rst:223 msgid "" "While this documentation showcases the standard :mod:`distutils` module for " "building C extensions, it is recommended in real-world use cases to use the " @@ -262,32 +364,32 @@ msgid "" "packages/>`_." msgstr "" -#: extending/newtypes_tutorial.rst:230 +#: extending/newtypes_tutorial.rst:231 msgid "Adding data and methods to the Basic example" msgstr "" -#: extending/newtypes_tutorial.rst:232 +#: extending/newtypes_tutorial.rst:233 msgid "" "Let's extend the basic example to add some data and methods. Let's also " "make the type usable as a base class. We'll create a new module, :mod:" "`custom2` that adds these capabilities:" msgstr "" -#: extending/newtypes_tutorial.rst:239 +#: extending/newtypes_tutorial.rst:240 msgid "This version of the module has a number of changes." msgstr "" -#: extending/newtypes_tutorial.rst:241 +#: extending/newtypes_tutorial.rst:242 msgid "We've added an extra include::" msgstr "" -#: extending/newtypes_tutorial.rst:245 +#: extending/newtypes_tutorial.rst:246 msgid "" "This include provides declarations that we use to handle attributes, as " "described a bit later." msgstr "" -#: extending/newtypes_tutorial.rst:248 +#: extending/newtypes_tutorial.rst:249 msgid "" "The :class:`Custom` type now has three data attributes in its C struct, " "*first*, *last*, and *number*. The *first* and *last* variables are Python " @@ -295,21 +397,21 @@ msgid "" "integer." msgstr "" -#: extending/newtypes_tutorial.rst:252 +#: extending/newtypes_tutorial.rst:253 msgid "The object structure is updated accordingly::" msgstr "" -#: extending/newtypes_tutorial.rst:261 +#: extending/newtypes_tutorial.rst:262 msgid "" "Because we now have data to manage, we have to be more careful about object " "allocation and deallocation. At a minimum, we need a deallocation method::" msgstr "" -#: extending/newtypes_tutorial.rst:272 +#: extending/newtypes_tutorial.rst:273 msgid "which is assigned to the :c:member:`~PyTypeObject.tp_dealloc` member::" msgstr "" -#: extending/newtypes_tutorial.rst:276 +#: extending/newtypes_tutorial.rst:277 msgid "" "This method first clears the reference counts of the two Python attributes. :" "c:func:`Py_XDECREF` correctly handles the case where its argument is " @@ -320,7 +422,7 @@ msgid "" "instance of a subclass." msgstr "" -#: extending/newtypes_tutorial.rst:285 +#: extending/newtypes_tutorial.rst:286 msgid "" "The explicit cast to ``destructor`` above is needed because we defined " "``Custom_dealloc`` to take a ``CustomObject *`` argument, but the " @@ -329,17 +431,17 @@ msgid "" "oriented polymorphism, in C!" msgstr "" -#: extending/newtypes_tutorial.rst:291 +#: extending/newtypes_tutorial.rst:292 msgid "" "We want to make sure that the first and last names are initialized to empty " "strings, so we provide a ``tp_new`` implementation::" msgstr "" -#: extending/newtypes_tutorial.rst:315 +#: extending/newtypes_tutorial.rst:316 msgid "and install it in the :c:member:`~PyTypeObject.tp_new` member::" msgstr "" -#: extending/newtypes_tutorial.rst:319 +#: extending/newtypes_tutorial.rst:320 msgid "" "The ``tp_new`` handler is responsible for creating (as opposed to " "initializing) objects of the type. It is exposed in Python as the :meth:" @@ -350,7 +452,7 @@ msgid "" "attributes to non-``NULL`` default values." msgstr "" -#: extending/newtypes_tutorial.rst:327 +#: extending/newtypes_tutorial.rst:328 msgid "" "``tp_new`` is passed the type being instantiated (not necessarily " "``CustomType``, if a subclass is instantiated) and any arguments passed when " @@ -360,25 +462,25 @@ msgid "" "k.a. ``tp_init`` in C or ``__init__`` in Python) methods." msgstr "" -#: extending/newtypes_tutorial.rst:335 +#: extending/newtypes_tutorial.rst:336 msgid "" "``tp_new`` shouldn't call ``tp_init`` explicitly, as the interpreter will do " "it itself." msgstr "" -#: extending/newtypes_tutorial.rst:338 +#: extending/newtypes_tutorial.rst:339 msgid "" "The ``tp_new`` implementation calls the :c:member:`~PyTypeObject.tp_alloc` " "slot to allocate memory::" msgstr "" -#: extending/newtypes_tutorial.rst:343 +#: extending/newtypes_tutorial.rst:344 msgid "" "Since memory allocation may fail, we must check the :c:member:`~PyTypeObject." "tp_alloc` result against ``NULL`` before proceeding." msgstr "" -#: extending/newtypes_tutorial.rst:347 +#: extending/newtypes_tutorial.rst:348 msgid "" "We didn't fill the :c:member:`~PyTypeObject.tp_alloc` slot ourselves. " "Rather :c:func:`PyType_Ready` fills it for us by inheriting it from our base " @@ -386,7 +488,7 @@ msgid "" "allocation strategy." msgstr "" -#: extending/newtypes_tutorial.rst:353 +#: extending/newtypes_tutorial.rst:354 msgid "" "If you are creating a co-operative :c:member:`~PyTypeObject.tp_new` (one " "that calls a base type's :c:member:`~PyTypeObject.tp_new` or :meth:" @@ -399,17 +501,17 @@ msgid "" "subclasses without getting a :exc:`TypeError`.)" msgstr "" -#: extending/newtypes_tutorial.rst:363 +#: extending/newtypes_tutorial.rst:364 msgid "" "We also define an initialization function which accepts arguments to provide " "initial values for our instance::" msgstr "" -#: extending/newtypes_tutorial.rst:392 +#: extending/newtypes_tutorial.rst:393 msgid "by filling the :c:member:`~PyTypeObject.tp_init` slot. ::" msgstr "" -#: extending/newtypes_tutorial.rst:396 +#: extending/newtypes_tutorial.rst:397 msgid "" "The :c:member:`~PyTypeObject.tp_init` slot is exposed in Python as the :meth:" "`__init__` method. It is used to initialize an object after it's created. " @@ -417,7 +519,7 @@ msgid "" "return either ``0`` on success or ``-1`` on error." msgstr "" -#: extending/newtypes_tutorial.rst:401 +#: extending/newtypes_tutorial.rst:402 msgid "" "Unlike the ``tp_new`` handler, there is no guarantee that ``tp_init`` is " "called at all (for example, the :mod:`pickle` module by default doesn't " @@ -428,7 +530,7 @@ msgid "" "``first`` member like this::" msgstr "" -#: extending/newtypes_tutorial.rst:415 +#: extending/newtypes_tutorial.rst:416 msgid "" "But this would be risky. Our type doesn't restrict the type of the " "``first`` member, so it could be any kind of object. It could have a " @@ -438,49 +540,49 @@ msgid "" "accesses and modifies our object." msgstr "" -#: extending/newtypes_tutorial.rst:422 +#: extending/newtypes_tutorial.rst:423 msgid "" "To be paranoid and protect ourselves against this possibility, we almost " "always reassign members before decrementing their reference counts. When " "don't we have to do this?" msgstr "" -#: extending/newtypes_tutorial.rst:426 +#: extending/newtypes_tutorial.rst:427 msgid "when we absolutely know that the reference count is greater than 1;" msgstr "" -#: extending/newtypes_tutorial.rst:428 +#: extending/newtypes_tutorial.rst:429 msgid "" "when we know that deallocation of the object [#]_ will neither release the :" "term:`GIL` nor cause any calls back into our type's code;" msgstr "" -#: extending/newtypes_tutorial.rst:431 +#: extending/newtypes_tutorial.rst:432 msgid "" "when decrementing a reference count in a :c:member:`~PyTypeObject." "tp_dealloc` handler on a type which doesn't support cyclic garbage " "collection [#]_." msgstr "" -#: extending/newtypes_tutorial.rst:434 +#: extending/newtypes_tutorial.rst:435 msgid "" "We want to expose our instance variables as attributes. There are a number " "of ways to do that. The simplest way is to define member definitions::" msgstr "" -#: extending/newtypes_tutorial.rst:447 +#: extending/newtypes_tutorial.rst:448 msgid "" "and put the definitions in the :c:member:`~PyTypeObject.tp_members` slot::" msgstr "" -#: extending/newtypes_tutorial.rst:451 +#: extending/newtypes_tutorial.rst:452 msgid "" "Each member definition has a member name, type, offset, access flags and " "documentation string. See the :ref:`Generic-Attribute-Management` section " "below for details." msgstr "" -#: extending/newtypes_tutorial.rst:455 +#: extending/newtypes_tutorial.rst:456 msgid "" "A disadvantage of this approach is that it doesn't provide a way to restrict " "the types of objects that can be assigned to the Python attributes. We " @@ -491,13 +593,13 @@ msgid "" "deleted." msgstr "" -#: extending/newtypes_tutorial.rst:462 +#: extending/newtypes_tutorial.rst:463 msgid "" "We define a single method, :meth:`Custom.name()`, that outputs the objects " "name as the concatenation of the first and last names. ::" msgstr "" -#: extending/newtypes_tutorial.rst:479 +#: extending/newtypes_tutorial.rst:480 msgid "" "The method is implemented as a C function that takes a :class:`Custom` (or :" "class:`Custom` subclass) instance as the first argument. Methods always " @@ -507,7 +609,7 @@ msgid "" "method is equivalent to the Python method:" msgstr "" -#: extending/newtypes_tutorial.rst:491 +#: extending/newtypes_tutorial.rst:492 msgid "" "Note that we have to check for the possibility that our :attr:`first` and :" "attr:`last` members are ``NULL``. This is because they can be deleted, in " @@ -516,23 +618,23 @@ msgid "" "We'll see how to do that in the next section." msgstr "" -#: extending/newtypes_tutorial.rst:497 +#: extending/newtypes_tutorial.rst:498 msgid "" "Now that we've defined the method, we need to create an array of method " "definitions::" msgstr "" -#: extending/newtypes_tutorial.rst:507 +#: extending/newtypes_tutorial.rst:508 msgid "" "(note that we used the :const:`METH_NOARGS` flag to indicate that the method " "is expecting no arguments other than *self*)" msgstr "" -#: extending/newtypes_tutorial.rst:510 +#: extending/newtypes_tutorial.rst:511 msgid "and assign it to the :c:member:`~PyTypeObject.tp_methods` slot::" msgstr "" -#: extending/newtypes_tutorial.rst:514 +#: extending/newtypes_tutorial.rst:515 msgid "" "Finally, we'll make our type usable as a base class for subclassing. We've " "written our methods carefully so far so that they don't make any assumptions " @@ -540,22 +642,22 @@ msgid "" "to add the :const:`Py_TPFLAGS_BASETYPE` to our class flag definition::" msgstr "" -#: extending/newtypes_tutorial.rst:521 +#: extending/newtypes_tutorial.rst:522 msgid "" "We rename :c:func:`PyInit_custom` to :c:func:`PyInit_custom2`, update the " "module name in the :c:type:`PyModuleDef` struct, and update the full class " "name in the :c:type:`PyTypeObject` struct." msgstr "" -#: extending/newtypes_tutorial.rst:525 +#: extending/newtypes_tutorial.rst:526 msgid "Finally, we update our :file:`setup.py` file to build the new module:" msgstr "" -#: extending/newtypes_tutorial.rst:538 +#: extending/newtypes_tutorial.rst:539 msgid "Providing finer control over data attributes" msgstr "" -#: extending/newtypes_tutorial.rst:540 +#: extending/newtypes_tutorial.rst:541 msgid "" "In this section, we'll provide finer control over how the :attr:`first` and :" "attr:`last` attributes are set in the :class:`Custom` example. In the " @@ -564,14 +666,14 @@ msgid "" "make sure that these attributes always contain strings." msgstr "" -#: extending/newtypes_tutorial.rst:549 +#: extending/newtypes_tutorial.rst:550 msgid "" "To provide greater control, over the :attr:`first` and :attr:`last` " "attributes, we'll use custom getter and setter functions. Here are the " "functions for getting and setting the :attr:`first` attribute::" msgstr "" -#: extending/newtypes_tutorial.rst:580 +#: extending/newtypes_tutorial.rst:581 msgid "" "The getter function is passed a :class:`Custom` object and a \"closure\", " "which is a void pointer. In this case, the closure is ignored. (The " @@ -581,7 +683,7 @@ msgid "" "data in the closure.)" msgstr "" -#: extending/newtypes_tutorial.rst:586 +#: extending/newtypes_tutorial.rst:587 msgid "" "The setter function is passed the :class:`Custom` object, the new value, and " "the closure. The new value may be ``NULL``, in which case the attribute is " @@ -589,32 +691,32 @@ msgid "" "or if its new value is not a string." msgstr "" -#: extending/newtypes_tutorial.rst:591 +#: extending/newtypes_tutorial.rst:592 msgid "We create an array of :c:type:`PyGetSetDef` structures::" msgstr "" -#: extending/newtypes_tutorial.rst:601 +#: extending/newtypes_tutorial.rst:602 msgid "and register it in the :c:member:`~PyTypeObject.tp_getset` slot::" msgstr "" -#: extending/newtypes_tutorial.rst:605 +#: extending/newtypes_tutorial.rst:606 msgid "" "The last item in a :c:type:`PyGetSetDef` structure is the \"closure\" " "mentioned above. In this case, we aren't using a closure, so we just pass " "``NULL``." msgstr "" -#: extending/newtypes_tutorial.rst:608 +#: extending/newtypes_tutorial.rst:609 msgid "We also remove the member definitions for these attributes::" msgstr "" -#: extending/newtypes_tutorial.rst:616 +#: extending/newtypes_tutorial.rst:617 msgid "" "We also need to update the :c:member:`~PyTypeObject.tp_init` handler to only " "allow strings [#]_ to be passed::" msgstr "" -#: extending/newtypes_tutorial.rst:645 +#: extending/newtypes_tutorial.rst:646 msgid "" "With these changes, we can assure that the ``first`` and ``last`` members " "are never ``NULL`` so we can remove checks for ``NULL`` values in almost all " @@ -624,25 +726,25 @@ msgid "" "possibility that the initialization of these members failed in ``tp_new``." msgstr "" -#: extending/newtypes_tutorial.rst:652 +#: extending/newtypes_tutorial.rst:653 msgid "" "We also rename the module initialization function and module name in the " "initialization function, as we did before, and we add an extra definition to " "the :file:`setup.py` file." msgstr "" -#: extending/newtypes_tutorial.rst:658 +#: extending/newtypes_tutorial.rst:659 msgid "Supporting cyclic garbage collection" msgstr "" -#: extending/newtypes_tutorial.rst:660 +#: extending/newtypes_tutorial.rst:661 msgid "" "Python has a :term:`cyclic garbage collector (GC) ` that " "can identify unneeded objects even when their reference counts are not zero. " "This can happen when objects are involved in cycles. For example, consider:" msgstr "" -#: extending/newtypes_tutorial.rst:670 +#: extending/newtypes_tutorial.rst:671 msgid "" "In this example, we create a list that contains itself. When we delete it, " "it still has a reference from itself. Its reference count doesn't drop to " @@ -650,7 +752,7 @@ msgid "" "out that the list is garbage and free it." msgstr "" -#: extending/newtypes_tutorial.rst:675 +#: extending/newtypes_tutorial.rst:676 msgid "" "In the second version of the :class:`Custom` example, we allowed any kind of " "object to be stored in the :attr:`first` or :attr:`last` attributes [#]_. " @@ -659,7 +761,7 @@ msgid "" "reasons, :class:`Custom` objects can participate in cycles:" msgstr "" -#: extending/newtypes_tutorial.rst:689 +#: extending/newtypes_tutorial.rst:690 msgid "" "To allow a :class:`Custom` instance participating in a reference cycle to be " "properly detected and collected by the cyclic GC, our :class:`Custom` type " @@ -667,13 +769,13 @@ msgid "" "slots:" msgstr "" -#: extending/newtypes_tutorial.rst:696 +#: extending/newtypes_tutorial.rst:697 msgid "" "First, the traversal method lets the cyclic GC know about subobjects that " "could participate in cycles::" msgstr "" -#: extending/newtypes_tutorial.rst:716 +#: extending/newtypes_tutorial.rst:717 msgid "" "For each subobject that can participate in cycles, we need to call the :c:" "func:`visit` function, which is passed to the traversal method. The :c:func:" @@ -682,26 +784,26 @@ msgid "" "be returned if it is non-zero." msgstr "" -#: extending/newtypes_tutorial.rst:722 +#: extending/newtypes_tutorial.rst:723 msgid "" "Python provides a :c:func:`Py_VISIT` macro that automates calling visit " "functions. With :c:func:`Py_VISIT`, we can minimize the amount of " "boilerplate in ``Custom_traverse``::" msgstr "" -#: extending/newtypes_tutorial.rst:735 +#: extending/newtypes_tutorial.rst:736 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` implementation must name its " "arguments exactly *visit* and *arg* in order to use :c:func:`Py_VISIT`." msgstr "" -#: extending/newtypes_tutorial.rst:738 +#: extending/newtypes_tutorial.rst:739 msgid "" "Second, we need to provide a method for clearing any subobjects that can " "participate in cycles::" msgstr "" -#: extending/newtypes_tutorial.rst:749 +#: extending/newtypes_tutorial.rst:750 msgid "" "Notice the use of the :c:func:`Py_CLEAR` macro. It is the recommended and " "safe way to clear data attributes of arbitrary types while decrementing " @@ -711,18 +813,18 @@ msgid "" "again (*especially* if there is a reference cycle)." msgstr "" -#: extending/newtypes_tutorial.rst:757 +#: extending/newtypes_tutorial.rst:758 msgid "You could emulate :c:func:`Py_CLEAR` by writing::" msgstr "" -#: extending/newtypes_tutorial.rst:764 +#: extending/newtypes_tutorial.rst:765 msgid "" "Nevertheless, it is much easier and less error-prone to always use :c:func:" "`Py_CLEAR` when deleting an attribute. Don't try to micro-optimize at the " "expense of robustness!" msgstr "" -#: extending/newtypes_tutorial.rst:768 +#: extending/newtypes_tutorial.rst:769 msgid "" "The deallocator ``Custom_dealloc`` may call arbitrary code when clearing " "attributes. It means the circular GC can be triggered inside the function. " @@ -732,12 +834,12 @@ msgid "" "`PyObject_GC_UnTrack` and ``Custom_clear``::" msgstr "" -#: extending/newtypes_tutorial.rst:783 +#: extending/newtypes_tutorial.rst:784 msgid "" "Finally, we add the :const:`Py_TPFLAGS_HAVE_GC` flag to the class flags::" msgstr "" -#: extending/newtypes_tutorial.rst:787 +#: extending/newtypes_tutorial.rst:788 msgid "" "That's pretty much it. If we had written custom :c:member:`~PyTypeObject." "tp_alloc` or :c:member:`~PyTypeObject.tp_free` handlers, we'd need to modify " @@ -745,11 +847,11 @@ msgid "" "automatically provided." msgstr "" -#: extending/newtypes_tutorial.rst:793 +#: extending/newtypes_tutorial.rst:794 msgid "Subclassing other types" msgstr "" -#: extending/newtypes_tutorial.rst:795 +#: extending/newtypes_tutorial.rst:796 msgid "" "It is possible to create new extension types that are derived from existing " "types. It is easiest to inherit from the built in types, since an extension " @@ -757,7 +859,7 @@ msgid "" "share these :c:type:`PyTypeObject` structures between extension modules." msgstr "" -#: extending/newtypes_tutorial.rst:800 +#: extending/newtypes_tutorial.rst:801 msgid "" "In this example we will create a :class:`SubList` type that inherits from " "the built-in :class:`list` type. The new type will be completely compatible " @@ -765,34 +867,34 @@ msgid "" "that increases an internal counter:" msgstr "" -#: extending/newtypes_tutorial.rst:820 +#: extending/newtypes_tutorial.rst:821 msgid "" "As you can see, the source code closely resembles the :class:`Custom` " "examples in previous sections. We will break down the main differences " "between them. ::" msgstr "" -#: extending/newtypes_tutorial.rst:828 +#: extending/newtypes_tutorial.rst:829 msgid "" "The primary difference for derived type objects is that the base type's " "object structure must be the first value. The base type will already " "include the :c:func:`PyObject_HEAD` at the beginning of its structure." msgstr "" -#: extending/newtypes_tutorial.rst:832 +#: extending/newtypes_tutorial.rst:833 msgid "" "When a Python object is a :class:`SubList` instance, its ``PyObject *`` " "pointer can be safely cast to both ``PyListObject *`` and ``SubListObject " "*``::" msgstr "" -#: extending/newtypes_tutorial.rst:844 +#: extending/newtypes_tutorial.rst:845 msgid "" "We see above how to call through to the :attr:`__init__` method of the base " "type." msgstr "" -#: extending/newtypes_tutorial.rst:847 +#: extending/newtypes_tutorial.rst:848 msgid "" "This pattern is important when writing a type with custom :c:member:" "`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject.tp_dealloc` members. " @@ -801,7 +903,7 @@ msgid "" "the base class handle it by calling its own :c:member:`~PyTypeObject.tp_new`." msgstr "" -#: extending/newtypes_tutorial.rst:853 +#: extending/newtypes_tutorial.rst:854 msgid "" "The :c:type:`PyTypeObject` struct supports a :c:member:`~PyTypeObject." "tp_base` specifying the type's concrete base class. Due to cross-platform " @@ -810,7 +912,7 @@ msgid "" "function::" msgstr "" -#: extending/newtypes_tutorial.rst:881 +#: extending/newtypes_tutorial.rst:882 msgid "" "Before calling :c:func:`PyType_Ready`, the type structure must have the :c:" "member:`~PyTypeObject.tp_base` slot filled in. When we are deriving an " @@ -819,29 +921,29 @@ msgid "" "from the base type will be inherited." msgstr "" -#: extending/newtypes_tutorial.rst:887 +#: extending/newtypes_tutorial.rst:888 msgid "" "After that, calling :c:func:`PyType_Ready` and adding the type object to the " "module is the same as with the basic :class:`Custom` examples." msgstr "" -#: extending/newtypes_tutorial.rst:892 +#: extending/newtypes_tutorial.rst:893 msgid "Footnotes" msgstr "Notes" -#: extending/newtypes_tutorial.rst:893 +#: extending/newtypes_tutorial.rst:894 msgid "" "This is true when we know that the object is a basic type, like a string or " "a float." msgstr "" -#: extending/newtypes_tutorial.rst:896 +#: extending/newtypes_tutorial.rst:897 msgid "" "We relied on this in the :c:member:`~PyTypeObject.tp_dealloc` handler in " "this example, because our type doesn't support garbage collection." msgstr "" -#: extending/newtypes_tutorial.rst:899 +#: extending/newtypes_tutorial.rst:900 msgid "" "We now know that the first and last members are strings, so perhaps we could " "be less careful about decrementing their reference counts, however, we " @@ -851,7 +953,7 @@ msgid "" "objects." msgstr "" -#: extending/newtypes_tutorial.rst:905 +#: extending/newtypes_tutorial.rst:906 msgid "" "Also, even with our attributes restricted to strings instances, the user " "could pass arbitrary :class:`str` subclasses and therefore still create " diff --git a/extending/windows.po b/extending/windows.po index 5ca7f168dd..9b53242584 100644 --- a/extending/windows.po +++ b/extending/windows.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2020-06-28 15:18+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -215,16 +215,16 @@ msgid "Using DLLs in Practice" msgstr "Utiliser les DLL en pratique" #: extending/windows.rst:108 +#, fuzzy msgid "" "Windows Python is built in Microsoft Visual C++; using other compilers may " -"or may not work (though Borland seems to). The rest of this section is MSVC+" -"+ specific." +"or may not work. The rest of this section is MSVC++ specific." msgstr "" "Le Python de Windows est construit en Microsoft Visual C++ ; utiliser " "d'autres compilateurs pourrait fonctionner, ou pas (cependant Borland a " "l'air de fonctionner). Le reste de cette section est spécifique à MSVC++." -#: extending/windows.rst:112 +#: extending/windows.rst:111 msgid "" "When creating DLLs in Windows, you must pass :file:`pythonXY.lib` to the " "linker. To build two DLLs, spam and ni (which uses C functions found in " @@ -234,7 +234,7 @@ msgstr "" "`pythonXY.lib` au lieur. Pour construire deux DLL, spam et ni (qui utilisent " "des fonctions C trouvées dans spam), vous pouvez utiliser ces commandes ::" -#: extending/windows.rst:119 +#: extending/windows.rst:118 msgid "" "The first command created three files: :file:`spam.obj`, :file:`spam.dll` " "and :file:`spam.lib`. :file:`Spam.dll` does not contain any Python " @@ -246,7 +246,7 @@ msgstr "" "Python (telles que :c:func:`PyArg_ParseTuple`), mais il sait comment trouver " "le code Python grâce à :file:`pythonXY.lib`." -#: extending/windows.rst:124 +#: extending/windows.rst:123 msgid "" "The second command created :file:`ni.dll` (and :file:`.obj` and :file:`." "lib`), which knows how to find the necessary functions from spam, and also " @@ -256,7 +256,7 @@ msgstr "" "qui sait comment trouver les fonctions nécessaires dans spam, ainsi qu'à " "partir de l'exécutable Python." -#: extending/windows.rst:128 +#: extending/windows.rst:127 msgid "" "Not every identifier is exported to the lookup table. If you want any other " "modules (including Python) to be able to see your identifiers, you have to " @@ -269,7 +269,7 @@ msgstr "" "``void _declspec(dllexport) initspam(void)`` ou ``PyObject " "_declspec(dllexport) *NiGetSpamData(void)``." -#: extending/windows.rst:133 +#: extending/windows.rst:132 msgid "" "Developer Studio will throw in a lot of import libraries that you do not " "really need, adding about 100K to your executable. To get rid of them, use " diff --git a/faq/design.po b/faq/design.po index d2f1c373ec..7369ef71a7 100644 --- a/faq/design.po +++ b/faq/design.po @@ -5,19 +5,19 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" -"PO-Revision-Date: 2020-11-07 16:24+0100\n" -"Last-Translator: Mindiell \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 16:08+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.1\n" +"X-Generator: Poedit 3.0\n" #: faq/design.rst:3 msgid "Design and History FAQ" -msgstr "FAQ histoire et design" +msgstr "FAQ sur l'histoire et la conception" #: faq/design.rst:6 msgid "Contents" @@ -35,8 +35,8 @@ msgid "" "Most people learn to love this feature after a while." msgstr "" "Guido van Rossum considère que l'usage de l'indentation pour regrouper les " -"blocs d'instruction est élégant et contribue énormément à la clarté globale " -"du programme Python. La plupart des gens finissent par aimer cette " +"blocs d'instruction est élégant et contribue énormément à la clarté d'un " +"programme Python ordinaire. La plupart des gens finissent par aimer cette " "particularité au bout d'un moment." #: faq/design.rst:17 @@ -45,7 +45,7 @@ msgid "" "grouping perceived by the parser and the human reader. Occasionally C " "programmers will encounter a fragment of code like this::" msgstr "" -"Comme il n'y a pas d'accolades de début/fin, il ne peut y avoir de " +"Comme il n'y a pas d'accolades de début et fin, il ne peut y avoir de " "différence entre le bloc perçu par l'analyseur syntaxique et le lecteur " "humain. Parfois les programmeurs C pourront trouver un morceau de code comme " "celui-ci ::" @@ -57,10 +57,10 @@ msgid "" "will sometimes stare at it a long time wondering as to why ``y`` is being " "decremented even for ``x > y``." msgstr "" -"Seule l'instruction ``x++`` sera exécutée si la condition est vraie, mais " -"l'indentation pourrait faire penser le contraire à beaucoup de gens. Mêmes " -"des développeurs C expérimentés pourront parfois rester pendant un moment à " -"se demander pourquoi ``y`` est décrémenté même si ``x > y``." +"Seule l'instruction ``x++`` est exécutée si la condition est vraie, mais " +"l'indentation conduit beaucoup de gens à penser le contraire. Mêmes des " +"développeurs C expérimentés peuvent parfois rester pendant un moment à se " +"demander pourquoi ``y`` est décrémenté même si ``x > y``." #: faq/design.rst:31 msgid "" @@ -70,7 +70,7 @@ msgid "" "is normal to feel somewhat uneasy when reading (or being required to write) " "in a different one." msgstr "" -"Comme il n'y a pas d'accolades de début/fin, Python est moins sujet aux " +"Comme il n'y a pas d'accolades de début et fin, Python est moins sujet aux " "conflits de style de code. En C, on peut placer les accolades de nombreuses " "façons. Après s'être habitué à lire et écrire selon un style particulier, il " "est normal de se sentir perturbé en lisant (ou en devant écrire) avec un " @@ -86,14 +86,14 @@ msgid "" "brackets -- the lack of declarations and the high-level data types are also " "responsible -- but the indentation-based syntax certainly helps." msgstr "" -"Nombre de styles de programmation utilisent des accolades de début/fin sur " -"une ligne à part. Cela rend les programmes beaucoup plus longs et fait " +"Nombre de styles de programmation utilisent des accolades de début et fin " +"sur une ligne à part. Cela rend les programmes beaucoup plus longs et fait " "perdre une bonne partie de l'espace visible sur l'écran, empêchant un peu " "d'avoir une vue globale du programme. Idéalement, une fonction doit être " "visible sur un écran (environ 20 ou 30 lignes). 20 lignes de Python peuvent " "faire beaucoup plus que 20 lignes de C. Ce n'est pas seulement dû à " -"l'absence d'accolades de début/fin -- l'absence de déclarations et la " -"présence de types de haut-niveau en sont également responsables -- mais la " +"l'absence d'accolades de début et fin — l'absence de déclarations et la " +"présence de types de haut-niveau en sont également responsables — mais la " "syntaxe basée sur l'indentation aide sûrement." #: faq/design.rst:48 @@ -120,7 +120,7 @@ msgid "" "Python, and much more to do with how the underlying platform handles " "floating-point numbers." msgstr "" -"et pensent que c'est un bogue dans Python. Ça ne l'est pas. Ceci n'a " +"et pensent que c'est un bogue dans Python. Ça n'en est pas un. Ceci n'a " "d'ailleurs que peu à voir avec Python, mais avec la manière dont la " "plateforme sous-jacente gère les nombres à virgule flottante." @@ -138,7 +138,7 @@ msgstr "" "format binaire à virgule flottante avec une précision fixe (généralement 53 " "bits). Python utilise des opérations qui proviennent du langage C qui à leur " "tour reposent sur l'implémentation au niveau du processeur afin d'effectuer " -"des opérations en virgule flottante. Cela signifie que dans le cadre des " +"des opérations en virgule flottante. Cela signifie que, dans le cadre des " "opérations sur les nombres à virgule flottante, Python se comporte comme " "beaucoup de langages populaires dont C et Java." @@ -171,15 +171,16 @@ msgid "" "digits of accuracy." msgstr "" "La précision typique de 53 bits des *floats* Python permet une précision de " -"15--16 décimales." +"15–16 décimales." #: faq/design.rst:90 msgid "" "For a fuller explanation, please see the :ref:`floating point arithmetic " "` chapter in the Python tutorial." msgstr "" -"Veuillez vous référer au chapitre sur :ref:`floating point arithmetic ` du tutoriel python pour de plus amples informations." +"Veuillez vous référer au chapitre sur :ref:`l'arithmétique en nombres à " +"virgule flottante ` du tutoriel Python pour de plus amples " +"informations." #: faq/design.rst:95 msgid "Why are Python strings immutable?" @@ -196,7 +197,7 @@ msgid "" "unchanging. This is also one of the reasons for the distinction between " "tuples and lists." msgstr "" -"La première concerne la performance : savoir qu'une chaîne de caractères est " +"La première concerne la performance : savoir qu'une chaîne de caractères est " "immuable signifie que l'allocation mémoire allouée lors de la création de " "cette chaîne est fixe et figée. C'est aussi l'une des raisons pour " "lesquelles on fait la distinction entre les *n*-uplets et les listes." @@ -209,22 +210,22 @@ msgid "" "anything else." msgstr "" "Un autre avantage est que les chaînes en Python sont considérées aussi " -"\"élémentaires\" que les nombres. Aucun processus ne changera la valeur du " -"nombre 8 en autre chose, et en Python, aucun processus changera la chaîne de " -"caractère \"huit\" en autre chose." +"« élémentaires » que les nombres. Aucun processus ne changera la valeur du " +"nombre 8 en autre chose et, en Python, aucun processus ne changera la chaîne " +"de caractères \"huit\" en autre chose." #: faq/design.rst:112 msgid "Why must 'self' be used explicitly in method definitions and calls?" msgstr "" -"Pourquoi \"self\" doit-il être explicitement utilisé dans les définitions et " -"les appels de méthode ?" +"Pourquoi *self* doit-il être explicitement utilisé dans les définitions et " +"les appels de méthodes ?" #: faq/design.rst:114 msgid "" "The idea was borrowed from Modula-3. It turns out to be very useful, for a " "variety of reasons." msgstr "" -"L'idée a été empruntée à Modula-3. Il s'avère être très utile, pour diverses " +"L'idée a été empruntée à Modula-3. Cela s'avère très utile, pour diverses " "raisons." #: faq/design.rst:117 @@ -240,14 +241,14 @@ msgid "" "``m_`` prefix, so this explicitness is still useful in those languages, too." msgstr "" "Tout d'abord, il est plus évident d'utiliser une méthode ou un attribut " -"d'instance par exemple au lieu d'une variable locale. Lire ``self.x`` ou " +"d'instance par exemple au lieu d'une variable locale. Lire ``self.x`` ou " "``self.meth()`` est sans ambiguïté sur le fait que c'est une variable " "d'instance ou une méthode qui est utilisée, même si vous ne connaissez pas " "la définition de classe par cœur. En C++, vous pouvez les reconnaître par " "l'absence d'une déclaration de variable locale (en supposant que les " -"variables globales sont rares ou facilement reconnaissables) -- mais en " +"variables globales sont rares ou facilement reconnaissables) — mais en " "Python, il n'y a pas de déclarations de variables locales, de sorte que vous " -"devez chercher la définition de classe pour être sûr. Certaines normes de " +"devriez chercher la définition de classe pour être sûr. Certaines normes de " "programmation C++ et Java préfixent les attributs d'instance par ``m_``. " "Cette syntaxe explicite est ainsi utile également pour ces langages." @@ -266,11 +267,11 @@ msgstr "" "souhaitez explicitement référencer ou appeler la méthode depuis une classe " "en particulier. En C++, si vous utilisez la méthode d'une classe de base " "elle-même surchargée par une classe dérivée, vous devez utiliser l'opérateur " -"``::`` -- en Python vous pouvez écrire ``baseclass.methodname(self, " +"``::`` — en Python vous pouvez écrire ``ClasseDeBase.nom_methode(self, " ")``. C'est particulièrement utile pour les méthodes :meth:" -"`__init__`, et de manière générale dans les cas où une classe dérivée veut " -"étendre la méthode du même nom de la classe de base, devant ainsi appeler la " -"méthode de la classe de base d'une certaine manière." +"`__init__` et, de manière générale, dans les cas où une classe dérivée veut " +"étendre la méthode du même nom de la classe de base, et doit donc se " +"débrouiller pour appeler la méthode de la classe de base." #: faq/design.rst:136 msgid "" @@ -290,8 +291,8 @@ msgid "" "Python which namespace to use." msgstr "" "Enfin, pour des variables d'instance, ça résout un problème syntactique pour " -"l'assignation : puisque les variables locales en Python sont (par " -"définition !) ces variables auxquelles les valeurs sont assignées dans le " +"l'assignation : puisque les variables locales en Python sont (par " +"définition !) ces variables auxquelles les valeurs sont assignées dans le " "corps d'une fonction (et n'étant pas déclarées explicitement globales), il " "doit y avoir un moyen de dire à l'interpréteur qu'une assignation est censée " "assigner une variable d'instance plutôt qu'une variable locale, et doit de " @@ -315,11 +316,11 @@ msgstr "Depuis Python 3.8, c'est possible !" #: faq/design.rst:158 msgid "" -"Assignment expressions using the walrus operator `:=` assign a variable in " +"Assignment expressions using the walrus operator ``:=`` assign a variable in " "an expression::" msgstr "" -"Les expressions d'affectation qui utilisent l'opérateur morse `:=` affectent " -"une variable dans une expression ::" +"Les expressions d'affectation qui utilisent l'opérateur morse ``:=`` " +"affectent une variable dans une expression ::" #: faq/design.rst:164 msgid "See :pep:`572` for more information." @@ -346,7 +347,7 @@ msgid "" "x*a + x*b to the clumsiness of doing the same thing using a raw OO notation." msgstr "" "(a) Pour certaines opérations, la notation préfixe se lit mieux que celle " -"suffixe -- les opérations préfixe (et infixe !) sont une longue tradition en " +"suffixe — les opérations préfixe (et infixe !) sont une longue tradition en " "mathématique, où on apprécie les notations qui aident visuellement le " "mathématicien à réfléchir sur un problème. Comparez la facilité avec " "laquelle nous réécrivons une formule comme x*(a+b) en x*a + x*b à la " @@ -364,7 +365,7 @@ msgid "" "write() method." msgstr "" "(b) Quand je lis du code qui dit ``len(x)`` *je sais* qu'il demande la " -"longueur de quelque chose. Cela me dit deux choses : le résultat est un " +"longueur de quelque chose. Cela me dit deux choses : le résultat est un " "entier, et l'argument est une sorte de conteneur. Au contraire, quand je lis " "``x.len()``, je dois déjà savoir que x est une sorte de conteneur " "implémentant une interface ou héritant d'une classe qui a un ``len()`` " @@ -396,8 +397,8 @@ msgstr "" "de Python 1.6, lorsque les méthodes ont été ajoutées fournissant ainsi les " "mêmes fonctionnalités que celles qui étaient déjà disponibles en utilisant " "les fonctions du module string. La plupart de ces nouvelles méthodes ont été " -"largement acceptées, mais celle qui semble rendre certains programmeurs " -"inconfortables est ::" +"largement acceptées, mais celle qui semble rendre certains programmeurs mal " +"à l'aise est ::" #: faq/design.rst:203 msgid "which gives the result::" @@ -415,11 +416,11 @@ msgid "" "on names bound to strings there is no logical reason to make them " "unavailable on literals." msgstr "" -"Le premier se caractérise par les lignes suivantes : \"C'est vraiment moche " -"d'utiliser une méthode de chaîne littérale (chaîne constante)\", à laquelle " -"la réponse est qu'il se peut, mais une chaîne littérale est juste une valeur " -"fixe. Si la méthode est autorisée sur des noms liés à des chaînes, il n'y a " -"pas de raison logique à les rendre indisponibles sur des chaînes littérales." +"Le premier argument peut se résumer à : « c'est vraiment moche d'utiliser " +"une méthode de chaîne littérale (c.-à-d. constante) ». La réponse est " +"« certes, mais une chaîne littérale est une valeur comme une autre, juste " +"fixe ». Si on utilise les méthodes sur des noms de variables, il n'y a pas " +"de raison à les interdire sur des chaînes littérales." #: faq/design.rst:215 msgid "" @@ -428,11 +429,11 @@ msgid "" "For some reason there seems to be much less difficulty with having :meth:" "`~str.split` as a string method, since in that case it is easy to see that ::" msgstr "" -"La deuxième objection se réfère typiquement à : \"Je suis réellement en " -"train de dire à une séquence de joindre ses membres avec une constante de " -"chaîne\". Malheureusement, vous ne l'êtes pas. Pour quelque raison, il " -"semble être bien moins difficile d'avoir :meth:`~str.split` en tant que " -"méthode de chaîne, puisque dans ce cas il est facile de voir que ::" +"Le second consiste à se demander : « suis-je réellement en train de dire à " +"une séquence de joindre ses membres avec une constante de chaîne ? ». " +"Malheureusement, ce n'est pas ça. Allez savoir, il semble être bien moins " +"difficile de comprendre ce qui se passe avec :meth:`~str.split` en tant que " +"méthode de chaîne, puisque dans ce cas il est facile de voir que ::" #: faq/design.rst:222 msgid "" @@ -440,8 +441,8 @@ msgid "" "the given separator (or, by default, arbitrary runs of white space)." msgstr "" "est une instruction à une chaîne littérale de renvoyer les sous-chaînes " -"délimitées par le séparateur fournit (ou, par défaut, les espaces, ou " -"groupes d'espaces)." +"délimitées par le séparateur fourni (ou, par défaut, les espaces ou groupes " +"d'espaces)." #: faq/design.rst:225 msgid "" @@ -469,10 +470,9 @@ msgid "" "Actually catching an exception is expensive. In versions of Python prior to " "2.0 it was common to use this idiom::" msgstr "" -"Un bloc ``try`` / ``except`` est extrêmement efficient tant qu'aucune " -"exception ne sont levée. En effet, intercepter une exception s'avère " -"coûteux. Dans les versions de précédant Python 2.0, il était courant " -"d'utiliser cette pratique ::" +"Un bloc ``try`` … ``except`` est extrêmement efficient tant qu'aucune " +"exception n'est levée. En effet, intercepter une exception s'avère coûteux. " +"Dans les versions antérieures à Python 2.0, il était courant d'écrire ceci ::" #: faq/design.rst:245 msgid "" @@ -502,16 +502,15 @@ msgstr "" #: faq/design.rst:261 msgid "" "You can do this easily enough with a sequence of ``if... elif... elif... " -"else``. There have been some proposals for switch statement syntax, but " -"there is no consensus (yet) on whether and how to do range tests. See :pep:" -"`275` for complete details and the current status." +"else``. For literal values, or constants within a namespace, you can also " +"use a ``match ... case`` statement." msgstr "" -"Vous pouvez le faire assez facilement avec une séquence de ``if... elif... " -"elif... else``. Il y a eu quelques propositions pour la syntaxe de " -"l'instruction ``switch``, mais il n'y a pas (encore) de consensus sur le cas " -"des intervalles. Voir la :pep:`275` pour tous les détails et l'état actuel." +"Il est facile de réaliser cette structure avec une suite ``if... elif... " +"elif... else``. Pour comparer à des littéraux, ou à des constantes qui sont " +"encapsulées dans un espace de nommage, on peut aussi utiliser l'instruction " +"``match ... case``." -#: faq/design.rst:266 +#: faq/design.rst:265 msgid "" "For cases where you need to choose from a very large number of " "possibilities, you can create a dictionary mapping case values to functions " @@ -521,7 +520,7 @@ msgstr "" "possibilités, vous pouvez créer un dictionnaire faisant correspondre des " "valeurs à des fonctions à appeler. Par exemple ::" -#: faq/design.rst:280 +#: faq/design.rst:276 msgid "" "For calling methods on objects, you can simplify yet further by using the :" "func:`getattr` built-in to retrieve methods with a particular name::" @@ -530,7 +529,7 @@ msgstr "" "en utilisant la fonction native :func:`getattr` pour récupérer les méthodes " "avec un nom donné ::" -#: faq/design.rst:292 +#: faq/design.rst:288 msgid "" "It's suggested that you use a prefix for the method names, such as " "``visit_`` in this example. Without such a prefix, if values are coming " @@ -542,28 +541,28 @@ msgstr "" "proviennent d'une source non fiable, un attaquant serait en mesure d'appeler " "n'importe quelle méthode sur votre objet." -#: faq/design.rst:298 +#: faq/design.rst:294 msgid "" "Can't you emulate threads in the interpreter instead of relying on an OS-" "specific thread implementation?" msgstr "" "Est-il possible d'émuler des fils d'exécution dans l'interpréteur plutôt que " -"se baser sur les implémentations spécifique aux OS ?" +"se baser sur les implémentations spécifiques aux systèmes d'exploitation ?" -#: faq/design.rst:300 +#: faq/design.rst:296 msgid "" "Answer 1: Unfortunately, the interpreter pushes at least one C stack frame " "for each Python stack frame. Also, extensions can call back into Python at " "almost random moments. Therefore, a complete threads implementation " "requires thread support for C." msgstr "" -"Réponse 1 : Malheureusement, l'interpréteur pousse au moins un bloc de pile " +"Réponse 1 : malheureusement, l'interpréteur pousse au moins un bloc de pile " "C (*stack frame*) pour chaque bloc de pile de Python. Aussi, les extensions " "peuvent rappeler dans Python à presque n'importe quel moment. Par " -"conséquent, une implémentation complète des fils d'exécution nécessiterai un " -"support complet en C." +"conséquent, une implémentation complète des fils d'exécution nécessiterait " +"une gestion complète pour le C." -#: faq/design.rst:305 +#: faq/design.rst:301 msgid "" "Answer 2: Fortunately, there is `Stackless Python `_, which has a completely redesigned " @@ -573,12 +572,12 @@ msgstr "" "stackless-dev/stackless/wiki>`_, qui a complètement ré-architecturé la " "boucle principale de l'interpréteur afin de ne pas utiliser la pile C." -#: faq/design.rst:310 +#: faq/design.rst:306 msgid "Why can't lambda expressions contain statements?" msgstr "" "Pourquoi les expressions lambda ne peuvent pas contenir d'instructions ?" -#: faq/design.rst:312 +#: faq/design.rst:308 msgid "" "Python lambda expressions cannot contain statements because Python's " "syntactic framework can't handle statements nested inside expressions. " @@ -594,7 +593,7 @@ msgstr "" "Python sont seulement une notation concise si vous êtes trop paresseux pour " "définir une fonction." -#: faq/design.rst:318 +#: faq/design.rst:314 msgid "" "Functions are already first class objects in Python, and can be declared in " "a local scope. Therefore the only advantage of using a lambda instead of a " @@ -606,16 +605,16 @@ msgstr "" "Les fonctions sont déjà des objets de première classe en Python et peuvent " "être déclarées dans une portée locale. L'unique avantage d'utiliser une " "fonction lambda au lieu d'une fonction définie localement est que vous " -"n'avez nullement besoin d'un nom pour la fonction -- Mais c'est juste une " +"n'avez nullement besoin d'un nom pour la fonction — mais c'est juste une " "variable locale à laquelle est affecté l'objet fonction (qui est exactement " -"le même type d'objet qui donne une expression lambda) !" +"le même type d'objet que celui renvoyé par une expression lambda) !" -#: faq/design.rst:326 +#: faq/design.rst:322 msgid "Can Python be compiled to machine code, C or some other language?" msgstr "" -"Python peut-il être compilé en code machine, en C ou dans un autre langage ?" +"Python peut-il être compilé en code machine, en C ou dans un autre langage ?" -#: faq/design.rst:328 +#: faq/design.rst:324 msgid "" "`Cython `_ compiles a modified version of Python with " "optional annotations into C extensions. `Nuitka `_ " @@ -629,11 +628,11 @@ msgstr "" "langage Python entièrement. Pour compiler en Java, vous pouvez regarder `VOC " "`_." -#: faq/design.rst:336 +#: faq/design.rst:332 msgid "How does Python manage memory?" msgstr "Comment Python gère la mémoire ?" -#: faq/design.rst:338 +#: faq/design.rst:334 msgid "" "The details of Python memory management depend on the implementation. The " "standard implementation of Python, :term:`CPython`, uses reference counting " @@ -652,7 +651,7 @@ msgstr "" "module :mod:`gc` fournit des fonctions pour lancer le ramasse-miettes, " "d'obtenir des statistiques de débogage et ajuster ses paramètres." -#: faq/design.rst:346 +#: faq/design.rst:342 msgid "" "Other implementations (such as `Jython `_ or `PyPy " "`_), however, can rely on a different mechanism such as " @@ -662,20 +661,20 @@ msgid "" msgstr "" "Cependant, d'autres implémentations (par exemple `Jython `_ ou `PyPy `_) peuvent compter sur un mécanisme " -"différent comme un véritable ramasse-miette. Cette différence peut causer de " -"subtils problèmes de portabilité si votre code Python dépend du comportement " -"de l'implémentation du compteur de références." +"différent comme un véritable ramasse-miettes. Cette différence peut causer " +"de subtils problèmes de portabilité si votre code Python dépend du " +"comportement de l'implémentation du compteur de références." -#: faq/design.rst:352 +#: faq/design.rst:348 msgid "" "In some Python implementations, the following code (which is fine in " "CPython) will probably run out of file descriptors::" msgstr "" -"Dans certaines implémentations de Python, le code suivant (qui marche " +"Dans certaines implémentations de Python, le code suivant (qui fonctionne " "parfaitement avec *CPython*) aurait probablement manqué de descripteurs de " "fichiers ::" -#: faq/design.rst:359 +#: faq/design.rst:355 msgid "" "Indeed, using CPython's reference counting and destructor scheme, each new " "assignment to *f* closes the previous file. With a traditional GC, however, " @@ -683,12 +682,11 @@ msgid "" "possibly long intervals." msgstr "" "En effet, à l'aide du comptage de références et du destructeur d'objets de " -"*CPython*, chaque nouvelle affectation à *f* ferme le fichier précédent. " -"Cependant, avec un *GC* classique, ces objets seront seulement recueillies " -"(et fermés) à intervalles variables et possiblement avec de longs " -"intervalles." +"*CPython*, chaque nouvelle affectation à *f* ferme le fichier précédent. " +"Cependant, avec un ramasse-miettes classique, ces objets sont collectés (et " +"fermés) à intervalles irréguliers, et potentiellement longs." -#: faq/design.rst:364 +#: faq/design.rst:360 msgid "" "If you want to write code that will work with any Python implementation, you " "should explicitly close the file or use the :keyword:`with` statement; this " @@ -696,15 +694,16 @@ msgid "" msgstr "" "Si vous souhaitez écrire du code qui fonctionne avec n'importe quelle " "implémentation de Python, vous devez explicitement fermer le fichier ou " -"utiliser l'instruction :keyword:`with` ; ceci fonctionnera indépendamment du " +"utiliser l'instruction :keyword:`with` ; ceci fonctionne indépendamment du " "système de gestion de la mémoire ::" -#: faq/design.rst:374 +#: faq/design.rst:370 msgid "Why doesn't CPython use a more traditional garbage collection scheme?" msgstr "" -"Pourquoi CPython n'utilise-il pas un ramasse-miette plus traditionnel ?" +"Pourquoi CPython n'utilise-t-il pas un modèle de ramasse-miettes plus " +"traditionnel ?" -#: faq/design.rst:376 +#: faq/design.rst:372 msgid "" "For one thing, this is not a C standard feature and hence it's not portable. " "(Yes, we know about the Boehm GC library. It has bits of assembler code for " @@ -712,14 +711,14 @@ msgid "" "transparent, it isn't completely transparent; patches are required to get " "Python to work with it.)" msgstr "" -"D'une part, ce n'est pas une caractéristique normalisé en C et par " -"conséquent ce n'est pas portable. (Oui, nous connaissons la bibliothèque *GC " -"Boehm*. Elle contient du code assembleur pour la plupart des plates-formes " +"D'une part, ce n'est pas une caractéristique normalisée en C et, par " +"conséquent, ce n'est pas portable. (Oui, nous connaissons la bibliothèque " +"*GC Boehm*. Elle contient du code assembleur pour la plupart des plateformes " "classiques, mais pas toutes, et bien qu'elle soit le plus souvent " -"transparent, c'est loin d'être le cas, des correctifs sont nécessaires afin " -"que Python fonctionne correctement avec.)" +"transparente, elle ne l'est pas complètement ; des correctifs sont " +"nécessaires afin que Python fonctionne correctement avec.)" -#: faq/design.rst:382 +#: faq/design.rst:378 msgid "" "Traditional GC also becomes a problem when Python is embedded into other " "applications. While in a standalone Python it's fine to replace the " @@ -728,21 +727,21 @@ msgid "" "malloc() and free(), and may not want Python's. Right now, CPython works " "with anything that implements malloc() and free() properly." msgstr "" -"Le *GC* classique devient également un problème lorsque Python est incorporé " -"dans d'autres applications. Bien que dans une application Python, il ne soit " -"pas gênant de remplacer les fonctions ``malloc()`` et ``free()` avec les " -"versions fournies par la bibliothèque *GC*, une application incluant Python " -"peut vouloir avoir ses propres implémentations de ``malloc()`` et ``free()`` " -"et peut ne pas vouloir celles de Python. À l'heure actuelle, CPython " -"fonctionne avec n'importe quelle implémentation correcte de ``malloc()`` et " -"``free()``." +"Un ramasse-miettes classique devient également un problème lorsque Python " +"est incorporé dans d'autres applications. Bien que dans une application " +"Python, il ne soit pas gênant de remplacer les fonctions ``malloc()`` et " +"``free()`` avec les versions fournies par la bibliothèque du ramasse-" +"miettes, une application incluant Python peut vouloir avoir ses propres " +"implémentations de ``malloc()`` et ``free()`` et peut ne pas vouloir celles " +"de Python. À l'heure actuelle, CPython fonctionne avec n'importe quelle " +"implémentation correcte de ``malloc()`` et ``free()``." -#: faq/design.rst:391 +#: faq/design.rst:387 msgid "Why isn't all memory freed when CPython exits?" msgstr "" "Pourquoi toute la mémoire n'est pas libérée lorsque *CPython* s'arrête ?" -#: faq/design.rst:393 +#: faq/design.rst:389 msgid "" "Objects referenced from the global namespaces of Python modules are not " "always deallocated when Python exits. This may happen if there are circular " @@ -754,26 +753,26 @@ msgstr "" "Les objets référencés depuis les espaces de nommage globaux des modules " "Python ne sont pas toujours désalloués lorsque Python s'arrête. Cela peut se " "produire s'il y a des références circulaires. Il y a aussi certaines parties " -"de mémoire qui sont alloués par la bibliothèque C qui sont impossibles à " +"de mémoire qui sont allouées par la bibliothèque C qui sont impossibles à " "libérer (par exemple un outil comme *Purify* s'en plaindra). Python est, " "cependant, agressif sur le nettoyage de la mémoire en quittant et cherche à " "détruire chaque objet." -#: faq/design.rst:400 +#: faq/design.rst:396 msgid "" "If you want to force Python to delete certain things on deallocation use " "the :mod:`atexit` module to run a function that will force those deletions." msgstr "" "Si vous voulez forcer Python à désallouer certains objets en quittant, " -"utilisez le module :mod:`texit` pour exécuter une fonction qui va forcer ces " -"destructions." +"utilisez le module :mod:`atexit` pour exécuter une fonction qui va forcer " +"ces destructions." -#: faq/design.rst:405 +#: faq/design.rst:401 msgid "Why are there separate tuple and list data types?" msgstr "" "Pourquoi les *n*-uplets et les *list* sont deux types de données séparés ?" -#: faq/design.rst:407 +#: faq/design.rst:403 msgid "" "Lists and tuples, while similar in many respects, are generally used in " "fundamentally different ways. Tuples can be thought of as being similar to " @@ -782,15 +781,15 @@ msgid "" "Cartesian coordinate is appropriately represented as a tuple of two or three " "numbers." msgstr "" -"Les listes et les *n*-uplets, bien que semblable à bien des égards, sont " +"Les listes et les *n*-uplets, bien que semblables à bien des égards, sont " "généralement utilisés de façons fondamentalement différentes. Les *n*-uplets " -"peuvent être considérés comme étant similaires aux dossiers en Pascal ou aux " -"structures en C; Ce sont de petites collections de données associées qui " +"peuvent être considérés comme étant similaires au *record* en Pascal ou aux " +"structures en C ; ce sont de petites collections de données associées qui " "peuvent être de différents types qui sont utilisées ensemble. Par exemple, " -"un repère cartésien est correctement représenté comme un *n*-uplet de deux " -"ou trois nombres." +"des coordonnées cartésiennes sont correctement représentées par un *n*-uplet " +"de deux ou trois nombres." -#: faq/design.rst:414 +#: faq/design.rst:410 msgid "" "Lists, on the other hand, are more like arrays in other languages. They " "tend to hold a varying number of objects all of which have the same type and " @@ -799,15 +798,15 @@ msgid "" "Functions which operate on this output would generally not break if you " "added another file or two to the directory." msgstr "" -"Les listes, ressemblent davantage à des tableaux dans d'autres langues. " +"Les listes, ressemblent davantage à des tableaux dans d'autres langages. " "Elles ont tendance à contenir un nombre variable d'objets de même type " "manipulés individuellement. Par exemple, ``os.listdir('.')`` renvoie une " "liste de chaînes représentant les fichiers dans le dossier courant. Les " -"fonctions travaillant sur cette sortie accepteraient généralement sans aucun " -"problème que vous ajoutiez un ou deux fichiers supplémentaire dans le " +"fonctions travaillant sur cette sortie acceptent généralement sans aucun " +"problème que vous ajoutiez un ou deux fichiers supplémentaires dans le " "dossier." -#: faq/design.rst:421 +#: faq/design.rst:417 msgid "" "Tuples are immutable, meaning that once a tuple has been created, you can't " "replace any of its elements with a new value. Lists are mutable, meaning " @@ -822,11 +821,11 @@ msgstr "" "utilisés comme clés de dictionnaires, et donc de ``tuple`` et ``list`` seul " "des *n*-uplets peuvent être utilisés comme clés." -#: faq/design.rst:428 +#: faq/design.rst:424 msgid "How are lists implemented in CPython?" msgstr "Comment les listes sont-elles implémentées dans CPython ?" -#: faq/design.rst:430 +#: faq/design.rst:426 msgid "" "CPython's lists are really variable-length arrays, not Lisp-style linked " "lists. The implementation uses a contiguous array of references to other " @@ -839,7 +838,7 @@ msgstr "" "Elle conserve également un pointeur vers ce tableau et la longueur du " "tableau dans une structure de tête de liste." -#: faq/design.rst:434 +#: faq/design.rst:430 msgid "" "This makes indexing a list ``a[i]`` an operation whose cost is independent " "of the size of the list or the value of the index." @@ -847,7 +846,7 @@ msgstr "" "Cela rend l'indexation d'une liste ``a[i]`` une opération dont le coût est " "indépendant de la taille de la liste ou de la valeur de l'indice." -#: faq/design.rst:437 +#: faq/design.rst:433 msgid "" "When items are appended or inserted, the array of references is resized. " "Some cleverness is applied to improve the performance of appending items " @@ -856,15 +855,15 @@ msgid "" msgstr "" "Lorsque des éléments sont ajoutés ou insérés, le tableau de références est " "redimensionné. Un savoir-faire ingénieux permet l'amélioration des " -"performances lors de l'ajout fréquent d'éléments ; Lorsque le tableau doit " +"performances lors de l'ajout fréquent d'éléments ; lorsque le tableau doit " "être étendu, un certain espace supplémentaire est alloué de sorte que pour " "la prochaine fois, ceci ne nécessite plus un redimensionnement effectif." -#: faq/design.rst:444 +#: faq/design.rst:440 msgid "How are dictionaries implemented in CPython?" msgstr "Comment les dictionnaires sont-ils implémentés dans CPython ?" -#: faq/design.rst:446 +#: faq/design.rst:442 msgid "" "CPython's dictionaries are implemented as resizable hash tables. Compared " "to B-trees, this gives better performance for lookup (the most common " @@ -876,7 +875,7 @@ msgstr "" "performances pour la recherche (l'opération la plus courante de loin) dans " "la plupart des circonstances, et leur implémentation est plus simple." -#: faq/design.rst:450 +#: faq/design.rst:446 msgid "" "Dictionaries work by computing a hash code for each key stored in the " "dictionary using the :func:`hash` built-in function. The hash code varies " @@ -888,24 +887,23 @@ msgid "" "dictionaries take constant time -- O(1), in Big-O notation -- to retrieve a " "key." msgstr "" -"Les dictionnaires fonctionnent en calculant un code de hachage pour chaque " -"clé stockée dans le dictionnaire en utilisant la fonction :func:`hash`. Le " -"code de hachage varie grandement selon la clé et du nombre de processus " -"utilisés ; Par exemple, la chaîne de caractère \"Python\" pourrait avoir " -"comme code de hachage une valeur allant jusqu'à-539294296 tandis que la " -"chaîne \"python\",qui se distingue de la première par un seul bit, pourrait " -"avoir comme code de hachage une valeur allant jusqu'à 1142331976. Le code " -"de hachage est ensuite utilisé pour calculer un emplacement dans un tableau " -"interne où la valeur est stockée. Dans l'hypothèse où vous stockez les clés " -"qui ont toutes des valeurs de hachage différentes, cela signifie que le " -"temps pour récupérer une clé est constant -- O(1), en notation grand O de " -"Landau." - -#: faq/design.rst:461 +"Les dictionnaires fonctionnent en calculant un condensat pour chaque clé " +"stockée dans le dictionnaire à l'aide de la fonction :func:`hash`. La valeur " +"du condensat varie grandement en fonction de la clé et de la graine utilisée " +"par le processus ; par exemple, la chaîne de caractère \"Python\" pourrait " +"avoir comme condensat la valeur – 539 294 296 tandis que la chaîne " +"\"python\",qui diffère de la première par un seul bit, pourrait avoir comme " +"condensat la valeur 1 142 331 976. Le condensat est ensuite utilisé pour " +"déterminer un emplacement dans le tableau interne où la valeur est stockée. " +"Dans l'hypothèse où vous stockez les clés qui ont toutes des condensats " +"différents, cela signifie que le temps pour récupérer une clé est constant — " +"O(1), en notation grand O de Landau." + +#: faq/design.rst:457 msgid "Why must dictionary keys be immutable?" -msgstr "Pourquoi les clés du dictionnaire sont immuables ?" +msgstr "Pourquoi les clés du dictionnaire sont immuables ?" -#: faq/design.rst:463 +#: faq/design.rst:459 msgid "" "The hash table implementation of dictionaries uses a hash value calculated " "from the key value to find the key. If the key were a mutable object, its " @@ -928,7 +926,7 @@ msgstr "" "chercher l'ancienne valeur, elle serait également introuvable car la valeur " "de l'objet trouvé dans cet emplacement de hachage serait différente." -#: faq/design.rst:472 +#: faq/design.rst:468 msgid "" "If you want a dictionary indexed with a list, simply convert the list to a " "tuple first; the function ``tuple(L)`` creates a tuple with the same entries " @@ -936,36 +934,36 @@ msgid "" "dictionary keys." msgstr "" "Si vous voulez un dictionnaire indexé avec une liste, il faut simplement " -"convertir la liste en un *n*-uplet ; la fonction ``tuple(L)`` crée un *n*-" -"uplet avec les mêmes entrées que la liste ``L``. Les *n*-uplets sont " +"convertir la liste en un *n*-uplet ; la fonction ``tuple(L)`` crée un *n*-" +"uplet avec les mêmes entrées que la liste ``L``. Les *n*-uplets sont " "immuables et peuvent donc être utilisés comme clés du dictionnaire." -#: faq/design.rst:476 +#: faq/design.rst:472 msgid "Some unacceptable solutions that have been proposed:" -msgstr "Certaines solutions insatisfaisantes qui ont été proposées :" +msgstr "Certaines solutions insatisfaisantes ont été proposées :" -#: faq/design.rst:478 +#: faq/design.rst:474 msgid "" "Hash lists by their address (object ID). This doesn't work because if you " "construct a new list with the same value it won't be found; e.g.::" msgstr "" -"Les listes de hachage par leur adresse (*ID* de l'objet). Cela ne " -"fonctionne pas parce que si vous créez une nouvelle liste avec la même " -"valeur, elle ne sera pas retrouvée; par exemple ::" +"Hacher les listes par leur adresse (*ID* de l'objet). Cela ne fonctionne pas " +"parce que si vous créez une nouvelle liste avec la même valeur, elle ne sera " +"pas retrouvée ; par exemple ::" -#: faq/design.rst:484 +#: faq/design.rst:480 msgid "" "would raise a :exc:`KeyError` exception because the id of the ``[1, 2]`` " "used in the second line differs from that in the first line. In other " "words, dictionary keys should be compared using ``==``, not using :keyword:" "`is`." msgstr "" -"cela lèverait une exception :exc:`KeyError` car l'ID de ``[1, 2]`` utilisé " -"dans la deuxième ligne diffère de celle de la première ligne. En d'autres " -"termes, les clés de dictionnaire doivent être comparées à l'aide du " -"comparateur ``==`` et non à l'aide du mot clé :keyword:`is`." +"lèverait une exception :exc:`KeyError` car l'ID de ``[1, 2]`` utilisé dans " +"la deuxième ligne diffère de celui de la première ligne. En d'autres termes, " +"les clés de dictionnaire doivent être comparées à l'aide du comparateur " +"``==`` et non à l'aide du mot clé :keyword:`is`." -#: faq/design.rst:488 +#: faq/design.rst:484 msgid "" "Make a copy when using a list as a key. This doesn't work because the list, " "being a mutable object, could contain a reference to itself, and then the " @@ -976,7 +974,7 @@ msgstr "" "une référence à elle-même ou avoir une boucle infinie au niveau du code " "copié." -#: faq/design.rst:492 +#: faq/design.rst:488 msgid "" "Allow lists as keys but tell the user not to modify them. This would allow " "a class of hard-to-track bugs in programs when you forgot or modified a list " @@ -989,7 +987,7 @@ msgstr "" "accident. Cela casse également un impératif important des dictionnaires : " "chaque valeur de ``d.keys()`` est utilisable comme clé du dictionnaire." -#: faq/design.rst:497 +#: faq/design.rst:493 msgid "" "Mark lists as read-only once they are used as a dictionary key. The problem " "is that it's not just the top-level object that could change its value; you " @@ -1000,14 +998,14 @@ msgid "" msgstr "" "Marquer les listes comme étant en lecture seule une fois qu'elles sont " "utilisées comme clé de dictionnaire. Le problème est que ce n'est pas " -"seulement l'objet de niveau supérieur qui pourrait changer sa valeur; vous " -"pourriez utiliser un *n*-uplet contenant une liste comme clé. Utiliser " +"seulement l'objet de niveau supérieur qui pourrait changer sa valeur ; vous " +"pourriez utiliser un *n*-uplet contenant une liste comme clé. Utiliser " "n'importe quoi comme une clé dans un dictionnaire nécessiterait de marquer " -"tous les objets accessibles à partir de là comme en lecture seule -- et " +"tous les objets accessibles à partir de là comme en lecture seule — et " "encore une fois, les objets se faisant référence pourraient provoquer une " "boucle infinie." -#: faq/design.rst:503 +#: faq/design.rst:499 msgid "" "There is a trick to get around this if you need to, but use it at your own " "risk: You can wrap a mutable structure inside a class instance which has " @@ -1024,17 +1022,17 @@ msgstr "" "(ou une autre structure basée sur le hachage), restent fixes pendant que " "l'objet est dans le dictionnaire (ou une autre structure). ::" -#: faq/design.rst:527 +#: faq/design.rst:523 msgid "" "Note that the hash computation is complicated by the possibility that some " "members of the list may be unhashable and also by the possibility of " "arithmetic overflow." msgstr "" "Notez que le calcul de hachage peut être compliqué car il est possible que " -"certains membres de la liste peuvent être impossible à hacher et aussi par " -"la possibilité de débordement arithmétique." +"certains membres de la liste soient impossibles à hacher et aussi par la " +"possibilité de débordement arithmétique." -#: faq/design.rst:531 +#: faq/design.rst:527 msgid "" "Furthermore it must always be the case that if ``o1 == o2`` (ie ``o1." "__eq__(o2) is True``) then ``hash(o1) == hash(o2)`` (ie, ``o1.__hash__() == " @@ -1048,7 +1046,7 @@ msgstr "" "ne remplissez pas ces conditions, les dictionnaires et autres structures " "basées sur le hachage se comporteront mal." -#: faq/design.rst:536 +#: faq/design.rst:532 msgid "" "In the case of ListWrapper, whenever the wrapper object is in a dictionary " "the wrapped list must not change to avoid anomalies. Don't do this unless " @@ -1061,11 +1059,11 @@ msgstr "" "conséquences de ne pas satisfaire entièrement ces conditions. Vous avez été " "prévenus." -#: faq/design.rst:543 +#: faq/design.rst:539 msgid "Why doesn't list.sort() return the sorted list?" msgstr "Pourquoi ``list.sort()`` ne renvoie pas la liste triée ?" -#: faq/design.rst:545 +#: faq/design.rst:541 msgid "" "In situations where performance matters, making a copy of the list just to " "sort it would be wasteful. Therefore, :meth:`list.sort` sorts the list in " @@ -1075,31 +1073,31 @@ msgid "" "around." msgstr "" "Dans les situations où la performance est importante, faire une copie de la " -"liste juste pour la trier serait un gaspillage. Par conséquent, :meth:`list." -"sort` trie la liste en place. Afin de vous le rappeler, il ne retourne pas " -"la liste triée. De cette façon, vous ne serez pas dupés en écrasant " -"accidentellement une liste lorsque vous avez besoin d’une copie triée, mais " -"vous devrez également garder sous la main la version non triée." +"liste juste pour la classer serait un gaspillage. Par conséquent, :meth:" +"`list.sort` classe la liste en place. Afin de vous le rappeler, elle ne " +"renvoie pas la liste classée. De cette façon, vous ne serez pas dupés en " +"écrasant accidentellement une liste lorsque vous avez besoin d’une copie " +"triée tout en gardant sous la main la version non triée." -#: faq/design.rst:551 +#: faq/design.rst:547 msgid "" "If you want to return a new list, use the built-in :func:`sorted` function " "instead. This function creates a new list from a provided iterable, sorts " "it and returns it. For example, here's how to iterate over the keys of a " "dictionary in sorted order::" msgstr "" -"Si vous souhaitez retourner une nouvelle liste, utilisez plutôt la fonction " -"native :func:`sorted`. Cette fonction crée une nouvelle liste à partir d’un " -"itérable fourni, la trie et la retourne. Par exemple, voici comment itérer " -"sur les clefs d’un dictionnaire dans l’ordre trié ::" +"Si vous souhaitez qu'une nouvelle liste soit renvoyée, utilisez plutôt la " +"fonction native :func:`sorted`. Cette fonction crée une nouvelle liste à " +"partir d’un itérable fourni, la classe et la renvoie. Par exemple, voici " +"comment itérer dans l’ordre sur les clés d’un dictionnaire ::" -#: faq/design.rst:561 +#: faq/design.rst:557 msgid "How do you specify and enforce an interface spec in Python?" msgstr "" -"Comment spécifiez-vous et appliquez-vous une spécification d’interface en " -"Python ?" +"Comment spécifier une interface et appliquer une spécification d’interface " +"en Python ?" -#: faq/design.rst:563 +#: faq/design.rst:559 msgid "" "An interface specification for a module as provided by languages such as C++ " "and Java describes the prototypes for the methods and functions of the " @@ -1109,9 +1107,9 @@ msgstr "" "Une spécification d'interface pour un module fourni par des langages tels " "que C++ et Java décrit les prototypes pour les méthodes et les fonctions du " "module. Beaucoup estiment que la vérification au moment de la compilation " -"des spécifications d'interface aide à la construction de grands programmes." +"des spécifications d'interface facilite la construction de grands programmes." -#: faq/design.rst:568 +#: faq/design.rst:564 msgid "" "Python 2.6 adds an :mod:`abc` module that lets you define Abstract Base " "Classes (ABCs). You can then use :func:`isinstance` and :func:`issubclass` " @@ -1121,14 +1119,14 @@ msgid "" "`~collections.abc.MutableMapping`." msgstr "" "Python 2.6 ajoute un module :mod:`abc` qui vous permet de définir des " -"classes de base abstraites (ABCs). Vous pouvez ensuite utiliser :func:" -"`isinstance` et :func:`issubclass` pour vérifier si une instance ou une " -"classe implémente une ABC particulière. Le module :mod:`collections.abc` " -"définit un ensemble d'ABCs utiles telles que :class:`~collections.abc." -"Iterable`, :class:`~collections.abc.Container` et :class:`collections.abc." -"MutableMapping`." +"classes de base abstraites (ABC pour *abstract base classes* en anglais). " +"Vous pouvez ensuite utiliser :func:`isinstance` et :func:`issubclass` pour " +"vérifier si une instance ou une classe implémente une ABC particulière. Le " +"module :mod:`collections.abc` définit un ensemble d'ABC utiles telles que :" +"class:`~collections.abc.Iterable`, :class:`~collections.abc.Container` et :" +"class:`collections.abc.MutableMapping`." -#: faq/design.rst:575 +#: faq/design.rst:571 msgid "" "For Python, many of the advantages of interface specifications can be " "obtained by an appropriate test discipline for components." @@ -1136,7 +1134,7 @@ msgstr "" "Pour Python, la plupart des avantages des spécifications d'interface peuvent " "être obtenus par une discipline de test appropriée pour les composants." -#: faq/design.rst:578 +#: faq/design.rst:574 msgid "" "A good test suite for a module can both provide a regression test and serve " "as a module interface specification and a set of examples. Many Python " @@ -1148,16 +1146,16 @@ msgid "" "in a module." msgstr "" "Une bonne suite de tests pour un module peut à la fois fournir un test de " -"non régression et servir de spécification d'interface de module ainsi qu'un " +"non-régression et servir de spécification d'interface de module ainsi qu'un " "ensemble d'exemples. De nombreux modules Python peuvent être exécutés en " "tant que script pour fournir un simple « auto-test ». Même les modules qui " "utilisent des interfaces externes complexes peuvent souvent être testés " "isolément à l'aide d'émulations triviales embryonnaires de l'interface " -"externe. Les modules :mod:`doctest` et :mod:`UnitTest` ou des frameworks de " +"externe. Les modules :mod:`doctest` et :mod:`UnitTest` ou des cadriciels de " "test tiers peuvent être utilisés pour construire des suites de tests " "exhaustives qui éprouvent chaque ligne de code dans un module." -#: faq/design.rst:586 +#: faq/design.rst:582 msgid "" "An appropriate testing discipline can help build large complex applications " "in Python as well as having interface specifications would. In fact, it can " @@ -1177,7 +1175,7 @@ msgstr "" "réellement le faire correctement, mais il est trivial de vérifier cette " "propriété dans une suite de tests." -#: faq/design.rst:594 +#: faq/design.rst:590 msgid "" "Writing test suites is very helpful, and you might want to design your code " "to make it easily tested. One increasingly popular technique, test-driven " @@ -1192,11 +1190,11 @@ msgstr "" "le code réel. Bien sûr, Python vous permet d'être laxiste et de ne pas " "écrire de test du tout." -#: faq/design.rst:602 +#: faq/design.rst:598 msgid "Why is there no goto?" msgstr "Pourquoi n'y a-t-il pas de ``goto`` en Python ?" -#: faq/design.rst:604 +#: faq/design.rst:600 msgid "" "In the 1970s people realized that unrestricted goto could lead to messy " "\"spaghetti\" code that was hard to understand and revise. In a high-level " @@ -1205,47 +1203,53 @@ msgid "" "expressions) and loop (with ``while`` and ``for`` statements, possibly " "containing ``continue`` and ``break``)." msgstr "" +"Dans les années 1970, les gens se sont aperçus que le foisonnement de *goto* " +"conduisait à du code « spaghetti » difficile à comprendre et à modifier. " +"Dans les langages de haut niveau, c'est d'autant moins nécessaire qu'il " +"existe différentes manières de créer des branches (en Python, les " +"instructions ``if`` et les expressions ``or``, ``and`` et ``if-else``) et de " +"boucler (avec les instructions ``while`` et ``for``, qui peuvent contenir " +"des ``continue`` et ``break``)." -#: faq/design.rst:611 -#, fuzzy +#: faq/design.rst:607 msgid "" "One can also use exceptions to provide a \"structured goto\" that works even " "across function calls. Many feel that exceptions can conveniently emulate " "all reasonable uses of the \"go\" or \"goto\" constructs of C, Fortran, and " "other languages. For example::" msgstr "" -"Vous pouvez utiliser les exceptions afin de mettre en place un \"``goto`` " -"structuré\" qui fonctionne même avec les appels de fonctions. Beaucoup de " -"personnes estiment que les exceptions peuvent émuler idéalement tout " -"utilisation raisonnable des constructions ``go`` ou ``goto`` en C, en " -"Fortran ou autres langages de programmation. Par exemple ::" +"Vous pouvez utiliser les exceptions afin de mettre en place un « *goto* " +"structuré » qui fonctionne même à travers les appels de fonctions. Beaucoup " +"de personnes estiment que les exceptions sont une façon commode d'émuler " +"l'utilisation raisonnable des constructions *go* ou *goto* du C, du Fortran " +"ou d'autres langages de programmation. Par exemple ::" -#: faq/design.rst:627 +#: faq/design.rst:623 msgid "" "This doesn't allow you to jump into the middle of a loop, but that's usually " "considered an abuse of goto anyway. Use sparingly." msgstr "" -"Cela ne vous permet pas de sauter au milieu d'une boucle. Néanmoins, dans " -"tous les cas cela est généralement considéré comme un abus de ``goto``. À " -"Utiliser avec parcimonie." +"Cela ne vous permet pas de sauter au milieu d'une boucle mais, ceci est de " +"toute façon généralement considéré comme un abus de ``goto``. À Utiliser " +"avec parcimonie." -#: faq/design.rst:632 +#: faq/design.rst:628 msgid "Why can't raw strings (r-strings) end with a backslash?" msgstr "" "Pourquoi les chaînes de caractères brutes (r-strings) ne peuvent-elles pas " -"se terminer par un *backslash* ?" +"se terminer par un *backslash* ?" -#: faq/design.rst:634 +#: faq/design.rst:630 msgid "" "More precisely, they can't end with an odd number of backslashes: the " "unpaired backslash at the end escapes the closing quote character, leaving " "an unterminated string." msgstr "" "Plus précisément, elles ne peuvent pas se terminer par un nombre impair de " -"*backslashes* : le *backslash* non appairé à la fin échappe le caractère de " -"guillemet final, laissant une chaîne non terminée." +"*backslashes* : le *backslash* non appairé à la fin échappe le caractère de " +"guillemet final, laissant la chaîne non terminée." -#: faq/design.rst:638 +#: faq/design.rst:634 msgid "" "Raw strings were designed to ease creating input for processors (chiefly " "regular expression engines) that want to do their own backslash escape " @@ -1263,56 +1267,56 @@ msgstr "" "chaîne en l'échappant avec un *antislash*. Ces règles fonctionnent bien " "lorsque les chaînes brutes sont utilisées pour leur but premier." -#: faq/design.rst:645 +#: faq/design.rst:641 msgid "" "If you're trying to build Windows pathnames, note that all Windows system " "calls accept forward slashes too::" msgstr "" "Si vous essayez de construire des chemins d'accès Windows, notez que tous " -"les appels système Windows acceptent également les *slashes* \"classiques" -"\" ::" +"les appels système Windows acceptent également les *slashes* " +"« classiques » ::" -#: faq/design.rst:650 +#: faq/design.rst:646 msgid "" "If you're trying to build a pathname for a DOS command, try e.g. one of ::" msgstr "" "Si vous essayez de construire un chemin d'accès pour une commande DOS, " -"essayez par exemple l'un de ceux-là ::" +"essayez par exemple l'un de ceux-ci ::" -#: faq/design.rst:658 +#: faq/design.rst:654 msgid "Why doesn't Python have a \"with\" statement for attribute assignments?" msgstr "" "Pourquoi la déclaration ``with`` pour les assignations d'attributs n'existe " "pas en Python ?" -#: faq/design.rst:660 +#: faq/design.rst:656 msgid "" "Python has a 'with' statement that wraps the execution of a block, calling " "code on the entrance and exit from the block. Some languages have a " "construct that looks like this::" msgstr "" "Python a une instruction ``with`` qui encapsule l'exécution d'un bloc, en " -"appelant le code sur l'entrée et la sortie du bloc. Certains langages " +"appelant du code à l'entrée et la sortie du bloc. Certains langages " "possèdent une construction qui ressemble à ceci ::" -#: faq/design.rst:668 +#: faq/design.rst:664 msgid "In Python, such a construct would be ambiguous." msgstr "En Python, une telle construction serait ambiguë." -#: faq/design.rst:670 +#: faq/design.rst:666 msgid "" "Other languages, such as Object Pascal, Delphi, and C++, use static types, " "so it's possible to know, in an unambiguous way, what member is being " "assigned to. This is the main point of static typing -- the compiler " "*always* knows the scope of every variable at compile time." msgstr "" -"Les autres langages, tels que le Pascal, le Delphi et le C++ utilisent des " -"types statiques, il est donc possible de savoir d'une manière claire et " -"directe ce à quoi est attribué un membre. C'est le point principal du typage " -"statique --le compilateur connaît *toujours* la portée de toutes les " -"variables au moment de la compilation." +"Les autres langages, tels que Pascal, Delphi et C++ utilisent des types " +"statiques, il est donc possible de savoir d'une manière claire et directe ce " +"à quoi est attribué un membre. C'est le point principal du typage statique — " +"le compilateur connaît *toujours* la portée de toutes les variables au " +"moment de la compilation." -#: faq/design.rst:675 +#: faq/design.rst:671 msgid "" "Python uses dynamic types. It is impossible to know in advance which " "attribute will be referenced at runtime. Member attributes may be added or " @@ -1321,16 +1325,16 @@ msgid "" "one, or a member attribute?" msgstr "" "Python utilise le typage dynamique. Il est impossible de savoir à l'avance " -"quel attribut est utilisé comme référence lors de l'exécution. Les attributs " -"membres peuvent être ajoutés ou retirés des objets à la volée. Il est donc " -"impossible de savoir, d'une simple lecture, quel attribut est référencé : " -"s'il est local, global ou un attribut membre?" +"quel attribut sera référencé lors de l'exécution. Les attributs membres " +"peuvent être ajoutés ou retirés des objets à la volée. Il est donc " +"impossible de savoir, d'une simple lecture, quel attribut est référencé : " +"s'il est local, global ou un attribut membre ?" -#: faq/design.rst:681 +#: faq/design.rst:677 msgid "For instance, take the following incomplete snippet::" msgstr "Prenons par exemple l'extrait incomplet suivant ::" -#: faq/design.rst:687 +#: faq/design.rst:683 msgid "" "The snippet assumes that \"a\" must have a member attribute called \"x\". " "However, there is nothing in Python that tells the interpreter this. What " @@ -1338,13 +1342,13 @@ msgid "" "variable named \"x\", will it be used inside the with block? As you see, " "the dynamic nature of Python makes such choices much harder." msgstr "" -"L'extrait suppose que \"a\" doit avoir un attribut membre appelé \"x\". " +"L'extrait suppose que « a » doit avoir un attribut membre appelé « x ». " "Néanmoins, il n'y a rien en Python qui en informe l'interpréteur. Que se " -"passe-t-il si \"a\" est, disons, un entier ? Si une variable globale nommée " -"\"x\" existe, sera-t-elle utilisée dans le bloc ``with`` ? Comme vous " -"voyez, la nature dynamique du Python rend ces choix beaucoup plus difficiles." +"passe-t-il si « a » est, disons, un entier ? Si une variable globale nommée " +"« x » existe, est-elle utilisée dans le bloc ``with`` ? Comme vous voyez, " +"la nature dynamique du Python rend ces choix beaucoup plus difficiles." -#: faq/design.rst:693 +#: faq/design.rst:689 msgid "" "The primary benefit of \"with\" and similar language features (reduction of " "code volume) can, however, easily be achieved in Python by assignment. " @@ -1354,11 +1358,11 @@ msgstr "" "similaires (réduction du volume de code) peut, cependant, être facilement " "réalisé en Python par assignation. Au lieu de ::" -#: faq/design.rst:700 +#: faq/design.rst:696 msgid "write this::" msgstr "écrivez ceci ::" -#: faq/design.rst:707 +#: faq/design.rst:703 msgid "" "This also has the side-effect of increasing execution speed because name " "bindings are resolved at run-time in Python, and the second version only " @@ -1368,25 +1372,43 @@ msgstr "" "car les liaisons de noms sont résolues au moment de l'exécution en Python, " "et la deuxième version n'a besoin d'exécuter la résolution qu'une seule fois." -#: faq/design.rst:713 +#: faq/design.rst:709 +msgid "Why don't generators support the with statement?" +msgstr "" +"Pourquoi l'instruction ``with`` ne prend-elle pas en charge les générateurs ?" + +#: faq/design.rst:711 +msgid "" +"For technical reasons, a generator used directly as a context manager would " +"not work correctly. When, as is most common, a generator is used as an " +"iterator run to completion, no closing is needed. When it is, wrap it as " +"\"contextlib.closing(generator)\" in the 'with' statement." +msgstr "" +"Pour des raisons d'ordre technique, un générateur utilisé directement comme " +"gestionnaire de contexte ne pourrait pas fonctionner. Dans le cas le plus " +"courant, où un générateur est utilisé jusqu'à épuisement, il n'y a pas " +"besoin de le fermer. Sinon, on peut toujours mettre ``contextlib." +"closing(générateur)`` dans la ligne du ``with``." + +#: faq/design.rst:718 msgid "Why are colons required for the if/while/def/class statements?" msgstr "" "Pourquoi les deux-points sont-ils nécessaires pour les déclarations ``if/" -"while/def/class`` ?" +"while/def/class`` ?" -#: faq/design.rst:715 +#: faq/design.rst:720 msgid "" "The colon is required primarily to enhance readability (one of the results " "of the experimental ABC language). Consider this::" msgstr "" -"Le deux-points est principalement nécessaires pour améliorer la lisibilité " +"Le deux-points est principalement nécessaire pour améliorer la lisibilité " "(l'un des résultats du langage expérimental ABC). Considérez ceci ::" -#: faq/design.rst:721 +#: faq/design.rst:726 msgid "versus ::" -msgstr "versus ::" +msgstr "et cela ::" -#: faq/design.rst:726 +#: faq/design.rst:731 msgid "" "Notice how the second one is slightly easier to read. Notice further how a " "colon sets off the example in this FAQ answer; it's a standard usage in " @@ -1394,9 +1416,9 @@ msgid "" msgstr "" "Remarquez comment le deuxième est un peu plus facile à lire. Remarquez " "aussi comment un deux-points introduit l'exemple dans cette réponse à la " -"FAQ ; c'est un usage standard en anglais." +"FAQ ; c'est un usage standard en français (et en anglais)." -#: faq/design.rst:729 +#: faq/design.rst:734 msgid "" "Another minor reason is that the colon makes it easier for editors with " "syntax highlighting; they can look for colons to decide when indentation " @@ -1404,17 +1426,17 @@ msgid "" "the program text." msgstr "" "Une autre raison mineure est que les deux-points facilitent la tâche des " -"éditeurs avec coloration syntaxique ; ils peuvent rechercher les deux-points " +"éditeurs avec coloration syntaxique ; ils peuvent rechercher les deux-points " "pour décider quand l'indentation doit être augmentée au lieu d'avoir à faire " "une analyse plus élaborée du texte du programme." -#: faq/design.rst:735 +#: faq/design.rst:740 msgid "Why does Python allow commas at the end of lists and tuples?" msgstr "" "Pourquoi Python permet-il les virgules à la fin des listes et des *n*-" -"uplets ?" +"uplets ?" -#: faq/design.rst:737 +#: faq/design.rst:742 msgid "" "Python lets you add a trailing comma at the end of lists, tuples, and " "dictionaries::" @@ -1422,11 +1444,11 @@ msgstr "" "Python vous permet d'ajouter une virgule à la fin des listes, des *n*-uplets " "et des dictionnaires ::" -#: faq/design.rst:748 +#: faq/design.rst:753 msgid "There are several reasons to allow this." msgstr "Il y a plusieurs raisons d'accepter cela." -#: faq/design.rst:750 +#: faq/design.rst:755 msgid "" "When you have a literal value for a list, tuple, or dictionary spread across " "multiple lines, it's easier to add more elements because you don't have to " @@ -1439,7 +1461,7 @@ msgstr "" "virgule à la ligne précédente. Les lignes peuvent aussi être réorganisées " "sans créer une erreur de syntaxe." -#: faq/design.rst:755 +#: faq/design.rst:760 msgid "" "Accidentally omitting the comma can lead to errors that are hard to " "diagnose. For example::" @@ -1447,19 +1469,31 @@ msgstr "" "L'omission accidentelle de la virgule peut entraîner des erreurs difficiles " "à diagnostiquer, par exemple ::" -#: faq/design.rst:765 +#: faq/design.rst:770 msgid "" "This list looks like it has four elements, but it actually contains three: " "\"fee\", \"fiefoo\" and \"fum\". Always adding the comma avoids this source " "of error." msgstr "" "Cette liste a l'air d'avoir quatre éléments, mais elle en contient en fait " -"trois : \"*fee*\", \"*fiefoo*\" et \"*fum*\". Toujours ajouter la virgule " +"trois : \"*fee*\", \"*fiefoo*\" et \"*fum*\". Toujours ajouter la virgule " "permet d'éviter cette source d'erreur." -#: faq/design.rst:768 +#: faq/design.rst:773 msgid "" "Allowing the trailing comma may also make programmatic code generation " "easier." msgstr "" "Permettre la virgule de fin peut également faciliter la génération de code." + +#~ msgid "" +#~ "You can do this easily enough with a sequence of ``if... elif... elif... " +#~ "else``. There have been some proposals for switch statement syntax, but " +#~ "there is no consensus (yet) on whether and how to do range tests. See :" +#~ "pep:`275` for complete details and the current status." +#~ msgstr "" +#~ "Vous pouvez le faire assez facilement avec une séquence de ``if... " +#~ "elif... elif... else``. Il y a eu quelques propositions pour la syntaxe " +#~ "de l'instruction ``switch``, mais il n'y a pas (encore) de consensus sur " +#~ "le cas des intervalles. Voir la :pep:`275` pour tous les détails et " +#~ "l'état actuel." diff --git a/faq/extending.po b/faq/extending.po index fdfc986a35..af7c78e662 100644 --- a/faq/extending.po +++ b/faq/extending.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2020-03-03 19:27+0100\n" -"Last-Translator: ZepmanBC \n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2021-10-17 18:37+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.3\n" +"X-Generator: Poedit 3.0\n" #: faq/extending.rst:3 msgid "Extending/Embedding FAQ" @@ -49,10 +49,10 @@ msgstr "Puis-je créer mes propres fonctions en C++ ?" #: faq/extending.rst:28 msgid "" -"Yes, using the C compatibility features found in C++. Place ``extern \"C" -"\" { ... }`` around the Python include files and put ``extern \"C\"`` before " -"each function that is going to be called by the Python interpreter. Global " -"or static C++ objects with constructors are probably not a good idea." +"Yes, using the C compatibility features found in C++. Place ``extern " +"\"C\" { ... }`` around the Python include files and put ``extern \"C\"`` " +"before each function that is going to be called by the Python interpreter. " +"Global or static C++ objects with constructors are probably not a good idea." msgstr "" "Oui, en utilisant les fonctionnalités de compatibilité C existantes en C++. " "Placez ``extern \"C\" { ... }`` autour des fichiers Python inclus et mettez " @@ -337,10 +337,10 @@ msgid "" "work for C++ objects." msgstr "" "Selon vos besoins, de nombreuses approches sont possibles. Pour le faire " -"manuellement, commencez par lire :ref:`le document \"Extension et intégration" -"\" `. Sachez que pour le système d'exécution Python, il n'y " -"a pas beaucoup de différence entre C et C++ — donc la méthode pour " -"construire un nouveau type Python à partir d'une structure C (pointeur) " +"manuellement, commencez par lire :ref:`le document \"Extension et " +"intégration\" `. Sachez que pour le système d'exécution " +"Python, il n'y a pas beaucoup de différence entre C et C++ — donc la méthode " +"pour construire un nouveau type Python à partir d'une structure C (pointeur) " "fonctionne également avec des objets en C++." #: faq/extending.rst:212 @@ -414,13 +414,13 @@ msgstr "" msgid "For Debian, run ``apt-get install python-dev``." msgstr "Pour Debian, exécutez ``apt-get install python-dev``." -#: faq/extending.rst:259 +#: faq/extending.rst:258 msgid "How do I tell \"incomplete input\" from \"invalid input\"?" msgstr "" "Comment distinguer une « entrée incomplète » (*incomplete input*) d'une " "« entrée invalide » (*invalid input*) ?" -#: faq/extending.rst:261 +#: faq/extending.rst:260 msgid "" "Sometimes you want to emulate the Python interactive interpreter's behavior, " "where it gives you a continuation prompt when the input is incomplete (e.g. " @@ -434,7 +434,7 @@ msgstr "" "vous n'avez pas fermé vos parenthèses ou triple guillemets) mais il vous " "renvoie immédiatement une erreur syntaxique quand la saisie est incorrecte." -#: faq/extending.rst:267 +#: faq/extending.rst:266 msgid "" "In Python you can use the :mod:`codeop` module, which approximates the " "parser's behavior sufficiently. IDLE uses this, for example." @@ -442,7 +442,7 @@ msgstr "" "En Python, vous pouvez utiliser le module :mod:`codeop`, qui se rapproche " "assez du comportement de l'analyseur. Par exemple, IDLE l'utilise." -#: faq/extending.rst:270 +#: faq/extending.rst:269 msgid "" "The easiest way to do it in C is to call :c:func:`PyRun_InteractiveLoop` " "(perhaps in a separate thread) and let the Python interpreter handle the " @@ -458,50 +458,12 @@ msgstr "" "myreadline.c`` pour plus de conseils." #: faq/extending.rst:276 -msgid "" -"However sometimes you have to run the embedded Python interpreter in the " -"same thread as your rest application and you can't allow the :c:func:" -"`PyRun_InteractiveLoop` to stop while waiting for user input. The one " -"solution then is to call :c:func:`PyParser_ParseString` and test for ``e." -"error`` equal to ``E_EOF``, which means the input is incomplete. Here's a " -"sample code fragment, untested, inspired by code from Alex Farber::" -msgstr "" -"Cependant, vous devez parfois exécuter l'interpréteur Python intégré dans le " -"même fil d’exécution que le reste de votre application et vous ne pouvez pas " -"laisser :c:func:`PyRun_InteractiveLoop` attendre les entrées utilisateur. La " -"seule solution est alors d'appeler :c:func:`PyParser_ParseString` et de " -"tester si ``e.error`` égale ``E_EOF``, ce qui signifie que l'entrée est " -"incomplète. Voici un exemple de code, non testé, inspiré d'un code écrit par " -"Alex Farber ::" - -#: faq/extending.rst:310 -msgid "" -"Another solution is trying to compile the received string with :c:func:" -"`Py_CompileString`. If it compiles without errors, try to execute the " -"returned code object by calling :c:func:`PyEval_EvalCode`. Otherwise save " -"the input for later. If the compilation fails, find out if it's an error or " -"just more input is required - by extracting the message string from the " -"exception tuple and comparing it to the string \"unexpected EOF while parsing" -"\". Here is a complete example using the GNU readline library (you may want " -"to ignore **SIGINT** while calling readline())::" -msgstr "" -"Une autre solution est d'essayer de compiler la chaîne reçue avec :c:func:" -"`Py_CompileString`. Si cela se compile sans erreur, essayez d'exécuter " -"l'objet code renvoyé en appelant :c:func:`PyEval_EvalCode`. Sinon, " -"enregistrez l'entrée pour plus tard. Si la compilation échoue, vérifiez s'il " -"s'agit d'une erreur ou s'il faut juste plus de données — en extrayant la " -"chaîne de message du *n*-uplet d'exception et en la comparant à la chaîne *" -"\"unexpected EOF while parsing\"*. Voici un exemple complet d'utilisation de " -"la bibliothèque *readline* de GNU (il vous est possible d'ignorer **SIGINT** " -"lors de l'appel à ``readline()``) ::" - -#: faq/extending.rst:432 msgid "How do I find undefined g++ symbols __builtin_new or __pure_virtual?" msgstr "" "Comment puis-je trouver les symboles g++ indéfinis ``__builtin_new`` ou " "``__pure_virtual`` ?" -#: faq/extending.rst:434 +#: faq/extending.rst:278 msgid "" "To dynamically load g++ extension modules, you must recompile Python, relink " "it using g++ (change LINKCC in the Python Modules Makefile), and link your " @@ -513,7 +475,7 @@ msgstr "" "de votre module d'extension avec g++ (par exemple, ``g++ -shared -o mymodule." "so mymodule.o``)." -#: faq/extending.rst:440 +#: faq/extending.rst:284 msgid "" "Can I create an object class with some methods implemented in C and others " "in Python (e.g. through inheritance)?" @@ -521,7 +483,7 @@ msgstr "" "Puis-je créer une classe d'objets avec certaines méthodes implémentées en C " "et d'autres en Python (p. ex. en utilisant l'héritage) ?" -#: faq/extending.rst:442 +#: faq/extending.rst:286 msgid "" "Yes, you can inherit from built-in classes such as :class:`int`, :class:" "`list`, :class:`dict`, etc." @@ -529,7 +491,7 @@ msgstr "" "Oui, vous pouvez hériter de classes intégrées telles que :class:`int`, :" "class:`list`, :class:`dict`, etc." -#: faq/extending.rst:445 +#: faq/extending.rst:289 msgid "" "The Boost Python Library (BPL, http://www.boost.org/libs/python/doc/index." "html) provides a way of doing this from C++ (i.e. you can inherit from an " @@ -538,3 +500,47 @@ msgstr "" "La bibliothèque *Boost Python Library* (BPL, http://www.boost.org/libs/" "python/doc/index.html) fournit un moyen de le faire depuis C++ (c.-à-d. que " "vous pouvez hériter d'une classe d'extension écrite en C++ en utilisant BPL)." + +#~ msgid "" +#~ "However sometimes you have to run the embedded Python interpreter in the " +#~ "same thread as your rest application and you can't allow the :c:func:" +#~ "`PyRun_InteractiveLoop` to stop while waiting for user input. A solution " +#~ "is trying to compile the received string with :c:func:`Py_CompileString`. " +#~ "If it compiles without errors, try to execute the returned code object by " +#~ "calling :c:func:`PyEval_EvalCode`. Otherwise save the input for later. If " +#~ "the compilation fails, find out if it's an error or just more input is " +#~ "required - by extracting the message string from the exception tuple and " +#~ "comparing it to the string \"unexpected EOF while parsing\". Here is a " +#~ "complete example using the GNU readline library (you may want to ignore " +#~ "**SIGINT** while calling readline())::" +#~ msgstr "" +#~ "Cependant, il arrive qu'il soit nécessaire d'exécuter l'interpréteur " +#~ "Python embarqué dans le même fil d'exécution que le reste de " +#~ "l'application, et que :c:func:`PyRun_InteractiveLoop` ne puisse pas être " +#~ "utilisée car elle bloque le fil en attendant l'entrée de l'utilisateur. " +#~ "Une solution est d'essayer de compiler la chaîne reçue avec :c:func:" +#~ "`Py_CompileString`. Si cela se compile sans erreur, essayez d'exécuter " +#~ "l'objet code renvoyé en appelant :c:func:`PyEval_EvalCode`. Sinon, " +#~ "enregistrez l'entrée pour plus tard. Si la compilation échoue, vérifiez " +#~ "s'il s'agit d'une erreur ou s'il faut juste plus de données — en " +#~ "extrayant la chaîne de message du *n*-uplet d'exception et en la " +#~ "comparant à la chaîne *\"unexpected EOF while parsing\"*. Voici un " +#~ "exemple complet d'utilisation de la bibliothèque *readline* de GNU (il " +#~ "peut être préférable d'ignorer **SIGINT** lors de l'appel à " +#~ "``readline()``) ::" + +#~ msgid "" +#~ "However sometimes you have to run the embedded Python interpreter in the " +#~ "same thread as your rest application and you can't allow the :c:func:" +#~ "`PyRun_InteractiveLoop` to stop while waiting for user input. The one " +#~ "solution then is to call :c:func:`PyParser_ParseString` and test for ``e." +#~ "error`` equal to ``E_EOF``, which means the input is incomplete. Here's " +#~ "a sample code fragment, untested, inspired by code from Alex Farber::" +#~ msgstr "" +#~ "Cependant, vous devez parfois exécuter l'interpréteur Python intégré dans " +#~ "le même fil d’exécution que le reste de votre application et vous ne " +#~ "pouvez pas laisser :c:func:`PyRun_InteractiveLoop` attendre les entrées " +#~ "utilisateur. La seule solution est alors d'appeler :c:func:" +#~ "`PyParser_ParseString` et de tester si ``e.error`` égale ``E_EOF``, ce " +#~ "qui signifie que l'entrée est incomplète. Voici un exemple de code, non " +#~ "testé, inspiré d'un code écrit par Alex Farber ::" diff --git a/faq/general.po b/faq/general.po index 862fd52024..c2b94a3d4a 100644 --- a/faq/general.po +++ b/faq/general.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2020-11-07 17:18+0100\n" -"Last-Translator: Mindiell \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2021-12-16 02:40+0100\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.1\n" +"X-Generator: Poedit 3.0\n" #: faq/general.rst:5 msgid "General Python FAQ" @@ -63,8 +63,8 @@ msgid "" "to Python `_ links to other " "introductory tutorials and resources for learning Python." msgstr "" -"Pour en savoir plus, commencez par :ref:`tutorial-index`. Le « `Guide des " -"Débutants pour Python `_ » " +"Pour en savoir plus, commencez par :ref:`tutorial-index`. Le « `Guide des " +"Débutants pour Python `_ » " "renvoie vers d'autres tutoriels et ressources d'initiation pour apprendre " "Python." @@ -100,7 +100,7 @@ msgstr "" #: faq/general.rst:48 msgid "Are there copyright restrictions on the use of Python?" msgstr "" -"Existe-il des restrictions liées à la propriété intellectuelle quant à " +"Existe-t-il des restrictions liées à la propriété intellectuelle quant à " "l'utilisation de Python ?" #: faq/general.rst:50 @@ -239,8 +239,8 @@ msgid "" "to USENET. The rest is in the ``Misc/HISTORY`` file." msgstr "" "En Février 1991, juste après un peu plus d'un an de développement, j'ai " -"décidé de le poster sur USENET. Le reste se trouve dans le fichier « Misc/" -"HISTORY »." +"décidé de le poster sur USENET. Le reste se trouve dans le fichier « Misc/" +"HISTORY »." #: faq/general.rst:109 msgid "What is Python good for?" @@ -258,7 +258,7 @@ msgstr "" msgid "" "The language comes with a large standard library that covers areas such as " "string processing (regular expressions, Unicode, calculating differences " -"between files), Internet protocols (HTTP, FTP, SMTP, XML-RPC, POP, IMAP, CGI " +"between files), internet protocols (HTTP, FTP, SMTP, XML-RPC, POP, IMAP, CGI " "programming), software engineering (unit testing, logging, profiling, " "parsing Python code), and operating system interfaces (system calls, " "filesystems, TCP/IP sockets). Look at the table of contents for :ref:" @@ -326,7 +326,7 @@ msgid "" "precede versions labeled 2.0rcN, and *those* precede 2.0." msgstr "" "Les versions *alpha*, *beta* et *release candidate* ont un suffixe " -"supplémentaire. Le suffixe pour une version alpha est « aN » où N est un " +"supplémentaire. Le suffixe pour une version alpha est « aN » où N est un " "petit nombre, le suffixe pour une version *beta* est *bN* où N est un petit " "nombre, et le suffixe pour une *release candidate* est *rcN* où N est un " "petit nombre. En d'autres mots, toutes les versions nommées *2.0.aN* " @@ -341,8 +341,8 @@ msgid "" "is incremented to the next minor version, which becomes the \"a0\" version, " "e.g. \"2.4a0\"." msgstr "" -"Vous pouvez aussi trouver des versions avec un signe « + » en suffixe, par " -"exemple « 2.2+». Ces versions sont non distribuées, construites directement " +"Vous pouvez aussi trouver des versions avec un signe « + » en suffixe, par " +"exemple « 2.2+ ». Ces versions sont non distribuées, construites directement " "depuis le dépôt de développement de CPython. En pratique, après la sortie " "finale d'une version mineure, la version est augmentée à la prochaine " "version mineure, qui devient la version *a0*, c'est-à-dire *2.4a0*." @@ -420,7 +420,7 @@ msgstr "" #: faq/general.rst:190 msgid "I've never programmed before. Is there a Python tutorial?" -msgstr "Je n'ai jamais programmé avant. Existe t-il un tutoriel Python ?" +msgstr "Je n'ai jamais programmé avant. Existe-t-il un tutoriel Python ?" #: faq/general.rst:192 msgid "" @@ -513,51 +513,35 @@ msgid "How do I submit bug reports and patches for Python?" msgstr "Comment soumettre un rapport de bogues ou un correctif pour Python ?" #: faq/general.rst:233 +#, fuzzy msgid "" -"To report a bug or submit a patch, please use the Roundup installation at " -"https://bugs.python.org/." +"To report a bug or submit a patch, use the issue tracker at https://github." +"com/python/cpython/issues." msgstr "" "Pour reporter un bogue ou soumettre un correctif, merci d'utiliser https://" "bugs.python.org/." #: faq/general.rst:236 msgid "" -"You must have a Roundup account to report bugs; this makes it possible for " -"us to contact you if we have follow-up questions. It will also enable " -"Roundup to send you updates as we act on your bug. If you had previously " -"used SourceForge to report bugs to Python, you can obtain your Roundup " -"password through Roundup's `password reset procedure `_." -msgstr "" -"Vous devez avoir un compte Roundup pour reporter des bogues; cela nous " -"permet de vous contacter si nous avons des questions complémentaires. Cela " -"permettra aussi le suivi de traitement de votre bogue. Si vous avez " -"auparavant utilisé SourceForge pour reporter des bogues sur Python, vous " -"pouvez obtenir un mot de passe Roundup grâce à la `procédure de " -"réinitialisation de mot de passe de Roundup `_." - -#: faq/general.rst:242 -msgid "" "For more information on how Python is developed, consult `the Python " "Developer's Guide `_." msgstr "" "Pour davantage d'informations sur comment Python est développé, consultez " "`le Guide du Développeur Python `_." -#: faq/general.rst:247 +#: faq/general.rst:241 msgid "Are there any published articles about Python that I can reference?" msgstr "" "Existe-t-il des articles publiés au sujet de Python auxquels je peux me " "référer ?" -#: faq/general.rst:249 +#: faq/general.rst:243 msgid "It's probably best to cite your favorite book about Python." msgstr "" "C'est probablement mieux de vous référer à votre livre favori à propos de " "Python." -#: faq/general.rst:251 +#: faq/general.rst:245 msgid "" "The very first article about Python was written in 1991 and is now quite " "outdated." @@ -565,21 +549,21 @@ msgstr "" "Le tout premier article à propos de Python a été écrit en 1991 et est " "maintenant obsolète." -#: faq/general.rst:254 +#: faq/general.rst:248 msgid "" "Guido van Rossum and Jelke de Boer, \"Interactively Testing Remote Servers " "Using the Python Programming Language\", CWI Quarterly, Volume 4, Issue 4 " "(December 1991), Amsterdam, pp 283--303." msgstr "" -"Guido van Rossum et Jelke de Boer, « *Interactively Testing Remote Servers " -"Using the Python Programming Language* », CWI Quarterly, Volume 4, Issue 4 " +"Guido van Rossum et Jelke de Boer, « *Interactively Testing Remote Servers " +"Using the Python Programming Language* », CWI Quarterly, Volume 4, Issue 4 " "(December 1991), Amsterdam, pp 283--303." -#: faq/general.rst:260 +#: faq/general.rst:254 msgid "Are there any books on Python?" msgstr "Y a-t-il des livres au sujet de Python ?" -#: faq/general.rst:262 +#: faq/general.rst:256 msgid "" "Yes, there are many, and more are being published. See the python.org wiki " "at https://wiki.python.org/moin/PythonBooks for a list." @@ -587,20 +571,20 @@ msgstr "" "Oui, il y en a beaucoup, et d'autres sont en cours de publication. Voir le " "wiki python à https://wiki.python.org/moin/PythonBooks pour avoir une liste." -#: faq/general.rst:265 +#: faq/general.rst:259 msgid "" "You can also search online bookstores for \"Python\" and filter out the " "Monty Python references; or perhaps search for \"Python\" and \"language\"." msgstr "" "Vous pouvez aussi chercher chez les revendeurs de livres en ligne avec le " -"terme « Python » et éliminer les références concernant les Monty Python, ou " -"peut-être faire une recherche avec les termes « langage » et « Python »." +"terme « Python » et éliminer les références concernant les Monty Python, ou " +"peut-être faire une recherche avec les termes « langage » et « Python »." -#: faq/general.rst:270 +#: faq/general.rst:264 msgid "Where in the world is www.python.org located?" msgstr "Où www.python.org est-il localisé dans le monde ?" -#: faq/general.rst:272 +#: faq/general.rst:266 msgid "" "The Python project's infrastructure is located all over the world and is " "managed by the Python Infrastructure Team. Details `here `__." -#: faq/general.rst:277 +#: faq/general.rst:271 msgid "Why is it called Python?" msgstr "Pourquoi le nom Python ?" -#: faq/general.rst:279 +#: faq/general.rst:273 msgid "" "When he began implementing Python, Guido van Rossum was also reading the " "published scripts from `\"Monty Python's Flying Circus\" `_. There are two production-ready " "versions of Python: 2.x and 3.x. The recommended version is 3.x, which is " "supported by most widely used libraries. Although 2.x is still widely used, " -"`it is not maintained anymore `_." +"`it is not maintained anymore `_." msgstr "" "Les dernières versions stables peuvent toujours être trouvées sur la `page " "de téléchargement Python `_. Il existe " @@ -686,11 +671,11 @@ msgstr "" "largement utilisées. Bien que Python 2 soit encore utilisé, `il n'est " "désormais plus maintenu `_." -#: faq/general.rst:316 +#: faq/general.rst:310 msgid "How many people are using Python?" msgstr "Combien de personnes utilisent Python ?" -#: faq/general.rst:318 +#: faq/general.rst:312 msgid "" "There are probably millions of users, though it's difficult to obtain an " "exact count." @@ -698,7 +683,7 @@ msgstr "" "Il y a probablement des millions d'utilisateurs, bien qu'il soit difficile " "d'en déterminer le nombre exact." -#: faq/general.rst:321 +#: faq/general.rst:315 msgid "" "Python is available for free download, so there are no sales figures, and " "it's available from many different sites and packaged with many Linux " @@ -709,7 +694,7 @@ msgstr "" "il est inclus avec de beaucoup de distributions Linux, donc les statistiques " "de téléchargement ne donnent pas la totalité non plus." -#: faq/general.rst:325 +#: faq/general.rst:319 msgid "" "The comp.lang.python newsgroup is very active, but not all Python users post " "to the group or even read it." @@ -717,11 +702,11 @@ msgstr "" "Le forum *comp.lang.python* est très actif, mais tous les utilisateurs de " "Python ne laissent pas de messages dessus ou même ne le lisent pas." -#: faq/general.rst:330 +#: faq/general.rst:324 msgid "Have any significant projects been done in Python?" msgstr "Y a-t-il un nombre de projets significatif réalisés en Python ?" -#: faq/general.rst:332 +#: faq/general.rst:326 msgid "" "See https://www.python.org/about/success for a list of projects that use " "Python. Consulting the proceedings for `past Python conferences `_ il " "s'avère que les contributions proviennent de nombreux organismes et " "entreprises divers." -#: faq/general.rst:337 +#: faq/general.rst:331 msgid "" "High-profile Python projects include `the Mailman mailing list manager " "`_ and `the Zope application server `_." @@ -777,12 +763,12 @@ msgstr "" "Le nouveau développement est discuté sur `la liste de diffusion python-dev " "`_." -#: faq/general.rst:359 +#: faq/general.rst:353 msgid "Is it reasonable to propose incompatible changes to Python?" msgstr "" "Est-il raisonnable de proposer des changements incompatibles dans Python ?" -#: faq/general.rst:361 +#: faq/general.rst:355 msgid "" "In general, no. There are already millions of lines of Python code around " "the world, so any change in the language that invalidates more than a very " @@ -799,7 +785,7 @@ msgstr "" "documentations, beaucoup de livres ont été écrits au sujet de Python, et " "nous ne voulons pas les rendre invalides soudainement." -#: faq/general.rst:368 +#: faq/general.rst:362 msgid "" "Providing a gradual upgrade path is necessary if a feature has to be " "changed. :pep:`5` describes the procedure followed for introducing backward-" @@ -808,17 +794,17 @@ msgstr "" "En fournissant un rythme de mise à jour progressif qui est obligatoire si " "une fonctionnalité doit être changée." -#: faq/general.rst:374 +#: faq/general.rst:368 msgid "Is Python a good language for beginning programmers?" msgstr "" "Existe-t-il un meilleur langage de programmation pour les programmeurs " "débutants ?" -#: faq/general.rst:376 +#: faq/general.rst:370 msgid "Yes." msgstr "Oui." -#: faq/general.rst:378 +#: faq/general.rst:372 msgid "" "It is still common to start students with a procedural and statically typed " "language such as Pascal, C, or a subset of C++ or Java. Students may be " @@ -842,7 +828,7 @@ msgstr "" "peuvent même probablement travailler avec des objets définis dans leurs " "premiers cours." -#: faq/general.rst:388 +#: faq/general.rst:382 msgid "" "For a student who has never programmed before, using a statically typed " "language seems unnatural. It presents additional complexity that the " @@ -862,7 +848,7 @@ msgstr "" "terme, ce n'est pas nécessairement la meilleure idée pour s'adresser aux " "étudiants durant leur tout premier cours." -#: faq/general.rst:396 +#: faq/general.rst:390 msgid "" "Many other aspects of Python make it a good first language. Like Java, " "Python has a large standard library so that students can be assigned " @@ -885,7 +871,7 @@ msgstr "" "réutilisation de code. Les modules tiers tels que PyGame sont aussi très " "utiles pour étendre les compétences des étudiants." -#: faq/general.rst:405 +#: faq/general.rst:399 msgid "" "Python's interactive interpreter enables students to test language features " "while they're programming. They can keep a window with the interpreter " @@ -899,7 +885,7 @@ msgstr "" "souvenir des méthodes pour une liste, ils peuvent faire quelque chose comme " "ça ::" -#: faq/general.rst:434 +#: faq/general.rst:428 msgid "" "With the interpreter, documentation is never far from the student as they " "are programming." @@ -907,7 +893,7 @@ msgstr "" "Avec l'interpréteur, la documentation n'est jamais loin des étudiants quand " "ils travaillent." -#: faq/general.rst:437 +#: faq/general.rst:431 msgid "" "There are also good IDEs for Python. IDLE is a cross-platform IDE for " "Python that is written in Python using Tkinter. PythonWin is a Windows-" @@ -918,16 +904,16 @@ msgid "" "PythonEditors>`_ for a full list of Python editing environments." msgstr "" "Il y a aussi de bons environnements de développement intégrés (EDIs) pour " -"Python. IDLE est un EDI multiplateforme pour Python qui est écrit en Python " +"Python. IDLE est un EDI multiplateformes pour Python qui est écrit en Python " "en utilisant Tkinter. *PythonWin* est un IDE spécifique à Windows. Les " -"utilisateurs d'Emcs seront heureux d'apprendre qu'il y a un très bon mode " +"utilisateurs d'Emacs seront heureux d'apprendre qu'il y a un très bon mode " "Python pour Emacs. Tous ces environnements de développement intégrés " "fournissent la coloration syntaxique, l'auto-indentation, et l'accès à " "l'interpréteur interactif durant le codage. Consultez `le wiki Python " "`_ pour une liste complète des " "environnements de développement intégrés." -#: faq/general.rst:445 +#: faq/general.rst:439 msgid "" "If you want to discuss Python's use in education, you may be interested in " "joining `the edu-sig mailing list `_." + +#~ msgid "" +#~ "You must have a Roundup account to report bugs; this makes it possible " +#~ "for us to contact you if we have follow-up questions. It will also " +#~ "enable Roundup to send you updates as we act on your bug. If you had " +#~ "previously used SourceForge to report bugs to Python, you can obtain your " +#~ "Roundup password through Roundup's `password reset procedure `_." +#~ msgstr "" +#~ "Vous devez avoir un compte Roundup pour reporter des bogues; cela nous " +#~ "permet de vous contacter si nous avons des questions complémentaires. " +#~ "Cela permettra aussi le suivi de traitement de votre bogue. Si vous avez " +#~ "auparavant utilisé SourceForge pour reporter des bogues sur Python, vous " +#~ "pouvez obtenir un mot de passe Roundup grâce à la `procédure de " +#~ "réinitialisation de mot de passe de Roundup `_." diff --git a/faq/gui.po b/faq/gui.po index e2ca4183f6..fd1f550b74 100644 --- a/faq/gui.po +++ b/faq/gui.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-29 16:33+0200\n" -"PO-Revision-Date: 2019-09-04 11:44+0200\n" -"Last-Translator: Zepmanbc \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-12-16 02:34+0100\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.3\n" +"X-Generator: Poedit 3.0\n" #: faq/gui.rst:5 msgid "Graphic User Interface FAQ" @@ -28,34 +28,17 @@ msgid "General GUI Questions" msgstr "Questions générales sur l'interface graphique" #: faq/gui.rst:18 -msgid "What platform-independent GUI toolkits exist for Python?" -msgstr "" -"Quelles bibliothèques d'interfaces graphiques multi-plateformes existent en " -"Python ?" +msgid "What GUI toolkits exist for Python?" +msgstr "Quelles boîtes à outils IUG existent pour Python ?" #: faq/gui.rst:20 msgid "" -"Depending on what platform(s) you are aiming at, there are several. Some of " -"them haven't been ported to Python 3 yet. At least `Tkinter`_ and `Qt`_ are " -"known to be Python 3-compatible." -msgstr "" -"Selon les plateformes que vous comptez utiliser, il en existe plusieurs. " -"Certaines ne sont cependant pas encore disponibles en Python 3. A minima, " -"`Tkinter`_ et `Qt`_ sont connus pour être compatibles avec Python 3." - -#: faq/gui.rst:27 -msgid "Tkinter" -msgstr "*Tkinter*" - -#: faq/gui.rst:29 -msgid "" "Standard builds of Python include an object-oriented interface to the Tcl/Tk " "widget set, called :ref:`tkinter `. This is probably the easiest " "to install (since it comes included with most `binary distributions `_ of Python) and use. For more info about Tk, " "including pointers to the source, see the `Tcl/Tk home page `_. Tcl/Tk is fully portable to the Mac OS X, Windows, and Unix " -"platforms." +"tk>`_. Tcl/Tk is fully portable to the macOS, Windows, and Unix platforms." msgstr "" "Les versions standards de Python incluent une interface orientée objet pour " "le jeu d'objets graphiques *Tcl/Tk*, appelée :ref:`tkinter `. " @@ -63,188 +46,32 @@ msgstr "" "la plupart des `distributions binaires `_ " "de Python) et à utiliser. Pour plus d'informations sur *Tk*, y compris les " "liens vers les sources, voir la page d'accueil `Tcl/Tk `_. *Tcl/Tk* est entièrement portable sur les plates-formes Mac OS X, " +"tk>`_. *Tcl/Tk* est entièrement portable sur les plates-formes macOS, " "Windows et Unix." -#: faq/gui.rst:38 -msgid "wxWidgets" -msgstr "*wxWidgets*" - -#: faq/gui.rst:40 -msgid "" -"wxWidgets (https://www.wxwidgets.org) is a free, portable GUI class library " -"written in C++ that provides a native look and feel on a number of " -"platforms, with Windows, Mac OS X, GTK, X11, all listed as current stable " -"targets. Language bindings are available for a number of languages " -"including Python, Perl, Ruby, etc." -msgstr "" -"`wxWidgets` (https://www.wxwidgets.org) est une librairie de classe IUG " -"portable et gratuite écrite en C++ qui fournit une apparence native sur un " -"certain nombre de plates-formes, elle est notamment en version stable pour " -"Windows, Mac OS X, GTK et X11. Des clients sont disponibles pour un certain " -"nombre de langages, y compris Python, Perl, Ruby, etc." - -#: faq/gui.rst:46 -msgid "" -"`wxPython `_ is the Python binding for wxwidgets. " -"While it often lags slightly behind the official wxWidgets releases, it also " -"offers a number of features via pure Python extensions that are not " -"available in other language bindings. There is an active wxPython user and " -"developer community." -msgstr "" -"`wxPython `_ est le portage Python de *wxWidgets*. " -"Bien qu’il soit légèrement en retard sur les versions officielles de " -"*wxWidgets*, il offre également des fonctionnalités propres à Python qui ne " -"sont pas disponibles pour les clients d'autres langages. *WxPython* dispose " -"de plus, d’une communauté d’utilisateurs et de développeurs active." - -#: faq/gui.rst:52 -msgid "" -"Both wxWidgets and wxPython are free, open source, software with permissive " -"licences that allow their use in commercial products as well as in freeware " -"or shareware." -msgstr "" -"*wxWidgets* et *wxPython* sont tous deux des logiciels libres, open source, " -"avec des licences permissives qui permettent leur utilisation dans des " -"produits commerciaux ainsi que dans des logiciels gratuits ou contributifs " -"(*shareware*)." - -#: faq/gui.rst:58 -msgid "Qt" -msgstr "*Qt*" - -#: faq/gui.rst:60 -msgid "" -"There are bindings available for the Qt toolkit (using either `PyQt `_ or `PySide `_) and for KDE (`PyKDE4 `__). PyQt is currently more mature than PySide, but you must " -"buy a PyQt license from `Riverbank Computing `_ if you want to write proprietary " -"applications. PySide is free for all applications." -msgstr "" -"Il existe des liens disponibles pour la boîte à outils *Qt* (en utilisant " -"soit `PyQt `_ ou `PySide " -"`_) et pour *KDE* (`PyKDE4 `__). *PyQt* est actuellement plus mûre " -"que *PySide*, mais*PyQt* nécessite d'acheter une licence de `Riverbank " -"Computing `_ si " -"vous voulez écrire des applications propriétaires. *PySide* est gratuit " -"pour toutes les applications." - -#: faq/gui.rst:67 -msgid "" -"Qt 4.5 upwards is licensed under the LGPL license; also, commercial licenses " -"are available from `The Qt Company `_." -msgstr "" -"*Qt >= 4.5* est sous licence LGPL ; de plus, des licences commerciales sont " -"disponibles auprès de `The Qt Company `_." - -#: faq/gui.rst:71 -msgid "Gtk+" -msgstr "*Gtk+*" - -#: faq/gui.rst:73 -msgid "" -"The `GObject introspection bindings `_ for Python allow you to write GTK+ 3 applications. There is " -"also a `Python GTK+ 3 Tutorial `_." -msgstr "" -"Les `GObject introspection bindings `_ pour Python vous permettent d'écrire des applications GTK+ 3. " -"Il y a aussi un tutoriel `Python GTK+ 3 `_." - -#: faq/gui.rst:77 -msgid "" -"The older PyGtk bindings for the `Gtk+ 2 toolkit `_ " -"have been implemented by James Henstridge; see ." -msgstr "" -"Les anciennes versions de *PyGtk* pour le `Gtk+ 2 toolkit `_ ont été implémentées par James Henstridge ; voir ." - -#: faq/gui.rst:81 -msgid "Kivy" -msgstr "*Kivy*" - -#: faq/gui.rst:83 -msgid "" -"`Kivy `_ is a cross-platform GUI library supporting both " -"desktop operating systems (Windows, macOS, Linux) and mobile devices " -"(Android, iOS). It is written in Python and Cython, and can use a range of " -"windowing backends." -msgstr "" -"`*Kivy* `_ est une bibliothèque GUI multi-plateformes " -"disponible à la fois sur les systèmes d'exploitation de bureau (Windows, " -"MacOS, Linux) et les appareils mobiles (Android, iOS). Elle est écrite en " -"Python et Cython, et peut utiliser une série de fenêtres de *backends*." - -#: faq/gui.rst:88 -msgid "" -"Kivy is free and open source software distributed under the MIT license." -msgstr "" -"*Kivy* est un logiciel libre et open source distribué sous licence MIT." - -#: faq/gui.rst:91 -msgid "FLTK" -msgstr "*FLTK*" - -#: faq/gui.rst:93 -#, fuzzy -msgid "" -"Python bindings for `the FLTK toolkit `_, a simple yet " -"powerful and mature cross-platform windowing system, are available from `the " -"PyFLTK project `_." -msgstr "" -"Les liaisons Python pour `the FLTK toolkit `_, un " -"système de fenêtrage multi-plateformes simple mais puissant et mûr, sont " -"disponibles auprès de `the PyFLTK project `_." - -#: faq/gui.rst:98 -msgid "OpenGL" -msgstr "*OpenGL*" - -#: faq/gui.rst:100 -msgid "For OpenGL bindings, see `PyOpenGL `_." -msgstr "" -"Pour les clients OpenGL, voir `PyOpenGL `_." - -#: faq/gui.rst:104 -msgid "What platform-specific GUI toolkits exist for Python?" -msgstr "" -"Quelles boîtes à outils IUG spécifiques à la plate-forme existent pour " -"Python ?" - -#: faq/gui.rst:106 +#: faq/gui.rst:28 msgid "" -"By installing the `PyObjc Objective-C bridge `_, Python programs can use Mac OS X's Cocoa libraries." +"Depending on what platform(s) you are aiming at, there are also several " +"alternatives. A `list of cross-platform `_ and `platform-specific `_ GUI " +"frameworks can be found on the python wiki." msgstr "" -"En installant le `PyObjc Objective-C bridge `_, les programmes Python peuvent utiliser les bibliothèques Cocoa de Mac " -"OS X." +"D'autres outils existent. Le choix doit dépendre notamment de la ou des " +"plateformes que vous visez. Sur le Wiki Python se trouvent des listes de " +"bibliothèques graphiques `multiplateformes `_ et `pour une seule plate-forme " +"`_." -#: faq/gui.rst:110 -msgid "" -":ref:`Pythonwin ` by Mark Hammond includes an interface to the " -"Microsoft Foundation Classes and a Python programming environment that's " -"written mostly in Python using the MFC classes." -msgstr "" -":ref:`Pythonwin ` de Mark Hammond inclut une interface vers les " -"classes `Microsoft Foundation Classes` et un environnement de programmation " -"Python qui est écrit principalement en Python utilisant les classes *MFC*." - -#: faq/gui.rst:116 +#: faq/gui.rst:36 msgid "Tkinter questions" msgstr "Questions à propos de *Tkinter*" -#: faq/gui.rst:119 +#: faq/gui.rst:39 msgid "How do I freeze Tkinter applications?" msgstr "Comment puis-je geler (*freezer*) les applications *Tkinter* ?" -#: faq/gui.rst:121 +#: faq/gui.rst:41 msgid "" "Freeze is a tool to create stand-alone applications. When freezing Tkinter " "applications, the applications will not be truly stand-alone, as the " @@ -255,7 +82,7 @@ msgstr "" "autonomes, car l'application aura toujours besoin des bibliothèques Tcl et " "Tk." -#: faq/gui.rst:125 +#: faq/gui.rst:45 msgid "" "One solution is to ship the application with the Tcl and Tk libraries, and " "point to them at run-time using the :envvar:`TCL_LIBRARY` and :envvar:" @@ -265,7 +92,7 @@ msgstr "" "l'application et de les retrouver à l'exécution en utilisant les variables " "d'environnement :envvar:`TCL_LIBRARY` et :envvar:`TK_LIBRARY`." -#: faq/gui.rst:129 +#: faq/gui.rst:49 msgid "" "To get truly stand-alone applications, the Tcl scripts that form the library " "have to be integrated into the application as well. One tool supporting that " @@ -277,7 +104,7 @@ msgstr "" "Un outil supportant cela est *SAM* (modules autonomes), qui fait partie de " "la distribution *Tix* (http://tix.sourceforge.net/)." -#: faq/gui.rst:134 +#: faq/gui.rst:54 msgid "" "Build Tix with SAM enabled, perform the appropriate call to :c:func:" "`Tclsam_init`, etc. inside Python's :file:`Modules/tkappinit.c`, and link " @@ -288,11 +115,11 @@ msgstr "" "et liez avec *libtclsam* et *libtksam* (il est également possible d'inclure " "les bibliothèques *Tix*)." -#: faq/gui.rst:141 +#: faq/gui.rst:61 msgid "Can I have Tk events handled while waiting for I/O?" msgstr "Puis-je modifier des événements *Tk* pendant l'écoute des *E/S* ?" -#: faq/gui.rst:143 +#: faq/gui.rst:63 msgid "" "On platforms other than Windows, yes, and you don't even need threads! But " "you'll have to restructure your I/O code a bit. Tk has the equivalent of " @@ -307,13 +134,13 @@ msgstr "" "appelée par la boucle principale *Tk* lorsque des *E/S* sont disponibles sur " "un descripteur de fichier. Voir :ref:`tkinter-file-handlers`." -#: faq/gui.rst:151 +#: faq/gui.rst:71 msgid "I can't get key bindings to work in Tkinter: why?" msgstr "" "Je n'arrive pas à faire fonctionner les raccourcis clavier dans *Tkinter* : " "pourquoi ?" -#: faq/gui.rst:153 +#: faq/gui.rst:73 msgid "" "An often-heard complaint is that event handlers bound to events with the :" "meth:`bind` method don't get handled even when the appropriate key is " @@ -323,7 +150,7 @@ msgstr "" "évènements avec la méthode :meth:`bind` ne sont pas pris en charge même " "lorsque la touche appropriée est activée." -#: faq/gui.rst:156 +#: faq/gui.rst:76 msgid "" "The most common cause is that the widget to which the binding applies " "doesn't have \"keyboard focus\". Check out the Tk documentation for the " @@ -331,7 +158,175 @@ msgid "" "it (but not for labels; see the takefocus option)." msgstr "" "La cause la plus fréquente est que l'objet graphique auquel s'applique la " -"liaison n'a pas de « focus clavier ». Consultez la documentation *Tk* pour " +"liaison n'a pas de « focus clavier ». Consultez la documentation *Tk* pour " "la commande *focus*. Habituellement, un objet graphique reçoit le focus du " "clavier en cliquant dessus (mais pas pour les étiquettes ; voir l'option " "*takefocus*)." + +#~ msgid "What platform-independent GUI toolkits exist for Python?" +#~ msgstr "" +#~ "Quelles bibliothèques d'interfaces graphiques multi-plateformes existent " +#~ "en Python ?" + +#~ msgid "" +#~ "Depending on what platform(s) you are aiming at, there are several. Some " +#~ "of them haven't been ported to Python 3 yet. At least `Tkinter`_ and " +#~ "`Qt`_ are known to be Python 3-compatible." +#~ msgstr "" +#~ "Selon les plateformes que vous comptez utiliser, il en existe plusieurs. " +#~ "Certaines ne sont cependant pas encore disponibles en Python 3. A minima, " +#~ "`Tkinter`_ et `Qt`_ sont connus pour être compatibles avec Python 3." + +#~ msgid "Tkinter" +#~ msgstr "*Tkinter*" + +#~ msgid "wxWidgets" +#~ msgstr "*wxWidgets*" + +#~ msgid "" +#~ "wxWidgets (https://www.wxwidgets.org) is a free, portable GUI class " +#~ "library written in C++ that provides a native look and feel on a number " +#~ "of platforms, with Windows, Mac OS X, GTK, X11, all listed as current " +#~ "stable targets. Language bindings are available for a number of " +#~ "languages including Python, Perl, Ruby, etc." +#~ msgstr "" +#~ "`wxWidgets` (https://www.wxwidgets.org) est une librairie de classe IUG " +#~ "portable et gratuite écrite en C++ qui fournit une apparence native sur " +#~ "un certain nombre de plates-formes, elle est notamment en version stable " +#~ "pour Windows, Mac OS X, GTK et X11. Des clients sont disponibles pour un " +#~ "certain nombre de langages, y compris Python, Perl, Ruby, etc." + +#~ msgid "" +#~ "`wxPython `_ is the Python binding for " +#~ "wxwidgets. While it often lags slightly behind the official wxWidgets " +#~ "releases, it also offers a number of features via pure Python extensions " +#~ "that are not available in other language bindings. There is an active " +#~ "wxPython user and developer community." +#~ msgstr "" +#~ "`wxPython `_ est le portage Python de " +#~ "*wxWidgets*. Bien qu’il soit légèrement en retard sur les versions " +#~ "officielles de *wxWidgets*, il offre également des fonctionnalités " +#~ "propres à Python qui ne sont pas disponibles pour les clients d'autres " +#~ "langages. *WxPython* dispose de plus, d’une communauté d’utilisateurs et " +#~ "de développeurs active." + +#~ msgid "" +#~ "Both wxWidgets and wxPython are free, open source, software with " +#~ "permissive licences that allow their use in commercial products as well " +#~ "as in freeware or shareware." +#~ msgstr "" +#~ "*wxWidgets* et *wxPython* sont tous deux des logiciels libres, open " +#~ "source, avec des licences permissives qui permettent leur utilisation " +#~ "dans des produits commerciaux ainsi que dans des logiciels gratuits ou " +#~ "contributifs (*shareware*)." + +#~ msgid "Qt" +#~ msgstr "*Qt*" + +#~ msgid "" +#~ "There are bindings available for the Qt toolkit (using either `PyQt " +#~ "`_ or `PySide " +#~ "`_) and for KDE (`PyKDE4 `__). PyQt is currently more mature " +#~ "than PySide, but you must buy a PyQt license from `Riverbank Computing " +#~ "`_ if you want " +#~ "to write proprietary applications. PySide is free for all applications." +#~ msgstr "" +#~ "Il existe des liens disponibles pour la boîte à outils *Qt* (en utilisant " +#~ "soit `PyQt `_ ou " +#~ "`PySide `_) et pour *KDE* (`PyKDE4 `__). *PyQt* est " +#~ "actuellement plus mûre que *PySide*, mais*PyQt* nécessite d'acheter une " +#~ "licence de `Riverbank Computing `_ si vous voulez écrire des applications " +#~ "propriétaires. *PySide* est gratuit pour toutes les applications." + +#~ msgid "" +#~ "Qt 4.5 upwards is licensed under the LGPL license; also, commercial " +#~ "licenses are available from `The Qt Company `_." +#~ msgstr "" +#~ "*Qt >= 4.5* est sous licence LGPL ; de plus, des licences commerciales " +#~ "sont disponibles auprès de `The Qt Company `_." + +#~ msgid "Gtk+" +#~ msgstr "*Gtk+*" + +#~ msgid "" +#~ "The `GObject introspection bindings `_ for Python allow you to write GTK+ 3 applications. There is " +#~ "also a `Python GTK+ 3 Tutorial `_." +#~ msgstr "" +#~ "Les `GObject introspection bindings `_ pour Python vous permettent d'écrire des applications GTK+ " +#~ "3. Il y a aussi un tutoriel `Python GTK+ 3 `_." + +#~ msgid "" +#~ "The older PyGtk bindings for the `Gtk+ 2 toolkit `_ " +#~ "have been implemented by James Henstridge; see ." +#~ msgstr "" +#~ "Les anciennes versions de *PyGtk* pour le `Gtk+ 2 toolkit `_ ont été implémentées par James Henstridge ; voir ." + +#~ msgid "Kivy" +#~ msgstr "*Kivy*" + +#~ msgid "" +#~ "`Kivy `_ is a cross-platform GUI library supporting " +#~ "both desktop operating systems (Windows, macOS, Linux) and mobile devices " +#~ "(Android, iOS). It is written in Python and Cython, and can use a range " +#~ "of windowing backends." +#~ msgstr "" +#~ "`*Kivy* `_ est une bibliothèque GUI multi-plateformes " +#~ "disponible à la fois sur les systèmes d'exploitation de bureau (Windows, " +#~ "MacOS, Linux) et les appareils mobiles (Android, iOS). Elle est écrite " +#~ "en Python et Cython, et peut utiliser une série de fenêtres de *backends*." + +#~ msgid "" +#~ "Kivy is free and open source software distributed under the MIT license." +#~ msgstr "" +#~ "*Kivy* est un logiciel libre et open source distribué sous licence MIT." + +#~ msgid "FLTK" +#~ msgstr "*FLTK*" + +#~ msgid "" +#~ "Python bindings for `the FLTK toolkit `_, a simple " +#~ "yet powerful and mature cross-platform windowing system, are available " +#~ "from `the PyFLTK project `_." +#~ msgstr "" +#~ "Les liaisons Python pour `the FLTK toolkit `_, un " +#~ "système de fenêtrage multi-plateformes simple mais puissant et mûr, sont " +#~ "disponibles auprès de `the PyFLTK project `_." + +#~ msgid "OpenGL" +#~ msgstr "*OpenGL*" + +#~ msgid "" +#~ "For OpenGL bindings, see `PyOpenGL `_." +#~ msgstr "" +#~ "Pour les clients OpenGL, voir `PyOpenGL `_." + +#~ msgid "" +#~ "By installing the `PyObjc Objective-C bridge `_, Python programs can use Mac OS X's Cocoa libraries." +#~ msgstr "" +#~ "En installant le `PyObjc Objective-C bridge `_, les programmes Python peuvent utiliser les bibliothèques " +#~ "Cocoa de Mac OS X." + +#~ msgid "" +#~ ":ref:`Pythonwin ` by Mark Hammond includes an interface to " +#~ "the Microsoft Foundation Classes and a Python programming environment " +#~ "that's written mostly in Python using the MFC classes." +#~ msgstr "" +#~ ":ref:`Pythonwin ` de Mark Hammond inclut une interface vers " +#~ "les classes `Microsoft Foundation Classes` et un environnement de " +#~ "programmation Python qui est écrit principalement en Python utilisant les " +#~ "classes *MFC*." diff --git a/faq/installed.po b/faq/installed.po index 5e2e4c400d..c3e180b561 100644 --- a/faq/installed.po +++ b/faq/installed.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2018-10-04 16:57+0200\n" -"Last-Translator: Julien Palard \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-10-17 18:51+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.1.1\n" +"X-Generator: Poedit 3.0\n" #: faq/installed.rst:3 msgid "\"Why is Python Installed on my Computer?\" FAQ" @@ -93,12 +93,12 @@ msgstr "" #: faq/installed.rst:32 msgid "" -"Many Unix-compatible operating systems, such as Mac OS X and some Linux " +"Many Unix-compatible operating systems, such as macOS and some Linux " "distributions, have Python installed by default; it's included in the base " "installation." msgstr "" -"Python est installé par défaut et à l'installation par de nombreux systèmes " -"Unix, comme Mac OS X et certaines distributions Linux." +"Python est installé par défaut sur de nombreux systèmes compatibles Unix, " +"comme macOS et certaines distributions Linux." #: faq/installed.rst:38 msgid "Can I delete Python?" diff --git a/faq/library.po b/faq/library.po index ec75211d29..f1c8fbde60 100644 --- a/faq/library.po +++ b/faq/library.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2020-11-07 16:04+0100\n" -"Last-Translator: Mindiell \n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2021-12-06 20:15+0100\n" +"Last-Translator: Fipaddict \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.1\n" +"X-Generator: Poedit 3.0\n" #: faq/library.rst:5 msgid "Library and Extension FAQ" @@ -30,7 +30,7 @@ msgstr "Questions générales sur la bibliothèque" #: faq/library.rst:15 msgid "How do I find a module or application to perform task X?" msgstr "" -"Comment trouver un module ou une application pour effectuer la tâche X ?" +"Comment trouver un module ou une application pour effectuer la tâche X ?" #: faq/library.rst:17 msgid "" @@ -45,7 +45,7 @@ msgstr "" #: faq/library.rst:21 msgid "" "For third-party packages, search the `Python Package Index `_ or try `Google `_ or another Web search " +"org>`_ or try `Google `_ or another web search " "engine. Searching for \"Python\" plus a keyword or two for your topic of " "interest will usually find something helpful." msgstr "" @@ -96,12 +96,12 @@ msgid "" "modules written in C and linked with the interpreter; to get a list of " "these, type::" msgstr "" -"les modules écrits en C et liés à l'interpréteur ; pour obtenir leur liste, " +"les modules écrits en C et liés à l'interpréteur ; pour obtenir leur liste, " "entrez ::" #: faq/library.rst:47 msgid "How do I make a Python script executable on Unix?" -msgstr "Comment rendre un script Python exécutable sous Unix ?" +msgstr "Comment rendre un script Python exécutable sous Unix ?" #: faq/library.rst:49 msgid "" @@ -127,7 +127,7 @@ msgid "" "to write ::" msgstr "" "Il y a plusieurs façons de remplir la seconde. La plus simple consiste à " -"écrire au tout début du fichier ::" +"écrire au tout début du fichier ::" #: faq/library.rst:61 msgid "" @@ -165,7 +165,7 @@ msgid "" "try the following hack (due to Alex Rezinsky):" msgstr "" "Il peut arriver que l'environnement d'un utilisateur soit si chargé que le " -"programme :program:`/usr/bin/env` échoue ; ou que le programme *env* " +"programme :program:`/usr/bin/env` échoue ; ou que le programme *env* " "n'existe pas du tout. Dans ce cas, vous pouvez utiliser l'astuce suivante, " "élaborée par Alex Rezinsky :" @@ -175,11 +175,11 @@ msgid "" "However, you can fix that by adding ::" msgstr "" "Le léger inconvénient est que cela définit la variable *__doc__* du script. " -"Cependant, il est possible de corriger cela en ajoutant ::" +"Cependant, il est possible de corriger cela en ajoutant ::" #: faq/library.rst:94 msgid "Is there a curses/termcap package for Python?" -msgstr "Existe-t'il un module *curse* ou *termcap* en Python ?" +msgstr "Existe-t-il un module *curses* ou *termcap* en Python ?" #: faq/library.rst:98 msgid "" @@ -188,7 +188,7 @@ msgid "" "compiled by default. (Note that this is not available in the Windows " "distribution -- there is no curses module for Windows.)" msgstr "" -"Pour les dérivés d'Unix : la distribution standard de Python contient un " +"Pour les dérivés d'Unix : la distribution standard de Python contient un " "module *curses* dans le sous-dossier :source:`Modules`, bien qu'il ne soit " "pas compilé par défaut. Il n'est pas disponible en Windows — le module " "*curses* n'existant pas en Windows." @@ -210,19 +210,11 @@ msgstr "" "qui n'ont que le *curses* de BSD mais, de nos jours, de tels systèmes " "d'exploitation ne semblent plus exister ou être maintenus." -#: faq/library.rst:109 -msgid "" -"For Windows: use `the consolelib module `_." -msgstr "" -"Pour Windows : utilisez le module `consolelib `_." - -#: faq/library.rst:114 +#: faq/library.rst:111 msgid "Is there an equivalent to C's onexit() in Python?" -msgstr "Existe-t'il un équivalent à la fonction C ``onexit()`` en Python ?" +msgstr "Existe-t-il un équivalent à la fonction C ``onexit()`` en Python ?" -#: faq/library.rst:116 +#: faq/library.rst:113 msgid "" "The :mod:`atexit` module provides a register function that is similar to " "C's :c:func:`onexit`." @@ -230,31 +222,31 @@ msgstr "" "Le module :mod:`atexit` fournit une fonction d'enregistrement similaire à la " "fonction C :c:func:`onexit`." -#: faq/library.rst:121 +#: faq/library.rst:118 msgid "Why don't my signal handlers work?" -msgstr "Pourquoi mes gestionnaires de signaux ne fonctionnent-t'ils pas ?" +msgstr "Pourquoi mes gestionnaires de signaux ne fonctionnent-ils pas ?" -#: faq/library.rst:123 +#: faq/library.rst:120 msgid "" "The most common problem is that the signal handler is declared with the " "wrong argument list. It is called as ::" msgstr "" "Le problème le plus courant est d'appeler le gestionnaire de signaux avec " -"les mauvais arguments. Un gestionnaire est appelé de la façon suivante ::" +"les mauvais arguments. Un gestionnaire est appelé de la façon suivante ::" -#: faq/library.rst:128 +#: faq/library.rst:125 msgid "so it should be declared with two parameters::" msgstr "donc il doit être déclaré avec deux paramètres ::" -#: faq/library.rst:135 +#: faq/library.rst:132 msgid "Common tasks" msgstr "Tâches fréquentes" -#: faq/library.rst:138 +#: faq/library.rst:135 msgid "How do I test a Python program or component?" -msgstr "Comment tester un programme ou un composant Python ?" +msgstr "Comment tester un programme ou un composant Python ?" -#: faq/library.rst:140 +#: faq/library.rst:137 msgid "" "Python comes with two testing frameworks. The :mod:`doctest` module finds " "examples in the docstrings for a module and runs them, comparing the output " @@ -264,7 +256,7 @@ msgstr "" "exemples dans les *docstrings* d'un module et les exécute. Il compare alors " "la sortie avec la sortie attendue, telle que définie dans la *docstring*." -#: faq/library.rst:144 +#: faq/library.rst:141 msgid "" "The :mod:`unittest` module is a fancier testing framework modelled on Java " "and Smalltalk testing frameworks." @@ -272,7 +264,7 @@ msgstr "" "Le module :mod:`unittest` est un cadriciel un peu plus élaboré basé sur les " "cadriciels de test de Java et de Smalltalk." -#: faq/library.rst:147 +#: faq/library.rst:144 msgid "" "To make testing easier, you should use good modular design in your program. " "Your program should have almost all functionality encapsulated in either " @@ -291,16 +283,16 @@ msgstr "" "manipuler des variables globales, car ceci rend le test beaucoup plus " "difficile." -#: faq/library.rst:155 +#: faq/library.rst:152 msgid "The \"global main logic\" of your program may be as simple as ::" msgstr "" -"La « logique générale » d'un programme devrait être aussi simple que ::" +"La « logique générale » d'un programme devrait être aussi simple que ::" -#: faq/library.rst:160 +#: faq/library.rst:157 msgid "at the bottom of the main module of your program." msgstr "à la fin du module principal du programme." -#: faq/library.rst:162 +#: faq/library.rst:159 msgid "" "Once your program is organized as a tractable collection of function and " "class behaviours, you should write test functions that exercise the " @@ -322,7 +314,7 @@ msgstr "" "amusant, car ceci permet de trouver des bogues, voire des défauts de " "conception, plus facilement." -#: faq/library.rst:170 +#: faq/library.rst:167 msgid "" "\"Support modules\" that are not intended to be the main module of a program " "may include a self-test of the module. ::" @@ -330,7 +322,7 @@ msgstr "" "Les « modules auxiliaires » qui n'ont pas vocation à être le module " "principal du programme peuvent inclure un test pour se vérifier eux-mêmes. ::" -#: faq/library.rst:176 +#: faq/library.rst:173 msgid "" "Even programs that interact with complex external interfaces may be tested " "when the external interfaces are unavailable by using \"fake\" interfaces " @@ -340,11 +332,11 @@ msgstr "" "peuvent être testés même quand ces interfaces ne sont pas disponibles, en " "utilisant des interfaces « simulacres » implémentées en Python." -#: faq/library.rst:182 +#: faq/library.rst:179 msgid "How do I create documentation from doc strings?" -msgstr "Comment générer la documentation à partir des *docstrings* ?" +msgstr "Comment générer la documentation à partir des *docstrings* ?" -#: faq/library.rst:184 +#: faq/library.rst:181 msgid "" "The :mod:`pydoc` module can create HTML from the doc strings in your Python " "source code. An alternative for creating API documentation purely from " @@ -357,11 +349,11 @@ msgstr "" ">`_. `Sphinx `_ peut également inclure du contenu " "provenant de *docstrings*." -#: faq/library.rst:191 +#: faq/library.rst:188 msgid "How do I get a single keypress at a time?" -msgstr "Comment détecter qu'une touche est pressée ?" +msgstr "Comment détecter qu'une touche est pressée ?" -#: faq/library.rst:193 +#: faq/library.rst:190 msgid "" "For Unix variants there are several solutions. It's straightforward to do " "this using curses, but curses is a fairly large module to learn." @@ -370,15 +362,15 @@ msgstr "" "en utilisant le module *curses*, mais *curses* est un module assez " "conséquent à apprendre." -#: faq/library.rst:237 +#: faq/library.rst:234 msgid "Threads" msgstr "Fils d'exécution" -#: faq/library.rst:240 +#: faq/library.rst:237 msgid "How do I program using threads?" -msgstr "Comment programmer avec des fils d'exécution ?" +msgstr "Comment programmer avec des fils d'exécution ?" -#: faq/library.rst:242 +#: faq/library.rst:239 msgid "" "Be sure to use the :mod:`threading` module and not the :mod:`_thread` " "module. The :mod:`threading` module builds convenient abstractions on top of " @@ -388,19 +380,11 @@ msgstr "" "`_thread`. Le module :mod:`threading` fournit une abstraction plus facile à " "manipuler que les primitives de bas-niveau du module :mod:`_thread`." -#: faq/library.rst:246 -msgid "" -"Aahz has a set of slides from his threading tutorial that are helpful; see " -"http://www.pythoncraft.com/OSCON2001/." -msgstr "" -"Un ensemble de diapositives issues du didacticiel de Aahz sur les fils " -"d'exécution est disponible à http://www.pythoncraft.com/OSCON2001/." - -#: faq/library.rst:251 +#: faq/library.rst:245 msgid "None of my threads seem to run: why?" -msgstr "Aucun de mes fils ne semble s'exécuter : pourquoi ?" +msgstr "Aucun de mes fils ne semble s'exécuter : pourquoi ?" -#: faq/library.rst:253 +#: faq/library.rst:247 msgid "" "As soon as the main thread exits, all threads are killed. Your main thread " "is running too quickly, giving the threads no time to do any work." @@ -409,7 +393,7 @@ msgstr "" "fil principal s'exécute trop rapidement, sans laisser le temps aux autres " "fils de faire quoi que ce soit." -#: faq/library.rst:256 +#: faq/library.rst:250 msgid "" "A simple fix is to add a sleep to the end of the program that's long enough " "for all the threads to finish::" @@ -417,7 +401,7 @@ msgstr "" "Une correction simple consiste à ajouter un temps d'attente suffisamment " "long à la fin du programme pour que tous les fils puissent se terminer ::" -#: faq/library.rst:271 +#: faq/library.rst:265 msgid "" "But now (on many platforms) the threads don't run in parallel, but appear to " "run sequentially, one at a time! The reason is that the OS thread scheduler " @@ -425,16 +409,16 @@ msgid "" msgstr "" "Mais à présent, sur beaucoup de plates-formes, les fils ne s'exécutent pas " "en parallèle, mais semblent s'exécuter de manière séquentielle, l'un après " -"l'autre ! En réalité, l'ordonnanceur de fils du système d'exploitation ne " +"l'autre ! En réalité, l'ordonnanceur de fils du système d'exploitation ne " "démarre pas de nouveau fil avant que le précédent ne soit bloqué." -#: faq/library.rst:275 +#: faq/library.rst:269 msgid "A simple fix is to add a tiny sleep to the start of the run function::" msgstr "" "Une correction simple consiste à ajouter un petit temps d'attente au début " "de la fonction ::" -#: faq/library.rst:288 +#: faq/library.rst:282 msgid "" "Instead of trying to guess a good delay value for :func:`time.sleep`, it's " "better to use some kind of semaphore mechanism. One idea is to use the :mod:" @@ -449,13 +433,13 @@ msgstr "" "quand il se termine, et que le fil principal retire autant de jetons de la " "file qu'il y a de fils." -#: faq/library.rst:296 +#: faq/library.rst:290 msgid "How do I parcel out work among a bunch of worker threads?" msgstr "" "Comment découper et répartir une tâche au sein d'un ensemble de fils " -"d'exécutions ?" +"d'exécutions ?" -#: faq/library.rst:298 +#: faq/library.rst:292 msgid "" "The easiest way is to use the :mod:`concurrent.futures` module, especially " "the :mod:`~concurrent.futures.ThreadPoolExecutor` class." @@ -464,7 +448,7 @@ msgstr "" "futures`, en particulier la classe :mod:`~concurrent.futures." "ThreadPoolExecutor`." -#: faq/library.rst:301 +#: faq/library.rst:295 msgid "" "Or, if you want fine control over the dispatching algorithm, you can write " "your own logic manually. Use the :mod:`queue` module to create a queue " @@ -481,15 +465,15 @@ msgstr "" "pour les récupérer. La classe s'occupe de gérer les verrous pour que chaque " "tâche soit exécutée une et une seule fois." -#: faq/library.rst:308 +#: faq/library.rst:302 msgid "Here's a trivial example::" msgstr "Voici un exemple trivial ::" -#: faq/library.rst:346 +#: faq/library.rst:340 msgid "When run, this will produce the following output:" -msgstr "Quand celui-ci est exécuté, il produit la sortie suivante :" +msgstr "Quand celui-ci est exécuté, il produit la sortie suivante :" -#: faq/library.rst:364 +#: faq/library.rst:358 msgid "" "Consult the module's documentation for more details; the :class:`~queue." "Queue` class provides a featureful interface." @@ -497,13 +481,13 @@ msgstr "" "Consultez la documentation du module pour plus de détails ; la classe :class:" "`~queue.Queue` fournit une interface pleine de fonctionnalités." -#: faq/library.rst:369 +#: faq/library.rst:363 msgid "What kinds of global value mutation are thread-safe?" msgstr "" "Quels types de mutations sur des variables globales sont compatibles avec " "les programmes à fils d'exécution multiples ? sécurisé ?" -#: faq/library.rst:371 +#: faq/library.rst:365 msgid "" "A :term:`global interpreter lock` (GIL) is used internally to ensure that " "only one thread runs in the Python VM at a time. In general, Python offers " @@ -516,12 +500,12 @@ msgstr "" "pour *global interpreter lock*) est utilisé en interne pour s'assurer que la " "machine virtuelle Python (MVP) n'exécute qu'un seul fil à la fois. De " "manière générale, Python ne change de fil qu'entre les instructions du code " -"intermédiaire ; :func:`sys.setswitchinterval` permet de contrôler la " +"intermédiaire ; :func:`sys.setswitchinterval` permet de contrôler la " "fréquence de bascule entre les fils. Chaque instruction du code " "intermédiaire, et, par conséquent, tout le code C appelé par cette " "instruction est donc atomique du point de vue d'un programme Python." -#: faq/library.rst:378 +#: faq/library.rst:372 msgid "" "In theory, this means an exact accounting requires an exact understanding of " "the PVM bytecode implementation. In practice, it means that operations on " @@ -531,10 +515,10 @@ msgstr "" "En théorie, cela veut dire qu'un décompte exact nécessite une connaissance " "parfaite de l'implémentation de la MVP. En pratique, cela veut dire que les " "opérations sur des variables partagées de type natif (les entier, les " -"listes, les dictionnaires etc.) qui « semblent atomiques » le sont " +"listes, les dictionnaires, etc.) qui « semblent atomiques » le sont " "réellement." -#: faq/library.rst:383 +#: faq/library.rst:377 msgid "" "For example, the following operations are all atomic (L, L1, L2 are lists, " "D, D1, D2 are dicts, x, y are objects, i, j are ints)::" @@ -543,11 +527,11 @@ msgstr "" "*L2* sont des listes, *D*, *D1* et *D2* sont des dictionnaires, *x* et *y* " "sont des objets, *i* et *j* des entiers) ::" -#: faq/library.rst:398 +#: faq/library.rst:392 msgid "These aren't::" msgstr "Les suivantes ne le sont pas ::" -#: faq/library.rst:405 +#: faq/library.rst:399 msgid "" "Operations that replace other objects may invoke those other objects' :meth:" "`__del__` method when their reference count reaches zero, and that can " @@ -557,14 +541,14 @@ msgstr "" "Les opérations qui remplacent d'autres objets peuvent invoquer la méthode :" "meth:`__del__` de ces objets quand leur compteur de référence passe à zéro, " "et cela peut avoir de l'impact. C'est tout particulièrement vrai pour les " -"des changements massifs sur des dictionnaires ou des listes. En cas de " -"doute, il vaut mieux utiliser un mutex." +"changements massifs sur des dictionnaires ou des listes. En cas de doute, il " +"vaut mieux utiliser un mutex !" -#: faq/library.rst:412 +#: faq/library.rst:406 msgid "Can't we get rid of the Global Interpreter Lock?" -msgstr "Pourquoi ne pas se débarrasser du verrou global de l'interpréteur ?" +msgstr "Pourquoi ne pas se débarrasser du verrou global de l'interpréteur ?" -#: faq/library.rst:416 +#: faq/library.rst:410 msgid "" "The :term:`global interpreter lock` (GIL) is often seen as a hindrance to " "Python's deployment on high-end multiprocessor server machines, because a " @@ -578,7 +562,7 @@ msgstr "" "Presque tout le code Python ne peut en effet être exécuté qu'avec le GIL " "acquis." -#: faq/library.rst:421 +#: faq/library.rst:415 msgid "" "Back in the days of Python 1.5, Greg Stein actually implemented a " "comprehensive patch set (the \"free threading\" patches) that removed the " @@ -594,11 +578,11 @@ msgstr "" "le GIL par des verrous plus granulaires. Adam Olsen a conduit une expérience " "similaire dans son projet `python-safethread `_. Malheureusement, ces deux tentatives ont " -"induit une baisse significative (d'au moins 30%) des performances du code à " +"induit une baisse significative (d'au moins 30 %) des performances du code à " "un seul fil d'exécution, à cause de la quantité de verrouillage plus " "granulaire nécessaire pour contrebalancer la suppression du GIL." -#: faq/library.rst:429 +#: faq/library.rst:423 msgid "" "This doesn't mean that you can't make good use of Python on multi-CPU " "machines! You just have to be creative with dividing the work up between " @@ -609,14 +593,14 @@ msgid "" "dispatching of tasks." msgstr "" "Cela ne signifie pas qu'il est impossible de tirer profit de Python sur des " -"machines à plusieurs cœurs ! Il faut seulement être malin et diviser le " +"machines à plusieurs cœurs ! Il faut seulement être malin et diviser le " "travail à faire entre plusieurs *processus* plutôt qu'entre plusieurs *fils " "d'exécution*. La classe :class:`~concurrent.futures.ProcessPoolExecutor` du " -"nouveau module :mod:`concurrent.futures` permet de faire cela facilement ; " +"nouveau module :mod:`concurrent.futures` permet de faire cela facilement ; " "le module :mod:`multiprocessing` fournit une API de plus bas-niveau pour un " "meilleur contrôle sur la distribution des tâches." -#: faq/library.rst:437 +#: faq/library.rst:431 msgid "" "Judicious use of C extensions will also help; if you use a C extension to " "perform a time-consuming task, the extension can release the GIL while the " @@ -630,7 +614,7 @@ msgstr "" "fils travailler. Des modules de la bibliothèque standard comme :mod:`zlib` " "ou :mod:`hashlib` utilisent cette technique." -#: faq/library.rst:443 +#: faq/library.rst:437 msgid "" "It has been suggested that the GIL should be a per-interpreter-state lock " "rather than truly global; interpreters then wouldn't be able to share " @@ -651,7 +635,7 @@ msgstr "" "ont leur propre liste de suppression, ces listes devraient être déplacées au " "niveau de l'interpréteur et ainsi de suite." -#: faq/library.rst:452 +#: faq/library.rst:446 msgid "" "And I doubt that it can even be done in finite time, because the same " "problem exists for 3rd party extensions. It is likely that 3rd party " @@ -663,24 +647,24 @@ msgstr "" "qu'il ne soit possible de les corriger pour les faire stocker leur état au " "niveau de l'interpréteur et non plus au niveau global." -#: faq/library.rst:457 +#: faq/library.rst:451 msgid "" "And finally, once you have multiple interpreters not sharing any state, what " "have you gained over running each interpreter in a separate process?" msgstr "" -"Et enfin, quel intérêt y-a t'il à avoir plusieurs interpréteurs qui ne " +"Et enfin, quel intérêt y a-t-il à avoir plusieurs interpréteurs qui ne " "partagent pas d'état, par rapport à faire tourner chaque interpréteur dans " -"un processus différent ?" +"un processus différent ?" -#: faq/library.rst:462 +#: faq/library.rst:456 msgid "Input and Output" msgstr "Les entrées/sorties" -#: faq/library.rst:465 +#: faq/library.rst:459 msgid "How do I delete a file? (And other file questions...)" -msgstr "Comment supprimer un fichier ? (et autres questions sur les fichiers…)" +msgstr "Comment supprimer un fichier ? (et autres questions sur les fichiers…)" -#: faq/library.rst:467 +#: faq/library.rst:461 msgid "" "Use ``os.remove(filename)`` or ``os.unlink(filename)``; for documentation, " "see the :mod:`os` module. The two functions are identical; :func:`~os." @@ -691,7 +675,7 @@ msgstr "" "identiques, :func:`~os.unlink` n'est tout simplement que le nom de l'appel " "système à cette fonction sous Unix." -#: faq/library.rst:471 +#: faq/library.rst:465 msgid "" "To remove a directory, use :func:`os.rmdir`; use :func:`os.mkdir` to create " "one. ``os.makedirs(path)`` will create any intermediate directories in " @@ -705,12 +689,12 @@ msgstr "" "supprime les dossiers intermédiaires si ceux-ci sont vides. Pour supprimer " "une arborescence et tout son contenu, utilisez :func:`shutil.rmtree`." -#: faq/library.rst:477 +#: faq/library.rst:471 msgid "To rename a file, use ``os.rename(old_path, new_path)``." msgstr "" "``os.rename(ancien_chemin, nouveau_chemin)`` permet de renommer un fichier." -#: faq/library.rst:479 +#: faq/library.rst:473 msgid "" "To truncate a file, open it using ``f = open(filename, \"rb+\")``, and use " "``f.truncate(offset)``; offset defaults to the current seek position. " @@ -723,7 +707,7 @@ msgstr "" "existe aussi ``os.ftruncate(df, décalage)`` pour les fichiers ouverts avec :" "func:`os.open`, où *df* est le descripteur de fichier (un entier court)." -#: faq/library.rst:484 +#: faq/library.rst:478 msgid "" "The :mod:`shutil` module also contains a number of functions to work on " "files including :func:`~shutil.copyfile`, :func:`~shutil.copytree`, and :" @@ -733,11 +717,11 @@ msgstr "" "effectuer des opérations sur des fichiers comme :func:`~shutil.copyfile`, :" "func:`~shutil.copytree` et :func:`~shutil.rmtree`." -#: faq/library.rst:490 +#: faq/library.rst:484 msgid "How do I copy a file?" -msgstr "Comment copier un fichier ?" +msgstr "Comment copier un fichier ?" -#: faq/library.rst:492 +#: faq/library.rst:486 msgid "" "The :mod:`shutil` module contains a :func:`~shutil.copyfile` function. Note " "that on MacOS 9 it doesn't copy the resource fork and Finder info." @@ -746,11 +730,11 @@ msgstr "" "MacOS 9, celle-ci ne copie pas le clonage de ressources ni les informations " "du chercheur." -#: faq/library.rst:497 +#: faq/library.rst:491 msgid "How do I read (or write) binary data?" -msgstr "Comment lire (ou écrire) des données binaires ?" +msgstr "Comment lire (ou écrire) des données binaires ?" -#: faq/library.rst:499 +#: faq/library.rst:493 msgid "" "To read or write complex binary data formats, it's best to use the :mod:" "`struct` module. It allows you to take a string containing binary data " @@ -761,7 +745,7 @@ msgstr "" "une chaîne de caractères qui contient des données binaires, souvent des " "nombres, en objets Python, et vice-versa." -#: faq/library.rst:503 +#: faq/library.rst:497 msgid "" "For example, the following code reads two 2-byte integers and one 4-byte " "integer in big-endian format from a file::" @@ -769,7 +753,7 @@ msgstr "" "Par exemple, le code suivant lit, depuis un fichier, deux entiers codés sur " "2 octets et un entier codé sur 4 octets, en format gros-boutiste ::" -#: faq/library.rst:512 +#: faq/library.rst:506 msgid "" "The '>' in the format string forces big-endian data; the letter 'h' reads " "one \"short integer\" (2 bytes), and 'l' reads one \"long integer\" (4 " @@ -779,7 +763,7 @@ msgstr "" "mode gros-boutiste, la lettre « h » indique un entier court (2 octets) et la " "lettre « l » indique un entier long (4 octets)." -#: faq/library.rst:516 +#: faq/library.rst:510 msgid "" "For data that is more regular (e.g. a homogeneous list of ints or floats), " "you can also use the :mod:`array` module." @@ -788,7 +772,7 @@ msgstr "" "nombres à virgule flottante), il est possible d'utiliser le module :mod:" "`array`." -#: faq/library.rst:521 +#: faq/library.rst:515 msgid "" "To read and write binary data, it is mandatory to open the file in binary " "mode (here, passing ``\"rb\"`` to :func:`open`). If you use ``\"r\"`` " @@ -801,13 +785,13 @@ msgstr "" "en mode textuel et ``f.read()`` renvoie des objets :class:`str` au lieu " "d'objets :class:`bytes`." -#: faq/library.rst:529 +#: faq/library.rst:523 msgid "I can't seem to use os.read() on a pipe created with os.popen(); why?" msgstr "" "Il me semble impossible d'utiliser ``os.read()`` sur un tube créé avec ``os." -"popen()`` ; pourquoi ?" +"popen()`` ; pourquoi ?" -#: faq/library.rst:531 +#: faq/library.rst:525 msgid "" ":func:`os.read` is a low-level function which takes a file descriptor, a " "small integer representing the opened file. :func:`os.popen` creates a high-" @@ -822,34 +806,34 @@ msgstr "" "octets d'un tube *p* créé avec :func:`os.popen`, il faut utiliser ``p." "read(n)``." -#: faq/library.rst:618 +#: faq/library.rst:612 msgid "How do I access the serial (RS232) port?" -msgstr "Comment accéder au port de transmission en série (RS-232) ?" +msgstr "Comment accéder au port de transmission en série (RS-232) ?" -#: faq/library.rst:620 -msgid "For Win32, POSIX (Linux, BSD, etc.), Jython:" -msgstr "Pour Win32, POSIX (Linux, BSD, etc.) et Jython :" +#: faq/library.rst:614 +msgid "For Win32, OSX, Linux, BSD, Jython, IronPython:" +msgstr "Pour Win32, OSX, Linux, BSD, Jython et IronPython :" -#: faq/library.rst:622 -msgid "http://pyserial.sourceforge.net" -msgstr "http://pyserial.sourceforge.net" +#: faq/library.rst:616 +msgid "https://pypi.org/project/pyserial/" +msgstr "https://pypi.org/project/pyserial/" -#: faq/library.rst:624 +#: faq/library.rst:618 msgid "For Unix, see a Usenet post by Mitch Chapman:" msgstr "" "Pour Unix, référez-vous à une publication sur Usenet de Mitch Chapman :" -#: faq/library.rst:626 +#: faq/library.rst:620 msgid "https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com" msgstr "https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com" -#: faq/library.rst:630 +#: faq/library.rst:624 msgid "Why doesn't closing sys.stdout (stdin, stderr) really close it?" msgstr "" "Pourquoi fermer *sys.stdout*, *sys.stdin*, *sys.stderr* ne les ferme pas " -"réellement ?" +"réellement ?" -#: faq/library.rst:632 +#: faq/library.rst:626 msgid "" "Python :term:`file objects ` are a high-level layer of " "abstraction on low-level C file descriptors." @@ -857,7 +841,7 @@ msgstr "" "Les :term:`objets fichiers ` en Python sont des abstractions de " "haut niveau sur les descripteurs de fichier C de bas niveau." -#: faq/library.rst:635 +#: faq/library.rst:629 msgid "" "For most file objects you create in Python via the built-in :func:`open` " "function, ``f.close()`` marks the Python file object as being closed from " @@ -871,7 +855,7 @@ msgstr "" "enclenché automatiquement dans le destructeur de ``f``, lorsque ``f`` est " "recyclé." -#: faq/library.rst:641 +#: faq/library.rst:635 msgid "" "But stdin, stdout and stderr are treated specially by Python, because of the " "special status also given to them by C. Running ``sys.stdout.close()`` " @@ -879,11 +863,11 @@ msgid "" "associated C file descriptor." msgstr "" "Mais *stdin*, *stdout* et *stderr* ont droit à un traitement spécial en " -"Python, car leur statut en C est lui-aussi spécial. Exécuter ``sys.stdout." +"Python, car leur statut en C est lui aussi spécial. Exécuter ``sys.stdout." "close()`` marque l'objet fichier comme fermé du point de vue de Python, mais " "le descripteur de fichier C associé n'est *pas* fermé." -#: faq/library.rst:646 +#: faq/library.rst:640 msgid "" "To close the underlying C file descriptor for one of these three, you should " "first be sure that's what you really want to do (e.g., you may confuse " @@ -894,21 +878,21 @@ msgstr "" "exemple, perturber le bon fonctionnement de modules qui font des opérations " "d'entrée-sortie). Si c'est le cas, utilisez :func:`os.close` ::" -#: faq/library.rst:654 +#: faq/library.rst:648 msgid "Or you can use the numeric constants 0, 1 and 2, respectively." msgstr "" "Il est aussi possible de fermer respectivement les constantes numériques 0, " "1 ou 2." -#: faq/library.rst:658 +#: faq/library.rst:652 msgid "Network/Internet Programming" msgstr "Programmation réseau et Internet" -#: faq/library.rst:661 +#: faq/library.rst:655 msgid "What WWW tools are there for Python?" -msgstr "Quels sont les outils Python dédiés à la Toile ?" +msgstr "Quels sont les outils Python dédiés à la Toile ?" -#: faq/library.rst:663 +#: faq/library.rst:657 msgid "" "See the chapters titled :ref:`internet` and :ref:`netdata` in the Library " "Reference Manual. Python has many modules that will help you build server-" @@ -918,7 +902,7 @@ msgstr "" "le manuel de référence de la bibliothèque. Python a de nombreux modules pour " "construire des applications de Toile côté client comme côté serveur." -#: faq/library.rst:669 +#: faq/library.rst:663 msgid "" "A summary of available frameworks is maintained by Paul Boddie at https://" "wiki.python.org/moin/WebProgramming\\ ." @@ -926,7 +910,7 @@ msgstr "" "Un résumé des cadriciels disponibles est maintenu par Paul Boddie à " "l'adresse https://wiki.python.org/moin/WebProgramming\\ ." -#: faq/library.rst:672 +#: faq/library.rst:666 msgid "" "Cameron Laird maintains a useful set of pages about Python web technologies " "at http://phaseit.net/claird/comp.lang.python/web_python." @@ -935,42 +919,42 @@ msgstr "" "technologies Python dédiées à la Toile à l'adresse http://phaseit.net/claird/" "comp.lang.python/web_python." -#: faq/library.rst:677 +#: faq/library.rst:671 msgid "How can I mimic CGI form submission (METHOD=POST)?" msgstr "Comment reproduire un envoi de formulaire CGI (``METHOD=POST``) ?" -#: faq/library.rst:679 +#: faq/library.rst:673 msgid "" "I would like to retrieve web pages that are the result of POSTing a form. Is " "there existing code that would let me do this easily?" msgstr "" "J'aimerais récupérer la page de retour d'un envoi de formulaire sur la " -"Toile. Existe-t'il déjà du code qui pourrait m'aider à le faire facilement ?" +"Toile. Existe-t-il déjà du code qui pourrait m'aider à le faire facilement ?" -#: faq/library.rst:682 +#: faq/library.rst:676 msgid "Yes. Here's a simple example that uses :mod:`urllib.request`::" msgstr "Oui. Voici un exemple simple d'utilisation de :mod:`urllib.request` ::" -#: faq/library.rst:697 +#: faq/library.rst:691 msgid "" "Note that in general for percent-encoded POST operations, query strings must " "be quoted using :func:`urllib.parse.urlencode`. For example, to send " "``name=Guy Steele, Jr.``::" msgstr "" "Remarquez qu'en général, la chaîne de caractères d'une requête POST encodée " -"avec des des signes « % » doit être mise entre guillemets à l'aide de :func:" +"avec des signes « % » doit être mise entre guillemets à l'aide de :func:" "`urllib.parse.urlencode`. Par exemple pour envoyer ``name=Guy Steele, Jr." "`` ::" -#: faq/library.rst:705 +#: faq/library.rst:699 msgid ":ref:`urllib-howto` for extensive examples." msgstr ":ref:`urllib-howto` pour des exemples complets." -#: faq/library.rst:709 +#: faq/library.rst:703 msgid "What module should I use to help with generating HTML?" -msgstr "Quel module utiliser pour générer du HTML ?" +msgstr "Quel module utiliser pour générer du HTML ?" -#: faq/library.rst:713 +#: faq/library.rst:707 msgid "" "You can find a collection of useful links on the `Web Programming wiki page " "`_." @@ -978,15 +962,15 @@ msgstr "" "La `page wiki de la programmation Toile `_ (en anglais) répertorie un ensemble de liens pertinents." -#: faq/library.rst:718 +#: faq/library.rst:712 msgid "How do I send mail from a Python script?" -msgstr "Comment envoyer un courriel avec un script Python ?" +msgstr "Comment envoyer un courriel avec un script Python ?" -#: faq/library.rst:720 +#: faq/library.rst:714 msgid "Use the standard library module :mod:`smtplib`." msgstr "Utilisez le module :mod:`smtplib` de la bibliothèque standard." -#: faq/library.rst:722 +#: faq/library.rst:716 msgid "" "Here's a very simple interactive mail sender that uses it. This method will " "work on any host that supports an SMTP listener. ::" @@ -994,7 +978,7 @@ msgstr "" "Voici un exemple très simple d'un envoyeur de courriel qui l'utilise. Cette " "méthode fonctionne sur tous les serveurs qui implémentent SMTP. ::" -#: faq/library.rst:742 +#: faq/library.rst:736 msgid "" "A Unix-only alternative uses sendmail. The location of the sendmail program " "varies between systems; sometimes it is ``/usr/lib/sendmail``, sometimes ``/" @@ -1006,13 +990,13 @@ msgstr "" "sendmail`` ou ``/usr/sbin/sendmail``, la page de manuel de *sendmail* peut " "vous aider. Par exemple ::" -#: faq/library.rst:762 +#: faq/library.rst:756 msgid "How do I avoid blocking in the connect() method of a socket?" msgstr "" "Comment éviter de bloquer dans la méthode ``connect()`` d'un connecteur " -"réseau ?" +"réseau ?" -#: faq/library.rst:764 +#: faq/library.rst:758 msgid "" "The :mod:`select` module is commonly used to help with asynchronous I/O on " "sockets." @@ -1020,7 +1004,7 @@ msgstr "" "Le module :mod:`select` est fréquemment utilisé pour effectuer des entrées-" "sorties asynchrones sur des connecteurs réseaux." -#: faq/library.rst:767 +#: faq/library.rst:761 msgid "" "To prevent the TCP connect from blocking, you can set the socket to non-" "blocking mode. Then when you do the :meth:`socket.connect`, you will either " @@ -1037,7 +1021,7 @@ msgstr "" "n'a pas encore aboutie. La valeur dépend du système d'exploitation, donc " "renseignez-vous sur la valeur utilisée par votre système." -#: faq/library.rst:774 +#: faq/library.rst:768 msgid "" "You can use the :meth:`socket.connect_ex` method to avoid creating an " "exception. It will just return the errno value. To poll, you can call :" @@ -1052,7 +1036,7 @@ msgstr "" "argument de :meth:`select.select` pour vérifier si le connecteur est prêt à " "recevoir des entrées." -#: faq/library.rst:780 +#: faq/library.rst:774 msgid "" "The :mod:`asyncio` module provides a general purpose single-threaded and " "concurrent asynchronous library, which can be used for writing non-blocking " @@ -1064,20 +1048,20 @@ msgstr "" "`Twisted `_ en est une alternative " "plébiscitée, avec un grand nombre de fonctionnalités." -#: faq/library.rst:788 +#: faq/library.rst:782 msgid "Databases" msgstr "Bases de données" -#: faq/library.rst:791 +#: faq/library.rst:785 msgid "Are there any interfaces to database packages in Python?" msgstr "" -"Existe-t'il des modules Python pour s'interfacer avec des bases de données ?" +"Existe-t-il des modules Python pour s'interfacer avec des bases de données ?" -#: faq/library.rst:793 +#: faq/library.rst:787 msgid "Yes." msgstr "Oui." -#: faq/library.rst:795 +#: faq/library.rst:789 msgid "" "Interfaces to disk-based hashes such as :mod:`DBM ` and :mod:`GDBM " "` are also included with standard Python. There is also the :mod:" @@ -1087,9 +1071,9 @@ msgstr "" "La distribution standard de Python fournit aussi des interfaces à des bases " "de données comme :mod:`DBM ` ou :mod:`GDBM `. Il existe " "aussi le module :mod:`sqlite3` qui implémente une base de données " -"relationelle légère sur disque." +"relationnelle légère sur disque." -#: faq/library.rst:800 +#: faq/library.rst:794 msgid "" "Support for most relational databases is available. See the " "`DatabaseProgramming wiki page `_ pour plus de détails." -#: faq/library.rst:806 +#: faq/library.rst:800 msgid "How do you implement persistent objects in Python?" -msgstr "Comment implémenter la persistance d'objets en Python ?" +msgstr "Comment implémenter la persistance d'objets en Python ?" -#: faq/library.rst:808 +#: faq/library.rst:802 msgid "" "The :mod:`pickle` library module solves this in a very general way (though " "you still can't store things like open files, sockets or windows), and the :" @@ -1115,15 +1099,15 @@ msgstr "" "fenêtres par exemple), et le module :mod:`shelve` de la bibliothèque utilise " "*pickle* et *(g)dbm* pour créer des liens persistants vers des objets Python." -#: faq/library.rst:815 +#: faq/library.rst:809 msgid "Mathematics and Numerics" msgstr "Mathématiques et calcul numérique" -#: faq/library.rst:818 +#: faq/library.rst:812 msgid "How do I generate random numbers in Python?" -msgstr "Comment générer des nombres aléatoires en Python ?" +msgstr "Comment générer des nombres aléatoires en Python ?" -#: faq/library.rst:820 +#: faq/library.rst:814 msgid "" "The standard module :mod:`random` implements a random number generator. " "Usage is simple::" @@ -1131,51 +1115,68 @@ msgstr "" "Le module :mod:`random` de la bibliothèque standard comprend un générateur " "de nombres aléatoires. Son utilisation est simple ::" -#: faq/library.rst:826 +#: faq/library.rst:820 msgid "This returns a random floating point number in the range [0, 1)." msgstr "" "Le code précédent renvoie un nombre à virgule flottante aléatoire dans " "l'intervalle [0, 1[." -#: faq/library.rst:828 +#: faq/library.rst:822 msgid "" "There are also many other specialized generators in this module, such as:" -msgstr "Ce module fournit beaucoup d'autres générateurs spécialisés comme :" +msgstr "Ce module fournit beaucoup d'autres générateurs spécialisés comme :" -#: faq/library.rst:830 +#: faq/library.rst:824 msgid "``randrange(a, b)`` chooses an integer in the range [a, b)." msgstr "``randrange(a, b)`` génère un entier dans l'intervalle [a, b[." -#: faq/library.rst:831 +#: faq/library.rst:825 msgid "``uniform(a, b)`` chooses a floating point number in the range [a, b)." msgstr "" "``uniform(a, b)`` génère un nombre à virgule flottante aléatoire dans " "l'intervalle [a, b[." -#: faq/library.rst:832 +#: faq/library.rst:826 msgid "" "``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution." msgstr "``normalvariate(mean, sdev)`` simule la loi normale (Gaussienne)." -#: faq/library.rst:834 +#: faq/library.rst:828 msgid "Some higher-level functions operate on sequences directly, such as:" msgstr "" -"Des fonctions de haut niveau opèrent directement sur des séquences comme :" +"Des fonctions de haut niveau opèrent directement sur des séquences comme :" -#: faq/library.rst:836 +#: faq/library.rst:830 msgid "``choice(S)`` chooses a random element from a given sequence." msgstr "``choice(S)`` sélectionne au hasard un élément d'une séquence donnée." -#: faq/library.rst:837 +#: faq/library.rst:831 msgid "``shuffle(L)`` shuffles a list in-place, i.e. permutes it randomly." msgstr "" "``shuffle(L)`` mélange une liste en-place, c.-à-d. lui applique une " "permutation aléatoire." -#: faq/library.rst:839 +#: faq/library.rst:833 msgid "" "There's also a ``Random`` class you can instantiate to create independent " "multiple random number generators." msgstr "" "Il existe aussi une classe ``Random`` qu'il est possible d'instancier pour " "créer des générateurs aléatoires indépendants." + +#~ msgid "" +#~ "For Windows: use `the consolelib module `_." +#~ msgstr "" +#~ "Pour Windows : utilisez le module `consolelib `_." + +#~ msgid "" +#~ "Aahz has a set of slides from his threading tutorial that are helpful; " +#~ "see http://www.pythoncraft.com/OSCON2001/." +#~ msgstr "" +#~ "Un ensemble de diapositives issues du didacticiel de Aahz sur les fils " +#~ "d'exécution est disponible à http://www.pythoncraft.com/OSCON2001/." + +#~ msgid "http://pyserial.sourceforge.net" +#~ msgstr "http://pyserial.sourceforge.net" diff --git a/faq/programming.po b/faq/programming.po index 8fa145f727..cc65c286ce 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-29 16:33+0200\n" -"PO-Revision-Date: 2021-05-19 22:42+0200\n" -"Last-Translator: Jules Lasne \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-05-27 12:15+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.2\n" +"X-Generator: Poedit 3.0.1\n" #: faq/programming.rst:5 msgid "Programming FAQ" @@ -33,7 +33,7 @@ msgid "" "etc.?" msgstr "" "Existe-t-il un débogueur de code source avec points d'arrêts, exécution pas-" -"à-pas, etc. ?" +"à-pas, etc. ?" #: faq/programming.rst:57 msgid "Yes." @@ -70,7 +70,6 @@ msgstr "" "idle``) contient un débogueur graphique." #: faq/programming.rst:31 -#, fuzzy msgid "" "PythonWin is a Python IDE that includes a GUI debugger based on pdb. The " "PythonWin debugger colors breakpoints and has quite a few cool features such " @@ -83,10 +82,9 @@ msgstr "" "embarque un débogueur graphique basé sur ``pdb``. Le débogueur *PythonWin* " "colore les points d'arrêts et possède quelques fonctionnalités sympathiques, " "comme la possibilité de déboguer des programmes développés sans " -"*PythonWin*. *PythonWin* est disponible dans le projet `Extensions Python " -"pour Windows `__ et fait partie " -"de la distribution ActivePython (voir https://www.activestate.com/" -"activepython\\ )." +"*PythonWin*. *PythonWin* est disponible dans le projet `pywin32 `_ et fait partie de la distribution " +"`ActivePython `_." #: faq/programming.rst:38 msgid "" @@ -101,12 +99,17 @@ msgid "" "`trepan3k `_ is a gdb-like " "debugger." msgstr "" +"`trepan3k `_ est un débogueur " +"semblable à GDB." #: faq/programming.rst:43 msgid "" "`Visual Studio Code `_ is an IDE with " "debugging tools that integrates with version-control software." msgstr "" +"`Visual Studio Code `_ est un EDI qui " +"contient des outils de débogage. Il sait interagir avec les outils de " +"gestion de versions." #: faq/programming.rst:46 msgid "" @@ -114,20 +117,19 @@ msgid "" "debuggers. They include:" msgstr "" "Il existe de nombreux EDI Python propriétaires qui embarquent un débogueur " -"graphique. Notamment :" +"graphique, notamment :" #: faq/programming.rst:49 msgid "`Wing IDE `_" -msgstr "`Wing IDE `_" +msgstr "`Wing IDE `_ ;" #: faq/programming.rst:50 msgid "`Komodo IDE `_" -msgstr "" +msgstr "`Komodo IDE `_ ;" #: faq/programming.rst:51 -#, fuzzy msgid "`PyCharm `_" -msgstr "PyCharm (https://www.jetbrains.com/pycharm/)" +msgstr "`PyCharm `_ ;" #: faq/programming.rst:55 msgid "Are there tools to help find bugs or perform static analysis?" @@ -157,7 +159,7 @@ msgstr "" #: faq/programming.rst:72 msgid "How can I create a stand-alone binary from a Python script?" -msgstr "Comment créer un binaire autonome à partir d'un script Python ?" +msgstr "Comment créer un binaire autonome à partir d'un script Python ?" #: faq/programming.rst:74 msgid "" @@ -177,15 +179,15 @@ msgstr "" #: faq/programming.rst:80 msgid "" "One is to use the freeze tool, which is included in the Python source tree " -"as ``Tools/freeze``. It converts Python byte code to C arrays; a C compiler " -"you can embed all your modules into a new program, which is then linked with " -"the standard Python modules." +"as ``Tools/freeze``. It converts Python byte code to C arrays; with a C " +"compiler you can embed all your modules into a new program, which is then " +"linked with the standard Python modules." msgstr "" "Un de ces outils est *freeze*, qui se trouve dans ``Tools/freeze`` de " "l'arborescence des sources de Python. Il convertit le code intermédiaire " -"(*bytecode*) Python en tableaux C ; un compilateur C permet d'intégrer tous " -"vos modules dans un nouveau programme, qui est ensuite lié aux modules " -"standards Python." +"(*bytecode*) Python en tableaux C ; avec un compilateur C, vous pouvez " +"intégrer tous vos modules dans un nouveau programme, qui est ensuite lié aux " +"modules standards Python." #: faq/programming.rst:85 msgid "" @@ -199,55 +201,63 @@ msgid "" "rest of the Python interpreter to form a self-contained binary which acts " "exactly like your script." msgstr "" -"Il fonctionne en cherchant de manière récursive les instructions d'import " -"(sous les deux formes) dans le code source et en recherchant ces modules " -"dans le chemin Python standard ainsi que dans le répertoire source (pour les " -"modules natifs). Il transforme ensuite le code intermédiaire des modules " -"écrits en Python en code C (des tableaux pré-remplis qui peuvent être " -"transformés en objets code à l'aide du module *marshal*) et crée un fichier " -"de configuration personnalisé qui contient uniquement les modules natifs qui " -"sont réellement utilisés dans le programme. Il compile ensuite le code C " -"généré et le lie au reste de l'interpréteur Python pour former un binaire " -"autonome qui fait exactement la même chose que le script." +"Il fonctionne en cherchant de manière récursive les instructions " +"d'importation (sous les deux formes) dans le code source et en recherchant " +"ces modules dans le chemin Python standard ainsi que dans le répertoire " +"source (pour les modules natifs). Il transforme ensuite le code " +"intermédiaire des modules écrits en Python en code C (des tableaux pré-" +"remplis qui peuvent être transformés en objets code à l'aide du module " +"*marshal*) et crée un fichier de configuration personnalisé qui contient " +"uniquement les modules natifs qui sont réellement utilisés dans le " +"programme. Il compile ensuite le code C généré et le lie au reste de " +"l'interpréteur Python pour former un binaire autonome qui fait exactement la " +"même chose que le script." #: faq/programming.rst:94 msgid "" "The following packages can help with the creation of console and GUI " "executables:" msgstr "" +"Voici quelques paquets qui permettent de créer des exécutables en ligne de " +"commande comme graphiques :" #: faq/programming.rst:97 msgid "`Nuitka `_ (Cross-platform)" -msgstr "" +msgstr "`Nuitka `_ (multiplateformes) ;" #: faq/programming.rst:98 msgid "`PyInstaller `_ (Cross-platform)" -msgstr "" +msgstr "`PyInstaller `_ (multiplateformes) ;" #: faq/programming.rst:99 msgid "" "`PyOxidizer `_ (Cross-platform)" msgstr "" +"`PyOxidizer `_ (multi-" +"plateforme) ;" #: faq/programming.rst:100 msgid "" "`cx_Freeze `_ (Cross-platform)" msgstr "" +"`cx_Freeze `_ (multi-" +"plateforme) ;" #: faq/programming.rst:101 msgid "`py2app `_ (macOS only)" msgstr "" +"`py2app `_ (uniquement pour " +"macOS) ;" #: faq/programming.rst:102 -#, fuzzy msgid "`py2exe `_ (Windows only)" -msgstr "http://www.py2exe.org/" +msgstr "`py2exe `_ (uniquement pour Windows)." #: faq/programming.rst:105 msgid "Are there coding standards or a style guide for Python programs?" msgstr "" "Existe-t-il des normes de développement ou un guide de style pour écrire des " -"programmes Python ?" +"programmes Python ?" #: faq/programming.rst:107 msgid "" @@ -264,7 +274,7 @@ msgstr "Fondamentaux" #: faq/programming.rst:115 msgid "Why am I getting an UnboundLocalError when the variable has a value?" msgstr "" -"Pourquoi une UnboundLocalError est levée alors qu'une variable a une valeur ?" +"Pourquoi une UnboundLocalError est levée alors qu'une variable a une valeur ?" #: faq/programming.rst:117 msgid "" @@ -278,15 +288,15 @@ msgstr "" #: faq/programming.rst:121 msgid "This code:" -msgstr "Le code suivant :" +msgstr "Le code suivant :" #: faq/programming.rst:129 msgid "works, but this code:" -msgstr "fonctionne, mais le suivant :" +msgstr "fonctionne, mais le suivant :" #: faq/programming.rst:136 msgid "results in an UnboundLocalError:" -msgstr "lève une UnboundLocalError :" +msgstr "lève une UnboundLocalError :" #: faq/programming.rst:143 msgid "" @@ -310,7 +320,7 @@ msgid "" "global:" msgstr "" "Dans l'exemple ci-dessus, la variable du contexte appelant reste accessible " -"en la déclarant globale :" +"en la déclarant globale :" #: faq/programming.rst:161 msgid "" @@ -321,7 +331,7 @@ msgstr "" "Cette déclaration explicite est obligatoire pour se rappeler que " "(contrairement au cas à peu près similaire avec des variables de classe et " "d'instance), c'est la valeur de la variable du contexte appelant qui est " -"modifiée :" +"modifiée :" #: faq/programming.rst:168 msgid "" @@ -329,12 +339,12 @@ msgid "" "keyword:" msgstr "" "Une alternative dans un contexte imbriqué consiste à utiliser le mot-clé :" -"keyword:`nonlocal` :" +"keyword:`nonlocal` :" #: faq/programming.rst:185 msgid "What are the rules for local and global variables in Python?" msgstr "" -"Quelles sont les règles pour les variables locales et globales en Python ?" +"Quelles sont les règles pour les variables locales et globales en Python ?" #: faq/programming.rst:187 msgid "" @@ -365,7 +375,7 @@ msgstr "" "faudrait mettre ``global`` partout, car il faudrait dans ce cas déclarer " "globale chaque référence à une fonction native ou à un composant d'un module " "importé. Le codé serait alors truffé de déclarations ``global``, ce qui " -"nuirait à leur raison d'être : identifier les effets de bords." +"nuirait à leur raison d'être : identifier les effets de bords." #: faq/programming.rst:201 msgid "" @@ -373,7 +383,7 @@ msgid "" "result?" msgstr "" "Pourquoi des expressions lambda définies dans une boucle avec des valeurs " -"différentes retournent-elles le même résultat ?" +"différentes retournent-elles le même résultat ?" #: faq/programming.rst:203 msgid "" @@ -381,7 +391,7 @@ msgid "" "functions), e.g.::" msgstr "" "Supposons que l'on utilise une boucle itérative pour définir des expressions " -"lambda (voire même des fonctions) différentes, par exemple ::" +"lambda (voire des fonctions) différentes, par exemple ::" #: faq/programming.rst:210 msgid "" @@ -443,7 +453,7 @@ msgstr "" #: faq/programming.rst:253 msgid "How do I share global variables across modules?" -msgstr "Comment partager des variables globales entre modules ?" +msgstr "Comment partager des variables globales entre modules ?" #: faq/programming.rst:255 msgid "" @@ -456,10 +466,10 @@ msgid "" msgstr "" "La manière standard de partager des informations entre modules d'un même " "programme est de créer un module spécial (souvent appelé *config* ou *cfg*) " -"et de l'importer dans tous les modules de l'application ; le module devient " +"et de l'importer dans tous les modules de l'application ; le module devient " "accessible depuis l'espace de nommage global. Vu qu'il n'y a qu'une instance " "de chaque module, tout changement dans l'instance est propagé partout. Par " -"exemple :" +"exemple :" #: faq/programming.rst:261 msgid "config.py::" @@ -484,7 +494,7 @@ msgstr "" #: faq/programming.rst:281 msgid "What are the \"best practices\" for using import in a module?" msgstr "" -"Quelles sont les « bonnes pratiques » pour utiliser import dans un module ?" +"Quelles sont les « bonnes pratiques » pour utiliser import dans un module ?" #: faq/programming.rst:283 msgid "" @@ -505,19 +515,19 @@ msgid "" msgstr "" "Les modules doivent être importés au début d'un fichier. Ceci permet " "d'afficher clairement de quels modules le code à besoin et évite de se " -"demander si le module est dans le contexte. Faire un seul `import` par ligne " -"rend l'ajout et la suppression d'une importation de module plus aisé, mais " -"importer plusieurs modules sur une même ligne prend moins d'espace." +"demander si le module est dans le contexte. Faire un seul ``import`` par " +"ligne rend l'ajout et la suppression d'une importation de module plus aisé, " +"mais importer plusieurs modules sur une même ligne prend moins d'espace." #: faq/programming.rst:292 msgid "It's good practice if you import modules in the following order:" -msgstr "Il est recommandé d'importer les modules dans l'ordre suivant :" +msgstr "Il est recommandé d'importer les modules dans l'ordre suivant :" #: faq/programming.rst:294 msgid "standard library modules -- e.g. ``sys``, ``os``, ``getopt``, ``re``" msgstr "" -"les modules de la bibliothèque standard — e.g. ``sys``, ``os``, ``getopt``, " -"``re``" +"les modules de la bibliothèque standard — p. ex. ``sys``, ``os``, " +"``getopt``, ``re``" #: faq/programming.rst:295 msgid "" @@ -525,7 +535,7 @@ msgid "" "directory) -- e.g. mx.DateTime, ZODB, PIL.Image, etc." msgstr "" "les modules externes (tout ce qui est installé dans le dossier *site-" -"packages* de Python) — e.g. *mx.DateTime, ZODB, PIL.Image*, etc." +"packages* de Python) — p. ex. *mx.DateTime, ZODB, PIL.Image*, etc." #: faq/programming.rst:297 msgid "locally-developed modules" @@ -538,7 +548,7 @@ msgid "" msgstr "" "Il est parfois nécessaire de déplacer des importations dans une fonction ou " "une classe pour éviter les problèmes d'importations circulaires. Comme le " -"souligne Gordon McMillan :" +"souligne Gordon McMillan :" #: faq/programming.rst:302 msgid "" @@ -595,22 +605,22 @@ msgid "" "only a couple of dictionary lookups. Even if the module name has gone out " "of scope, the module is probably available in :data:`sys.modules`." msgstr "" -"Les imports ne devraient être déplacés dans un espace local, comme dans la " -"définition d'une fonction, que si cela est nécessaire pour résoudre un " -"problème comme éviter des dépendances circulaires ou réduire le temps " -"d'initialisation d'un module. Cette technique est particulièrement utile si " -"la majorité des imports est superflue selon le flux d'exécution du " -"programme. Il est également pertinent de déplacer des importations dans une " -"fonction si le module n'est utilisé qu'au sein de cette fonction. Le premier " -"chargement d'un module peut être coûteux à cause du coût fixe " -"d'initialisation d'un module, mais charger un module plusieurs fois est " -"quasiment gratuit, cela ne coûte que quelques indirections dans un " +"Les importations ne devraient être déplacées dans un espace de nommage " +"local, comme dans la définition d'une fonction, que si cela est nécessaire " +"pour résoudre un problème comme éviter des dépendances circulaires ou " +"réduire le temps d'initialisation d'un module. Cette technique est " +"particulièrement utile si la majorité des importations est superflue selon " +"le flux d'exécution du programme. Il est également pertinent de déplacer des " +"importations dans une fonction si le module n'est utilisé qu'au sein de " +"cette fonction. Le premier chargement d'un module peut être coûteux à cause " +"du coût fixe d'initialisation d'un module, mais charger un module plusieurs " +"fois est quasiment gratuit, cela ne coûte que quelques indirections dans un " "dictionnaire. Même si le nom du module est sorti du contexte courant, le " "module est probablement disponible dans :data:`sys.modules`." #: faq/programming.rst:331 msgid "Why are default values shared between objects?" -msgstr "Pourquoi les arguments par défaut sont-ils partagés entre les objets ?" +msgstr "Pourquoi les arguments par défaut sont-ils partagés entre les objets ?" #: faq/programming.rst:333 msgid "" @@ -683,7 +693,7 @@ msgstr "" "Cette fonctionnalité a une utilité. Il est courant de mettre en cache les " "paramètres et la valeur de retour de chacun des appels d'une fonction " "coûteuse à exécuter, et de renvoyer la valeur stockée en cache si le même " -"appel est ré-effectué. C'est la technique dite de « mémoïsation », qui " +"appel est ré-effectué. C'est la technique dite de « mémoïsation », qui " "s'implémente de la manière suivante ::" #: faq/programming.rst:382 @@ -692,13 +702,13 @@ msgid "" "default value; it's a matter of taste." msgstr "" "Il est possible d'utiliser une variable globale contenant un dictionnaire à " -"la place de la valeur par défaut ; ce n'est qu'une question de goût." +"la place de la valeur par défaut ; ce n'est qu'une question de goût." #: faq/programming.rst:387 msgid "" "How can I pass optional or keyword parameters from one function to another?" msgstr "" -"Comment passer des paramètres optionnels ou nommés d'une fonction à l'autre ?" +"Comment passer des paramètres optionnels ou nommés d'une fonction à l'autre ?" #: faq/programming.rst:389 msgid "" @@ -708,14 +718,14 @@ msgid "" "arguments when calling another function by using ``*`` and ``**``::" msgstr "" "Il faut récupérer les arguments en utilisant les sélecteurs ``*`` et ``**`` " -"dans la liste des paramètres de la fonction ; ceci donne les arguments " +"dans la liste des paramètres de la fonction ; ceci donne les arguments " "positionnels sous la forme d'un *n*-uplet et les arguments nommés sous forme " "de dictionnaire. Ces arguments peuvent être passés à une autre fonction en " "utilisant ``*`` et ``**`` ::" #: faq/programming.rst:408 msgid "What is the difference between arguments and parameters?" -msgstr "Quelle est la différence entre les arguments et les paramètres ?" +msgstr "Quelle est la différence entre les arguments et les paramètres ?" #: faq/programming.rst:410 msgid "" @@ -745,7 +755,7 @@ msgstr "les valeurs ``42``, ``314``, et ``somevar`` sont des arguments." #: faq/programming.rst:427 msgid "Why did changing list 'y' also change list 'x'?" -msgstr "Pourquoi modifier la liste 'y' modifie aussi la liste 'x' ?" +msgstr "Pourquoi modifier la liste 'y' modifie aussi la liste 'x' ?" #: faq/programming.rst:429 msgid "If you wrote code like::" @@ -760,7 +770,7 @@ msgstr "" #: faq/programming.rst:441 msgid "There are two factors that produce this result:" -msgstr "Il y a deux raisons qui conduisent à ce comportement :" +msgstr "Il y a deux raisons qui conduisent à ce comportement :" #: faq/programming.rst:443 msgid "" @@ -809,7 +819,7 @@ msgstr "" "on observe que ``x`` et ``y`` ne sont ici plus égales. Les entiers sont des " "immuables (:term:`immutable`), et ``x = x + 1`` ne change pas l'entier ``5`` " "en incrémentant sa valeur. Au contraire, un nouvel objet est créé (l'entier " -"``6``) et affecté à ``x`` (c'est à dire qu'on change l'objet auquel fait " +"``6``) et affecté à ``x`` (c'est-à-dire qu'on change l'objet auquel fait " "référence ``x``). Après cette affectation on a deux objets (les entiers " "``6`` et ``5``) et deux variables qui font référence à ces deux objets " "(``x`` fait désormais référence à ``6`` mais ``y`` fait toujours référence à " @@ -845,7 +855,7 @@ msgid "" "1`` create new objects)." msgstr "" "Il existe cependant une classe d'opérations qui se comporte différemment " -"selon le type : les opérateurs d'affectation incrémentaux. Par exemple, ``" +"selon le type : les opérateurs d'affectation incrémentaux. Par exemple, ``" "+=`` modifie les listes mais pas les *n*-uplets ni les entiers (``a_list += " "[1, 2, 3]`` équivaut à ``a_list.extend([1, 2, 3])`` et modifie ``a_list``, " "alors que ``some_tuple += (1, 2, 3)`` et ``some_int += 1`` créent de " @@ -853,7 +863,7 @@ msgstr "" #: faq/programming.rst:487 msgid "In other words:" -msgstr "En d'autres termes :" +msgstr "En d'autres termes :" #: faq/programming.rst:489 msgid "" @@ -888,7 +898,7 @@ msgstr "" #: faq/programming.rst:502 msgid "How do I write a function with output parameters (call by reference)?" msgstr "" -"Comment écrire une fonction qui modifie ses paramètres ? (passage par " +"Comment écrire une fonction qui modifie ses paramètres ? (passage par " "référence)" #: faq/programming.rst:504 @@ -944,7 +954,7 @@ msgstr "" #: faq/programming.rst:569 msgid "How do you make a higher order function in Python?" -msgstr "Comment construire une fonction d'ordre supérieur en Python ?" +msgstr "Comment construire une fonction d'ordre supérieur en Python ?" #: faq/programming.rst:571 msgid "" @@ -953,7 +963,7 @@ msgid "" "returns a function ``f(x)`` that computes the value ``a*x+b``. Using nested " "scopes::" msgstr "" -"Deux possibilités : on peut utiliser des portées imbriquées ou bien des " +"Deux possibilités : on peut utiliser des portées imbriquées ou bien des " "objets appelables. Par exemple, supposons que l'on souhaite définir " "``linear(a, b)`` qui renvoie une fonction ``f(x)`` qui calcule la valeur " "``a*x+b``. En utilisant les portées imbriquées ::" @@ -964,7 +974,7 @@ msgstr "Ou en utilisant un objet appelable ::" #: faq/programming.rst:590 msgid "In both cases, ::" -msgstr "Dans les deux cas ::" +msgstr "Dans les deux cas ::" #: faq/programming.rst:594 msgid "gives a callable object where ``taxes(10e6) == 0.3 * 10e6 + 2``." @@ -1019,7 +1029,7 @@ msgstr "Les séquences peuvent être copiées via la syntaxe des tranches ::" #: faq/programming.rst:644 msgid "How can I find the methods or attributes of an object?" -msgstr "Comment récupérer les méthodes ou les attributs d'un objet ?" +msgstr "Comment récupérer les méthodes ou les attributs d'un objet ?" #: faq/programming.rst:646 msgid "" @@ -1033,7 +1043,7 @@ msgstr "" #: faq/programming.rst:652 msgid "How can my code discover the name of an object?" -msgstr "Comment un code peut-il obtenir le nom d'un objet ?" +msgstr "Comment un code peut-il obtenir le nom d'un objet ?" #: faq/programming.rst:654 msgid "" @@ -1068,10 +1078,10 @@ msgid "" "introspective programs, this is usually an indication that a change of " "approach might be beneficial." msgstr "" -"De façon générale, une application ne devrait pas avoir besoin de « " -"connaître le nom » d'une valeur particulière. À moins d'être délibérément en " -"train d'écrire un programme introspectif, c'est souvent l'indication qu'un " -"changement d'approche serait bénéfique." +"De façon générale, une application ne devrait pas avoir besoin de " +"« connaître le nom » d'une valeur particulière. À moins d'être délibérément " +"en train d'écrire un programme introspectif, c'est souvent l'indication " +"qu'un changement d'approche serait bénéfique." #: faq/programming.rst:680 msgid "" @@ -1079,7 +1089,7 @@ msgid "" "to this question:" msgstr "" "Sur *comp.lang.python*, Fredrik Lundh a donné un jour une excellente " -"analogie pour répondre à cette question :" +"analogie pour répondre à cette question :" #: faq/programming.rst:683 msgid "" @@ -1099,11 +1109,11 @@ msgid "" "no name at all!" msgstr "" "…et ne soyez pas surpris si vous découvrez qu'il est connu sous plusieurs " -"noms, ou s'il n'a pas de nom du tout !" +"noms, ou s'il n'a pas de nom du tout !" #: faq/programming.rst:693 msgid "What's up with the comma operator's precedence?" -msgstr "Qu'en est-il de la précédence de l'opérateur virgule ?" +msgstr "Qu'en est-il de la précédence de l'opérateur virgule ?" #: faq/programming.rst:695 msgid "Comma is not an operator in Python. Consider this session::" @@ -1135,7 +1145,7 @@ msgstr "" #: faq/programming.rst:714 msgid "Is there an equivalent of C's \"?:\" ternary operator?" -msgstr "Existe-t-il un équivalent à l'opérateur ternaire \"?:\" du C ?" +msgstr "Existe-t-il un équivalent à l'opérateur ternaire « ?: » du C ?" #: faq/programming.rst:716 msgid "Yes, there is. The syntax is as follows::" @@ -1163,7 +1173,7 @@ msgstr "" msgid "Is it possible to write obfuscated one-liners in Python?" msgstr "" "Est-il possible d'écrire des programmes obscurcis (*obfuscated*) d'une ligne " -"en Python ?" +"en Python ?" #: faq/programming.rst:736 msgid "" @@ -1176,13 +1186,13 @@ msgstr "" #: faq/programming.rst:763 msgid "Don't try this at home, kids!" -msgstr "Les enfants, ne faites pas ça chez vous !" +msgstr "Les enfants, ne faites pas ça chez vous !" #: faq/programming.rst:769 msgid "What does the slash(/) in the parameter list of a function mean?" msgstr "" "Que signifie la barre oblique (/) dans la liste des paramètres d'une " -"fonction ?" +"fonction ?" #: faq/programming.rst:771 msgid "" @@ -1218,7 +1228,7 @@ msgstr "Nombres et chaînes de caractères" #: faq/programming.rst:798 msgid "How do I specify hexadecimal and octal integers?" -msgstr "Comment écrire des entiers hexadécimaux ou octaux ?" +msgstr "Comment écrire des entiers hexadécimaux ou octaux ?" #: faq/programming.rst:800 msgid "" @@ -1274,15 +1284,38 @@ msgstr "" "Il y a peu de cas d'utilisation réels pour ``i % j`` quand ``j`` est " "négatif. Quand ``j`` est positif, il y en a beaucoup, et dans pratiquement " "tous, il est plus utile que ``i % j`` soit ``>=0``. Si l'horloge affiche " -"10 h maintenant, qu'affichait-elle il y a 200 heures ? ``-190 % 12 == 2`` " -"est utile ; ``-190 % 12 == -10`` est un bogue en puissance." +"10 h maintenant, qu'affichait-elle il y a 200 heures ? ``-190 % 12 == 2`` " +"est utile ; ``-190 % 12 == -10`` est un bogue en puissance." #: faq/programming.rst:840 -msgid "How do I convert a string to a number?" -msgstr "Comment convertir une chaîne de caractères en nombre ?" +msgid "How do I get int literal attribute instead of SyntaxError?" +msgstr "" +"Pourquoi ai-je une erreur de syntaxe en essayant de lire un attribut d'un " +"entier littéral ?" #: faq/programming.rst:842 msgid "" +"Trying to lookup an ``int`` literal attribute in the normal manner gives a " +"syntax error because the period is seen as a decimal point::" +msgstr "" +"Essayer d'utiliser l'opérateur d'accès à un attribut sur un entier littéral " +"conduit à une erreur de syntaxe car le point est compris comme un séparateur " +"décimal en notation anglo-saxonne :" + +#: faq/programming.rst:851 +msgid "" +"The solution is to separate the literal from the period with either a space " +"or parentheses." +msgstr "" +"Il faut séparer l'entier du point, soit avec une espace, soit avec des " +"parenthèses." + +#: faq/programming.rst:861 +msgid "How do I convert a string to a number?" +msgstr "Comment convertir une chaîne de caractères en nombre ?" + +#: faq/programming.rst:863 +msgid "" "For integers, use the built-in :func:`int` type constructor, e.g. " "``int('144') == 144``. Similarly, :func:`float` converts to floating-point, " "e.g. ``float('144') == 144.0``." @@ -1291,7 +1324,7 @@ msgstr "" "``int('144') == 144``. De façon similaire, :func:`float` donne la valeur " "flottante, par exemple ``float('144') == 144.0``." -#: faq/programming.rst:846 +#: faq/programming.rst:867 msgid "" "By default, these interpret the number as decimal, so that ``int('0144') == " "144`` holds true, and ``int('0x144')`` raises :exc:`ValueError`. " @@ -1307,7 +1340,7 @@ msgstr "" "donnée est 0, le nombre est interprété selon les règles Python : un préfixe " "``0o`` indique de l'octal et ``0x`` indique de l'hexadécimal." -#: faq/programming.rst:853 +#: faq/programming.rst:874 msgid "" "Do not use the built-in function :func:`eval` if all you need is to convert " "strings to numbers. :func:`eval` will be significantly slower and it " @@ -1318,12 +1351,12 @@ msgid "" msgstr "" "N'utilisez pas la fonction native :func:`eval` pour convertir des chaînes de " "caractères en nombres. :func:`eval` est beaucoup plus lente et pose des " -"problèmes de sécurité : quelqu'un pourrait vous envoyer une expression " +"problèmes de sécurité : quelqu'un pourrait vous envoyer une expression " "Python pouvant avoir des effets de bord indésirables. Par exemple, quelqu'un " "pourrait passer ``__import__('os').system(\"rm -rf $HOME\")`` ce qui " "effacerait votre répertoire personnel." -#: faq/programming.rst:860 +#: faq/programming.rst:881 msgid "" ":func:`eval` also has the effect of interpreting numbers as Python " "expressions, so that e.g. ``eval('09')`` gives a syntax error because Python " @@ -1334,11 +1367,11 @@ msgstr "" "parce que Python ne permet pas les '0' en tête d'un nombre décimal (à " "l'exception du nombre '0')." -#: faq/programming.rst:866 +#: faq/programming.rst:887 msgid "How do I convert a number to a string?" -msgstr "Comment convertir un nombre en chaîne de caractères ?" +msgstr "Comment convertir un nombre en chaîne de caractères ?" -#: faq/programming.rst:868 +#: faq/programming.rst:889 msgid "" "To convert, e.g., the number 144 to the string '144', use the built-in type " "constructor :func:`str`. If you want a hexadecimal or octal representation, " @@ -1352,14 +1385,14 @@ msgstr "" "représentation hexadécimale ou octale, il faut utiliser les fonctions " "natives :func:`hex` ou :func:`oct`. Pour des représentations non-" "conventionnelles, se référer aux sections :ref:`f-strings` et :ref:" -"`formatstrings`, e.g. ``\"{:04d}\".format(144)`` produit ``'0144'`` et ``" -"\"{:.3f}\".format(1.0/3.0)`` produit ``'0.333'``." +"`formatstrings`, par exemple ``\"{:04d}\".format(144)`` produit ``'0144'`` " +"et ``\"{:.3f}\".format(1.0/3.0)`` produit ``'0.333'``." -#: faq/programming.rst:877 +#: faq/programming.rst:898 msgid "How do I modify a string in place?" -msgstr "Comment modifier une chaîne de caractères « sur place » ?" +msgstr "Comment modifier une chaîne de caractères « sur place » ?" -#: faq/programming.rst:879 +#: faq/programming.rst:900 msgid "" "You can't, because strings are immutable. In most situations, you should " "simply construct a new string from the various parts you want to assemble it " @@ -1370,20 +1403,20 @@ msgstr "" "C'est impossible car les chaînes de caractères sont immuables. Dans la " "plupart des cas, il faut tout simplement construire une nouvelle chaîne à " "partir des morceaux de l'ancienne. Si toutefois vous avez besoin d'un objet " -"capable de modifier de la donnée Unicode « sur place », essayez d'utiliser " +"capable de modifier de la donnée Unicode « sur place », essayez d'utiliser " "un objet :class:`io.StringIO` ou le module :mod:`array` ::" -#: faq/programming.rst:909 +#: faq/programming.rst:930 msgid "How do I use strings to call functions/methods?" msgstr "" "Comment utiliser des chaînes de caractères pour appeler des fonctions/" "méthodes ?" -#: faq/programming.rst:911 +#: faq/programming.rst:932 msgid "There are various techniques." msgstr "Il y a plusieurs façons de faire." -#: faq/programming.rst:913 +#: faq/programming.rst:934 msgid "" "The best is to use a dictionary that maps strings to functions. The primary " "advantage of this technique is that the strings do not need to match the " @@ -1396,11 +1429,11 @@ msgstr "" "fonctions. C'est aussi la façon principale d'imiter la construction \"case" "\" ::" -#: faq/programming.rst:928 +#: faq/programming.rst:949 msgid "Use the built-in function :func:`getattr`::" msgstr "Utiliser la fonction :func:`getattr` ::" -#: faq/programming.rst:933 +#: faq/programming.rst:954 msgid "" "Note that :func:`getattr` works on any object, including classes, class " "instances, modules, and so on." @@ -1408,17 +1441,17 @@ msgstr "" "Notez que :func:`getattr` marche sur n'importe quel objet, ceci inclut les " "classes, les instances de classes, les modules et ainsi de suite." -#: faq/programming.rst:936 +#: faq/programming.rst:957 msgid "This is used in several places in the standard library, like this::" msgstr "" "Ceci est utilisé à plusieurs reprises dans la bibliothèque standard, de " "cette façon ::" -#: faq/programming.rst:949 +#: faq/programming.rst:970 msgid "Use :func:`locals` to resolve the function name::" msgstr "Utilisez :func:`locals` pour résoudre le nom de la fonction ::" -#: faq/programming.rst:961 +#: faq/programming.rst:982 msgid "" "Is there an equivalent to Perl's chomp() for removing trailing newlines from " "strings?" @@ -1426,7 +1459,7 @@ msgstr "" "Existe-t-il un équivalent à la fonction ``chomp()`` de Perl, pour retirer " "les caractères de fin de ligne d'une chaîne de caractères ?" -#: faq/programming.rst:963 +#: faq/programming.rst:984 msgid "" "You can use ``S.rstrip(\"\\r\\n\")`` to remove all occurrences of any line " "terminator from the end of the string ``S`` without removing other trailing " @@ -1440,7 +1473,7 @@ msgstr "" "représente plus d'une ligne, avec plusieurs lignes vides, les marqueurs de " "fin de ligne de chaque ligne vide seront retirés ::" -#: faq/programming.rst:975 +#: faq/programming.rst:996 msgid "" "Since this is typically only desired when reading text one line at a time, " "using ``S.rstrip()`` this way works well." @@ -1448,15 +1481,15 @@ msgstr "" "Vu que cela ne sert presque qu'à lire un texte ligne à ligne, utiliser ``S." "rstrip()`` de cette manière fonctionne correctement." -#: faq/programming.rst:980 +#: faq/programming.rst:1001 msgid "Is there a scanf() or sscanf() equivalent?" msgstr "Existe-t-il un équivalent à ``scanf()`` ou ``sscanf()`` ?" -#: faq/programming.rst:982 +#: faq/programming.rst:1003 msgid "Not as such." msgstr "Pas exactement." -#: faq/programming.rst:984 +#: faq/programming.rst:1005 msgid "" "For simple input parsing, the easiest approach is usually to split the line " "into whitespace-delimited words using the :meth:`~str.split` method of " @@ -1473,7 +1506,7 @@ msgstr "" "paramètre optionnel \"sep\" qui est utile si la ligne utilise autre chose " "que des espaces comme séparateurs." -#: faq/programming.rst:990 +#: faq/programming.rst:1011 msgid "" "For more complicated input parsing, regular expressions are more powerful " "than C's :c:func:`sscanf` and better suited for the task." @@ -1482,32 +1515,32 @@ msgstr "" "puissantes que la fonction :c:func:`sscanf` de C et mieux adaptées à la " "tâche." -#: faq/programming.rst:995 +#: faq/programming.rst:1016 msgid "What does 'UnicodeDecodeError' or 'UnicodeEncodeError' error mean?" msgstr "" "Que signifient les erreurs ``UnicodeDecodeError`` ou ``UnicodeEncodeError`` ?" -#: faq/programming.rst:997 +#: faq/programming.rst:1018 msgid "See the :ref:`unicode-howto`." msgstr "Voir :ref:`unicode-howto`." -#: faq/programming.rst:1001 +#: faq/programming.rst:1022 msgid "Performance" msgstr "Performances" -#: faq/programming.rst:1004 +#: faq/programming.rst:1025 msgid "My program is too slow. How do I speed it up?" -msgstr "Mon programme est trop lent. Comment l'accélérer ?" +msgstr "Mon programme est trop lent. Comment l'accélérer ?" -#: faq/programming.rst:1006 +#: faq/programming.rst:1027 msgid "" "That's a tough one, in general. First, here are a list of things to " "remember before diving further:" msgstr "" "Question difficile en général. Il faut garder en tête les points suivants " -"avant d'aller plus loin :" +"avant d'aller plus loin :" -#: faq/programming.rst:1009 +#: faq/programming.rst:1030 msgid "" "Performance characteristics vary across Python implementations. This FAQ " "focuses on :term:`CPython`." @@ -1515,7 +1548,7 @@ msgstr "" "Les performances varient en fonction des implémentations de Python. Cette " "FAQ ne traite que de :term:`CPython`." -#: faq/programming.rst:1011 +#: faq/programming.rst:1032 msgid "" "Behaviour can vary across operating systems, especially when talking about I/" "O or multi-threading." @@ -1524,7 +1557,7 @@ msgstr "" "tout particulièrement quand il s'agit d'entrée/sortie ou de fils d'exécution " "multiples." -#: faq/programming.rst:1013 +#: faq/programming.rst:1034 msgid "" "You should always find the hot spots in your program *before* attempting to " "optimize any code (see the :mod:`profile` module)." @@ -1533,7 +1566,7 @@ msgstr "" "programme *avant* d'essayer d'optimiser du code (voir le module :mod:" "`profile`)." -#: faq/programming.rst:1015 +#: faq/programming.rst:1036 msgid "" "Writing benchmark scripts will allow you to iterate quickly when searching " "for improvements (see the :mod:`timeit` module)." @@ -1541,7 +1574,7 @@ msgstr "" "Écrire des scripts d'évaluation de performances permet de progresser " "rapidement dans la recherche d'améliorations (voir le module :mod:`timeit`)." -#: faq/programming.rst:1017 +#: faq/programming.rst:1038 msgid "" "It is highly recommended to have good code coverage (through unit testing or " "any other technique) before potentially introducing regressions hidden in " @@ -1551,7 +1584,7 @@ msgstr "" "des tests unitaires ou autre) avant d'ajouter des erreurs dans des " "optimisations sophistiquées." -#: faq/programming.rst:1021 +#: faq/programming.rst:1042 msgid "" "That being said, there are many tricks to speed up Python code. Here are " "some general principles which go a long way towards reaching acceptable " @@ -1559,19 +1592,19 @@ msgid "" msgstr "" "Ceci étant dit, il y a beaucoup d'astuces pour accélérer du code Python. " "Voici quelques principes généraux qui peuvent aider à atteindre des niveaux " -"de performance satisfaisants :" +"de performance satisfaisants :" -#: faq/programming.rst:1025 +#: faq/programming.rst:1046 msgid "" "Making your algorithms faster (or changing to faster ones) can yield much " "larger benefits than trying to sprinkle micro-optimization tricks all over " "your code." msgstr "" "Améliorer les algorithmes (ou en changer pour des plus performants) peut " -"produire de bien meilleurs résultats que d'optimiser ça et là de petites " +"produire de bien meilleurs résultats que d'optimiser çà et là de petites " "portions du code." -#: faq/programming.rst:1029 +#: faq/programming.rst:1050 msgid "" "Use the right data structures. Study documentation for the :ref:`bltin-" "types` and the :mod:`collections` module." @@ -1579,7 +1612,7 @@ msgstr "" "Utiliser les structures de données adaptées. Se référer à la documentation " "des :ref:`bltin-types` et du module :mod:`collections`." -#: faq/programming.rst:1032 +#: faq/programming.rst:1053 msgid "" "When the standard library provides a primitive for doing something, it is " "likely (although not guaranteed) to be faster than any alternative you may " @@ -1591,14 +1624,14 @@ msgid "" msgstr "" "Quand la bibliothèque standard fournit une implémentation pour quelque " "chose, il y a de fortes chances (même si ce n'est pas systématique) que " -"cette implémentation soit plus rapide que la votre. C'est d'autant plus vrai " +"cette implémentation soit plus rapide que la vôtre. C'est d'autant plus vrai " "pour les routines écrites en C, comme les routines natives et certaines " "extensions de types. Par exemple, il faut utiliser la méthode native :meth:" "`list.sort` ou la fonction :func:`sorted` similaire pour classer (et se " "référer à la section :ref:`sortinghowto` pour des exemples d'utilisation " "courante)." -#: faq/programming.rst:1040 +#: faq/programming.rst:1061 msgid "" "Abstractions tend to create indirections and force the interpreter to work " "more. If the levels of indirection outweigh the amount of useful work done, " @@ -1612,7 +1645,7 @@ msgstr "" "éviter trop d'indirections, en particulier sous la forme de fonctions ou " "méthodes trop petites (qui nuisent aussi souvent à la clarté du code)." -#: faq/programming.rst:1046 +#: faq/programming.rst:1067 msgid "" "If you have reached the limit of what pure Python can allow, there are tools " "to take you further away. For example, `Cython `_ can " @@ -1623,7 +1656,7 @@ msgid "" "skills, you can also :ref:`write a C extension module ` " "yourself." msgstr "" -"Si vous atteignez les limites de ce que du Python « pur » permet de faire, " +"Si vous atteignez les limites de ce que du Python « pur » permet de faire, " "il y a des outils qui permettent d'aller plus loin. Par exemple, `Cython " "`_ peut compiler une version légèrement modifiée de code " "Python en une extension C et est disponible sur de nombreuses plate-formes. " @@ -1633,7 +1666,7 @@ msgstr "" "vous pouvez aussi :ref:`écrire un module d'extension en C` " "vous-même." -#: faq/programming.rst:1056 +#: faq/programming.rst:1077 msgid "" "The wiki page devoted to `performance tips `_." @@ -1641,13 +1674,13 @@ msgstr "" "La page wiki dédiée aux `astuces de performance `_." -#: faq/programming.rst:1062 +#: faq/programming.rst:1083 msgid "What is the most efficient way to concatenate many strings together?" msgstr "" "Quelle est la manière la plus efficace de concaténer un grand nombre de " -"chaînes de caractères ?" +"chaînes de caractères ?" -#: faq/programming.rst:1064 +#: faq/programming.rst:1085 msgid "" ":class:`str` and :class:`bytes` objects are immutable, therefore " "concatenating many strings together is inefficient as each concatenation " @@ -1660,22 +1693,22 @@ msgstr "" "général, la complexité est quadratique par rapport à la taille totale de la " "chaîne." -#: faq/programming.rst:1069 +#: faq/programming.rst:1090 msgid "" "To accumulate many :class:`str` objects, the recommended idiom is to place " "them into a list and call :meth:`str.join` at the end::" msgstr "" -"Pour mettre bout-à-bout un grand nombre d'objets :class:`str`, la technique " +"Pour mettre bout à bout un grand nombre d'objets :class:`str`, la technique " "recommandée consiste à toutes les mettre dans une liste et appeler la " "méthode :meth:`str.join` à la fin ::" -#: faq/programming.rst:1077 +#: faq/programming.rst:1098 msgid "(another reasonably efficient idiom is to use :class:`io.StringIO`)" msgstr "" "(une autre technique relativement efficace consiste à utiliser :class:`io." "StringIO`)" -#: faq/programming.rst:1079 +#: faq/programming.rst:1100 msgid "" "To accumulate many :class:`bytes` objects, the recommended idiom is to " "extend a :class:`bytearray` object using in-place concatenation (the ``+=`` " @@ -1685,15 +1718,15 @@ msgstr "" "recommandée consiste à étendre un objet :class:`bytearray` en utilisant la " "concaténation en-place (l'opérateur ``+=``) ::" -#: faq/programming.rst:1088 +#: faq/programming.rst:1109 msgid "Sequences (Tuples/Lists)" msgstr "Séquences (*n*-uplets / listes)" -#: faq/programming.rst:1091 +#: faq/programming.rst:1112 msgid "How do I convert between tuples and lists?" -msgstr "Comment convertir les listes en *n*-uplets et inversement ?" +msgstr "Comment convertir les listes en *n*-uplets et inversement ?" -#: faq/programming.rst:1093 +#: faq/programming.rst:1114 msgid "" "The type constructor ``tuple(seq)`` converts any sequence (actually, any " "iterable) into a tuple with the same items in the same order." @@ -1702,7 +1735,7 @@ msgstr "" "précisément, tout itérable) en un *n*-uplet avec les mêmes éléments dans le " "même ordre." -#: faq/programming.rst:1096 +#: faq/programming.rst:1117 msgid "" "For example, ``tuple([1, 2, 3])`` yields ``(1, 2, 3)`` and ``tuple('abc')`` " "yields ``('a', 'b', 'c')``. If the argument is a tuple, it does not make a " @@ -1715,7 +1748,7 @@ msgstr "" "fonction économique à appeler quand vous ne savez pas si votre objet est " "déjà un *n*-uplet." -#: faq/programming.rst:1101 +#: faq/programming.rst:1122 msgid "" "The type constructor ``list(seq)`` converts any sequence or iterable into a " "list with the same items in the same order. For example, ``list((1, 2, " @@ -1728,11 +1761,11 @@ msgstr "" "``['a','b','c']``. Si l'argument est une liste, il renvoie une copie, de la " "même façon que ``seq[:]``." -#: faq/programming.rst:1108 +#: faq/programming.rst:1129 msgid "What's a negative index?" -msgstr "Qu'est-ce qu'un index négatif ?" +msgstr "Qu'est-ce qu'un indice négatif ?" -#: faq/programming.rst:1110 +#: faq/programming.rst:1131 msgid "" "Python sequences are indexed with positive numbers and negative numbers. " "For positive numbers 0 is the first index 1 is the second index and so " @@ -1740,13 +1773,13 @@ msgid "" "(next to last) index and so forth. Think of ``seq[-n]`` as the same as " "``seq[len(seq)-n]``." msgstr "" -"Les séquences Python sont indexées avec des nombres positifs aussi bien que " +"Les séquences Python sont indicées avec des nombres positifs aussi bien que " "négatifs. Pour les nombres positifs, 0 est le premier indice, 1 est le " "deuxième, et ainsi de suite. Pour les indices négatifs, ``-1`` est le " -"dernier index, ``-2`` est le pénultième (avant-dernier), et ainsi de suite. " +"dernier indice, ``-2`` est le pénultième (avant-dernier), et ainsi de suite. " "On peut aussi dire que ``seq[-n]`` est équivalent à ``seq[len(seq)-n]``." -#: faq/programming.rst:1115 +#: faq/programming.rst:1136 msgid "" "Using negative indices can be very convenient. For example ``S[:-1]`` is " "all of the string except for its last character, which is useful for " @@ -1757,15 +1790,15 @@ msgstr "" "caractère, ce qui est pratique pour retirer un caractère de fin de ligne à " "la fin d'une chaîne." -#: faq/programming.rst:1121 +#: faq/programming.rst:1142 msgid "How do I iterate over a sequence in reverse order?" -msgstr "Comment itérer à rebours sur une séquence ?" +msgstr "Comment itérer à rebours sur une séquence ?" -#: faq/programming.rst:1123 +#: faq/programming.rst:1144 msgid "Use the :func:`reversed` built-in function::" msgstr "Utilisez la fonction native :func:`reversed` ::" -#: faq/programming.rst:1128 +#: faq/programming.rst:1149 msgid "" "This won't touch your original sequence, but build a new copy with reversed " "order to iterate over." @@ -1773,21 +1806,21 @@ msgstr "" "Cela ne modifie pas la séquence initiale, mais construit à la place une " "copie en ordre inverse pour itérer dessus." -#: faq/programming.rst:1133 +#: faq/programming.rst:1154 msgid "How do you remove duplicates from a list?" -msgstr "Comment retirer les doublons d'une liste ?" +msgstr "Comment retirer les doublons d'une liste ?" -#: faq/programming.rst:1135 +#: faq/programming.rst:1156 msgid "See the Python Cookbook for a long discussion of many ways to do this:" msgstr "" -"Lisez le « livre de recettes » Python pour trouver une longue discussion sur " -"les nombreuses approches possibles :" +"Lisez le « livre de recettes » Python pour trouver une longue discussion sur " +"les nombreuses approches possibles :" -#: faq/programming.rst:1137 +#: faq/programming.rst:1158 msgid "https://code.activestate.com/recipes/52560/" msgstr "https://code.activestate.com/recipes/52560/" -#: faq/programming.rst:1139 +#: faq/programming.rst:1160 msgid "" "If you don't mind reordering the list, sort it and then scan from the end of " "the list, deleting duplicates as you go::" @@ -1796,16 +1829,16 @@ msgstr "" "celle-ci, puis parcourez-la d'un bout à l'autre, en supprimant les doublons " "trouvés en chemin ::" -#: faq/programming.rst:1151 +#: faq/programming.rst:1172 msgid "" "If all elements of the list may be used as set keys (i.e. they are all :term:" "`hashable`) this is often faster ::" msgstr "" "Si tous les éléments de la liste peuvent être utilisés comme des clés de " -"dictionnaire (c'est à dire, qu'elles sont toutes :term:`hachables " -"`) ceci est souvent plus rapide ::" +"dictionnaire (c'est-à-dire, qu'elles sont toutes :term:`hachables " +"`) ceci est souvent plus rapide ::" -#: faq/programming.rst:1156 +#: faq/programming.rst:1177 msgid "" "This converts the list into a set, thereby removing duplicates, and then " "back into a list." @@ -1813,11 +1846,11 @@ msgstr "" "Ceci convertit la liste en un ensemble, ce qui supprime automatiquement les " "doublons, puis la transforme à nouveau en liste." -#: faq/programming.rst:1161 +#: faq/programming.rst:1182 msgid "How do you remove multiple items from a list" msgstr "Comment retirer les doublons d'une liste" -#: faq/programming.rst:1163 +#: faq/programming.rst:1184 msgid "" "As with removing duplicates, explicitly iterating in reverse with a delete " "condition is one possibility. However, it is easier and faster to use slice " @@ -1829,49 +1862,48 @@ msgstr "" "plus rapide d’utiliser le remplacement des tranches par une itération avant, " "implicite ou explicite. Voici trois variantes. ::" -#: faq/programming.rst:1172 +#: faq/programming.rst:1193 msgid "The list comprehension may be fastest." msgstr "La liste en compréhension est peut-être la plus rapide ::" -#: faq/programming.rst:1176 +#: faq/programming.rst:1197 msgid "How do you make an array in Python?" -msgstr "Comment construire un tableau en Python ?" +msgstr "Comment construire un tableau en Python ?" -#: faq/programming.rst:1178 +#: faq/programming.rst:1199 msgid "Use a list::" msgstr "Utilisez une liste ::" -#: faq/programming.rst:1182 +#: faq/programming.rst:1203 msgid "" "Lists are equivalent to C or Pascal arrays in their time complexity; the " "primary difference is that a Python list can contain objects of many " "different types." msgstr "" -"Les listes ont un coût équivalent à celui des tableaux C ou Pascal ; la " +"Les listes ont un coût équivalent à celui des tableaux C ou Pascal ; la " "principale différence est qu'une liste Python peut contenir des objets de " "différents types." -#: faq/programming.rst:1185 +#: faq/programming.rst:1206 msgid "" "The ``array`` module also provides methods for creating arrays of fixed " "types with compact representations, but they are slower to index than " -"lists. Also note that the Numeric extensions and others define array-like " -"structures with various characteristics as well." +"lists. Also note that NumPy and other third party packages define array-" +"like structures with various characteristics as well." msgstr "" "Le module ``array`` fournit des méthodes pour créer des tableaux de types " "fixes dans une représentation compacte, mais ils sont plus lents à indexer " -"que les listes. Notez aussi que l'extension ``Numeric`` (et d'autres) " -"fournissent différentes structures de type tableaux, avec des " -"caractéristiques différentes." +"que les listes. Notez aussi que NumPy (et d'autres) fournissent différentes " +"structures de type tableaux, avec des caractéristiques différentes." -#: faq/programming.rst:1190 +#: faq/programming.rst:1211 msgid "" "To get Lisp-style linked lists, you can emulate cons cells using tuples::" msgstr "" "Pour obtenir des listes chaînées à la sauce Lisp, vous pouvez émuler les " "*cons cells* en utilisant des *n*-uplets ::" -#: faq/programming.rst:1194 +#: faq/programming.rst:1215 msgid "" "If mutability is desired, you could use lists instead of tuples. Here the " "analogue of lisp car is ``lisp_list[0]`` and the analogue of cdr is " @@ -1884,27 +1916,27 @@ msgstr "" "ceci que si vous êtes réellement sûr d'en avoir besoin, cette méthode est en " "général bien plus lente que les listes Python." -#: faq/programming.rst:1203 +#: faq/programming.rst:1224 msgid "How do I create a multidimensional list?" -msgstr "Comment créer une liste à plusieurs dimensions ?" +msgstr "Comment créer une liste à plusieurs dimensions ?" -#: faq/programming.rst:1205 +#: faq/programming.rst:1226 msgid "You probably tried to make a multidimensional array like this::" msgstr "" "Vous avez probablement essayé de créer une liste à plusieurs dimensions de " "cette façon ::" -#: faq/programming.rst:1209 +#: faq/programming.rst:1230 msgid "This looks correct if you print it:" -msgstr "Elle semble correcte si on l'affiche :" +msgstr "Elle semble correcte si on l'affiche :" -#: faq/programming.rst:1220 +#: faq/programming.rst:1241 msgid "But when you assign a value, it shows up in multiple places:" msgstr "" "Mais quand vous affectez une valeur, celle-ci apparaît à plusieurs " -"endroits ::" +"endroits ::" -#: faq/programming.rst:1232 +#: faq/programming.rst:1253 msgid "" "The reason is that replicating a list with ``*`` doesn't create copies, it " "only creates references to the existing objects. The ``*3`` creates a list " @@ -1917,7 +1949,7 @@ msgstr "" "dans une colonne apparaîtra donc dans toutes les colonnes, ce qui n'est très " "probablement pas ce que vous souhaitiez." -#: faq/programming.rst:1237 +#: faq/programming.rst:1258 msgid "" "The suggested approach is to create a list of the desired length first and " "then fill in each element with a newly created list::" @@ -1925,7 +1957,7 @@ msgstr "" "L'approche suggérée est d'abord de créer une liste de la longueur désirée, " "puis de remplir tous les éléments avec une nouvelle chaîne ::" -#: faq/programming.rst:1244 +#: faq/programming.rst:1265 msgid "" "This generates a list containing 3 different lists of length two. You can " "also use a list comprehension::" @@ -1934,40 +1966,40 @@ msgstr "" "longueur deux. Vous pouvez aussi utiliser la syntaxe des listes en " "compréhension ::" -#: faq/programming.rst:1250 +#: faq/programming.rst:1271 msgid "" "Or, you can use an extension that provides a matrix datatype; `NumPy `_ is the best known." msgstr "" "Vous pouvez aussi utiliser une extension qui fournit un type matriciel " -"natif ; `NumPy `_ est la plus répandue." +"natif ; `NumPy `_ est la plus répandue." -#: faq/programming.rst:1255 +#: faq/programming.rst:1276 msgid "How do I apply a method to a sequence of objects?" -msgstr "Comment appliquer une méthode à une séquence d'objets ?" +msgstr "Comment appliquer une méthode à une séquence d'objets ?" -#: faq/programming.rst:1257 +#: faq/programming.rst:1278 msgid "Use a list comprehension::" msgstr "Utilisez une liste en compréhension ::" -#: faq/programming.rst:1264 +#: faq/programming.rst:1285 msgid "" "Why does a_tuple[i] += ['item'] raise an exception when the addition works?" msgstr "" "Pourquoi ``a_tuple[i] += ['item']`` lève-t-il une exception alors que " -"l'addition fonctionne ?" +"l'addition fonctionne ?" -#: faq/programming.rst:1266 +#: faq/programming.rst:1287 msgid "" "This is because of a combination of the fact that augmented assignment " "operators are *assignment* operators, and the difference between mutable and " "immutable objects in Python." msgstr "" -"Ceci est dû à la combinaison de deux facteurs : le fait que les opérateurs " +"Ceci est dû à la combinaison de deux facteurs : le fait que les opérateurs " "d'affectation incrémentaux sont des opérateurs d'*affectation* et à la " "différence entre les objets muables et immuables en Python." -#: faq/programming.rst:1270 +#: faq/programming.rst:1291 msgid "" "This discussion applies in general when augmented assignment operators are " "applied to elements of a tuple that point to mutable objects, but we'll use " @@ -1977,11 +2009,11 @@ msgstr "" "incrémentale sont appliqués aux éléments d'un *n*-uplet qui pointe sur des " "objets muables, mais on prendra ``list`` et ``+=`` comme exemple." -#: faq/programming.rst:1274 +#: faq/programming.rst:1295 msgid "If you wrote::" msgstr "Si vous écrivez ::" -#: faq/programming.rst:1282 +#: faq/programming.rst:1303 msgid "" "The reason for the exception should be immediately clear: ``1`` is added to " "the object ``a_tuple[0]`` points to (``1``), producing the result object, " @@ -1989,13 +2021,13 @@ msgid "" "to element ``0`` of the tuple, we get an error because we can't change what " "an element of a tuple points to." msgstr "" -"La cause de l'exception est claire : ``1`` est ajouté à l'objet " +"La cause de l'exception est claire : ``1`` est ajouté à l'objet " "``a_tuple[0]`` qui pointe sur (``1``), ce qui produit l'objet résultant " "``2``, mais, lorsque l'on tente d'affecter le résultat du calcul, ``2``, à " "l'élément ``0`` du *n*-uplet, on obtient une erreur car il est impossible de " "modifier la cible sur laquelle pointe un élément d'un *n*-uplet." -#: faq/programming.rst:1288 +#: faq/programming.rst:1309 msgid "" "Under the covers, what this augmented assignment statement is doing is " "approximately this::" @@ -2003,7 +2035,7 @@ msgstr "" "Sous le capot, une instruction d'affectation incrémentale fait à peu près " "ceci ::" -#: faq/programming.rst:1297 +#: faq/programming.rst:1318 msgid "" "It is the assignment part of the operation that produces the error, since a " "tuple is immutable." @@ -2011,11 +2043,11 @@ msgstr "" "C'est la partie de l'affectation de l'opération qui génère l'erreur, vu " "qu'un *n*-uplet est immuable." -#: faq/programming.rst:1300 +#: faq/programming.rst:1321 msgid "When you write something like::" msgstr "Quand vous écrivez un code du style ::" -#: faq/programming.rst:1308 +#: faq/programming.rst:1329 msgid "" "The exception is a bit more surprising, and even more surprising is the fact " "that even though there was an error, the append worked::" @@ -2023,7 +2055,7 @@ msgstr "" "L'exception est un peu plus surprenante et, chose encore plus étrange, " "malgré l'erreur, l'ajout a fonctionné ::" -#: faq/programming.rst:1314 +#: faq/programming.rst:1335 msgid "" "To see why this happens, you need to know that (a) if an object implements " "an ``__iadd__`` magic method, it gets called when the ``+=`` augmented " @@ -2035,16 +2067,16 @@ msgstr "" "Pour comprendre ce qui se passe, il faut savoir que, premièrement, si un " "objet implémente la méthode magique c, celle-ci est appelée quand " "l'affectation incrémentale ``+=`` est exécutée et sa valeur de retour est " -"utilisée dans l'instruction d'affectation ; et que, deuxièmement, pour les " +"utilisée dans l'instruction d'affectation ; et que, deuxièmement, pour les " "listes, ``__iadd__`` équivaut à appeler ``extend`` sur la liste et à " "renvoyer celle-ci. C'est pour cette raison que l'on dit que pour les listes, " "``+=`` est un \"raccourci\" pour ``list.extend`` ::" -#: faq/programming.rst:1326 +#: faq/programming.rst:1347 msgid "This is equivalent to::" msgstr "C’est équivalent à ::" -#: faq/programming.rst:1331 +#: faq/programming.rst:1352 msgid "" "The object pointed to by a_list has been mutated, and the pointer to the " "mutated object is assigned back to ``a_list``. The end result of the " @@ -2056,13 +2088,13 @@ msgstr "" "change rien, puisque c'est un pointeur vers le même objet que sur lequel " "pointait ``a_list``, mais l'affectation a tout de même lieu." -#: faq/programming.rst:1336 +#: faq/programming.rst:1357 msgid "Thus, in our tuple example what is happening is equivalent to::" msgstr "" "Donc, dans notre exemple avec un *n*-uplet, il se passe quelque chose " "équivalent à ::" -#: faq/programming.rst:1344 +#: faq/programming.rst:1365 msgid "" "The ``__iadd__`` succeeds, and thus the list is extended, but even though " "``result`` points to the same object that ``a_tuple[0]`` already points to, " @@ -2073,15 +2105,15 @@ msgstr "" "``result`` pointe sur le même objet que ``a_tuple[0]``, l'affectation finale " "échoue car les *n*-uplets ne sont pas muables." -#: faq/programming.rst:1350 +#: faq/programming.rst:1371 msgid "" "I want to do a complicated sort: can you do a Schwartzian Transform in " "Python?" msgstr "" -"Je souhaite faire un classement compliqué : peut on faire une transformation " +"Je souhaite faire un classement compliqué : peut-on faire une transformation " "de Schwartz en Python ?" -#: faq/programming.rst:1352 +#: faq/programming.rst:1373 msgid "" "The technique, attributed to Randal Schwartz of the Perl community, sorts " "the elements of a list by a metric which maps each element to its \"sort " @@ -2093,27 +2125,27 @@ msgstr "" "chaque élément à sa \"valeur de tri\". En Python, ceci est géré par " "l'argument ``key`` de la méthode :meth:`list.sort` ::" -#: faq/programming.rst:1361 +#: faq/programming.rst:1382 msgid "How can I sort one list by values from another list?" -msgstr "Comment ordonner une liste en fonction des valeurs d'une autre liste ?" +msgstr "Comment ordonner une liste en fonction des valeurs d'une autre liste ?" -#: faq/programming.rst:1363 +#: faq/programming.rst:1384 msgid "" "Merge them into an iterator of tuples, sort the resulting list, and then " "pick out the element you want. ::" msgstr "" "Fusionnez-les dans un itérateur de *n*-uplets, ordonnez la liste obtenue, " -"puis choisissez l'élément que vous voulez ::" +"puis choisissez l'élément que vous voulez ::" -#: faq/programming.rst:1378 +#: faq/programming.rst:1399 msgid "Objects" msgstr "Objets" -#: faq/programming.rst:1381 +#: faq/programming.rst:1402 msgid "What is a class?" msgstr "Qu'est-ce qu'une classe ?" -#: faq/programming.rst:1383 +#: faq/programming.rst:1404 msgid "" "A class is the particular object type created by executing a class " "statement. Class objects are used as templates to create instance objects, " @@ -2125,7 +2157,7 @@ msgstr "" "créer des objets, qui incarnent à la fois les données (attributs) et le code " "(méthodes) spécifiques à un type de données." -#: faq/programming.rst:1387 +#: faq/programming.rst:1408 msgid "" "A class can be based on one or more other classes, called its base " "class(es). It then inherits the attributes and methods of its base classes. " @@ -2143,11 +2175,11 @@ msgstr "" "``MaildirMailbox``, ``OutlookMailbox`` qui gèrent les plusieurs formats " "spécifiques de boîtes aux lettres." -#: faq/programming.rst:1396 +#: faq/programming.rst:1417 msgid "What is a method?" -msgstr "Qu'est-ce qu'une méthode ?" +msgstr "Qu'est-ce qu'une méthode ?" -#: faq/programming.rst:1398 +#: faq/programming.rst:1419 msgid "" "A method is a function on some object ``x`` that you normally call as ``x." "name(arguments...)``. Methods are defined as functions inside the class " @@ -2157,11 +2189,11 @@ msgstr "" "générale sous la forme ``x.name(arguments…)``. Les méthodes sont définies " "comme des fonctions à l'intérieur de la définition de classe ::" -#: faq/programming.rst:1408 +#: faq/programming.rst:1429 msgid "What is self?" -msgstr "Qu'est-ce que self ?" +msgstr "Qu'est-ce que self ?" -#: faq/programming.rst:1410 +#: faq/programming.rst:1431 msgid "" "Self is merely a conventional name for the first argument of a method. A " "method defined as ``meth(self, a, b, c)`` should be called as ``x.meth(a, b, " @@ -2171,22 +2203,22 @@ msgstr "" "Par convention, le premier argument d'une méthode est appelé self. Une " "méthode ``meth(self, a, b, c)`` doit être appelée sous la forme ``x.meth(a, " "b, c)`` où ``x`` est une instance de la classe dans laquelle cette méthode " -"est définie ; tout se passe comme si la méthode était appelée comme " +"est définie ; tout se passe comme si la méthode était appelée comme " "``meth(x, a, b, c)``." -#: faq/programming.rst:1415 +#: faq/programming.rst:1436 msgid "See also :ref:`why-self`." msgstr "Voir aussi :ref:`why-self`." -#: faq/programming.rst:1419 +#: faq/programming.rst:1440 msgid "" "How do I check if an object is an instance of a given class or of a subclass " "of it?" msgstr "" "Comment vérifier si un objet est une instance d'une classe donnée ou d'une " -"sous-classe de celle-ci ?" +"sous-classe de celle-ci ?" -#: faq/programming.rst:1421 +#: faq/programming.rst:1442 msgid "" "Use the built-in function ``isinstance(obj, cls)``. You can check if an " "object is an instance of any of a number of classes by providing a tuple " @@ -2201,15 +2233,21 @@ msgstr "" "l'un des types natifs de Python, par exemple ``isinstance(obj, str)`` ou " "``isinstance(obj, (int, float, complex))``." -#: faq/programming.rst:1427 +#: faq/programming.rst:1448 msgid "" "Note that :func:`isinstance` also checks for virtual inheritance from an :" "term:`abstract base class`. So, the test will return ``True`` for a " "registered class even if hasn't directly or indirectly inherited from it. " "To test for \"true inheritance\", scan the :term:`MRO` of the class:" msgstr "" +"Notez que :func:`isinstance` prend aussi en compte l'héritage virtuel d'une :" +"term:`classe de base abstraite `, c'est à dire qu'elle " +"renvoie ``True`` pour une classe A enregistrée auprès d'une classe de base " +"abstraite B même si A n'est pas directement ou indirectement une classe " +"fille de B. Pour vérifier l'héritage dans le sens plus restreint, parcourez " +"l'\\ :term:`ordre de résolution des méthodes ` de la classe :" -#: faq/programming.rst:1462 +#: faq/programming.rst:1483 msgid "" "Note that most programs do not use :func:`isinstance` on user-defined " "classes very often. If you are developing the classes yourself, a more " @@ -2225,7 +2263,7 @@ msgstr "" "plutôt que de vérifier la classe de l'objet et de faire un traitement ad-" "hoc. Par exemple, si vous avez une fonction qui fait quelque chose ::" -#: faq/programming.rst:1476 +#: faq/programming.rst:1497 msgid "" "A better approach is to define a ``search()`` method on all the classes and " "just call it::" @@ -2233,11 +2271,11 @@ msgstr "" "Une meilleure approche est de définir une méthode ``search()`` dans toutes " "les classes et qu'il suffit d'appeler de la manière suivante ::" -#: faq/programming.rst:1491 +#: faq/programming.rst:1512 msgid "What is delegation?" -msgstr "Qu'est-ce que la délégation ?" +msgstr "Qu'est-ce que la délégation ?" -#: faq/programming.rst:1493 +#: faq/programming.rst:1514 msgid "" "Delegation is an object oriented technique (also called a design pattern). " "Let's say you have an object ``x`` and want to change the behaviour of just " @@ -2252,7 +2290,7 @@ msgstr "" "dans l'évolution et qui délègue toute autre méthode à la méthode " "correspondante de ``x``." -#: faq/programming.rst:1499 +#: faq/programming.rst:1520 msgid "" "Python programmers can easily implement delegation. For example, the " "following class implements a class that behaves like a file but converts all " @@ -2262,7 +2300,7 @@ msgstr "" "Par exemple, la classe suivante implémente une classe qui se comporte comme " "un fichier, mais convertit toutes les données écrites en majuscules ::" -#: faq/programming.rst:1514 +#: faq/programming.rst:1535 msgid "" "Here the ``UpperOut`` class redefines the ``write()`` method to convert the " "argument string to uppercase before calling the underlying ``self._outfile." @@ -2279,7 +2317,7 @@ msgstr "" "` pour plus d'informations sur la personnalisation de " "l’accès aux attributs." -#: faq/programming.rst:1521 +#: faq/programming.rst:1542 msgid "" "Note that for more general cases delegation can get trickier. When " "attributes must be set as well as retrieved, the class must define a :meth:" @@ -2293,7 +2331,7 @@ msgstr "" "et il doit le faire avec soin. La mise en œuvre basique de la méthode :meth:" "`__setattr__` est à peu près équivalent à ce qui suit ::" -#: faq/programming.rst:1532 +#: faq/programming.rst:1553 msgid "" "Most :meth:`__setattr__` implementations must modify ``self.__dict__`` to " "store local state for self without causing an infinite recursion." @@ -2302,40 +2340,38 @@ msgstr "" "``self.__dict__`` pour stocker l'état local de self sans provoquer une " "récursion infinie." -#: faq/programming.rst:1537 +#: faq/programming.rst:1558 msgid "" "How do I call a method defined in a base class from a derived class that " -"overrides it?" +"extends it?" msgstr "" "Comment appeler une méthode définie dans une classe de base depuis une " -"classe dérivée qui la surcharge ?" +"classe dérivée qui la surcharge ?" -#: faq/programming.rst:1539 +#: faq/programming.rst:1560 msgid "Use the built-in :func:`super` function::" msgstr "Utilisez la fonction native :func:`super` ::" -#: faq/programming.rst:1545 +#: faq/programming.rst:1566 msgid "" -"For version prior to 3.0, you may be using classic classes: For a class " -"definition such as ``class Derived(Base): ...`` you can call method " -"``meth()`` defined in ``Base`` (or one of ``Base``'s base classes) as ``Base." -"meth(self, arguments...)``. Here, ``Base.meth`` is an unbound method, so " -"you need to provide the ``self`` argument." +"In the example, :func:`super` will automatically determine the instance from " +"which it was called (the ``self`` value), look up the :term:`method " +"resolution order` (MRO) with ``type(self).__mro__``, and return the next in " +"line after ``Derived`` in the MRO: ``Base``." msgstr "" -"Pour les versions antérieures à 3.0, vous pouvez utiliser des classes " -"classiques : pour une définition de classe comme ``class Derived(Base): ..." -"`` vous pouvez appeler la méthode ``meth()`` définie dans ``Base`` (ou l'une " -"des classes de base de ``Base``) en faisant ``Base.meth(self, " -"arguments...)``. Ici, ``Base.meth`` est une méthode non liée, il faut donc " -"fournir l'argument ``self``." +"Dans cet exemple, :func:`super` détermine automatiquement l'instance dont " +"une méthode l'appelle (l'objet ``self``), observe l'\\ :term:`ordre de " +"résolution des méthodes ` obtenu avec ``type(self)." +"__mro__``, et renvoie la classe qui suit ``Derived`` dans cet ordre, donc " +"``Base``." -#: faq/programming.rst:1553 +#: faq/programming.rst:1573 msgid "How can I organize my code to make it easier to change the base class?" msgstr "" "Comment organiser un code pour permettre de changer la classe de base plus " -"facilement ?" +"facilement ?" -#: faq/programming.rst:1555 +#: faq/programming.rst:1575 msgid "" "You could assign the base class to an alias and derive from the alias. Then " "all you have to change is the value assigned to the alias. Incidentally, " @@ -2348,13 +2384,13 @@ msgstr "" "dynamiquement (par exemple en fonction de la disponibilité de certaines " "ressources) la classe de base à utiliser. Exemple ::" -#: faq/programming.rst:1570 +#: faq/programming.rst:1590 msgid "How do I create static class data and static class methods?" msgstr "" "Comment créer des données statiques de classe et des méthodes statiques de " -"classe ?" +"classe ?" -#: faq/programming.rst:1572 +#: faq/programming.rst:1592 msgid "" "Both static data and static methods (in the sense of C++ or Java) are " "supported in Python." @@ -2362,7 +2398,7 @@ msgstr "" "Les données statiques et les méthodes statiques (au sens C++ ou Java) sont " "prises en charge en Python." -#: faq/programming.rst:1575 +#: faq/programming.rst:1595 msgid "" "For static data, simply define a class attribute. To assign a new value to " "the attribute, you have to explicitly use the class name in the assignment::" @@ -2371,7 +2407,7 @@ msgstr "" "attribuer une nouvelle valeur à l'attribut, vous devez explicitement " "utiliser le nom de classe dans l'affectation ::" -#: faq/programming.rst:1587 +#: faq/programming.rst:1607 msgid "" "``c.count`` also refers to ``C.count`` for any ``c`` such that " "``isinstance(c, C)`` holds, unless overridden by ``c`` itself or by some " @@ -2382,24 +2418,24 @@ msgstr "" "une classe sur le chemin de recherche de classe de base de ``c.__class__`` " "jusqu'à ``C``." -#: faq/programming.rst:1591 +#: faq/programming.rst:1611 msgid "" "Caution: within a method of C, an assignment like ``self.count = 42`` " "creates a new and unrelated instance named \"count\" in ``self``'s own " "dict. Rebinding of a class-static data name must always specify the class " "whether inside a method or not::" msgstr "" -"Attention : dans une méthode de C, une affectation comme ``self.count = 42`` " +"Attention : dans une méthode de C, une affectation comme ``self.count = 42`` " "crée une nouvelle instance sans rapport avec le nom ``count`` dans le " "dictionnaire de données de ``self``. La redéfinition d'une donnée statique " "de classe doit toujours spécifier la classe, que l'on soit à l'intérieur " "d'une méthode ou non ::" -#: faq/programming.rst:1598 +#: faq/programming.rst:1618 msgid "Static methods are possible::" msgstr "Il est possible d'utiliser des méthodes statiques ::" -#: faq/programming.rst:1606 +#: faq/programming.rst:1626 msgid "" "However, a far more straightforward way to get the effect of a static method " "is via a simple module-level function::" @@ -2407,7 +2443,7 @@ msgstr "" "Cependant, d'une manière beaucoup plus simple pour obtenir l'effet d'une " "méthode statique se fait par une simple fonction au niveau du module ::" -#: faq/programming.rst:1612 +#: faq/programming.rst:1632 msgid "" "If your code is structured so as to define one class (or tightly related " "class hierarchy) per module, this supplies the desired encapsulation." @@ -2416,11 +2452,11 @@ msgstr "" "hiérarchie des classes connexes) par module, ceci fournira l'encapsulation " "souhaitée." -#: faq/programming.rst:1617 +#: faq/programming.rst:1637 msgid "How can I overload constructors (or methods) in Python?" -msgstr "Comment surcharger les constructeurs (ou méthodes) en Python ?" +msgstr "Comment surcharger les constructeurs (ou méthodes) en Python ?" -#: faq/programming.rst:1619 +#: faq/programming.rst:1639 msgid "" "This answer actually applies to all methods, but the question usually comes " "up first in the context of constructors." @@ -2428,11 +2464,11 @@ msgstr "" "Cette réponse s'applique en fait à toutes les méthodes, mais la question se " "pose généralement dans le contexte des constructeurs." -#: faq/programming.rst:1622 +#: faq/programming.rst:1642 msgid "In C++ you'd write" msgstr "En C++, on écrirait" -#: faq/programming.rst:1631 +#: faq/programming.rst:1651 msgid "" "In Python you have to write a single constructor that catches all cases " "using default arguments. For example::" @@ -2440,29 +2476,29 @@ msgstr "" "En Python, vous devez écrire un constructeur unique qui considère tous les " "cas en utilisant des arguments par défaut. Par exemple ::" -#: faq/programming.rst:1641 +#: faq/programming.rst:1661 msgid "This is not entirely equivalent, but close enough in practice." msgstr "" "Ce n'est pas tout à fait équivalent, mais suffisamment proche dans la " "pratique." -#: faq/programming.rst:1643 +#: faq/programming.rst:1663 msgid "You could also try a variable-length argument list, e.g. ::" msgstr "" "Vous pouvez aussi utiliser une liste d'arguments de longueur variable, par " -"exemple ::" +"exemple ::" -#: faq/programming.rst:1648 +#: faq/programming.rst:1668 msgid "The same approach works for all method definitions." msgstr "La même approche fonctionne pour toutes les définitions de méthode." -#: faq/programming.rst:1652 +#: faq/programming.rst:1672 msgid "I try to use __spam and I get an error about _SomeClassName__spam." msgstr "" "J'essaie d'utiliser ``__spam`` et j'obtiens une erreur à propos de " "``_SomeClassName__spam``." -#: faq/programming.rst:1654 +#: faq/programming.rst:1674 msgid "" "Variable names with double leading underscores are \"mangled\" to provide a " "simple but effective way to define class private variables. Any identifier " @@ -2471,36 +2507,36 @@ msgid "" "``classname`` is the current class name with any leading underscores " "stripped." msgstr "" -"Les noms de variables commençant avec deux tirets bas sont « déformés », " +"Les noms de variables commençant avec deux tirets bas sont « déformés », " "c'est un moyen simple mais efficace de définir des variables privées à une " "classe. Tout identifiant de la forme ``__spam`` (commençant par au moins " "deux tirets bas et se terminant par au plus un tiret bas) est textuellement " "remplacé par ``_classname__spam``, où ``classname`` est le nom de la classe " "en cours sans les éventuels tirets bas du début." -#: faq/programming.rst:1660 +#: faq/programming.rst:1680 msgid "" "This doesn't guarantee privacy: an outside user can still deliberately " "access the \"_classname__spam\" attribute, and private values are visible in " "the object's ``__dict__``. Many Python programmers never bother to use " "private variable names at all." msgstr "" -"Cela ne garantit aucune protection : un utilisateur extérieur peut encore " +"Cela ne garantit aucune protection : un utilisateur extérieur peut encore " "délibérément accéder à l'attribut ``_classname__spam`` et les valeurs " "privées sont visibles dans l'objet ``__dict__``. De nombreux programmeurs " "Python ne prennent jamais la peine d'utiliser des noms de variable privés." -#: faq/programming.rst:1667 +#: faq/programming.rst:1687 msgid "My class defines __del__ but it is not called when I delete the object." msgstr "" "Ma classe définit ``__del__`` mais elle n'est pas appelée lorsque je " "supprime l'objet." -#: faq/programming.rst:1669 +#: faq/programming.rst:1689 msgid "There are several possible reasons for this." msgstr "Il y a plusieurs explications possibles." -#: faq/programming.rst:1671 +#: faq/programming.rst:1691 msgid "" "The del statement does not necessarily call :meth:`__del__` -- it simply " "decrements the object's reference count, and if this reaches zero :meth:" @@ -2510,7 +2546,7 @@ msgstr "" "simplement le compteur de références de l'objet et, si celui-ci arrive à " "zéro, :meth:`__del__` est appelée." -#: faq/programming.rst:1675 +#: faq/programming.rst:1695 msgid "" "If your data structures contain circular links (e.g. a tree where each child " "has a parent reference and each parent has a list of children) the reference " @@ -2523,9 +2559,9 @@ msgid "" "run :func:`gc.collect` to force a collection, but there *are* pathological " "cases where objects will never be collected." msgstr "" -"Si la structure de données contient des références circulaires (e.g. un " -"arbre dans lequel chaque fils référence son père, et chaque père garde une " -"liste de ses fils), le compteur de références n'arrivera jamais à zéro. " +"Si la structure de données contient des références circulaires (par exemple " +"un arbre dans lequel chaque fils référence son père, et chaque père garde " +"une liste de ses fils), le compteur de références n'arrivera jamais à zéro. " "Python exécute périodiquement un algorithme pour détecter ce genre de " "cycles, mais il peut se passer un certain temps entre le moment où la " "structure est référencée pour la dernière fois et l'appel du ramasse-" @@ -2536,7 +2572,7 @@ msgstr "" "miettes avec la fonction :func:`gc.collect`, mais il existe certains cas où " "les objets ne seront jamais nettoyés." -#: faq/programming.rst:1686 +#: faq/programming.rst:1706 msgid "" "Despite the cycle collector, it's still a good idea to define an explicit " "``close()`` method on objects to be called whenever you're done with them. " @@ -2553,7 +2589,7 @@ msgstr "" "`__del__` devrait appeler la méthode ``close()`` et ``close()`` doit pouvoir " "être appelée plusieurs fois sur le même objet." -#: faq/programming.rst:1693 +#: faq/programming.rst:1713 msgid "" "Another way to avoid cyclical references is to use the :mod:`weakref` " "module, which allows you to point to objects without incrementing their " @@ -2564,9 +2600,9 @@ msgstr "" "module :mod:`weakref`, qui permet de faire référence à des objets sans " "incrémenter leur compteur de références. Par exemple, les structures " "d'arbres devraient utiliser des références faibles entre pères et fils (si " -"nécessaire !)." +"nécessaire !)." -#: faq/programming.rst:1706 +#: faq/programming.rst:1726 msgid "" "Finally, if your :meth:`__del__` method raises an exception, a warning " "message is printed to :data:`sys.stderr`." @@ -2574,11 +2610,11 @@ msgstr "" "Enfin, si la méthode :meth:`__del__` lève une exception, un message " "d'avertissement s'affiche dans :data:`sys.stderr`." -#: faq/programming.rst:1711 +#: faq/programming.rst:1731 msgid "How do I get a list of all instances of a given class?" -msgstr "Comment obtenir toutes les instances d'une classe ?" +msgstr "Comment obtenir toutes les instances d'une classe ?" -#: faq/programming.rst:1713 +#: faq/programming.rst:1733 msgid "" "Python does not keep track of all instances of a class (or of a built-in " "type). You can program the class's constructor to keep track of all " @@ -2589,13 +2625,13 @@ msgstr "" "constructeur de la classe de façon à tenir un tel registre, en maintenant " "une liste de références faibles vers chaque instance." -#: faq/programming.rst:1719 +#: faq/programming.rst:1739 msgid "Why does the result of ``id()`` appear to be not unique?" msgstr "" "Pourquoi le résultat de ``id()`` peut-il être le même pour deux objets " -"différents ?" +"différents ?" -#: faq/programming.rst:1721 +#: faq/programming.rst:1741 msgid "" "The :func:`id` builtin returns an integer that is guaranteed to be unique " "during the lifetime of the object. Since in CPython, this is the object's " @@ -2607,9 +2643,9 @@ msgstr "" "durant toute la vie de l'objet. Vu qu'en CPython cet entier est en réalité " "l'adresse mémoire de l'objet, il est fréquent qu'un nouvel objet soit alloué " "à une adresse mémoire identique à celle d'un objet venant d'être supprimé. " -"Comme l'illustre le code suivant :" +"Comme l'illustre le code suivant :" -#: faq/programming.rst:1732 +#: faq/programming.rst:1752 msgid "" "The two ids belong to different integer objects that are created before, and " "deleted immediately after execution of the ``id()`` call. To be sure that " @@ -2619,109 +2655,271 @@ msgstr "" "Les deux identifiants appartiennent à des objets entiers créés juste avant " "l'appel à ``id()`` et détruits immédiatement après. Pour s'assurer que les " "objets dont on veut examiner les identifiants sont toujours en vie, créons " -"une nouvelle référence à l'objet :" +"une nouvelle référence à l'objet :" -#: faq/programming.rst:1745 +#: faq/programming.rst:1765 msgid "When can I rely on identity tests with the *is* operator?" -msgstr "" +msgstr "Quand puis-je raisonnablement utiliser le test d'identité *is* ?" -#: faq/programming.rst:1747 +#: faq/programming.rst:1767 msgid "" "The ``is`` operator tests for object identity. The test ``a is b`` is " "equivalent to ``id(a) == id(b)``." msgstr "" +"L'opérateur ``is`` détermine si deux objets sont identiques, c'est-à-dire le " +"même objet. Le test ``a is b`` est équivalent à ``id(a) == id(b)``." -#: faq/programming.rst:1750 +#: faq/programming.rst:1770 msgid "" "The most important property of an identity test is that an object is always " "identical to itself, ``a is a`` always returns ``True``. Identity tests are " "usually faster than equality tests. And unlike equality tests, identity " "tests are guaranteed to return a boolean ``True`` or ``False``." msgstr "" +"La propriété la plus importante du test d'identité est qu'un objet est " +"toujours identique à lui-même. Quelle que soit la valeur de *a*, ``a is a`` " +"vaut toujours ``True``. Un test d'identité est généralement plus rapide " +"qu'un test d'égalité. De plus, contrairement à l'opérateur ``==``, " +"l'opérateur ``is`` renvoie toujours un booléen, ``True`` ou ``False``." -#: faq/programming.rst:1755 +#: faq/programming.rst:1775 msgid "" "However, identity tests can *only* be substituted for equality tests when " "object identity is assured. Generally, there are three circumstances where " "identity is guaranteed:" msgstr "" +"Cependant, les tests d'identité ne peuvent remplacer les tests d'égalité que " +"si l'identité est garantie. C'est le cas dans les trois situations " +"suivantes :" -#: faq/programming.rst:1759 +#: faq/programming.rst:1779 msgid "" "1) Assignments create new names but do not change object identity. After " "the assignment ``new = old``, it is guaranteed that ``new is old``." msgstr "" +"1) Les affectations créent de nouvelles variables, mais pas de nouveaux " +"objets. Après l'affectation ``nouveau = ancien``, ``nouveau is ancien`` vaut " +"toujours ``True``." -#: faq/programming.rst:1762 +#: faq/programming.rst:1782 msgid "" "2) Putting an object in a container that stores object references does not " "change object identity. After the list assignment ``s[0] = x``, it is " "guaranteed that ``s[0] is x``." msgstr "" +"Le stockage d'un objet dans un conteneur qui fonctionne avec des références " +"n'altère pas l'identité. Si ``s`` est une liste, alors après l'affectation " +"de *x* à l'indice 0, ``s[0] = x``, le test ``s[0] is x`` s'évalue forcément " +"à ``True``." -#: faq/programming.rst:1766 +#: faq/programming.rst:1786 msgid "" "3) If an object is a singleton, it means that only one instance of that " "object can exist. After the assignments ``a = None`` and ``b = None``, it " "is guaranteed that ``a is b`` because ``None`` is a singleton." msgstr "" +"3) Les singletons sont des objets spéciaux qui ne sont jamais dupliqués. " +"Après les affectations ``a = None`` et ``b = None``, on a forcément ``a is " +"b``, puisque ``None`` est un singleton." -#: faq/programming.rst:1770 +#: faq/programming.rst:1790 msgid "" "In most other circumstances, identity tests are inadvisable and equality " "tests are preferred. In particular, identity tests should not be used to " "check constants such as :class:`int` and :class:`str` which aren't " "guaranteed to be singletons::" msgstr "" +"Dans la plupart des autres cas, un test d'identité n'est pas approprié par " +"rapport à un test d'égalité. En particulier, il ne faut pas utiliser ``is`` " +"pour comparer à des constantes comme les entiers (type :class:`int`) ou des " +"chaînes de caractères (type :class:`str`) car ces valeurs ne sont pas " +"nécessairement des singletons ::" -#: faq/programming.rst:1787 +#: faq/programming.rst:1807 msgid "Likewise, new instances of mutable containers are never identical::" msgstr "" +"De même, deux instances fraîchement créées d'un type de conteneurs muables " +"ne sont jamais identiques ::" -#: faq/programming.rst:1794 +#: faq/programming.rst:1814 msgid "" "In the standard library code, you will see several common patterns for " "correctly using identity tests:" msgstr "" +"Voici quelques exemples de la bibliothèque standard qui illustrent comment " +"utiliser correctement les tests d'identité dans certaines situations " +"particulières :" -#: faq/programming.rst:1797 +#: faq/programming.rst:1817 msgid "" "1) As recommended by :pep:`8`, an identity test is the preferred way to " "check for ``None``. This reads like plain English in code and avoids " "confusion with other objects that may have boolean values that evaluate to " "false." msgstr "" +"1) Comme recommandé par la :pep:`8`, il est préférable de comparer avec " +"``None`` par identité. Le test se lit comme de la prose anglaise (``x is " +"None``, ``x is not None``), et cela évite des surprises avec les objets dont " +"la valeur booléenne est ``False``." -#: faq/programming.rst:1801 +#: faq/programming.rst:1821 msgid "" "2) Detecting optional arguments can be tricky when ``None`` is a valid input " -"value. In those situations, you can create an singleton sentinel object " +"value. In those situations, you can create a singleton sentinel object " "guaranteed to be distinct from other objects. For example, here is how to " "implement a method that behaves like :meth:`dict.pop`::" msgstr "" +"2) Savoir si un paramètre facultatif a été passé ou pas peut nécessiter un " +"peu de subtilité lorsque ``None`` est une valeur acceptable pour le " +"paramètre. Dans ces cas, il faut créer un objet singleton dit " +"« sentinelle », distinct de toute valeur acceptable. Voici par exemple " +"comment écrire une méthode qui émule :meth:`dict.pop` :" -#: faq/programming.rst:1817 +#: faq/programming.rst:1837 msgid "" "3) Container implementations sometimes need to augment equality tests with " "identity tests. This prevents the code from being confused by objects such " "as ``float('NaN')`` that are not equal to themselves." msgstr "" +"3) Il arrive que l'implémentation d'un type de conteneurs doive ajouter des " +"tests d'identité aux tests d'égalité, ceci afin d'éviter un comportement non " +"souhaité avec les objets comme ``float('NaN')`` qui ne sont pas égaux à eux-" +"mêmes." -#: faq/programming.rst:1821 +#: faq/programming.rst:1841 msgid "" "For example, here is the implementation of :meth:`collections.abc.Sequence." "__contains__`::" msgstr "" +"Par exemple, l'implémentation de :meth:`collections.abc.Sequence." +"__contains__` est ::" + +#: faq/programming.rst:1852 +msgid "" +"How can a subclass control what data is stored in an immutable instance?" +msgstr "" +"Comment définir dans une classe fille les attributs d'une instance immuable ?" + +#: faq/programming.rst:1854 +msgid "" +"When subclassing an immutable type, override the :meth:`__new__` method " +"instead of the :meth:`__init__` method. The latter only runs *after* an " +"instance is created, which is too late to alter data in an immutable " +"instance." +msgstr "" +"Lorsque l'on crée une classe héritant d'une classe d'objets immuables, il " +"faut remplacer la méthode :meth:`__new__`, et non pas la méthode :meth:" +"`__init__`. En effet, cette dernière est exécutée seulement après que " +"l'instance soit créée, donc il y est trop tard pour modifier le contenu " +"d'une instance si elle est immuable." + +#: faq/programming.rst:1859 +msgid "" +"All of these immutable classes have a different signature than their parent " +"class:" +msgstr "" +"Toutes les classes d'objets immuables suivantes ont des signatures de " +"constructeur différentes de leur classe mère :" + +#: faq/programming.rst:1885 +msgid "The classes can be used like this:" +msgstr "Ces classes s'utilisent comme ceci :" + +#: faq/programming.rst:1900 +msgid "How do I cache method calls?" +msgstr "Comment mettre en cache le résultat d'une méthode ?" + +#: faq/programming.rst:1902 +msgid "" +"The two principal tools for caching methods are :func:`functools." +"cached_property` and :func:`functools.lru_cache`. The former stores results " +"at the instance level and the latter at the class level." +msgstr "" +"Il existe deux outils principaux pour mettre en cache la valeur de retour " +"d'une méthode, à savoir :func:`functools.cached_property`, qui stocke les " +"valeurs au niveau de l'instance, et :func:`functools.lru_cache`, qui le fait " +"au niveau de la classe." + +#: faq/programming.rst:1907 +msgid "" +"The *cached_property* approach only works with methods that do not take any " +"arguments. It does not create a reference to the instance. The cached " +"method result will be kept only as long as the instance is alive." +msgstr "" +"La fonction ``cached_property`` n'est applicable qu'aux méthodes sans " +"argument. Elle n'induit aucune référence vers l'instance. Le cache est " +"simplement conservé aussi longtemps que l'instance elle-même." + +#: faq/programming.rst:1911 +msgid "" +"The advantage is that when an instance is no longer used, the cached method " +"result will be released right away. The disadvantage is that if instances " +"accumulate, so too will the accumulated method results. They can grow " +"without bound." +msgstr "" +"L'avantage est que le cache est supprimé aussitôt que l'instance est " +"détruite. L'inconvénient est que les caches peuvent s'accumuler avec les " +"instances, sans limite de nombre." + +#: faq/programming.rst:1916 +msgid "" +"The *lru_cache* approach works with methods that have hashable arguments. " +"It creates a reference to the instance unless special efforts are made to " +"pass in weak references." +msgstr "" +"La fonction ``lru_cache`` s'applique quant à elle aux méthodes dont les " +"arguments sont hachables. Elle crée une référence forte à l'instance, sauf à " +"passer par des circonvolutions pour que la référence soit faible." + +#: faq/programming.rst:1920 +msgid "" +"The advantage of the least recently used algorithm is that the cache is " +"bounded by the specified *maxsize*. The disadvantage is that instances are " +"kept alive until they age out of the cache or until the cache is cleared." +msgstr "" +"L'avantage de l'algorithme LRU est d'offrir une limitation sur la taille du " +"cache, que l'on peut régler avec le paramètre *maxsize* (NdT : LRU signifie " +"*Least Recently Used* en anglais, les entrées du cache les plus anciennes " +"sont évincées pour conserver la taille). L'inconvénient est qu'une référence " +"forte vers l'instance est conservée dans le cache, ce qui maintient " +"l'instance hors de portée du ramasse-miettes jusqu'à ce que l'entrée soit " +"effacée du cache ou que le cache soit remis à zéro." + +#: faq/programming.rst:1925 +msgid "This example shows the various techniques::" +msgstr "Voici une démonstration des différentes techniques ::" + +#: faq/programming.rst:1949 +msgid "" +"The above example assumes that the *station_id* never changes. If the " +"relevant instance attributes are mutable, the *cached_property* approach " +"can't be made to work because it cannot detect changes to the attributes." +msgstr "" +"Cet exemple suppose que l'attribut *station_id* n'est jamais changé. Si les " +"attributs utilisés par la méthode sont susceptibles d'être modifiés, " +"``cached_property`` ne peut pas fonctionner car elle ne peut pas détecter " +"les mutations pour invalider le cache." + +#: faq/programming.rst:1954 +#, fuzzy +msgid "" +"To make the *lru_cache* approach work when the *station_id* is mutable, the " +"class needs to define the *__eq__* and *__hash__* methods so that the cache " +"can detect relevant attribute updates::" +msgstr "" +"En revanche, ``lru_cache`` est utilisable à condition de définir les " +"méthodes ``__eq__`` et ``__hash__`` pour que le cache soit à même de " +"détecter toute modification des attributs ::" -#: faq/programming.rst:1832 +#: faq/programming.rst:1980 msgid "Modules" msgstr "Modules" -#: faq/programming.rst:1835 +#: faq/programming.rst:1983 msgid "How do I create a .pyc file?" -msgstr "Comment créer des fichiers ``.pyc`` ?" +msgstr "Comment créer des fichiers ``.pyc`` ?" -#: faq/programming.rst:1837 +#: faq/programming.rst:1985 msgid "" "When a module is imported for the first time (or when the source file has " "changed since the current compiled file was created) a ``.pyc`` file " @@ -2739,7 +2937,7 @@ msgstr "" "centrale qui dépend du binaire ``python`` qui l'a créé (voir la :pep:`3147` " "pour de plus amples précisions)." -#: faq/programming.rst:1845 +#: faq/programming.rst:1993 msgid "" "One reason that a ``.pyc`` file may not be created is a permissions problem " "with the directory containing the source file, meaning that the " @@ -2754,7 +2952,7 @@ msgstr "" "utilisateur, mais que le code est exécuté en tant qu'un autre utilisateur, " "par exemple pour tester un serveur Web." -#: faq/programming.rst:1850 +#: faq/programming.rst:1998 msgid "" "Unless the :envvar:`PYTHONDONTWRITEBYTECODE` environment variable is set, " "creation of a .pyc file is automatic if you're importing a module and Python " @@ -2762,13 +2960,13 @@ msgid "" "``__pycache__`` subdirectory and write the compiled module to that " "subdirectory." msgstr "" -"La création du fichier ``.pyc`` est automatique durant l'import d'un module " -"si Python est capable (en termes de droits, d'espace disque, etc) de créer " -"un sous-dossier ``__pycache__`` et d'écrire le module ainsi compilé dans ce " -"sous-répertoire, à moins que la variable d'environnement :envvar:" +"La création du fichier ``.pyc`` est automatique durant l'importation d'un " +"module si Python est capable (en termes de droits, d'espace disque, etc) de " +"créer un sous-dossier ``__pycache__`` et d'écrire le module ainsi compilé " +"dans ce sous-répertoire, à moins que la variable d'environnement :envvar:" "`PYTHONDONTWRITEBYTECODE` soit définie." -#: faq/programming.rst:1855 +#: faq/programming.rst:2003 msgid "" "Running Python on a top level script is not considered an import and no ``." "pyc`` will be created. For example, if you have a top-level module ``foo." @@ -2778,13 +2976,13 @@ msgid "" "for ``foo`` since ``foo.py`` isn't being imported." msgstr "" "Exécuter du Python dans un script de plus haut niveau n'est pas considéré " -"comme un import et le fichier ``.pyc`` n'est pas créé. Par exemple, si un " -"module de plus haut niveau ``foo.py`` importe un autre module ``xyz.py``, " +"comme une importation et le fichier ``.pyc`` n'est pas créé. Par exemple, si " +"un module de plus haut niveau ``foo.py`` importe un autre module ``xyz.py``, " "alors à l'exécution de ``foo`` (en tapant ``python foo.py`` dans la " "console), un fichier ``.pyc`` est créé pour ``xyz`` mais pas pour ``foo`` " "car ``foo.py`` n'est pas importé." -#: faq/programming.rst:1862 +#: faq/programming.rst:2010 msgid "" "If you need to create a ``.pyc`` file for ``foo`` -- that is, to create a ``." "pyc`` file for a module that is not imported -- you can, using the :mod:" @@ -2794,7 +2992,7 @@ msgstr "" "``.pyc`` pour un module qui n'est pas importé — il existe les modules :mod:" "`py_compile` et :mod:`compileall`." -#: faq/programming.rst:1866 +#: faq/programming.rst:2014 msgid "" "The :mod:`py_compile` module can manually compile any module. One way is to " "use the ``compile()`` function in that module interactively::" @@ -2803,7 +3001,7 @@ msgstr "" "manuellement. Il est ainsi possible d'appeler la fonction ``compile()`` de " "manière interactive ::" -#: faq/programming.rst:1872 +#: faq/programming.rst:2020 msgid "" "This will write the ``.pyc`` to a ``__pycache__`` subdirectory in the same " "location as ``foo.py`` (or you can override that with the optional parameter " @@ -2813,7 +3011,7 @@ msgstr "" "de ``foo.py`` (le paramètre optionnel ``cfile`` permet de changer ce " "comportement)." -#: faq/programming.rst:1876 +#: faq/programming.rst:2024 msgid "" "You can also automatically compile all files in a directory or directories " "using the :mod:`compileall` module. You can do it from the shell prompt by " @@ -2825,11 +3023,11 @@ msgstr "" "en exécutant ``compileall.py`` avec le chemin du dossier contenant les " "fichiers Python à compiler ::" -#: faq/programming.rst:1885 +#: faq/programming.rst:2033 msgid "How do I find the current module name?" -msgstr "Comment obtenir le nom du module actuel ?" +msgstr "Comment obtenir le nom du module actuel ?" -#: faq/programming.rst:1887 +#: faq/programming.rst:2035 msgid "" "A module can find out its own module name by looking at the predefined " "global variable ``__name__``. If this has the value ``'__main__'``, the " @@ -2844,62 +3042,68 @@ msgstr "" "interface en ligne de commande ou un test automatique. Ils n'exécutent cette " "portion du code qu'après avoir vérifié la valeur de ``__name__`` ::" -#: faq/programming.rst:1902 +#: faq/programming.rst:2050 msgid "How can I have modules that mutually import each other?" -msgstr "Comment avoir des modules qui s'importent mutuellement ?" +msgstr "Comment avoir des modules qui s'importent mutuellement ?" -#: faq/programming.rst:1904 +#: faq/programming.rst:2052 msgid "Suppose you have the following modules:" -msgstr "Considérons les modules suivants :" +msgstr "Considérons les modules suivants :" -#: faq/programming.rst:1906 -msgid "foo.py::" -msgstr "*foo.py* ::" +#: faq/programming.rst:2054 +msgid ":file:`foo.py`::" +msgstr ":file:`foo.py` ::" -#: faq/programming.rst:1911 -msgid "bar.py::" -msgstr "*bar.py* ::" +#: faq/programming.rst:2059 +msgid ":file:`bar.py`::" +msgstr ":file:`bar.py` ::" -#: faq/programming.rst:1916 +#: faq/programming.rst:2064 msgid "The problem is that the interpreter will perform the following steps:" -msgstr "Le problème réside dans les étapes que l'interpréteur va réaliser :" +msgstr "Le problème réside dans les étapes que l'interpréteur va réaliser :" -#: faq/programming.rst:1918 -msgid "main imports foo" -msgstr "*main* importe *foo*" +#: faq/programming.rst:2066 +msgid "main imports ``foo``" +msgstr "*main* importe *foo* ;" -#: faq/programming.rst:1919 -msgid "Empty globals for foo are created" -msgstr "Les variables globales (vides) de *foo* sont créées" +#: faq/programming.rst:2067 +msgid "Empty globals for ``foo`` are created" +msgstr "Les variables globales (vides) de *foo* sont créées ;" -#: faq/programming.rst:1920 -msgid "foo is compiled and starts executing" -msgstr "*foo* est compilé et commence à s'exécuter" +#: faq/programming.rst:2068 +msgid "``foo`` is compiled and starts executing" +msgstr "*foo* est compilé et commence à s'exécuter ;" -#: faq/programming.rst:1921 -msgid "foo imports bar" -msgstr "*foo* importe *bar*" +#: faq/programming.rst:2069 +msgid "``foo`` imports ``bar``" +msgstr "*foo* importe *bar* ;" -#: faq/programming.rst:1922 -msgid "Empty globals for bar are created" -msgstr "Les variables globales (vides) de *bar* sont créées" +#: faq/programming.rst:2070 +msgid "Empty globals for ``bar`` are created" +msgstr "Les variables globales (vides) de *bar* sont créées ;" -#: faq/programming.rst:1923 -msgid "bar is compiled and starts executing" -msgstr "*bar* est compilé et commence à s'exécuter" +#: faq/programming.rst:2071 +msgid "``bar`` is compiled and starts executing" +msgstr "*bar* est compilé et commence à s'exécuter ;" -#: faq/programming.rst:1924 +#: faq/programming.rst:2072 msgid "" -"bar imports foo (which is a no-op since there already is a module named foo)" +"``bar`` imports ``foo`` (which is a no-op since there already is a module " +"named ``foo``)" msgstr "" "*bar* importe *foo* (en réalité, rien ne passe car il y a déjà un module " -"appelé *foo*)" +"appelé *foo*) ;" -#: faq/programming.rst:1925 -msgid "bar.foo_var = foo.foo_var" -msgstr "bar.foo_var = foo.foo_var" +#: faq/programming.rst:2073 +msgid "" +"The import mechanism tries to read ``foo_var`` from ``foo`` globals, to set " +"``bar.foo_var = foo.foo_var``" +msgstr "" +"La mécanique des importations tente de lire *foo_var* dans les variables " +"globales de *foo* pour procéder à l'affectation ``bar.foo_var = foo." +"foo_var``." -#: faq/programming.rst:1927 +#: faq/programming.rst:2075 msgid "" "The last step fails, because Python isn't done with interpreting ``foo`` yet " "and the global symbol dictionary for ``foo`` is still empty." @@ -2907,7 +3111,7 @@ msgstr "" "La dernière étape échoue car Python n'a pas fini d'interpréter ``foo`` et le " "dictionnaire global des symboles de ``foo`` est encore vide." -#: faq/programming.rst:1930 +#: faq/programming.rst:2078 msgid "" "The same thing happens when you use ``import foo``, and then try to access " "``foo.foo_var`` in global code." @@ -2915,11 +3119,11 @@ msgstr "" "Le même phénomène arrive quand on utilise ``import foo``, et qu'on essaye " "ensuite d'accéder à ``foo.foo_var`` dans le code global." -#: faq/programming.rst:1933 +#: faq/programming.rst:2081 msgid "There are (at least) three possible workarounds for this problem." msgstr "Il y a (au moins) trois façons de contourner ce problème." -#: faq/programming.rst:1935 +#: faq/programming.rst:2083 msgid "" "Guido van Rossum recommends avoiding all uses of ``from import ..." "``, and placing all code inside functions. Initializations of global " @@ -2933,14 +3137,14 @@ msgstr "" "des fonctions natives. Ceci implique que tout ce qui est fourni par un " "module soit référencé par ``.``." -#: faq/programming.rst:1940 +#: faq/programming.rst:2088 msgid "" "Jim Roskind suggests performing steps in the following order in each module:" msgstr "" "Jim Roskind recommande d'effectuer les étapes suivantes dans cet ordre dans " -"chaque module :" +"chaque module :" -#: faq/programming.rst:1942 +#: faq/programming.rst:2090 msgid "" "exports (globals, functions, and classes that don't need imported base " "classes)" @@ -2948,26 +3152,26 @@ msgstr "" "les exportations (variables globales, fonctions et les classes qui ne " "nécessitent d'importer des classes de base)" -#: faq/programming.rst:1944 +#: faq/programming.rst:2092 msgid "``import`` statements" msgstr "les instructions ``import``" -#: faq/programming.rst:1945 +#: faq/programming.rst:2093 msgid "" "active code (including globals that are initialized from imported values)." msgstr "" "le code (avec les variables globales qui sont initialisées à partir de " "valeurs importées)." -#: faq/programming.rst:1947 +#: faq/programming.rst:2095 msgid "" -"van Rossum doesn't like this approach much because the imports appear in a " +"Van Rossum doesn't like this approach much because the imports appear in a " "strange place, but it does work." msgstr "" "van Rossum désapprouve cette approche car les importations se trouvent à un " "endroit bizarre, mais cela fonctionne." -#: faq/programming.rst:1950 +#: faq/programming.rst:2098 msgid "" "Matthias Urlichs recommends restructuring your code so that the recursive " "import is not necessary in the first place." @@ -2975,16 +3179,16 @@ msgstr "" "Matthias Urlichs conseille de restructurer le code pour éviter les " "importations récursives." -#: faq/programming.rst:1953 +#: faq/programming.rst:2101 msgid "These solutions are not mutually exclusive." msgstr "Ces solutions peuvent être combinées." -#: faq/programming.rst:1957 +#: faq/programming.rst:2105 msgid "__import__('x.y.z') returns ; how do I get z?" msgstr "" "``__import__('x.y.z')`` renvoie ```` ; comment accéder à ``z`` ?" -#: faq/programming.rst:1959 +#: faq/programming.rst:2107 msgid "" "Consider using the convenience function :func:`~importlib.import_module` " "from :mod:`importlib` instead::" @@ -2992,15 +3196,15 @@ msgstr "" "Utilisez plutôt la fonction :func:`~importlib.import_module` de :mod:" "`importlib` ::" -#: faq/programming.rst:1966 +#: faq/programming.rst:2114 msgid "" "When I edit an imported module and reimport it, the changes don't show up. " "Why does this happen?" msgstr "" "Quand j'édite un module et que je le réimporte, je ne vois pas les " -"changements. Pourquoi ?" +"changements. Pourquoi ?" -#: faq/programming.rst:1968 +#: faq/programming.rst:2116 msgid "" "For reasons of efficiency as well as consistency, Python only reads the " "module file on the first time a module is imported. If it didn't, in a " @@ -3015,15 +3219,15 @@ msgstr "" "ré-analysé un très grand nombre de fois. Pour forcer la relecture d'un " "module, il faut faire ::" -#: faq/programming.rst:1978 +#: faq/programming.rst:2126 msgid "" "Warning: this technique is not 100% fool-proof. In particular, modules " "containing statements like ::" msgstr "" "Attention, cette technique ne marche pas systématiquement. En particulier, " -"les modules qui contiennent des instructions comme ::" +"les modules qui contiennent des instructions comme ::" -#: faq/programming.rst:1983 +#: faq/programming.rst:2131 msgid "" "will continue to work with the old version of the imported objects. If the " "module contains class definitions, existing class instances will *not* be " @@ -3035,14 +3239,31 @@ msgstr "" "celle-ci ne sont *pas* mises à jour avec la nouvelle définition de la " "classe. Ceci peut conduire au comportement paradoxal suivant ::" -#: faq/programming.rst:1996 +#: faq/programming.rst:2144 msgid "" "The nature of the problem is made clear if you print out the \"identity\" of " "the class objects::" msgstr "" -"La nature du problème apparaît clairement en affichant « l'identité » des " +"La nature du problème apparaît clairement en affichant « l'identité » des " "objets de la classe ::" +#~ msgid "" +#~ "For version prior to 3.0, you may be using classic classes: For a class " +#~ "definition such as ``class Derived(Base): ...`` you can call method " +#~ "``meth()`` defined in ``Base`` (or one of ``Base``'s base classes) as " +#~ "``Base.meth(self, arguments...)``. Here, ``Base.meth`` is an unbound " +#~ "method, so you need to provide the ``self`` argument." +#~ msgstr "" +#~ "Pour les versions antérieures à 3.0, vous pouvez utiliser des classes " +#~ "classiques : pour une définition de classe comme ``class " +#~ "Derived(Base): ...`` vous pouvez appeler la méthode ``meth()`` définie " +#~ "dans ``Base`` (ou l'une des classes de base de ``Base``) en faisant " +#~ "``Base.meth(self, arguments...)``. Ici, ``Base.meth`` est une méthode non " +#~ "liée, il faut donc fournir l'argument ``self``." + +#~ msgid "bar.foo_var = foo.foo_var" +#~ msgstr "bar.foo_var = foo.foo_var" + #, fuzzy #~ msgid "" #~ "Obviously, freeze requires a C compiler. There are several other " diff --git a/faq/windows.po b/faq/windows.po index 8bcf421ac1..e1313a06c5 100644 --- a/faq/windows.po +++ b/faq/windows.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-29 16:33+0200\n" -"PO-Revision-Date: 2021-01-28 16:02+0100\n" -"Last-Translator: Jules Lasne \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-05-27 12:17+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.2\n" +"X-Generator: Poedit 3.0.1\n" #: faq/windows.rst:9 msgid "Python on Windows FAQ" @@ -40,19 +40,19 @@ msgstr "" #: faq/windows.rst:28 msgid "" "Unless you use some sort of integrated development environment, you will end " -"up *typing* Windows commands into what is variously referred to as a \"DOS " -"window\" or \"Command prompt window\". Usually you can create such a window " -"from your search bar by searching for ``cmd``. You should be able to " -"recognize when you have started such a window because you will see a Windows " -"\"command prompt\", which usually looks like this:" +"up *typing* Windows commands into what is referred to as a \"Command prompt " +"window\". Usually you can create such a window from your search bar by " +"searching for ``cmd``. You should be able to recognize when you have " +"started such a window because you will see a Windows \"command prompt\", " +"which usually looks like this:" msgstr "" "À moins que vous n'utilisiez une sorte d'environnement de développement, " -"vous finirez par *taper* des commandes Windows dans ce qui est diversement " -"appelé une \"fenêtre DOS\" ou \"invite de commande Windows\". En général " -"vous pouvez ouvrir un telle fenêtre depuis votre barre de recherche en " -"cherchant ``cmd``. Vous devriez être capable de reconnaitre quand vous avez " -"lancé une telle fenêtre parce que vous verrez une invite de commande " -"Windows, qui en en général ressemble à ça :" +"vous finirez par *taper* des commandes Windows dans ce qui est appelé une " +"« invite de commande Windows ». En général vous pouvez ouvrir un telle " +"fenêtre depuis votre barre de recherche en cherchant ``cmd``. Vous devriez " +"être capable de reconnaître quand vous avez lancé une telle fenêtre parce " +"que vous verrez une « invite de commande » Windows, qui en en général " +"ressemble à ça :" #: faq/windows.rst:39 msgid "" @@ -233,6 +233,8 @@ msgid "" "See :ref:`faq-create-standalone-binary` for a list of tools that can be used " "to make executables." msgstr "" +"Voir :ref:`faq-create-standalone-binary` pour une liste d'outils qui créent " +"des exécutables." #: faq/windows.rst:148 msgid "Is a ``*.pyd`` file the same as a DLL?" @@ -249,8 +251,8 @@ msgid "" msgstr "" "Oui, les fichiers *.pyd* sont des fichiers *dll*, mais il y a quelques " "différences. Si vous avez une *DLL* ``foo.pyd``, celle-ci doit posséder une " -"fonction ``PyInit_foo()``. Vous pouvez alors écrire en Python « *import " -"foo* » et Python recherchera le fichier *foo.pyd* (ainsi que *foo.py* et " +"fonction ``PyInit_foo()``. Vous pouvez alors écrire en Python « *import " +"foo* » et Python recherchera le fichier *foo.pyd* (ainsi que *foo.py* et " "*foo.pyc*); s'il le trouve, il tentera d'appeler ``PyInit_foo()`` pour " "l'initialiser. Ne liez pas votre *.exe* avec *foo.lib* car dans ce cas " "Windows aura besoin de la DLL." @@ -299,7 +301,7 @@ msgstr "" "eux-mêmes des DLL (ceci constitue une information de première importance non " "documentée). Au lieu de cela faites un lien vers :file:`python{NN}.dll` qui " "est généralement placé dans ``C:\\Windows\\System``. *NN* étant la version " -"Python, par exemple « 33 » pour Python 3.3." +"Python, par exemple « 33 » pour Python 3.3." #: faq/windows.rst:176 msgid "" @@ -312,8 +314,8 @@ msgstr "" "Vous pouvez créer un lien vers Python de deux manières différentes. Un lien " "au moment du chargement signifie pointer vers :file:`python{NN}.lib`, tandis " "qu'un lien au moment de l'exécution signifie pointer vers :file:`python{NN}." -"dll`. (Note générale : :file:`python{NN}.lib` est le soi-disant « *import " -"lib* » correspondant à :file:`python{NN}.dll`. Il définit simplement des " +"dll`. (Note générale : :file:`python{NN}.lib` est le soi-disant « *import " +"lib* » correspondant à :file:`python{NN}.dll`. Il définit simplement des " "liens symboliques pour l'éditeur de liens.)" #: faq/windows.rst:182 @@ -335,15 +337,7 @@ msgstr "" "peuvent rendre l'utilisation de ces pointeurs transparente à tout code C qui " "appelle des routines dans l'API C de Python." -#: faq/windows.rst:189 -msgid "" -"Borland note: convert :file:`python{NN}.lib` to OMF format using Coff2Omf." -"exe first." -msgstr "" -"Note Borland : convertir :file:`python{NN}.lib` au format OMF en utilisant " -"*Coff2Omf.exe* en premier." - -#: faq/windows.rst:194 +#: faq/windows.rst:191 msgid "" "If you use SWIG, it is easy to create a Python \"extension module\" that " "will make the app's data and methods available to Python. SWIG will handle " @@ -351,14 +345,14 @@ msgid "" "link *into* your .exe file (!) You do _not_ have to create a DLL file, and " "this also simplifies linking." msgstr "" -"Si vous utilisez SWIG, il est facile de créer un « module d'extension » " +"Si vous utilisez SWIG, il est facile de créer un « module d'extension » " "Python qui rendra les données et les méthodes de l'application disponibles " "pour Python. SWIG s'occupera de tous les détails ennuyeux pour vous. Le " "résultat est du code C que vous liez *dans* votre *fichier.exe* (!) Vous " "n'avez **pas** besoin de créer un fichier DLL, et cela simplifie également " "la liaison." -#: faq/windows.rst:200 +#: faq/windows.rst:197 msgid "" "SWIG will create an init function (a C function) whose name depends on the " "name of the extension module. For example, if the name of the module is " @@ -373,7 +367,7 @@ msgstr "" "appelée *initleoc()*. Ceci initialise une classe auxiliaire invisible " "utilisée par la classe *shadow*." -#: faq/windows.rst:206 +#: faq/windows.rst:203 msgid "" "The reason you can link the C code in step 2 into your .exe file is that " "calling the initialization function is equivalent to importing the module " @@ -383,7 +377,7 @@ msgstr "" "*fichier.exe* est que l'appel de la fonction d'initialisation équivaut à " "importer le module dans Python ! (C'est le deuxième fait clé non documenté.)" -#: faq/windows.rst:210 +#: faq/windows.rst:207 msgid "" "In short, you can use the following code to initialize the Python " "interpreter with your extension module." @@ -391,7 +385,7 @@ msgstr "" "En bref, vous pouvez utiliser le code suivant pour initialiser " "l'interpréteur Python avec votre module d'extension." -#: faq/windows.rst:221 +#: faq/windows.rst:218 msgid "" "There are two problems with Python's C API which will become apparent if you " "use a compiler other than MSVC, the compiler used to build pythonNN.dll." @@ -400,7 +394,7 @@ msgstr "" "utilisez un compilateur autre que MSVC, le compilateur utilisé pour " "construire *pythonNN.dll*." -#: faq/windows.rst:224 +#: faq/windows.rst:221 msgid "" "Problem 1: The so-called \"Very High Level\" functions that take FILE * " "arguments will not work in a multi-compiler environment because each " @@ -413,7 +407,7 @@ msgstr "" "structure de FILE. Du point de vue de l'implémentation, il s'agit de " "fonctions de très bas niveau." -#: faq/windows.rst:229 +#: faq/windows.rst:226 msgid "" "Problem 2: SWIG generates the following code when generating wrappers to " "void functions:" @@ -421,7 +415,7 @@ msgstr "" "Problème 2 : SWIG génère le code suivant lors de la génération " "*d'encapsuleurs* pour annuler les fonctions :" -#: faq/windows.rst:238 +#: faq/windows.rst:235 msgid "" "Alas, Py_None is a macro that expands to a reference to a complex data " "structure called _Py_NoneStruct inside pythonNN.dll. Again, this code will " @@ -432,7 +426,7 @@ msgstr "" "une fois, ce code échouera dans un environnement multi-compilateur. " "Remplacez ce code par :" -#: faq/windows.rst:246 +#: faq/windows.rst:243 msgid "" "It may be possible to use SWIG's ``%typemap`` command to make the change " "automatically, though I have not been able to get this to work (I'm a " @@ -442,7 +436,7 @@ msgstr "" "le changement automatiquement, bien que je n'ai pas réussi à le faire " "fonctionner (je suis un débutant complet avec SWIG)." -#: faq/windows.rst:250 +#: faq/windows.rst:247 msgid "" "Using a Python shell script to put up a Python interpreter window from " "inside your Windows app is not a good idea; the resulting window will be " @@ -457,19 +451,19 @@ msgstr "" "depuis votre application Windows n'est pas une bonne idée ; la fenêtre " "résultante sera indépendante du système de fenêtrage de votre application. " "Vous (ou la classe *wxPythonWindow*) devriez plutôt créer une fenêtre " -"d'interpréteur « native ». Il est facile de connecter cette fenêtre à " -"l'interpréteur Python. Vous pouvez rediriger l'entrée/sortie de Python vers " +"d'interpréteur « native ». Il est facile de connecter cette fenêtre à " +"l'interpréteur Python. Vous pouvez rediriger l'entrée/sortie de Python vers " "*n'importe quel* objet qui supporte la lecture et l'écriture, donc tout ce " "dont vous avez besoin est un objet Python (défini dans votre module " "d'extension) qui contient les méthodes *read()* et *write()*." -#: faq/windows.rst:259 +#: faq/windows.rst:256 msgid "How do I keep editors from inserting tabs into my Python source?" msgstr "" "Comment empêcher mon éditeur d'utiliser des tabulations dans mes fichiers " "Python ?" -#: faq/windows.rst:261 +#: faq/windows.rst:258 msgid "" "The FAQ does not recommend using tabs, and the Python style guide, :pep:`8`, " "recommends 4 spaces for distributed Python code; this is also the Emacs " @@ -480,7 +474,7 @@ msgstr "" "dans les codes Python. C'est aussi le comportement par défaut d'Emacs avec " "Python." -#: faq/windows.rst:265 +#: faq/windows.rst:262 msgid "" "Under any editor, mixing tabs and spaces is a bad idea. MSVC is no " "different in this respect, and is easily configured to use spaces: Take :" @@ -494,7 +488,7 @@ msgstr "" "Tabs` et pour le type de fichier par défaut, vous devez mettre *Tab size* et " "*Indent size* à 4, puis sélectionner *Insert spaces*." -#: faq/windows.rst:270 +#: faq/windows.rst:267 msgid "" "Python raises :exc:`IndentationError` or :exc:`TabError` if mixed tabs and " "spaces are causing problems in leading whitespace. You may also run the :mod:" @@ -504,13 +498,13 @@ msgstr "" "tabulation et d’indentation pose problème en début de ligne. Vous pouvez " "aussi utiliser le module :mod:`tabnanny` pour détecter ces erreurs." -#: faq/windows.rst:277 +#: faq/windows.rst:274 msgid "How do I check for a keypress without blocking?" msgstr "" "Comment puis-je vérifier de manière non bloquante qu'une touche a été " "pressée ?" -#: faq/windows.rst:279 +#: faq/windows.rst:276 msgid "" "Use the :mod:`msvcrt` module. This is a standard Windows-specific extension " "module. It defines a function ``kbhit()`` which checks whether a keyboard " @@ -521,6 +515,13 @@ msgstr "" "touche s'est produite, et ``getch()`` qui récupère le caractère sans " "l'afficher." +#~ msgid "" +#~ "Borland note: convert :file:`python{NN}.lib` to OMF format using Coff2Omf." +#~ "exe first." +#~ msgstr "" +#~ "Note Borland : convertir :file:`python{NN}.lib` au format OMF en " +#~ "utilisant *Coff2Omf.exe* en premier." + #~ msgid "" #~ "See `cx_Freeze `_ for a " #~ "distutils extension that allows you to create console and GUI executables " diff --git a/glossary.po b/glossary.po index f4b7f2ac5e..f2c2fe2bd3 100644 --- a/glossary.po +++ b/glossary.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" -"PO-Revision-Date: 2021-03-19 15:49+0100\n" -"Last-Translator: Jules Lasne \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-05-18 13:31+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.2\n" +"X-Generator: Poedit 3.0.1\n" #: glossary.rst:5 msgid "Glossary" @@ -139,16 +139,19 @@ msgstr "" #: glossary.rst:58 msgid "" "See :term:`variable annotation`, :term:`function annotation`, :pep:`484` " -"and :pep:`526`, which describe this functionality." +"and :pep:`526`, which describe this functionality. Also see :ref:" +"`annotations-howto` for best practices on working with annotations." msgstr "" -"Voir :term:`variable annotation`, :term:`function annotation`, :pep:`484` " -"et :pep:`526`, qui décrivent cette fonctionnalité." +"Voir :term:`annotation de variable`, :term:`annotation " +"de fonction`, :pep:`484` et :pep:`526`, qui décrivent " +"cette fonctionnalité. Voir aussi :ref:`annotations-howto` sur les bonnes " +"pratiques concernant les annotations." -#: glossary.rst:60 +#: glossary.rst:62 msgid "argument" msgstr "argument" -#: glossary.rst:62 +#: glossary.rst:64 msgid "" "A value passed to a :term:`function` (or :term:`method`) when calling the " "function. There are two kinds of argument:" @@ -156,7 +159,7 @@ msgstr "" "Valeur, donnée à une :term:`fonction` ou à une :term:`méthode` lors de son " "appel. Il existe deux types d'arguments :" -#: glossary.rst:65 +#: glossary.rst:67 msgid "" ":dfn:`keyword argument`: an argument preceded by an identifier (e.g. " "``name=``) in a function call or passed as a value in a dictionary preceded " @@ -168,7 +171,7 @@ msgstr "" "fonction. Par exemple, ``3`` et ``5`` sont tous les deux des arguments " "nommés dans l'appel à :func:`complex` ici ::" -#: glossary.rst:73 +#: glossary.rst:75 msgid "" ":dfn:`positional argument`: an argument that is not a keyword argument. " "Positional arguments can appear at the beginning of an argument list and/or " @@ -180,7 +183,7 @@ msgstr "" "forme d'un :term:`itérable` précédé par ``*``. Par exemple, ``3`` et ``5`` " "sont tous les deux des arguments positionnels dans les appels suivants ::" -#: glossary.rst:82 +#: glossary.rst:84 msgid "" "Arguments are assigned to the named local variables in a function body. See " "the :ref:`calls` section for the rules governing this assignment. " @@ -193,21 +196,21 @@ msgstr "" "argument, et c'est la valeur résultante de l'expression qui sera affectée à " "la variable locale." -#: glossary.rst:87 +#: glossary.rst:89 msgid "" "See also the :term:`parameter` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " "and :pep:`362`." msgstr "" -"Voir aussi :term:`parameter` dans le glossaire, la question :ref:`Différence " -"entre argument et paramètre ` de la FAQ et la :" -"pep:`362`." +"Voir aussi :term:`paramètre` dans le glossaire, la question :ref:" +"`Différence entre argument et paramètre ` de la " +"FAQ et la :pep:`362`." -#: glossary.rst:90 +#: glossary.rst:92 msgid "asynchronous context manager" msgstr "gestionnaire de contexte asynchrone" -#: glossary.rst:92 +#: glossary.rst:94 msgid "" "An object which controls the environment seen in an :keyword:`async with` " "statement by defining :meth:`__aenter__` and :meth:`__aexit__` methods. " @@ -217,11 +220,11 @@ msgstr "" "à l'intérieur d'une instruction :keyword:`with` en définissant les méthodes :" "meth:`__aenter__` et :meth:`__aexit__`. A été Introduit par la :pep:`492`." -#: glossary.rst:95 +#: glossary.rst:97 msgid "asynchronous generator" msgstr "générateur asynchrone" -#: glossary.rst:97 +#: glossary.rst:99 msgid "" "A function which returns an :term:`asynchronous generator iterator`. It " "looks like a coroutine function defined with :keyword:`async def` except " @@ -233,7 +236,7 @@ msgstr "" "contient une ou des expressions :keyword:`yield` produisant ainsi uns série " "de valeurs utilisables dans une boucle :keyword:`async for`." -#: glossary.rst:102 +#: glossary.rst:104 msgid "" "Usually refers to an asynchronous generator function, but may refer to an " "*asynchronous generator iterator* in some contexts. In cases where the " @@ -244,7 +247,7 @@ msgstr "" "contextes. Dans les cas où le sens voulu n'est pas clair, utiliser " "l'ensemble des termes lève l’ambiguïté." -#: glossary.rst:106 +#: glossary.rst:108 msgid "" "An asynchronous generator function may contain :keyword:`await` expressions " "as well as :keyword:`async for`, and :keyword:`async with` statements." @@ -252,15 +255,15 @@ msgstr "" "Un générateur asynchrone peut contenir des expressions :keyword:`await` " "ainsi que des instructions :keyword:`async for`, et :keyword:`async with`." -#: glossary.rst:109 +#: glossary.rst:111 msgid "asynchronous generator iterator" msgstr "itérateur de générateur asynchrone" -#: glossary.rst:111 +#: glossary.rst:113 msgid "An object created by a :term:`asynchronous generator` function." msgstr "Objet créé par une fonction :term:`asynchronous generator`." -#: glossary.rst:113 +#: glossary.rst:115 msgid "" "This is an :term:`asynchronous iterator` which when called using the :meth:" "`__anext__` method returns an awaitable object which will execute the body " @@ -271,7 +274,7 @@ msgstr "" "méthode :meth:`__anext__` renvoie un objet *awaitable* qui exécute le corps " "de la fonction du générateur asynchrone jusqu'au prochain :keyword:`yield`." -#: glossary.rst:118 +#: glossary.rst:120 msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " "location execution state (including local variables and pending try-" @@ -286,11 +289,11 @@ msgstr "" "`__anext__`, elle repart de là où elle s'était arrêtée. Voir la :pep:`492` " "et la :pep:`525`." -#: glossary.rst:123 +#: glossary.rst:125 msgid "asynchronous iterable" msgstr "itérable asynchrone" -#: glossary.rst:125 +#: glossary.rst:127 msgid "" "An object, that can be used in an :keyword:`async for` statement. Must " "return an :term:`asynchronous iterator` from its :meth:`__aiter__` method. " @@ -300,11 +303,11 @@ msgstr "" "méthode :meth:`__aiter__` doit renvoyer un :term:`asynchronous iterator`. A " "été introduit par la :pep:`492`." -#: glossary.rst:128 +#: glossary.rst:130 msgid "asynchronous iterator" msgstr "itérateur asynchrone" -#: glossary.rst:130 +#: glossary.rst:132 msgid "" "An object that implements the :meth:`__aiter__` and :meth:`__anext__` " "methods. ``__anext__`` must return an :term:`awaitable` object. :keyword:" @@ -319,11 +322,11 @@ msgstr "" "`StopAsyncIteration` pour signifier la fin de l'itération. A été introduit " "par la :pep:`492`." -#: glossary.rst:135 +#: glossary.rst:137 msgid "attribute" msgstr "attribut" -#: glossary.rst:137 +#: glossary.rst:139 msgid "" "A value associated with an object which is referenced by name using dotted " "expressions. For example, if an object *o* has an attribute *a* it would be " @@ -333,11 +336,11 @@ msgstr "" "utilisant des points. Par exemple, si un objet *o* possède un attribut *a*, " "il sera référencé par *o.a*." -#: glossary.rst:140 +#: glossary.rst:142 msgid "awaitable" msgstr "awaitable" -#: glossary.rst:142 +#: glossary.rst:144 msgid "" "An object that can be used in an :keyword:`await` expression. Can be a :" "term:`coroutine` or an object with an :meth:`__await__` method. See also :" @@ -347,11 +350,11 @@ msgstr "" "être une :term:`coroutine` ou un objet avec une méthode :meth:`__await__`. " "Voir aussi la :pep:`492`." -#: glossary.rst:145 +#: glossary.rst:147 msgid "BDFL" msgstr "BDFL" -#: glossary.rst:147 +#: glossary.rst:149 msgid "" "Benevolent Dictator For Life, a.k.a. `Guido van Rossum `_, Python's creator." @@ -360,11 +363,11 @@ msgstr "" "Pseudonyme de `Guido van Rossum `_, le " "créateur de Python." -#: glossary.rst:149 +#: glossary.rst:151 msgid "binary file" msgstr "fichier binaire" -#: glossary.rst:151 +#: glossary.rst:153 msgid "" "A :term:`file object` able to read and write :term:`bytes-like objects " "`. Examples of binary files are files opened in binary " @@ -378,7 +381,7 @@ msgstr "" "`sys.stdin.buffer`, :data:`sys.stdout.buffer`, les instances de :class:`io." "BytesIO` ou de :class:`gzip.GzipFile`." -#: glossary.rst:158 +#: glossary.rst:160 msgid "" "See also :term:`text file` for a file object able to read and write :class:" "`str` objects." @@ -386,11 +389,43 @@ msgstr "" "Consultez :term:`fichier texte`, un objet fichier capable de lire et " "d'écrire des objets :class:`str`." -#: glossary.rst:160 +#: glossary.rst:162 +msgid "borrowed reference" +msgstr "référence empruntée" + +#: glossary.rst:164 +msgid "" +"In Python's C API, a borrowed reference is a reference to an object. It does " +"not modify the object reference count. It becomes a dangling pointer if the " +"object is destroyed. For example, a garbage collection can remove the last :" +"term:`strong reference` to the object and so destroy it." +msgstr "" +"Dans l'API C de Python, une référence empruntée est une référence vers un " +"objet qui n'affecte pas son compteur de référence. Elle devient invalide si " +"l'objet est supprimé, par exemple au cours d'un passage du ramasse-miettes " +"qui conduit à la disparition de la dernière :term:`référence forte` vers " +"l'objet." + +#: glossary.rst:169 +msgid "" +"Calling :c:func:`Py_INCREF` on the :term:`borrowed reference` is recommended " +"to convert it to a :term:`strong reference` in-place, except when the object " +"cannot be destroyed before the last usage of the borrowed reference. The :c:" +"func:`Py_NewRef` function can be used to create a new :term:`strong " +"reference`." +msgstr "" +"Il est recommandé d'appeler :c:func:`Py_INCREF` sur la :term:`référence " +"empruntée`, ce qui la transforme *in situ* en une :term:`référence forte`. " +"Vous pouvez faire une exception si vous êtes certain que l'objet ne peut pas " +"être supprimé avant la dernière utilisation de la référence empruntée. Voir " +"aussi la fonction :c:func:`Py_NewRef`, qui crée une nouvelle :term:" +"`référence forte`." + +#: glossary.rst:174 msgid "bytes-like object" msgstr "objet octet-compatible" -#: glossary.rst:162 +#: glossary.rst:176 msgid "" "An object that supports the :ref:`bufferobjects` and can export a C-:term:" "`contiguous` buffer. This includes all :class:`bytes`, :class:`bytearray`, " @@ -406,7 +441,7 @@ msgstr "" "utilisés pour diverses opérations sur des données binaires, comme la " "compression, la sauvegarde dans un fichier binaire ou l'envoi sur le réseau." -#: glossary.rst:169 +#: glossary.rst:183 msgid "" "Some operations need the binary data to be mutable. The documentation often " "refers to these as \"read-write bytes-like objects\". Example mutable " @@ -419,15 +454,15 @@ msgstr "" "variables. La documentation parle de ceux-ci comme des *read-write bytes-" "like objects*. Par exemple, :class:`bytearray` ou une :class:`memoryview` " "d'un :class:`bytearray` en font partie. D'autres opérations nécessitent de " -"travailler sur des données binaires stockées dans des objets immuables (*" -"\"read-only bytes-like objects\"*), par exemples :class:`bytes` ou :class:" +"travailler sur des données binaires stockées dans des objets immuables " +"(*\"read-only bytes-like objects\"*), par exemple :class:`bytes` ou :class:" "`memoryview` d'un objet :class:`byte`." -#: glossary.rst:177 +#: glossary.rst:191 msgid "bytecode" msgstr "code intermédiaire (*bytecode*)" -#: glossary.rst:179 +#: glossary.rst:193 msgid "" "Python source code is compiled into bytecode, the internal representation of " "a Python program in the CPython interpreter. The bytecode is also cached in " @@ -448,7 +483,7 @@ msgstr "" "intermédiaire n'a pas vocation à fonctionner sur différentes machines " "virtuelles Python ou à être stable entre différentes versions de Python." -#: glossary.rst:189 +#: glossary.rst:203 msgid "" "A list of bytecode instructions can be found in the documentation for :ref:" "`the dis module `." @@ -456,21 +491,21 @@ msgstr "" "La documentation du :ref:`module dis ` fournit une liste des " "instructions du code intermédiaire." -#: glossary.rst:191 +#: glossary.rst:205 msgid "callback" msgstr "fonction de rappel" -#: glossary.rst:193 +#: glossary.rst:207 msgid "" "A subroutine function which is passed as an argument to be executed at some " "point in the future." msgstr "Une sous-fonction passée en argument pour être exécutée plus tard." -#: glossary.rst:195 +#: glossary.rst:209 msgid "class" msgstr "classe" -#: glossary.rst:197 +#: glossary.rst:211 msgid "" "A template for creating user-defined objects. Class definitions normally " "contain method definitions which operate on instances of the class." @@ -479,11 +514,11 @@ msgstr "" "classe (*class*) contient normalement des définitions de méthodes qui " "agissent sur les instances de la classe." -#: glossary.rst:200 +#: glossary.rst:214 msgid "class variable" msgstr "variable de classe" -#: glossary.rst:202 +#: glossary.rst:216 msgid "" "A variable defined in a class and intended to be modified only at class " "level (i.e., not in an instance of the class)." @@ -491,37 +526,11 @@ msgstr "" "Une variable définie dans une classe et destinée à être modifiée uniquement " "au niveau de la classe (c'est-à-dire, pas dans une instance de la classe)." -#: glossary.rst:204 -msgid "coercion" -msgstr "coercition" - -#: glossary.rst:206 -msgid "" -"The implicit conversion of an instance of one type to another during an " -"operation which involves two arguments of the same type. For example, " -"``int(3.15)`` converts the floating point number to the integer ``3``, but " -"in ``3+4.5``, each argument is of a different type (one int, one float), and " -"both must be converted to the same type before they can be added or it will " -"raise a :exc:`TypeError`. Without coercion, all arguments of even " -"compatible types would have to be normalized to the same value by the " -"programmer, e.g., ``float(3)+4.5`` rather than just ``3+4.5``." -msgstr "" -"Conversion implicite d'une instance d'un type vers un autre lors d'une " -"opération dont les deux opérandes doivent être de même type. Par exemple " -"``int(3.15)`` convertit explicitement le nombre à virgule flottante en " -"nombre entier ``3``. Mais dans l'opération ``3 + 4.5``, les deux opérandes " -"sont d'un type différent (un entier et un nombre à virgule flottante), alors " -"qu'ils doivent avoir le même type pour être additionnés (sinon une " -"exception :exc:`TypeError` serait levée). Sans coercition, tous les " -"opérandes, même de types compatibles, devraient être convertis (on parle " -"aussi de *cast*) explicitement par le développeur, par exemple : ``float(3) " -"+ 4.5`` au lieu du simple ``3 + 4.5``." - -#: glossary.rst:214 +#: glossary.rst:218 msgid "complex number" msgstr "nombre complexe" -#: glossary.rst:216 +#: glossary.rst:220 msgid "" "An extension of the familiar real number system in which all numbers are " "expressed as a sum of a real part and an imaginary part. Imaginary numbers " @@ -544,11 +553,11 @@ msgstr "" "Les nombres complexes sont un concept assez avancé en mathématiques. Si vous " "ne connaissez pas ce concept, vous pouvez tranquillement les ignorer." -#: glossary.rst:226 +#: glossary.rst:230 msgid "context manager" msgstr "gestionnaire de contexte" -#: glossary.rst:228 +#: glossary.rst:232 msgid "" "An object which controls the environment seen in a :keyword:`with` statement " "by defining :meth:`__enter__` and :meth:`__exit__` methods. See :pep:`343`." @@ -557,11 +566,11 @@ msgstr "" "définissant les méthodes :meth:`__enter__` et :meth:`__exit__`. Consultez " "la :pep:`343`." -#: glossary.rst:231 +#: glossary.rst:235 msgid "context variable" msgstr "variable de contexte" -#: glossary.rst:233 +#: glossary.rst:237 msgid "" "A variable which can have different values depending on its context. This is " "similar to Thread-Local Storage in which each execution thread may have a " @@ -579,11 +588,11 @@ msgstr "" "trace des variables dans les tâches asynchrones concourantes. Voir :mod:" "`contextvars`." -#: glossary.rst:240 +#: glossary.rst:244 msgid "contiguous" msgstr "contigu" -#: glossary.rst:244 +#: glossary.rst:248 msgid "" "A buffer is considered contiguous exactly if it is either *C-contiguous* or " "*Fortran contiguous*. Zero-dimensional buffers are C and Fortran " @@ -603,11 +612,11 @@ msgstr "" "leur adresse mémoire. À l'inverse, dans les tableaux Fortran-contigu, c’est " "le premier indice qui doit varier le plus rapidement." -#: glossary.rst:252 +#: glossary.rst:256 msgid "coroutine" msgstr "coroutine" -#: glossary.rst:254 +#: glossary.rst:258 msgid "" "Coroutines are a more generalized form of subroutines. Subroutines are " "entered at one point and exited at another point. Coroutines can be " @@ -620,11 +629,11 @@ msgstr "" "être implémentées en utilisant l'instruction :keyword:`async def`. Voir " "aussi la :pep:`492`." -#: glossary.rst:259 +#: glossary.rst:263 msgid "coroutine function" msgstr "fonction coroutine" -#: glossary.rst:261 +#: glossary.rst:265 msgid "" "A function which returns a :term:`coroutine` object. A coroutine function " "may be defined with the :keyword:`async def` statement, and may contain :" @@ -636,11 +645,11 @@ msgstr "" "mots clés :keyword:`await`, :keyword:`async for` ainsi que :keyword:`async " "with`. A été introduit par la :pep:`492`." -#: glossary.rst:266 +#: glossary.rst:270 msgid "CPython" msgstr "CPython" -#: glossary.rst:268 +#: glossary.rst:272 msgid "" "The canonical implementation of the Python programming language, as " "distributed on `python.org `_. The term \"CPython\" " @@ -652,11 +661,11 @@ msgstr "" "est utilisé dans certains contextes lorsqu'il est nécessaire de distinguer " "cette implémentation des autres comme *Jython* ou *IronPython*." -#: glossary.rst:272 +#: glossary.rst:276 msgid "decorator" msgstr "décorateur" -#: glossary.rst:274 +#: glossary.rst:278 msgid "" "A function returning another function, usually applied as a function " "transformation using the ``@wrapper`` syntax. Common examples for " @@ -667,7 +676,7 @@ msgstr "" "``@wrapper``, dont les exemples typiques sont : :func:`classmethod` et :func:" "`staticmethod`." -#: glossary.rst:278 +#: glossary.rst:282 msgid "" "The decorator syntax is merely syntactic sugar, the following two function " "definitions are semantically equivalent::" @@ -675,7 +684,7 @@ msgstr "" "La syntaxe des décorateurs est simplement du sucre syntaxique, les " "définitions des deux fonctions suivantes sont sémantiquement équivalentes ::" -#: glossary.rst:289 +#: glossary.rst:293 msgid "" "The same concept exists for classes, but is less commonly used there. See " "the documentation for :ref:`function definitions ` and :ref:`class " @@ -685,11 +694,11 @@ msgstr "" "Consultez la documentation :ref:`définitions de fonctions ` et :" "ref:`définitions de classes ` pour en savoir plus sur les décorateurs." -#: glossary.rst:292 +#: glossary.rst:296 msgid "descriptor" msgstr "descripteur" -#: glossary.rst:294 +#: glossary.rst:298 msgid "" "Any object which defines the methods :meth:`__get__`, :meth:`__set__`, or :" "meth:`__delete__`. When a class attribute is a descriptor, its special " @@ -713,7 +722,7 @@ msgstr "" "propriétés, méthodes de classes, méthodes statiques et les références aux " "classes parentes." -#: glossary.rst:304 +#: glossary.rst:308 msgid "" "For more information about descriptors' methods, see :ref:`descriptors` or " "the :ref:`Descriptor How To Guide `." @@ -722,11 +731,11 @@ msgstr "" "`descriptors` ou le :ref:`guide pour l'utilisation des descripteurs " "`." -#: glossary.rst:306 +#: glossary.rst:310 msgid "dictionary" msgstr "dictionnaire" -#: glossary.rst:308 +#: glossary.rst:312 msgid "" "An associative array, where arbitrary keys are mapped to values. The keys " "can be any object with :meth:`__hash__` and :meth:`__eq__` methods. Called a " @@ -736,11 +745,11 @@ msgstr "" "n'importe quel objet possédant les méthodes :meth:`__hash__` et :meth:" "`__eq__`. En Perl, les dictionnaires sont appelés \"*hash*\"." -#: glossary.rst:311 +#: glossary.rst:315 msgid "dictionary comprehension" msgstr "dictionnaire en compréhension (ou dictionnaire en intension)" -#: glossary.rst:313 +#: glossary.rst:317 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a dictionary with the results. ``results = {n: n ** 2 for n in " @@ -752,11 +761,11 @@ msgstr "" "n in range(10)}`` génère un dictionnaire contenant des clés ``n`` liée à " "leur valeurs ``n ** 2``. Voir :ref:`comprehensions`." -#: glossary.rst:317 +#: glossary.rst:321 msgid "dictionary view" msgstr "vue de dictionnaire" -#: glossary.rst:319 +#: glossary.rst:323 msgid "" "The objects returned from :meth:`dict.keys`, :meth:`dict.values`, and :meth:" "`dict.items` are called dictionary views. They provide a dynamic view on the " @@ -770,11 +779,11 @@ msgstr "" "change. Pour transformer une vue en vraie liste, utilisez " "``list(dictview)``. Voir :ref:`dict-views`." -#: glossary.rst:325 +#: glossary.rst:329 msgid "docstring" msgstr "*docstring* (chaîne de documentation)" -#: glossary.rst:327 +#: glossary.rst:331 msgid "" "A string literal which appears as the first expression in a class, function " "or module. While ignored when the suite is executed, it is recognized by " @@ -788,11 +797,11 @@ msgstr "" "fonction ou du module. Comme cette chaîne est disponible par introspection, " "c'est l'endroit idéal pour documenter l'objet." -#: glossary.rst:333 +#: glossary.rst:337 msgid "duck-typing" msgstr "duck-typing" -#: glossary.rst:335 +#: glossary.rst:339 msgid "" "A programming style which does not look at an object's type to determine if " "it has the right interface; instead, the method or attribute is simply " @@ -816,11 +825,11 @@ msgstr "" "*duck-typing* utilise plutôt :func:`hasattr` ou la programmation :term:" "`EAFP`." -#: glossary.rst:344 +#: glossary.rst:348 msgid "EAFP" msgstr "EAFP" -#: glossary.rst:346 +#: glossary.rst:350 msgid "" "Easier to ask for forgiveness than permission. This common Python coding " "style assumes the existence of valid keys or attributes and catches " @@ -837,11 +846,11 @@ msgstr "" "keyword:`except`. Cette technique de programmation contraste avec le style :" "term:`LBYL` utilisé couramment dans les langages tels que C." -#: glossary.rst:352 +#: glossary.rst:356 msgid "expression" msgstr "expression" -#: glossary.rst:354 +#: glossary.rst:358 msgid "" "A piece of syntax which can be evaluated to some value. In other words, an " "expression is an accumulation of expression elements like literals, names, " @@ -861,11 +870,11 @@ msgstr "" "expressions, tel que :keyword:`while`. Les affectations sont également des " "instructions et non des expressions." -#: glossary.rst:361 +#: glossary.rst:365 msgid "extension module" msgstr "module d'extension" -#: glossary.rst:363 +#: glossary.rst:367 msgid "" "A module written in C or C++, using Python's C API to interact with the core " "and with user code." @@ -873,11 +882,11 @@ msgstr "" "Module écrit en C ou C++, utilisant l'API C de Python pour interagir avec " "Python et le code de l'utilisateur." -#: glossary.rst:365 +#: glossary.rst:369 msgid "f-string" msgstr "f-string" -#: glossary.rst:367 +#: glossary.rst:371 msgid "" "String literals prefixed with ``'f'`` or ``'F'`` are commonly called \"f-" "strings\" which is short for :ref:`formatted string literals `. " @@ -887,11 +896,11 @@ msgstr "" "raccourci pour :ref:`formatted string literals `. Voir la :pep:" "`498`." -#: glossary.rst:370 +#: glossary.rst:374 msgid "file object" msgstr "objet fichier" -#: glossary.rst:372 +#: glossary.rst:376 msgid "" "An object exposing a file-oriented API (with methods such as :meth:`read()` " "or :meth:`write()`) to an underlying resource. Depending on the way it was " @@ -908,7 +917,7 @@ msgstr "" "réseau…). Les objets fichiers sont aussi appelés :dfn:`file-like-objects` " "ou :dfn:`streams`." -#: glossary.rst:380 +#: glossary.rst:384 msgid "" "There are actually three categories of file objects: raw :term:`binary files " "`, buffered :term:`binary files ` and :term:`text " @@ -923,19 +932,64 @@ msgstr "" "Le moyen le plus simple et direct de créer un objet fichier est d'utiliser " "la fonction :func:`open`." -#: glossary.rst:385 +#: glossary.rst:389 msgid "file-like object" msgstr "objet fichier-compatible" -#: glossary.rst:387 +#: glossary.rst:391 msgid "A synonym for :term:`file object`." msgstr "Synonyme de :term:`objet fichier`." -#: glossary.rst:388 +#: glossary.rst:392 +msgid "filesystem encoding and error handler" +msgstr "encodage du système de fichier et gestionnaire d'erreur" + +#: glossary.rst:394 +msgid "" +"Encoding and error handler used by Python to decode bytes from the operating " +"system and encode Unicode to the operating system." +msgstr "" +"Encodage et gestionnaire d'erreur utilisés par Python pour décoder les " +"octets fournis par le système d'exploitation et encoder les chaînes de " +"caractères Unicode afin de les passer au système." + +#: glossary.rst:397 +msgid "" +"The filesystem encoding must guarantee to successfully decode all bytes " +"below 128. If the file system encoding fails to provide this guarantee, API " +"functions can raise :exc:`UnicodeError`." +msgstr "" +"L'encodage du système de fichiers doit impérativement pouvoir décoder tous " +"les octets jusqu'à 128. Si ce n'est pas le cas, certaines fonctions de l'API " +"lèvent :exc:`UnicodeError`." + +#: glossary.rst:401 +msgid "" +"The :func:`sys.getfilesystemencoding` and :func:`sys." +"getfilesystemencodeerrors` functions can be used to get the filesystem " +"encoding and error handler." +msgstr "" +"Cet encodage et son gestionnaire d'erreur peuvent être obtenus à l'aide des " +"fonctions :func:`sys.getfilesystemencoding` et :func:" +"`getfilesystemencodeerrors`." + +#: glossary.rst:405 +msgid "" +"The :term:`filesystem encoding and error handler` are configured at Python " +"startup by the :c:func:`PyConfig_Read` function: see :c:member:`~PyConfig." +"filesystem_encoding` and :c:member:`~PyConfig.filesystem_errors` members of :" +"c:type:`PyConfig`." +msgstr "" + +#: glossary.rst:410 +msgid "See also the :term:`locale encoding`." +msgstr "Voir aussi :term:`encodage régional`." + +#: glossary.rst:411 msgid "finder" msgstr "chercheur" -#: glossary.rst:390 +#: glossary.rst:413 msgid "" "An object that tries to find the :term:`loader` for a module that is being " "imported." @@ -943,7 +997,7 @@ msgstr "" "Objet qui essaie de trouver un :term:`chargeur ` pour le module en " "cours d'importation." -#: glossary.rst:393 +#: glossary.rst:416 msgid "" "Since Python 3.3, there are two types of finder: :term:`meta path finders " "` for use with :data:`sys.meta_path`, and :term:`path " @@ -954,15 +1008,15 @@ msgstr "" "`sys.meta_path` ; les :term:`chercheurs d'entrée dans path ` à utiliser avec :data:`sys.path_hooks`." -#: glossary.rst:397 +#: glossary.rst:420 msgid "See :pep:`302`, :pep:`420` and :pep:`451` for much more detail." msgstr "Voir les :pep:`302`, :pep:`420` et :pep:`451` pour plus de détails." -#: glossary.rst:398 +#: glossary.rst:421 msgid "floor division" msgstr "division entière" -#: glossary.rst:400 +#: glossary.rst:423 msgid "" "Mathematical division that rounds down to nearest integer. The floor " "division operator is ``//``. For example, the expression ``11 // 4`` " @@ -976,11 +1030,11 @@ msgstr "" "4`` vaut ``-3`` car l'arrondi se fait à l'entier inférieur. Voir la :pep:" "`328`." -#: glossary.rst:405 +#: glossary.rst:428 msgid "function" msgstr "fonction" -#: glossary.rst:407 +#: glossary.rst:430 msgid "" "A series of statements which returns some value to a caller. It can also be " "passed zero or more :term:`arguments ` which may be used in the " @@ -992,15 +1046,15 @@ msgstr "" "corps de la fonction. Voir aussi :term:`paramètre`, :term:`méthode` et :ref:" "`function`." -#: glossary.rst:411 +#: glossary.rst:434 msgid "function annotation" msgstr "annotation de fonction" -#: glossary.rst:413 +#: glossary.rst:436 msgid "An :term:`annotation` of a function parameter or return value." msgstr ":term:`annotation` d'un paramètre de fonction ou valeur de retour." -#: glossary.rst:415 +#: glossary.rst:438 msgid "" "Function annotations are usually used for :term:`type hints `: " "for example, this function is expected to take two :class:`int` arguments " @@ -1011,48 +1065,51 @@ msgstr "" "prendre deux arguments :class:`int` et devrait également avoir une valeur de " "retour de type :class:`int` ::" -#: glossary.rst:423 +#: glossary.rst:446 msgid "Function annotation syntax is explained in section :ref:`function`." msgstr "" "L'annotation syntaxique de la fonction est expliquée dans la section :ref:" "`function`." -#: glossary.rst:425 +#: glossary.rst:448 msgid "" "See :term:`variable annotation` and :pep:`484`, which describe this " -"functionality." +"functionality. Also see :ref:`annotations-howto` for best practices on " +"working with annotations." msgstr "" -"Voir :term:`variable annotation` et :pep:`484`, qui décrivent cette " -"fonctionnalité." +"Voir :term:`annotation de variable` et :pep:`484`, qui " +"décrivent cette fonctionnalité. Voir aussi :ref:`annotations-howto` sur les " +"bonnes pratiques concernant les annotations." -#: glossary.rst:427 +#: glossary.rst:452 msgid "__future__" msgstr "__future__" -#: glossary.rst:429 -msgid "" -"A pseudo-module which programmers can use to enable new language features " -"which are not compatible with the current interpreter." -msgstr "" -"Pseudo-module que les développeurs peuvent utiliser pour activer de " -"nouvelles fonctionnalités du langage qui ne sont pas compatibles avec " -"l'interpréteur utilisé." - -#: glossary.rst:432 +#: glossary.rst:454 msgid "" -"By importing the :mod:`__future__` module and evaluating its variables, you " -"can see when a new feature was first added to the language and when it " -"becomes the default::" -msgstr "" -"En important le module :mod:`__future__` et en affichant ses variables, vous " -"pouvez voir à quel moment une nouvelle fonctionnalité a été rajoutée dans le " -"langage et quand elle devient le comportement par défaut ::" - -#: glossary.rst:439 +"A :ref:`future statement `, ``from __future__ import ``, " +"directs the compiler to compile the current module using syntax or semantics " +"that will become standard in a future release of Python. The :mod:" +"`__future__` module documents the possible values of *feature*. By " +"importing this module and evaluating its variables, you can see when a new " +"feature was first added to the language and when it will (or did) become the " +"default::" +msgstr "" +"Une :ref:`importation depuis le futur ` s'écrit ``from __future__ " +"import ``. Lorsqu'une importation du futur est active dans " +"un module, Python compile ce module avec une certaine modification de la " +"syntaxe ou du comportement qui est vouée à devenir standard dans une version " +"ultérieure. Le module :mod:`__future__` documente les possibilités pour " +"*fonctionnalité*. L'importation a aussi l'effet normal d'importer une " +"variable du module. Cette variable contient des informations utiles sur la " +"fonctionnalité en question, notamment la version de Python dans laquelle " +"elle a été ajoutée, et celle dans laquelle elle deviendra standard ::" + +#: glossary.rst:465 msgid "garbage collection" msgstr "ramasse-miettes" -#: glossary.rst:441 +#: glossary.rst:467 msgid "" "The process of freeing memory when it is not used anymore. Python performs " "garbage collection via reference counting and a cyclic garbage collector " @@ -1065,11 +1122,11 @@ msgstr "" "et casser les références circulaires. Le ramasse-miettes peut être contrôlé " "en utilisant le module :mod:`gc`." -#: glossary.rst:447 +#: glossary.rst:473 msgid "generator" msgstr "générateur" -#: glossary.rst:449 +#: glossary.rst:475 msgid "" "A function which returns a :term:`generator iterator`. It looks like a " "normal function except that it contains :keyword:`yield` expressions for " @@ -1081,7 +1138,7 @@ msgstr "" "expressions :keyword:`yield` produisant une série de valeurs utilisable dans " "une boucle *for* ou récupérées une à une via la fonction :func:`next`." -#: glossary.rst:454 +#: glossary.rst:480 msgid "" "Usually refers to a generator function, but may refer to a *generator " "iterator* in some contexts. In cases where the intended meaning isn't " @@ -1092,15 +1149,15 @@ msgstr "" "cas où le sens voulu n'est pas clair, utiliser les termes complets lève " "l’ambiguïté." -#: glossary.rst:457 +#: glossary.rst:483 msgid "generator iterator" msgstr "itérateur de générateur" -#: glossary.rst:459 +#: glossary.rst:485 msgid "An object created by a :term:`generator` function." msgstr "Objet créé par une fonction :term:`générateur`." -#: glossary.rst:461 +#: glossary.rst:487 msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " "location execution state (including local variables and pending try-" @@ -1113,11 +1170,11 @@ msgstr "" "il en était (contrairement à une fonction qui prendrait un nouveau départ à " "chaque invocation)." -#: glossary.rst:468 +#: glossary.rst:494 msgid "generator expression" msgstr "expression génératrice" -#: glossary.rst:470 +#: glossary.rst:496 msgid "" "An expression that returns an iterator. It looks like a normal expression " "followed by a :keyword:`!for` clause defining a loop variable, range, and an " @@ -1129,11 +1186,11 @@ msgstr "" "intervalle et une clause :keyword:`!if` optionnelle. Toute cette expression " "génère des valeurs pour la fonction qui l'entoure ::" -#: glossary.rst:477 +#: glossary.rst:503 msgid "generic function" msgstr "fonction générique" -#: glossary.rst:479 +#: glossary.rst:505 msgid "" "A function composed of multiple functions implementing the same operation " "for different types. Which implementation should be used during a call is " @@ -1143,7 +1200,7 @@ msgstr "" "pour différents types. L'implémentation à utiliser est déterminée lors de " "l'appel par l'algorithme de répartition." -#: glossary.rst:483 +#: glossary.rst:509 msgid "" "See also the :term:`single dispatch` glossary entry, the :func:`functools." "singledispatch` decorator, and :pep:`443`." @@ -1151,41 +1208,43 @@ msgstr "" "Voir aussi :term:`single dispatch`, le décorateur :func:`functools." "singledispatch` et la :pep:`443`." -#: glossary.rst:485 +#: glossary.rst:511 msgid "generic type" msgstr "type générique" -#: glossary.rst:487 +#: glossary.rst:513 msgid "" -"A :term:`type` that can be parameterized; typically a container like :class:" -"`list`. Used for :term:`type hints ` and :term:`annotations " -"`." +"A :term:`type` that can be parameterized; typically a :ref:`container " +"class` such as :class:`list` or :class:`dict`. Used for :" +"term:`type hints ` and :term:`annotations `." msgstr "" -"Un :term:`type` qui peut être paramétré ; typiquement un conteneur comme " -"une :class:`list`. Utilisé pour les :term:`indications de type ` " -"et les :term:`annotations `." +"Un :term:`type` qui peut être paramétré ; généralement un :ref:`conteneur " +"` comme :class:`list` ou :class:`dict`. Utilisé pour les :" +"term:`indications de type ` et les :term:`annotations " +"`." -#: glossary.rst:491 +#: glossary.rst:518 msgid "" -"See :pep:`483` for more details, and :mod:`typing` or :ref:`generic alias " -"type ` for its uses." +"For more details, see :ref:`generic alias types`, :pep:" +"`483`, :pep:`484`, :pep:`585`, and the :mod:`typing` module." msgstr "" -"Voir la :pep:`483` pour plus de détails, et :mod:`typing` ou :ref:`alias " -"générique de type ` pour ses utilisations." +"Pour plus de détails, voir :ref:`types alias génériques ` et le module :mod:`typing`. On trouvera l'historique de " +"cette fonctionnalité dans la :pep:`483`, la :pep:`484` et la :pep:`585`." -#: glossary.rst:493 +#: glossary.rst:520 msgid "GIL" msgstr "GIL" -#: glossary.rst:495 +#: glossary.rst:522 msgid "See :term:`global interpreter lock`." msgstr "Voir :term:`global interpreter lock`." -#: glossary.rst:496 +#: glossary.rst:523 msgid "global interpreter lock" msgstr "verrou global de l'interpréteur" -#: glossary.rst:498 +#: glossary.rst:525 msgid "" "The mechanism used by the :term:`CPython` interpreter to assure that only " "one thread executes Python :term:`bytecode` at a time. This simplifies the " @@ -1205,7 +1264,7 @@ msgstr "" "au détriment malheureusement de beaucoup du parallélisme possible sur les " "machines ayant plusieurs processeurs." -#: glossary.rst:507 +#: glossary.rst:534 msgid "" "However, some extension modules, either standard or third-party, are " "designed so as to release the GIL when doing computationally-intensive tasks " @@ -1217,7 +1276,7 @@ msgstr "" "compression ou le hachage. De la même manière, le GIL est toujours libéré " "lors des entrées / sorties." -#: glossary.rst:512 +#: glossary.rst:539 msgid "" "Past efforts to create a \"free-threaded\" interpreter (one which locks " "shared data at a much finer granularity) have not been successful because " @@ -1231,11 +1290,11 @@ msgstr "" "corriger ce problème de performance induit mènerait à une implémentation " "beaucoup plus compliquée et donc plus coûteuse à maintenir." -#: glossary.rst:518 +#: glossary.rst:545 msgid "hash-based pyc" msgstr "*pyc* utilisant le hachage" -#: glossary.rst:520 +#: glossary.rst:547 msgid "" "A bytecode cache file that uses the hash rather than the last-modified time " "of the corresponding source file to determine its validity. See :ref:`pyc-" @@ -1246,11 +1305,11 @@ msgstr "" "source correspondant pour déterminer sa validité. Voir :ref:`pyc-" "invalidation`." -#: glossary.rst:523 +#: glossary.rst:550 msgid "hashable" msgstr "hachable" -#: glossary.rst:525 +#: glossary.rst:552 msgid "" "An object is *hashable* if it has a hash value which never changes during " "its lifetime (it needs a :meth:`__hash__` method), and can be compared to " @@ -1263,7 +1322,7 @@ msgstr "" "hachables dont la comparaison par ``__eq__`` est vraie doivent avoir la même " "empreinte." -#: glossary.rst:530 +#: glossary.rst:557 msgid "" "Hashability makes an object usable as a dictionary key and a set member, " "because these data structures use the hash value internally." @@ -1272,7 +1331,7 @@ msgstr "" "en tant que membre d'un ensemble (type *set*), car ces structures de données " "utilisent ce *hash*." -#: glossary.rst:533 +#: glossary.rst:560 msgid "" "Most of Python's immutable built-in objects are hashable; mutable containers " "(such as lists or dictionaries) are not; immutable containers (such as " @@ -1289,11 +1348,11 @@ msgstr "" "considérées différentes (sauf avec elles-mêmes) et leur valeur de hachage " "est calculée à partir de leur :func:`id`." -#: glossary.rst:540 +#: glossary.rst:567 msgid "IDLE" msgstr "IDLE" -#: glossary.rst:542 +#: glossary.rst:569 msgid "" "An Integrated Development Environment for Python. IDLE is a basic editor " "and interpreter environment which ships with the standard distribution of " @@ -1302,11 +1361,11 @@ msgstr "" "Environnement de développement intégré pour Python. IDLE est un éditeur " "basique et un interpréteur livré avec la distribution standard de Python." -#: glossary.rst:545 +#: glossary.rst:572 msgid "immutable" msgstr "immuable" -#: glossary.rst:547 +#: glossary.rst:574 msgid "" "An object with a fixed value. Immutable objects include numbers, strings " "and tuples. Such an object cannot be altered. A new object has to be " @@ -1320,11 +1379,11 @@ msgstr "" "quand une valeur de *hash* constante est requise, typiquement en clé de " "dictionnaire." -#: glossary.rst:552 +#: glossary.rst:579 msgid "import path" msgstr "chemin des importations" -#: glossary.rst:554 +#: glossary.rst:581 msgid "" "A list of locations (or :term:`path entries `) that are searched " "by the :term:`path based finder` for modules to import. During import, this " @@ -1337,21 +1396,21 @@ msgstr "" "pour les sous-paquets, elle peut aussi venir de l'attribut ``__path__`` du " "paquet parent." -#: glossary.rst:559 +#: glossary.rst:586 msgid "importing" msgstr "importing" -#: glossary.rst:561 +#: glossary.rst:588 msgid "" "The process by which Python code in one module is made available to Python " "code in another module." msgstr "Processus rendant le code Python d'un module disponible dans un autre." -#: glossary.rst:563 +#: glossary.rst:590 msgid "importer" msgstr "importateur" -#: glossary.rst:565 +#: glossary.rst:592 msgid "" "An object that both finds and loads a module; both a :term:`finder` and :" "term:`loader` object." @@ -1359,11 +1418,11 @@ msgstr "" "Objet qui trouve et charge un module, en même temps un :term:`chercheur " "` et un :term:`chargeur `." -#: glossary.rst:567 +#: glossary.rst:594 msgid "interactive" msgstr "interactif" -#: glossary.rst:569 +#: glossary.rst:596 msgid "" "Python has an interactive interpreter which means you can enter statements " "and expressions at the interpreter prompt, immediately execute them and see " @@ -1378,11 +1437,11 @@ msgstr "" "de votre ordinateur). C'est un moyen puissant pour tester de nouvelles idées " "ou étudier de nouveaux modules (souvenez-vous de ``help(x)``)." -#: glossary.rst:575 +#: glossary.rst:602 msgid "interpreted" msgstr "interprété" -#: glossary.rst:577 +#: glossary.rst:604 msgid "" "Python is an interpreted language, as opposed to a compiled one, though the " "distinction can be blurry because of the presence of the bytecode compiler. " @@ -1399,11 +1458,11 @@ msgstr "" "développement / débogage plus court que les langages compilés. Cependant, " "ils s'exécutent généralement plus lentement. Voir aussi :term:`interactif`." -#: glossary.rst:584 +#: glossary.rst:611 msgid "interpreter shutdown" msgstr "arrêt de l'interpréteur" -#: glossary.rst:586 +#: glossary.rst:613 msgid "" "When asked to shut down, the Python interpreter enters a special phase where " "it gradually releases all allocated resources, such as modules and various " @@ -1424,7 +1483,7 @@ msgstr "" "fonctionner, (typiquement les modules des bibliothèques ou le mécanisme de " "*warning*)." -#: glossary.rst:595 +#: glossary.rst:622 msgid "" "The main reason for interpreter shutdown is that the ``__main__`` module or " "the script being run has finished executing." @@ -1432,26 +1491,27 @@ msgstr "" "La principale raison d'arrêt de l'interpréteur est que le module " "``__main__`` ou le script en cours d'exécution a terminé de s'exécuter." -#: glossary.rst:597 +#: glossary.rst:624 msgid "iterable" msgstr "itérable" -#: glossary.rst:599 +#: glossary.rst:626 +#, fuzzy msgid "" "An object capable of returning its members one at a time. Examples of " "iterables include all sequence types (such as :class:`list`, :class:`str`, " "and :class:`tuple`) and some non-sequence types like :class:`dict`, :term:" "`file objects `, and objects of any classes you define with an :" "meth:`__iter__` method or with a :meth:`__getitem__` method that implements :" -"term:`Sequence ` semantics." +"term:`sequence` semantics." msgstr "" "Objet capable de renvoyer ses éléments un à un. Par exemple, tous les types " "séquence (comme :class:`list`, :class:`str`, et :class:`tuple`), quelques " "autres types comme :class:`dict`, :term:`objets fichiers ` ou " "tout objet d'une classe ayant une méthode :meth:`__iter__` ou :meth:" -"`__getitem__` qui implémente la sémantique d'une :term:`Sequence`." +"`__getitem__` qui implémente la sémantique d'une :term:`Sequence `." -#: glossary.rst:606 +#: glossary.rst:633 msgid "" "Iterables can be used in a :keyword:`for` loop and in many other places " "where a sequence is needed (:func:`zip`, :func:`map`, ...). When an " @@ -1474,11 +1534,11 @@ msgstr "" "temporaire anonyme pour garder l'itérateur durant la boucle. Voir aussi :" "term:`itérateur`, :term:`séquence` et :term:`générateur`." -#: glossary.rst:616 +#: glossary.rst:643 msgid "iterator" msgstr "itérateur" -#: glossary.rst:618 +#: glossary.rst:645 msgid "" "An object representing a stream of data. Repeated calls to the iterator's :" "meth:`~iterator.__next__` method (or passing it to the built-in function :" @@ -1511,15 +1571,23 @@ msgstr "" "itérateur donnerait simplement le même objet itérateur épuisé utilisé dans " "son itération précédente, le faisant ressembler à un conteneur vide." -#: glossary.rst:633 +#: glossary.rst:660 msgid "More information can be found in :ref:`typeiter`." msgstr "Vous trouverez davantage d'informations dans :ref:`typeiter`." -#: glossary.rst:634 +#: glossary.rst:664 +msgid "" +"CPython does not consistently apply the requirement that an iterator define :" +"meth:`__iter__`." +msgstr "" +"CPython n'est pas toujours cohérent sur le fait de demander ou non à un " +"itérateur de définir :meth:`__iter__`." + +#: glossary.rst:666 msgid "key function" msgstr "fonction clé" -#: glossary.rst:636 +#: glossary.rst:668 msgid "" "A key function or collation function is a callable that returns a value used " "for sorting or ordering. For example, :func:`locale.strxfrm` is used to " @@ -1530,7 +1598,7 @@ msgstr "" "utilisée pour générer une clé de classement prenant en compte les " "conventions de classement spécifiques aux paramètres régionaux courants." -#: glossary.rst:641 +#: glossary.rst:673 msgid "" "A number of tools in Python accept key functions to control how elements are " "ordered or grouped. They include :func:`min`, :func:`max`, :func:`sorted`, :" @@ -1543,16 +1611,16 @@ msgstr "" "merge`, :func:`heapq.nsmallest`, :func:`heapq.nlargest` et :func:`itertools." "groupby`." -#: glossary.rst:647 +#: glossary.rst:679 +#, fuzzy msgid "" "There are several ways to create a key function. For example. the :meth:" "`str.lower` method can serve as a key function for case insensitive sorts. " "Alternatively, a key function can be built from a :keyword:`lambda` " -"expression such as ``lambda r: (r[0], r[2])``. Also, the :mod:`operator` " -"module provides three key function constructors: :func:`~operator." -"attrgetter`, :func:`~operator.itemgetter`, and :func:`~operator." -"methodcaller`. See the :ref:`Sorting HOW TO ` for examples of " -"how to create and use key functions." +"expression such as ``lambda r: (r[0], r[2])``. Also, :func:`operator." +"attrgetter`, :func:`operator.itemgetter`, and :func:`operator.methodcaller` " +"are three key function constructors. See the :ref:`Sorting HOW TO " +"` for examples of how to create and use key functions." msgstr "" "Il existe plusieurs moyens de créer une fonction clé. Par exemple, la " "méthode :meth:`str.lower` peut servir de fonction clé pour effectuer des " @@ -1564,19 +1632,19 @@ msgstr "" "Trier ` pour des exemples de création et d'utilisation de " "fonctions clefs." -#: glossary.rst:655 +#: glossary.rst:686 msgid "keyword argument" msgstr "argument nommé" -#: glossary.rst:934 +#: glossary.rst:977 msgid "See :term:`argument`." msgstr "Voir :term:`argument`." -#: glossary.rst:658 +#: glossary.rst:689 msgid "lambda" msgstr "lambda" -#: glossary.rst:660 +#: glossary.rst:691 msgid "" "An anonymous inline function consisting of a single :term:`expression` which " "is evaluated when the function is called. The syntax to create a lambda " @@ -1587,11 +1655,11 @@ msgstr "" "syntaxe pour créer des fonctions lambda est : ``lambda [parameters]: " "expression``" -#: glossary.rst:663 +#: glossary.rst:694 msgid "LBYL" msgstr "LBYL" -#: glossary.rst:665 +#: glossary.rst:696 msgid "" "Look before you leap. This coding style explicitly tests for pre-conditions " "before making calls or lookups. This style contrasts with the :term:`EAFP` " @@ -1603,7 +1671,7 @@ msgstr "" "appels ou des accès. Ce style contraste avec le style :term:`EAFP` et se " "caractérise par la présence de beaucoup d'instructions :keyword:`if`." -#: glossary.rst:670 +#: glossary.rst:701 msgid "" "In a multi-threaded environment, the LBYL approach can risk introducing a " "race condition between \"the looking\" and \"the leaping\". For example, " @@ -1619,11 +1687,46 @@ msgstr "" "l'accès. Ce problème peut être résolu avec des verrous (*locks*) ou avec " "l'approche EAFP." -#: glossary.rst:675 +#: glossary.rst:706 +msgid "locale encoding" +msgstr "encodage régional" + +#: glossary.rst:708 +#, fuzzy +msgid "" +"On Unix, it is the encoding of the LC_CTYPE locale. It can be set with :func:" +"`locale.setlocale(locale.LC_CTYPE, new_locale) `." +msgstr "" +"Sous Unix, il est défini par la variable régionale LC_CTYPE. Il peut être " +"modifié par ``locale.setlocale(locale.LC_CTYPE, new_locale)``." + +#: glossary.rst:711 +#, fuzzy +msgid "On Windows, it is the ANSI code page (ex: ``\"cp1252\"``)." +msgstr "Sous Windows, c'est un encodage ANSI (ex. : ``cp1252``)." + +#: glossary.rst:713 +msgid "" +"On Android and VxWorks, Python uses ``\"utf-8\"`` as the locale encoding." +msgstr "" + +#: glossary.rst:715 +#, fuzzy +msgid "``locale.getencoding()`` can be used to get the locale encoding." +msgstr "" +"``locale.getpreferredencoding(False)`` permet de récupérer l'encodage " +"régional." + +#: glossary.rst:717 +#, fuzzy +msgid "See also the :term:`filesystem encoding and error handler`." +msgstr "encodage du système de fichier et gestionnaire d'erreur" + +#: glossary.rst:718 msgid "list" msgstr "list" -#: glossary.rst:677 +#: glossary.rst:720 msgid "" "A built-in Python :term:`sequence`. Despite its name it is more akin to an " "array in other languages than to a linked list since access to elements is " @@ -1633,11 +1736,11 @@ msgstr "" "``list`` ressemble plus à un tableau (*array* dans la plupart des langages) " "qu'à une liste chaînée puisque les accès se font en O(1)." -#: glossary.rst:680 +#: glossary.rst:723 msgid "list comprehension" -msgstr "liste en compréhension (ou liste en intention)" +msgstr "liste en compréhension (ou liste en intension)" -#: glossary.rst:682 +#: glossary.rst:725 msgid "" "A compact way to process all or part of the elements in a sequence and " "return a list with the results. ``result = ['{:#04x}'.format(x) for x in " @@ -1652,11 +1755,11 @@ msgstr "" "hexadécimal (``0x…``). La clause :keyword:`if` est optionnelle. Si elle est " "omise, tous les éléments du ``range(256)`` seront utilisés." -#: glossary.rst:688 +#: glossary.rst:731 msgid "loader" msgstr "chargeur" -#: glossary.rst:690 +#: glossary.rst:733 msgid "" "An object that loads a module. It must define a method named :meth:" "`load_module`. A loader is typically returned by a :term:`finder`. See :pep:" @@ -1668,23 +1771,24 @@ msgstr "" "`. Voir la :pep:`302` pour plus de détails et :class:`importlib.ABC." "Loader` pour sa :term:`classe de base abstraite`." -#: glossary.rst:694 +#: glossary.rst:737 msgid "magic method" msgstr "méthode magique" -#: glossary.rst:698 +#: glossary.rst:741 msgid "An informal synonym for :term:`special method`." msgstr "Un synonyme informel de :term:`special method`." -#: glossary.rst:699 +#: glossary.rst:742 msgid "mapping" msgstr "tableau de correspondances" -#: glossary.rst:701 +#: glossary.rst:744 +#, fuzzy msgid "" "A container object that supports arbitrary key lookups and implements the " -"methods specified in the :class:`~collections.abc.Mapping` or :class:" -"`~collections.abc.MutableMapping` :ref:`abstract base classes `. Examples include :class:`dict`, :class:" "`collections.defaultdict`, :class:`collections.OrderedDict` and :class:" "`collections.Counter`." @@ -1697,11 +1801,11 @@ msgstr "" "`dict`, :class:`collections.defaultdict`, :class:`collections.OrderedDict` " "et :class:`collections.Counter`." -#: glossary.rst:707 +#: glossary.rst:750 msgid "meta path finder" msgstr "chercheur dans les méta-chemins" -#: glossary.rst:709 +#: glossary.rst:752 msgid "" "A :term:`finder` returned by a search of :data:`sys.meta_path`. Meta path " "finders are related to, but different from :term:`path entry finders `." -#: glossary.rst:713 +#: glossary.rst:756 msgid "" "See :class:`importlib.abc.MetaPathFinder` for the methods that meta path " "finders implement." @@ -1719,11 +1823,11 @@ msgstr "" "Voir :class:`importlib.abc.MetaPathFinder` pour les méthodes que les " "chercheurs dans les méta-chemins doivent implémenter." -#: glossary.rst:715 +#: glossary.rst:758 msgid "metaclass" msgstr "métaclasse" -#: glossary.rst:717 +#: glossary.rst:760 msgid "" "The class of a class. Class definitions create a class name, a class " "dictionary, and a list of base classes. The metaclass is responsible for " @@ -1747,15 +1851,15 @@ msgstr "" "*multi-threads*, suivre la création d'objets, implémenter des singletons et " "bien d'autres tâches." -#: glossary.rst:727 +#: glossary.rst:770 msgid "More information can be found in :ref:`metaclasses`." msgstr "Plus d'informations sont disponibles dans : :ref:`metaclasses`." -#: glossary.rst:728 +#: glossary.rst:771 msgid "method" msgstr "méthode" -#: glossary.rst:730 +#: glossary.rst:773 msgid "" "A function which is defined inside a class body. If called as an attribute " "of an instance of that class, the method will get the instance object as its " @@ -1767,11 +1871,11 @@ msgstr "" "premier :term:`argument` (qui, par convention, est habituellement nommé " "``self``). Voir :term:`function` et :term:`nested scope`." -#: glossary.rst:734 +#: glossary.rst:777 msgid "method resolution order" msgstr "ordre de résolution des méthodes" -#: glossary.rst:736 +#: glossary.rst:779 msgid "" "Method Resolution Order is the order in which base classes are searched for " "a member during lookup. See `The Python 2.3 Method Resolution Order `_ pour plus de détails sur l'algorithme utilisé par " "l'interpréteur Python depuis la version 2.3." -#: glossary.rst:740 +#: glossary.rst:783 msgid "module" msgstr "module" -#: glossary.rst:742 +#: glossary.rst:785 msgid "" "An object that serves as an organizational unit of Python code. Modules " "have a namespace containing arbitrary Python objects. Modules are loaded " @@ -1799,15 +1903,15 @@ msgstr "" "modules ont un espace de nommage et peuvent contenir n'importe quels objets " "Python. Charger des modules est appelé :term:`importer `." -#: glossary.rst:746 +#: glossary.rst:789 msgid "See also :term:`package`." msgstr "Voir aussi :term:`paquet`." -#: glossary.rst:747 +#: glossary.rst:790 msgid "module spec" msgstr "spécificateur de module" -#: glossary.rst:749 +#: glossary.rst:792 msgid "" "A namespace containing the import-related information used to load a module. " "An instance of :class:`importlib.machinery.ModuleSpec`." @@ -1816,19 +1920,19 @@ msgstr "" "utilisées pour charger un module. C'est une instance de la classe :class:" "`importlib.machinery.ModuleSpec`." -#: glossary.rst:751 +#: glossary.rst:794 msgid "MRO" msgstr "MRO" -#: glossary.rst:753 +#: glossary.rst:796 msgid "See :term:`method resolution order`." msgstr "Voir :term:`ordre de résolution des méthodes`." -#: glossary.rst:754 +#: glossary.rst:797 msgid "mutable" msgstr "muable" -#: glossary.rst:756 +#: glossary.rst:799 msgid "" "Mutable objects can change their value but keep their :func:`id`. See also :" "term:`immutable`." @@ -1836,11 +1940,11 @@ msgstr "" "Un objet muable peut changer de valeur tout en gardant le même :func:`id`. " "Voir aussi :term:`immuable`." -#: glossary.rst:758 +#: glossary.rst:801 msgid "named tuple" msgstr "n-uplet nommé" -#: glossary.rst:760 +#: glossary.rst:803 msgid "" "The term \"named tuple\" applies to any type or class that inherits from " "tuple and whose indexable elements are also accessible using named " @@ -1851,7 +1955,7 @@ msgstr "" "accessibles en utilisant des attributs nommés. Les types et classes peuvent " "avoir aussi d'autres caractéristiques." -#: glossary.rst:764 +#: glossary.rst:807 msgid "" "Several built-in types are named tuples, including the values returned by :" "func:`time.localtime` and :func:`os.stat`. Another example is :data:`sys." @@ -1861,7 +1965,7 @@ msgstr "" "retournées par :func:`time.localtime` et :func:`os.stat`. Un autre exemple " "est :data:`sys.float_info` ::" -#: glossary.rst:775 +#: glossary.rst:818 msgid "" "Some named tuples are built-in types (such as the above examples). " "Alternatively, a named tuple can be created from a regular class definition " @@ -1878,11 +1982,11 @@ msgstr "" "méthodes supplémentaires qui ne seront pas trouvées dans celles écrites à la " "main ni dans les n-uplets nommés natifs." -#: glossary.rst:782 +#: glossary.rst:825 msgid "namespace" msgstr "espace de nommage" -#: glossary.rst:784 +#: glossary.rst:827 msgid "" "The place where a variable is stored. Namespaces are implemented as " "dictionaries. There are the local, global and built-in namespaces as well " @@ -1906,11 +2010,11 @@ msgstr "" "implémentées respectivement dans les modules :mod:`random` et :mod:" "`itertools`." -#: glossary.rst:794 +#: glossary.rst:837 msgid "namespace package" msgstr "paquet-espace de nommage" -#: glossary.rst:796 +#: glossary.rst:839 msgid "" "A :pep:`420` :term:`package` which serves only as a container for " "subpackages. Namespace packages may have no physical representation, and " @@ -1922,15 +2026,15 @@ msgstr "" "aucune représentation physique et, plus spécifiquement, ne sont pas comme " "un :term:`paquet classique` puisqu'ils n'ont pas de fichier ``__init__.py``." -#: glossary.rst:801 +#: glossary.rst:844 msgid "See also :term:`module`." msgstr "Voir aussi :term:`module`." -#: glossary.rst:802 +#: glossary.rst:845 msgid "nested scope" msgstr "portée imbriquée" -#: glossary.rst:804 +#: glossary.rst:847 msgid "" "The ability to refer to a variable in an enclosing definition. For " "instance, a function defined inside another function can refer to variables " @@ -1948,11 +2052,11 @@ msgstr "" "dans l'espace de nommage global, le mot clef :keyword:`nonlocal` permet " "d'écrire dans l'espace de nommage dans lequel est déclarée la variable." -#: glossary.rst:811 +#: glossary.rst:854 msgid "new-style class" msgstr "nouvelle classe" -#: glossary.rst:813 +#: glossary.rst:856 msgid "" "Old name for the flavor of classes now used for all class objects. In " "earlier Python versions, only new-style classes could use Python's newer, " @@ -1965,11 +2069,11 @@ msgstr "" "__slots__`, les descripteurs, les propriétés, :meth:`__getattribute__`, les " "méthodes de classe et les méthodes statiques." -#: glossary.rst:817 +#: glossary.rst:860 msgid "object" msgstr "objet" -#: glossary.rst:819 +#: glossary.rst:862 msgid "" "Any data with state (attributes or value) and defined behavior (methods). " "Also the ultimate base class of any :term:`new-style class`." @@ -1979,11 +2083,11 @@ msgstr "" "l'ancêtre commun à absolument toutes les :term:`nouvelles classes `." -#: glossary.rst:822 +#: glossary.rst:865 msgid "package" msgstr "paquet" -#: glossary.rst:824 +#: glossary.rst:867 msgid "" "A Python :term:`module` which can contain submodules or recursively, " "subpackages. Technically, a package is a Python module with an ``__path__`` " @@ -1993,15 +2097,15 @@ msgstr "" "paquets. Techniquement, un paquet est un module qui possède un attribut " "``__path__``." -#: glossary.rst:828 +#: glossary.rst:871 msgid "See also :term:`regular package` and :term:`namespace package`." msgstr "Voir aussi :term:`paquet classique` et :term:`namespace package`." -#: glossary.rst:829 +#: glossary.rst:872 msgid "parameter" msgstr "paramètre" -#: glossary.rst:831 +#: glossary.rst:874 msgid "" "A named entity in a :term:`function` (or method) definition that specifies " "an :term:`argument` (or in some cases, arguments) that the function can " @@ -2011,7 +2115,7 @@ msgstr "" "décrivant un :term:`argument` (ou dans certains cas des arguments) que la " "fonction accepte. Il existe cinq sortes de paramètres :" -#: glossary.rst:835 +#: glossary.rst:878 msgid "" ":dfn:`positional-or-keyword`: specifies an argument that can be passed " "either :term:`positionally ` or as a :term:`keyword argument " @@ -2023,7 +2127,7 @@ msgstr "" "C'est le type de paramètre par défaut. Par exemple, *foo* et *bar* dans " "l'exemple suivant ::" -#: glossary.rst:844 +#: glossary.rst:887 msgid "" ":dfn:`positional-only`: specifies an argument that can be supplied only by " "position. Positional-only parameters can be defined by including a ``/`` " @@ -2035,7 +2139,7 @@ msgstr "" "un caractère \"/\" dans la liste de paramètres de la définition de fonction " "après eux. Par exemple : *posonly1* et *posonly2* dans le code suivant ::" -#: glossary.rst:853 +#: glossary.rst:896 msgid "" ":dfn:`keyword-only`: specifies an argument that can be supplied only by " "keyword. Keyword-only parameters can be defined by including a single var-" @@ -2049,7 +2153,7 @@ msgstr "" "liste des paramètres avant eux. Par exemple, *kw_only1* et *kw_only2* dans " "le code suivant ::" -#: glossary.rst:861 +#: glossary.rst:904 msgid "" ":dfn:`var-positional`: specifies that an arbitrary sequence of positional " "arguments can be provided (in addition to any positional arguments already " @@ -2062,7 +2166,7 @@ msgstr "" "d'autres paramètres). Un tel paramètre peut être défini en préfixant son nom " "par une ``*``. Par exemple *args* ci-après ::" -#: glossary.rst:869 +#: glossary.rst:912 msgid "" ":dfn:`var-keyword`: specifies that arbitrarily many keyword arguments can be " "provided (in addition to any keyword arguments already accepted by other " @@ -2074,7 +2178,7 @@ msgstr "" "d'autres paramètres). Un tel paramètre est défini en préfixant le nom du " "paramètre par ``**``. Par exemple, *kwargs* ci-dessus." -#: glossary.rst:875 +#: glossary.rst:918 msgid "" "Parameters can specify both optional and required arguments, as well as " "default values for some optional arguments." @@ -2082,7 +2186,7 @@ msgstr "" "Les paramètres peuvent spécifier des arguments obligatoires ou optionnels, " "ainsi que des valeurs par défaut pour les arguments optionnels." -#: glossary.rst:878 +#: glossary.rst:921 msgid "" "See also the :term:`argument` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " @@ -2094,11 +2198,11 @@ msgstr "" "parameter>` dans la FAQ, la classe :class:`inspect.Parameter`, la section :" "ref:`function` et la :pep:`362`." -#: glossary.rst:882 +#: glossary.rst:925 msgid "path entry" msgstr "entrée de chemin" -#: glossary.rst:884 +#: glossary.rst:927 msgid "" "A single location on the :term:`import path` which the :term:`path based " "finder` consults to find modules for importing." @@ -2107,11 +2211,11 @@ msgstr "" "path* en anglais, d'où le *path*) que le :term:`chercheur basé sur les " "chemins ` consulte pour trouver des modules à importer." -#: glossary.rst:886 +#: glossary.rst:929 msgid "path entry finder" msgstr "chercheur de chemins" -#: glossary.rst:888 +#: glossary.rst:931 msgid "" "A :term:`finder` returned by a callable on :data:`sys.path_hooks` (i.e. a :" "term:`path entry hook`) which knows how to locate modules given a :term:" @@ -2122,7 +2226,7 @@ msgstr "" "path `) qui sait où trouver des modules lorsqu'on lui donne " "une :term:`entrée de path `." -#: glossary.rst:892 +#: glossary.rst:935 msgid "" "See :class:`importlib.abc.PathEntryFinder` for the methods that path entry " "finders implement." @@ -2130,11 +2234,11 @@ msgstr "" "Voir :class:`importlib.abc.PathEntryFinder` pour les méthodes qu'un " "chercheur d'entrée dans *path* doit implémenter." -#: glossary.rst:894 +#: glossary.rst:937 msgid "path entry hook" msgstr "point d'entrée pour la recherche dans *path*" -#: glossary.rst:896 +#: glossary.rst:939 msgid "" "A callable on the :data:`sys.path_hook` list which returns a :term:`path " "entry finder` if it knows how to find modules on a specific :term:`path " @@ -2144,11 +2248,11 @@ msgstr "" "d'entrée dans path ` s'il sait où trouver des modules " "pour une :term:`entrée dans path ` donnée." -#: glossary.rst:899 +#: glossary.rst:942 msgid "path based finder" msgstr "chercheur basé sur les chemins" -#: glossary.rst:901 +#: glossary.rst:944 msgid "" "One of the default :term:`meta path finders ` which " "searches an :term:`import path` for modules." @@ -2157,11 +2261,11 @@ msgstr "" "défaut qui cherche des modules dans un :term:`chemin des importations " "`." -#: glossary.rst:903 +#: glossary.rst:946 msgid "path-like object" msgstr "objet simili-chemin" -#: glossary.rst:905 +#: glossary.rst:948 msgid "" "An object representing a file system path. A path-like object is either a :" "class:`str` or :class:`bytes` object representing a path, or an object " @@ -2181,11 +2285,11 @@ msgstr "" "peuvent être utilisées, respectivement, pour garantir un résultat de type :" "class:`str` ou :class:`bytes` à la place. A été Introduit par la :pep:`519`." -#: glossary.rst:913 +#: glossary.rst:956 msgid "PEP" msgstr "PEP" -#: glossary.rst:915 +#: glossary.rst:958 msgid "" "Python Enhancement Proposal. A PEP is a design document providing " "information to the Python community, or describing a new feature for Python " @@ -2198,7 +2302,7 @@ msgstr "" "ou son environnement. Les PEP doivent fournir une spécification technique " "concise et une justification des fonctionnalités proposées." -#: glossary.rst:921 +#: glossary.rst:964 msgid "" "PEPs are intended to be the primary mechanisms for proposing major new " "features, for collecting community input on an issue, and for documenting " @@ -2213,15 +2317,15 @@ msgstr "" "l’établissement d’un consensus au sein de la communauté et de documenter les " "opinions contradictoires." -#: glossary.rst:927 +#: glossary.rst:970 msgid "See :pep:`1`." msgstr "Voir :pep:`1`." -#: glossary.rst:928 +#: glossary.rst:971 msgid "portion" msgstr "portion" -#: glossary.rst:930 +#: glossary.rst:973 msgid "" "A set of files in a single directory (possibly stored in a zip file) that " "contribute to a namespace package, as defined in :pep:`420`." @@ -2230,15 +2334,15 @@ msgstr "" "fichier zip) qui contribue à l'espace de nommage d'un paquet, tel que défini " "dans la :pep:`420`." -#: glossary.rst:932 +#: glossary.rst:975 msgid "positional argument" msgstr "argument positionnel" -#: glossary.rst:935 +#: glossary.rst:978 msgid "provisional API" msgstr "API provisoire" -#: glossary.rst:937 +#: glossary.rst:980 msgid "" "A provisional API is one which has been deliberately excluded from the " "standard library's backwards compatibility guarantees. While major changes " @@ -2257,7 +2361,7 @@ msgstr "" "surviendront que si de sérieux problèmes sont découverts et qu'ils n'avaient " "pas été identifiés avant l'ajout de l'API." -#: glossary.rst:946 +#: glossary.rst:989 msgid "" "Even for provisional APIs, backwards incompatible changes are seen as a " "\"solution of last resort\" - every attempt will still be made to find a " @@ -2268,7 +2372,7 @@ msgstr "" "possible sera fait pour tenter de résoudre les problèmes en conservant la " "rétrocompatibilité." -#: glossary.rst:950 +#: glossary.rst:993 msgid "" "This process allows the standard library to continue to evolve over time, " "without locking in problematic design errors for extended periods of time. " @@ -2278,19 +2382,19 @@ msgstr "" "le temps, sans se bloquer longtemps sur des erreurs d'architecture. Voir la :" "pep:`411` pour plus de détails." -#: glossary.rst:953 +#: glossary.rst:996 msgid "provisional package" msgstr "paquet provisoire" -#: glossary.rst:955 +#: glossary.rst:998 msgid "See :term:`provisional API`." msgstr "Voir :term:`provisional API`." -#: glossary.rst:956 +#: glossary.rst:999 msgid "Python 3000" msgstr "Python 3000" -#: glossary.rst:958 +#: glossary.rst:1001 msgid "" "Nickname for the Python 3.x release line (coined long ago when the release " "of version 3 was something in the distant future.) This is also abbreviated " @@ -2299,11 +2403,11 @@ msgstr "" "Surnom donné à la série des Python 3.x (très vieux surnom donné à l'époque " "où Python 3 représentait un futur lointain). Aussi abrégé *Py3k*." -#: glossary.rst:961 +#: glossary.rst:1004 msgid "Pythonic" msgstr "*Pythonique*" -#: glossary.rst:963 +#: glossary.rst:1006 msgid "" "An idea or piece of code which closely follows the most common idioms of the " "Python language, rather than implementing code using concepts common to " @@ -2319,16 +2423,16 @@ msgstr "" "les gens qui ne sont pas habitués à Python utilisent parfois un compteur " "numérique à la place ::" -#: glossary.rst:973 +#: glossary.rst:1016 msgid "As opposed to the cleaner, Pythonic method::" msgstr "" "Plutôt qu'utiliser la méthode, plus propre et élégante, donc *Pythonique* ::" -#: glossary.rst:977 +#: glossary.rst:1020 msgid "qualified name" msgstr "nom qualifié" -#: glossary.rst:979 +#: glossary.rst:1022 msgid "" "A dotted name showing the \"path\" from a module's global scope to a class, " "function or method defined in that module, as defined in :pep:`3155`. For " @@ -2340,7 +2444,7 @@ msgstr "" "module, tel que défini dans la :pep:`3155`. Pour les fonctions et classes de " "premier niveau, le nom qualifié est le même que le nom de l'objet ::" -#: glossary.rst:996 +#: glossary.rst:1039 msgid "" "When used to refer to modules, the *fully qualified name* means the entire " "dotted path to the module, including any parent packages, e.g. ``email.mime." @@ -2351,18 +2455,18 @@ msgstr "" "par des points) vers le module, incluant tous les paquets parents. Par " "exemple : ``email.mime.text`` ::" -#: glossary.rst:1003 +#: glossary.rst:1046 msgid "reference count" msgstr "nombre de références" -#: glossary.rst:1005 +#: glossary.rst:1048 +#, fuzzy msgid "" "The number of references to an object. When the reference count of an " "object drops to zero, it is deallocated. Reference counting is generally " "not visible to Python code, but it is a key element of the :term:`CPython` " -"implementation. The :mod:`sys` module defines a :func:`~sys.getrefcount` " -"function that programmers can call to return the reference count for a " -"particular object." +"implementation. Programmers can call the :func:`sys.getrefcount` function " +"to return the reference count for a particular object." msgstr "" "Nombre de références à un objet. Lorsque le nombre de références à un objet " "descend à zéro, l'objet est désalloué. Le comptage de référence n'est " @@ -2371,11 +2475,11 @@ msgstr "" "func:`~sys.getrefcount` que les développeurs peuvent utiliser pour obtenir " "le nombre de références à un objet donné." -#: glossary.rst:1011 +#: glossary.rst:1054 msgid "regular package" msgstr "paquet classique" -#: glossary.rst:1013 +#: glossary.rst:1056 msgid "" "A traditional :term:`package`, such as a directory containing an ``__init__." "py`` file." @@ -2383,15 +2487,15 @@ msgstr "" ":term:`paquet` traditionnel, tel qu'un dossier contenant un fichier " "``__init__.py``." -#: glossary.rst:1016 +#: glossary.rst:1059 msgid "See also :term:`namespace package`." msgstr "Voir aussi :term:`paquet-espace de nommage `." -#: glossary.rst:1017 +#: glossary.rst:1060 msgid "__slots__" msgstr "__slots__" -#: glossary.rst:1019 +#: glossary.rst:1062 msgid "" "A declaration inside a class that saves memory by pre-declaring space for " "instance attributes and eliminating instance dictionaries. Though popular, " @@ -2406,11 +2510,11 @@ msgstr "" "nombre d'instances dans une application devient un sujet critique pour la " "mémoire." -#: glossary.rst:1024 +#: glossary.rst:1067 msgid "sequence" msgstr "séquence" -#: glossary.rst:1026 +#: glossary.rst:1069 msgid "" "An :term:`iterable` which supports efficient element access using integer " "indices via the :meth:`__getitem__` special method and defines a :meth:" @@ -2429,7 +2533,7 @@ msgstr "" "*mapping* plutôt qu'une séquence, car ses accès se font par une clé " "arbitraire :term:`immuable` plutôt qu'un nombre entier." -#: glossary.rst:1035 +#: glossary.rst:1078 msgid "" "The :class:`collections.abc.Sequence` abstract base class defines a much " "richer interface that goes beyond just :meth:`__getitem__` and :meth:" @@ -2443,11 +2547,11 @@ msgstr "" "et :meth:`__reversed__`. Les types qui implémentent cette interface étendue " "peuvent s'enregistrer explicitement en utilisant :func:`~abc.register`." -#: glossary.rst:1042 +#: glossary.rst:1085 msgid "set comprehension" msgstr "ensemble en compréhension (ou ensemble en intension)" -#: glossary.rst:1044 +#: glossary.rst:1087 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a set with the results. ``results = {c for c in 'abracadabra' if c " @@ -2459,11 +2563,11 @@ msgstr "" "'abracadabra' if c not in 'abc'}`` génère l'ensemble contenant les lettres " "« r » et « d » ``{'r', 'd'}``. Voir :ref:`comprehensions`." -#: glossary.rst:1048 +#: glossary.rst:1091 msgid "single dispatch" msgstr "distribution simple" -#: glossary.rst:1050 +#: glossary.rst:1093 msgid "" "A form of :term:`generic function` dispatch where the implementation is " "chosen based on the type of a single argument." @@ -2472,11 +2576,11 @@ msgstr "" "générique>`, où l'implémentation est choisie en fonction du type d'un seul " "argument." -#: glossary.rst:1052 +#: glossary.rst:1095 msgid "slice" msgstr "tranche" -#: glossary.rst:1054 +#: glossary.rst:1097 msgid "" "An object usually containing a portion of a :term:`sequence`. A slice is " "created using the subscript notation, ``[]`` with colons between numbers " @@ -2489,11 +2593,11 @@ msgstr "" "``variable_name[1:3:5]``. Cette notation utilise des objets :class:`slice` " "en interne." -#: glossary.rst:1058 +#: glossary.rst:1101 msgid "special method" msgstr "méthode spéciale" -#: glossary.rst:1062 +#: glossary.rst:1105 msgid "" "A method that is called implicitly by Python to execute a certain operation " "on a type, such as addition. Such methods have names starting and ending " @@ -2505,11 +2609,11 @@ msgstr "" "ont des noms commençant et terminant par des doubles tirets bas. Les " "méthodes spéciales sont documentées dans :ref:`specialnames`." -#: glossary.rst:1066 +#: glossary.rst:1109 msgid "statement" msgstr "instruction" -#: glossary.rst:1068 +#: glossary.rst:1111 msgid "" "A statement is part of a suite (a \"block\" of code). A statement is either " "an :term:`expression` or one of several constructs with a keyword, such as :" @@ -2520,21 +2624,63 @@ msgstr "" "constructions basées sur un mot-clé, comme :keyword:`if`, :keyword:`while` " "ou :keyword:`for`." -#: glossary.rst:1071 +#: glossary.rst:1114 +msgid "strong reference" +msgstr "référence forte" + +#: glossary.rst:1116 +msgid "" +"In Python's C API, a strong reference is a reference to an object which " +"increments the object's reference count when it is created and decrements " +"the object's reference count when it is deleted." +msgstr "" +"Dans l'API C de Python, une référence forte est une référence vers un objet " +"qui incrémente son compteur de références lorsqu'elle est créée et le " +"décrémente lorsqu'elle est effacée." + +#: glossary.rst:1120 +msgid "" +"The :c:func:`Py_NewRef` function can be used to create a strong reference to " +"an object. Usually, the :c:func:`Py_DECREF` function must be called on the " +"strong reference before exiting the scope of the strong reference, to avoid " +"leaking one reference." +msgstr "" +"Une référence forte est créée à l'aide de la fonction :c:func:`Py_NewRef`. " +"Il faut normalement appeler :c:func:`Py_DECREF` dessus avant de sortir de sa " +"portée lexicale, sans quoi il y a une fuite de référence." + +#: glossary.rst:1125 +msgid "See also :term:`borrowed reference`." +msgstr "Voir aussi :term:`référence empruntée`." + +#: glossary.rst:1126 msgid "text encoding" msgstr "encodage de texte" -#: glossary.rst:1073 -msgid "A codec which encodes Unicode strings to bytes." +#: glossary.rst:1128 +msgid "" +"A string in Python is a sequence of Unicode code points (in range " +"``U+0000``--``U+10FFFF``). To store or transfer a string, it needs to be " +"serialized as a sequence of bytes." msgstr "" -"Codec (codeur-décodeur) qui convertit des chaînes de caractères Unicode en " -"octets (classe *bytes*)." -#: glossary.rst:1074 +#: glossary.rst:1132 +msgid "" +"Serializing a string into a sequence of bytes is known as \"encoding\", and " +"recreating the string from the sequence of bytes is known as \"decoding\"." +msgstr "" + +#: glossary.rst:1135 +msgid "" +"There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." +msgstr "" + +#: glossary.rst:1138 msgid "text file" msgstr "fichier texte" -#: glossary.rst:1076 +#: glossary.rst:1140 msgid "" "A :term:`file object` able to read and write :class:`str` objects. Often, a " "text file actually accesses a byte-oriented datastream and handles the :term:" @@ -2549,7 +2695,7 @@ msgstr "" "ou ``'w'``), :data:`sys.stdin`, :data:`sys.stdout` et les instances de :" "class:`io.StringIO`." -#: glossary.rst:1083 +#: glossary.rst:1147 msgid "" "See also :term:`binary file` for a file object able to read and write :term:" "`bytes-like objects `." @@ -2557,11 +2703,11 @@ msgstr "" "Voir aussi :term:`binary file` pour un objet fichier capable de lire et " "d'écrire :term:`bytes-like objects `." -#: glossary.rst:1085 +#: glossary.rst:1149 msgid "triple-quoted string" msgstr "chaîne entre triple guillemets" -#: glossary.rst:1087 +#: glossary.rst:1151 msgid "" "A string which is bound by three instances of either a quotation mark (\") " "or an apostrophe ('). While they don't provide any functionality not " @@ -2576,15 +2722,15 @@ msgstr "" "qui ne soit pas disponible avec une chaîne entre guillemets, elle est utile " "pour de nombreuses raisons. Elle vous autorise à insérer des guillemets " "simples et doubles dans une chaîne sans avoir à les protéger et elle peut " -"s'étendre sur plusieurs lignes sans avoir à terminer chaque ligne par un ``" -"\\``. Elle est ainsi particulièrement utile pour les chaînes de " +"s'étendre sur plusieurs lignes sans avoir à terminer chaque ligne par un " +"``\\``. Elle est ainsi particulièrement utile pour les chaînes de " "documentation (*docstrings*)." -#: glossary.rst:1094 +#: glossary.rst:1158 msgid "type" msgstr "type" -#: glossary.rst:1096 +#: glossary.rst:1160 msgid "" "The type of a Python object determines what kind of object it is; every " "object has a type. An object's type is accessible as its :attr:`~instance." @@ -2594,15 +2740,15 @@ msgstr "" "objets ont un type. Le type d'un objet peut être obtenu via son attribut :" "attr:`~instance.__class__` ou via ``type(obj)``." -#: glossary.rst:1100 +#: glossary.rst:1164 msgid "type alias" msgstr "alias de type" -#: glossary.rst:1102 +#: glossary.rst:1166 msgid "A synonym for a type, created by assigning the type to an identifier." msgstr "Synonyme d'un type, créé en affectant le type à un identifiant." -#: glossary.rst:1104 +#: glossary.rst:1168 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" @@ -2610,19 +2756,19 @@ msgstr "" "Les alias de types sont utiles pour simplifier les :term:`indications de " "types `. Par exemple ::" -#: glossary.rst:1111 +#: glossary.rst:1175 msgid "could be made more readable like this::" msgstr "pourrait être rendu plus lisible comme ceci ::" -#: glossary.rst:1132 +#: glossary.rst:1196 msgid "See :mod:`typing` and :pep:`484`, which describe this functionality." msgstr "Voir :mod:`typing` et :pep:`484`, qui décrivent cette fonctionnalité." -#: glossary.rst:1119 +#: glossary.rst:1183 msgid "type hint" msgstr "indication de type" -#: glossary.rst:1121 +#: glossary.rst:1185 msgid "" "An :term:`annotation` that specifies the expected type for a variable, a " "class attribute, or a function parameter or return value." @@ -2630,7 +2776,7 @@ msgstr "" "Le :term:`annotation` qui spécifie le type attendu pour une variable, un " "attribut de classe, un paramètre de fonction ou une valeur de retour." -#: glossary.rst:1124 +#: glossary.rst:1188 msgid "" "Type hints are optional and are not enforced by Python but they are useful " "to static type analysis tools, and aid IDEs with code completion and " @@ -2641,7 +2787,7 @@ msgstr "" "statique et aident les IDE à compléter et à réusiner (*code refactoring* en " "anglais) le code." -#: glossary.rst:1128 +#: glossary.rst:1192 msgid "" "Type hints of global variables, class attributes, and functions, but not " "local variables, can be accessed using :func:`typing.get_type_hints`." @@ -2650,11 +2796,11 @@ msgstr "" "fonctions, mais pas de variables locales, peuvent être consultés en " "utilisant :func:`typing.get_type_hints`." -#: glossary.rst:1133 +#: glossary.rst:1197 msgid "universal newlines" msgstr "retours à la ligne universels" -#: glossary.rst:1135 +#: glossary.rst:1199 msgid "" "A manner of interpreting text streams in which all of the following are " "recognized as ending a line: the Unix end-of-line convention ``'\\n'``, the " @@ -2668,22 +2814,22 @@ msgstr "" "``'\\r'``. Voir la :pep:`278` et la :pep:`3116`, ainsi que la fonction :func:" "`bytes.splitlines` pour d'autres usages." -#: glossary.rst:1140 +#: glossary.rst:1204 msgid "variable annotation" msgstr "annotation de variable" -#: glossary.rst:1142 +#: glossary.rst:1206 msgid "An :term:`annotation` of a variable or a class attribute." msgstr ":term:`annotation` d'une variable ou d'un attribut de classe." -#: glossary.rst:1144 +#: glossary.rst:1208 msgid "" "When annotating a variable or a class attribute, assignment is optional::" msgstr "" "Lorsque vous annotez une variable ou un attribut de classe, l'affectation " "est facultative ::" -#: glossary.rst:1149 +#: glossary.rst:1213 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" @@ -2692,25 +2838,27 @@ msgstr "" "`indications de types ` : par exemple, cette variable devrait " "prendre des valeurs de type :class:`int` ::" -#: glossary.rst:1155 +#: glossary.rst:1219 msgid "Variable annotation syntax is explained in section :ref:`annassign`." msgstr "" "La syntaxe d'annotation de la variable est expliquée dans la section :ref:" "`annassign`." -#: glossary.rst:1157 +#: glossary.rst:1221 msgid "" "See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " -"this functionality." +"this functionality. Also see :ref:`annotations-howto` for best practices on " +"working with annotations." msgstr "" -"Reportez-vous à :term:`function annotation`, à la :pep:`484` et à la :pep:" -"`526` qui décrivent cette fonctionnalité." +"Reportez-vous à :term:`annotation de fonction`, à la :" +"pep:`484` et à la :pep:`526` qui décrivent cette fonctionnalité. Voir aussi :" +"ref:`annotations-howto` sur les bonnes pratiques concernant les annotations." -#: glossary.rst:1159 +#: glossary.rst:1225 msgid "virtual environment" msgstr "environnement virtuel" -#: glossary.rst:1161 +#: glossary.rst:1227 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " @@ -2722,15 +2870,15 @@ msgstr "" "des paquets sans interférer avec d'autres applications Python fonctionnant " "sur le même système." -#: glossary.rst:1166 +#: glossary.rst:1232 msgid "See also :mod:`venv`." msgstr "Voir aussi :mod:`venv`." -#: glossary.rst:1167 +#: glossary.rst:1233 msgid "virtual machine" msgstr "machine virtuelle" -#: glossary.rst:1169 +#: glossary.rst:1235 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." @@ -2739,11 +2887,11 @@ msgstr "" "(*virtual machine*) de Python exécute le :term:`bytecode` produit par le " "compilateur de *bytecode*." -#: glossary.rst:1171 +#: glossary.rst:1237 msgid "Zen of Python" msgstr "Le zen de Python" -#: glossary.rst:1173 +#: glossary.rst:1239 msgid "" "Listing of Python design principles and philosophies that are helpful in " "understanding and using the language. The listing can be found by typing " @@ -2752,3 +2900,65 @@ msgstr "" "Liste de principes et de préceptes utiles pour comprendre et utiliser le " "langage. Cette liste peut être obtenue en tapant \"``import this``\" dans " "une invite Python interactive." + +#~ msgid "" +#~ "Python uses the :term:`filesystem encoding and error handler` to convert " +#~ "between Unicode filenames and bytes filenames." +#~ msgstr "" +#~ "Python utilise l':term:`encodage du système de fichier et gestionnaire " +#~ "d'erreur` pour les conversions de " +#~ "noms de fichier entre Unicode et octets." + +#~ msgid "A codec which encodes Unicode strings to bytes." +#~ msgstr "" +#~ "Codec (codeur-décodeur) qui convertit des chaînes de caractères Unicode " +#~ "en octets (classe *bytes*)." + +#~ msgid "coercion" +#~ msgstr "coercition" + +#~ msgid "" +#~ "The implicit conversion of an instance of one type to another during an " +#~ "operation which involves two arguments of the same type. For example, " +#~ "``int(3.15)`` converts the floating point number to the integer ``3``, " +#~ "but in ``3+4.5``, each argument is of a different type (one int, one " +#~ "float), and both must be converted to the same type before they can be " +#~ "added or it will raise a :exc:`TypeError`. Without coercion, all " +#~ "arguments of even compatible types would have to be normalized to the " +#~ "same value by the programmer, e.g., ``float(3)+4.5`` rather than just " +#~ "``3+4.5``." +#~ msgstr "" +#~ "Conversion implicite d'une instance d'un type vers un autre lors d'une " +#~ "opération dont les deux opérandes doivent être de même type. Par exemple " +#~ "``int(3.15)`` convertit explicitement le nombre à virgule flottante en " +#~ "nombre entier ``3``. Mais dans l'opération ``3 + 4.5``, les deux " +#~ "opérandes sont d'un type différent (un entier et un nombre à virgule " +#~ "flottante), alors qu'ils doivent avoir le même type pour être additionnés " +#~ "(sinon une exception :exc:`TypeError` serait levée). Sans coercition, " +#~ "tous les opérandes, même de types compatibles, devraient être convertis " +#~ "(on parle aussi de *cast*) explicitement par le développeur, par " +#~ "exemple : ``float(3) + 4.5`` au lieu du simple ``3 + 4.5``." + +#~ msgid "" +#~ "See :pep:`483` for more details, and :mod:`typing` or :ref:`generic alias " +#~ "type ` for its uses." +#~ msgstr "" +#~ "Voir la :pep:`483` pour plus de détails, et :mod:`typing` ou :ref:`alias " +#~ "générique de type ` pour ses utilisations." + +#~ msgid "" +#~ "A pseudo-module which programmers can use to enable new language features " +#~ "which are not compatible with the current interpreter." +#~ msgstr "" +#~ "Pseudo-module que les développeurs peuvent utiliser pour activer de " +#~ "nouvelles fonctionnalités du langage qui ne sont pas compatibles avec " +#~ "l'interpréteur utilisé." + +#~ msgid "" +#~ "By importing the :mod:`__future__` module and evaluating its variables, " +#~ "you can see when a new feature was first added to the language and when " +#~ "it becomes the default::" +#~ msgstr "" +#~ "En important le module :mod:`__future__` et en affichant ses variables, " +#~ "vous pouvez voir à quel moment une nouvelle fonctionnalité a été rajoutée " +#~ "dans le langage et quand elle devient le comportement par défaut ::" diff --git a/howto/annotations.po b/howto/annotations.po new file mode 100644 index 0000000000..4d92273c40 --- /dev/null +++ b/howto/annotations.po @@ -0,0 +1,457 @@ +# Copyright (C) 2001-2018, Python 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-12-31 11:33+0100\n" +"PO-Revision-Date: 2022-05-12 09:43+0200\n" +"Last-Translator: ZepmanBC \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0.1\n" + +#: howto/annotations.rst:5 +msgid "Annotations Best Practices" +msgstr "Bonnes pratiques concernant les annotations" + +#: howto/annotations.rst:0 +msgid "author" +msgstr "auteur" + +#: howto/annotations.rst:7 +msgid "Larry Hastings" +msgstr "Larry Hastings" + +#: howto/annotations.rst:None +msgid "Abstract" +msgstr "Résumé" + +#: howto/annotations.rst:11 +msgid "" +"This document is designed to encapsulate the best practices for working with " +"annotations dicts. If you write Python code that examines " +"``__annotations__`` on Python objects, we encourage you to follow the " +"guidelines described below." +msgstr "" +"Ce document a pour but de regrouper les bonnes pratiques de travail avec le " +"dictionnaire d'annotations. Si vous écrivez du code Python qui examine les " +"``__annotations__`` des objets, nous vous encourageons à suivre les " +"recommandations décrites dans la suite." + +#: howto/annotations.rst:16 +msgid "" +"The document is organized into four sections: best practices for accessing " +"the annotations of an object in Python versions 3.10 and newer, best " +"practices for accessing the annotations of an object in Python versions 3.9 " +"and older, other best practices for ``__annotations__`` that apply to any " +"Python version, and quirks of ``__annotations__``." +msgstr "" +"Ce document est organisé en quatre sections : bonnes pratiques pour accéder " +"aux annotations d'un objet en Python 3.10 et plus récent, bonnes pratiques " +"pour accéder aux annotations d'un objet en Python 3.9 et antérieur, autres " +"bonnes pratiques pour ``__annotations__`` à appliquer quelle que soit la " +"version de Python, et enfin les curiosités concernant ``__annotations__``." + +#: howto/annotations.rst:26 +msgid "" +"Note that this document is specifically about working with " +"``__annotations__``, not uses *for* annotations. If you're looking for " +"information on how to use \"type hints\" in your code, please see the :mod:" +"`typing` module." +msgstr "" +"Notez que ce document traite spécifiquement du traitement des " +"``__annotations__``, et non de l'*utilisation* des annotations. Si vous " +"cherchez des informations sur la façon d'utiliser les « indications de " +"type » dans votre code, veuillez consulter le module :mod:`typing`." + +#: howto/annotations.rst:33 +msgid "Accessing The Annotations Dict Of An Object In Python 3.10 And Newer" +msgstr "" +"Accès au dictionnaire des annotations d'un objet dans Python 3.10 et plus " +"récent" + +#: howto/annotations.rst:35 +msgid "" +"Python 3.10 adds a new function to the standard library: :func:`inspect." +"get_annotations`. In Python versions 3.10 and newer, calling this function " +"is the best practice for accessing the annotations dict of any object that " +"supports annotations. This function can also \"un-stringize\" stringized " +"annotations for you." +msgstr "" +"Python 3.10 ajoute une nouvelle fonction à la bibliothèque standard : :func:" +"`inspect.get_annotations`. Dans les versions Python 3.10 et plus récentes, " +"l'appel à cette fonction est la meilleure pratique pour accéder au " +"dictionnaire d'annotations de tout objet qui prend en charge les " +"annotations. Cette fonction peut également convertir pour vous les " +"annotations contenues dans des chaînes de caractères en objets." + +#: howto/annotations.rst:42 +msgid "" +"If for some reason :func:`inspect.get_annotations` isn't viable for your use " +"case, you may access the ``__annotations__`` data member manually. Best " +"practice for this changed in Python 3.10 as well: as of Python 3.10, ``o." +"__annotations__`` is guaranteed to *always* work on Python functions, " +"classes, and modules. If you're certain the object you're examining is one " +"of these three *specific* objects, you may simply use ``o.__annotations__`` " +"to get at the object's annotations dict." +msgstr "" +"Si pour une raison quelconque, :func:`inspect.get_annotations` n'est pas " +"viable pour votre cas d'utilisation, vous pouvez accéder à l'attribut de " +"données ``__annotations__`` manuellement. La bonne pratique pour cela a " +"également changé en Python 3.10 : à partir de Python 3.10, le fonctionnement " +"de ``o.__annotations__`` est *toujours* garanti sur les fonctions, classes " +"et modules Python. Si vous êtes certain que l'objet que vous examinez est " +"l'un de ces trois objets *spécifiques*, vous pouvez simplement utiliser ``o." +"__annotations__`` pour accéder au dictionnaire d'annotations de l'objet." + +#: howto/annotations.rst:52 +msgid "" +"However, other types of callables--for example, callables created by :func:" +"`functools.partial`--may not have an ``__annotations__`` attribute defined. " +"When accessing the ``__annotations__`` of a possibly unknown object, best " +"practice in Python versions 3.10 and newer is to call :func:`getattr` with " +"three arguments, for example ``getattr(o, '__annotations__', None)``." +msgstr "" +"Cependant, d'autres types d'objets appelables – par exemple, les objets " +"appelables créés par :func:`functools.partial` – peuvent ne pas avoir " +"d'attribut ``__annotations__`` défini. Pour accéder à l'attribut " +"``__annotations__`` d'un objet éventuellement inconnu, la meilleure " +"pratique, à partir de la version 3.10 de Python, est d'appeler :func:" +"`getattr` avec trois arguments, par exemple ``getattr(o, '__annotations__', " +"None)``." + +#: howto/annotations.rst:62 +msgid "Accessing The Annotations Dict Of An Object In Python 3.9 And Older" +msgstr "" +"Accès au dictionnaire des annotations d'un objet en Python 3.9 et antérieur" + +#: howto/annotations.rst:64 +msgid "" +"In Python 3.9 and older, accessing the annotations dict of an object is much " +"more complicated than in newer versions. The problem is a design flaw in " +"these older versions of Python, specifically to do with class annotations." +msgstr "" +"En Python 3.9 et antérieur, l'accès au dictionnaire des annotations d'un " +"objet est beaucoup plus compliqué que dans les versions plus récentes. Le " +"problème est dû à un défaut de conception de ces anciennes versions de " +"Python, notamment en ce qui concerne les annotations de classe." + +#: howto/annotations.rst:69 +msgid "" +"Best practice for accessing the annotations dict of other objects--" +"functions, other callables, and modules--is the same as best practice for " +"3.10, assuming you aren't calling :func:`inspect.get_annotations`: you " +"should use three-argument :func:`getattr` to access the object's " +"``__annotations__`` attribute." +msgstr "" +"La bonne pratique pour accéder au dictionnaire d'annotations d'autres objets " +"– fonctions, autres objets appelables et modules – est la même que pour la " +"3.10, en supposant que vous n'appelez pas :func:`inspect.get_annotations` : " +"vous devez utiliser la forme à trois arguments de :func:`getattr` pour " +"accéder à l'attribut ``__annotations__`` de l'objet." + +#: howto/annotations.rst:76 +msgid "" +"Unfortunately, this isn't best practice for classes. The problem is that, " +"since ``__annotations__`` is optional on classes, and because classes can " +"inherit attributes from their base classes, accessing the " +"``__annotations__`` attribute of a class may inadvertently return the " +"annotations dict of a *base class.* As an example::" +msgstr "" +"Malheureusement, ce n'est pas la bonne pratique pour les classes. Le " +"problème est que, puisque ``__annotations__`` est optionnel sur les classes " +"et que les classes peuvent hériter des attributs de leurs classes de base, " +"accéder à l'attribut ``__annotations__`` d'une classe peut par inadvertance " +"renvoyer le dictionnaire d'annotations d'une *classe de base.* Par " +"exemple : ::" + +#: howto/annotations.rst:92 +msgid "This will print the annotations dict from ``Base``, not ``Derived``." +msgstr "" +"Ceci affiche le dictionnaire d'annotations de ``Base``, pas de ``Derived``." + +#: howto/annotations.rst:95 +msgid "" +"Your code will have to have a separate code path if the object you're " +"examining is a class (``isinstance(o, type)``). In that case, best practice " +"relies on an implementation detail of Python 3.9 and before: if a class has " +"annotations defined, they are stored in the class's ``__dict__`` " +"dictionary. Since the class may or may not have annotations defined, best " +"practice is to call the ``get`` method on the class dict." +msgstr "" +"Votre code doit gérer les différentes options si l'objet que vous examinez " +"est une classe (``isinstance(o, type)``). Dans ce cas, la bonne pratique " +"repose sur un détail d'implémentation de Python 3.9 et antérieur : si une " +"classe a des annotations définies, elles sont stockées dans le dictionnaire " +"``__dict__`` de la classe. Puisque la classe peut avoir ou non des " +"annotations définies, la bonne pratique est d'appeler la méthode ``get`` sur " +"le dictionnaire de la classe." + +#: howto/annotations.rst:103 +msgid "" +"To put it all together, here is some sample code that safely accesses the " +"``__annotations__`` attribute on an arbitrary object in Python 3.9 and " +"before::" +msgstr "" +"Pour résumer, voici un exemple de code qui accède en toute sécurité à " +"l'attribut ``__annotations__`` d'un objet quelconque en Python 3.9 et " +"antérieur : ::" + +#: howto/annotations.rst:112 +msgid "" +"After running this code, ``ann`` should be either a dictionary or ``None``. " +"You're encouraged to double-check the type of ``ann`` using :func:" +"`isinstance` before further examination." +msgstr "" +"Après avoir exécuté ce code, ``ann`` pourra être soit un dictionnaire, soit " +"``None``. Nous vous conseillons de vérifier le type de ``ann`` en " +"utilisant :func:`isinstance` avant de poursuivre l'analyse." + +#: howto/annotations.rst:117 +msgid "" +"Note that some exotic or malformed type objects may not have a ``__dict__`` " +"attribute, so for extra safety you may also wish to use :func:`getattr` to " +"access ``__dict__``." +msgstr "" +"Notez que certains objets de type exotique ou malformé peuvent ne pas avoir " +"d'attribut ``__dict__`` donc, pour plus de sécurité, vous pouvez également " +"utiliser :func:`getattr` pour accéder à ``__dict__``." + +#: howto/annotations.rst:123 +msgid "Manually Un-Stringizing Stringized Annotations" +msgstr "" +"Conversion manuelle des annotations contenues dans une chaîne de caractères" + +#: howto/annotations.rst:125 +msgid "" +"In situations where some annotations may be \"stringized\", and you wish to " +"evaluate those strings to produce the Python values they represent, it " +"really is best to call :func:`inspect.get_annotations` to do this work for " +"you." +msgstr "" +"Dans les situations où certaines annotations peuvent se présenter sous forme " +"de chaînes de caractères brutes, et que vous souhaitez évaluer ces chaînes " +"pour trouver les valeurs Python qu'elles représentent, il est vraiment " +"préférable d'appeler :func:`inspect.get_annotations` pour faire ce travail à " +"votre place." + +#: howto/annotations.rst:131 +msgid "" +"If you're using Python 3.9 or older, or if for some reason you can't use :" +"func:`inspect.get_annotations`, you'll need to duplicate its logic. You're " +"encouraged to examine the implementation of :func:`inspect.get_annotations` " +"in the current Python version and follow a similar approach." +msgstr "" +"Si vous utilisez Python 3.9 ou antérieur ou, si pour une raison quelconque, " +"vous ne pouvez pas utiliser :func:`inspect.get_annotations`, vous devrez " +"dupliquer son principe de fonctionnement. Nous vous encourageons à examiner " +"l'implémentation de :func:`inspect.get_annotations` dans la version actuelle " +"de Python et à suivre une approche similaire." + +#: howto/annotations.rst:137 +msgid "" +"In a nutshell, if you wish to evaluate a stringized annotation on an " +"arbitrary object ``o``:" +msgstr "" +"En bref, si vous souhaitez évaluer une annotation empaquetée en chaîne de " +"caractères sur un objet arbitraire ``o`` :" + +#: howto/annotations.rst:140 +msgid "" +"If ``o`` is a module, use ``o.__dict__`` as the ``globals`` when calling :" +"func:`eval`." +msgstr "" +"Si ``o`` est un module, utilisez ``o.__dict__`` pour accéder aux noms " +"``globals`` lors de l'appel à :func:`eval`." + +#: howto/annotations.rst:142 +msgid "" +"If ``o`` is a class, use ``sys.modules[o.__module__].__dict__`` as the " +"``globals``, and ``dict(vars(o))`` as the ``locals``, when calling :func:" +"`eval`." +msgstr "" +"Si ``o`` est une classe, utilisez ``sys.modules[o.__module__].__dict__`` " +"pour désigner les noms ``globals``, et ``dict(vars(o))`` pour désigner les " +"``locals``, lorsque vous appelez :func:`eval`." + +#: howto/annotations.rst:145 +msgid "" +"If ``o`` is a wrapped callable using :func:`functools.update_wrapper`, :func:" +"`functools.wraps`, or :func:`functools.partial`, iteratively unwrap it by " +"accessing either ``o.__wrapped__`` or ``o.func`` as appropriate, until you " +"have found the root unwrapped function." +msgstr "" +"Si ``o`` est un appelable encapsulé à l'aide de :func:`functools." +"update_wrapper`, :func:`functools.wraps`, ou :func:`functools.partial`, dés-" +"encapsulez-le itérativement en accédant à ``o.__wrapped__`` ou ``o.func`` " +"selon le cas, jusqu'à ce que vous ayez trouvé la fonction racine." + +#: howto/annotations.rst:149 +msgid "" +"If ``o`` is a callable (but not a class), use ``o.__globals__`` as the " +"globals when calling :func:`eval`." +msgstr "" +"Si ``o`` est un objet appelable (mais pas une classe), utilisez ``o." +"__globals__`` pour désigner les globales lors de l'appel de :func:`eval`." + +#: howto/annotations.rst:152 +msgid "" +"However, not all string values used as annotations can be successfully " +"turned into Python values by :func:`eval`. String values could theoretically " +"contain any valid string, and in practice there are valid use cases for type " +"hints that require annotating with string values that specifically *can't* " +"be evaluated. For example:" +msgstr "" +"Cependant, toutes les valeurs de chaîne utilisées comme annotations ne " +"peuvent pas être transformées avec succès en valeurs Python par :func:" +"`eval`. Les valeurs de chaîne peuvent théoriquement contenir des chaînes " +"valides et, en pratique, il existe des cas d'utilisation valables pour les " +"indications de type qui nécessitent d'annoter avec des valeurs de chaîne qui " +"*ne peuvent pas* être évaluées. Par exemple :" + +#: howto/annotations.rst:159 +msgid "" +":pep:`604` union types using ``|``, before support for this was added to " +"Python 3.10." +msgstr "" +"Les types d'union de style :pep:`604` avec ``|``, avant que cette prise en " +"charge ne soit ajoutée à Python 3.10." + +#: howto/annotations.rst:161 +msgid "" +"Definitions that aren't needed at runtime, only imported when :const:`typing." +"TYPE_CHECKING` is true." +msgstr "" +"Les définitions qui ne sont pas nécessaires à l'exécution, importées " +"uniquement lorsque :const:`typing.TYPE_CHECKING` est vrai." + +#: howto/annotations.rst:164 +msgid "" +"If :func:`eval` attempts to evaluate such values, it will fail and raise an " +"exception. So, when designing a library API that works with annotations, " +"it's recommended to only attempt to evaluate string values when explicitly " +"requested to by the caller." +msgstr "" +"Si :func:`eval` tente d'évaluer de telles valeurs, elle échoue et lève une " +"exception. Ainsi, lors de la conception d'une API de bibliothèque " +"fonctionnant avec des annotations, il est recommandé de ne tenter d'évaluer " +"des valeurs de type chaîne que si l'appelant le demande explicitement." + +#: howto/annotations.rst:172 +msgid "Best Practices For ``__annotations__`` In Any Python Version" +msgstr "" +"Bonnes pratiques pour ``__annotations__`` dans toutes les versions de Python" + +#: howto/annotations.rst:174 +msgid "" +"You should avoid assigning to the ``__annotations__`` member of objects " +"directly. Let Python manage setting ``__annotations__``." +msgstr "" +"Évitez d'assigner directement des objets à l'élément ``__annotations__``. " +"Laissez Python gérer le paramétrage de ``__annotations__``." + +#: howto/annotations.rst:177 +msgid "" +"If you do assign directly to the ``__annotations__`` member of an object, " +"you should always set it to a ``dict`` object." +msgstr "" +"Si vous assignez directement à l'élément ``__annotations__`` d'un objet, " +"vous devez toujours le définir comme un ``dict``." + +#: howto/annotations.rst:180 +msgid "" +"If you directly access the ``__annotations__`` member of an object, you " +"should ensure that it's a dictionary before attempting to examine its " +"contents." +msgstr "" +"Si vous accédez directement à l'élément ``__annotations__`` d'un objet, vous " +"devez vous assurer qu'il s'agit d'un dictionnaire avant de tenter d'examiner " +"son contenu." + +#: howto/annotations.rst:184 +msgid "You should avoid modifying ``__annotations__`` dicts." +msgstr "Évitez de modifier les dictionnaires ``__annotations__``." + +#: howto/annotations.rst:186 +msgid "" +"You should avoid deleting the ``__annotations__`` attribute of an object." +msgstr "Évitez de supprimer l'attribut ``__annotations__`` d'un objet." + +#: howto/annotations.rst:191 +msgid "``__annotations__`` Quirks" +msgstr "Les curiosités concernant ``__annotations__``" + +#: howto/annotations.rst:193 +msgid "" +"In all versions of Python 3, function objects lazy-create an annotations " +"dict if no annotations are defined on that object. You can delete the " +"``__annotations__`` attribute using ``del fn.__annotations__``, but if you " +"then access ``fn.__annotations__`` the object will create a new empty dict " +"that it will store and return as its annotations. Deleting the annotations " +"on a function before it has lazily created its annotations dict will throw " +"an ``AttributeError``; using ``del fn.__annotations__`` twice in a row is " +"guaranteed to always throw an ``AttributeError``." +msgstr "" +"Dans toutes les versions de Python 3, les fonctions créent paresseusement un " +"dictionnaire d'annotations si aucune annotation n'est définie sur cet " +"objet. Vous pouvez supprimer l'attribut ``__annotations__`` en utilisant " +"``del fn.__annotations__``, mais si vous accédez ensuite à ``fn." +"__annotations__``, l'objet créera un nouveau dictionnaire vide qu'il " +"stockera et renverra quand on lui demande ses annotations. Si vous " +"supprimez les annotations d'une fonction avant qu'elle n'ait créé " +"paresseusement son dictionnaire d'annotations, vous obtiendrez une exception " +"``AttributeError`` ; si vous utilisez ``del fn.__annotations__`` deux fois " +"de suite, vous êtes sûr de toujours obtenir ``AttributeError``." + +#: howto/annotations.rst:203 +msgid "" +"Everything in the above paragraph also applies to class and module objects " +"in Python 3.10 and newer." +msgstr "" +"Tout ce qui est dit dans le paragraphe précédent s'applique également aux " +"objets de type classe et module en Python 3.10 et suivants." + +#: howto/annotations.rst:206 +msgid "" +"In all versions of Python 3, you can set ``__annotations__`` on a function " +"object to ``None``. However, subsequently accessing the annotations on that " +"object using ``fn.__annotations__`` will lazy-create an empty dictionary as " +"per the first paragraph of this section. This is *not* true of modules and " +"classes, in any Python version; those objects permit setting " +"``__annotations__`` to any Python value, and will retain whatever value is " +"set." +msgstr "" +"Dans toutes les versions de Python 3, vous pouvez définir à ``None`` " +"l'élément ``__annotations__`` sur un objet fonction. Cependant, si vous " +"accédez ensuite aux annotations de cet objet en utilisant ``fn." +"__annotations__``, un dictionnaire vide sera créé paresseusement, comme " +"indiqué dans le premier paragraphe de cette section. Ce *n'est pas* le cas " +"des modules et des classes, quelle que soit la version de Python ; ces " +"objets permettent de définir ``__annotations__`` à n'importe quelle valeur " +"Python, et conserveront la valeur définie." + +#: howto/annotations.rst:214 +msgid "" +"If Python stringizes your annotations for you (using ``from __future__ " +"import annotations``), and you specify a string as an annotation, the string " +"will itself be quoted. In effect the annotation is quoted *twice.* For " +"example::" +msgstr "" +"Si Python convertit vos annotations en chaînes de caractères (en utilisant " +"``from __future__ import annotations``), et que vous spécifiez une chaîne de " +"caractères comme annotation, la chaîne sera elle-même entre guillemets. En " +"fait, l'annotation est mise entre guillemets *deux fois*. Par exemple : ::" + +#: howto/annotations.rst:225 +msgid "" +"This prints ``{'a': \"'str'\"}``. This shouldn't really be considered a " +"\"quirk\"; it's mentioned here simply because it might be surprising." +msgstr "" +"Ceci renvoie : ``{'a': \"'str'\"}``. Cela ne devrait pas vraiment être " +"considéré comme une « bizarrerie » ; nous le mentionnons ici simplement " +"parce que cela peut être surprenant." diff --git a/howto/argparse.po b/howto/argparse.po index 07f93a5363..59e2857499 100644 --- a/howto/argparse.po +++ b/howto/argparse.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2019-07-25 16:44+0200\n" -"Last-Translator: Antonin Décimo \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2022-10-18 12:22+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.1\n" +"X-Generator: Poedit 3.0\n" #: howto/argparse.rst:3 msgid "Argparse Tutorial" @@ -419,25 +419,25 @@ msgstr "" #: howto/argparse.rst:470 msgid "" "We have introduced another action, \"count\", to count the number of " -"occurrences of a specific optional arguments:" +"occurrences of specific options." msgstr "" "Nous avons introduit une autre action, ``\"count\"``, pour compter le nombre " -"d’occurrences d'une argument optionnel en particulier :" +"d’occurrences d'une option en particulier :" -#: howto/argparse.rst:498 +#: howto/argparse.rst:499 msgid "" "Yes, it's now more of a flag (similar to ``action=\"store_true\"``) in the " "previous version of our script. That should explain the complaint." msgstr "" -"Oui, c'est maintenant d'avantage une option (similaire à ``action=" -"\"store_true\"``) de la version précédente de notre script. Cela devrait " -"expliquer le message d'erreur." +"Oui, c'est maintenant d'avantage une option (similaire à " +"``action=\"store_true\"``) de la version précédente de notre script. Cela " +"devrait expliquer le message d'erreur." -#: howto/argparse.rst:501 +#: howto/argparse.rst:502 msgid "It also behaves similar to \"store_true\" action." msgstr "Cela se comporte de la même manière que l'action ``\"store_true\"``." -#: howto/argparse.rst:503 +#: howto/argparse.rst:504 msgid "" "Now here's a demonstration of what the \"count\" action gives. You've " "probably seen this sort of usage before." @@ -445,7 +445,7 @@ msgstr "" "Maintenant voici une démonstration de ce que l'action ``\"count\"`` fait. " "Vous avez sûrement vu ce genre d'utilisation auparavant." -#: howto/argparse.rst:506 +#: howto/argparse.rst:507 msgid "" "And if you don't specify the ``-v`` flag, that flag is considered to have " "``None`` value." @@ -453,7 +453,7 @@ msgstr "" "Et si vous ne spécifiez pas l'option ``-v``, cette option prendra la valeur " "``None``." -#: howto/argparse.rst:509 +#: howto/argparse.rst:510 msgid "" "As should be expected, specifying the long form of the flag, we should get " "the same output." @@ -461,7 +461,7 @@ msgstr "" "Comme on s'y attend, en spécifiant l'option dans sa forme longue, on devrait " "obtenir la même sortie." -#: howto/argparse.rst:512 +#: howto/argparse.rst:513 msgid "" "Sadly, our help output isn't very informative on the new ability our script " "has acquired, but that can always be fixed by improving the documentation " @@ -471,19 +471,19 @@ msgstr "" "nouvelles possibilités de notre programme, mais cela peut toujours être " "corrigé en améliorant sa documentation (en utilisant l'argument ``help``)." -#: howto/argparse.rst:516 +#: howto/argparse.rst:517 msgid "That last output exposes a bug in our program." msgstr "La dernière sortie du programme montre que celui-ci contient un bogue." -#: howto/argparse.rst:519 +#: howto/argparse.rst:520 msgid "Let's fix::" msgstr "Corrigeons ::" -#: howto/argparse.rst:538 +#: howto/argparse.rst:539 msgid "And this is what it gives:" msgstr "Et c'est ce que ça donne :" -#: howto/argparse.rst:553 +#: howto/argparse.rst:554 msgid "" "First output went well, and fixes the bug we had before. That is, we want " "any value >= 2 to be as verbose as possible." @@ -492,15 +492,15 @@ msgstr "" "avons eu est corrigé. Cela dit, nous voulons que n'importe quelle valeur >= " "2 rende le programme aussi verbeux que possible." -#: howto/argparse.rst:556 +#: howto/argparse.rst:557 msgid "Third output not so good." msgstr "La troisième sortie de programme n'est pas si bien que ça." -#: howto/argparse.rst:558 +#: howto/argparse.rst:559 msgid "Let's fix that bug::" msgstr "Corrigeons ce bogue ::" -#: howto/argparse.rst:575 +#: howto/argparse.rst:576 msgid "" "We've just introduced yet another keyword, ``default``. We've set it to " "``0`` in order to make it comparable to the other int values. Remember that " @@ -514,11 +514,11 @@ msgstr "" "il sera définit à ``None``, et ne pourra pas être comparé à une valeur de " "type entier (une erreur :exc:`TypeError` serait alors levée)." -#: howto/argparse.rst:582 +#: howto/argparse.rst:583 msgid "And:" msgstr "Et :" -#: howto/argparse.rst:589 +#: howto/argparse.rst:590 msgid "" "You can go quite far just with what we've learned so far, and we have only " "scratched the surface. The :mod:`argparse` module is very powerful, and " @@ -529,11 +529,11 @@ msgstr "" "est très puissant, et nous allons l'explorer un peu plus avant la fin de ce " "tutoriel." -#: howto/argparse.rst:596 +#: howto/argparse.rst:597 msgid "Getting a little more advanced" msgstr "Aller un peu plus loin" -#: howto/argparse.rst:598 +#: howto/argparse.rst:599 msgid "" "What if we wanted to expand our tiny program to perform other powers, not " "just squares::" @@ -541,11 +541,11 @@ msgstr "" "Qu'en est-il si nous souhaitons étendre notre mini programme pour le rendre " "capable de calculer d'autres puissances, et pas seulement des carrés ::" -#: howto/argparse.rst:653 +#: howto/argparse.rst:654 msgid "Output:" msgstr "Sortie :" -#: howto/argparse.rst:636 +#: howto/argparse.rst:637 msgid "" "Notice that so far we've been using verbosity level to *change* the text " "that gets displayed. The following example instead uses verbosity level to " @@ -555,11 +555,11 @@ msgstr "" "pour *changer* le texte qui est affiché. L'exemple suivant au contraire " "utilise le niveau de verbosité pour afficher *plus* de texte à la place ::" -#: howto/argparse.rst:667 +#: howto/argparse.rst:668 msgid "Conflicting options" msgstr "Paramètres en conflit" -#: howto/argparse.rst:669 +#: howto/argparse.rst:670 msgid "" "So far, we have been working with two methods of an :class:`argparse." "ArgumentParser` instance. Let's introduce a third one, :meth:" @@ -576,7 +576,7 @@ msgstr "" "introduire l'option ``--quiet``, qui va avoir l'effet opposé de l'option ``--" "verbose`` ::" -#: howto/argparse.rst:695 +#: howto/argparse.rst:696 msgid "" "Our program is now simpler, and we've lost some functionality for the sake " "of demonstration. Anyways, here's the output:" @@ -585,7 +585,7 @@ msgstr "" "fonctionnalités pour faire cette démonstration. Peu importe, voici la sortie " "du programme :" -#: howto/argparse.rst:713 +#: howto/argparse.rst:714 msgid "" "That should be easy to follow. I've added that last output so you can see " "the sort of flexibility you get, i.e. mixing long form options with short " @@ -595,7 +595,7 @@ msgstr "" "que vous puissiez voir le genre de flexibilité que vous pouvez avoir, par " "exemple pour faire un mélange entre des paramètres courts et longs." -#: howto/argparse.rst:717 +#: howto/argparse.rst:718 msgid "" "Before we conclude, you probably want to tell your users the main purpose of " "your program, just in case they don't know::" @@ -604,21 +604,21 @@ msgstr "" "le but principal de votre programme, juste dans le cas ou ils ne le " "sauraient pas ::" -#: howto/argparse.rst:738 +#: howto/argparse.rst:739 msgid "" "Note that slight difference in the usage text. Note the ``[-v | -q]``, which " "tells us that we can either use ``-v`` or ``-q``, but not both at the same " "time:" msgstr "" -"Notez cette nuance dans le texte d'utilisation. Les options `[-v | -q]`` " +"Notez cette nuance dans le texte d'utilisation. Les options ``[-v | -q]`` " "nous disent que nous pouvons utiliser au choix ``-v`` ou ``-q``, mais pas " "les deux ensemble :" -#: howto/argparse.rst:760 +#: howto/argparse.rst:761 msgid "Conclusion" msgstr "Conclusion" -#: howto/argparse.rst:762 +#: howto/argparse.rst:763 msgid "" "The :mod:`argparse` module offers a lot more than shown here. Its docs are " "quite detailed and thorough, and full of examples. Having gone through this " diff --git a/howto/clinic.po b/howto/clinic.po index 663457c890..a911daa367 100644 --- a/howto/clinic.po +++ b/howto/clinic.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2021-06-04 15:16+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-10-18 12:29+0200\n" "Last-Translator: Mindiell \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -698,7 +698,7 @@ msgid "" "``;``, to provide usage help, this change is harmless—don't worry about it.)" msgstr "" "(Argument Clinic génère toujours ses chaînes de format avec ``:`` suivi du " -"nom de la fonction. Si la chaîne de format du code existant termine par `` ;" +"nom de la fonction. Si la chaîne de format du code existant termine par ``;" "``, pour fournir une aide sur l'utilisation, ce changement n'a aucun effet, " "ne vous en souciez pas.)" @@ -878,25 +878,17 @@ msgstr "" #: howto/clinic.rst:570 msgid "" -"In case you're curious, this is implemented in ``from_builtin()`` in ``Lib/" -"inspect.py``." -msgstr "" -"Si par curiosité vous voulez lire l'implémentation, c'est ``from_builtin()`` " -"dans ``Lib/inspect.py``." - -#: howto/clinic.rst:573 -msgid "" "(In the future, this may need to get even more elaborate, to allow full " "expressions like ``CONSTANT - 1``.)" msgstr "" "(Dans le futur, il est possible que l'on ait besoin de l'améliorer, pour " "autoriser les expressions complètes comme ``CONSTANT - 1``.)" -#: howto/clinic.rst:578 +#: howto/clinic.rst:575 msgid "Renaming the C functions and variables generated by Argument Clinic" msgstr "Renommer les fonctions et variables C générées par Argument Clinic" -#: howto/clinic.rst:580 +#: howto/clinic.rst:577 msgid "" "Argument Clinic automatically names the functions it generates for you. " "Occasionally this may cause a problem, if the generated name collides with " @@ -916,7 +908,7 @@ msgstr "" "fonction pour la fonction de base (celle générée), et ajoutera ``\"_impl\"`` " "à la fin et utilisera ce nom pour la fonction ``impl``." -#: howto/clinic.rst:588 +#: howto/clinic.rst:585 msgid "" "For example, if we wanted to rename the C function names generated for " "``pickle.Pickler.dump``, it'd look like this::" @@ -924,7 +916,7 @@ msgstr "" "Par exemple, si nous voulons renommer les noms de fonction C générés pour " "``pickle.Pickler.dump``, ça ressemblerait à ça ::" -#: howto/clinic.rst:596 +#: howto/clinic.rst:593 msgid "" "The base function would now be named ``pickler_dumper()``, and the impl " "function would now be named ``pickler_dumper_impl()``." @@ -932,7 +924,7 @@ msgstr "" "La fonction de base sera maintenant nommée ``pickler_dumper()``, et la " "fonction ``impl`` sera maintenant nommée ``pickler_dumper_impl()``." -#: howto/clinic.rst:600 +#: howto/clinic.rst:597 msgid "" "Similarly, you may have a problem where you want to give a parameter a " "specific Python name, but that name may be inconvenient in C. Argument " @@ -944,7 +936,7 @@ msgstr "" "Argument Clinic vous permet de donner à un paramètre des noms différents en " "Python et en C ::" -#: howto/clinic.rst:614 +#: howto/clinic.rst:611 msgid "" "Here, the name used in Python (in the signature and the ``keywords`` array) " "would be ``file``, but the C variable would be named ``file_obj``." @@ -952,15 +944,15 @@ msgstr "" "Ici, le nom utilisé en Python (dans la signature ainsi que le tableau des " "``keywords``) sera ``file``, et la variable C s'appellera ``file_obj``." -#: howto/clinic.rst:617 +#: howto/clinic.rst:614 msgid "You can use this to rename the ``self`` parameter too!" msgstr "Vous pouvez utiliser ceci pour renommer aussi le paramètre ``self``" -#: howto/clinic.rst:621 +#: howto/clinic.rst:618 msgid "Converting functions using PyArg_UnpackTuple" msgstr "Conversion des fonctions en utilisant *PyArg_UnpackTuple*" -#: howto/clinic.rst:623 +#: howto/clinic.rst:620 msgid "" "To convert a function parsing its arguments with :c:func:" "`PyArg_UnpackTuple`, simply write out all the arguments, specifying each as " @@ -975,7 +967,7 @@ msgstr "" "être marqués comme seulement positionnels (ajoutez un ``/`` seul sur la " "ligne après le dernier argument)." -#: howto/clinic.rst:629 +#: howto/clinic.rst:626 msgid "" "Currently the generated code will use :c:func:`PyArg_ParseTuple`, but this " "will change soon." @@ -983,11 +975,11 @@ msgstr "" "Actuellement, le code généré utilise :c:func:`PyArg_ParseTuple`, mais cela " "va bientôt changer." -#: howto/clinic.rst:633 +#: howto/clinic.rst:630 msgid "Optional Groups" msgstr "Groupes optionnels" -#: howto/clinic.rst:635 +#: howto/clinic.rst:632 msgid "" "Some legacy functions have a tricky approach to parsing their arguments: " "they count the number of positional arguments, then use a ``switch`` " @@ -1006,7 +998,7 @@ msgstr "" "arguments optionnels avant que :c:func:`PyArg_ParseTupleAndKeywords` ne soit " "créée." -#: howto/clinic.rst:642 +#: howto/clinic.rst:639 msgid "" "While functions using this approach can often be converted to use :c:func:" "`PyArg_ParseTupleAndKeywords`, optional arguments, and default values, it's " @@ -1031,7 +1023,7 @@ msgstr "" "appelez la fonction en passant ``x``, vous devez passer ``y`` et si vous ne " "passez pas ``x``, vous ne devez pas passer ``y`` non plus)." -#: howto/clinic.rst:654 +#: howto/clinic.rst:651 msgid "" "In any case, the goal of Argument Clinic is to support argument parsing for " "all existing CPython builtins without changing their semantics. Therefore " @@ -1049,7 +1041,7 @@ msgstr "" "des arguments requis. Ils ne peuvent être utilisés *seulement* qu'en tant " "que paramètres positionnels." -#: howto/clinic.rst:662 +#: howto/clinic.rst:659 msgid "" "Optional groups are *only* intended for use when converting functions that " "make multiple calls to :c:func:`PyArg_ParseTuple`! Functions that use *any* " @@ -1068,7 +1060,7 @@ msgstr "" "comprendre ce concept. Tâchez d'éviter au maximum d'utiliser ces groupes " "optionnels si possible." -#: howto/clinic.rst:671 +#: howto/clinic.rst:668 msgid "" "To specify an optional group, add a ``[`` on a line by itself before the " "parameters you wish to group together, and a ``]`` on a line by itself after " @@ -1082,11 +1074,11 @@ msgstr "" "``curses.window.addch`` utilise les groupes optionnels pour rendre optionnel " "les deux premiers paramètres ainsi que le dernier :" -#: howto/clinic.rst:700 +#: howto/clinic.rst:697 msgid "Notes:" msgstr "Notes :" -#: howto/clinic.rst:702 +#: howto/clinic.rst:699 msgid "" "For every optional group, one additional parameter will be passed into the " "impl function representing the group. The parameter will be an int named " @@ -1109,7 +1101,7 @@ msgstr "" "inutilisé, on entend que les paramètres n'ont pas reçu de valeur lors de cet " "appel)." -#: howto/clinic.rst:713 +#: howto/clinic.rst:710 msgid "" "If there are no required arguments, the optional groups will behave as if " "they're to the right of the required arguments." @@ -1117,7 +1109,7 @@ msgstr "" "S'il n'y a pas d'arguments requis, les groupes optionnels se comportent " "comme s'ils étaient à droite des arguments requis." -#: howto/clinic.rst:716 +#: howto/clinic.rst:713 msgid "" "In the case of ambiguity, the argument parsing code favors parameters on the " "left (before the required parameters)." @@ -1125,12 +1117,12 @@ msgstr "" "En cas d'ambiguïté, le code d'analyse des arguments favorise ceux situés à " "gauche (avant les paramètres obligatoires)." -#: howto/clinic.rst:719 +#: howto/clinic.rst:716 msgid "Optional groups can only contain positional-only parameters." msgstr "" "Les groupes optionnels ne peuvent contenir que des arguments positionnels." -#: howto/clinic.rst:721 +#: howto/clinic.rst:718 msgid "" "Optional groups are *only* intended for legacy code. Please do not use " "optional groups for new code." @@ -1138,13 +1130,13 @@ msgstr "" "Les groupes optionnels sont *seulement* destinés au code hérité. Ne les " "utilisez pas dans du nouveau code." -#: howto/clinic.rst:726 +#: howto/clinic.rst:723 msgid "Using real Argument Clinic converters, instead of \"legacy converters\"" msgstr "" "Utilisation des adaptateurs d'Argument Clinic, en lieu et place des " "« adaptateurs de base »" -#: howto/clinic.rst:728 +#: howto/clinic.rst:725 msgid "" "To save time, and to minimize how much you need to learn to achieve your " "first port to Argument Clinic, the walkthrough above tells you to use " @@ -1158,7 +1150,7 @@ msgstr "" "facilement du code existant sous Argument Clinic. Et pour être clair, leur " "utilisation est tout à fait acceptable pour porter du code Python 3.4." -#: howto/clinic.rst:735 +#: howto/clinic.rst:732 msgid "" "However, in the long term we probably want all our blocks to use Argument " "Clinic's real syntax for converters. Why? A couple reasons:" @@ -1167,12 +1159,12 @@ msgstr "" "blocs utilisent la syntaxe réelle des adaptateurs d'Argument Clinic. " "Pourquoi ? Voici quelques raisons :" -#: howto/clinic.rst:739 +#: howto/clinic.rst:736 msgid "" "The proper converters are far easier to read and clearer in their intent." msgstr "Les adaptateurs sont plus simples et plus clairs." -#: howto/clinic.rst:740 +#: howto/clinic.rst:737 msgid "" "There are some format units that are unsupported as \"legacy converters\", " "because they require arguments, and the legacy converter syntax doesn't " @@ -1182,7 +1174,7 @@ msgstr "" "parce qu'ils nécessitent des arguments, et la syntaxe de ces adaptateurs ne " "supporte pas cela." -#: howto/clinic.rst:743 +#: howto/clinic.rst:740 msgid "" "In the future we may have a new argument parsing library that isn't " "restricted to what :c:func:`PyArg_ParseTuple` supports; this flexibility " @@ -1193,7 +1185,7 @@ msgstr "" "accepte ; cette flexibilité ne serait pas accessible aux paramètres " "utilisant des adaptateurs de base." -#: howto/clinic.rst:747 +#: howto/clinic.rst:744 msgid "" "Therefore, if you don't mind a little extra effort, please use the normal " "converters instead of legacy converters." @@ -1201,7 +1193,7 @@ msgstr "" "Ainsi, si vous n'êtes pas contre un petit effort supplémentaire, vous " "devriez utiliser les adaptateurs normaux plutôt que ceux de base." -#: howto/clinic.rst:750 +#: howto/clinic.rst:747 msgid "" "In a nutshell, the syntax for Argument Clinic (non-legacy) converters looks " "like a Python function call. However, if there are no explicit arguments to " @@ -1213,7 +1205,7 @@ msgstr "" "(celle-ci utilisant ses valeurs par défaut), vous pouvez omettre les " "parenthèses. Ainsi ``bool`` et ``bool()`` représentent le même adaptateur." -#: howto/clinic.rst:756 +#: howto/clinic.rst:753 msgid "" "All arguments to Argument Clinic converters are keyword-only. All Argument " "Clinic converters accept the following arguments:" @@ -1221,16 +1213,16 @@ msgstr "" "Tous les arguments passés aux adaptateurs d'Argument Clinic sont nommés. " "Tous les adaptateurs d'Argument Clinic acceptent les arguments suivants :" -#: howto/clinic.rst:1252 +#: howto/clinic.rst:1311 msgid "``c_default``" msgstr "``c_default``" -#: howto/clinic.rst:760 +#: howto/clinic.rst:757 msgid "" "The default value for this parameter when defined in C. Specifically, this " -"will be the initializer for the variable declared in the \"parse function" -"\". See :ref:`the section on default values ` for how to " -"use this. Specified as a string." +"will be the initializer for the variable declared in the \"parse " +"function\". See :ref:`the section on default values ` for " +"how to use this. Specified as a string." msgstr "" "La valeur par défaut de cet argument lorsqu'il est défini en C. Typiquement, " "il servira à initialiser la variable déclarée dans la « fonction " @@ -1238,11 +1230,11 @@ msgstr "" "` pour apprendre à l'utiliser. Spécifié en tant que chaîne " "de caractères." -#: howto/clinic.rst:769 +#: howto/clinic.rst:766 msgid "``annotation``" msgstr "``annotation``" -#: howto/clinic.rst:767 +#: howto/clinic.rst:764 msgid "" "The annotation value for this parameter. Not currently supported, because :" "pep:`8` mandates that the Python library may not use annotations." @@ -1250,7 +1242,7 @@ msgstr "" "La valeur annotée pour ce paramètre. Actuellement non géré, car la :pep:`8` " "exige que les bibliothèques Python n'utilisent pas d'annotations." -#: howto/clinic.rst:771 +#: howto/clinic.rst:768 msgid "" "In addition, some converters accept additional arguments. Here is a list of " "these arguments, along with their meanings:" @@ -1258,11 +1250,11 @@ msgstr "" "De plus, certains adaptateurs acceptent des arguments additionnels. Voici la " "liste de ces arguments, avec leur explication :" -#: howto/clinic.rst:780 +#: howto/clinic.rst:777 msgid "``accept``" msgstr "``accept``" -#: howto/clinic.rst:775 +#: howto/clinic.rst:772 msgid "" "A set of Python types (and possibly pseudo-types); this restricts the " "allowable Python argument to values of these types. (This is not a general-" @@ -1274,15 +1266,15 @@ msgstr "" "destiné à une utilisation généralisée ; en fait, il gère seulement les types " "listés dans la table des adaptateurs de base)." -#: howto/clinic.rst:780 +#: howto/clinic.rst:777 msgid "To accept ``None``, add ``NoneType`` to this set." msgstr "Pour accepter ``None``, ajouter ``NoneType`` à cet ensemble." -#: howto/clinic.rst:785 +#: howto/clinic.rst:782 msgid "``bitwise``" msgstr "``bitwise``" -#: howto/clinic.rst:783 +#: howto/clinic.rst:780 msgid "" "Only supported for unsigned integers. The native integer value of this " "Python argument will be written to the parameter without any range checking, " @@ -1292,11 +1284,11 @@ msgstr "" "argument Python sera transcrite dans le paramètre sans aucune vérification " "de plage, même pour des valeurs négatives." -#: howto/clinic.rst:1266 +#: howto/clinic.rst:1325 msgid "``converter``" msgstr "``converter``" -#: howto/clinic.rst:788 +#: howto/clinic.rst:785 msgid "" "Only supported by the ``object`` converter. Specifies the name of a :ref:`C " "\"converter function\" ` to use to convert this object to a " @@ -1306,11 +1298,11 @@ msgstr "" "`« fonction de conversion » depuis C ` à utiliser pour " "convertir cet objet en type natif." -#: howto/clinic.rst:795 +#: howto/clinic.rst:792 msgid "``encoding``" msgstr "``encoding``" -#: howto/clinic.rst:793 +#: howto/clinic.rst:790 msgid "" "Only supported for strings. Specifies the encoding to use when converting " "this string from a Python str (Unicode) value into a C ``char *`` value." @@ -1319,11 +1311,11 @@ msgstr "" "utiliser lors de la conversion de cette chaîne depuis une valeur de type " "Python ``str`` (Unicode) en valeur C ``char *``." -#: howto/clinic.rst:799 +#: howto/clinic.rst:796 msgid "``subclass_of``" msgstr "``subclass_of``" -#: howto/clinic.rst:798 +#: howto/clinic.rst:795 msgid "" "Only supported for the ``object`` converter. Requires that the Python value " "be a subclass of a Python type, as expressed in C." @@ -1331,25 +1323,25 @@ msgstr "" "Autorisé seulement pour l'adaptateur ``object``. Nécessite que la valeur " "Python soit une sous-classe d'un type Python, telle qu'exprimée en C." -#: howto/clinic.rst:1238 +#: howto/clinic.rst:1297 msgid "``type``" msgstr "``type``" -#: howto/clinic.rst:802 +#: howto/clinic.rst:799 msgid "" "Only supported for the ``object`` and ``self`` converters. Specifies the C " -"type that will be used to declare the variable. Default value is ``" -"\"PyObject *\"``." +"type that will be used to declare the variable. Default value is " +"``\"PyObject *\"``." msgstr "" "Autorisé seulement pour les adaptateurs ``object`` et ``self``. Spécifie le " "type C qui sera utilisé pour déclarer la variable. La valeur par défaut est " "``\"PyObject *\"``." -#: howto/clinic.rst:810 +#: howto/clinic.rst:807 msgid "``zeroes``" msgstr "``zeroes``" -#: howto/clinic.rst:807 +#: howto/clinic.rst:804 msgid "" "Only supported for strings. If true, embedded NUL bytes (``'\\\\0'``) are " "permitted inside the value. The length of the string will be passed in to " @@ -1361,7 +1353,7 @@ msgstr "" "passée à la fonction ``impl``, juste après le paramètre chaîne, en tant que " "paramètre nommé ``_length``." -#: howto/clinic.rst:812 +#: howto/clinic.rst:809 msgid "" "Please note, not every possible combination of arguments will work. Usually " "these arguments are implemented by specific ``PyArg_ParseTuple`` *format " @@ -1380,7 +1372,7 @@ msgstr "" "correspond à aucun format. Donc Argument Clinic ne le gère pas (en tous cas, " "pas pour le moment)." -#: howto/clinic.rst:820 +#: howto/clinic.rst:817 msgid "" "Below is a table showing the mapping of legacy converters into real Argument " "Clinic converters. On the left is the legacy converter, on the right is the " @@ -1390,83 +1382,83 @@ msgstr "" "les adaptateurs de base et ceux d'Argument Clinic. À gauche, sont listés les " "adaptateurs de base et, à droite, le texte qui les remplace." -#: howto/clinic.rst:825 +#: howto/clinic.rst:822 msgid "``'B'``" msgstr "``'B'``" -#: howto/clinic.rst:825 +#: howto/clinic.rst:822 msgid "``unsigned_char(bitwise=True)``" msgstr "``unsigned_char(bitwise=True)``" -#: howto/clinic.rst:826 +#: howto/clinic.rst:823 msgid "``'b'``" msgstr "``'b'``" -#: howto/clinic.rst:826 +#: howto/clinic.rst:823 msgid "``unsigned_char``" msgstr "``unsigned_char``" -#: howto/clinic.rst:827 +#: howto/clinic.rst:824 msgid "``'c'``" msgstr "``'c'``" -#: howto/clinic.rst:827 +#: howto/clinic.rst:824 msgid "``char``" msgstr "``char``" -#: howto/clinic.rst:828 +#: howto/clinic.rst:825 msgid "``'C'``" msgstr "``'C'``" -#: howto/clinic.rst:828 +#: howto/clinic.rst:825 msgid "``int(accept={str})``" msgstr "``int(accept={str})``" -#: howto/clinic.rst:829 +#: howto/clinic.rst:826 msgid "``'d'``" msgstr "``'d'``" -#: howto/clinic.rst:829 +#: howto/clinic.rst:826 msgid "``double``" msgstr "``double``" -#: howto/clinic.rst:830 +#: howto/clinic.rst:827 msgid "``'D'``" msgstr "``'D'``" -#: howto/clinic.rst:830 +#: howto/clinic.rst:827 msgid "``Py_complex``" msgstr "``Py_complex``" -#: howto/clinic.rst:831 +#: howto/clinic.rst:828 msgid "``'es'``" msgstr "``'es'``" -#: howto/clinic.rst:831 +#: howto/clinic.rst:828 msgid "``str(encoding='name_of_encoding')``" msgstr "``str(encoding='name_of_encoding')``" -#: howto/clinic.rst:832 +#: howto/clinic.rst:829 msgid "``'es#'``" msgstr "``'es#'``" -#: howto/clinic.rst:832 +#: howto/clinic.rst:829 msgid "``str(encoding='name_of_encoding', zeroes=True)``" msgstr "``str(encoding='name_of_encoding', zeroes=True)``" -#: howto/clinic.rst:833 +#: howto/clinic.rst:830 msgid "``'et'``" msgstr "``'et'``" -#: howto/clinic.rst:833 +#: howto/clinic.rst:830 msgid "``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``" msgstr "``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``" -#: howto/clinic.rst:834 +#: howto/clinic.rst:831 msgid "``'et#'``" msgstr "``'et#'``" -#: howto/clinic.rst:834 +#: howto/clinic.rst:831 msgid "" "``str(encoding='name_of_encoding', accept={bytes, bytearray, str}, " "zeroes=True)``" @@ -1474,255 +1466,255 @@ msgstr "" "``str(encoding='name_of_encoding', accept={bytes, bytearray, str}, " "zeroes=True)``" -#: howto/clinic.rst:835 +#: howto/clinic.rst:832 msgid "``'f'``" msgstr "``'f'``" -#: howto/clinic.rst:835 +#: howto/clinic.rst:832 msgid "``float``" msgstr "``float``" -#: howto/clinic.rst:836 +#: howto/clinic.rst:833 msgid "``'h'``" msgstr "``'h'``" -#: howto/clinic.rst:836 +#: howto/clinic.rst:833 msgid "``short``" msgstr "``short``" -#: howto/clinic.rst:837 +#: howto/clinic.rst:834 msgid "``'H'``" msgstr "``'H'``" -#: howto/clinic.rst:837 +#: howto/clinic.rst:834 msgid "``unsigned_short(bitwise=True)``" msgstr "``unsigned_short(bitwise=True)``" -#: howto/clinic.rst:838 +#: howto/clinic.rst:835 msgid "``'i'``" msgstr "``'i'``" -#: howto/clinic.rst:838 +#: howto/clinic.rst:835 msgid "``int``" msgstr "``int``" -#: howto/clinic.rst:839 +#: howto/clinic.rst:836 msgid "``'I'``" msgstr "``'I'``" -#: howto/clinic.rst:839 +#: howto/clinic.rst:836 msgid "``unsigned_int(bitwise=True)``" msgstr "``unsigned_int(bitwise=True)``" -#: howto/clinic.rst:840 +#: howto/clinic.rst:837 msgid "``'k'``" msgstr "``'k'``" -#: howto/clinic.rst:840 +#: howto/clinic.rst:837 msgid "``unsigned_long(bitwise=True)``" msgstr "``unsigned_long(bitwise=True)``" -#: howto/clinic.rst:841 +#: howto/clinic.rst:838 msgid "``'K'``" msgstr "``'K'``" -#: howto/clinic.rst:841 +#: howto/clinic.rst:838 msgid "``unsigned_long_long(bitwise=True)``" msgstr "``unsigned_long_long(bitwise=True)``" -#: howto/clinic.rst:842 +#: howto/clinic.rst:839 msgid "``'l'``" msgstr "``'l'``" -#: howto/clinic.rst:842 +#: howto/clinic.rst:839 msgid "``long``" msgstr "``long``" -#: howto/clinic.rst:843 +#: howto/clinic.rst:840 msgid "``'L'``" msgstr "``'L'``" -#: howto/clinic.rst:843 +#: howto/clinic.rst:840 msgid "``long long``" msgstr "``long long``" -#: howto/clinic.rst:844 +#: howto/clinic.rst:841 msgid "``'n'``" msgstr "``'n'``" -#: howto/clinic.rst:844 +#: howto/clinic.rst:841 msgid "``Py_ssize_t``" msgstr "``Py_ssize_t``" -#: howto/clinic.rst:845 +#: howto/clinic.rst:842 msgid "``'O'``" msgstr "``'O'``" -#: howto/clinic.rst:845 +#: howto/clinic.rst:842 msgid "``object``" msgstr "``object``" -#: howto/clinic.rst:846 +#: howto/clinic.rst:843 msgid "``'O!'``" msgstr "``'O!'``" -#: howto/clinic.rst:846 +#: howto/clinic.rst:843 msgid "``object(subclass_of='&PySomething_Type')``" msgstr "``object(subclass_of='&PySomething_Type')``" -#: howto/clinic.rst:847 +#: howto/clinic.rst:844 msgid "``'O&'``" msgstr "``'O&'``" -#: howto/clinic.rst:847 +#: howto/clinic.rst:844 msgid "``object(converter='name_of_c_function')``" msgstr "``object(converter='name_of_c_function')``" -#: howto/clinic.rst:848 +#: howto/clinic.rst:845 msgid "``'p'``" msgstr "``'p'``" -#: howto/clinic.rst:848 +#: howto/clinic.rst:845 msgid "``bool``" msgstr "``bool``" -#: howto/clinic.rst:849 +#: howto/clinic.rst:846 msgid "``'S'``" msgstr "``'S'``" -#: howto/clinic.rst:849 +#: howto/clinic.rst:846 msgid "``PyBytesObject``" msgstr "``PyBytesObject``" -#: howto/clinic.rst:850 +#: howto/clinic.rst:847 msgid "``'s'``" msgstr "``'s'``" -#: howto/clinic.rst:850 +#: howto/clinic.rst:847 msgid "``str``" msgstr "``str``" -#: howto/clinic.rst:851 +#: howto/clinic.rst:848 msgid "``'s#'``" msgstr "``'s#'``" -#: howto/clinic.rst:851 +#: howto/clinic.rst:848 msgid "``str(zeroes=True)``" msgstr "``str(zeroes=True)``" -#: howto/clinic.rst:852 +#: howto/clinic.rst:849 msgid "``'s*'``" msgstr "``'s*'``" -#: howto/clinic.rst:852 +#: howto/clinic.rst:849 msgid "``Py_buffer(accept={buffer, str})``" msgstr "``Py_buffer(accept={buffer, str})``" -#: howto/clinic.rst:853 +#: howto/clinic.rst:850 msgid "``'U'``" msgstr "``'U'``" -#: howto/clinic.rst:853 +#: howto/clinic.rst:850 msgid "``unicode``" msgstr "``unicode``" -#: howto/clinic.rst:854 +#: howto/clinic.rst:851 msgid "``'u'``" msgstr "``'u'``" -#: howto/clinic.rst:854 +#: howto/clinic.rst:851 msgid "``Py_UNICODE``" msgstr "``Py_UNICODE``" -#: howto/clinic.rst:855 +#: howto/clinic.rst:852 msgid "``'u#'``" msgstr "``'u#'``" -#: howto/clinic.rst:855 +#: howto/clinic.rst:852 msgid "``Py_UNICODE(zeroes=True)``" msgstr "``Py_UNICODE(zeroes=True)``" -#: howto/clinic.rst:856 +#: howto/clinic.rst:853 msgid "``'w*'``" msgstr "``'w*'``" -#: howto/clinic.rst:856 +#: howto/clinic.rst:853 msgid "``Py_buffer(accept={rwbuffer})``" msgstr "``Py_buffer(accept={rwbuffer})``" -#: howto/clinic.rst:857 +#: howto/clinic.rst:854 msgid "``'Y'``" msgstr "``'Y'``" -#: howto/clinic.rst:857 +#: howto/clinic.rst:854 msgid "``PyByteArrayObject``" msgstr "``PyByteArrayObject``" -#: howto/clinic.rst:858 +#: howto/clinic.rst:855 msgid "``'y'``" msgstr "``'y'``" -#: howto/clinic.rst:858 +#: howto/clinic.rst:855 msgid "``str(accept={bytes})``" msgstr "``str(accept={bytes})``" -#: howto/clinic.rst:859 +#: howto/clinic.rst:856 msgid "``'y#'``" msgstr "``'y#'``" -#: howto/clinic.rst:859 +#: howto/clinic.rst:856 msgid "``str(accept={robuffer}, zeroes=True)``" msgstr "``str(accept={robuffer}, zeroes=True)``" -#: howto/clinic.rst:860 +#: howto/clinic.rst:857 msgid "``'y*'``" msgstr "``'y*'``" -#: howto/clinic.rst:860 +#: howto/clinic.rst:857 msgid "``Py_buffer``" msgstr "``Py_buffer``" -#: howto/clinic.rst:861 +#: howto/clinic.rst:858 msgid "``'Z'``" msgstr "``'Z'``" -#: howto/clinic.rst:861 +#: howto/clinic.rst:858 msgid "``Py_UNICODE(accept={str, NoneType})``" msgstr "``Py_UNICODE(accept={str, NoneType})``" -#: howto/clinic.rst:862 +#: howto/clinic.rst:859 msgid "``'Z#'``" msgstr "``'Z#'``" -#: howto/clinic.rst:862 +#: howto/clinic.rst:859 msgid "``Py_UNICODE(accept={str, NoneType}, zeroes=True)``" msgstr "``Py_UNICODE(accept={str, NoneType}, zeroes=True)``" -#: howto/clinic.rst:863 +#: howto/clinic.rst:860 msgid "``'z'``" msgstr "``'z'``" -#: howto/clinic.rst:863 +#: howto/clinic.rst:860 msgid "``str(accept={str, NoneType})``" msgstr "``str(accept={str, NoneType})``" -#: howto/clinic.rst:864 +#: howto/clinic.rst:861 msgid "``'z#'``" msgstr "``'z#'``" -#: howto/clinic.rst:864 +#: howto/clinic.rst:861 msgid "``str(accept={str, NoneType}, zeroes=True)``" msgstr "``str(accept={str, NoneType}, zeroes=True)``" -#: howto/clinic.rst:865 +#: howto/clinic.rst:862 msgid "``'z*'``" msgstr "``'z*'``" -#: howto/clinic.rst:865 +#: howto/clinic.rst:862 msgid "``Py_buffer(accept={buffer, str, NoneType})``" msgstr "``Py_buffer(accept={buffer, str, NoneType})``" -#: howto/clinic.rst:868 +#: howto/clinic.rst:865 msgid "" "As an example, here's our sample ``pickle.Pickler.dump`` using the proper " "converter::" @@ -1730,7 +1722,7 @@ msgstr "" "Par exemple, voici notre code ``pickle.Pickler.dump`` via l'adaptateur " "approprié ::" -#: howto/clinic.rst:881 +#: howto/clinic.rst:878 msgid "" "One advantage of real converters is that they're more flexible than legacy " "converters. For example, the ``unsigned_int`` converter (and all the " @@ -1744,7 +1736,7 @@ msgstr "" "Leur comportement par défaut contrôle la valeur, et n'acceptera pas de " "nombres négatifs. On ne peut pas faire ça avec les adaptateurs de base !" -#: howto/clinic.rst:887 +#: howto/clinic.rst:884 msgid "" "Argument Clinic will show you all the converters it has available. For each " "converter it'll show you all the parameters it accepts, along with the " @@ -1756,11 +1748,11 @@ msgstr "" "acceptent, ainsi que les valeurs par défaut de chacun. Utilisez simplement " "la commande ``Tools/clinic/clinic.py --converters`` pour afficher la liste." -#: howto/clinic.rst:893 +#: howto/clinic.rst:890 msgid "Py_buffer" msgstr "Py_buffer" -#: howto/clinic.rst:895 +#: howto/clinic.rst:892 msgid "" "When using the ``Py_buffer`` converter (or the ``'s*'``, ``'w*'``, ``'*y'``, " "or ``'z*'`` legacy converters), you *must* not call :c:func:" @@ -1772,11 +1764,11 @@ msgstr "" "appeler :c:func:`PyBuffer_Release` sur le tampon fourni. Argument Clinic " "génère du code qui le fait pour vous (dans la fonction d'analyse)." -#: howto/clinic.rst:903 +#: howto/clinic.rst:900 msgid "Advanced converters" msgstr "Adaptateurs avancés" -#: howto/clinic.rst:905 +#: howto/clinic.rst:902 msgid "" "Remember those format units you skipped for your first time because they " "were advanced? Here's how to handle those too." @@ -1785,7 +1777,7 @@ msgstr "" "côté la première fois parce qu'il s'agissait de notions avancées ? Voici " "comment les utiliser." -#: howto/clinic.rst:908 +#: howto/clinic.rst:905 msgid "" "The trick is, all those format units take arguments—either conversion " "functions, or types, or strings specifying an encoding. (But \"legacy " @@ -1804,7 +1796,7 @@ msgstr "" "``converter`` (pour ``O&``), ``subclass_of`` (pour ``O!``), ou ``encoding`` " "(pour toutes les spécifications de format qui commencent par ``e``)." -#: howto/clinic.rst:916 +#: howto/clinic.rst:913 msgid "" "When using ``subclass_of``, you may also want to use the other custom " "argument for ``object()``: ``type``, which lets you set the type actually " @@ -1819,7 +1811,7 @@ msgstr "" "vous utiliserez probablement le convertisseur ``object(type='PyUnicodeObject " "*', subclass_of='&PyUnicode_Type')``." -#: howto/clinic.rst:922 +#: howto/clinic.rst:919 msgid "" "One possible problem with using Argument Clinic: it takes away some possible " "flexibility for the format units starting with ``e``. When writing a " @@ -1843,11 +1835,11 @@ msgstr "" "dur pour les paramètres dont les spécifications de format commencent par " "``e``." -#: howto/clinic.rst:935 +#: howto/clinic.rst:932 msgid "Parameter default values" msgstr "Valeurs par défaut des paramètres" -#: howto/clinic.rst:937 +#: howto/clinic.rst:934 msgid "" "Default values for parameters can be any of a number of values. At their " "simplest, they can be string, int, or float literals:" @@ -1855,12 +1847,12 @@ msgstr "" "Les valeurs par défaut des paramètres peuvent être n'importe quelle valeur. " "Au plus simple, ce sont des chaînes, des entiers ou des nombres flottants :" -#: howto/clinic.rst:946 +#: howto/clinic.rst:943 msgid "They can also use any of Python's built-in constants:" msgstr "" "Vous pouvez également utiliser n'importe quelle constante native de Python :" -#: howto/clinic.rst:954 +#: howto/clinic.rst:951 msgid "" "There's also special support for a default value of ``NULL``, and for simple " "expressions, documented in the following sections." @@ -1868,11 +1860,11 @@ msgstr "" "La valeur ``NULL`` est également acceptée, ainsi que des expressions " "simples, comme expliqué dans les sections suivantes." -#: howto/clinic.rst:959 +#: howto/clinic.rst:956 msgid "The ``NULL`` default value" msgstr "La valeur par défaut ``NULL``" -#: howto/clinic.rst:961 +#: howto/clinic.rst:958 msgid "" "For string and object parameters, you can set them to ``None`` to indicate " "that there's no default. However, that means the C variable will be " @@ -1888,11 +1880,11 @@ msgstr "" "raison : du point de vue de Python, cette valeur se comporte comme la valeur " "par défaut ``None``, mais la variable C est initialisée à ``NULL``." -#: howto/clinic.rst:969 +#: howto/clinic.rst:966 msgid "Expressions specified as default values" msgstr "Expressions spécifiées comme valeurs par défaut" -#: howto/clinic.rst:971 +#: howto/clinic.rst:968 msgid "" "The default value for a parameter can be more than just a literal value. It " "can be an entire expression, using math operators and looking up attributes " @@ -1904,11 +1896,11 @@ msgstr "" "mathématiques et des attributs d'objets. Cependant, cette possibilité n'est " "pas aussi simple, notamment à cause de sémantiques peu évidentes." -#: howto/clinic.rst:976 +#: howto/clinic.rst:973 msgid "Consider the following example:" msgstr "Examinons l'exemple suivant :" -#: howto/clinic.rst:982 +#: howto/clinic.rst:979 msgid "" "``sys.maxsize`` can have different values on different platforms. Therefore " "Argument Clinic can't simply evaluate that expression locally and hard-code " @@ -1916,14 +1908,14 @@ msgid "" "at runtime, when the user asks for the function's signature." msgstr "" -#: howto/clinic.rst:987 +#: howto/clinic.rst:984 msgid "" "What namespace is available when the expression is evaluated? It's " "evaluated in the context of the module the builtin came from. So, if your " "module has an attribute called \"``max_widgets``\", you may simply use it:" msgstr "" -#: howto/clinic.rst:995 +#: howto/clinic.rst:992 msgid "" "If the symbol isn't found in the current module, it fails over to looking in " "``sys.modules``. That's how it can find ``sys.maxsize`` for example. " @@ -1932,7 +1924,7 @@ msgid "" "Python itself.)" msgstr "" -#: howto/clinic.rst:1000 +#: howto/clinic.rst:997 msgid "" "Evaluating default values only at runtime means Argument Clinic can't " "compute the correct equivalent C default value. So you need to tell it " @@ -1940,7 +1932,7 @@ msgid "" "expression in C, using the ``c_default`` parameter to the converter:" msgstr "" -#: howto/clinic.rst:1009 +#: howto/clinic.rst:1006 msgid "" "Another complication: Argument Clinic can't know in advance whether or not " "the expression you supply is valid. It parses it to make sure it looks " @@ -1948,38 +1940,38 @@ msgid "" "expressions to specify values that are guaranteed to be valid at runtime!" msgstr "" -#: howto/clinic.rst:1014 +#: howto/clinic.rst:1011 msgid "" "Finally, because expressions must be representable as static C values, there " "are many restrictions on legal expressions. Here's a list of Python " "features you're not permitted to use:" msgstr "" -#: howto/clinic.rst:1018 +#: howto/clinic.rst:1015 msgid "Function calls." msgstr "des appels de fonction." -#: howto/clinic.rst:1019 +#: howto/clinic.rst:1016 msgid "Inline if statements (``3 if foo else 5``)." msgstr "des instructions *if* en ligne (``3 if foo else 5``) ;" -#: howto/clinic.rst:1020 +#: howto/clinic.rst:1017 msgid "Automatic sequence unpacking (``*[1, 2, 3]``)." msgstr "" -#: howto/clinic.rst:1021 +#: howto/clinic.rst:1018 msgid "List/set/dict comprehensions and generator expressions." msgstr "" -#: howto/clinic.rst:1022 +#: howto/clinic.rst:1019 msgid "Tuple/list/set/dict literals." msgstr "" -#: howto/clinic.rst:1027 +#: howto/clinic.rst:1024 msgid "Using a return converter" msgstr "" -#: howto/clinic.rst:1029 +#: howto/clinic.rst:1026 msgid "" "By default the impl function Argument Clinic generates for you returns " "``PyObject *``. But your C function often computes some C type, then " @@ -1989,14 +1981,14 @@ msgid "" "too?" msgstr "" -#: howto/clinic.rst:1035 +#: howto/clinic.rst:1032 msgid "" "That's what a \"return converter\" does. It changes your impl function to " "return some C type, then adds code to the generated (non-impl) function to " "handle converting that value into the appropriate ``PyObject *``." msgstr "" -#: howto/clinic.rst:1039 +#: howto/clinic.rst:1036 msgid "" "The syntax for return converters is similar to that of parameter converters. " "You specify the return converter like it was a return annotation on the " @@ -2006,13 +1998,13 @@ msgid "" "parentheses." msgstr "" -#: howto/clinic.rst:1045 +#: howto/clinic.rst:1042 msgid "" "(If you use both ``\"as\"`` *and* a return converter for your function, the " "``\"as\"`` should come before the return converter.)" msgstr "" -#: howto/clinic.rst:1048 +#: howto/clinic.rst:1045 msgid "" "There's one additional complication when using return converters: how do you " "indicate an error has occurred? Normally, a function returns a valid (non-" @@ -2025,18 +2017,18 @@ msgid "" "you return like normal." msgstr "" -#: howto/clinic.rst:1057 +#: howto/clinic.rst:1054 msgid "Currently Argument Clinic supports only a few return converters:" msgstr "" -#: howto/clinic.rst:1072 +#: howto/clinic.rst:1069 msgid "" "None of these take parameters. For the first three, return -1 to indicate " "error. For ``DecodeFSDefault``, the return type is ``const char *``; return " "a ``NULL`` pointer to indicate an error." msgstr "" -#: howto/clinic.rst:1076 +#: howto/clinic.rst:1073 msgid "" "(There's also an experimental ``NoneType`` converter, which lets you return " "``Py_None`` on success or ``NULL`` on failure, without having to increment " @@ -2044,117 +2036,117 @@ msgid "" "be worth using.)" msgstr "" -#: howto/clinic.rst:1081 +#: howto/clinic.rst:1078 msgid "" "To see all the return converters Argument Clinic supports, along with their " "parameters (if any), just run ``Tools/clinic/clinic.py --converters`` for " "the full list." msgstr "" -#: howto/clinic.rst:1087 +#: howto/clinic.rst:1084 msgid "Cloning existing functions" msgstr "" -#: howto/clinic.rst:1089 +#: howto/clinic.rst:1086 msgid "" "If you have a number of functions that look similar, you may be able to use " "Clinic's \"clone\" feature. When you clone an existing function, you reuse:" msgstr "" -#: howto/clinic.rst:1093 +#: howto/clinic.rst:1090 msgid "its parameters, including" msgstr "" -#: howto/clinic.rst:1095 +#: howto/clinic.rst:1092 msgid "their names," msgstr "" -#: howto/clinic.rst:1097 +#: howto/clinic.rst:1094 msgid "their converters, with all parameters," msgstr "" -#: howto/clinic.rst:1099 +#: howto/clinic.rst:1096 msgid "their default values," msgstr "" -#: howto/clinic.rst:1101 +#: howto/clinic.rst:1098 msgid "their per-parameter docstrings," msgstr "" -#: howto/clinic.rst:1103 +#: howto/clinic.rst:1100 msgid "" "their *kind* (whether they're positional only, positional or keyword, or " "keyword only), and" msgstr "" -#: howto/clinic.rst:1106 +#: howto/clinic.rst:1103 msgid "its return converter." msgstr "" -#: howto/clinic.rst:1108 +#: howto/clinic.rst:1105 msgid "" "The only thing not copied from the original function is its docstring; the " "syntax allows you to specify a new docstring." msgstr "" -#: howto/clinic.rst:1111 +#: howto/clinic.rst:1108 msgid "Here's the syntax for cloning a function::" msgstr "" -#: howto/clinic.rst:1119 +#: howto/clinic.rst:1116 msgid "" "(The functions can be in different modules or classes. I wrote ``module." "class`` in the sample just to illustrate that you must use the full path to " "*both* functions.)" msgstr "" -#: howto/clinic.rst:1123 +#: howto/clinic.rst:1120 msgid "" "Sorry, there's no syntax for partially-cloning a function, or cloning a " "function then modifying it. Cloning is an all-or nothing proposition." msgstr "" -#: howto/clinic.rst:1126 +#: howto/clinic.rst:1123 msgid "" "Also, the function you are cloning from must have been previously defined in " "the current file." msgstr "" -#: howto/clinic.rst:1130 +#: howto/clinic.rst:1127 msgid "Calling Python code" msgstr "" -#: howto/clinic.rst:1132 +#: howto/clinic.rst:1129 msgid "" "The rest of the advanced topics require you to write Python code which lives " "inside your C file and modifies Argument Clinic's runtime state. This is " "simple: you simply define a Python block." msgstr "" -#: howto/clinic.rst:1136 +#: howto/clinic.rst:1133 msgid "" "A Python block uses different delimiter lines than an Argument Clinic " "function block. It looks like this::" msgstr "" -#: howto/clinic.rst:1143 +#: howto/clinic.rst:1140 msgid "" "All the code inside the Python block is executed at the time it's parsed. " -"All text written to stdout inside the block is redirected into the \"output" -"\" after the block." +"All text written to stdout inside the block is redirected into the " +"\"output\" after the block." msgstr "" -#: howto/clinic.rst:1147 +#: howto/clinic.rst:1144 msgid "" "As an example, here's a Python block that adds a static integer variable to " "the C code::" msgstr "" -#: howto/clinic.rst:1158 +#: howto/clinic.rst:1155 msgid "Using a \"self converter\"" msgstr "" -#: howto/clinic.rst:1160 +#: howto/clinic.rst:1157 msgid "" "Argument Clinic automatically adds a \"self\" parameter for you using a " "default converter. It automatically sets the ``type`` of this parameter to " @@ -2165,13 +2157,13 @@ msgid "" "a subclass thereof." msgstr "" -#: howto/clinic.rst:1169 +#: howto/clinic.rst:1166 msgid "" "What's the point? This lets you override the type of ``self``, or give it a " "different default name." msgstr "" -#: howto/clinic.rst:1172 +#: howto/clinic.rst:1169 msgid "" "How do you specify the custom type you want to cast ``self`` to? If you only " "have one or two functions with the same type for ``self``, you can directly " @@ -2179,18 +2171,77 @@ msgid "" "want to use as the ``type`` parameter::" msgstr "" -#: howto/clinic.rst:1188 +#: howto/clinic.rst:1185 msgid "" "On the other hand, if you have a lot of functions that will use the same " "type for ``self``, it's best to create your own converter, subclassing " "``self_converter`` but overwriting the ``type`` member::" msgstr "" -#: howto/clinic.rst:1211 +#: howto/clinic.rst:1207 +msgid "Using a \"defining class\" converter" +msgstr "" + +#: howto/clinic.rst:1209 +msgid "" +"Argument Clinic facilitates gaining access to the defining class of a " +"method. This is useful for :ref:`heap type ` methods that need " +"to fetch module level state. Use :c:func:`PyType_FromModuleAndSpec` to " +"associate a new heap type with a module. You can now use :c:func:" +"`PyType_GetModuleState` on the defining class to fetch the module state, for " +"example from a module method." +msgstr "" + +#: howto/clinic.rst:1215 +msgid "" +"Example from ``Modules/zlibmodule.c``. First, ``defining_class`` is added " +"to the clinic input::" +msgstr "" + +#: howto/clinic.rst:1227 +msgid "" +"After running the Argument Clinic tool, the following function signature is " +"generated::" +msgstr "" + +#: howto/clinic.rst:1237 +msgid "" +"The following code can now use ``PyType_GetModuleState(cls)`` to fetch the " +"module state::" +msgstr "" + +#: howto/clinic.rst:1243 +msgid "" +"Each method may only have one argument using this converter, and it must " +"appear after ``self``, or, if ``self`` is not used, as the first argument. " +"The argument will be of type ``PyTypeObject *``. The argument will not " +"appear in the ``__text_signature__``." +msgstr "" + +#: howto/clinic.rst:1248 +msgid "" +"The ``defining_class`` converter is not compatible with ``__init__`` and " +"``__new__`` methods, which cannot use the ``METH_METHOD`` convention." +msgstr "" + +#: howto/clinic.rst:1251 +msgid "" +"It is not possible to use ``defining_class`` with slot methods. In order to " +"fetch the module state from such methods, use :c:func:" +"`PyType_GetModuleByDef` to look up the module and then :c:func:" +"`PyModule_GetState` to fetch the module state. Example from the " +"``setattro`` slot method in ``Modules/_threadmodule.c``::" +msgstr "" + +#: howto/clinic.rst:1266 +msgid "See also :pep:`573`." +msgstr "" + +#: howto/clinic.rst:1270 msgid "Writing a custom converter" msgstr "" -#: howto/clinic.rst:1213 +#: howto/clinic.rst:1272 msgid "" "As we hinted at in the previous section... you can write your own " "converters! A converter is simply a Python class that inherits from " @@ -2199,7 +2250,7 @@ msgid "" "a :c:func:`PyArg_ParseTuple` \"converter function\"." msgstr "" -#: howto/clinic.rst:1219 +#: howto/clinic.rst:1278 msgid "" "Your converter class should be named ``*something*_converter``. If the name " "follows this convention, then your converter class will be automatically " @@ -2208,7 +2259,7 @@ msgid "" "metaclass.)" msgstr "" -#: howto/clinic.rst:1225 +#: howto/clinic.rst:1284 msgid "" "You shouldn't subclass ``CConverter.__init__``. Instead, you should write a " "``converter_init()`` function. ``converter_init()`` always accepts a " @@ -2217,50 +2268,50 @@ msgid "" "passed along to your ``converter_init()``." msgstr "" -#: howto/clinic.rst:1232 +#: howto/clinic.rst:1291 msgid "" "There are some additional members of ``CConverter`` you may wish to specify " "in your subclass. Here's the current list:" msgstr "" -#: howto/clinic.rst:1236 +#: howto/clinic.rst:1295 msgid "" "The C type to use for this variable. ``type`` should be a Python string " "specifying the type, e.g. ``int``. If this is a pointer type, the type " "string should end with ``' *'``." msgstr "" -#: howto/clinic.rst:1242 +#: howto/clinic.rst:1301 msgid "``default``" msgstr "" -#: howto/clinic.rst:1241 +#: howto/clinic.rst:1300 msgid "" "The Python default value for this parameter, as a Python value. Or the magic " "value ``unspecified`` if there is no default." msgstr "" -#: howto/clinic.rst:1247 +#: howto/clinic.rst:1306 msgid "``py_default``" msgstr "" -#: howto/clinic.rst:1245 +#: howto/clinic.rst:1304 msgid "" "``default`` as it should appear in Python code, as a string. Or ``None`` if " "there is no default." msgstr "" -#: howto/clinic.rst:1250 +#: howto/clinic.rst:1309 msgid "" "``default`` as it should appear in C code, as a string. Or ``None`` if there " "is no default." msgstr "" -#: howto/clinic.rst:1263 +#: howto/clinic.rst:1322 msgid "``c_ignored_default``" msgstr "" -#: howto/clinic.rst:1255 +#: howto/clinic.rst:1314 msgid "" "The default value used to initialize the C variable when there is no " "default, but not specifying a default may result in an \"uninitialized " @@ -2271,64 +2322,64 @@ msgid "" "non-empty string." msgstr "" -#: howto/clinic.rst:1266 +#: howto/clinic.rst:1325 msgid "The name of the C converter function, as a string." msgstr "" -#: howto/clinic.rst:1271 +#: howto/clinic.rst:1330 msgid "``impl_by_reference``" msgstr "" -#: howto/clinic.rst:1269 +#: howto/clinic.rst:1328 msgid "" "A boolean value. If true, Argument Clinic will add a ``&`` in front of the " "name of the variable when passing it into the impl function." msgstr "" -#: howto/clinic.rst:1277 +#: howto/clinic.rst:1336 msgid "``parse_by_reference``" msgstr "" -#: howto/clinic.rst:1274 +#: howto/clinic.rst:1333 msgid "" "A boolean value. If true, Argument Clinic will add a ``&`` in front of the " "name of the variable when passing it into :c:func:`PyArg_ParseTuple`." msgstr "" -#: howto/clinic.rst:1279 +#: howto/clinic.rst:1338 msgid "" "Here's the simplest example of a custom converter, from ``Modules/zlibmodule." "c``::" msgstr "" -#: howto/clinic.rst:1290 +#: howto/clinic.rst:1349 msgid "" "This block adds a converter to Argument Clinic named ``ssize_t``. " -"Parameters declared as ``ssize_t`` will be declared as type ``Py_ssize_t``, " -"and will be parsed by the ``'O&'`` format unit, which will call the " -"``ssize_t_converter`` converter function. ``ssize_t`` variables " +"Parameters declared as ``ssize_t`` will be declared as type :c:type:" +"`Py_ssize_t`, and will be parsed by the ``'O&'`` format unit, which will " +"call the ``ssize_t_converter`` converter function. ``ssize_t`` variables " "automatically support default values." msgstr "" -#: howto/clinic.rst:1296 +#: howto/clinic.rst:1355 msgid "" "More sophisticated custom converters can insert custom C code to handle " "initialization and cleanup. You can see more examples of custom converters " "in the CPython source tree; grep the C files for the string ``CConverter``." msgstr "" -#: howto/clinic.rst:1302 +#: howto/clinic.rst:1361 msgid "Writing a custom return converter" msgstr "" -#: howto/clinic.rst:1304 +#: howto/clinic.rst:1363 msgid "" "Writing a custom return converter is much like writing a custom converter. " "Except it's somewhat simpler, because return converters are themselves much " "simpler." msgstr "" -#: howto/clinic.rst:1308 +#: howto/clinic.rst:1367 msgid "" "Return converters must subclass ``CReturnConverter``. There are no examples " "yet of custom return converters, because they are not widely used yet. If " @@ -2337,59 +2388,59 @@ msgid "" "its subclasses." msgstr "" -#: howto/clinic.rst:1316 +#: howto/clinic.rst:1375 msgid "METH_O and METH_NOARGS" msgstr "" -#: howto/clinic.rst:1318 +#: howto/clinic.rst:1377 msgid "" "To convert a function using ``METH_O``, make sure the function's single " "argument is using the ``object`` converter, and mark the arguments as " "positional-only::" msgstr "" -#: howto/clinic.rst:1330 +#: howto/clinic.rst:1389 msgid "" "To convert a function using ``METH_NOARGS``, just don't specify any " "arguments." msgstr "" -#: howto/clinic.rst:1333 +#: howto/clinic.rst:1392 msgid "" "You can still use a self converter, a return converter, and specify a " "``type`` argument to the object converter for ``METH_O``." msgstr "" -#: howto/clinic.rst:1337 +#: howto/clinic.rst:1396 msgid "tp_new and tp_init functions" msgstr "" -#: howto/clinic.rst:1339 +#: howto/clinic.rst:1398 msgid "" "You can convert ``tp_new`` and ``tp_init`` functions. Just name them " "``__new__`` or ``__init__`` as appropriate. Notes:" msgstr "" -#: howto/clinic.rst:1342 +#: howto/clinic.rst:1401 msgid "" "The function name generated for ``__new__`` doesn't end in ``__new__`` like " "it would by default. It's just the name of the class, converted into a " "valid C identifier." msgstr "" -#: howto/clinic.rst:1346 +#: howto/clinic.rst:1405 msgid "No ``PyMethodDef`` ``#define`` is generated for these functions." msgstr "" -#: howto/clinic.rst:1348 +#: howto/clinic.rst:1407 msgid "``__init__`` functions return ``int``, not ``PyObject *``." msgstr "" -#: howto/clinic.rst:1350 +#: howto/clinic.rst:1409 msgid "Use the docstring as the class docstring." msgstr "" -#: howto/clinic.rst:1352 +#: howto/clinic.rst:1411 msgid "" "Although ``__new__`` and ``__init__`` functions must always accept both the " "``args`` and ``kwargs`` objects, when converting you may specify any " @@ -2398,11 +2449,11 @@ msgid "" "it receives any.)" msgstr "" -#: howto/clinic.rst:1359 +#: howto/clinic.rst:1418 msgid "Changing and redirecting Clinic's output" msgstr "" -#: howto/clinic.rst:1361 +#: howto/clinic.rst:1420 msgid "" "It can be inconvenient to have Clinic's output interspersed with your " "conventional hand-edited C code. Luckily, Clinic is configurable: you can " @@ -2411,7 +2462,7 @@ msgid "" "Clinic's generated output." msgstr "" -#: howto/clinic.rst:1367 +#: howto/clinic.rst:1426 msgid "" "While changing Clinic's output in this manner can be a boon to readability, " "it may result in Clinic code using types before they are defined, or your " @@ -2423,15 +2474,15 @@ msgid "" "rearranging your code to fix definition-before-use problems.)" msgstr "" -#: howto/clinic.rst:1376 +#: howto/clinic.rst:1435 msgid "Let's start with defining some terminology:" msgstr "" -#: howto/clinic.rst:1403 +#: howto/clinic.rst:1462 msgid "*field*" msgstr "" -#: howto/clinic.rst:1379 +#: howto/clinic.rst:1438 msgid "" "A field, in this context, is a subsection of Clinic's output. For example, " "the ``#define`` for the ``PyMethodDef`` structure is a field, called " @@ -2439,7 +2490,7 @@ msgid "" "function definition:" msgstr "" -#: howto/clinic.rst:1394 +#: howto/clinic.rst:1453 msgid "" "All the names are of the form ``\"_\"``, where ``\"\"`` is the " "semantic object represented (the parsing function, the impl function, the " @@ -2447,47 +2498,47 @@ msgid "" "of statement the field is. Field names that end in ``\"_prototype\"`` " "represent forward declarations of that thing, without the actual body/data " "of the thing; field names that end in ``\"_definition\"`` represent the " -"actual definition of the thing, with the body/data of the thing. (``" -"\"methoddef\"`` is special, it's the only one that ends with ``\"_define" -"\"``, representing that it's a preprocessor #define.)" +"actual definition of the thing, with the body/data of the thing. " +"(``\"methoddef\"`` is special, it's the only one that ends with " +"``\"_define\"``, representing that it's a preprocessor #define.)" msgstr "" -#: howto/clinic.rst:1437 +#: howto/clinic.rst:1496 msgid "*destination*" msgstr "" -#: howto/clinic.rst:1406 +#: howto/clinic.rst:1465 msgid "" "A destination is a place Clinic can write output to. There are five built-" "in destinations:" msgstr "" -#: howto/clinic.rst:1486 howto/clinic.rst:1564 +#: howto/clinic.rst:1545 howto/clinic.rst:1623 msgid "``block``" msgstr "" -#: howto/clinic.rst:1410 +#: howto/clinic.rst:1469 msgid "" "The default destination: printed in the output section of the current Clinic " "block." msgstr "" -#: howto/clinic.rst:1513 howto/clinic.rst:1567 +#: howto/clinic.rst:1572 howto/clinic.rst:1626 msgid "``buffer``" msgstr "" -#: howto/clinic.rst:1414 +#: howto/clinic.rst:1473 msgid "" "A text buffer where you can save text for later. Text sent here is appended " "to the end of any existing text. It's an error to have any text left in the " "buffer when Clinic finishes processing a file." msgstr "" -#: howto/clinic.rst:1499 howto/clinic.rst:1593 +#: howto/clinic.rst:1558 howto/clinic.rst:1652 msgid "``file``" msgstr "" -#: howto/clinic.rst:1420 +#: howto/clinic.rst:1479 msgid "" "A separate \"clinic file\" that will be created automatically by Clinic. The " "filename chosen for the file is ``{basename}.clinic{extension}``, where " @@ -2496,64 +2547,64 @@ msgid "" "for ``_pickle.c`` would be written to ``_pickle.clinic.c``.)" msgstr "" -#: howto/clinic.rst:1427 +#: howto/clinic.rst:1486 msgid "" "**Important: When using a** ``file`` **destination, you** *must check in* " "**the generated file!**" msgstr "" -#: howto/clinic.rst:1526 howto/clinic.rst:1597 +#: howto/clinic.rst:1585 howto/clinic.rst:1656 msgid "``two-pass``" msgstr "" -#: howto/clinic.rst:1431 +#: howto/clinic.rst:1490 msgid "" "A buffer like ``buffer``. However, a two-pass buffer can only be dumped " "once, and it prints out all text sent to it during all processing, even from " "Clinic blocks *after* the dumping point." msgstr "" -#: howto/clinic.rst:1560 +#: howto/clinic.rst:1619 msgid "``suppress``" msgstr "" -#: howto/clinic.rst:1436 +#: howto/clinic.rst:1495 msgid "The text is suppressed—thrown away." msgstr "" -#: howto/clinic.rst:1439 +#: howto/clinic.rst:1498 msgid "Clinic defines five new directives that let you reconfigure its output." msgstr "" -#: howto/clinic.rst:1441 +#: howto/clinic.rst:1500 msgid "The first new directive is ``dump``:" msgstr "" -#: howto/clinic.rst:1447 +#: howto/clinic.rst:1506 msgid "" "This dumps the current contents of the named destination into the output of " "the current block, and empties it. This only works with ``buffer`` and " "``two-pass`` destinations." msgstr "" -#: howto/clinic.rst:1451 +#: howto/clinic.rst:1510 msgid "" "The second new directive is ``output``. The most basic form of ``output`` " "is like this:" msgstr "" -#: howto/clinic.rst:1458 +#: howto/clinic.rst:1517 msgid "" "This tells Clinic to output *field* to *destination*. ``output`` also " "supports a special meta-destination, called ``everything``, which tells " "Clinic to output *all* fields to that *destination*." msgstr "" -#: howto/clinic.rst:1462 +#: howto/clinic.rst:1521 msgid "``output`` has a number of other functions:" msgstr "" -#: howto/clinic.rst:1471 +#: howto/clinic.rst:1530 msgid "" "``output push`` and ``output pop`` allow you to push and pop configurations " "on an internal configuration stack, so that you can temporarily modify the " @@ -2562,25 +2613,25 @@ msgid "" "when you wish to restore the previous configuration." msgstr "" -#: howto/clinic.rst:1478 +#: howto/clinic.rst:1537 msgid "" "``output preset`` sets Clinic's output to one of several built-in preset " "configurations, as follows:" msgstr "" -#: howto/clinic.rst:1482 +#: howto/clinic.rst:1541 msgid "" "Clinic's original starting configuration. Writes everything immediately " "after the input block." msgstr "" -#: howto/clinic.rst:1485 +#: howto/clinic.rst:1544 msgid "" "Suppress the ``parser_prototype`` and ``docstring_prototype``, write " "everything else to ``block``." msgstr "" -#: howto/clinic.rst:1489 +#: howto/clinic.rst:1548 msgid "" "Designed to write everything to the \"clinic file\" that it can. You then " "``#include`` this file near the top of your file. You may need to rearrange " @@ -2588,17 +2639,17 @@ msgid "" "declarations for various ``typedef`` and ``PyTypeObject`` definitions." msgstr "" -#: howto/clinic.rst:1495 +#: howto/clinic.rst:1554 msgid "" "Suppress the ``parser_prototype`` and ``docstring_prototype``, write the " "``impl_definition`` to ``block``, and write everything else to ``file``." msgstr "" -#: howto/clinic.rst:1499 +#: howto/clinic.rst:1558 msgid "The default filename is ``\"{dirname}/clinic/{basename}.h\"``." msgstr "" -#: howto/clinic.rst:1502 +#: howto/clinic.rst:1561 msgid "" "Save up most of the output from Clinic, to be written into your file near " "the end. For Python files implementing modules or builtin types, it's " @@ -2608,14 +2659,14 @@ msgid "" "static ``PyMethodDef`` arrays defined in the middle of the file." msgstr "" -#: howto/clinic.rst:1511 +#: howto/clinic.rst:1570 msgid "" "Suppress the ``parser_prototype``, ``impl_prototype``, and " "``docstring_prototype``, write the ``impl_definition`` to ``block``, and " "write everything else to ``file``." msgstr "" -#: howto/clinic.rst:1516 +#: howto/clinic.rst:1575 msgid "" "Similar to the ``buffer`` preset, but writes forward declarations to the " "``two-pass`` buffer, and definitions to the ``buffer``. This is similar to " @@ -2624,18 +2675,18 @@ msgid "" "near the end just like you would when using the ``buffer`` preset." msgstr "" -#: howto/clinic.rst:1523 +#: howto/clinic.rst:1582 msgid "" "Suppresses the ``impl_prototype``, write the ``impl_definition`` to " "``block``, write ``docstring_prototype``, ``methoddef_define``, and " "``parser_prototype`` to ``two-pass``, write everything else to ``buffer``." msgstr "" -#: howto/clinic.rst:1537 +#: howto/clinic.rst:1596 msgid "``partial-buffer``" msgstr "" -#: howto/clinic.rst:1529 +#: howto/clinic.rst:1588 msgid "" "Similar to the ``buffer`` preset, but writes more things to ``block``, only " "writing the really big chunks of generated code to ``buffer``. This avoids " @@ -2645,137 +2696,137 @@ msgid "" "preset." msgstr "" -#: howto/clinic.rst:1536 +#: howto/clinic.rst:1595 msgid "" "Suppresses the ``impl_prototype``, write the ``docstring_definition`` and " "``parser_definition`` to ``buffer``, write everything else to ``block``." msgstr "" -#: howto/clinic.rst:1539 +#: howto/clinic.rst:1598 msgid "The third new directive is ``destination``:" msgstr "" -#: howto/clinic.rst:1545 +#: howto/clinic.rst:1604 msgid "This performs an operation on the destination named ``name``." msgstr "" -#: howto/clinic.rst:1547 +#: howto/clinic.rst:1606 msgid "There are two defined subcommands: ``new`` and ``clear``." msgstr "" -#: howto/clinic.rst:1549 +#: howto/clinic.rst:1608 msgid "The ``new`` subcommand works like this:" msgstr "" -#: howto/clinic.rst:1555 +#: howto/clinic.rst:1614 msgid "" "This creates a new destination with name ```` and type ````." msgstr "" -#: howto/clinic.rst:1557 +#: howto/clinic.rst:1616 msgid "There are five destination types:" msgstr "" -#: howto/clinic.rst:1560 +#: howto/clinic.rst:1619 msgid "Throws the text away." msgstr "" -#: howto/clinic.rst:1563 +#: howto/clinic.rst:1622 msgid "" "Writes the text to the current block. This is what Clinic originally did." msgstr "" -#: howto/clinic.rst:1567 +#: howto/clinic.rst:1626 msgid "A simple text buffer, like the \"buffer\" builtin destination above." msgstr "" -#: howto/clinic.rst:1570 +#: howto/clinic.rst:1629 msgid "" "A text file. The file destination takes an extra argument, a template to " "use for building the filename, like so:" msgstr "" -#: howto/clinic.rst:1573 +#: howto/clinic.rst:1632 msgid "destination new " msgstr "" -#: howto/clinic.rst:1575 +#: howto/clinic.rst:1634 msgid "" "The template can use three strings internally that will be replaced by bits " "of the filename:" msgstr "" -#: howto/clinic.rst:1578 +#: howto/clinic.rst:1637 msgid "{path}" msgstr "" -#: howto/clinic.rst:1579 +#: howto/clinic.rst:1638 msgid "The full path to the file, including directory and full filename." msgstr "" -#: howto/clinic.rst:1580 +#: howto/clinic.rst:1639 msgid "{dirname}" msgstr "" -#: howto/clinic.rst:1581 +#: howto/clinic.rst:1640 msgid "The name of the directory the file is in." msgstr "" -#: howto/clinic.rst:1582 +#: howto/clinic.rst:1641 msgid "{basename}" msgstr "" -#: howto/clinic.rst:1583 +#: howto/clinic.rst:1642 msgid "Just the name of the file, not including the directory." msgstr "" -#: howto/clinic.rst:1585 +#: howto/clinic.rst:1644 msgid "{basename_root}" msgstr "" -#: howto/clinic.rst:1585 +#: howto/clinic.rst:1644 msgid "" "Basename with the extension clipped off (everything up to but not including " "the last '.')." msgstr "" -#: howto/clinic.rst:1589 +#: howto/clinic.rst:1648 msgid "{basename_extension}" msgstr "" -#: howto/clinic.rst:1588 +#: howto/clinic.rst:1647 msgid "" "The last '.' and everything after it. If the basename does not contain a " "period, this will be the empty string." msgstr "" -#: howto/clinic.rst:1591 +#: howto/clinic.rst:1650 msgid "" "If there are no periods in the filename, {basename} and {filename} are the " "same, and {extension} is empty. \"{basename}{extension}\" is always exactly " "the same as \"{filename}\".\"" msgstr "" -#: howto/clinic.rst:1596 +#: howto/clinic.rst:1655 msgid "A two-pass buffer, like the \"two-pass\" builtin destination above." msgstr "" -#: howto/clinic.rst:1599 +#: howto/clinic.rst:1658 msgid "The ``clear`` subcommand works like this:" msgstr "" -#: howto/clinic.rst:1605 +#: howto/clinic.rst:1664 msgid "" "It removes all the accumulated text up to this point in the destination. (I " "don't know what you'd need this for, but I thought maybe it'd be useful " "while someone's experimenting.)" msgstr "" -#: howto/clinic.rst:1609 +#: howto/clinic.rst:1668 msgid "The fourth new directive is ``set``:" msgstr "" -#: howto/clinic.rst:1616 +#: howto/clinic.rst:1675 msgid "" "``set`` lets you set two internal variables in Clinic. ``line_prefix`` is a " "string that will be prepended to every line of Clinic's output; " @@ -2783,35 +2834,35 @@ msgid "" "output." msgstr "" -#: howto/clinic.rst:1620 +#: howto/clinic.rst:1679 msgid "Both of these support two format strings:" msgstr "" -#: howto/clinic.rst:1623 +#: howto/clinic.rst:1682 msgid "``{block comment start}``" msgstr "" -#: howto/clinic.rst:1623 +#: howto/clinic.rst:1682 msgid "" "Turns into the string ``/*``, the start-comment text sequence for C files." msgstr "" -#: howto/clinic.rst:1626 +#: howto/clinic.rst:1685 msgid "``{block comment end}``" msgstr "" -#: howto/clinic.rst:1626 +#: howto/clinic.rst:1685 msgid "" "Turns into the string ``*/``, the end-comment text sequence for C files." msgstr "" -#: howto/clinic.rst:1628 +#: howto/clinic.rst:1687 msgid "" "The final new directive is one you shouldn't need to use directly, called " "``preserve``:" msgstr "" -#: howto/clinic.rst:1635 +#: howto/clinic.rst:1694 msgid "" "This tells Clinic that the current contents of the output should be kept, " "unmodified. This is used internally by Clinic when dumping output into " @@ -2820,36 +2871,36 @@ msgid "" "gets overwritten." msgstr "" -#: howto/clinic.rst:1642 +#: howto/clinic.rst:1701 msgid "The #ifdef trick" msgstr "" -#: howto/clinic.rst:1644 +#: howto/clinic.rst:1703 msgid "" "If you're converting a function that isn't available on all platforms, " "there's a trick you can use to make life a little easier. The existing code " "probably looks like this::" msgstr "" -#: howto/clinic.rst:1655 +#: howto/clinic.rst:1714 msgid "" "And then in the ``PyMethodDef`` structure at the bottom the existing code " "will have:" msgstr "" -#: howto/clinic.rst:1664 +#: howto/clinic.rst:1723 msgid "" "In this scenario, you should enclose the body of your impl function inside " "the ``#ifdef``, like so::" msgstr "" -#: howto/clinic.rst:1678 +#: howto/clinic.rst:1737 msgid "" "Then, remove those three lines from the ``PyMethodDef`` structure, replacing " "them with the macro Argument Clinic generated:" msgstr "" -#: howto/clinic.rst:1685 +#: howto/clinic.rst:1744 msgid "" "(You can find the real name for this macro inside the generated code. Or you " "can calculate it yourself: it's the name of your function as defined on the " @@ -2857,27 +2908,27 @@ msgid "" "uppercased, and ``\"_METHODDEF\"`` added to the end.)" msgstr "" -#: howto/clinic.rst:1690 +#: howto/clinic.rst:1749 msgid "" "Perhaps you're wondering: what if ``HAVE_FUNCTIONNAME`` isn't defined? The " "``MODULE_FUNCTIONNAME_METHODDEF`` macro won't be defined either!" msgstr "" -#: howto/clinic.rst:1693 +#: howto/clinic.rst:1752 msgid "" "Here's where Argument Clinic gets very clever. It actually detects that the " "Argument Clinic block might be deactivated by the ``#ifdef``. When that " "happens, it generates a little extra code that looks like this::" msgstr "" -#: howto/clinic.rst:1701 +#: howto/clinic.rst:1760 msgid "" "That means the macro always works. If the function is defined, this turns " "into the correct structure, including the trailing comma. If the function " "is undefined, this turns into nothing." msgstr "" -#: howto/clinic.rst:1705 +#: howto/clinic.rst:1764 msgid "" "However, this causes one ticklish problem: where should Argument Clinic put " "this extra code when using the \"block\" output preset? It can't go in the " @@ -2885,24 +2936,24 @@ msgid "" "the whole point!)" msgstr "" -#: howto/clinic.rst:1709 +#: howto/clinic.rst:1768 msgid "" "In this situation, Argument Clinic writes the extra code to the \"buffer\" " "destination. This may mean that you get a complaint from Argument Clinic:" msgstr "" -#: howto/clinic.rst:1717 +#: howto/clinic.rst:1776 msgid "" "When this happens, just open your file, find the ``dump buffer`` block that " "Argument Clinic added to your file (it'll be at the very bottom), then move " "it above the ``PyMethodDef`` structure where that macro is used." msgstr "" -#: howto/clinic.rst:1724 +#: howto/clinic.rst:1783 msgid "Using Argument Clinic in Python files" msgstr "" -#: howto/clinic.rst:1726 +#: howto/clinic.rst:1785 msgid "" "It's actually possible to use Argument Clinic to preprocess Python files. " "There's no point to using Argument Clinic blocks, of course, as the output " @@ -2910,8 +2961,15 @@ msgid "" "Clinic to run Python blocks lets you use Python as a Python preprocessor!" msgstr "" -#: howto/clinic.rst:1731 +#: howto/clinic.rst:1790 msgid "" "Since Python comments are different from C comments, Argument Clinic blocks " "embedded in Python files look slightly different. They look like this:" msgstr "" + +#~ msgid "" +#~ "In case you're curious, this is implemented in ``from_builtin()`` in " +#~ "``Lib/inspect.py``." +#~ msgstr "" +#~ "Si par curiosité vous voulez lire l'implémentation, c'est " +#~ "``from_builtin()`` dans ``Lib/inspect.py``." diff --git a/howto/curses.po b/howto/curses.po index d52a828860..d90a8f8905 100644 --- a/howto/curses.po +++ b/howto/curses.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2020-09-04 23:34+0200\n" "Last-Translator: Khaïs COLIN \n" "Language-Team: FRENCH \n" @@ -139,23 +139,14 @@ msgstr "" msgid "" "The Windows version of Python doesn't include the :mod:`curses` module. A " "ported version called `UniCurses `_ is " -"available. You could also try `the Console module `_ written by Fredrik Lundh, which doesn't use the same " -"API as curses but provides cursor-addressable text output and full support " -"for mouse and keyboard input." -msgstr "" -"La version Windows de Python n'inclut pas le module :mod:`curses`. Une " -"version portée appelée `UniCurses `_ est " -"disponible. Vous pouvez également essayer le `Windows console driver `_ écrit par Fredrik Lundh, qui n'utilise " -"pas la même API que *curses*, mais fournit une sortie texte avec gestion du " -"curseur et une prise en charge complète de la souris et du clavier." - -#: howto/curses.rst:66 +"available." +msgstr "" + +#: howto/curses.rst:62 msgid "The Python curses module" msgstr "Le module *curses* de Python" -#: howto/curses.rst:68 +#: howto/curses.rst:64 msgid "" "The Python module is a fairly simple wrapper over the C functions provided " "by curses; if you're already familiar with curses programming in C, it's " @@ -173,7 +164,7 @@ msgstr "" "`mvaddstr` et :c:func:`mvwaddstr` en une seule méthode :meth:`~curses.window." "addstr`. Nous voyons cela plus en détail ci-après." -#: howto/curses.rst:76 +#: howto/curses.rst:72 msgid "" "This HOWTO is an introduction to writing text-mode programs with curses and " "Python. It doesn't attempt to be a complete guide to the curses API; for " @@ -186,11 +177,11 @@ msgstr "" "Python sur *ncurses* et les pages du manuel C pour *ncurses*. Il vous donne " "cependant les idées de base." -#: howto/curses.rst:83 +#: howto/curses.rst:79 msgid "Starting and ending a curses application" msgstr "Lancement et arrêt une application *curses*" -#: howto/curses.rst:85 +#: howto/curses.rst:81 msgid "" "Before doing anything, curses must be initialized. This is done by calling " "the :func:`~curses.initscr` function, which will determine the terminal " @@ -206,7 +197,7 @@ msgstr "" "renvoie un objet fenêtre représentant l'écran entier ; il est généralement " "appelé ``stdscr`` d'après le nom de la variable C correspondante. ::" -#: howto/curses.rst:96 +#: howto/curses.rst:92 msgid "" "Usually curses applications turn off automatic echoing of keys to the " "screen, in order to be able to read keys and only display them under certain " @@ -217,7 +208,7 @@ msgstr "" "dans certaines circonstances. Cela nécessite d'appeler la fonction :func:" "`~curses.noecho`. ::" -#: howto/curses.rst:103 +#: howto/curses.rst:99 msgid "" "Applications will also commonly need to react to keys instantly, without " "requiring the Enter key to be pressed; this is called cbreak mode, as " @@ -228,7 +219,7 @@ msgstr "" "qu'on appelle le mode *cbreak*, par opposition au mode d'entrée habituel " "avec un tampon. ::" -#: howto/curses.rst:109 +#: howto/curses.rst:105 msgid "" "Terminals usually return special keys, such as the cursor keys or navigation " "keys such as Page Up and Home, as a multibyte escape sequence. While you " @@ -245,7 +236,7 @@ msgstr "" "renvoyant une valeur spéciale telle que :const:`curses.KEY_LEFT`. Pour que " "*curses* fasse le travail, vous devez activer le mode *keypad*. ::" -#: howto/curses.rst:118 +#: howto/curses.rst:114 msgid "" "Terminating a curses application is much easier than starting one. You'll " "need to call::" @@ -253,7 +244,7 @@ msgstr "" "Arrêter une application *curses* est beaucoup plus facile que d'en démarrer " "une. Appelez ::" -#: howto/curses.rst:125 +#: howto/curses.rst:121 msgid "" "to reverse the curses-friendly terminal settings. Then call the :func:" "`~curses.endwin` function to restore the terminal to its original operating " @@ -263,7 +254,7 @@ msgstr "" "appelez la fonction :func:`~curses.enddwin` pour restaurer le terminal dans " "son mode de fonctionnement original. ::" -#: howto/curses.rst:131 +#: howto/curses.rst:127 msgid "" "A common problem when debugging a curses application is to get your terminal " "messed up when the application dies without restoring the terminal to its " @@ -279,7 +270,7 @@ msgstr "" "exemple, ce qui rend l'utilisation de l'interface de commande du *shell* " "difficile." -#: howto/curses.rst:137 +#: howto/curses.rst:133 msgid "" "In Python you can avoid these complications and make debugging much easier " "by importing the :func:`curses.wrapper` function and using it like this::" @@ -287,7 +278,7 @@ msgstr "" "En Python, vous pouvez éviter ces complications et faciliter le débogage en " "important la fonction :func:`curses.wrapper` et en l'utilisant comme suit ::" -#: howto/curses.rst:156 +#: howto/curses.rst:152 msgid "" "The :func:`~curses.wrapper` function takes a callable object and does the " "initializations described above, also initializing colors if color support " @@ -309,11 +300,11 @@ msgstr "" "pas dans un drôle d'état au moment de l'exception et vous pourrez lire le " "message de l'exception et la trace de la pile d'appels." -#: howto/curses.rst:168 +#: howto/curses.rst:164 msgid "Windows and Pads" msgstr "Fenêtres et tampons (*pads* en anglais)" -#: howto/curses.rst:170 +#: howto/curses.rst:166 msgid "" "Windows are the basic abstraction in curses. A window object represents a " "rectangular area of the screen, and supports methods to display text, erase " @@ -324,7 +315,7 @@ msgstr "" "afficher du texte, l'effacer, permettre à l'utilisateur de saisir des " "chaînes, etc." -#: howto/curses.rst:174 +#: howto/curses.rst:170 msgid "" "The ``stdscr`` object returned by the :func:`~curses.initscr` function is a " "window object that covers the entire screen. Many programs may need only " @@ -340,7 +331,7 @@ msgstr "" "séparément. La fonction :func:`~curses.newwin` crée une nouvelle fenêtre " "d'une taille donnée, renvoyant le nouvel objet fenêtre. ::" -#: howto/curses.rst:185 +#: howto/curses.rst:181 msgid "" "Note that the coordinate system used in curses is unusual. Coordinates are " "always passed in the order *y,x*, and the top-left corner of a window is " @@ -357,7 +348,7 @@ msgstr "" "applications informatiques, mais elle fait partie de *curses* depuis qu'il a " "été écrit et il est trop tard pour changer les choses maintenant." -#: howto/curses.rst:193 +#: howto/curses.rst:189 msgid "" "Your application can determine the size of the screen by using the :data:" "`curses.LINES` and :data:`curses.COLS` variables to obtain the *y* and *x* " @@ -369,7 +360,7 @@ msgstr "" "tailles *y* et *x*. Les coordonnées licites s'étendent alors de ``(0,0)`` à " "``(curses.LINES - 1, curses.COLS - 1)``." -#: howto/curses.rst:198 +#: howto/curses.rst:194 msgid "" "When you call a method to display or erase text, the effect doesn't " "immediately show up on the display. Instead you must call the :meth:" @@ -379,7 +370,7 @@ msgstr "" "l'affichage ne le reflète pas immédiatement. Vous devez appeler la méthode :" "meth:`~curses.window.refresh` des objets fenêtre pour mettre à jour l'écran." -#: howto/curses.rst:203 +#: howto/curses.rst:199 msgid "" "This is because curses was originally written with slow 300-baud terminal " "connections in mind; with these terminals, minimizing the time required to " @@ -398,7 +389,7 @@ msgstr "" "fenêtre, il n'est pas nécessaire de l'afficher puisqu'il ne sera jamais " "visible." -#: howto/curses.rst:212 +#: howto/curses.rst:208 msgid "" "In practice, explicitly telling curses to redraw a window doesn't really " "complicate programming with curses much. Most programs go into a flurry of " @@ -416,7 +407,7 @@ msgstr "" "appelant d'abord ``stdscr.refresh()`` ou la méthode :meth:`refresh` de la " "fenêtre adéquate." -#: howto/curses.rst:220 +#: howto/curses.rst:216 msgid "" "A pad is a special case of a window; it can be larger than the actual " "display screen, and only a portion of the pad displayed at a time. Creating " @@ -431,7 +422,7 @@ msgstr "" "devez fournir les coordonnées de la zone de l'écran où une partie du tampon " "sera affichée." -#: howto/curses.rst:241 +#: howto/curses.rst:237 msgid "" "The :meth:`refresh` call displays a section of the pad in the rectangle " "extending from coordinate (5,5) to coordinate (20,75) on the screen; the " @@ -445,7 +436,7 @@ msgstr "" "tampon. À part cette différence, les tampons sont exactement comme les " "fenêtres ordinaires et gèrent les mêmes méthodes." -#: howto/curses.rst:247 +#: howto/curses.rst:243 msgid "" "If you have multiple windows and pads on screen there is a more efficient " "way to update the screen and prevent annoying screen flicker as each part of " @@ -455,7 +446,7 @@ msgstr "" "plus efficace pour rafraîchir l'écran et éviter des scintillements agaçants " "à chaque mise à jour. :meth:`refresh` effectue en fait deux choses :" -#: howto/curses.rst:252 +#: howto/curses.rst:248 msgid "" "Calls the :meth:`~curses.window.noutrefresh` method of each window to update " "an underlying data structure representing the desired state of the screen." @@ -464,7 +455,7 @@ msgstr "" "pour mettre à jour les données sous-jacentes qui permettent d'obtenir " "l'affichage voulu ;" -#: howto/curses.rst:255 +#: howto/curses.rst:251 msgid "" "Calls the function :func:`~curses.doupdate` function to change the physical " "screen to match the desired state recorded in the data structure." @@ -472,7 +463,7 @@ msgstr "" "elle appelle la fonction :func:`~curses.doupdate` pour modifier l'écran " "physique afin de correspondre à l'état défini par les données sous-jacentes." -#: howto/curses.rst:258 +#: howto/curses.rst:254 msgid "" "Instead you can call :meth:`noutrefresh` on a number of windows to update " "the data structure, and then call :func:`doupdate` to update the screen." @@ -481,11 +472,11 @@ msgstr "" "voulez mettre à jour des données, puis :func:`doupdate` pour mettre à jour " "l'écran." -#: howto/curses.rst:264 +#: howto/curses.rst:260 msgid "Displaying Text" msgstr "Affichage de texte" -#: howto/curses.rst:266 +#: howto/curses.rst:262 msgid "" "From a C programmer's point of view, curses may sometimes look like a twisty " "maze of functions, all subtly different. For example, :c:func:`addstr` " @@ -504,7 +495,7 @@ msgstr "" "d'utiliser ``stdscr`` par défaut. :c:func:`mvwaddstr` permet de spécifier à " "la fois les coordonnées et la fenêtre." -#: howto/curses.rst:275 +#: howto/curses.rst:271 msgid "" "Fortunately the Python interface hides all these details. ``stdscr`` is a " "window object like any other, and methods such as :meth:`~curses.window." @@ -516,27 +507,27 @@ msgstr "" "window.addstr` acceptent leurs arguments sous de multiples formes, " "habituellement quatre." -#: howto/curses.rst:281 +#: howto/curses.rst:277 msgid "Form" msgstr "Forme" -#: howto/curses.rst:350 +#: howto/curses.rst:345 msgid "Description" msgstr "Description" -#: howto/curses.rst:283 +#: howto/curses.rst:279 msgid "*str* or *ch*" msgstr "*str* ou *ch*" -#: howto/curses.rst:283 +#: howto/curses.rst:279 msgid "Display the string *str* or character *ch* at the current position" msgstr "Affiche la chaîne *str* ou le caractère *ch* à la position actuelle" -#: howto/curses.rst:286 +#: howto/curses.rst:282 msgid "*str* or *ch*, *attr*" msgstr "*str* ou *ch*, *attr*" -#: howto/curses.rst:286 +#: howto/curses.rst:282 msgid "" "Display the string *str* or character *ch*, using attribute *attr* at the " "current position" @@ -544,21 +535,21 @@ msgstr "" "Affiche la chaîne *str* ou le caractère *ch*, en utilisant l'attribut *attr* " "à la position actuelle" -#: howto/curses.rst:290 +#: howto/curses.rst:286 msgid "*y*, *x*, *str* or *ch*" msgstr "*y*, *x*, *str* ou *ch*" -#: howto/curses.rst:290 +#: howto/curses.rst:286 msgid "Move to position *y,x* within the window, and display *str* or *ch*" msgstr "" "Se déplace à la position *y,x* dans la fenêtre et affiche la chaîne *str* ou " "le caractère *ch*" -#: howto/curses.rst:293 +#: howto/curses.rst:289 msgid "*y*, *x*, *str* or *ch*, *attr*" msgstr "*y*, *x*, *str* ou *ch*, *attr*" -#: howto/curses.rst:293 +#: howto/curses.rst:289 msgid "" "Move to position *y,x* within the window, and display *str* or *ch*, using " "attribute *attr*" @@ -566,7 +557,7 @@ msgstr "" "Se déplace à la position *y,x* dans la fenêtre et affiche la chaîne *str* ou " "le caractère *ch* en utilisant l'attribut *attr*" -#: howto/curses.rst:297 +#: howto/curses.rst:293 msgid "" "Attributes allow displaying text in highlighted forms such as boldface, " "underline, reverse code, or in color. They'll be explained in more detail " @@ -576,13 +567,14 @@ msgstr "" "vidéo inversé ou en couleur. Nous les voyons plus en détail dans la section " "suivante." -#: howto/curses.rst:302 +#: howto/curses.rst:298 +#, fuzzy msgid "" "The :meth:`~curses.window.addstr` method takes a Python string or bytestring " "as the value to be displayed. The contents of bytestrings are sent to the " "terminal as-is. Strings are encoded to bytes using the value of the " "window's :attr:`encoding` attribute; this defaults to the default system " -"encoding as returned by :func:`locale.getpreferredencoding`." +"encoding as returned by :func:`locale.getencoding`." msgstr "" "La méthode :meth:`~curses.window.addstr` prend en argument une chaîne ou une " "suite d'octets Python. Le contenu des chaînes d'octets est envoyé vers le " @@ -591,7 +583,7 @@ msgstr "" "l'encodage du système tel que renvoyé par :func:`locale." "getpreferredencoding`." -#: howto/curses.rst:309 +#: howto/curses.rst:304 msgid "" "The :meth:`~curses.window.addch` methods take a character, which can be " "either a string of length 1, a bytestring of length 1, or an integer." @@ -600,7 +592,7 @@ msgstr "" "la forme d'une chaîne de longueur 1, d'une chaîne d'octets de longueur 1 ou " "d'un entier." -#: howto/curses.rst:312 +#: howto/curses.rst:307 msgid "" "Constants are provided for extension characters; these constants are " "integers greater than 255. For example, :const:`ACS_PLMINUS` is a +/- " @@ -613,7 +605,7 @@ msgstr "" "haut et à gauche d'une boîte (utile pour dessiner des encadrements). Vous " "pouvez aussi utiliser les caractères Unicode adéquats." -#: howto/curses.rst:318 +#: howto/curses.rst:313 msgid "" "Windows remember where the cursor was left after the last operation, so if " "you leave out the *y,x* coordinates, the string or character will be " @@ -632,7 +624,7 @@ msgstr "" "l'utilisateur (il peut être déroutant d'avoir un curseur qui clignote à des " "endroits apparemment aléatoires)." -#: howto/curses.rst:326 +#: howto/curses.rst:321 msgid "" "If your application doesn't need a blinking cursor at all, you can call " "``curs_set(False)`` to make it invisible. For compatibility with older " @@ -649,11 +641,11 @@ msgstr "" "curseur clignotant et vous n'avez plus besoin de vous soucier de le laisser " "trainer à des endroits bizarres." -#: howto/curses.rst:335 +#: howto/curses.rst:330 msgid "Attributes and Color" msgstr "Attributs et couleurs" -#: howto/curses.rst:337 +#: howto/curses.rst:332 msgid "" "Characters can be displayed in different ways. Status lines in a text-based " "application are commonly shown in reverse video, or a text viewer may need " @@ -666,7 +658,7 @@ msgstr "" "À ces fins, *curses* vous permet de spécifier un attribut pour chaque " "caractère à l'écran." -#: howto/curses.rst:342 +#: howto/curses.rst:337 msgid "" "An attribute is an integer, each bit representing a different attribute. " "You can try to display text with multiple attribute bits set, but curses " @@ -683,59 +675,59 @@ msgstr "" "se cantonner aux attributs les plus communément utilisés, dont la liste est " "fournie ci-dessous." -#: howto/curses.rst:350 +#: howto/curses.rst:345 msgid "Attribute" msgstr "Attribut" -#: howto/curses.rst:352 +#: howto/curses.rst:347 msgid ":const:`A_BLINK`" msgstr ":const:`A_BLINK`" -#: howto/curses.rst:352 +#: howto/curses.rst:347 msgid "Blinking text" msgstr "Texte clignotant" -#: howto/curses.rst:354 +#: howto/curses.rst:349 msgid ":const:`A_BOLD`" msgstr ":const:`A_BOLD`" -#: howto/curses.rst:354 +#: howto/curses.rst:349 msgid "Extra bright or bold text" msgstr "Texte en surbrillance ou en gras" -#: howto/curses.rst:356 +#: howto/curses.rst:351 msgid ":const:`A_DIM`" msgstr ":const:`A_DIM`" -#: howto/curses.rst:356 +#: howto/curses.rst:351 msgid "Half bright text" msgstr "Texte en demi-ton" -#: howto/curses.rst:358 +#: howto/curses.rst:353 msgid ":const:`A_REVERSE`" msgstr ":const:`A_REVERSE`" -#: howto/curses.rst:358 +#: howto/curses.rst:353 msgid "Reverse-video text" msgstr "Texte en mode vidéo inversé" -#: howto/curses.rst:360 +#: howto/curses.rst:355 msgid ":const:`A_STANDOUT`" msgstr ":const:`A_STANDOUT`" -#: howto/curses.rst:360 +#: howto/curses.rst:355 msgid "The best highlighting mode available" msgstr "Le meilleur mode de mis en valeur pour le texte" -#: howto/curses.rst:362 +#: howto/curses.rst:357 msgid ":const:`A_UNDERLINE`" msgstr ":const:`A_UNDERLINE`" -#: howto/curses.rst:362 +#: howto/curses.rst:357 msgid "Underlined text" msgstr "Texte souligné" -#: howto/curses.rst:365 +#: howto/curses.rst:360 msgid "" "So, to display a reverse-video status line on the top line of the screen, " "you could code::" @@ -743,7 +735,7 @@ msgstr "" "Ainsi, pour mettre la ligne de statut située en haut de l'écran en mode " "vidéo inversé, vous pouvez coder ::" -#: howto/curses.rst:372 +#: howto/curses.rst:367 msgid "" "The curses library also supports color on those terminals that provide it. " "The most common such terminal is probably the Linux console, followed by " @@ -753,7 +745,7 @@ msgstr "" "compatibles. Le plus répandu de ces terminaux est sûrement la console Linux, " "suivie par *xterm* en couleurs." -#: howto/curses.rst:376 +#: howto/curses.rst:371 msgid "" "To use color, you must call the :func:`~curses.start_color` function soon " "after calling :func:`~curses.initscr`, to initialize the default color set " @@ -773,7 +765,7 @@ msgstr "" "*colour* ; si vous êtes habitué à l'orthographe britannique, vous devrez " "vous résigner à mal l'orthographier tant que vous utilisez *curses*)." -#: howto/curses.rst:386 +#: howto/curses.rst:381 msgid "" "The curses library maintains a finite number of color pairs, containing a " "foreground (or text) color and a background color. You can get the " @@ -790,13 +782,13 @@ msgstr "" "autres attributs tels que :const:`A_REVERSE`,mais là encore, de telles " "combinaisons risquent de ne pas fonctionner sur tous les terminaux." -#: howto/curses.rst:393 +#: howto/curses.rst:388 msgid "An example, which displays a line of text using color pair 1::" msgstr "" "Un exemple d'affichage d'une ligne de texte en utilisant la paire de couleur " "1 ::" -#: howto/curses.rst:398 +#: howto/curses.rst:393 msgid "" "As I said before, a color pair consists of a foreground and background " "color. The ``init_pair(n, f, b)`` function changes the definition of color " @@ -809,7 +801,7 @@ msgstr "" "texte à *f* et la couleur de fond à *b*. La paire de couleurs 0 est codée en " "dur à blanc sur noir et ne peut être modifiée." -#: howto/curses.rst:403 +#: howto/curses.rst:398 msgid "" "Colors are numbered, and :func:`start_color` initializes 8 basic colors when " "it activates color mode. They are: 0:black, 1:red, 2:green, 3:yellow, 4:" @@ -825,14 +817,14 @@ msgstr "" "chacune de ces couleurs : :const:`curses.COLOR_BLACK`, :const:`curses." "COLOR_RED` et ainsi de suite." -#: howto/curses.rst:409 +#: howto/curses.rst:404 msgid "" "Let's put all this together. To change color 1 to red text on a white " "background, you would call::" msgstr "" "Testons tout ça. Pour changer la couleur 1 à rouge sur fond blanc, appelez ::" -#: howto/curses.rst:414 +#: howto/curses.rst:409 msgid "" "When you change a color pair, any text already displayed using that color " "pair will change to the new colors. You can also display new text in this " @@ -842,7 +834,7 @@ msgstr "" "utilise cette paire de couleur voit les nouvelles couleurs s'appliquer à " "lui. Vous pouvez aussi afficher du nouveau texte dans cette couleur avec ::" -#: howto/curses.rst:420 +#: howto/curses.rst:415 msgid "" "Very fancy terminals can change the definitions of the actual colors to a " "given RGB value. This lets you change color 1, which is usually red, to " @@ -863,11 +855,11 @@ msgstr "" "chance d'avoir un terminal aussi perfectionné, consultez les pages du manuel " "de votre système pour obtenir plus d'informations." -#: howto/curses.rst:431 +#: howto/curses.rst:426 msgid "User Input" msgstr "Entrées de l'utilisateur" -#: howto/curses.rst:433 +#: howto/curses.rst:428 msgid "" "The C curses library offers only very simple input mechanisms. Python's :mod:" "`curses` module adds a basic text-input widget. (Other libraries such as " @@ -879,11 +871,11 @@ msgstr "" "d'entrée de texte (d'autres bibliothèques telles que `Urwid `_ ont un ensemble de *widgets* plus conséquent)." -#: howto/curses.rst:438 +#: howto/curses.rst:433 msgid "There are two methods for getting input from a window:" msgstr "Il y a deux méthodes pour obtenir des entrées dans une fenêtre :" -#: howto/curses.rst:440 +#: howto/curses.rst:435 msgid "" ":meth:`~curses.window.getch` refreshes the screen and then waits for the " "user to hit a key, displaying the key if :func:`~curses.echo` has been " @@ -895,7 +887,7 @@ msgstr "" "appelé auparavant. Vous pouvez en option spécifier des coordonnées où " "positionner le curseur avant la mise en pause ;" -#: howto/curses.rst:445 +#: howto/curses.rst:440 msgid "" ":meth:`~curses.window.getkey` does the same thing but converts the integer " "to a string. Individual characters are returned as 1-character strings, and " @@ -908,7 +900,7 @@ msgstr "" "renvoient des chaînes plus longues contenant le nom de la touche (tel que " "``KEY_UP`` ou ``^G``)." -#: howto/curses.rst:450 +#: howto/curses.rst:445 msgid "" "It's possible to not wait for the user using the :meth:`~curses.window." "nodelay` window method. After ``nodelay(True)``, :meth:`getch` and :meth:" @@ -929,7 +921,7 @@ msgstr "" "aucune entrée n'est disponible dans le délai spécifié (mesuré en dixièmes de " "seconde), *curses* lève une exception." -#: howto/curses.rst:460 +#: howto/curses.rst:455 msgid "" "The :meth:`getch` method returns an integer; if it's between 0 and 255, it " "represents the ASCII code of the key pressed. Values greater than 255 are " @@ -946,7 +938,7 @@ msgstr "" "La boucle principale de votre programme pourrait ressembler à quelque chose " "comme ::" -#: howto/curses.rst:476 +#: howto/curses.rst:471 msgid "" "The :mod:`curses.ascii` module supplies ASCII class membership functions " "that take either integer or 1-character string arguments; these may be " @@ -963,7 +955,7 @@ msgstr "" "type correspondant au nom de la fonction. Par exemple, :func:`curses.ascii." "ctrl` renvoie le caractère de contrôle correspondant à son paramètre." -#: howto/curses.rst:483 +#: howto/curses.rst:478 msgid "" "There's also a method to retrieve an entire string, :meth:`~curses.window." "getstr`. It isn't used very often, because its functionality is quite " @@ -977,7 +969,7 @@ msgstr "" "arrière et la touche Entrée, qui termine la chaîne. Elle peut, en option, " "être limitée à un nombre fixé de caractères. ::" -#: howto/curses.rst:494 +#: howto/curses.rst:489 msgid "" "The :mod:`curses.textpad` module supplies a text box that supports an Emacs-" "like set of keybindings. Various methods of the :class:`~curses.textpad." @@ -990,18 +982,18 @@ msgstr "" "des entrées et le regroupement de l'entrée avec ou sans les espaces de début " "et de fin. Par exemple ::" -#: howto/curses.rst:518 +#: howto/curses.rst:513 msgid "" "See the library documentation on :mod:`curses.textpad` for more details." msgstr "" "Consultez la documentation de la bibliothèque pour plus de détails sur :mod:" "`curses.textpad`." -#: howto/curses.rst:522 +#: howto/curses.rst:517 msgid "For More Information" msgstr "Pour aller plus loin" -#: howto/curses.rst:524 +#: howto/curses.rst:519 msgid "" "This HOWTO doesn't cover some advanced topics, such as reading the contents " "of the screen or capturing mouse events from an xterm instance, but the " @@ -1014,7 +1006,7 @@ msgstr "" "`curses` est maintenant suffisamment complète. Nous vous encourageons à la " "parcourir." -#: howto/curses.rst:529 +#: howto/curses.rst:524 msgid "" "If you're in doubt about the detailed behavior of the curses functions, " "consult the manual pages for your curses implementation, whether it's " @@ -1029,7 +1021,7 @@ msgstr "" "listes complètes des fonctions, attributs et codes :const:`ACS_\\*` des " "caractères disponibles." -#: howto/curses.rst:536 +#: howto/curses.rst:531 msgid "" "Because the curses API is so large, some functions aren't supported in the " "Python interface. Often this isn't because they're difficult to implement, " @@ -1047,7 +1039,7 @@ msgstr "" "du développeur Python `_ pour apprendre " "comment soumettre des améliorations à Python." -#: howto/curses.rst:544 +#: howto/curses.rst:539 msgid "" "`Writing Programs with NCURSES `_: a lengthy tutorial for C programmers." @@ -1056,18 +1048,18 @@ msgstr "" "intro.html>`_ : un long tutoriel pour les programmeurs C (ressource en " "anglais)." -#: howto/curses.rst:546 +#: howto/curses.rst:541 msgid "`The ncurses man page `_" msgstr "`La page de manuel ncurses `_" -#: howto/curses.rst:547 +#: howto/curses.rst:542 msgid "" "`The ncurses FAQ `_" msgstr "" "`La FAQ ncurses `_ " "(ressource en anglais)" -#: howto/curses.rst:548 +#: howto/curses.rst:543 msgid "" "`\"Use curses... don't swear\" `_: video of a PyCon 2013 talk on controlling terminals using " @@ -1077,7 +1069,7 @@ msgstr "" "v=eN1eZtjLEnU>`_ : vidéo d'une conférence lors de la PyCon 2013 sur la " "gestion des terminaux à l'aide de *curses* et *Urwid* (vidéo en anglais)." -#: howto/curses.rst:550 +#: howto/curses.rst:545 msgid "" "`\"Console Applications with Urwid\" `_: video of a PyCon CA 2012 talk " @@ -1086,3 +1078,19 @@ msgstr "" "`\"Console Applications with Urwid\" `_ : vidéo d'une conférence lors de PyCon CA " "2012 montrant quelques applications utilisant *Urwid*." + +#~ msgid "" +#~ "The Windows version of Python doesn't include the :mod:`curses` module. " +#~ "A ported version called `UniCurses `_ " +#~ "is available. You could also try `the Console module `_ written by Fredrik Lundh, which doesn't use the " +#~ "same API as curses but provides cursor-addressable text output and full " +#~ "support for mouse and keyboard input." +#~ msgstr "" +#~ "La version Windows de Python n'inclut pas le module :mod:`curses`. Une " +#~ "version portée appelée `UniCurses `_ " +#~ "est disponible. Vous pouvez également essayer le `Windows console driver " +#~ "`_ écrit par Fredrik Lundh, qui " +#~ "n'utilise pas la même API que *curses*, mais fournit une sortie texte " +#~ "avec gestion du curseur et une prise en charge complète de la souris et " +#~ "du clavier." diff --git a/howto/descriptor.po b/howto/descriptor.po index 6abdbe8830..16825a53ec 100644 --- a/howto/descriptor.po +++ b/howto/descriptor.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" -"PO-Revision-Date: 2020-12-17 21:41+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2021-12-16 17:28+0100\n" "Last-Translator: Mathieu Dupuy \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -92,8 +92,8 @@ msgstr "" #: howto/descriptor.rst:45 msgid "" -"The :class:`Ten` class is a descriptor that always returns the constant " -"``10`` from its :meth:`__get__` method:" +"The :class:`Ten` class is a descriptor whose :meth:`__get__` method always " +"returns the constant ``10``:" msgstr "" #: howto/descriptor.rst:54 @@ -110,10 +110,10 @@ msgstr "" #: howto/descriptor.rst:73 msgid "" -"In the ``a.x`` attribute lookup, the dot operator finds the key ``x`` and " -"the value ``5`` in the class dictionary. In the ``a.y`` lookup, the dot " -"operator finds a descriptor instance, recognized by its ``__get__`` method, " -"and calls that method which returns ``10``." +"In the ``a.x`` attribute lookup, the dot operator finds ``'x': 5`` in the " +"class dictionary. In the ``a.y`` lookup, the dot operator finds a " +"descriptor instance, recognized by its ``__get__`` method. Calling that " +"method returns ``10``." msgstr "" #: howto/descriptor.rst:78 @@ -247,8 +247,8 @@ msgstr "" #: howto/descriptor.rst:305 msgid "" -"Descriptors get invoked by the dot \"operator\" during attribute lookup. If " -"a descriptor is accessed indirectly with ``vars(some_class)" +"Descriptors get invoked by the dot operator during attribute lookup. If a " +"descriptor is accessed indirectly with ``vars(some_class)" "[descriptor_name]``, the descriptor instance is returned without invoking it." msgstr "" @@ -570,32 +570,27 @@ msgid "" "is a pure Python equivalent:" msgstr "" -#: howto/descriptor.rst:700 +#: howto/descriptor.rst:699 msgid "" -"Interestingly, attribute lookup doesn't call :meth:`object.__getattribute__` " -"directly. Instead, both the dot operator and the :func:`getattr` function " -"perform attribute lookup by way of a helper function:" +"Note, there is no :meth:`__getattr__` hook in the :meth:`__getattribute__` " +"code. That is why calling :meth:`__getattribute__` directly or with " +"``super().__getattribute__`` will bypass :meth:`__getattr__` entirely." msgstr "" -#: howto/descriptor.rst:747 +#: howto/descriptor.rst:703 msgid "" -"So if :meth:`__getattr__` exists, it is called whenever :meth:" -"`__getattribute__` raises :exc:`AttributeError` (either directly or in one " -"of the descriptor calls)." +"Instead, it is the dot operator and the :func:`getattr` function that are " +"responsible for invoking :meth:`__getattr__` whenever :meth:" +"`__getattribute__` raises an :exc:`AttributeError`. Their logic is " +"encapsulated in a helper function:" msgstr "" -#: howto/descriptor.rst:750 -msgid "" -"Also, if a user calls :meth:`object.__getattribute__` directly, the :meth:" -"`__getattr__` hook is bypassed entirely." -msgstr "" - -#: howto/descriptor.rst:755 +#: howto/descriptor.rst:753 #, fuzzy msgid "Invocation from a class" msgstr "Appelé depuis un Classe" -#: howto/descriptor.rst:757 +#: howto/descriptor.rst:755 msgid "" "The logic for a dotted lookup such as ``A.x`` is in :meth:`type." "__getattribute__`. The steps are similar to those for :meth:`object." @@ -603,27 +598,27 @@ msgid "" "through the class's :term:`method resolution order`." msgstr "" -#: howto/descriptor.rst:762 +#: howto/descriptor.rst:760 msgid "If a descriptor is found, it is invoked with ``desc.__get__(None, A)``." msgstr "" -#: howto/descriptor.rst:764 +#: howto/descriptor.rst:762 msgid "" "The full C implementation can be found in :c:func:`type_getattro()` and :c:" "func:`_PyType_Lookup()` in :source:`Objects/typeobject.c`." msgstr "" -#: howto/descriptor.rst:769 +#: howto/descriptor.rst:767 msgid "Invocation from super" msgstr "" -#: howto/descriptor.rst:771 +#: howto/descriptor.rst:769 msgid "" "The logic for super's dotted lookup is in the :meth:`__getattribute__` " "method for object returned by :class:`super()`." msgstr "" -#: howto/descriptor.rst:774 +#: howto/descriptor.rst:772 #, fuzzy msgid "" "A dotted lookup such as ``super(A, obj).m`` searches ``obj.__class__." @@ -639,7 +634,7 @@ msgstr "" "inchangé. S'il n'est pas dans le dictionnaire, la recherche de ``m`` revient " "à une recherche utilisant :meth:`object.__getattribute__`." -#: howto/descriptor.rst:779 +#: howto/descriptor.rst:777 #, fuzzy msgid "" "The full C implementation can be found in :c:func:`super_getattro()` in :" @@ -651,32 +646,32 @@ msgstr "" "source:`Objects/typeobject.c` et un équivalent Python pur peut être trouvé " "dans `Guido's Tutorial`_." -#: howto/descriptor.rst:786 +#: howto/descriptor.rst:784 msgid "Summary of invocation logic" msgstr "" -#: howto/descriptor.rst:788 +#: howto/descriptor.rst:786 msgid "" "The mechanism for descriptors is embedded in the :meth:`__getattribute__()` " "methods for :class:`object`, :class:`type`, and :func:`super`." msgstr "" -#: howto/descriptor.rst:791 +#: howto/descriptor.rst:789 msgid "The important points to remember are:" msgstr "Les points importants à retenir sont :" -#: howto/descriptor.rst:793 +#: howto/descriptor.rst:791 #, fuzzy msgid "Descriptors are invoked by the :meth:`__getattribute__` method." msgstr "les descripteurs sont appelés par la méthode :meth:`__getattribute__`" -#: howto/descriptor.rst:795 +#: howto/descriptor.rst:793 msgid "" "Classes inherit this machinery from :class:`object`, :class:`type`, or :func:" "`super`." msgstr "" -#: howto/descriptor.rst:798 +#: howto/descriptor.rst:796 #, fuzzy msgid "" "Overriding :meth:`__getattribute__` prevents automatic descriptor calls " @@ -685,7 +680,7 @@ msgstr "" "redéfinir :meth:`__getattribute____` empêche les appels automatiques de " "descripteurs" -#: howto/descriptor.rst:801 +#: howto/descriptor.rst:799 #, fuzzy msgid "" ":meth:`object.__getattribute__` and :meth:`type.__getattribute__` make " @@ -696,25 +691,25 @@ msgstr "" ":meth:`objet.__getattribute__` et :meth:`type.__getattribute__` font " "différents appels à :meth:`__get__`." -#: howto/descriptor.rst:806 +#: howto/descriptor.rst:804 #, fuzzy msgid "Data descriptors always override instance dictionaries." msgstr "" "les descripteurs de données remplacent toujours les dictionnaires " "d'instances." -#: howto/descriptor.rst:808 +#: howto/descriptor.rst:806 #, fuzzy msgid "Non-data descriptors may be overridden by instance dictionaries." msgstr "" "les descripteurs *non-data* peuvent être remplacés par des dictionnaires " "d'instance." -#: howto/descriptor.rst:812 +#: howto/descriptor.rst:810 msgid "Automatic name notification" msgstr "" -#: howto/descriptor.rst:814 +#: howto/descriptor.rst:812 msgid "" "Sometimes it is desirable for a descriptor to know what class variable name " "it was assigned to. When a new class is created, the :class:`type` " @@ -724,7 +719,7 @@ msgid "" "and the *name* is the class variable the descriptor was assigned to." msgstr "" -#: howto/descriptor.rst:821 +#: howto/descriptor.rst:819 #, fuzzy msgid "" "The implementation details are in :c:func:`type_new()` and :c:func:" @@ -734,59 +729,59 @@ msgstr "" "source:`Objects/typeobject.c` et un équivalent Python pur peut être trouvé " "dans `Guido's Tutorial`_." -#: howto/descriptor.rst:824 +#: howto/descriptor.rst:822 msgid "" "Since the update logic is in :meth:`type.__new__`, notifications only take " "place at the time of class creation. If descriptors are added to the class " "afterwards, :meth:`__set_name__` will need to be called manually." msgstr "" -#: howto/descriptor.rst:830 +#: howto/descriptor.rst:828 msgid "ORM example" msgstr "" -#: howto/descriptor.rst:832 +#: howto/descriptor.rst:830 msgid "" "The following code is simplified skeleton showing how data descriptors could " "be used to implement an `object relational mapping `_." msgstr "" -#: howto/descriptor.rst:836 +#: howto/descriptor.rst:834 msgid "" "The essential idea is that the data is stored in an external database. The " "Python instances only hold keys to the database's tables. Descriptors take " "care of lookups or updates:" msgstr "" -#: howto/descriptor.rst:855 +#: howto/descriptor.rst:853 msgid "" "We can use the :class:`Field` class to define `models `_ that describe the schema for each table in a " "database:" msgstr "" -#: howto/descriptor.rst:880 +#: howto/descriptor.rst:878 msgid "To use the models, first connect to the database::" msgstr "" -#: howto/descriptor.rst:885 +#: howto/descriptor.rst:883 msgid "" "An interactive session shows how data is retrieved from the database and how " "it can be updated:" msgstr "" -#: howto/descriptor.rst:930 +#: howto/descriptor.rst:928 msgid "Pure Python Equivalents" msgstr "" -#: howto/descriptor.rst:932 +#: howto/descriptor.rst:930 #, fuzzy msgid "" "The descriptor protocol is simple and offers exciting possibilities. " "Several use cases are so common that they have been prepackaged into built-" -"in tools. Properties, bound methods, static methods, class methods, and \\_" -"\\_slots\\_\\_ are all based on the descriptor protocol." +"in tools. Properties, bound methods, static methods, class methods, and " +"\\_\\_slots\\_\\_ are all based on the descriptor protocol." msgstr "" "Le protocole est simple et offre des possibilités passionnantes. Plusieurs " "cas d'utilisation sont si courants qu'ils ont été regroupés en appels de " @@ -794,11 +789,11 @@ msgstr "" "statiques et les méthodes de classe sont toutes basées sur le protocole du " "descripteur." -#: howto/descriptor.rst:939 +#: howto/descriptor.rst:937 msgid "Properties" msgstr "Propriétés" -#: howto/descriptor.rst:941 +#: howto/descriptor.rst:939 #, fuzzy msgid "" "Calling :func:`property` is a succinct way of building a data descriptor " @@ -809,7 +804,7 @@ msgstr "" "descripteur de données qui déclenche des appels de fonction lors de l'accès " "à un attribut. Sa signature est ::" -#: howto/descriptor.rst:946 +#: howto/descriptor.rst:944 #, fuzzy msgid "" "The documentation shows a typical use to define a managed attribute ``x``:" @@ -817,7 +812,7 @@ msgstr "" "La documentation montre une utilisation typique pour définir un attribut " "géré ``x`` ::" -#: howto/descriptor.rst:970 +#: howto/descriptor.rst:968 #, fuzzy msgid "" "To see how :func:`property` is implemented in terms of the descriptor " @@ -826,7 +821,7 @@ msgstr "" "Pour voir comment :func:`property` est implémenté dans le protocole du " "descripteur, voici un un équivalent Python pur ::" -#: howto/descriptor.rst:1063 +#: howto/descriptor.rst:1071 msgid "" "The :func:`property` builtin helps whenever a user interface has granted " "attribute access and then subsequent changes require the intervention of a " @@ -836,7 +831,7 @@ msgstr "" "utilisateur a accordé l'accès à un attribut et que des modifications " "ultérieures nécessitent l'intervention d'une méthode." -#: howto/descriptor.rst:1067 +#: howto/descriptor.rst:1075 #, fuzzy msgid "" "For instance, a spreadsheet class may grant access to a cell value through " @@ -853,18 +848,18 @@ msgstr "" "directement à l'attribut. La solution consiste à envelopper l'accès à " "l'attribut de valeur dans un descripteur de données de propriété ::" -#: howto/descriptor.rst:1084 +#: howto/descriptor.rst:1092 msgid "" "Either the built-in :func:`property` or our :func:`Property` equivalent " "would work in this example." msgstr "" -#: howto/descriptor.rst:1089 +#: howto/descriptor.rst:1097 #, fuzzy msgid "Functions and methods" msgstr "Fonctions et méthodes" -#: howto/descriptor.rst:1091 +#: howto/descriptor.rst:1099 msgid "" "Python's object oriented features are built upon a function based " "environment. Using non-data descriptors, the two are merged seamlessly." @@ -873,7 +868,7 @@ msgstr "" "environnement basé sur des fonctions. À l'aide de descripteurs *non-data*, " "les deux sont fusionnés de façon transparente." -#: howto/descriptor.rst:1094 +#: howto/descriptor.rst:1102 #, fuzzy msgid "" "Functions stored in class dictionaries get turned into methods when invoked. " @@ -889,13 +884,13 @@ msgstr "" "convention Python, la référence de l'instance est appelée *self* mais peut " "être appelée *this* ou tout autre nom de variable." -#: howto/descriptor.rst:1099 +#: howto/descriptor.rst:1107 msgid "" "Methods can be created manually with :class:`types.MethodType` which is " "roughly equivalent to:" msgstr "" -#: howto/descriptor.rst:1116 +#: howto/descriptor.rst:1124 #, fuzzy msgid "" "To support automatic creation of methods, functions include the :meth:" @@ -909,7 +904,7 @@ msgstr "" "*non-data* qui renvoient des méthodes liées lorsqu'elles sont appelées " "depuis un objet. En Python pur, il fonctionne comme ceci ::" -#: howto/descriptor.rst:1132 +#: howto/descriptor.rst:1140 #, fuzzy msgid "" "Running the following class in the interpreter shows how the function " @@ -918,47 +913,47 @@ msgstr "" "L'exécution de l'interpréteur montre comment le descripteur de fonction se " "comporte dans la pratique ::" -#: howto/descriptor.rst:1141 +#: howto/descriptor.rst:1149 msgid "" "The function has a :term:`qualified name` attribute to support introspection:" msgstr "" -#: howto/descriptor.rst:1148 +#: howto/descriptor.rst:1156 msgid "" "Accessing the function through the class dictionary does not invoke :meth:" "`__get__`. Instead, it just returns the underlying function object::" msgstr "" -#: howto/descriptor.rst:1154 +#: howto/descriptor.rst:1162 msgid "" "Dotted access from a class calls :meth:`__get__` which just returns the " "underlying function unchanged::" msgstr "" -#: howto/descriptor.rst:1160 +#: howto/descriptor.rst:1168 msgid "" "The interesting behavior occurs during dotted access from an instance. The " "dotted lookup calls :meth:`__get__` which returns a bound method object::" msgstr "" -#: howto/descriptor.rst:1167 +#: howto/descriptor.rst:1175 msgid "" "Internally, the bound method stores the underlying function and the bound " "instance::" msgstr "" -#: howto/descriptor.rst:1176 +#: howto/descriptor.rst:1184 msgid "" "If you have ever wondered where *self* comes from in regular methods or " "where *cls* comes from in class methods, this is it!" msgstr "" -#: howto/descriptor.rst:1181 +#: howto/descriptor.rst:1189 #, fuzzy msgid "Kinds of methods" msgstr "Fonctions et méthodes" -#: howto/descriptor.rst:1183 +#: howto/descriptor.rst:1191 msgid "" "Non-data descriptors provide a simple mechanism for variations on the usual " "patterns of binding functions into methods." @@ -966,7 +961,7 @@ msgstr "" "Les descripteurs *non-data* fournissent un mécanisme simple pour les " "variations des patrons habituels des fonctions de liaison dans les méthodes." -#: howto/descriptor.rst:1186 +#: howto/descriptor.rst:1194 #, fuzzy msgid "" "To recap, functions have a :meth:`__get__` method so that they can be " @@ -979,60 +974,60 @@ msgstr "" "descripteur *non-data* transforme un appel ``obj.f(*args)``en ``f(obj, " "*args)``. Appeler ``klass.f(*args)`` devient ``f(*args)``." -#: howto/descriptor.rst:1191 +#: howto/descriptor.rst:1199 msgid "This chart summarizes the binding and its two most useful variants:" msgstr "" "Ce tableau résume le lien (*binding*) et ses deux variantes les plus " "utiles ::" -#: howto/descriptor.rst:1194 +#: howto/descriptor.rst:1202 msgid "Transformation" msgstr "Transformation" -#: howto/descriptor.rst:1194 +#: howto/descriptor.rst:1202 #, fuzzy msgid "Called from an object" msgstr "Appelé depuis un Objet" -#: howto/descriptor.rst:1194 +#: howto/descriptor.rst:1202 #, fuzzy msgid "Called from a class" msgstr "Appelé depuis un Classe" -#: howto/descriptor.rst:1197 +#: howto/descriptor.rst:1205 msgid "function" msgstr "fonction" -#: howto/descriptor.rst:1197 +#: howto/descriptor.rst:1205 msgid "f(obj, \\*args)" msgstr "f(obj, \\*args)" -#: howto/descriptor.rst:1199 +#: howto/descriptor.rst:1207 msgid "f(\\*args)" msgstr "f(\\*args)" -#: howto/descriptor.rst:1199 +#: howto/descriptor.rst:1207 msgid "staticmethod" msgstr "méthode statique" -#: howto/descriptor.rst:1201 +#: howto/descriptor.rst:1209 msgid "classmethod" msgstr "méthode de classe" -#: howto/descriptor.rst:1201 +#: howto/descriptor.rst:1209 msgid "f(type(obj), \\*args)" msgstr "f(type(obj), \\*args)" -#: howto/descriptor.rst:1201 +#: howto/descriptor.rst:1209 msgid "f(cls, \\*args)" msgstr "f(cls, \\*args)" -#: howto/descriptor.rst:1206 +#: howto/descriptor.rst:1214 #, fuzzy msgid "Static methods" msgstr "méthode statique" -#: howto/descriptor.rst:1208 +#: howto/descriptor.rst:1216 msgid "" "Static methods return the underlying function without changes. Calling " "either ``c.f`` or ``C.f`` is the equivalent of a direct lookup into ``object." @@ -1046,7 +1041,7 @@ msgstr "" "__getattribute__(C, \"f\")``. Par conséquent, la fonction devient accessible " "de manière identique à partir d'un objet ou d'une classe." -#: howto/descriptor.rst:1214 +#: howto/descriptor.rst:1222 msgid "" "Good candidates for static methods are methods that do not reference the " "``self`` variable." @@ -1054,7 +1049,7 @@ msgstr "" "Les bonnes candidates pour être méthode statique sont des méthodes qui ne " "font pas référence à la variable ``self``." -#: howto/descriptor.rst:1217 +#: howto/descriptor.rst:1225 msgid "" "For instance, a statistics package may include a container class for " "experimental data. The class provides normal methods for computing the " @@ -1073,10 +1068,10 @@ msgstr "" "ne dépendent pas des données. Par exemple, ``erf(x)`` est une routine de " "conversion pratique qui apparaît dans le travail statistique mais qui ne " "dépend pas directement d'un ensemble de données particulier. Elle peut être " -"appelée à partir d'un objet ou de la classe : ``s.erf(1.5) --> .9332``` ou " +"appelée à partir d'un objet ou de la classe : ``s.erf(1.5) --> .9332`` ou " "``Sample.erf(1.5) --> .9332``." -#: howto/descriptor.rst:1226 +#: howto/descriptor.rst:1234 #, fuzzy msgid "" "Since static methods return the underlying function with no changes, the " @@ -1085,7 +1080,7 @@ msgstr "" "Depuis que les méthodes statiques renvoient la fonction sous-jacente sans " "changement, les exemples d’appels ne sont pas excitants ::" -#: howto/descriptor.rst:1243 +#: howto/descriptor.rst:1251 #, fuzzy msgid "" "Using the non-data descriptor protocol, a pure Python version of :func:" @@ -1094,12 +1089,12 @@ msgstr "" "En utilisant le protocole de descripteur *non-data*, une version Python pure " "de :func:`staticmethod` ressemblerait à ceci ::" -#: howto/descriptor.rst:1275 +#: howto/descriptor.rst:1290 #, fuzzy msgid "Class methods" msgstr "méthode de classe" -#: howto/descriptor.rst:1277 +#: howto/descriptor.rst:1292 #, fuzzy msgid "" "Unlike static methods, class methods prepend the class reference to the " @@ -1110,7 +1105,7 @@ msgstr "" "référence de classe dans la liste d'arguments avant d'appeler la fonction. " "Ce format est le même que l'appelant soit un objet ou une classe ::" -#: howto/descriptor.rst:1295 +#: howto/descriptor.rst:1310 #, fuzzy msgid "" "This behavior is useful whenever the method only needs to have a class " @@ -1126,14 +1121,14 @@ msgstr "" "nouveau dictionnaire à partir d'une liste de clés. L'équivalent Python pur " "est ::" -#: howto/descriptor.rst:1312 +#: howto/descriptor.rst:1327 #, fuzzy msgid "Now a new dictionary of unique keys can be constructed like this:" msgstr "" "Maintenant un nouveau dictionnaire de clés uniques peut être construit comme " "ceci ::" -#: howto/descriptor.rst:1322 +#: howto/descriptor.rst:1337 #, fuzzy msgid "" "Using the non-data descriptor protocol, a pure Python version of :func:" @@ -1142,38 +1137,38 @@ msgstr "" "En utilisant le protocole de descripteur *non-data*, une version Python pure " "de :func:`classmethod` ressemblerait à ceci ::" -#: howto/descriptor.rst:1371 +#: howto/descriptor.rst:1388 msgid "" "The code path for ``hasattr(type(self.f), '__get__')`` was added in Python " "3.9 and makes it possible for :func:`classmethod` to support chained " "decorators. For example, a classmethod and property could be chained " -"together:" +"together. In Python 3.11, this functionality was deprecated." msgstr "" -#: howto/descriptor.rst:1391 +#: howto/descriptor.rst:1408 msgid "Member objects and __slots__" msgstr "" -#: howto/descriptor.rst:1393 +#: howto/descriptor.rst:1410 msgid "" "When a class defines ``__slots__``, it replaces instance dictionaries with a " "fixed-length array of slot values. From a user point of view that has " "several effects:" msgstr "" -#: howto/descriptor.rst:1397 +#: howto/descriptor.rst:1414 msgid "" "1. Provides immediate detection of bugs due to misspelled attribute " "assignments. Only attribute names specified in ``__slots__`` are allowed:" msgstr "" -#: howto/descriptor.rst:1413 +#: howto/descriptor.rst:1430 msgid "" "2. Helps create immutable objects where descriptors manage access to private " "attributes stored in ``__slots__``:" msgstr "" -#: howto/descriptor.rst:1448 +#: howto/descriptor.rst:1465 msgid "" "3. Saves memory. On a 64-bit Linux build, an instance with two attributes " "takes 48 bytes with ``__slots__`` and 152 bytes without. This `flyweight " @@ -1181,13 +1176,19 @@ msgid "" "only matters when a large number of instances are going to be created." msgstr "" -#: howto/descriptor.rst:1453 +#: howto/descriptor.rst:1470 +msgid "" +"4. Improves speed. Reading instance variables is 35% faster with " +"``__slots__`` (as measured with Python 3.10 on an Apple M1 processor)." +msgstr "" + +#: howto/descriptor.rst:1473 msgid "" -"4. Blocks tools like :func:`functools.cached_property` which require an " +"5. Blocks tools like :func:`functools.cached_property` which require an " "instance dictionary to function correctly:" msgstr "" -#: howto/descriptor.rst:1475 +#: howto/descriptor.rst:1495 msgid "" "It is not possible to create an exact drop-in pure Python version of " "``__slots__`` because it requires direct access to C structures and control " @@ -1197,37 +1198,37 @@ msgid "" "managed by member descriptors:" msgstr "" -#: howto/descriptor.rst:1518 +#: howto/descriptor.rst:1538 msgid "" "The :meth:`type.__new__` method takes care of adding member objects to class " "variables:" msgstr "" -#: howto/descriptor.rst:1534 +#: howto/descriptor.rst:1554 msgid "" "The :meth:`object.__new__` method takes care of creating instances that have " "slots instead of an instance dictionary. Here is a rough simulation in pure " "Python:" msgstr "" -#: howto/descriptor.rst:1569 +#: howto/descriptor.rst:1589 msgid "" "To use the simulation in a real class, just inherit from :class:`Object` and " "set the :term:`metaclass` to :class:`Type`:" msgstr "" -#: howto/descriptor.rst:1583 +#: howto/descriptor.rst:1603 msgid "" "At this point, the metaclass has loaded member objects for *x* and *y*::" msgstr "" -#: howto/descriptor.rst:1604 +#: howto/descriptor.rst:1624 msgid "" "When instances are created, they have a ``slot_values`` list where the " "attributes are stored:" msgstr "" -#: howto/descriptor.rst:1616 +#: howto/descriptor.rst:1636 msgid "Misspelled or unassigned attributes will raise an exception:" msgstr "" diff --git a/howto/enum.po b/howto/enum.po new file mode 100644 index 0000000000..6f1a0d7acd --- /dev/null +++ b/howto/enum.po @@ -0,0 +1,1176 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001-2022, Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.11\n" +"Report-Msgid-Bugs-To:\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-05-23 00:51+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" + +#: howto/enum.rst:3 +msgid "Enum HOWTO" +msgstr "" + +#: howto/enum.rst:9 +msgid "" +"An :class:`Enum` is a set of symbolic names bound to unique values. They " +"are similar to global variables, but they offer a more useful :func:" +"`repr()`, grouping, type-safety, and a few other features." +msgstr "" + +#: howto/enum.rst:13 +msgid "" +"They are most useful when you have a variable that can take one of a limited " +"selection of values. For example, the days of the week::" +msgstr "" + +#: howto/enum.rst:26 +msgid "Or perhaps the RGB primary colors::" +msgstr "" + +#: howto/enum.rst:34 +msgid "" +"As you can see, creating an :class:`Enum` is as simple as writing a class " +"that inherits from :class:`Enum` itself." +msgstr "" + +#: howto/enum.rst:37 +msgid "Case of Enum Members" +msgstr "" + +#: howto/enum.rst:39 +msgid "" +"Because Enums are used to represent constants we recommend using UPPER_CASE " +"names for members, and will be using that style in our examples." +msgstr "" + +#: howto/enum.rst:42 +msgid "" +"Depending on the nature of the enum a member's value may or may not be " +"important, but either way that value can be used to get the corresponding " +"member::" +msgstr "" + +#: howto/enum.rst:49 +msgid "" +"As you can see, the ``repr()`` of a member shows the enum name, the member " +"name, and the value. The ``str()`` of a member shows only the enum name and " +"member name::" +msgstr "" + +#: howto/enum.rst:56 +msgid "The *type* of an enumeration member is the enum it belongs to::" +msgstr "" + +#: howto/enum.rst:63 +msgid "Enum members have an attribute that contains just their :attr:`name`::" +msgstr "" + +#: howto/enum.rst:68 +msgid "Likewise, they have an attribute for their :attr:`value`::" +msgstr "" + +#: howto/enum.rst:74 +msgid "" +"Unlike many languages that treat enumerations solely as name/value pairs, " +"Python Enums can have behavior added. For example, :class:`datetime.date` " +"has two methods for returning the weekday: :meth:`weekday` and :meth:" +"`isoweekday`. The difference is that one of them counts from 0-6 and the " +"other from 1-7. Rather than keep track of that ourselves we can add a method " +"to the :class:`Weekday` enum to extract the day from the :class:`date` " +"instance and return the matching enum member::" +msgstr "" + +#: howto/enum.rst:86 +msgid "The complete :class:`Weekday` enum now looks like this::" +msgstr "" + +#: howto/enum.rst:101 +msgid "Now we can find out what today is! Observe::" +msgstr "" + +#: howto/enum.rst:107 +msgid "" +"Of course, if you're reading this on some other day, you'll see that day " +"instead." +msgstr "" + +#: howto/enum.rst:109 +msgid "" +"This :class:`Weekday` enum is great if our variable only needs one day, but " +"what if we need several? Maybe we're writing a function to plot chores " +"during a week, and don't want to use a :class:`list` -- we could use a " +"different type of :class:`Enum`::" +msgstr "" + +#: howto/enum.rst:124 +msgid "" +"We've changed two things: we're inherited from :class:`Flag`, and the values " +"are all powers of 2." +msgstr "" + +#: howto/enum.rst:127 +msgid "" +"Just like the original :class:`Weekday` enum above, we can have a single " +"selection::" +msgstr "" + +#: howto/enum.rst:133 +msgid "" +"But :class:`Flag` also allows us to combine several members into a single " +"variable::" +msgstr "" + +#: howto/enum.rst:140 +msgid "You can even iterate over a :class:`Flag` variable::" +msgstr "" + +#: howto/enum.rst:147 +msgid "Okay, let's get some chores set up::" +msgstr "" + +#: howto/enum.rst:155 +msgid "And a function to display the chores for a given day::" +msgstr "" + +#: howto/enum.rst:164 +msgid "" +"In cases where the actual values of the members do not matter, you can save " +"yourself some work and use :func:`auto()` for the values::" +msgstr "" + +#: howto/enum.rst:182 +msgid "Programmatic access to enumeration members and their attributes" +msgstr "" + +#: howto/enum.rst:184 +msgid "" +"Sometimes it's useful to access members in enumerations programmatically (i." +"e. situations where ``Color.RED`` won't do because the exact color is not " +"known at program-writing time). ``Enum`` allows such access::" +msgstr "" + +#: howto/enum.rst:193 +msgid "If you want to access enum members by *name*, use item access::" +msgstr "" + +#: howto/enum.rst:200 +msgid "If you have an enum member and need its :attr:`name` or :attr:`value`::" +msgstr "" + +#: howto/enum.rst:210 +msgid "Duplicating enum members and values" +msgstr "" + +#: howto/enum.rst:212 +msgid "Having two enum members with the same name is invalid::" +msgstr "" + +#: howto/enum.rst:222 +msgid "" +"However, an enum member can have other names associated with it. Given two " +"entries ``A`` and ``B`` with the same value (and ``A`` defined first), ``B`` " +"is an alias for the member ``A``. By-value lookup of the value of ``A`` " +"will return the member ``A``. By-name lookup of ``A`` will return the " +"member ``A``. By-name lookup of ``B`` will also return the member ``A``::" +msgstr "" + +#: howto/enum.rst:243 +msgid "" +"Attempting to create a member with the same name as an already defined " +"attribute (another member, a method, etc.) or attempting to create an " +"attribute with the same name as a member is not allowed." +msgstr "" + +#: howto/enum.rst:249 +msgid "Ensuring unique enumeration values" +msgstr "" + +#: howto/enum.rst:251 +msgid "" +"By default, enumerations allow multiple names as aliases for the same value. " +"When this behavior isn't desired, you can use the :func:`unique` decorator::" +msgstr "" + +#: howto/enum.rst:268 +msgid "Using automatic values" +msgstr "" + +#: howto/enum.rst:270 +msgid "If the exact value is unimportant you can use :class:`auto`::" +msgstr "" + +#: howto/enum.rst:281 +msgid "" +"The values are chosen by :func:`_generate_next_value_`, which can be " +"overridden::" +msgstr "" + +#: howto/enum.rst:299 +msgid "" +"The :meth:`_generate_next_value_` method must be defined before any members." +msgstr "" + +#: howto/enum.rst:302 +msgid "Iteration" +msgstr "" + +#: howto/enum.rst:304 +msgid "Iterating over the members of an enum does not provide the aliases::" +msgstr "" + +#: howto/enum.rst:309 +msgid "" +"The special attribute ``__members__`` is a read-only ordered mapping of " +"names to members. It includes all names defined in the enumeration, " +"including the aliases::" +msgstr "" + +#: howto/enum.rst:321 +msgid "" +"The ``__members__`` attribute can be used for detailed programmatic access " +"to the enumeration members. For example, finding all the aliases::" +msgstr "" + +#: howto/enum.rst:329 +msgid "Comparisons" +msgstr "" + +#: howto/enum.rst:331 +msgid "Enumeration members are compared by identity::" +msgstr "" + +#: howto/enum.rst:340 +msgid "" +"Ordered comparisons between enumeration values are *not* supported. Enum " +"members are not integers (but see `IntEnum`_ below)::" +msgstr "" + +#: howto/enum.rst:348 +msgid "Equality comparisons are defined though::" +msgstr "" + +#: howto/enum.rst:357 +msgid "" +"Comparisons against non-enumeration values will always compare not equal " +"(again, :class:`IntEnum` was explicitly designed to behave differently, see " +"below)::" +msgstr "" + +#: howto/enum.rst:366 +msgid "Allowed members and attributes of enumerations" +msgstr "" + +#: howto/enum.rst:368 +msgid "" +"Most of the examples above use integers for enumeration values. Using " +"integers is short and handy (and provided by default by the `Functional " +"API`_), but not strictly enforced. In the vast majority of use-cases, one " +"doesn't care what the actual value of an enumeration is. But if the value " +"*is* important, enumerations can have arbitrary values." +msgstr "" + +#: howto/enum.rst:374 +msgid "" +"Enumerations are Python classes, and can have methods and special methods as " +"usual. If we have this enumeration::" +msgstr "" + +#: howto/enum.rst:394 +msgid "Then::" +msgstr "" + +#: howto/enum.rst:403 +msgid "" +"The rules for what is allowed are as follows: names that start and end with " +"a single underscore are reserved by enum and cannot be used; all other " +"attributes defined within an enumeration will become members of this " +"enumeration, with the exception of special methods (:meth:`__str__`, :meth:" +"`__add__`, etc.), descriptors (methods are also descriptors), and variable " +"names listed in :attr:`_ignore_`." +msgstr "" + +#: howto/enum.rst:410 +msgid "" +"Note: if your enumeration defines :meth:`__new__` and/or :meth:`__init__` " +"then any value(s) given to the enum member will be passed into those " +"methods. See `Planet`_ for an example." +msgstr "" + +#: howto/enum.rst:416 +msgid "Restricted Enum subclassing" +msgstr "" + +#: howto/enum.rst:418 +msgid "" +"A new :class:`Enum` class must have one base enum class, up to one concrete " +"data type, and as many :class:`object`-based mixin classes as needed. The " +"order of these base classes is::" +msgstr "" + +#: howto/enum.rst:425 +msgid "" +"Also, subclassing an enumeration is allowed only if the enumeration does not " +"define any members. So this is forbidden::" +msgstr "" + +#: howto/enum.rst:435 +msgid "But this is allowed::" +msgstr "" + +#: howto/enum.rst:446 +msgid "" +"Allowing subclassing of enums that define members would lead to a violation " +"of some important invariants of types and instances. On the other hand, it " +"makes sense to allow sharing some common behavior between a group of " +"enumerations. (See `OrderedEnum`_ for an example.)" +msgstr "" + +#: howto/enum.rst:453 +msgid "Pickling" +msgstr "" + +#: howto/enum.rst:455 +msgid "Enumerations can be pickled and unpickled::" +msgstr "" + +#: howto/enum.rst:462 +msgid "" +"The usual restrictions for pickling apply: picklable enums must be defined " +"in the top level of a module, since unpickling requires them to be " +"importable from that module." +msgstr "" + +#: howto/enum.rst:468 +msgid "" +"With pickle protocol version 4 it is possible to easily pickle enums nested " +"in other classes." +msgstr "" + +#: howto/enum.rst:471 +msgid "" +"It is possible to modify how enum members are pickled/unpickled by defining :" +"meth:`__reduce_ex__` in the enumeration class." +msgstr "" + +#: howto/enum.rst:476 +msgid "Functional API" +msgstr "" + +#: howto/enum.rst:478 +msgid "" +"The :class:`Enum` class is callable, providing the following functional API::" +msgstr "" + +#: howto/enum.rst:488 +msgid "" +"The semantics of this API resemble :class:`~collections.namedtuple`. The " +"first argument of the call to :class:`Enum` is the name of the enumeration." +msgstr "" + +#: howto/enum.rst:491 +msgid "" +"The second argument is the *source* of enumeration member names. It can be " +"a whitespace-separated string of names, a sequence of names, a sequence of 2-" +"tuples with key/value pairs, or a mapping (e.g. dictionary) of names to " +"values. The last two options enable assigning arbitrary values to " +"enumerations; the others auto-assign increasing integers starting with 1 " +"(use the ``start`` parameter to specify a different starting value). A new " +"class derived from :class:`Enum` is returned. In other words, the above " +"assignment to :class:`Animal` is equivalent to::" +msgstr "" + +#: howto/enum.rst:507 +msgid "" +"The reason for defaulting to ``1`` as the starting number and not ``0`` is " +"that ``0`` is ``False`` in a boolean sense, but by default enum members all " +"evaluate to ``True``." +msgstr "" + +#: howto/enum.rst:511 +msgid "" +"Pickling enums created with the functional API can be tricky as frame stack " +"implementation details are used to try and figure out which module the " +"enumeration is being created in (e.g. it will fail if you use a utility " +"function in a separate module, and also may not work on IronPython or " +"Jython). The solution is to specify the module name explicitly as follows::" +msgstr "" + +#: howto/enum.rst:521 +msgid "" +"If ``module`` is not supplied, and Enum cannot determine what it is, the new " +"Enum members will not be unpicklable; to keep errors closer to the source, " +"pickling will be disabled." +msgstr "" + +#: howto/enum.rst:525 +msgid "" +"The new pickle protocol 4 also, in some circumstances, relies on :attr:" +"`~definition.__qualname__` being set to the location where pickle will be " +"able to find the class. For example, if the class was made available in " +"class SomeData in the global scope::" +msgstr "" + +#: howto/enum.rst:532 +msgid "The complete signature is::" +msgstr "" + +#: howto/enum.rst:0 +msgid "value" +msgstr "" + +#: howto/enum.rst:544 +msgid "What the new enum class will record as its name." +msgstr "" + +#: howto/enum.rst:0 +msgid "names" +msgstr "" + +#: howto/enum.rst:546 +msgid "" +"The enum members. This can be a whitespace- or comma-separated string " +"(values will start at 1 unless otherwise specified)::" +msgstr "" + +#: howto/enum.rst:551 +msgid "or an iterator of names::" +msgstr "" + +#: howto/enum.rst:555 +msgid "or an iterator of (name, value) pairs::" +msgstr "" + +#: howto/enum.rst:559 +msgid "or a mapping::" +msgstr "" + +#: howto/enum.rst:0 +msgid "module" +msgstr "" + +#: howto/enum.rst:563 +msgid "name of module where new enum class can be found." +msgstr "" + +#: howto/enum.rst:0 +msgid "qualname" +msgstr "" + +#: howto/enum.rst:565 +msgid "where in module new enum class can be found." +msgstr "" + +#: howto/enum.rst:0 +msgid "type" +msgstr "" + +#: howto/enum.rst:567 +msgid "type to mix in to new enum class." +msgstr "" + +#: howto/enum.rst:0 +msgid "start" +msgstr "" + +#: howto/enum.rst:569 +msgid "number to start counting at if only names are passed in." +msgstr "" + +#: howto/enum.rst:571 +msgid "The *start* parameter was added." +msgstr "" + +#: howto/enum.rst:576 +msgid "Derived Enumerations" +msgstr "" + +#: howto/enum.rst:579 +msgid "IntEnum" +msgstr "" + +#: howto/enum.rst:581 +msgid "" +"The first variation of :class:`Enum` that is provided is also a subclass of :" +"class:`int`. Members of an :class:`IntEnum` can be compared to integers; by " +"extension, integer enumerations of different types can also be compared to " +"each other::" +msgstr "" + +#: howto/enum.rst:602 +msgid "" +"However, they still can't be compared to standard :class:`Enum` " +"enumerations::" +msgstr "" + +#: howto/enum.rst:615 +msgid "" +":class:`IntEnum` values behave like integers in other ways you'd expect::" +msgstr "" + +#: howto/enum.rst:626 +msgid "StrEnum" +msgstr "" + +#: howto/enum.rst:628 +msgid "" +"The second variation of :class:`Enum` that is provided is also a subclass " +"of :class:`str`. Members of a :class:`StrEnum` can be compared to strings; " +"by extension, string enumerations of different types can also be compared to " +"each other." +msgstr "" + +#: howto/enum.rst:637 +msgid "IntFlag" +msgstr "" + +#: howto/enum.rst:639 +msgid "" +"The next variation of :class:`Enum` provided, :class:`IntFlag`, is also " +"based on :class:`int`. The difference being :class:`IntFlag` members can be " +"combined using the bitwise operators (&, \\|, ^, ~) and the result is still " +"an :class:`IntFlag` member, if possible. Like :class:`IntEnum`, :class:" +"`IntFlag` members are also integers and can be used wherever an :class:`int` " +"is used." +msgstr "" + +#: howto/enum.rst:647 +msgid "" +"Any operation on an :class:`IntFlag` member besides the bit-wise operations " +"will lose the :class:`IntFlag` membership." +msgstr "" + +#: howto/enum.rst:650 +msgid "" +"Bit-wise operations that result in invalid :class:`IntFlag` values will lose " +"the :class:`IntFlag` membership. See :class:`FlagBoundary` for details." +msgstr "" + +#: howto/enum.rst:657 +msgid "Sample :class:`IntFlag` class::" +msgstr "" + +#: howto/enum.rst:673 +msgid "It is also possible to name the combinations::" +msgstr "" + +#: howto/enum.rst:689 +msgid "" +"Named combinations are considered aliases. Aliases do not show up during " +"iteration, but can be returned from by-value lookups." +msgstr "" + +#: howto/enum.rst:694 +msgid "" +"Another important difference between :class:`IntFlag` and :class:`Enum` is " +"that if no flags are set (the value is 0), its boolean evaluation is :data:" +"`False`::" +msgstr "" + +#: howto/enum.rst:702 +msgid "" +"Because :class:`IntFlag` members are also subclasses of :class:`int` they " +"can be combined with them (but may lose :class:`IntFlag` membership::" +msgstr "" + +#: howto/enum.rst:713 +msgid "" +"The negation operator, ``~``, always returns an :class:`IntFlag` member with " +"a positive value::" +msgstr "" + +#: howto/enum.rst:719 +msgid ":class:`IntFlag` members can also be iterated over::" +msgstr "" + +#: howto/enum.rst:728 +msgid "Flag" +msgstr "" + +#: howto/enum.rst:730 +msgid "" +"The last variation is :class:`Flag`. Like :class:`IntFlag`, :class:`Flag` " +"members can be combined using the bitwise operators (&, \\|, ^, ~). Unlike :" +"class:`IntFlag`, they cannot be combined with, nor compared against, any " +"other :class:`Flag` enumeration, nor :class:`int`. While it is possible to " +"specify the values directly it is recommended to use :class:`auto` as the " +"value and let :class:`Flag` select an appropriate value." +msgstr "" + +#: howto/enum.rst:739 +msgid "" +"Like :class:`IntFlag`, if a combination of :class:`Flag` members results in " +"no flags being set, the boolean evaluation is :data:`False`::" +msgstr "" + +#: howto/enum.rst:753 +msgid "" +"Individual flags should have values that are powers of two (1, 2, 4, " +"8, ...), while combinations of flags won't::" +msgstr "" + +#: howto/enum.rst:765 +msgid "" +"Giving a name to the \"no flags set\" condition does not change its boolean " +"value::" +msgstr "" + +#: howto/enum.rst:779 +msgid ":class:`Flag` members can also be iterated over::" +msgstr "" + +#: howto/enum.rst:789 +msgid "" +"For the majority of new code, :class:`Enum` and :class:`Flag` are strongly " +"recommended, since :class:`IntEnum` and :class:`IntFlag` break some semantic " +"promises of an enumeration (by being comparable to integers, and thus by " +"transitivity to other unrelated enumerations). :class:`IntEnum` and :class:" +"`IntFlag` should be used only in cases where :class:`Enum` and :class:`Flag` " +"will not do; for example, when integer constants are replaced with " +"enumerations, or for interoperability with other systems." +msgstr "" + +#: howto/enum.rst:799 +msgid "Others" +msgstr "" + +#: howto/enum.rst:801 +msgid "" +"While :class:`IntEnum` is part of the :mod:`enum` module, it would be very " +"simple to implement independently::" +msgstr "" + +#: howto/enum.rst:807 +msgid "" +"This demonstrates how similar derived enumerations can be defined; for " +"example a :class:`FloatEnum` that mixes in :class:`float` instead of :class:" +"`int`." +msgstr "" + +#: howto/enum.rst:810 +msgid "Some rules:" +msgstr "" + +#: howto/enum.rst:812 +msgid "" +"When subclassing :class:`Enum`, mix-in types must appear before :class:" +"`Enum` itself in the sequence of bases, as in the :class:`IntEnum` example " +"above." +msgstr "" + +#: howto/enum.rst:815 +msgid "" +"Mix-in types must be subclassable. For example, :class:`bool` and :class:" +"`range` are not subclassable and will throw an error during Enum creation if " +"used as the mix-in type." +msgstr "" + +#: howto/enum.rst:818 +msgid "" +"While :class:`Enum` can have members of any type, once you mix in an " +"additional type, all the members must have values of that type, e.g. :class:" +"`int` above. This restriction does not apply to mix-ins which only add " +"methods and don't specify another type." +msgstr "" + +#: howto/enum.rst:822 +msgid "" +"When another data type is mixed in, the :attr:`value` attribute is *not the " +"same* as the enum member itself, although it is equivalent and will compare " +"equal." +msgstr "" + +#: howto/enum.rst:825 +msgid "" +"%-style formatting: ``%s`` and ``%r`` call the :class:`Enum` class's :meth:" +"`__str__` and :meth:`__repr__` respectively; other codes (such as ``%i`` or " +"``%h`` for IntEnum) treat the enum member as its mixed-in type." +msgstr "" + +#: howto/enum.rst:828 +msgid "" +":ref:`Formatted string literals `, :meth:`str.format`, and :func:" +"`format` will use the enum's :meth:`__str__` method." +msgstr "" + +#: howto/enum.rst:833 +msgid "" +"Because :class:`IntEnum`, :class:`IntFlag`, and :class:`StrEnum` are " +"designed to be drop-in replacements for existing constants, their :meth:" +"`__str__` method has been reset to their data types :meth:`__str__` method." +msgstr "" + +#: howto/enum.rst:839 +msgid "When to use :meth:`__new__` vs. :meth:`__init__`" +msgstr "" + +#: howto/enum.rst:841 +msgid "" +":meth:`__new__` must be used whenever you want to customize the actual value " +"of the :class:`Enum` member. Any other modifications may go in either :meth:" +"`__new__` or :meth:`__init__`, with :meth:`__init__` being preferred." +msgstr "" + +#: howto/enum.rst:845 +msgid "" +"For example, if you want to pass several items to the constructor, but only " +"want one of them to be the value::" +msgstr "" + +#: howto/enum.rst:872 +msgid "Finer Points" +msgstr "" + +#: howto/enum.rst:875 +msgid "Supported ``__dunder__`` names" +msgstr "" + +#: howto/enum.rst:877 +msgid "" +":attr:`__members__` is a read-only ordered mapping of ``member_name``:" +"``member`` items. It is only available on the class." +msgstr "" + +#: howto/enum.rst:880 +msgid "" +":meth:`__new__`, if specified, must create and return the enum members; it " +"is also a very good idea to set the member's :attr:`_value_` appropriately. " +"Once all the members are created it is no longer used." +msgstr "" + +#: howto/enum.rst:886 +msgid "Supported ``_sunder_`` names" +msgstr "" + +#: howto/enum.rst:888 +msgid "``_name_`` -- name of the member" +msgstr "" + +#: howto/enum.rst:889 +msgid "" +"``_value_`` -- value of the member; can be set / modified in ``__new__``" +msgstr "" + +#: howto/enum.rst:891 +msgid "" +"``_missing_`` -- a lookup function used when a value is not found; may be " +"overridden" +msgstr "" + +#: howto/enum.rst:893 +msgid "" +"``_ignore_`` -- a list of names, either as a :class:`list` or a :class:" +"`str`, that will not be transformed into members, and will be removed from " +"the final class" +msgstr "" + +#: howto/enum.rst:896 +msgid "" +"``_order_`` -- used in Python 2/3 code to ensure member order is consistent " +"(class attribute, removed during class creation)" +msgstr "" + +#: howto/enum.rst:898 +msgid "" +"``_generate_next_value_`` -- used by the `Functional API`_ and by :class:" +"`auto` to get an appropriate value for an enum member; may be overridden" +msgstr "" + +#: howto/enum.rst:904 +msgid "" +"For standard :class:`Enum` classes the next value chosen is the last value " +"seen incremented by one." +msgstr "" + +#: howto/enum.rst:907 +msgid "" +"For :class:`Flag` classes the next value chosen will be the next highest " +"power-of-two, regardless of the last value seen." +msgstr "" + +#: howto/enum.rst:910 +msgid "``_missing_``, ``_order_``, ``_generate_next_value_``" +msgstr "" + +#: howto/enum.rst:911 +msgid "``_ignore_``" +msgstr "" + +#: howto/enum.rst:913 +msgid "" +"To help keep Python 2 / Python 3 code in sync an :attr:`_order_` attribute " +"can be provided. It will be checked against the actual order of the " +"enumeration and raise an error if the two do not match::" +msgstr "" + +#: howto/enum.rst:931 +msgid "" +"In Python 2 code the :attr:`_order_` attribute is necessary as definition " +"order is lost before it can be recorded." +msgstr "" + +#: howto/enum.rst:936 +msgid "_Private__names" +msgstr "" + +#: howto/enum.rst:938 +msgid "" +":ref:`Private names ` are not converted to enum " +"members, but remain normal attributes." +msgstr "" + +#: howto/enum.rst:945 +msgid "``Enum`` member type" +msgstr "" + +#: howto/enum.rst:947 +msgid "" +"Enum members are instances of their enum class, and are normally accessed as " +"``EnumClass.member``. In Python versions ``3.5`` to ``3.10`` you could " +"access members from other members -- this practice was discouraged, and in " +"``3.11`` :class:`Enum` returns to not allowing it::" +msgstr "" + +#: howto/enum.rst:968 +msgid "Creating members that are mixed with other data types" +msgstr "" + +#: howto/enum.rst:970 +msgid "" +"When subclassing other data types, such as :class:`int` or :class:`str`, " +"with an :class:`Enum`, all values after the ``=`` are passed to that data " +"type's constructor. For example::" +msgstr "" + +#: howto/enum.rst:982 +msgid "Boolean value of ``Enum`` classes and members" +msgstr "" + +#: howto/enum.rst:984 +msgid "" +"Enum classes that are mixed with non-:class:`Enum` types (such as :class:" +"`int`, :class:`str`, etc.) are evaluated according to the mixed-in type's " +"rules; otherwise, all members evaluate as :data:`True`. To make your own " +"enum's boolean evaluation depend on the member's value add the following to " +"your class::" +msgstr "" + +#: howto/enum.rst:993 +msgid "Plain :class:`Enum` classes always evaluate as :data:`True`." +msgstr "" + +#: howto/enum.rst:997 +msgid "``Enum`` classes with methods" +msgstr "" + +#: howto/enum.rst:999 +msgid "" +"If you give your enum subclass extra methods, like the `Planet`_ class " +"below, those methods will show up in a :func:`dir` of the member, but not of " +"the class::" +msgstr "" + +#: howto/enum.rst:1010 +msgid "Combining members of ``Flag``" +msgstr "" + +#: howto/enum.rst:1012 +msgid "" +"Iterating over a combination of :class:`Flag` members will only return the " +"members that are comprised of a single bit::" +msgstr "" + +#: howto/enum.rst:1030 +msgid "``Flag`` and ``IntFlag`` minutia" +msgstr "" + +#: howto/enum.rst:1032 +msgid "Using the following snippet for our examples::" +msgstr "" + +#: howto/enum.rst:1043 +msgid "the following are true:" +msgstr "" + +#: howto/enum.rst:1045 +msgid "single-bit flags are canonical" +msgstr "" + +#: howto/enum.rst:1046 +msgid "multi-bit and zero-bit flags are aliases" +msgstr "" + +#: howto/enum.rst:1047 +msgid "only canonical flags are returned during iteration::" +msgstr "" + +#: howto/enum.rst:1052 +msgid "" +"negating a flag or flag set returns a new flag/flag set with the " +"corresponding positive integer value::" +msgstr "" + +#: howto/enum.rst:1061 +msgid "names of pseudo-flags are constructed from their members' names::" +msgstr "" + +#: howto/enum.rst:1066 +msgid "multi-bit flags, aka aliases, can be returned from operations::" +msgstr "" + +#: howto/enum.rst:1077 +msgid "" +"membership / containment checking: zero-valued flags are always considered " +"to be contained::" +msgstr "" + +#: howto/enum.rst:1083 +msgid "" +"otherwise, only if all bits of one flag are in the other flag will True be " +"returned::" +msgstr "" + +#: howto/enum.rst:1092 +msgid "" +"There is a new boundary mechanism that controls how out-of-range / invalid " +"bits are handled: ``STRICT``, ``CONFORM``, ``EJECT``, and ``KEEP``:" +msgstr "" + +#: howto/enum.rst:1095 +msgid "STRICT --> raises an exception when presented with invalid values" +msgstr "" + +#: howto/enum.rst:1096 +msgid "CONFORM --> discards any invalid bits" +msgstr "" + +#: howto/enum.rst:1097 +msgid "EJECT --> lose Flag status and become a normal int with the given value" +msgstr "" + +#: howto/enum.rst:1101 +msgid "KEEP --> keep the extra bits" +msgstr "" + +#: howto/enum.rst:1099 +msgid "keeps Flag status and extra bits" +msgstr "" + +#: howto/enum.rst:1100 +msgid "extra bits do not show up in iteration" +msgstr "" + +#: howto/enum.rst:1101 +msgid "extra bits do show up in repr() and str()" +msgstr "" + +#: howto/enum.rst:1103 +msgid "" +"The default for Flag is ``STRICT``, the default for ``IntFlag`` is " +"``EJECT``, and the default for ``_convert_`` is ``KEEP`` (see ``ssl." +"Options`` for an example of when ``KEEP`` is needed)." +msgstr "" + +#: howto/enum.rst:1111 +msgid "How are Enums different?" +msgstr "" + +#: howto/enum.rst:1113 +msgid "" +"Enums have a custom metaclass that affects many aspects of both derived :" +"class:`Enum` classes and their instances (members)." +msgstr "" + +#: howto/enum.rst:1118 +msgid "Enum Classes" +msgstr "" + +#: howto/enum.rst:1120 +msgid "" +"The :class:`EnumType` metaclass is responsible for providing the :meth:" +"`__contains__`, :meth:`__dir__`, :meth:`__iter__` and other methods that " +"allow one to do things with an :class:`Enum` class that fail on a typical " +"class, such as `list(Color)` or `some_enum_var in Color`. :class:`EnumType` " +"is responsible for ensuring that various other methods on the final :class:" +"`Enum` class are correct (such as :meth:`__new__`, :meth:`__getnewargs__`, :" +"meth:`__str__` and :meth:`__repr__`)." +msgstr "" + +#: howto/enum.rst:1130 +msgid "Enum Members (aka instances)" +msgstr "" + +#: howto/enum.rst:1132 +msgid "" +"The most interesting thing about enum members is that they are singletons. :" +"class:`EnumType` creates them all while it is creating the enum class " +"itself, and then puts a custom :meth:`__new__` in place to ensure that no " +"new ones are ever instantiated by returning only the existing member " +"instances." +msgstr "" + +#: howto/enum.rst:1141 +msgid "" +"While :class:`Enum`, :class:`IntEnum`, :class:`StrEnum`, :class:`Flag`, and :" +"class:`IntFlag` are expected to cover the majority of use-cases, they cannot " +"cover them all. Here are recipes for some different types of enumerations " +"that can be used directly, or as examples for creating one's own." +msgstr "" + +#: howto/enum.rst:1148 +msgid "Omitting values" +msgstr "" + +#: howto/enum.rst:1150 +msgid "" +"In many use-cases, one doesn't care what the actual value of an enumeration " +"is. There are several ways to define this type of simple enumeration:" +msgstr "" + +#: howto/enum.rst:1153 +msgid "use instances of :class:`auto` for the value" +msgstr "" + +#: howto/enum.rst:1154 +msgid "use instances of :class:`object` as the value" +msgstr "" + +#: howto/enum.rst:1155 +msgid "use a descriptive string as the value" +msgstr "" + +#: howto/enum.rst:1156 +msgid "" +"use a tuple as the value and a custom :meth:`__new__` to replace the tuple " +"with an :class:`int` value" +msgstr "" + +#: howto/enum.rst:1159 +msgid "" +"Using any of these methods signifies to the user that these values are not " +"important, and also enables one to add, remove, or reorder members without " +"having to renumber the remaining members." +msgstr "" + +#: howto/enum.rst:1165 +msgid "Using :class:`auto`" +msgstr "" + +#: howto/enum.rst:1167 +msgid "Using :class:`auto` would look like::" +msgstr "" + +#: howto/enum.rst:1179 +msgid "Using :class:`object`" +msgstr "" + +#: howto/enum.rst:1181 +msgid "Using :class:`object` would look like::" +msgstr "" + +#: howto/enum.rst:1191 +msgid "" +"This is also a good example of why you might want to write your own :meth:" +"`__repr__`::" +msgstr "" + +#: howto/enum.rst:1207 +msgid "Using a descriptive string" +msgstr "" + +#: howto/enum.rst:1209 +msgid "Using a string as the value would look like::" +msgstr "" + +#: howto/enum.rst:1221 +msgid "Using a custom :meth:`__new__`" +msgstr "" + +#: howto/enum.rst:1223 +msgid "Using an auto-numbering :meth:`__new__` would look like::" +msgstr "" + +#: howto/enum.rst:1240 +msgid "" +"To make a more general purpose ``AutoNumber``, add ``*args`` to the " +"signature::" +msgstr "" + +#: howto/enum.rst:1250 +msgid "" +"Then when you inherit from ``AutoNumber`` you can write your own " +"``__init__`` to handle any extra arguments::" +msgstr "" + +#: howto/enum.rst:1269 +msgid "" +"The :meth:`__new__` method, if defined, is used during creation of the Enum " +"members; it is then replaced by Enum's :meth:`__new__` which is used after " +"class creation for lookup of existing members." +msgstr "" + +#: howto/enum.rst:1275 +msgid "OrderedEnum" +msgstr "" + +#: howto/enum.rst:1277 +msgid "" +"An ordered enumeration that is not based on :class:`IntEnum` and so " +"maintains the normal :class:`Enum` invariants (such as not being comparable " +"to other enumerations)::" +msgstr "" + +#: howto/enum.rst:1311 +msgid "DuplicateFreeEnum" +msgstr "" + +#: howto/enum.rst:1313 +msgid "" +"Raises an error if a duplicate member name is found instead of creating an " +"alias::" +msgstr "" + +#: howto/enum.rst:1338 +msgid "" +"This is a useful example for subclassing Enum to add or change other " +"behaviors as well as disallowing aliases. If the only desired change is " +"disallowing aliases, the :func:`unique` decorator can be used instead." +msgstr "" + +#: howto/enum.rst:1344 +msgid "Planet" +msgstr "" + +#: howto/enum.rst:1346 +msgid "" +"If :meth:`__new__` or :meth:`__init__` is defined, the value of the enum " +"member will be passed to those methods::" +msgstr "" + +#: howto/enum.rst:1375 +msgid "TimePeriod" +msgstr "" + +#: howto/enum.rst:1377 +msgid "An example to show the :attr:`_ignore_` attribute in use::" +msgstr "" + +#: howto/enum.rst:1396 +msgid "Subclassing EnumType" +msgstr "" + +#: howto/enum.rst:1398 +msgid "" +"While most enum needs can be met by customizing :class:`Enum` subclasses, " +"either with class decorators or custom functions, :class:`EnumType` can be " +"subclassed to provide a different Enum experience." +msgstr "" diff --git a/howto/functional.po b/howto/functional.po index 07414aae80..3fa0cc0764 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2020-04-30 11:11+0200\n" -"Last-Translator: Antoine Wecxsteen\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-05-12 09:39+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.4\n" +"X-Generator: Poedit 3.0.1\n" #: howto/functional.rst:3 msgid "Functional Programming HOWTO" @@ -180,23 +180,23 @@ msgstr "" msgid "" "Some languages are very strict about purity and don't even have assignment " "statements such as ``a=3`` or ``c = a + b``, but it's difficult to avoid all " -"side effects. Printing to the screen or writing to a disk file are side " -"effects, for example. For example, in Python a call to the :func:`print` " -"or :func:`time.sleep` function both return no useful value; they're only " -"called for their side effects of sending some text to the screen or pausing " -"execution for a second." +"side effects, such as printing to the screen or writing to a disk file. " +"Another example is a call to the :func:`print` or :func:`time.sleep` " +"function, neither of which returns a useful value. Both are called only for " +"their side effects of sending some text to the screen or pausing execution " +"for a second." msgstr "" "Certains langages sont très stricts en ce qui concerne la pureté des " "fonctions et ne laissent même pas la possibilité d'assigner des variables " "avec des expressions telles que ``a = 3`` ou ``c = a + b``, cependant il est " "difficile d'éviter tous les effets de bord. Afficher un message sur l'écran " -"ou écrire un fichier sur le disque sont des effets de bord. Par exemple, un " -"appel aux fonctions :func:`print` ou :func:`time.sleep` en Python ne renvoie " -"aucune valeur utile ; ces fonctions ne sont appelées que pour leur effet de " -"bord (afficher du texte sur l'écran et mettre en pause l'exécution du " -"programme)." +"ou écrire un fichier sur le disque sont des effets de bord. Pour prendre un " +"autre exemple, un appel aux fonctions :func:`print` ou :func:`time.sleep` en " +"Python ne renvoie aucune valeur utile ; ces fonctions ne sont appelées que " +"pour leur effet de bord (afficher du texte sur l'écran ou mettre en pause " +"l'exécution du programme)." -#: howto/functional.rst:74 +#: howto/functional.rst:73 msgid "" "Python programs written in functional style usually won't go to the extreme " "of avoiding all I/O or all assignments; instead, they'll provide a " @@ -213,7 +213,7 @@ msgstr "" "locales mais ne modifiera pas de variable globale et n'aura pas d'autre " "effet de bord." -#: howto/functional.rst:80 +#: howto/functional.rst:79 msgid "" "Functional programming can be considered the opposite of object-oriented " "programming. Objects are little capsules containing some internal state " @@ -234,7 +234,7 @@ msgstr "" "qui prennent en argument et renvoient des instances représentants des objets " "de votre application (courriers électroniques, transactions, etc.)." -#: howto/functional.rst:89 +#: howto/functional.rst:88 msgid "" "Functional design may seem like an odd constraint to work under. Why should " "you avoid objects and side effects? There are theoretical and practical " @@ -245,30 +245,30 @@ msgstr "" "avantages théoriques et pratiques au style fonctionnel :" # Énumération -#: howto/functional.rst:93 +#: howto/functional.rst:92 msgid "Formal provability." msgstr "preuves formelles ;" # Énumération -#: howto/functional.rst:94 +#: howto/functional.rst:93 msgid "Modularity." msgstr "modularité ;" # Énumération -#: howto/functional.rst:95 +#: howto/functional.rst:94 msgid "Composability." msgstr "composabilité ;" # Énumération -#: howto/functional.rst:96 +#: howto/functional.rst:95 msgid "Ease of debugging and testing." msgstr "facilité de débogage et de test." -#: howto/functional.rst:100 +#: howto/functional.rst:99 msgid "Formal provability" msgstr "Preuves formelles" -#: howto/functional.rst:102 +#: howto/functional.rst:101 msgid "" "A theoretical benefit is that it's easier to construct a mathematical proof " "that a functional program is correct." @@ -276,7 +276,7 @@ msgstr "" "Un avantage théorique est qu'il plus facile de construire une preuve " "mathématique de l'exactitude d'un programme fonctionnel." -#: howto/functional.rst:105 +#: howto/functional.rst:104 msgid "" "For a long time researchers have been interested in finding ways to " "mathematically prove programs correct. This is different from testing a " @@ -292,7 +292,7 @@ msgstr "" "d'établir une preuve rigoureuse que le programme produit le bon résultat " "pour toutes les entrées possibles." -#: howto/functional.rst:112 +#: howto/functional.rst:111 msgid "" "The technique used to prove programs correct is to write down " "**invariants**, properties of the input data and of the program's variables " @@ -311,7 +311,7 @@ msgstr "" "programme. À ce stade, les invariants doivent alors correspondre aux " "propriétés que l'on souhaite que la sortie du programme vérifie." -#: howto/functional.rst:120 +#: howto/functional.rst:119 msgid "" "Functional programming's avoidance of assignments arose because assignments " "are difficult to handle with this technique; assignments can break " @@ -323,7 +323,7 @@ msgstr "" "assignations peuvent rompre des invariants qui étaient vrais auparavant sans " "pour autant produire de nouveaux invariants qui pourraient être propagés." -#: howto/functional.rst:125 +#: howto/functional.rst:124 msgid "" "Unfortunately, proving programs correct is largely impractical and not " "relevant to Python software. Even trivial programs require proofs that are " @@ -345,11 +345,11 @@ msgstr "" "erreur et que vous pensez désormais, à tort, que vous avez prouvé que votre " "programme est correct." -#: howto/functional.rst:136 +#: howto/functional.rst:135 msgid "Modularity" msgstr "Modularité" -#: howto/functional.rst:138 +#: howto/functional.rst:137 msgid "" "A more practical benefit of functional programming is that it forces you to " "break apart your problem into small pieces. Programs are more modular as a " @@ -364,15 +364,15 @@ msgstr "" "grosse fonction qui réalise une transformation complexe. Les petites " "fonctions sont plus faciles à lire et à vérifier." -#: howto/functional.rst:146 +#: howto/functional.rst:145 msgid "Ease of debugging and testing" msgstr "Facilité de débogage et de test" -#: howto/functional.rst:148 +#: howto/functional.rst:147 msgid "Testing and debugging a functional-style program is easier." msgstr "Tester et déboguer un programme fonctionnel est plus facile." -#: howto/functional.rst:150 +#: howto/functional.rst:149 msgid "" "Debugging is simplified because functions are generally small and clearly " "specified. When a program doesn't work, each function is an interface point " @@ -386,7 +386,7 @@ msgstr "" "valeurs sont justes. Vous pouvez observer les entrées intermédiaires et les " "sorties afin d'isoler rapidement la fonction qui est à l'origine du bogue." -#: howto/functional.rst:155 +#: howto/functional.rst:154 msgid "" "Testing is easier because each function is a potential subject for a unit " "test. Functions don't depend on system state that needs to be replicated " @@ -399,11 +399,11 @@ msgstr "" "à la place vous n'avez qu'à produire une entrée synthétique et vérifier que " "le résultat correspond à ce que vous attendez." -#: howto/functional.rst:162 +#: howto/functional.rst:161 msgid "Composability" msgstr "Composabilité" -#: howto/functional.rst:164 +#: howto/functional.rst:163 msgid "" "As you work on a functional-style program, you'll write a number of " "functions with varying inputs and outputs. Some of these functions will be " @@ -422,7 +422,7 @@ msgstr "" "contenu d'un fichier à partir de son nom peuvent être utiles dans de " "nombreuses situations." -#: howto/functional.rst:171 +#: howto/functional.rst:170 msgid "" "Over time you'll form a personal library of utilities. Often you'll " "assemble new programs by arranging existing functions in a new configuration " @@ -433,11 +433,11 @@ msgstr "" "agençant des fonctions existantes dans une nouvelle configuration et en " "écrivant quelques fonctions spécifiques à votre objectif en cours." -#: howto/functional.rst:179 +#: howto/functional.rst:178 msgid "Iterators" msgstr "Itérateurs" -#: howto/functional.rst:181 +#: howto/functional.rst:180 msgid "" "I'll start by looking at a Python language feature that's an important " "foundation for writing functional-style programs: iterators." @@ -445,7 +445,7 @@ msgstr "" "Commençons par jeter un œil à une des fonctionnalités les plus importantes " "pour écrire en style fonctionnel avec Python : les itérateurs." -#: howto/functional.rst:184 +#: howto/functional.rst:183 msgid "" "An iterator is an object representing a stream of data; this object returns " "the data one element at a time. A Python iterator must support a method " @@ -463,7 +463,7 @@ msgstr "" "`StopIteration`. Toutefois, ce n'est pas indispensable ; il est envisageable " "d'écrire un itérateur qui produit un flux infini de données." -#: howto/functional.rst:192 +#: howto/functional.rst:191 msgid "" "The built-in :func:`iter` function takes an arbitrary object and tries to " "return an iterator that will return the object's contents or elements, " @@ -479,11 +479,11 @@ msgstr "" "listes et les dictionnaires. On appelle :term:`iterable` un objet pour " "lequel il est possible de construire un itérateur." -#: howto/functional.rst:199 +#: howto/functional.rst:198 msgid "You can experiment with the iteration interface manually:" msgstr "Vous pouvez expérimenter avec l'interface d'itération manuellement :" -#: howto/functional.rst:217 +#: howto/functional.rst:216 msgid "" "Python expects iterable objects in several different contexts, the most " "important being the :keyword:`for` statement. In the statement ``for X in " @@ -495,7 +495,7 @@ msgstr "" "``for X in Y``, Y doit être un itérateur ou un objet pour lequel :func:" "`iter` peut générer un itérateur. Ces deux expressions sont équivalentes ::" -#: howto/functional.rst:229 +#: howto/functional.rst:228 msgid "" "Iterators can be materialized as lists or tuples by using the :func:`list` " "or :func:`tuple` constructor functions:" @@ -503,7 +503,7 @@ msgstr "" "Les itérateurs peuvent être transformés en listes ou en *n*-uplets en " "appelant les constructeurs respectifs :func:`list` et :func:`tuple` :" -#: howto/functional.rst:238 +#: howto/functional.rst:237 msgid "" "Sequence unpacking also supports iterators: if you know an iterator will " "return N elements, you can unpack them into an N-tuple:" @@ -512,7 +512,7 @@ msgstr "" "vous savez qu'un itérateur renvoie N éléments, vous pouvez les dépaqueter " "dans un *n*-uplet :" -#: howto/functional.rst:247 +#: howto/functional.rst:246 msgid "" "Built-in functions such as :func:`max` and :func:`min` can take a single " "iterator argument and will return the largest or smallest element. The ``" @@ -531,7 +531,7 @@ msgstr "" "si l'élément X n'apparaît pas dans le flux, les opérateurs ``\"in\"`` et ``" "\"not in\"`` non plus." -#: howto/functional.rst:255 +#: howto/functional.rst:254 msgid "" "Note that you can only go forward in an iterator; there's no way to get the " "previous element, reset the iterator, or make a copy of it. Iterator " @@ -550,11 +550,11 @@ msgstr "" "devez utiliser le même flux pour autre chose, vous devrez en créer un " "nouveau." -#: howto/functional.rst:265 +#: howto/functional.rst:264 msgid "Data Types That Support Iterators" msgstr "Types de données itérables" -#: howto/functional.rst:267 +#: howto/functional.rst:266 msgid "" "We've already seen how lists and tuples support iterators. In fact, any " "Python sequence type, such as strings, will automatically support creation " @@ -564,7 +564,7 @@ msgstr "" "itérateurs. En réalité, n'importe quel type de séquence en Python, par " "exemple les chaînes de caractères, sont itérables." -#: howto/functional.rst:271 +#: howto/functional.rst:270 msgid "" "Calling :func:`iter` on a dictionary returns an iterator that will loop over " "the dictionary's keys::" @@ -572,7 +572,7 @@ msgstr "" "Appeler :func:`iter` sur un dictionnaire renvoie un itérateur qui parcourt " "l'ensemble de ses clés ::" -#: howto/functional.rst:291 +#: howto/functional.rst:290 msgid "" "Note that starting with Python 3.7, dictionary iteration order is guaranteed " "to be the same as the insertion order. In earlier versions, the behaviour " @@ -583,7 +583,7 @@ msgstr "" "clés. Dans les versions précédentes, ce comportement n'était pas spécifié et " "pouvait varier en fonction de l'implémentation." -#: howto/functional.rst:295 +#: howto/functional.rst:294 msgid "" "Applying :func:`iter` to a dictionary always loops over the keys, but " "dictionaries have methods that return other iterators. If you want to " @@ -596,7 +596,7 @@ msgstr "" "dictionnaire, vous pouvez explicitement appeler les méthodes :meth:`~dict." "values` ou :meth:`~dict.items` pour obtenir l'itérateur idoine." -#: howto/functional.rst:301 +#: howto/functional.rst:300 msgid "" "The :func:`dict` constructor can accept an iterator that returns a finite " "stream of ``(key, value)`` tuples:" @@ -604,7 +604,7 @@ msgstr "" "Le constructeur :func:`dict` accepte de prendre un itérateur en argument qui " "renvoie un flux fini de pairs ``(clé, valeur)`` :" -#: howto/functional.rst:308 +#: howto/functional.rst:307 msgid "" "Files also support iteration by calling the :meth:`~io.TextIOBase.readline` " "method until there are no more lines in the file. This means you can read " @@ -615,7 +615,7 @@ msgstr "" "fichier. Cela signifie que vous pouvez lire l'intégralité d'un fichier de la " "façon suivante ::" -#: howto/functional.rst:316 +#: howto/functional.rst:315 msgid "" "Sets can take their contents from an iterable and let you iterate over the " "set's elements::" @@ -623,11 +623,11 @@ msgstr "" "Les ensembles peuvent être créés à partir d'un itérable et autorisent " "l'itération sur les éléments de l'ensemble ::" -#: howto/functional.rst:326 +#: howto/functional.rst:325 msgid "Generator expressions and list comprehensions" msgstr "Expressions génératrices et compréhension de listes" -#: howto/functional.rst:328 +#: howto/functional.rst:327 msgid "" "Two common operations on an iterator's output are 1) performing some " "operation for every element, 2) selecting a subset of elements that meet " @@ -642,7 +642,7 @@ msgstr "" "caractères blancs à la fin de chaque ligne ou extraire toutes les chaînes " "contenant une sous-chaîne précise." -#: howto/functional.rst:334 +#: howto/functional.rst:333 msgid "" "List comprehensions and generator expressions (short form: \"listcomps\" and " "\"genexps\") are a concise notation for such operations, borrowed from the " @@ -655,14 +655,14 @@ msgstr "" "retirer tous les caractères blancs initiaux et finaux d'un flux de chaînes " "de caractères à l'aide du code suivant ::" -#: howto/functional.rst:347 +#: howto/functional.rst:346 msgid "" "You can select only certain elements by adding an ``\"if\"`` condition::" msgstr "" "Vous pouvez ne sélectionner que certains éléments en ajoutant une condition " "« ``if`` » ::" -#: howto/functional.rst:352 +#: howto/functional.rst:351 msgid "" "With a list comprehension, you get back a Python list; ``stripped_list`` is " "a list containing the resulting lines, not an iterator. Generator " @@ -680,7 +680,7 @@ msgstr "" "sur des itérateurs infinis ou produisant une très grande quantité de " "données. Les expressions génératrices sont préférables dans ce cas." -#: howto/functional.rst:359 +#: howto/functional.rst:358 msgid "" "Generator expressions are surrounded by parentheses (\"()\") and list " "comprehensions are surrounded by square brackets (\"[]\"). Generator " @@ -690,7 +690,7 @@ msgstr "" "compréhensions de listes entre crochets (« [] »). Les expressions " "génératrices sont de la forme ::" -#: howto/functional.rst:372 +#: howto/functional.rst:371 msgid "" "Again, for a list comprehension only the outside brackets are different " "(square brackets instead of parentheses)." @@ -698,7 +698,7 @@ msgstr "" "La compréhension de liste équivalente s'écrit de la même manière, utilisez " "juste des crochets à la place des parenthèses." -#: howto/functional.rst:375 +#: howto/functional.rst:374 msgid "" "The elements of the generated output will be the successive values of " "``expression``. The ``if`` clauses are all optional; if present, " @@ -709,7 +709,7 @@ msgstr "" "clause ``if`` est facultative ; si elle est présente, ``expression`` n'est " "évaluée et ajoutée au résultat que si ``condition`` est vérifiée." -#: howto/functional.rst:379 +#: howto/functional.rst:378 msgid "" "Generator expressions always have to be written inside parentheses, but the " "parentheses signalling a function call also count. If you want to create an " @@ -720,7 +720,7 @@ msgstr "" "comptent aussi. Si vous souhaitez créer un itérateur qui soit immédiatement " "passé à une fonction, vous pouvez écrire ::" -#: howto/functional.rst:385 +#: howto/functional.rst:384 msgid "" "The ``for...in`` clauses contain the sequences to be iterated over. The " "sequences do not have to be the same length, because they are iterated over " @@ -736,7 +736,7 @@ msgstr "" "parcourue dans son intégralité pour chaque paire d'éléments de ``sequence1`` " "et ``sequence2``." -#: howto/functional.rst:391 +#: howto/functional.rst:390 msgid "" "To put it another way, a list comprehension or generator expression is " "equivalent to the following Python code::" @@ -744,7 +744,7 @@ msgstr "" "Autrement dit, une compréhension de liste ou une expression génératrice est " "équivalente au code Python ci-dessous ::" -#: howto/functional.rst:408 +#: howto/functional.rst:407 msgid "" "This means that when there are multiple ``for...in`` clauses but no ``if`` " "clauses, the length of the resulting output will be equal to the product of " @@ -756,7 +756,7 @@ msgstr "" "produit des longueurs des séquences itérées. Si vous travaillez sur deux " "listes de longueur 3, la sortie contiendra 9 éléments :" -#: howto/functional.rst:420 +#: howto/functional.rst:419 msgid "" "To avoid introducing an ambiguity into Python's grammar, if ``expression`` " "is creating a tuple, it must be surrounded with parentheses. The first list " @@ -767,11 +767,11 @@ msgstr "" "uplet. La première compréhension de liste ci-dessous n'est pas valide " "syntaxiquement, tandis que la seconde l'est ::" -#: howto/functional.rst:431 +#: howto/functional.rst:430 msgid "Generators" msgstr "Générateurs" -#: howto/functional.rst:433 +#: howto/functional.rst:432 msgid "" "Generators are a special class of functions that simplify the task of " "writing iterators. Regular functions compute a value and return it, but " @@ -782,7 +782,7 @@ msgstr "" "renvoie, tandis que les générateurs renvoient un itérateur qui produit un " "flux de valeurs." -#: howto/functional.rst:437 +#: howto/functional.rst:436 msgid "" "You're doubtless familiar with how regular function calls work in Python or " "C. When you call a function, it gets a private namespace where its local " @@ -807,11 +807,11 @@ msgstr "" "s'agit de fonctions qu'il est possible d'interrompre, puis de relancer sans " "perdre leur progression." -#: howto/functional.rst:446 +#: howto/functional.rst:445 msgid "Here's the simplest example of a generator function:" msgstr "Voici un exemple simple de fonction génératrice :" -#: howto/functional.rst:452 +#: howto/functional.rst:451 msgid "" "Any function containing a :keyword:`yield` keyword is a generator function; " "this is detected by Python's :term:`bytecode` compiler which compiles the " @@ -821,7 +821,7 @@ msgstr "" "générateur ; le compilateur :term:`bytecode` de Python détecte ce mot-clé et " "prend en compte cette particularité de la fonction." -#: howto/functional.rst:456 +#: howto/functional.rst:455 msgid "" "When you call a generator function, it doesn't return a single value; " "instead it returns a generator object that supports the iterator protocol. " @@ -841,11 +841,11 @@ msgstr "" "locales sont conservées. Lors de l'appel suivant à la méthode :meth:" "`~generator.__next__` du générateur, la fonction reprend son exécution." -#: howto/functional.rst:465 +#: howto/functional.rst:464 msgid "Here's a sample usage of the ``generate_ints()`` generator:" msgstr "Voici un exemple d'utilisation du générateur ``generate_ints()`` :" -#: howto/functional.rst:482 +#: howto/functional.rst:481 msgid "" "You could equally write ``for i in generate_ints(5)``, or ``a, b, c = " "generate_ints(3)``." @@ -853,20 +853,20 @@ msgstr "" "Vous pourriez de façon équivalente écrire ``for i in generate_ints(5)`` ou " "``a, b, c = generate_ints(3)``." -#: howto/functional.rst:485 +#: howto/functional.rst:484 msgid "" "Inside a generator function, ``return value`` causes " "``StopIteration(value)`` to be raised from the :meth:`~generator.__next__` " "method. Once this happens, or the bottom of the function is reached, the " "procession of values ends and the generator cannot yield any further values." msgstr "" -"Dans une fonction génératrice, une instruction ``return value`` entraine la " +"Dans une fonction génératrice, une instruction ``return value`` entraîne la " "levée d'une exception ``StopIteration(value)`` dans la méthode :meth:" "`~generator.__next__`. Lorsque cela se produit (ou que la fin de la fonction " "est atteinte), le flot de nouvelles valeurs s'arrête et le générateur ne " "peut plus rien produire." -#: howto/functional.rst:490 +#: howto/functional.rst:489 msgid "" "You could achieve the effect of generators manually by writing your own " "class and storing all the local variables of the generator as instance " @@ -883,7 +883,7 @@ msgstr "" "le renvoie. Cependant, cela devient beaucoup plus complexe pour des " "générateurs relativement sophistiqués." -#: howto/functional.rst:498 +#: howto/functional.rst:497 msgid "" "The test suite included with Python's library, :source:`Lib/test/" "test_generators.py`, contains a number of more interesting examples. Here's " @@ -895,7 +895,7 @@ msgstr "" "implémente le parcours d'un arbre dans l'ordre en utilisant des générateurs " "de façon récursive. ::" -#: howto/functional.rst:514 +#: howto/functional.rst:513 msgid "" "Two other examples in ``test_generators.py`` produce solutions for the N-" "Queens problem (placing N queens on an NxN chess board so that no queen " @@ -910,11 +910,11 @@ msgstr "" "de visiter toutes les cases d'un échiquier *NxN* sans jamais visiter la même " "case deux fois)." -#: howto/functional.rst:522 +#: howto/functional.rst:521 msgid "Passing values into a generator" msgstr "Transmettre des valeurs au générateur" -#: howto/functional.rst:524 +#: howto/functional.rst:523 msgid "" "In Python 2.4 and earlier, generators only produced output. Once a " "generator's code was invoked to create an iterator, there was no way to pass " @@ -930,7 +930,7 @@ msgstr "" "générateur à consulter des variables globales ou en lui passant des objets " "mutables modifiés hors du générateur, mais ces approches étaient compliquées." -#: howto/functional.rst:531 +#: howto/functional.rst:530 msgid "" "In Python 2.5 there's a simple way to pass values into a generator. :keyword:" "`yield` became an expression, returning a value that can be assigned to a " @@ -941,7 +941,7 @@ msgstr "" "expression qui renvoie une valeur sur laquelle il est possible d'opérer et " "que vous pouvez assigner à une variable ::" -#: howto/functional.rst:537 +#: howto/functional.rst:536 msgid "" "I recommend that you **always** put parentheses around a ``yield`` " "expression when you're doing something with the returned value, as in the " @@ -955,7 +955,7 @@ msgstr "" "systématiquement que de prendre le risque de les oublier là où elles sont " "requises." -#: howto/functional.rst:542 +#: howto/functional.rst:541 msgid "" "(:pep:`342` explains the exact rules, which are that a ``yield``-expression " "must always be parenthesized except when it occurs at the top-level " @@ -969,7 +969,7 @@ msgstr "" "que vous pouvez écrire ``val = yield i`` mais que les parenthèses sont " "requises s'il y a une opération, comme dans ``val = (yield i) + 12``.)" -#: howto/functional.rst:548 +#: howto/functional.rst:547 msgid "" "Values are sent into a generator by calling its :meth:`send(value) " "` method. This method resumes the generator's code and the " @@ -982,7 +982,7 @@ msgstr "" "la méthode :meth:`~generator.__next__` habituelle qui est appelée, alors " "``yield`` renvoie ``None``." -#: howto/functional.rst:553 +#: howto/functional.rst:552 msgid "" "Here's a simple counter that increments by 1 and allows changing the value " "of the internal counter." @@ -990,11 +990,11 @@ msgstr "" "Voici un exemple de compteur qui s'incrémente de 1 mais dont il est possible " "de modifier le compte interne." -#: howto/functional.rst:568 +#: howto/functional.rst:567 msgid "And here's an example of changing the counter:" msgstr "Et voici comment il est possible de modifier le compteur :" -#: howto/functional.rst:585 +#: howto/functional.rst:584 msgid "" "Because ``yield`` will often be returning ``None``, you should always check " "for this case. Don't just use its value in expressions unless you're sure " @@ -1006,7 +1006,7 @@ msgstr "" "seule la méthode :meth:`~generator.send` sera utilisée pour reprendre " "l'exécution de la fonction génératrice." -#: howto/functional.rst:590 +#: howto/functional.rst:589 msgid "" "In addition to :meth:`~generator.send`, there are two other methods on " "generators:" @@ -1015,17 +1015,17 @@ msgstr "" "s'appliquant aux générateurs :" # Énumération -#: howto/functional.rst:593 +#: howto/functional.rst:592 msgid "" -":meth:`throw(type, value=None, traceback=None) ` is used to " -"raise an exception inside the generator; the exception is raised by the " -"``yield`` expression where the generator's execution is paused." +":meth:`throw(value) ` is used to raise an exception inside " +"the generator; the exception is raised by the ``yield`` expression where the " +"generator's execution is paused." msgstr "" -":meth:`throw(type, value=None, traceback=None) ` permet de " -"lever une exception dans le générateur ; celle-ci est levée par l'expression " -"``yield`` à l'endroit où l'exécution a été mise en pause ;" +":meth:`throw(value) ` permet de lever une exception dans le " +"générateur ; celle-ci est levée par l'expression ``yield`` à l'endroit où " +"l'exécution a été mise en pause." -#: howto/functional.rst:597 +#: howto/functional.rst:596 msgid "" ":meth:`~generator.close` raises a :exc:`GeneratorExit` exception inside the " "generator to terminate the iteration. On receiving this exception, the " @@ -1043,7 +1043,7 @@ msgstr "" "le ramasse-miette de Python collecte le générateur, il appelle sa méthode :" "meth:`~generator.close`." -#: howto/functional.rst:605 +#: howto/functional.rst:604 msgid "" "If you need to run cleanup code when a :exc:`GeneratorExit` occurs, I " "suggest using a ``try: ... finally:`` suite instead of catching :exc:" @@ -1053,7 +1053,7 @@ msgstr "" "`GeneratorExit`, nous vous suggérons d'utiliser une structure ``try: ... " "finally`` plutôt que d'attraper :exc:`GeneratorExit`." -#: howto/functional.rst:608 +#: howto/functional.rst:607 msgid "" "The cumulative effect of these changes is to turn generators from one-way " "producers of information into both producers and consumers." @@ -1062,7 +1062,7 @@ msgstr "" "unidirectionnels d'information vers un statut hybride à la fois producteur " "et consommateur." -#: howto/functional.rst:611 +#: howto/functional.rst:610 msgid "" "Generators also become **coroutines**, a more generalized form of " "subroutines. Subroutines are entered at one point and exited at another " @@ -1077,18 +1077,18 @@ msgstr "" "de reprendre une coroutine à différents endroits (les instructions " "``yield``)." -#: howto/functional.rst:618 +#: howto/functional.rst:617 msgid "Built-in functions" msgstr "Fonctions natives" -#: howto/functional.rst:620 +#: howto/functional.rst:619 msgid "" "Let's look in more detail at built-in functions often used with iterators." msgstr "" "Voyons un peu plus en détail les fonctions natives souvent utilisées de " "concert avec les itérateurs." -#: howto/functional.rst:622 +#: howto/functional.rst:621 msgid "" "Two of Python's built-in functions, :func:`map` and :func:`filter` duplicate " "the features of generator expressions:" @@ -1096,25 +1096,25 @@ msgstr "" ":func:`map` et :func:`filter` sont deux fonctions natives de Python qui " "clonent les propriétés des expressions génératrices :" -#: howto/functional.rst:634 +#: howto/functional.rst:633 msgid "" ":func:`map(f, iterA, iterB, ...) ` returns an iterator over the sequence" msgstr "" ":func:`map(f, iterA, iterB, ...) ` renvoie un itérateur sur une séquence" -#: howto/functional.rst:626 +#: howto/functional.rst:625 msgid "" "``f(iterA[0], iterB[0]), f(iterA[1], iterB[1]), f(iterA[2], iterB[2]), ...``." msgstr "" "``f(iterA[0], iterB[0]), f(iterA[1], iterB[1]), f(iterA[2], iterB[2]), ...``." -#: howto/functional.rst:636 +#: howto/functional.rst:635 msgid "You can of course achieve the same effect with a list comprehension." msgstr "" "Vous pouvez obtenir le même comportement à l'aide d'une compréhension de " "liste." -#: howto/functional.rst:638 +#: howto/functional.rst:637 msgid "" ":func:`filter(predicate, iter) ` returns an iterator over all the " "sequence elements that meet a certain condition, and is similarly duplicated " @@ -1129,11 +1129,11 @@ msgstr "" "certaine condition. Dans le cas de :func:`filter`, le prédicat ne doit " "prendre qu'un seul argument." -#: howto/functional.rst:651 +#: howto/functional.rst:650 msgid "This can also be written as a list comprehension:" msgstr "Cela peut se réécrire sous la forme d'une compréhension de liste :" -#: howto/functional.rst:657 +#: howto/functional.rst:656 msgid "" ":func:`enumerate(iter, start=0) ` counts off the elements in the " "iterable returning 2-tuples containing the count (from *start*) and each " @@ -1143,7 +1143,7 @@ msgstr "" "l'itérable en renvoyant des paires contenant le nombre d'éléments déjà " "listés (depuis le *début*) et l'élément en cours ::" -#: howto/functional.rst:667 +#: howto/functional.rst:666 msgid "" ":func:`enumerate` is often used when looping through a list and recording " "the indexes at which certain conditions are met::" @@ -1152,7 +1152,7 @@ msgstr "" "liste tout en listant les indices pour lesquels une certaine condition est " "vérifiée ::" -#: howto/functional.rst:675 +#: howto/functional.rst:674 msgid "" ":func:`sorted(iterable, key=None, reverse=False) ` collects all the " "elements of the iterable into a list, sorts the list, and returns the sorted " @@ -1164,14 +1164,14 @@ msgstr "" "classé. Les arguments *key* et *reverse* sont passés à la méthode :meth:" "`~list.sort` de la liste ainsi construite. ::" -#: howto/functional.rst:690 +#: howto/functional.rst:689 msgid "" "(For a more detailed discussion of sorting, see the :ref:`sortinghowto`.)" msgstr "" "(Pour plus de détails sur les algorithmes de tri, se référer à :ref:" "`sortinghowto`.)" -#: howto/functional.rst:693 +#: howto/functional.rst:692 msgid "" "The :func:`any(iter) ` and :func:`all(iter) ` built-ins look at " "the truth values of an iterable's contents. :func:`any` returns ``True`` if " @@ -1184,7 +1184,7 @@ msgstr "" "comme vrai et :func:`all` renvoie ``True`` si tous les éléments s'évaluent " "comme vrai :" -#: howto/functional.rst:712 +#: howto/functional.rst:711 msgid "" ":func:`zip(iterA, iterB, ...) ` takes one element from each iterable " "and returns them in a tuple::" @@ -1192,7 +1192,7 @@ msgstr "" ":func:`zip(iterA, iterB, ...) ` rassemble un élément de chaque itérable " "dans un *n*-uplet ::" -#: howto/functional.rst:718 +#: howto/functional.rst:717 msgid "" "It doesn't construct an in-memory list and exhaust all the input iterators " "before returning; instead tuples are constructed and returned only if " @@ -1205,7 +1205,7 @@ msgstr "" "d'un comportement d'`évaluation paresseuse `__)." -#: howto/functional.rst:723 +#: howto/functional.rst:722 msgid "" "This iterator is intended to be used with iterables that are all of the same " "length. If the iterables are of different lengths, the resulting stream " @@ -1215,7 +1215,7 @@ msgstr "" "longueur des itérables diffère, le flux résultant a la même longueur que le " "plus court des itérables. ::" -#: howto/functional.rst:730 +#: howto/functional.rst:729 msgid "" "You should avoid doing this, though, because an element may be taken from " "the longer iterators and discarded. This means you can't go on to use the " @@ -1227,11 +1227,11 @@ msgstr "" "plus utiliser cet itérable car vous allez sauter l'élément qui vient d'être " "jeté." -#: howto/functional.rst:736 +#: howto/functional.rst:735 msgid "The itertools module" msgstr "Le module *itertools*" -#: howto/functional.rst:738 +#: howto/functional.rst:737 msgid "" "The :mod:`itertools` module contains a number of commonly-used iterators as " "well as functions for combining several iterators. This section will " @@ -1241,40 +1241,40 @@ msgstr "" "ainsi que des fonctions pour combiner différents itérateurs. Cette section " "présente le contenu du module au travers de quelques exemples." -#: howto/functional.rst:742 +#: howto/functional.rst:741 msgid "The module's functions fall into a few broad classes:" msgstr "Les fonctions du module se divisent en quelques grandes catégories :" # Énumération -#: howto/functional.rst:744 +#: howto/functional.rst:743 msgid "Functions that create a new iterator based on an existing iterator." msgstr "" "les fonctions qui transforment un itérateur existant en un nouvel itérateur ;" # Énumération -#: howto/functional.rst:745 +#: howto/functional.rst:744 msgid "Functions for treating an iterator's elements as function arguments." msgstr "" "les fonctions qui traitent les éléments d'un itérateur comme les arguments " "d'une fonction ;" # Énumération -#: howto/functional.rst:746 +#: howto/functional.rst:745 msgid "Functions for selecting portions of an iterator's output." msgstr "" "les fonctions qui permettent de sélectionner des portions de la sortie d'un " "itérateur ;" # Énumération -#: howto/functional.rst:747 +#: howto/functional.rst:746 msgid "A function for grouping an iterator's output." msgstr "une fonction qui permet de grouper la sortie d'un itérateur." -#: howto/functional.rst:750 +#: howto/functional.rst:749 msgid "Creating new iterators" msgstr "Créer de nouveaux itérateurs" -#: howto/functional.rst:752 +#: howto/functional.rst:751 msgid "" ":func:`itertools.count(start, step) ` returns an infinite " "stream of evenly spaced values. You can optionally supply the starting " @@ -1285,7 +1285,7 @@ msgstr "" "infini de valeurs régulièrement espacées. Vous pouvez spécifier la valeur de " "départ (par défaut, 0) et l'intervalle entre les nombres (par défaut, 1) ::" -#: howto/functional.rst:763 +#: howto/functional.rst:762 msgid "" ":func:`itertools.cycle(iter) ` saves a copy of the contents " "of a provided iterable and returns a new iterator that returns its elements " @@ -1296,7 +1296,7 @@ msgstr "" "contenu de l'itérable passé en argument et renvoie un nouvel itérateur qui " "produit tous les éléments du premier au dernier et se répète indéfiniment. ::" -#: howto/functional.rst:770 +#: howto/functional.rst:769 msgid "" ":func:`itertools.repeat(elem, [n]) ` returns the provided " "element *n* times, or returns the element endlessly if *n* is not " @@ -1306,7 +1306,7 @@ msgstr "" "passé en argument *n* fois ou répète l'élément à l'infini si *n* n'est pas " "spécifié. ::" -#: howto/functional.rst:778 +#: howto/functional.rst:777 msgid "" ":func:`itertools.chain(iterA, iterB, ...) ` takes an " "arbitrary number of iterables as input, and returns all the elements of the " @@ -1318,7 +1318,7 @@ msgstr "" "éléments du premier itérateur, puis tous ceux du second et ainsi de suite " "jusqu'à ce que tous les itérables aient été épuisés. ::" -#: howto/functional.rst:786 +#: howto/functional.rst:785 msgid "" ":func:`itertools.islice(iter, [start], stop, [step]) ` " "returns a stream that's a slice of the iterator. With a single *stop* " @@ -1336,7 +1336,7 @@ msgstr "" "pour *start*, *stop* ou *step* (contrairement aux listes et chaînes de " "caractères de Python). ::" -#: howto/functional.rst:800 +#: howto/functional.rst:799 msgid "" ":func:`itertools.tee(iter, [n]) ` replicates an iterator; it " "returns *n* independent iterators that will all return the contents of the " @@ -1352,11 +1352,11 @@ msgstr "" "source, ce qui peut consommer beaucoup de mémoire si l'itérateur est grand " "et que l'un des nouveaux itérateurs est plus consommé que les autres. ::" -#: howto/functional.rst:819 +#: howto/functional.rst:818 msgid "Calling functions on elements" msgstr "Appliquer des fonctions au contenu des itérateurs" -#: howto/functional.rst:821 +#: howto/functional.rst:820 msgid "" "The :mod:`operator` module contains a set of functions corresponding to " "Python's operators. Some examples are :func:`operator.add(a, b) ` renvoie un objet appelable qui récupère l'attribut ``.id``." -#: howto/functional.rst:827 +#: howto/functional.rst:826 msgid "" ":func:`itertools.starmap(func, iter) ` assumes that the " "iterable will return a stream of tuples, and calls *func* using these tuples " @@ -1380,11 +1380,11 @@ msgstr "" "l'itérable renvoie une séquence de *n*-uplets et appelle *func* en utilisant " "tous les *n*-uplets comme arguments ::" -#: howto/functional.rst:839 +#: howto/functional.rst:838 msgid "Selecting elements" msgstr "Sélectionner des éléments" -#: howto/functional.rst:841 +#: howto/functional.rst:840 msgid "" "Another group of functions chooses a subset of an iterator's elements based " "on a predicate." @@ -1392,7 +1392,7 @@ msgstr "" "Une autre catégorie de fonctions est celle permettant de sélectionner un " "sous-ensemble des éléments de l'itérateur selon un prédicat donné." -#: howto/functional.rst:844 +#: howto/functional.rst:843 msgid "" ":func:`itertools.filterfalse(predicate, iter) ` is " "the opposite of :func:`filter`, returning all elements for which the " @@ -1402,7 +1402,7 @@ msgstr "" "l'opposé de :func:`filter` et renvoie tous les éléments pour lesquels le " "prédicat est faux ::" -#: howto/functional.rst:851 +#: howto/functional.rst:850 msgid "" ":func:`itertools.takewhile(predicate, iter) ` returns " "elements for as long as the predicate returns true. Once the predicate " @@ -1412,7 +1412,7 @@ msgstr "" "les éléments de l'itérateur tant que ceux-ci vérifient le prédicat. Dès lors " "que le prédicat renvoie faux, l'itération s'arrête. ::" -#: howto/functional.rst:864 +#: howto/functional.rst:863 msgid "" ":func:`itertools.dropwhile(predicate, iter) ` discards " "elements while the predicate returns true, and then returns the rest of the " @@ -1422,7 +1422,7 @@ msgstr "" "des éléments tant que le prédicat renvoie vrai puis renvoie le reste des " "éléments de l'itérable. ::" -#: howto/functional.rst:874 +#: howto/functional.rst:873 msgid "" ":func:`itertools.compress(data, selectors) ` takes two " "iterators and returns only those elements of *data* for which the " @@ -1434,11 +1434,11 @@ msgstr "" "*data* pour lesquels l'élément correspondant de *selectors* est évalué à " "vrai. L'itération s'arrête lorsque l'un des deux itérateurs est épuisé ::" -#: howto/functional.rst:883 +#: howto/functional.rst:882 msgid "Combinatoric functions" msgstr "Fonctions combinatoires" -#: howto/functional.rst:885 +#: howto/functional.rst:884 msgid "" "The :func:`itertools.combinations(iterable, r) ` " "returns an iterator giving all possible *r*-tuple combinations of the " @@ -1448,7 +1448,7 @@ msgstr "" "un itérateur qui produit toutes les combinaisons possibles de *r*-uplets des " "éléments de *iterable*. ::" -#: howto/functional.rst:900 +#: howto/functional.rst:899 msgid "" "The elements within each tuple remain in the same order as *iterable* " "returned them. For example, the number 1 is always before 2, 3, 4, or 5 in " @@ -1463,7 +1463,7 @@ msgstr "" "contrainte sur l'ordre et renvoie tous les arrangements possibles de " "longueur *r* ::" -#: howto/functional.rst:919 +#: howto/functional.rst:918 msgid "" "If you don't supply a value for *r* the length of the iterable is used, " "meaning that all the elements are permuted." @@ -1472,7 +1472,7 @@ msgstr "" "utilisée par défaut, c'est-à-dire que toutes les permutations de la séquence " "sont renvoyées." -#: howto/functional.rst:922 +#: howto/functional.rst:921 msgid "" "Note that these functions produce all of the possible combinations by " "position and don't require that the contents of *iterable* are unique::" @@ -1481,7 +1481,7 @@ msgstr "" "basant sur la position des éléments et ne requièrent pas que les éléments de " "*iterable* soient uniques ::" -#: howto/functional.rst:929 +#: howto/functional.rst:928 msgid "" "The identical tuple ``('a', 'a', 'b')`` occurs twice, but the two 'a' " "strings came from different positions." @@ -1489,7 +1489,7 @@ msgstr "" "Le triplet ``('a', 'a', 'b')`` apparaît deux fois mais les deux chaînes de " "caractères ``'a'`` proviennent de deux positions différentes." -#: howto/functional.rst:932 +#: howto/functional.rst:931 msgid "" "The :func:`itertools.combinations_with_replacement(iterable, r) ` function relaxes a different constraint: " @@ -1503,11 +1503,11 @@ msgstr "" "tirage avec remise : le premier élément sélectionné pour chaque *n*-uplet " "est replacé dans la séquence avant le tirage du deuxième. ::" -#: howto/functional.rst:947 +#: howto/functional.rst:946 msgid "Grouping elements" msgstr "Grouper les éléments" -#: howto/functional.rst:949 +#: howto/functional.rst:948 msgid "" "The last function I'll discuss, :func:`itertools.groupby(iter, " "key_func=None) `, is the most complicated. " @@ -1522,7 +1522,7 @@ msgstr "" "l'identité par défaut (c'est-à-dire que la clé d'un élément est l'élément " "lui-même)." -#: howto/functional.rst:954 +#: howto/functional.rst:953 msgid "" ":func:`~itertools.groupby` collects all the consecutive elements from the " "underlying iterable that have the same key value, and returns a stream of 2-" @@ -1532,7 +1532,7 @@ msgstr "" "sous-jacent qui ont la même clé et renvoie un flux de paires contenant la " "clé et un itérateur produisant la liste des éléments pour cette clé." -#: howto/functional.rst:982 +#: howto/functional.rst:981 msgid "" ":func:`~itertools.groupby` assumes that the underlying iterable's contents " "will already be sorted based on the key. Note that the returned iterators " @@ -1547,11 +1547,11 @@ msgstr "" "itérateur (*iterator-2* dans l'exemple ci-dessus) et la clé à laquelle il " "est associé." -#: howto/functional.rst:989 +#: howto/functional.rst:988 msgid "The functools module" msgstr "Le module *functools*" -#: howto/functional.rst:991 +#: howto/functional.rst:990 msgid "" "The :mod:`functools` module in Python 2.5 contains some higher-order " "functions. A **higher-order function** takes one or more functions as input " @@ -1563,7 +1563,7 @@ msgstr "" "plusieurs fonctions en entrée et renvoie une fonction. L'outil le plus " "important de ce module est la fonction :func:`functools.partial`." -#: howto/functional.rst:996 +#: howto/functional.rst:995 msgid "" "For programs written in a functional style, you'll sometimes want to " "construct variants of existing functions that have some of the parameters " @@ -1577,9 +1577,9 @@ msgstr "" "sont prédéfinis. Par exemple, considérons une fonction Python ``f(a, b, " "c)``. Si vous voulez une nouvelle fonction ``g(b, c)`` équivalente à ``f(1, " "b, c)``, c'est-à-dire fixer le premier paramètre de ``f()``. La fonction " -"``g()`` est une appelée « application partielle » de ``f()``." +"``g()`` est une appelée « application partielle » de ``f()``." -#: howto/functional.rst:1002 +#: howto/functional.rst:1001 msgid "" "The constructor for :func:`~functools.partial` takes the arguments " "``(function, arg1, arg2, ..., kwarg1=value1, kwarg2=value2)``. The " @@ -1590,11 +1590,11 @@ msgstr "" "arg1, arg2, ..., kwarg1=value1, kwarg2=value2, ...)``. Un appel à l'objet " "ainsi créé invoque la fonction ``fonction`` avec les arguments spécifiés." -#: howto/functional.rst:1007 +#: howto/functional.rst:1006 msgid "Here's a small but realistic example::" msgstr "Voici un exemple court mais réaliste ::" -#: howto/functional.rst:1019 +#: howto/functional.rst:1018 msgid "" ":func:`functools.reduce(func, iter, [initial_value]) ` " "cumulatively performs an operation on all the iterable's elements and, " @@ -1620,7 +1620,7 @@ msgstr "" "La valeur initiale *initial_value*, si spécifiée, est utilisée comme point " "de départ et le premier calcul est alors ``func(inital_value, A)``. ::" -#: howto/functional.rst:1043 +#: howto/functional.rst:1042 msgid "" "If you use :func:`operator.add` with :func:`functools.reduce`, you'll add up " "all the elements of the iterable. This case is so common that there's a " @@ -1631,7 +1631,7 @@ msgstr "" "courant pour qu'il existe une fonction native :func:`sum` qui lui est " "équivalent :" -#: howto/functional.rst:1055 +#: howto/functional.rst:1054 msgid "" "For many uses of :func:`functools.reduce`, though, it can be clearer to just " "write the obvious :keyword:`for` loop::" @@ -1640,7 +1640,7 @@ msgstr "" "impliquant :func:`functools.reduce` de simplement écrire la boucle :keyword:" "`for` ::" -#: howto/functional.rst:1067 +#: howto/functional.rst:1066 msgid "" "A related function is :func:`itertools.accumulate(iterable, func=operator." "add) `. It performs the same calculation, but instead " @@ -1653,11 +1653,11 @@ msgstr "" "renvoie un itérateur qui génère la séquence de tous les résultats " "intermédiaires ::" -#: howto/functional.rst:1080 +#: howto/functional.rst:1079 msgid "The operator module" msgstr "Le module *operator*" -#: howto/functional.rst:1082 +#: howto/functional.rst:1081 msgid "" "The :mod:`operator` module was mentioned earlier. It contains a set of " "functions corresponding to Python's operators. These functions are often " @@ -1669,12 +1669,12 @@ msgstr "" "utiles en programmation fonctionnelle car elles permettent de ne pas avoir à " "écrire des fonctions triviales qui ne réalisent qu'une seule opération." -#: howto/functional.rst:1087 +#: howto/functional.rst:1086 msgid "Some of the functions in this module are:" msgstr "Voici quelques fonctions de ce module :" # Énumération -#: howto/functional.rst:1089 +#: howto/functional.rst:1088 msgid "" "Math operations: ``add()``, ``sub()``, ``mul()``, ``floordiv()``, " "``abs()``, ..." @@ -1683,17 +1683,17 @@ msgstr "" "``floordiv()``, ``abs()``… ;" # Énumération -#: howto/functional.rst:1090 +#: howto/functional.rst:1089 msgid "Logical operations: ``not_()``, ``truth()``." msgstr "les opérations logiques : ``not_()``, ``truth()`` ;" # Énumération -#: howto/functional.rst:1091 +#: howto/functional.rst:1090 msgid "Bitwise operations: ``and_()``, ``or_()``, ``invert()``." msgstr "les opérations bit à bit : ``and_()``, ``or_()``, ``invert()`` ;" # Énumération -#: howto/functional.rst:1092 +#: howto/functional.rst:1091 msgid "" "Comparisons: ``eq()``, ``ne()``, ``lt()``, ``le()``, ``gt()``, and ``ge()``." msgstr "" @@ -1701,21 +1701,21 @@ msgstr "" "``ge()`` ;" # Énumération -#: howto/functional.rst:1093 +#: howto/functional.rst:1092 msgid "Object identity: ``is_()``, ``is_not()``." msgstr "l'identification des objets : ``is_()``, ``is_not()``." -#: howto/functional.rst:1095 +#: howto/functional.rst:1094 msgid "Consult the operator module's documentation for a complete list." msgstr "" "Veuillez vous référer à la documentation du module *operator* pour une liste " "complète." -#: howto/functional.rst:1099 +#: howto/functional.rst:1098 msgid "Small functions and the lambda expression" msgstr "Expressions lambda et fonctions courtes" -#: howto/functional.rst:1101 +#: howto/functional.rst:1100 msgid "" "When writing functional-style programs, you'll often need little functions " "that act as predicates or that combine elements in some way." @@ -1724,7 +1724,7 @@ msgstr "" "petites fonctions utilisées comme prédicats ou pour combiner des éléments " "d'une façon ou d'une autre." -#: howto/functional.rst:1104 +#: howto/functional.rst:1103 msgid "" "If there's a Python built-in or a module function that's suitable, you don't " "need to define a new function at all::" @@ -1732,7 +1732,7 @@ msgstr "" "S'il existe une fonction native Python ou une fonction d'un module qui " "convient, vous n'avez pas besoin de définir de nouvelle fonction ::" -#: howto/functional.rst:1110 +#: howto/functional.rst:1109 msgid "" "If the function you need doesn't exist, you need to write it. One way to " "write small functions is to use the :keyword:`lambda` expression. " @@ -1746,7 +1746,7 @@ msgstr "" "combinant ces derniers afin de créer une fonction anonyme qui renvoie la " "valeur de cette expression ::" -#: howto/functional.rst:1119 +#: howto/functional.rst:1118 msgid "" "An alternative is to just use the ``def`` statement and define a function in " "the usual way::" @@ -1754,7 +1754,7 @@ msgstr "" "Une autre façon de faire est de simplement utiliser l'instruction ``def`` " "afin de définir une fonction de la manière habituelle ::" -#: howto/functional.rst:1128 +#: howto/functional.rst:1127 msgid "" "Which alternative is preferable? That's a style question; my usual course " "is to avoid using ``lambda``." @@ -1762,7 +1762,7 @@ msgstr "" "La méthode à préférer est une question de style, en général l'auteur évite " "l'utilisation de ``lambda``." -#: howto/functional.rst:1131 +#: howto/functional.rst:1130 msgid "" "One reason for my preference is that ``lambda`` is quite limited in the " "functions it can define. The result has to be computable as a single " @@ -1779,7 +1779,7 @@ msgstr "" "une expression illisible. Par exemple, pouvez-vous dire du premier coup " "d’œil ce que fait le code ci-dessous ? ::" -#: howto/functional.rst:1141 +#: howto/functional.rst:1140 msgid "" "You can figure it out, but it takes time to disentangle the expression to " "figure out what's going on. Using a short nested ``def`` statements makes " @@ -1789,18 +1789,18 @@ msgstr "" "de démêler l'expression pour y voir plus clair. Une clause ``def`` concise " "améliore la situation ::" -#: howto/functional.rst:1151 +#: howto/functional.rst:1150 msgid "But it would be best of all if I had simply used a ``for`` loop::" msgstr "" "Toutefois l'idéal aurait été de simplement se contenter d'une boucle " "``for`` ::" -#: howto/functional.rst:1157 +#: howto/functional.rst:1156 msgid "Or the :func:`sum` built-in and a generator expression::" msgstr "" "ou de la fonction native :func:`sum` et d'une expression génératrice ::" -#: howto/functional.rst:1161 +#: howto/functional.rst:1160 msgid "" "Many uses of :func:`functools.reduce` are clearer when written as ``for`` " "loops." @@ -1808,7 +1808,7 @@ msgstr "" "Les boucles ``for`` sont souvent plus lisibles que la fonction :func:" "`functools.reduce`." -#: howto/functional.rst:1163 +#: howto/functional.rst:1162 msgid "" "Fredrik Lundh once suggested the following set of rules for refactoring uses " "of ``lambda``:" @@ -1816,16 +1816,16 @@ msgstr "" "Frederik Lundh a suggéré quelques règles pour le réusinage de code " "impliquant les expressions ``lambda`` :" -#: howto/functional.rst:1166 +#: howto/functional.rst:1165 msgid "Write a lambda function." msgstr "Écrire une fonction lambda." -#: howto/functional.rst:1167 +#: howto/functional.rst:1166 msgid "Write a comment explaining what the heck that lambda does." msgstr "" "Écrire un commentaire qui explique ce que fait cette satanée fonction lambda." -#: howto/functional.rst:1168 +#: howto/functional.rst:1167 msgid "" "Study the comment for a while, and think of a name that captures the essence " "of the comment." @@ -1833,16 +1833,16 @@ msgstr "" "Scruter le commentaire pendant quelques temps et réfléchir à un nom qui " "synthétise son essence." -#: howto/functional.rst:1170 +#: howto/functional.rst:1169 msgid "Convert the lambda to a def statement, using that name." msgstr "" "Réécrire la fonction lambda en une définition *def* en utilisant ce nom." -#: howto/functional.rst:1171 +#: howto/functional.rst:1170 msgid "Remove the comment." msgstr "Effacer le commentaire." -#: howto/functional.rst:1173 +#: howto/functional.rst:1172 msgid "" "I really like these rules, but you're free to disagree about whether this " "lambda-free style is better." @@ -1850,11 +1850,11 @@ msgstr "" "J'aime beaucoup ces règles, mais vous êtes libre de ne pas être d'accord et " "de préférer un style avec des lambdas." -#: howto/functional.rst:1178 +#: howto/functional.rst:1177 msgid "Revision History and Acknowledgements" msgstr "Historique des modifications et remerciements" -#: howto/functional.rst:1180 +#: howto/functional.rst:1179 msgid "" "The author would like to thank the following people for offering " "suggestions, corrections and assistance with various drafts of this article: " @@ -1867,17 +1867,17 @@ msgstr "" "Jewett, Mike Krell, Leandro Lameiro, Jussi Salmela, Collin Winter, Blake " "Winton." -#: howto/functional.rst:1185 +#: howto/functional.rst:1184 msgid "Version 0.1: posted June 30 2006." msgstr "Version 0.1 : publiée le 30 juin 2006." -#: howto/functional.rst:1187 +#: howto/functional.rst:1186 msgid "Version 0.11: posted July 1 2006. Typo fixes." msgstr "" "Version 0.11 : publiée le 1\\ :sup:`er` juillet 2006. Correction " "orthographique." -#: howto/functional.rst:1189 +#: howto/functional.rst:1188 msgid "" "Version 0.2: posted July 10 2006. Merged genexp and listcomp sections into " "one. Typo fixes." @@ -1885,14 +1885,14 @@ msgstr "" "Version 0.2 : publiée le 10 juillet 2006. Fusion des sections *genexp* et " "*listcomp*. Correction orthographique." -#: howto/functional.rst:1192 +#: howto/functional.rst:1191 msgid "" "Version 0.21: Added more references suggested on the tutor mailing list." msgstr "" "Version 0.21 : ajout de plusieurs références suggérées sur la liste de " "diffusion *tutor*." -#: howto/functional.rst:1194 +#: howto/functional.rst:1193 msgid "" "Version 0.30: Adds a section on the ``functional`` module written by Collin " "Winter; adds short section on the operator module; a few other edits." @@ -1901,15 +1901,15 @@ msgstr "" "Collin Winter ; ajout d'une courte section sur le module ``operator`` ; " "quelques autres modifications." -#: howto/functional.rst:1199 +#: howto/functional.rst:1198 msgid "References" msgstr "Références" -#: howto/functional.rst:1202 +#: howto/functional.rst:1201 msgid "General" msgstr "Général" -#: howto/functional.rst:1204 +#: howto/functional.rst:1203 msgid "" "**Structure and Interpretation of Computer Programs**, by Harold Abelson and " "Gerald Jay Sussman with Julie Sussman. Full text at https://mitpress.mit." @@ -1927,7 +1927,7 @@ msgstr "" "utilisent le langage Scheme mais la plupart des approches décrites dans ces " "chapitres s'appliquent au style fonctionnel de Python." -#: howto/functional.rst:1212 +#: howto/functional.rst:1211 msgid "" "http://www.defmacro.org/ramblings/fp.html: A general introduction to " "functional programming that uses Java examples and has a lengthy historical " @@ -1937,7 +1937,7 @@ msgstr "" "programmation fonctionnelle avec une longue introduction historique et des " "exemples en Java." -#: howto/functional.rst:1215 +#: howto/functional.rst:1214 msgid "" "https://en.wikipedia.org/wiki/Functional_programming: General Wikipedia " "entry describing functional programming." @@ -1945,23 +1945,23 @@ msgstr "" "https://fr.wikipedia.org/wiki/Programmation_fonctionnelle : l'entrée " "Wikipédia qui décrit la programmation fonctionnelle." -#: howto/functional.rst:1218 +#: howto/functional.rst:1217 msgid "https://en.wikipedia.org/wiki/Coroutine: Entry for coroutines." msgstr "" "https://fr.wikipedia.org/wiki/Coroutine : l'entrée pour les coroutines." -#: howto/functional.rst:1220 +#: howto/functional.rst:1219 msgid "" "https://en.wikipedia.org/wiki/Currying: Entry for the concept of currying." msgstr "" "https://fr.wikipedia.org/wiki/Curryfication : l'entrée pour le concept de " "curryfication (création d'applications partielles)." -#: howto/functional.rst:1223 +#: howto/functional.rst:1222 msgid "Python-specific" msgstr "Spécifique à Python" -#: howto/functional.rst:1225 +#: howto/functional.rst:1224 msgid "" "http://gnosis.cx/TPiP/: The first chapter of David Mertz's book :title-" "reference:`Text Processing in Python` discusses functional programming for " @@ -1970,10 +1970,10 @@ msgid "" msgstr "" "http://gnosis.cx/TPiP/ : le premier chapitre du livre de David Mertz :title-" "reference:`Text Processing in Python` présente l'utilisation de la " -"programmation fonctionnelle pour le traitement de texte dans la section « " -"Utilisation des fonctions d'ordre supérieur pour le traitement de texte »." +"programmation fonctionnelle pour le traitement de texte dans la section " +"« Utilisation des fonctions d'ordre supérieur pour le traitement de texte »." -#: howto/functional.rst:1230 +#: howto/functional.rst:1229 msgid "" "Mertz also wrote a 3-part series of articles on functional programming for " "IBM's DeveloperWorks site; see `part 1 `__ et `partie 3 `__," -#: howto/functional.rst:1238 +#: howto/functional.rst:1237 msgid "Python documentation" msgstr "Documentation Python" -#: howto/functional.rst:1240 +#: howto/functional.rst:1239 msgid "Documentation for the :mod:`itertools` module." msgstr "Documentation du module :mod:`itertools`." -#: howto/functional.rst:1242 +#: howto/functional.rst:1241 msgid "Documentation for the :mod:`functools` module." msgstr "Documentation du module :mod:`functools`." -#: howto/functional.rst:1244 +#: howto/functional.rst:1243 msgid "Documentation for the :mod:`operator` module." msgstr "Documentation du module :mod:`operator`." -#: howto/functional.rst:1246 +#: howto/functional.rst:1245 msgid ":pep:`289`: \"Generator Expressions\"" msgstr ":pep:`289`: *\"Generator Expressions\"*" -#: howto/functional.rst:1248 +#: howto/functional.rst:1247 msgid "" ":pep:`342`: \"Coroutines via Enhanced Generators\" describes the new " "generator features in Python 2.5." diff --git a/howto/instrumentation.po b/howto/instrumentation.po index bccfff8281..c03a657c3c 100644 --- a/howto/instrumentation.po +++ b/howto/instrumentation.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2021-01-28 15:41+0100\n" -"Last-Translator: Jules Lasne \n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2021-11-06 19:31+0100\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.2\n" +"X-Generator: Poedit 3.0\n" #: howto/instrumentation.rst:7 msgid "Instrumenting CPython with DTrace and SystemTap" @@ -100,10 +100,12 @@ msgid "or::" msgstr "ou ::" #: howto/instrumentation.rst:49 -msgid "CPython must then be configured ``--with-dtrace``:" -msgstr "CPython doit être configuré avec l'option ``--with-dtrace`` ::" +msgid "" +"CPython must then be :option:`configured with the --with-dtrace option <--" +"with-dtrace>`:" +msgstr "CPython doit être configuré avec l'option :option:`--with-dtrace` ::" -#: howto/instrumentation.rst:55 +#: howto/instrumentation.rst:56 msgid "" "On macOS, you can list available DTrace probes by running a Python process " "in the background and listing all probes made available by the Python " @@ -113,7 +115,7 @@ msgstr "" "un processus Python en arrière-plan et en listant toutes les sondes mises à " "disposition par le fournisseur Python ::" -#: howto/instrumentation.rst:72 +#: howto/instrumentation.rst:73 msgid "" "On Linux, you can verify if the SystemTap static markers are present in the " "built binary by seeing if it contains a \".note.stapsdt\" section." @@ -122,22 +124,23 @@ msgstr "" "présents dans le binaire compilé, il suffit de regarder s'il contient une " "section ``.note.stapsdt``." -#: howto/instrumentation.rst:80 +#: howto/instrumentation.rst:81 msgid "" -"If you've built Python as a shared library (with --enable-shared), you need " -"to look instead within the shared library. For example::" +"If you've built Python as a shared library (with the :option:`--enable-" +"shared` configure option), you need to look instead within the shared " +"library. For example::" msgstr "" -"Si vous avez compilé Python en tant que bibliothèque partagée (avec ``--" -"enable-shared``), vous devez plutôt regarder dans la bibliothèque partagée. " -"Par exemple ::" +"Si vous avez compilé Python en tant que bibliothèque partagée (avec " +"l'option :option:`--enable-shared` du script ``configure``), vous devez " +"plutôt regarder dans la bibliothèque partagée. Par exemple ::" -#: howto/instrumentation.rst:86 +#: howto/instrumentation.rst:88 msgid "Sufficiently modern readelf can print the metadata::" msgstr "" "Une version suffisamment moderne de *readelf* peut afficher les " "métadonnées ::" -#: howto/instrumentation.rst:123 +#: howto/instrumentation.rst:125 msgid "" "The above metadata contains information for SystemTap describing how it can " "patch strategically-placed machine code instructions to enable the tracing " @@ -148,11 +151,11 @@ msgstr "" "stratégiquement placées pour activer les crochets de traçage utilisés par un " "script *SystemTap*." -#: howto/instrumentation.rst:129 +#: howto/instrumentation.rst:131 msgid "Static DTrace probes" msgstr "Sondes DTrace statiques" -#: howto/instrumentation.rst:131 +#: howto/instrumentation.rst:133 msgid "" "The following example DTrace script can be used to show the call/return " "hierarchy of a Python script, only tracing within the invocation of a " @@ -164,19 +167,19 @@ msgstr "" "En d'autres termes, les appels de fonctions lors de la phase d'import ne " "seront pas répertoriées ::" -#: howto/instrumentation.rst:228 +#: howto/instrumentation.rst:230 msgid "It can be invoked like this::" msgstr "Il peut être utilisé de cette manière ::" -#: howto/instrumentation.rst:234 +#: howto/instrumentation.rst:236 msgid "The output looks like this:" msgstr "La sortie ressemble à ceci ::" -#: howto/instrumentation.rst:199 +#: howto/instrumentation.rst:201 msgid "Static SystemTap markers" msgstr "Marqueurs statiques *SystemTap*" -#: howto/instrumentation.rst:201 +#: howto/instrumentation.rst:203 msgid "" "The low-level way to use the SystemTap integration is to use the static " "markers directly. This requires you to explicitly state the binary file " @@ -186,7 +189,7 @@ msgstr "" "directement les marqueurs statiques. Pour cela vous devez pointer " "explicitement le fichier binaire qui les contient." -#: howto/instrumentation.rst:205 +#: howto/instrumentation.rst:207 msgid "" "For example, this SystemTap script can be used to show the call/return " "hierarchy of a Python script:" @@ -194,52 +197,54 @@ msgstr "" "Par exemple, ce script *SystemTap* peut être utilisé pour afficher la " "hiérarchie d'appel/retour d'un script Python ::" -#: howto/instrumentation.rst:245 +#: howto/instrumentation.rst:247 msgid "where the columns are:" msgstr "où les colonnes sont ::" -#: howto/instrumentation.rst:247 +#: howto/instrumentation.rst:249 msgid "time in microseconds since start of script" msgstr "temps en microsecondes depuis le début du script" -#: howto/instrumentation.rst:249 +#: howto/instrumentation.rst:251 msgid "name of executable" msgstr "nom de l'exécutable" -#: howto/instrumentation.rst:251 +#: howto/instrumentation.rst:253 msgid "PID of process" msgstr "PID du processus" -#: howto/instrumentation.rst:253 +#: howto/instrumentation.rst:255 msgid "" "and the remainder indicates the call/return hierarchy as the script executes." msgstr "" "et le reste indique la hiérarchie d'appel/retour lorsque le script s'exécute." -#: howto/instrumentation.rst:255 +#: howto/instrumentation.rst:257 msgid "" -"For a `--enable-shared` build of CPython, the markers are contained within " -"the libpython shared library, and the probe's dotted path needs to reflect " -"this. For example, this line from the above example:" +"For a :option:`--enable-shared` build of CPython, the markers are contained " +"within the libpython shared library, and the probe's dotted path needs to " +"reflect this. For example, this line from the above example:" msgstr "" -"Pour une compilation `--enable-shared` de CPython, les marqueurs sont " -"contenus dans la bibliothèque partagée *libpython*, et le chemin du module " -"de la sonde doit le refléter. Par exemple, la ligne de l'exemple ci-dessus :" +"Pour une compilation :option:`--enable-shared` de CPython, les marqueurs " +"sont contenus dans la bibliothèque partagée *libpython*, et le chemin du " +"module de la sonde doit le refléter. Par exemple, la ligne de l'exemple ci-" +"dessus :" -#: howto/instrumentation.rst:263 +#: howto/instrumentation.rst:265 msgid "should instead read:" msgstr "doit plutôt se lire comme ::" -#: howto/instrumentation.rst:269 -msgid "(assuming a debug build of CPython 3.6)" +#: howto/instrumentation.rst:271 +msgid "(assuming a :ref:`debug build ` of CPython 3.6)" msgstr "" -"(en supposant une version compilée avec le débogage activé de CPython 3.6)" +"(en supposant une version de CPython 3.6 compilée avec le :ref:`débogage " +"` activé)" -#: howto/instrumentation.rst:273 +#: howto/instrumentation.rst:275 msgid "Available static markers" msgstr "Marqueurs statiques disponibles" -#: howto/instrumentation.rst:277 +#: howto/instrumentation.rst:279 msgid "" "This marker indicates that execution of a Python function has begun. It is " "only triggered for pure-Python (bytecode) functions." @@ -247,17 +252,17 @@ msgstr "" "Ce marqueur indique que l'exécution d'une fonction Python a commencé. Il " "n'est déclenché que pour les fonctions en Python pur (code intermédiaire)." -#: howto/instrumentation.rst:280 +#: howto/instrumentation.rst:282 msgid "" "The filename, function name, and line number are provided back to the " -"tracing script as positional arguments, which must be accessed using ``" -"$arg1``, ``$arg2``, ``$arg3``:" +"tracing script as positional arguments, which must be accessed using " +"``$arg1``, ``$arg2``, ``$arg3``:" msgstr "" "Le nom de fichier, le nom de la fonction et le numéro de ligne sont renvoyés " "au script de traçage sous forme d'arguments positionnels, auxquels il faut " "accéder en utilisant ``$arg1``, ``$arg2``, ``$arg3`` :" -#: howto/instrumentation.rst:284 +#: howto/instrumentation.rst:286 msgid "" "``$arg1`` : ``(const char *)`` filename, accessible using " "``user_string($arg1)``" @@ -265,7 +270,7 @@ msgstr "" "``$arg1`` : ``(const char *)`` nom de fichier, accessible via " "``user_string($arg1)``" -#: howto/instrumentation.rst:286 +#: howto/instrumentation.rst:288 msgid "" "``$arg2`` : ``(const char *)`` function name, accessible using " "``user_string($arg2)``" @@ -273,11 +278,11 @@ msgstr "" "``$arg2`` : ``(const char *)`` nom de la fonction, accessible via " "``user_string($arg2)``" -#: howto/instrumentation.rst:289 +#: howto/instrumentation.rst:291 msgid "``$arg3`` : ``int`` line number" msgstr "``$arg3`` : numéro de ligne ``int``" -#: howto/instrumentation.rst:293 +#: howto/instrumentation.rst:295 msgid "" "This marker is the converse of :c:func:`function__entry`, and indicates that " "execution of a Python function has ended (either via ``return``, or via an " @@ -288,11 +293,11 @@ msgstr "" "via une exception). Il n'est déclenché que pour les fonctions en Python pur " "(code intermédiaire)." -#: howto/instrumentation.rst:297 +#: howto/instrumentation.rst:299 msgid "The arguments are the same as for :c:func:`function__entry`" msgstr "Les arguments sont les mêmes que pour :c:func:`function__entry`" -#: howto/instrumentation.rst:301 +#: howto/instrumentation.rst:303 msgid "" "This marker indicates a Python line is about to be executed. It is the " "equivalent of line-by-line tracing with a Python profiler. It is not " @@ -302,11 +307,11 @@ msgstr "" "C'est l'équivalent du traçage ligne par ligne avec un profileur Python. Il " "n'est pas déclenché dans les fonctions C." -#: howto/instrumentation.rst:305 +#: howto/instrumentation.rst:307 msgid "The arguments are the same as for :c:func:`function__entry`." msgstr "Les arguments sont les mêmes que pour :c:func:`function__entry`." -#: howto/instrumentation.rst:309 +#: howto/instrumentation.rst:311 msgid "" "Fires when the Python interpreter starts a garbage collection cycle. " "``arg0`` is the generation to scan, like :func:`gc.collect()`." @@ -315,7 +320,7 @@ msgstr "" "ramasse-miettes. ``arg0`` est la génération à scanner, comme :func:`gc." "collect()`." -#: howto/instrumentation.rst:314 +#: howto/instrumentation.rst:316 msgid "" "Fires when the Python interpreter finishes a garbage collection cycle. " "``arg0`` is the number of collected objects." @@ -323,7 +328,7 @@ msgstr "" "Fonction appelée lorsque l'interpréteur Python termine un cycle de collecte " "du ramasse-miettes. ``Arg0`` est le nombre d'objets collectés." -#: howto/instrumentation.rst:319 +#: howto/instrumentation.rst:321 msgid "" "Fires before :mod:`importlib` attempts to find and load the module. ``arg0`` " "is the module name." @@ -331,7 +336,7 @@ msgstr "" "Fonction appelée avant que :mod:`importlib` essaye de trouver et de charger " "le module. ``arg0`` est le nom du module." -#: howto/instrumentation.rst:326 +#: howto/instrumentation.rst:328 msgid "" "Fires after :mod:`importlib`'s find_and_load function is called. ``arg0`` is " "the module name, ``arg1`` indicates if module was successfully loaded." @@ -340,7 +345,7 @@ msgstr "" "`importlib` soit appelée. ``arg0`` est le nom du module, ``arg1`` indique si " "le module a été chargé avec succès." -#: howto/instrumentation.rst:335 +#: howto/instrumentation.rst:337 msgid "" "Fires when :func:`sys.audit` or :c:func:`PySys_Audit` is called. ``arg0`` is " "the event name as C string, ``arg1`` is a :c:type:`PyObject` pointer to a " @@ -351,27 +356,27 @@ msgstr "" "chaîne de caractère C. ``arg1`` est un pointeur sur un *n*-uplet d'objet de " "type :c:type:`PyObject`." -#: howto/instrumentation.rst:343 +#: howto/instrumentation.rst:345 msgid "SystemTap Tapsets" msgstr "*Tapsets* de *SystemTap*" -#: howto/instrumentation.rst:345 +#: howto/instrumentation.rst:347 msgid "" -"The higher-level way to use the SystemTap integration is to use a \"tapset" -"\": SystemTap's equivalent of a library, which hides some of the lower-level " -"details of the static markers." +"The higher-level way to use the SystemTap integration is to use a " +"\"tapset\": SystemTap's equivalent of a library, which hides some of the " +"lower-level details of the static markers." msgstr "" "La façon la plus simple d'utiliser l'intégration *SystemTap* est d'utiliser " "un *« tapset »*. L'équivalent pour *SystemTap* d'une bibliothèque, qui " "permet de masquer les détails de niveau inférieur des marqueurs statiques." -#: howto/instrumentation.rst:349 +#: howto/instrumentation.rst:351 msgid "Here is a tapset file, based on a non-shared build of CPython:" msgstr "" "Voici un fichier *tapset*, basé sur une version non partagée compilée de " "CPython ::" -#: howto/instrumentation.rst:372 +#: howto/instrumentation.rst:374 msgid "" "If this file is installed in SystemTap's tapset directory (e.g. ``/usr/share/" "systemtap/tapset``), then these additional probepoints become available:" @@ -380,7 +385,7 @@ msgstr "" "exemple ``/usr/share/systemtap/tapset``), alors ces sondes supplémentaires " "deviennent disponibles ::" -#: howto/instrumentation.rst:378 +#: howto/instrumentation.rst:380 msgid "" "This probe point indicates that execution of a Python function has begun. It " "is only triggered for pure-Python (bytecode) functions." @@ -388,7 +393,7 @@ msgstr "" "Cette sonde indique que l'exécution d'une fonction Python a commencé. Elle " "n'est déclenchée que pour les fonctions en Python pur (code intermédiaire)." -#: howto/instrumentation.rst:383 +#: howto/instrumentation.rst:385 msgid "" "This probe point is the converse of ``python.function.return``, and " "indicates that execution of a Python function has ended (either via " @@ -400,11 +405,11 @@ msgstr "" "via une exception). Elle est uniquement déclenchée pour les fonctions en " "Python pur (code intermédiaire ou *bytecode*)." -#: howto/instrumentation.rst:390 +#: howto/instrumentation.rst:392 msgid "Examples" msgstr "Exemples" -#: howto/instrumentation.rst:391 +#: howto/instrumentation.rst:393 msgid "" "This SystemTap script uses the tapset above to more cleanly implement the " "example given above of tracing the Python function-call hierarchy, without " @@ -415,7 +420,7 @@ msgstr "" "fonctions Python, sans avoir besoin de nommer directement les marqueurs " "statiques ::" -#: howto/instrumentation.rst:410 +#: howto/instrumentation.rst:412 msgid "" "The following script uses the tapset above to provide a top-like view of all " "running CPython code, showing the top 20 most frequently-entered bytecode " diff --git a/howto/ipaddress.po b/howto/ipaddress.po index 89b788adf7..96116fd5d9 100644 --- a/howto/ipaddress.po +++ b/howto/ipaddress.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2019-01-11 23:02+0100\n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2022-05-12 09:42+0200\n" "Last-Translator: BAILLY Geoffroy \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.2\n" +"X-Generator: Poedit 3.0.1\n" #: howto/ipaddress.rst:9 msgid "An introduction to the ipaddress module" @@ -71,17 +71,18 @@ msgstr "Note sur les versions d'IP" #: howto/ipaddress.rst:34 msgid "" "For readers that aren't particularly familiar with IP addressing, it's " -"important to know that the Internet Protocol is currently in the process of " -"moving from version 4 of the protocol to version 6. This transition is " -"occurring largely because version 4 of the protocol doesn't provide enough " -"addresses to handle the needs of the whole world, especially given the " -"increasing number of devices with direct connections to the internet." +"important to know that the Internet Protocol (IP) is currently in the " +"process of moving from version 4 of the protocol to version 6. This " +"transition is occurring largely because version 4 of the protocol doesn't " +"provide enough addresses to handle the needs of the whole world, especially " +"given the increasing number of devices with direct connections to the " +"internet." msgstr "" "Pour les lecteurs qui ne sont pas particulièrement familiers avec " -"l'adressage IP il est important de savoir que le protocole IP est " -"actuellement en évolution de la version 4 du protocole vers la version 6. " -"Cette transition est largement due au fait que la version 4 du protocole ne " -"fournit pas assez d'adresses pour gérer les besoins du monde entier, " +"l'adressage IP il est important de savoir que le *protocole Internet* (IP) " +"est actuellement en évolution de la version 4 du protocole vers la version " +"6. Cette transition est largement due au fait que la version 4 du protocole " +"ne fournit pas assez d'adresses pour gérer les besoins du monde entier, " "particulièrement à cause de la croissance des périphériques directement " "connectés à Internet." @@ -177,7 +178,7 @@ msgid "" "network and are described further in the next section." msgstr "" "Il est interdit pour des objets réseaux d'avoir des bits affectés à leurs " -"hôtes mis à 1. Ainsi la chaine de caractères ``192.0.2.1/24`` ne peut " +"hôtes mis à 1. Ainsi la chaîne de caractères ``192.0.2.1/24`` ne peut " "définir un réseau. Ces objets réseaux sont aussi appelés objets d'interfaces " "car la notation ``adresse ip / réseau`` est couramment utilisée pour décrire " "les interfaces réseau d'un ordinateur sur un réseau donné (nous les " @@ -388,7 +389,7 @@ msgstr "" "va être signalée en tant que :exc:`ValueError` avec un message d'erreur " "générique qui dit simplement que la valeur entrée n'a pas été reconnue en " "tant qu'objet de ce type. Pour fournir plus de détails sur la cause du " -"rejet, il faudrait reconnaitre si la valeur est *supposée* être une adresse " +"rejet, il faudrait reconnaître si la valeur est *supposée* être une adresse " "IPv4 ou IPv6." #: howto/ipaddress.rst:305 diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index 5bdf06bcc6..4c2bb4c183 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -5,18 +5,19 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-11-14 15:35+0100\n" +"Last-Translator: \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.2\n" #: howto/logging-cookbook.rst:5 msgid "Logging Cookbook" -msgstr "" +msgstr "Recettes pour la journalisation" #: howto/logging-cookbook.rst:0 msgid "Author" @@ -31,10 +32,12 @@ msgid "" "This page contains a number of recipes related to logging, which have been " "found useful in the past." msgstr "" +"Cette page contient des recettes relatives à la journalisation qui se sont " +"avérées utiles par le passé." #: howto/logging-cookbook.rst:15 msgid "Using logging in multiple modules" -msgstr "" +msgstr "Journalisation dans plusieurs modules" #: howto/logging-cookbook.rst:17 msgid "" @@ -47,10 +50,18 @@ msgid "" "logger calls to the child will pass up to the parent. Here is a main " "module::" msgstr "" +"Deux appels à ``logging.getLogger('unLogger')`` renvoient toujours une " +"référence vers le même objet de journalisation. C'est valable à l'intérieur " +"d'un module, mais aussi dans des modules différents pour autant que ce soit " +"le même processus de l'interpréteur Python. En plus, le code d'une " +"application peut définir et configurer une journalisation parente dans un " +"module et créer (mais pas configurer) une journalisation fille dans un " +"module séparé. Les appels à la journalisation fille passeront alors à la " +"journalisation parente. Voici un module principal ::" #: howto/logging-cookbook.rst:55 msgid "Here is the auxiliary module::" -msgstr "" +msgstr "Voici un module auxiliaire ::" #: howto/logging-cookbook.rst:75 msgid "The output looks like this:" @@ -58,27 +69,33 @@ msgstr "La sortie ressemble à ceci ::" #: howto/logging-cookbook.rst:101 msgid "Logging from multiple threads" -msgstr "" +msgstr "Journalisation avec des fils d'exécution multiples" #: howto/logging-cookbook.rst:103 msgid "" "Logging from multiple threads requires no special effort. The following " "example shows logging from the main (initial) thread and another thread::" msgstr "" +"La journalisation avec des fils d'exécution multiples ne requiert pas " +"d'effort particulier. L'exemple suivant montre comment journaliser depuis le " +"fil principal (c.-à-d. initial) et un autre fil ::" #: howto/logging-cookbook.rst:132 msgid "When run, the script should print something like the following:" -msgstr "" +msgstr "À l'exécution, le script doit afficher quelque chose comme ça ::" #: howto/logging-cookbook.rst:154 msgid "" "This shows the logging output interspersed as one might expect. This " "approach works for more threads than shown here, of course." msgstr "" +"Les entrées de journalisation sont entrelacées, comme on pouvait s'y " +"attendre. Cette approche fonctionne aussi avec plus de fils que dans " +"l'exemple, bien sûr." #: howto/logging-cookbook.rst:158 msgid "Multiple handlers and formatters" -msgstr "" +msgstr "Plusieurs gestionnaires et formateurs" #: howto/logging-cookbook.rst:160 msgid "" @@ -91,6 +108,15 @@ msgid "" "slight modification to the previous simple module-based configuration " "example::" msgstr "" +"Les gestionnaires de journalisation sont des objets Python ordinaires. La " +"méthode :meth:`~Logger.addHandler` n'est pas limitée, en nombre minimum ou " +"maximum, en gestionnaires que vous pouvez ajouter. Parfois, il peut être " +"utile pour une application de journaliser tous les messages quels que soient " +"leurs niveaux vers un fichier texte, tout en journalisant les erreurs (et " +"plus grave) dans la console. Pour ce faire, configurez simplement les " +"gestionnaires de manière adéquate. Les appels de journalisation dans le code " +"de l'application resteront les mêmes. Voici une légère modification de " +"l'exemple précédent dans une configuration au niveau du module ::" #: howto/logging-cookbook.rst:193 msgid "" @@ -98,6 +124,9 @@ msgid "" "All that changed was the addition and configuration of a new handler named " "*fh*." msgstr "" +"Notez que le code de « l'application » ignore la multiplicité des " +"gestionnaires. Les modifications consistent simplement en l'ajout et la " +"configuration d'un nouveau gestionnaire appelé *fh*." #: howto/logging-cookbook.rst:196 msgid "" @@ -110,10 +139,19 @@ msgid "" "to happen is to modify the severity level of the logger and/or handler to " "debug." msgstr "" +"La possibilité de créer de nouveaux gestionnaires avec des filtres sur un " +"niveau de gravité supérieur ou inférieur peut être très utile lors de " +"l'écriture ou du test d'une application. Au lieu d'utiliser de nombreuses " +"instructions ``print`` pour le débogage, utilisez ``logger.debug`` : " +"contrairement aux instructions ``print``, que vous devrez supprimer ou " +"commenter plus tard, les instructions ``logger.debug`` peuvent demeurer " +"telles quelles dans le code source et restent dormantes jusqu'à ce que vous " +"en ayez à nouveau besoin. À ce moment-là, il suffit de modifier le niveau de " +"gravité de la journalisation ou du gestionnaire pour déboguer." #: howto/logging-cookbook.rst:207 msgid "Logging to multiple destinations" -msgstr "" +msgstr "Journalisation vers plusieurs destinations" #: howto/logging-cookbook.rst:209 msgid "" @@ -123,34 +161,46 @@ msgid "" "console. Let's also assume that the file should contain timestamps, but the " "console messages should not. Here's how you can achieve this::" msgstr "" +"Supposons que vous souhaitiez journaliser dans la console et dans un fichier " +"avec différents formats de messages et avec différents critères. Supposons " +"que vous souhaitiez consigner les messages de niveau DEBUG et supérieur dans " +"le fichier, et les messages de niveau INFO et supérieur dans la console. " +"Supposons également que le fichier doive contenir des horodatages, mais pas " +"les messages de la console. Voici comment y parvenir ::" #: howto/logging-cookbook.rst:247 msgid "When you run this, on the console you will see" -msgstr "" +msgstr "Quand vous le lancez, vous devez voir" #: howto/logging-cookbook.rst:256 msgid "and in the file you will see something like" -msgstr "" +msgstr "et, dans le fichier, vous devez trouver" #: howto/logging-cookbook.rst:266 msgid "" "As you can see, the DEBUG message only shows up in the file. The other " "messages are sent to both destinations." msgstr "" +"Comme vous pouvez le constater, le message DEBUG n'apparaît que dans le " +"fichier. Les autres messages sont envoyés vers les deux destinations." #: howto/logging-cookbook.rst:269 msgid "" "This example uses console and file handlers, but you can use any number and " "combination of handlers you choose." msgstr "" +"Cet exemple utilise la console et des gestionnaires de fichier, mais vous " +"pouvez utiliser et combiner autant de gestionnaires que de besoin." #: howto/logging-cookbook.rst:274 msgid "Configuration server example" -msgstr "" +msgstr "Exemple d'un serveur de configuration" #: howto/logging-cookbook.rst:276 msgid "Here is an example of a module using the logging configuration server::" msgstr "" +"Voici un exemple de module mettant en œuvre la configuration de la " +"journalisation *via* un serveur ::" #: howto/logging-cookbook.rst:307 msgid "" @@ -158,17 +208,25 @@ msgid "" "server, properly preceded with the binary-encoded length, as the new logging " "configuration::" msgstr "" +"Et voici un script qui, à partir d'un nom de fichier, commence par envoyer " +"la taille du fichier encodée en binaire (comme il se doit), puis envoie ce " +"fichier au serveur pour définir la nouvelle configuration de " +"journalisation ::" #: howto/logging-cookbook.rst:330 msgid "Dealing with handlers that block" -msgstr "" +msgstr "Utilisation de gestionnaires bloquants" #: howto/logging-cookbook.rst:334 msgid "" "Sometimes you have to get your logging handlers to do their work without " -"blocking the thread you're logging from. This is common in Web applications, " +"blocking the thread you're logging from. This is common in web applications, " "though of course it also occurs in other scenarios." msgstr "" +"Parfois, il est nécessaire que les gestionnaires de journalisation fassent " +"leur travail sans bloquer le fil d'exécution qui émet des événements. C'est " +"généralement le cas dans les applications Web, mais aussi bien sûr dans " +"d'autres scénarios." #: howto/logging-cookbook.rst:338 msgid "" @@ -180,6 +238,15 @@ msgid "" "which is too slow (and this query can be deep in the socket library code, " "below the Python layer, and outside your control)." msgstr "" +"Un gestionnaire classiquement lent est le :class:`SMTPHandler` : l'envoi d'e-" +"mails peut prendre beaucoup de temps, pour un certain nombre de raisons " +"indépendantes du développeur (par exemple, une infrastructure de messagerie " +"ou de réseau peu performante). Mais n'importe quel autre gestionnaire " +"utilisant le réseau ou presque peut aussi s'avérer bloquant : même une " +"simple opération :class:`SocketHandler` peut faire une requête DNS implicite " +"et être ainsi très lente (cette requête peut être enfouie profondément dans " +"le code de la bibliothèque d'accès réseau, sous la couche Python, et hors de " +"votre contrôle)." #: howto/logging-cookbook.rst:346 msgid "" @@ -194,6 +261,18 @@ msgid "" "to attach only ``QueueHandlers`` to your loggers) for the benefit of other " "developers who will use your code." msgstr "" +"Une solution consiste à utiliser une approche en deux parties. Pour la " +"première partie, affectez un seul :class:`QueueHandler` à la journalisation " +"des fils d'exécution critiques pour les performances. Ils écrivent " +"simplement dans leur file d'attente, qui peut être dimensionnée à une " +"capacité suffisamment grande ou initialisée sans limite supérieure en " +"taille. L'écriture dans la file d'attente est généralement acceptée " +"rapidement, mais nous vous conseillons quand même de prévoir d'intercepter " +"l'exception :exc:`queue.Full` par précaution dans votre code. Si vous " +"développez une bibliothèque avec des fils d'exécution critiques pour les " +"performances, documentez-le bien (avec une suggestion de n'affecter que des " +"``QueueHandlers`` à votre journalisation) pour faciliter le travail des " +"développeurs qui utilisent votre code." #: howto/logging-cookbook.rst:357 msgid "" @@ -205,6 +284,13 @@ msgid "" "matter). The ``LogRecords`` are removed from the queue and passed to the " "handlers for processing." msgstr "" +"La deuxième partie de la solution est la classe :class:`QueueListener`, " +"conçue comme l'homologue de :class:`QueueHandler`. Un :class:`QueueListener` " +"est très simple : vous lui passez une file d'attente et des gestionnaires, " +"et il lance un fil d'exécution interne qui scrute la file d'attente pour " +"récupérer les événements envoyés par les ``QueueHandlers`` (ou toute autre " +"source de ``LogRecords``, d'ailleurs). Les ``LogRecords`` sont supprimés de " +"la file d'attente et transmis aux gestionnaires pour traitement." #: howto/logging-cookbook.rst:365 msgid "" @@ -214,14 +300,20 @@ msgid "" "handler classes, which would eat up one thread per handler for no particular " "benefit." msgstr "" +"L'avantage d'avoir une classe :class:`QueueListener` séparée est que vous " +"pouvez utiliser la même instance pour servir plusieurs ``QueueHandlers``. " +"Cela consomme moins de ressources que des instances de gestionnaires " +"réparties chacune dans un fil d'exécution séparé." #: howto/logging-cookbook.rst:370 msgid "An example of using these two classes follows (imports omitted)::" msgstr "" +"Voici un exemple d'utilisation de ces deux classes (les importations sont " +"omises) ::" #: howto/logging-cookbook.rst:388 msgid "which, when run, will produce:" -msgstr "" +msgstr "ce qui produit ceci à l'exécution :" #: howto/logging-cookbook.rst:394 msgid "" @@ -234,10 +326,18 @@ msgid "" "of each message with the handler's level, and only passes a message to a " "handler if it's appropriate to do so." msgstr "" +"Avant Python 3.5, la classe :class:`QueueListener` passait chaque message " +"reçu de la file d'attente à chaque gestionnaire avec lequel l'instance avait " +"été initialisée (on supposait que le filtrage de niveau était entièrement " +"effectué de l'autre côté, au niveau de l'alimentation de la file d'attente). " +"Depuis Python 3.5, le comportement peut être modifié en passant l'argument " +"par mot-clé ``respect_handler_level=True`` au constructeur. Dans ce cas, la " +"``QueueListener`` compare le niveau de chaque message avec le niveau défini " +"dans chaque gestionnaire et ne transmet le message que si c'est opportun." #: howto/logging-cookbook.rst:407 msgid "Sending and receiving logging events across a network" -msgstr "" +msgstr "Envoi et réception d'événements de journalisation à travers le réseau" #: howto/logging-cookbook.rst:409 msgid "" @@ -245,18 +345,26 @@ msgid "" "at the receiving end. A simple way of doing this is attaching a :class:" "`SocketHandler` instance to the root logger at the sending end::" msgstr "" +"Supposons que vous souhaitiez envoyer des événements de journalisation sur " +"un réseau et les traiter à la réception. Une façon simple de faire est " +"d'attacher une instance :class:`SocketHandler` à la journalisation racine de " +"l'émetteur ::" #: howto/logging-cookbook.rst:437 msgid "" "At the receiving end, you can set up a receiver using the :mod:" "`socketserver` module. Here is a basic working example::" msgstr "" +"Vous pouvez configurer le récepteur en utilisant le module :mod:" +"`socketserver`. Voici un exemple élémentaire ::" #: howto/logging-cookbook.rst:525 msgid "" "First run the server, and then the client. On the client side, nothing is " "printed on the console; on the server side, you should see something like:" msgstr "" +"Lancez d'abord le serveur, puis le client. Côté client, rien ne s'affiche " +"sur la console ; côté serveur, vous devez voir quelque chose comme ça :" #: howto/logging-cookbook.rst:537 msgid "" @@ -266,12 +374,40 @@ msgid "" "implementing your alternative there, as well as adapting the above script to " "use your alternative serialization." msgstr "" +"Notez que ``pickle`` introduit des problèmes de sécurité dans certains " +"scénarios. Si vous êtes concerné, vous pouvez utiliser une sérialisation " +"alternative en surchargeant la méthode :meth:`~handlers.SocketHandler." +"makePickle` par votre propre implémentation, ainsi qu'en adaptant le script " +"ci-dessus pour utiliser votre sérialisation." + +#: howto/logging-cookbook.rst:545 +msgid "Running a logging socket listener in production" +msgstr "" +"Journalisation en production à l'aide d'un connecteur en écoute sur le réseau" #: howto/logging-cookbook.rst:547 +msgid "" +"To run a logging listener in production, you may need to use a process-" +"management tool such as `Supervisor `_. `Here " +"`_ is a " +"Gist which provides the bare-bones files to run the above functionality " +"using Supervisor: you will need to change the ``/path/to/`` parts in the " +"Gist to reflect the actual paths you want to use." +msgstr "" +"Pour de la journalisation en production *via* un connecteur réseau en " +"écoute, il est probable que vous ayez besoin d'utiliser un outil de " +"surveillance tel que `Supervisor `_. Vous trouverez " +"dans ce `Gist `_ des gabarits pour assurer cette " +"fonction avec *Supervisor* : vous aurez besoin de modifier les parties ``/" +"path/to/`` du *Gist* pour refléter les chemins réels que vous utilisez." + +#: howto/logging-cookbook.rst:558 msgid "Adding contextual information to your logging output" -msgstr "" +msgstr "Ajout d'informations contextuelles dans la journalisation" -#: howto/logging-cookbook.rst:549 +# #no-qa +#: howto/logging-cookbook.rst:560 msgid "" "Sometimes you want logging output to contain contextual information in " "addition to the parameters passed to the logging call. For example, in a " @@ -286,12 +422,28 @@ msgid "" "logging an application, it could be hard to manage if the number of :class:" "`Logger` instances becomes effectively unbounded." msgstr "" - -#: howto/logging-cookbook.rst:564 +"Dans certains cas, vous pouvez souhaiter que la journalisation contienne des " +"informations contextuelles en plus des paramètres transmis à l'appel de " +"journalisation. Par exemple, dans une application réseau, il peut être " +"souhaitable de consigner des informations spécifiques au client dans le " +"journal (par exemple, le nom d'utilisateur ou l'adresse IP du client " +"distant). Bien que vous puissiez utiliser le paramètre *extra* pour y " +"parvenir, il n'est pas toujours pratique de transmettre les informations de " +"cette manière. Il peut être aussi tentant de créer des instances :class:" +"`Logger` connexion par connexion, mais ce n'est pas une bonne idée car ces " +"instances :class:`Logger` ne sont pas éliminées par le ramasse-miettes. Même " +"si ce point n'est pas problématique en soi si la journalisation est " +"configurée avec plusieurs niveaux de granularité, cela peut devenir " +"difficile de gérer un nombre potentiellement illimité d'instances de :class:" +"`Logger`." + +#: howto/logging-cookbook.rst:575 msgid "Using LoggerAdapters to impart contextual information" msgstr "" +"Utilisation d'adaptateurs de journalisation pour transmettre des " +"informations contextuelles" -#: howto/logging-cookbook.rst:566 +#: howto/logging-cookbook.rst:577 msgid "" "An easy way in which you can pass contextual information to be output along " "with logging event information is to use the :class:`LoggerAdapter` class. " @@ -301,8 +453,16 @@ msgid "" "signatures as their counterparts in :class:`Logger`, so you can use the two " "types of instances interchangeably." msgstr "" +"Un moyen simple de transmettre des informations contextuelles accompagnant " +"les informations de journalisation consiste à utiliser la classe :class:" +"`LoggerAdapter`. Cette classe est conçue pour ressembler à un :class:" +"`Logger`, de sorte que vous pouvez appeler :meth:`debug`, :meth:`info`, :" +"meth:`warning`, :meth:`error`, :meth:`exception`, :meth:`critical` et :meth:" +"`log`. Ces méthodes ont les mêmes signatures que leurs homologues dans :" +"class:`Logger`, vous pouvez donc utiliser les deux types d'instances de " +"manière interchangeable." -#: howto/logging-cookbook.rst:574 +#: howto/logging-cookbook.rst:585 msgid "" "When you create an instance of :class:`LoggerAdapter`, you pass it a :class:" "`Logger` instance and a dict-like object which contains your contextual " @@ -312,8 +472,15 @@ msgid "" "contextual information in the delegated call. Here's a snippet from the code " "of :class:`LoggerAdapter`::" msgstr "" +"Lorsque vous créez une instance de :class:`LoggerAdapter`, vous lui " +"transmettez une instance de :class:`Logger` et un objet dictionnaire qui " +"contient vos informations contextuelles. Lorsque vous appelez l'une des " +"méthodes de journalisation sur une instance de :class:`LoggerAdapter`, elle " +"délègue l'appel à l'instance sous-jacente de :class:`Logger` transmise à son " +"constructeur et s'arrange pour intégrer les informations contextuelles dans " +"l'appel délégué. Voici un extrait du code de :class:`LoggerAdapter` ::" -#: howto/logging-cookbook.rst:590 +#: howto/logging-cookbook.rst:601 msgid "" "The :meth:`~LoggerAdapter.process` method of :class:`LoggerAdapter` is where " "the contextual information is added to the logging output. It's passed the " @@ -325,8 +492,17 @@ msgid "" "had passed an 'extra' keyword argument in the call to the adapter, it will " "be silently overwritten." msgstr "" +"Les informations contextuelles sont ajoutées dans la méthode :meth:" +"`~LoggerAdapter.process` de :class:`LoggerAdapter`. On lui passe le message " +"et les arguments par mot-clé de l'appel de journalisation, et elle en " +"renvoie des versions (potentiellement) modifiées à utiliser pour la " +"journalisation sous-jacente. L'implémentation par défaut de cette méthode " +"laisse le message seul, mais insère une clé ``extra`` dans l'argument par " +"mot-clé dont la valeur est l'objet dictionnaire passé au constructeur. Bien " +"sûr, si vous avez passé un argument par mot-clé ``extra`` dans l'appel à " +"l'adaptateur, il est écrasé silencieusement." -#: howto/logging-cookbook.rst:599 +#: howto/logging-cookbook.rst:610 msgid "" "The advantage of using 'extra' is that the values in the dict-like object " "are merged into the :class:`LogRecord` instance's __dict__, allowing you to " @@ -336,22 +512,35 @@ msgid "" "string, you just need to subclass :class:`LoggerAdapter` and override :meth:" "`~LoggerAdapter.process` to do what you need. Here is a simple example::" msgstr "" +"L'avantage d'utiliser ``extra`` est que les valeurs de l'objet dictionnaire " +"sont fusionnées dans le ``__dict__`` de l'instance :class:`LogRecord`, ce " +"qui vous permet d'utiliser des chaînes personnalisées avec vos instances :" +"class:`Formatter` qui connaissent les clés de l'objet dictionnaire. Si vous " +"avez besoin d'une méthode différente, par exemple si vous souhaitez ajouter " +"des informations contextuelles avant ou après la chaîne de message, il vous " +"suffit de surcharger :class:`LoggerAdapter` et de remplacer :meth:" +"`~LoggerAdapter.process` pour faire ce dont vous avez besoin. Voici un " +"exemple simple ::" -#: howto/logging-cookbook.rst:615 +#: howto/logging-cookbook.rst:626 msgid "which you can use like this::" -msgstr "" +msgstr "que vous pouvez utiliser comme ceci ::" -#: howto/logging-cookbook.rst:620 +#: howto/logging-cookbook.rst:631 msgid "" "Then any events that you log to the adapter will have the value of " "``some_conn_id`` prepended to the log messages." msgstr "" +"Ainsi, tout événement journalisé aura la valeur de ``some_conn_id`` insérée " +"en début de message de journalisation." -#: howto/logging-cookbook.rst:624 +#: howto/logging-cookbook.rst:635 msgid "Using objects other than dicts to pass contextual information" msgstr "" +"Utilisation d'objets autres que les dictionnaires pour passer des " +"informations contextuelles" -#: howto/logging-cookbook.rst:626 +#: howto/logging-cookbook.rst:637 msgid "" "You don't need to pass an actual dict to a :class:`LoggerAdapter` - you " "could pass an instance of a class which implements ``__getitem__`` and " @@ -359,12 +548,18 @@ msgid "" "if you want to generate values dynamically (whereas the values in a dict " "would be constant)." msgstr "" +"Il n'est pas obligatoire de passer un dictionnaire réel à un :class:" +"`LoggerAdapter`, vous pouvez passer une instance d'une classe qui implémente " +"``__getitem__`` et ``__iter__`` pour qu'il ressemble à un dictionnaire du " +"point de vue de la journalisation. C'est utile si vous souhaitez générer des " +"valeurs de manière dynamique (alors que les valeurs d'un dictionnaire " +"seraient constantes)." -#: howto/logging-cookbook.rst:635 +#: howto/logging-cookbook.rst:646 msgid "Using Filters to impart contextual information" -msgstr "" +msgstr "Utilisation de filtres pour transmettre des informations contextuelles" -#: howto/logging-cookbook.rst:637 +#: howto/logging-cookbook.rst:648 msgid "" "You can also add contextual information to log output using a user-defined :" "class:`Filter`. ``Filter`` instances are allowed to modify the " @@ -372,8 +567,14 @@ msgid "" "can then be output using a suitable format string, or if needed a custom :" "class:`Formatter`." msgstr "" +"Un :class:`Filter` défini par l'utilisateur peut aussi ajouter des " +"informations contextuelles à la journalisation. Les instances de ``Filter`` " +"sont autorisées à modifier les ``LogRecords`` qui leur sont transmis, y " +"compris par l'ajout d'attributs supplémentaires qui peuvent ensuite être " +"intégrés à la journalisation en utilisant une chaîne de formatage appropriée " +"ou, si nécessaire, un :class:`Formatter` personnalisé." -#: howto/logging-cookbook.rst:642 +#: howto/logging-cookbook.rst:653 msgid "" "For example in a web application, the request being processed (or at least, " "the interesting parts of it) can be stored in a threadlocal (:class:" @@ -384,16 +585,25 @@ msgid "" "format string can be used to get similar output to that shown above. Here's " "an example script::" msgstr "" - -#: howto/logging-cookbook.rst:688 +"Par exemple, dans une application Web, la requête en cours de traitement (ou " +"du moins ce qu'elle contient d'intéressant) peut être stockée dans une " +"variable locale au fil d'exécution (:class:`threading.local`), puis utilisée " +"dans un ``Filter`` pour ajouter, par exemple, des informations relatives à " +"la requête (par exemple, l'adresse IP distante et le nom de l'utilisateur) " +"au ``LogRecord``, en utilisant les noms d'attribut ``ip`` et ``user`` comme " +"dans l'exemple ``LoggerAdapter`` ci-dessus. Dans ce cas, la même chaîne de " +"formatage peut être utilisée pour obtenir une sortie similaire à celle " +"indiquée ci-dessus. Voici un exemple de script ::" + +#: howto/logging-cookbook.rst:699 msgid "which, when run, produces something like:" -msgstr "" +msgstr "qui, à l'exécution, produit quelque chose comme ça ::" -#: howto/logging-cookbook.rst:709 +#: howto/logging-cookbook.rst:720 msgid "Logging to a single file from multiple processes" -msgstr "" +msgstr "Journalisation vers un fichier unique à partir de plusieurs processus" -#: howto/logging-cookbook.rst:711 +#: howto/logging-cookbook.rst:722 msgid "" "Although logging is thread-safe, and logging to a single file from multiple " "threads in a single process *is* supported, logging to a single file from " @@ -408,8 +618,22 @@ msgid "" "includes a working socket receiver which can be used as a starting point for " "you to adapt in your own applications." msgstr "" - -#: howto/logging-cookbook.rst:724 +"La journalisation est fiable avec les programmes à fils d'exécution " +"multiples (thread-safe) : rien n'empêche plusieurs fils d'exécution de " +"journaliser dans le même fichier, du moment que ces fils d'exécution font " +"partie du même processus. En revanche, il n'existe aucun moyen standard de " +"sérialiser l'accès à un seul fichier sur plusieurs processus en Python. Si " +"vous avez besoin de vous connecter à un seul fichier à partir de plusieurs " +"processus, une façon de le faire est de faire en sorte que tous les " +"processus se connectent à un :class:`~handlers.SocketHandler`, et d'avoir un " +"processus séparé qui implémente un serveur qui lit à partir de ce connecteur " +"et écrit les journaux dans le fichier (si vous préférez, vous pouvez dédier " +"un fil d'exécution dans l'un des processus existants pour exécuter cette " +"tâche). :ref:`Cette section ` documente cette approche plus " +"en détail et inclut un connecteur en écoute réseau fonctionnel qui peut être " +"utilisé comme point de départ pour l'adapter à vos propres applications." + +#: howto/logging-cookbook.rst:735 msgid "" "You could also write your own handler which uses the :class:" "`~multiprocessing.Lock` class from the :mod:`multiprocessing` module to " @@ -419,8 +643,16 @@ msgid "" "`multiprocessing` module does not provide working lock functionality on all " "platforms (see https://bugs.python.org/issue3770)." msgstr "" +"Vous pouvez également écrire votre propre gestionnaire en utilisant la " +"classe :class:`~multiprocessing.Lock` du module :mod:`multiprocessing` pour " +"sérialiser l'accès au fichier depuis vos processus. Les actuels :class:" +"`FileHandler` et sous-classes n'utilisent pas :mod:`multiprocessing` pour le " +"moment, même s'ils pourraient le faire à l'avenir. Notez qu'à l'heure " +"actuelle, le module :mod:`multiprocessing` ne fournit pas un verrouillage " +"fonctionnel pour toutes les plates-formes (voir https://bugs.python.org/" +"issue3770)." -#: howto/logging-cookbook.rst:734 +#: howto/logging-cookbook.rst:745 msgid "" "Alternatively, you can use a ``Queue`` and a :class:`QueueHandler` to send " "all logging events to one of the processes in your multi-process " @@ -434,14 +666,28 @@ msgid "" "application, and can be used as the basis for code meeting your own specific " "requirements::" msgstr "" - -#: howto/logging-cookbook.rst:850 +"Autrement, vous pouvez utiliser une ``Queue`` et un :class:`QueueHandler` " +"pour envoyer tous les événements de journalisation à l'un des processus de " +"votre application multi-processus. L'exemple de script suivant montre " +"comment procéder ; dans l'exemple, un processus d'écoute distinct écoute les " +"événements envoyés par les autres processus et les journalise en fonction de " +"sa propre configuration de journalisation. Bien que l'exemple ne montre " +"qu'une seule façon de faire (par exemple, vous pouvez utiliser un fil " +"d'exécution d'écoute plutôt qu'un processus d'écoute séparé – " +"l'implémentation serait analogue), il permet des configurations de " +"journalisation complètement différentes pour celui qui écoute ainsi que pour " +"les autres processus de votre application, et peut être utilisé comme base " +"pour répondre à vos propres exigences ::" + +#: howto/logging-cookbook.rst:861 msgid "" "A variant of the above script keeps the logging in the main process, in a " "separate thread::" msgstr "" +"Une variante du script ci-dessus conserve la journalisation dans le " +"processus principal, dans un fil séparé ::" -#: howto/logging-cookbook.rst:945 +#: howto/logging-cookbook.rst:956 msgid "" "This variant shows how you can e.g. apply configuration for particular " "loggers - e.g. the ``foo`` logger has a special handler which stores all " @@ -450,35 +696,75 @@ msgid "" "events are generated in the worker processes) to direct the messages to the " "appropriate destinations." msgstr "" +"Cette variante montre comment appliquer la configuration pour des " +"enregistreurs particuliers - par exemple l'enregistreur ``foo`` a un " +"gestionnaire spécial qui stocke tous les événements du sous-système ``foo`` " +"dans un fichier ``mplog-foo.log``. C'est utilisé par le mécanisme de " +"journalisation dans le processus principal (même si les événements de " +"journalisation sont générés dans les processus de travail) pour diriger les " +"messages vers les destinations appropriées." -#: howto/logging-cookbook.rst:952 +#: howto/logging-cookbook.rst:963 msgid "Using concurrent.futures.ProcessPoolExecutor" -msgstr "" +msgstr "Utilisation de concurrent.futures.ProcessPoolExecutor" -#: howto/logging-cookbook.rst:954 +#: howto/logging-cookbook.rst:965 msgid "" "If you want to use :class:`concurrent.futures.ProcessPoolExecutor` to start " "your worker processes, you need to create the queue slightly differently. " "Instead of" msgstr "" +"Si vous souhaitez utiliser :class:`concurrent.futures.ProcessPoolExecutor` " +"pour démarrer vos processus de travail, vous devez créer la file d'attente " +"légèrement différemment. À la place de" -#: howto/logging-cookbook.rst:962 +#: howto/logging-cookbook.rst:973 msgid "you should use" -msgstr "" +msgstr "vous devez écrire" -#: howto/logging-cookbook.rst:968 +#: howto/logging-cookbook.rst:979 msgid "and you can then replace the worker creation from this::" msgstr "" +"et vous pouvez alors remplacer la création du processus de travail telle " +"que ::" -#: howto/logging-cookbook.rst:979 +#: howto/logging-cookbook.rst:990 msgid "to this (remembering to first import :mod:`concurrent.futures`)::" msgstr "" - -#: howto/logging-cookbook.rst:987 +"par celle-ci (souvenez-vous d'importer au préalable :mod:`concurrent." +"futures`) ::" + +#: howto/logging-cookbook.rst:997 +msgid "Deploying Web applications using Gunicorn and uWSGI" +msgstr "Déploiement d'applications Web avec *Gunicorn* et *uWSGI*" + +#: howto/logging-cookbook.rst:999 +msgid "" +"When deploying Web applications using `Gunicorn `_ or " +"`uWSGI `_ (or similar), " +"multiple worker processes are created to handle client requests. In such " +"environments, avoid creating file-based handlers directly in your web " +"application. Instead, use a :class:`SocketHandler` to log from the web " +"application to a listener in a separate process. This can be set up using a " +"process management tool such as Supervisor - see `Running a logging socket " +"listener in production`_ for more details." +msgstr "" +"Lors du déploiement d'applications Web qui utilisent `Gunicorn `_ ou `uWSGI `_ " +"(ou équivalent), plusieurs processus de travail sont créés pour traiter les " +"requêtes des clients. Dans de tels environnements, évitez de créer des " +"gestionnaires à fichiers directement dans votre application Web. Au lieu de " +"cela, utilisez un :class:`SocketHandler` pour journaliser depuis " +"l'application Web vers gestionnaire réseau à l'écoute dans un processus " +"séparé. Cela peut être configuré à l'aide d'un outil de gestion de processus " +"tel que *Supervisor* (voir `Journalisation en production à l'aide d'un " +"connecteur en écoute sur le réseau`_ pour plus de détails)." + +#: howto/logging-cookbook.rst:1009 msgid "Using file rotation" -msgstr "" +msgstr "Utilisation du roulement de fichiers" -#: howto/logging-cookbook.rst:992 +#: howto/logging-cookbook.rst:1014 msgid "" "Sometimes you want to let a log file grow to a certain size, then open a new " "file and log to that. You may want to keep a certain number of these files, " @@ -487,32 +773,48 @@ msgid "" "usage pattern, the logging package provides a :class:`~handlers." "RotatingFileHandler`::" msgstr "" +"Parfois, vous souhaitez laisser un fichier de journalisation grossir jusqu'à " +"une certaine taille, puis ouvrir un nouveau fichier et vous y enregistrer " +"les nouveaux événements. Vous souhaitez peut-être conserver un certain " +"nombre de ces fichiers et, lorsque ce nombre de fichiers aura été créé, " +"faire rouler les fichiers afin que le nombre de fichiers et la taille des " +"fichiers restent tous deux limités. Pour ce cas d'usage, :class:`~handlers." +"RotatingFileHandler` est inclus dans le paquet de journalisation ::" -#: howto/logging-cookbook.rst:1024 +#: howto/logging-cookbook.rst:1046 msgid "" "The result should be 6 separate files, each with part of the log history for " "the application:" msgstr "" +"Vous devez obtenir 6 fichiers séparés, chacun contenant une partie de " +"l'historique de journalisation de l'application :" -#: howto/logging-cookbook.rst:1036 +#: howto/logging-cookbook.rst:1058 msgid "" "The most current file is always :file:`logging_rotatingfile_example.out`, " "and each time it reaches the size limit it is renamed with the suffix " "``.1``. Each of the existing backup files is renamed to increment the suffix " "(``.1`` becomes ``.2``, etc.) and the ``.6`` file is erased." msgstr "" +"Le fichier de journalisation actuel est toujours :file:" +"`logging_rotatingfile_example.out`, et chaque fois qu'il atteint la taille " +"limite, il est renommé avec le suffixe ``.1``. Chacun des fichiers de " +"sauvegarde existants est renommé pour incrémenter le suffixe (``.1`` devient " +"``.2``, etc.) et le fichier ``.6`` est effacé." -#: howto/logging-cookbook.rst:1041 +#: howto/logging-cookbook.rst:1063 msgid "" "Obviously this example sets the log length much too small as an extreme " "example. You would want to set *maxBytes* to an appropriate value." msgstr "" +"De toute évidence, la longueur du journal définie dans cet exemple est " +"beaucoup trop petite. À vous de définir *maxBytes* à une valeur appropriée." -#: howto/logging-cookbook.rst:1047 +#: howto/logging-cookbook.rst:1069 msgid "Use of alternative formatting styles" -msgstr "" +msgstr "Utilisation d'autres styles de formatage" -#: howto/logging-cookbook.rst:1049 +#: howto/logging-cookbook.rst:1071 msgid "" "When logging was added to the Python standard library, the only way of " "formatting messages with variable content was to use the %-formatting " @@ -520,8 +822,13 @@ msgid "" "`string.Template` (added in Python 2.4) and :meth:`str.format` (added in " "Python 2.6)." msgstr "" +"Lorsque la journalisation a été ajoutée à la bibliothèque standard Python, " +"la seule façon de formater les messages avec un contenu variable était " +"d'utiliser la méthode de formatage avec « % ». Depuis, Python s'est enrichi " +"de deux nouvelles méthode de formatage : :class:`string.Template` (ajouté " +"dans Python 2.4) et :meth:`str.format` (ajouté dans Python 2.6)." -#: howto/logging-cookbook.rst:1055 +#: howto/logging-cookbook.rst:1077 msgid "" "Logging (as of 3.2) provides improved support for these two additional " "formatting styles. The :class:`Formatter` class been enhanced to take an " @@ -533,15 +840,30 @@ msgid "" "meth:`str.format` or :class:`string.Template`. Here's an example console " "session to show the possibilities:" msgstr "" +"La journalisation (à partir de la version 3.2) offre une meilleure prise en " +"charge de ces deux styles de formatage supplémentaires. La classe :class:" +"`Formatter` a été améliorée pour accepter un paramètre par mot-clé " +"facultatif supplémentaire nommé ``style``. La valeur par défaut est ``'%'``, " +"les autres valeurs possibles étant ``'{'`` et ``'$'``, qui correspondent aux " +"deux autres styles de formatage. La rétrocompatibilité est maintenue par " +"défaut (comme vous vous en doutez) mais, en spécifiant explicitement un " +"paramètre de style, vous avez la possibilité de spécifier des chaînes de " +"format qui fonctionnent avec :meth:`str.format` ou :class:`string.Template`. " +"Voici un exemple de session interactive en console pour montrer les " +"possibilités :" -#: howto/logging-cookbook.rst:1089 +#: howto/logging-cookbook.rst:1111 msgid "" "Note that the formatting of logging messages for final output to logs is " "completely independent of how an individual logging message is constructed. " "That can still use %-formatting, as shown here::" msgstr "" +"Notez que le formatage des messages de journalisation est, au final, " +"complètement indépendant de la façon dont un message de journalisation " +"individuel est construit. Vous pouvez toujours utiliser formatage *via* " +"« % », comme ici ::" -#: howto/logging-cookbook.rst:1097 +#: howto/logging-cookbook.rst:1119 msgid "" "Logging calls (``logger.debug()``, ``logger.info()`` etc.) only take " "positional parameters for the actual logging message itself, with keyword " @@ -556,8 +878,21 @@ msgid "" "logging calls which are out there in existing code will be using %-format " "strings." msgstr "" - -#: howto/logging-cookbook.rst:1110 +"Les appels de journalisation (``logger.debug()``, ``logger.info()`` etc.) ne " +"prennent que des paramètres positionnels pour le message de journalisation " +"lui-même, les paramètres par mots-clés étant utilisés uniquement pour " +"déterminer comment gérer le message réel (par exemple, le paramètre par mot-" +"clé ``exc_info`` indique que les informations de trace doivent être " +"enregistrées, ou le paramètre par mot-clé ``extra`` indique des informations " +"contextuelles supplémentaires à ajouter au journal). Vous ne pouvez donc pas " +"inclure dans les appels de journalisation à l'aide de la syntaxe :meth:`str." +"format` ou :class:`string.Template`, car le paquet de journalisation utilise " +"le formatage via « % » en interne pour fusionner la chaîne de format et les " +"arguments de variables. Il n'est pas possible de changer ça tout en " +"préservant la rétrocompatibilité puisque tous les appels de journalisation " +"dans le code pré-existant utilisent des chaînes au format « % »." + +#: howto/logging-cookbook.rst:1132 msgid "" "There is, however, a way that you can use {}- and $- formatting to construct " "your individual log messages. Recall that for a message you can use an " @@ -565,8 +900,13 @@ msgid "" "will call ``str()`` on that object to get the actual format string. Consider " "the following two classes::" msgstr "" +"Il existe cependant un moyen d'utiliser le formatage *via* « {} » et « $ » " +"pour vos messages de journalisation. Rappelez-vous que, pour un message, " +"vous pouvez utiliser un objet arbitraire comme chaîne de format de message, " +"et que le package de journalisation appelle ``str()`` sur cet objet pour " +"fabriquer la chaîne finale. Considérez les deux classes suivantes ::" -#: howto/logging-cookbook.rst:1134 +#: howto/logging-cookbook.rst:1156 msgid "" "Either of these can be used in place of a format string, to allow {}- or $-" "formatting to be used to build the actual \"message\" part which appears in " @@ -576,22 +916,37 @@ msgid "" "__ (double underscore --- not to be confused with _, the single underscore " "used as a synonym/alias for :func:`gettext.gettext` or its brethren)." msgstr "" +"L'une ou l'autre peut être utilisée à la place d'une chaîne de format " +"\"%(message)s\" ou \"{message}\" ou \"$message\", afin de mettre en forme " +"*via* « { } » ou « $ » la partie « message réel » qui apparaît dans la " +"sortie de journal formatée. Il est un peu lourd d'utiliser les noms de " +"classe chaque fois que vous voulez journaliser quelque chose, mais ça " +"devient acceptable si vous utilisez un alias tel que __ (double trait de " +"soulignement — à ne pas confondre avec _, le trait de soulignement unique " +"utilisé comme alias pour :func:`gettext.gettext` ou ses homologues)." -#: howto/logging-cookbook.rst:1142 +#: howto/logging-cookbook.rst:1164 msgid "" "The above classes are not included in Python, though they're easy enough to " "copy and paste into your own code. They can be used as follows (assuming " "that they're declared in a module called ``wherever``):" msgstr "" +"Les classes ci-dessus ne sont pas incluses dans Python, bien qu'elles soient " +"assez faciles à copier et coller dans votre propre code. Elles peuvent être " +"utilisées comme suit (en supposant qu'elles soient déclarées dans un module " +"appelé ``wherever``) :" -#: howto/logging-cookbook.rst:1164 +#: howto/logging-cookbook.rst:1186 msgid "" "While the above examples use ``print()`` to show how the formatting works, " "you would of course use ``logger.debug()`` or similar to actually log using " "this approach." msgstr "" +"Alors que les exemples ci-dessus utilisent ``print()`` pour montrer comment " +"fonctionne le formatage, utilisez bien sûr ``logger.debug()`` ou similaire " +"pour journaliser avec cette approche." -#: howto/logging-cookbook.rst:1168 +#: howto/logging-cookbook.rst:1190 msgid "" "One thing to note is that you pay no significant performance penalty with " "this approach: the actual formatting happens not when you make the logging " @@ -601,24 +956,37 @@ msgid "" "not just the format string. That's because the __ notation is just syntax " "sugar for a constructor call to one of the XXXMessage classes." msgstr "" +"Une chose à noter est qu'il n'y a pas de perte de performance significative " +"avec cette approche : le formatage réel ne se produit pas lorsque vous " +"effectuez l'appel de journalisation, mais lorsque (et si) le message " +"journalisé est réellement sur le point d'être écrit dans un journal par un " +"gestionnaire. Ainsi, la seule chose légèrement inhabituelle qui pourrait " +"vous perturber est que les parenthèses entourent la chaîne de format et les " +"arguments, pas seulement la chaîne de format. C'est parce que la notation __ " +"n'est que du sucre syntaxique pour un appel de constructeur à l'une des " +"classes ``XXXMessage``." -#: howto/logging-cookbook.rst:1176 +#: howto/logging-cookbook.rst:1198 msgid "" "If you prefer, you can use a :class:`LoggerAdapter` to achieve a similar " "effect to the above, as in the following example::" msgstr "" +"Si vous préférez, vous pouvez utiliser un :class:`LoggerAdapter` pour " +"obtenir un effet similaire à ce qui précède, comme dans l'exemple suivant ::" -#: howto/logging-cookbook.rst:1207 +#: howto/logging-cookbook.rst:1229 msgid "" "The above script should log the message ``Hello, world!`` when run with " "Python 3.2 or later." msgstr "" +"Le script ci-dessus journalise le message ``Hello, world!`` quand il est " +"lancé avec Python 3.2 ou ultérieur." -#: howto/logging-cookbook.rst:1216 +#: howto/logging-cookbook.rst:1238 msgid "Customizing ``LogRecord``" msgstr "" -#: howto/logging-cookbook.rst:1218 +#: howto/logging-cookbook.rst:1240 msgid "" "Every logging event is represented by a :class:`LogRecord` instance. When an " "event is logged and not filtered out by a logger's level, a :class:" @@ -629,13 +997,13 @@ msgid "" "was done:" msgstr "" -#: howto/logging-cookbook.rst:1225 +#: howto/logging-cookbook.rst:1247 msgid "" ":meth:`Logger.makeRecord`, which is called in the normal process of logging " "an event. This invoked :class:`LogRecord` directly to create an instance." msgstr "" -#: howto/logging-cookbook.rst:1228 +#: howto/logging-cookbook.rst:1250 msgid "" ":func:`makeLogRecord`, which is called with a dictionary containing " "attributes to be added to the LogRecord. This is typically invoked when a " @@ -644,27 +1012,27 @@ msgid "" "`~handlers.HTTPHandler`)." msgstr "" -#: howto/logging-cookbook.rst:1234 +#: howto/logging-cookbook.rst:1256 msgid "" "This has usually meant that if you need to do anything special with a :class:" "`LogRecord`, you've had to do one of the following." msgstr "" -#: howto/logging-cookbook.rst:1237 +#: howto/logging-cookbook.rst:1259 msgid "" "Create your own :class:`Logger` subclass, which overrides :meth:`Logger." "makeRecord`, and set it using :func:`~logging.setLoggerClass` before any " "loggers that you care about are instantiated." msgstr "" -#: howto/logging-cookbook.rst:1240 +#: howto/logging-cookbook.rst:1262 msgid "" "Add a :class:`Filter` to a logger or handler, which does the necessary " "special manipulation you need when its :meth:`~Filter.filter` method is " "called." msgstr "" -#: howto/logging-cookbook.rst:1244 +#: howto/logging-cookbook.rst:1266 msgid "" "The first approach would be a little unwieldy in the scenario where (say) " "several different libraries wanted to do different things. Each would " @@ -672,7 +1040,7 @@ msgid "" "last would win." msgstr "" -#: howto/logging-cookbook.rst:1249 +#: howto/logging-cookbook.rst:1271 msgid "" "The second approach works reasonably well for many cases, but does not allow " "you to e.g. use a specialized subclass of :class:`LogRecord`. Library " @@ -681,7 +1049,7 @@ msgid "" "would do simply by adding new packages or modules and doing ::" msgstr "" -#: howto/logging-cookbook.rst:1257 +#: howto/logging-cookbook.rst:1279 msgid "" "at module level). It's probably one too many things to think about. " "Developers could also add the filter to a :class:`~logging.NullHandler` " @@ -691,7 +1059,7 @@ msgid "" "developer." msgstr "" -#: howto/logging-cookbook.rst:1263 +#: howto/logging-cookbook.rst:1285 msgid "" "In Python 3.2 and later, :class:`~logging.LogRecord` creation is done " "through a factory, which you can specify. The factory is just a callable you " @@ -701,7 +1069,7 @@ msgid "" "`LogRecord` is the default setting for the factory." msgstr "" -#: howto/logging-cookbook.rst:1270 +#: howto/logging-cookbook.rst:1292 msgid "" "This approach allows a custom factory to control all aspects of LogRecord " "creation. For example, you could return a subclass, or just add some " @@ -709,7 +1077,7 @@ msgid "" "this::" msgstr "" -#: howto/logging-cookbook.rst:1283 +#: howto/logging-cookbook.rst:1305 msgid "" "This pattern allows different libraries to chain factories together, and as " "long as they don't overwrite each other's attributes or unintentionally " @@ -719,70 +1087,70 @@ msgid "" "used when the use of a :class:`Filter` does not provide the desired result." msgstr "" -#: howto/logging-cookbook.rst:1294 +#: howto/logging-cookbook.rst:1316 msgid "Subclassing QueueHandler - a ZeroMQ example" msgstr "" -#: howto/logging-cookbook.rst:1296 +#: howto/logging-cookbook.rst:1318 msgid "" "You can use a :class:`QueueHandler` subclass to send messages to other kinds " "of queues, for example a ZeroMQ 'publish' socket. In the example below,the " "socket is created separately and passed to the handler (as its 'queue')::" msgstr "" -#: howto/logging-cookbook.rst:1315 +#: howto/logging-cookbook.rst:1337 msgid "" "Of course there are other ways of organizing this, for example passing in " "the data needed by the handler to create the socket::" msgstr "" -#: howto/logging-cookbook.rst:1333 +#: howto/logging-cookbook.rst:1355 msgid "Subclassing QueueListener - a ZeroMQ example" msgstr "" -#: howto/logging-cookbook.rst:1335 +#: howto/logging-cookbook.rst:1357 msgid "" "You can also subclass :class:`QueueListener` to get messages from other " "kinds of queues, for example a ZeroMQ 'subscribe' socket. Here's an example::" msgstr "" -#: howto/logging-cookbook.rst:1354 +#: howto/logging-cookbook.rst:1376 msgid "Module :mod:`logging`" msgstr "Module :mod:`logging`" -#: howto/logging-cookbook.rst:1354 +#: howto/logging-cookbook.rst:1376 msgid "API reference for the logging module." msgstr "Référence d'API pour le module de journalisation." -#: howto/logging-cookbook.rst:1357 +#: howto/logging-cookbook.rst:1379 msgid "Module :mod:`logging.config`" msgstr "Module :mod:`logging.config`" -#: howto/logging-cookbook.rst:1357 +#: howto/logging-cookbook.rst:1379 msgid "Configuration API for the logging module." msgstr "API de configuration pour le module de journalisation." -#: howto/logging-cookbook.rst:1360 +#: howto/logging-cookbook.rst:1382 msgid "Module :mod:`logging.handlers`" msgstr "Module :mod:`logging.handlers`" -#: howto/logging-cookbook.rst:1360 +#: howto/logging-cookbook.rst:1382 msgid "Useful handlers included with the logging module." msgstr "Gestionnaires utiles inclus avec le module de journalisation." -#: howto/logging-cookbook.rst:1362 +#: howto/logging-cookbook.rst:1384 msgid ":ref:`A basic logging tutorial `" msgstr "" -#: howto/logging-cookbook.rst:1364 +#: howto/logging-cookbook.rst:1386 msgid ":ref:`A more advanced logging tutorial `" msgstr "" -#: howto/logging-cookbook.rst:1368 +#: howto/logging-cookbook.rst:1390 msgid "An example dictionary-based configuration" msgstr "" -#: howto/logging-cookbook.rst:1370 +#: howto/logging-cookbook.rst:1392 msgid "" "Below is an example of a logging configuration dictionary - it's taken from " "the `documentation on the Django project `_ of the Django documentation." msgstr "" -#: howto/logging-cookbook.rst:1433 +#: howto/logging-cookbook.rst:1455 msgid "Using a rotator and namer to customize log rotation processing" msgstr "" -#: howto/logging-cookbook.rst:1435 +#: howto/logging-cookbook.rst:1457 msgid "" "An example of how you can define a namer and rotator is given in the " "following snippet, which shows zlib-based compression of the log file::" msgstr "" -#: howto/logging-cookbook.rst:1453 +#: howto/logging-cookbook.rst:1475 msgid "" "These are not \"true\" .gz files, as they are bare compressed data, with no " "\"container\" such as you’d find in an actual gzip file. This snippet is " "just for illustration purposes." msgstr "" -#: howto/logging-cookbook.rst:1458 +#: howto/logging-cookbook.rst:1480 msgid "A more elaborate multiprocessing example" msgstr "" -#: howto/logging-cookbook.rst:1460 +#: howto/logging-cookbook.rst:1482 msgid "" "The following working example shows how logging can be used with " "multiprocessing using configuration files. The configurations are fairly " @@ -826,7 +1194,7 @@ msgid "" "in a real multiprocessing scenario." msgstr "" -#: howto/logging-cookbook.rst:1465 +#: howto/logging-cookbook.rst:1487 msgid "" "In the example, the main process spawns a listener process and some worker " "processes. Each of the main process, the listener and the workers have three " @@ -839,17 +1207,17 @@ msgid "" "own scenario." msgstr "" -#: howto/logging-cookbook.rst:1475 +#: howto/logging-cookbook.rst:1497 msgid "" "Here's the script - the docstrings and the comments hopefully explain how it " "works::" msgstr "" -#: howto/logging-cookbook.rst:1687 +#: howto/logging-cookbook.rst:1709 msgid "Inserting a BOM into messages sent to a SysLogHandler" msgstr "" -#: howto/logging-cookbook.rst:1689 +#: howto/logging-cookbook.rst:1711 msgid "" ":rfc:`5424` requires that a Unicode message be sent to a syslog daemon as a " "set of bytes which have the following structure: an optional pure-ASCII " @@ -858,7 +1226,7 @@ msgid "" "<5424#section-6>`.)" msgstr "" -#: howto/logging-cookbook.rst:1695 +#: howto/logging-cookbook.rst:1717 msgid "" "In Python 3.1, code was added to :class:`~logging.handlers.SysLogHandler` to " "insert a BOM into the message, but unfortunately, it was implemented " @@ -866,7 +1234,7 @@ msgid "" "hence not allowing any pure-ASCII component to appear before it." msgstr "" -#: howto/logging-cookbook.rst:1701 +#: howto/logging-cookbook.rst:1723 msgid "" "As this behaviour is broken, the incorrect BOM insertion code is being " "removed from Python 3.2.4 and later. However, it is not being replaced, and " @@ -875,33 +1243,33 @@ msgid "" "encoded using UTF-8, then you need to do the following:" msgstr "" -#: howto/logging-cookbook.rst:1707 +#: howto/logging-cookbook.rst:1729 msgid "" "Attach a :class:`~logging.Formatter` instance to your :class:`~logging." "handlers.SysLogHandler` instance, with a format string such as::" msgstr "" -#: howto/logging-cookbook.rst:1713 +#: howto/logging-cookbook.rst:1735 msgid "" "The Unicode code point U+FEFF, when encoded using UTF-8, will be encoded as " "a UTF-8 BOM -- the byte-string ``b'\\xef\\xbb\\xbf'``." msgstr "" -#: howto/logging-cookbook.rst:1716 +#: howto/logging-cookbook.rst:1738 msgid "" "Replace the ASCII section with whatever placeholders you like, but make sure " "that the data that appears in there after substitution is always ASCII (that " "way, it will remain unchanged after UTF-8 encoding)." msgstr "" -#: howto/logging-cookbook.rst:1720 +#: howto/logging-cookbook.rst:1742 msgid "" "Replace the Unicode section with whatever placeholders you like; if the data " "which appears there after substitution contains characters outside the ASCII " "range, that's fine -- it will be encoded using UTF-8." msgstr "" -#: howto/logging-cookbook.rst:1724 +#: howto/logging-cookbook.rst:1746 msgid "" "The formatted message *will* be encoded using UTF-8 encoding by " "``SysLogHandler``. If you follow the above rules, you should be able to " @@ -910,11 +1278,11 @@ msgid "" "daemon may complain." msgstr "" -#: howto/logging-cookbook.rst:1731 +#: howto/logging-cookbook.rst:1753 msgid "Implementing structured logging" msgstr "" -#: howto/logging-cookbook.rst:1733 +#: howto/logging-cookbook.rst:1755 msgid "" "Although most logging messages are intended for reading by humans, and thus " "not readily machine-parseable, there might be circumstances where you want " @@ -926,31 +1294,31 @@ msgid "" "machine-parseable manner::" msgstr "" -#: howto/logging-cookbook.rst:1757 +#: howto/logging-cookbook.rst:1779 msgid "If the above script is run, it prints:" msgstr "" -#: howto/logging-cookbook.rst:1763 howto/logging-cookbook.rst:1812 +#: howto/logging-cookbook.rst:1785 howto/logging-cookbook.rst:1827 msgid "" "Note that the order of items might be different according to the version of " "Python used." msgstr "" -#: howto/logging-cookbook.rst:1766 +#: howto/logging-cookbook.rst:1788 msgid "" "If you need more specialised processing, you can use a custom JSON encoder, " "as in the following complete example::" msgstr "" -#: howto/logging-cookbook.rst:1806 +#: howto/logging-cookbook.rst:1821 msgid "When the above script is run, it prints:" msgstr "" -#: howto/logging-cookbook.rst:1821 +#: howto/logging-cookbook.rst:1836 msgid "Customizing handlers with :func:`dictConfig`" msgstr "" -#: howto/logging-cookbook.rst:1823 +#: howto/logging-cookbook.rst:1838 msgid "" "There are times when you want to customize logging handlers in particular " "ways, and if you use :func:`dictConfig` you may be able to do this without " @@ -960,24 +1328,24 @@ msgid "" "customize handler creation using a plain function such as::" msgstr "" -#: howto/logging-cookbook.rst:1837 +#: howto/logging-cookbook.rst:1852 msgid "" "You can then specify, in a logging configuration passed to :func:" "`dictConfig`, that a logging handler be created by calling this function::" msgstr "" -#: howto/logging-cookbook.rst:1870 +#: howto/logging-cookbook.rst:1885 msgid "" "In this example I am setting the ownership using the ``pulse`` user and " "group, just for the purposes of illustration. Putting it together into a " "working script, ``chowntest.py``::" msgstr "" -#: howto/logging-cookbook.rst:1917 +#: howto/logging-cookbook.rst:1932 msgid "To run this, you will probably need to run as ``root``:" msgstr "" -#: howto/logging-cookbook.rst:1927 +#: howto/logging-cookbook.rst:1942 msgid "" "Note that this example uses Python 3.3 because that's where :func:`shutil." "chown` makes an appearance. This approach should work with any Python " @@ -986,17 +1354,17 @@ msgid "" "change using e.g. :func:`os.chown`." msgstr "" -#: howto/logging-cookbook.rst:1933 +#: howto/logging-cookbook.rst:1948 msgid "" "In practice, the handler-creating function may be in a utility module " "somewhere in your project. Instead of the line in the configuration::" msgstr "" -#: howto/logging-cookbook.rst:1938 +#: howto/logging-cookbook.rst:1953 msgid "you could use e.g.::" msgstr "" -#: howto/logging-cookbook.rst:1942 +#: howto/logging-cookbook.rst:1957 msgid "" "where ``project.util`` can be replaced with the actual name of the package " "where the function resides. In the above working script, using ``'ext://" @@ -1004,25 +1372,25 @@ msgid "" "resolved by :func:`dictConfig` from the ``ext://`` specification." msgstr "" -#: howto/logging-cookbook.rst:1947 +#: howto/logging-cookbook.rst:1962 msgid "" "This example hopefully also points the way to how you could implement other " "types of file change - e.g. setting specific POSIX permission bits - in the " "same way, using :func:`os.chmod`." msgstr "" -#: howto/logging-cookbook.rst:1951 +#: howto/logging-cookbook.rst:1966 msgid "" "Of course, the approach could also be extended to types of handler other " "than a :class:`~logging.FileHandler` - for example, one of the rotating file " "handlers, or a different type of handler altogether." msgstr "" -#: howto/logging-cookbook.rst:1961 +#: howto/logging-cookbook.rst:1976 msgid "Using particular formatting styles throughout your application" msgstr "" -#: howto/logging-cookbook.rst:1963 +#: howto/logging-cookbook.rst:1978 msgid "" "In Python 3.2, the :class:`~logging.Formatter` gained a ``style`` keyword " "parameter which, while defaulting to ``%`` for backward compatibility, " @@ -1033,7 +1401,7 @@ msgid "" "is constructed." msgstr "" -#: howto/logging-cookbook.rst:1970 +#: howto/logging-cookbook.rst:1985 msgid "" "Logging calls (:meth:`~Logger.debug`, :meth:`~Logger.info` etc.) only take " "positional parameters for the actual logging message itself, with keyword " @@ -1048,7 +1416,7 @@ msgid "" "calls which are out there in existing code will be using %-format strings." msgstr "" -#: howto/logging-cookbook.rst:1982 +#: howto/logging-cookbook.rst:1997 msgid "" "There have been suggestions to associate format styles with specific " "loggers, but that approach also runs into backward compatibility problems " @@ -1056,7 +1424,7 @@ msgid "" "formatting." msgstr "" -#: howto/logging-cookbook.rst:1986 +#: howto/logging-cookbook.rst:2001 msgid "" "For logging to work interoperably between any third-party libraries and your " "code, decisions about formatting need to be made at the level of the " @@ -1064,11 +1432,11 @@ msgid "" "formatting styles can be accommodated." msgstr "" -#: howto/logging-cookbook.rst:1993 +#: howto/logging-cookbook.rst:2008 msgid "Using LogRecord factories" msgstr "" -#: howto/logging-cookbook.rst:1995 +#: howto/logging-cookbook.rst:2010 msgid "" "In Python 3.2, along with the :class:`~logging.Formatter` changes mentioned " "above, the logging package gained the ability to allow users to set their " @@ -1083,17 +1451,17 @@ msgid "" "implementation does." msgstr "" -#: howto/logging-cookbook.rst:2006 +#: howto/logging-cookbook.rst:2021 msgid "" "Refer to the reference documentation on :func:`setLogRecordFactory` and :" "class:`LogRecord` for more information." msgstr "" -#: howto/logging-cookbook.rst:2011 +#: howto/logging-cookbook.rst:2026 msgid "Using custom message objects" msgstr "" -#: howto/logging-cookbook.rst:2013 +#: howto/logging-cookbook.rst:2028 msgid "" "There is another, perhaps simpler way that you can use {}- and $- formatting " "to construct your individual log messages. You may recall (from :ref:" @@ -1103,7 +1471,7 @@ msgid "" "following two classes::" msgstr "" -#: howto/logging-cookbook.rst:2038 +#: howto/logging-cookbook.rst:2053 msgid "" "Either of these can be used in place of a format string, to allow {}- or $-" "formatting to be used to build the actual \"message\" part which appears in " @@ -1114,17 +1482,17 @@ msgid "" "using ``_`` for localization)." msgstr "" -#: howto/logging-cookbook.rst:2046 +#: howto/logging-cookbook.rst:2061 msgid "" "Examples of this approach are given below. Firstly, formatting with :meth:" "`str.format`::" msgstr "" -#: howto/logging-cookbook.rst:2060 +#: howto/logging-cookbook.rst:2075 msgid "Secondly, formatting with :class:`string.Template`::" msgstr "" -#: howto/logging-cookbook.rst:2067 +#: howto/logging-cookbook.rst:2082 msgid "" "One thing to note is that you pay no significant performance penalty with " "this approach: the actual formatting happens not when you make the logging " @@ -1136,11 +1504,11 @@ msgid "" "above." msgstr "" -#: howto/logging-cookbook.rst:2081 +#: howto/logging-cookbook.rst:2096 msgid "Configuring filters with :func:`dictConfig`" msgstr "" -#: howto/logging-cookbook.rst:2083 +#: howto/logging-cookbook.rst:2098 msgid "" "You *can* configure filters using :func:`~logging.config.dictConfig`, though " "it might not be obvious at first glance how to do it (hence this recipe). " @@ -1155,22 +1523,22 @@ msgid "" "complete example::" msgstr "" -#: howto/logging-cookbook.rst:2136 +#: howto/logging-cookbook.rst:2151 msgid "" "This example shows how you can pass configuration data to the callable which " "constructs the instance, in the form of keyword parameters. When run, the " "above script will print:" msgstr "" -#: howto/logging-cookbook.rst:2144 +#: howto/logging-cookbook.rst:2159 msgid "which shows that the filter is working as configured." msgstr "" -#: howto/logging-cookbook.rst:2146 +#: howto/logging-cookbook.rst:2161 msgid "A couple of extra points to note:" msgstr "" -#: howto/logging-cookbook.rst:2148 +#: howto/logging-cookbook.rst:2163 msgid "" "If you can't refer to the callable directly in the configuration (e.g. if it " "lives in a different module, and you can't import it directly where the " @@ -1180,7 +1548,7 @@ msgid "" "the above example." msgstr "" -#: howto/logging-cookbook.rst:2155 +#: howto/logging-cookbook.rst:2170 msgid "" "As well as for filters, this technique can also be used to configure custom " "handlers and formatters. See :ref:`logging-config-dict-userdef` for more " @@ -1189,11 +1557,11 @@ msgid "" "above." msgstr "" -#: howto/logging-cookbook.rst:2164 +#: howto/logging-cookbook.rst:2179 msgid "Customized exception formatting" msgstr "" -#: howto/logging-cookbook.rst:2166 +#: howto/logging-cookbook.rst:2181 msgid "" "There might be times when you want to do customized exception formatting - " "for argument's sake, let's say you want exactly one line per logged event, " @@ -1201,22 +1569,22 @@ msgid "" "formatter class, as shown in the following example::" msgstr "" -#: howto/logging-cookbook.rst:2207 +#: howto/logging-cookbook.rst:2222 msgid "When run, this produces a file with exactly two lines:" msgstr "" -#: howto/logging-cookbook.rst:2214 +#: howto/logging-cookbook.rst:2229 msgid "" "While the above treatment is simplistic, it points the way to how exception " "information can be formatted to your liking. The :mod:`traceback` module may " "be helpful for more specialized needs." msgstr "" -#: howto/logging-cookbook.rst:2221 +#: howto/logging-cookbook.rst:2236 msgid "Speaking logging messages" msgstr "" -#: howto/logging-cookbook.rst:2223 +#: howto/logging-cookbook.rst:2238 msgid "" "There might be situations when it is desirable to have logging messages " "rendered in an audible rather than a visible format. This is easy to do if " @@ -1233,24 +1601,24 @@ msgid "" "approach, which assumes that the ``espeak`` TTS package is available::" msgstr "" -#: howto/logging-cookbook.rst:2265 +#: howto/logging-cookbook.rst:2280 msgid "" "When run, this script should say \"Hello\" and then \"Goodbye\" in a female " "voice." msgstr "" -#: howto/logging-cookbook.rst:2267 +#: howto/logging-cookbook.rst:2282 msgid "" "The above approach can, of course, be adapted to other TTS systems and even " "other systems altogether which can process messages via external programs " "run from a command line." msgstr "" -#: howto/logging-cookbook.rst:2275 +#: howto/logging-cookbook.rst:2290 msgid "Buffering logging messages and outputting them conditionally" msgstr "" -#: howto/logging-cookbook.rst:2277 +#: howto/logging-cookbook.rst:2292 msgid "" "There might be situations where you want to log messages in a temporary area " "and only output them if a certain condition occurs. For example, you may " @@ -1260,7 +1628,7 @@ msgid "" "debug information to be output as well as the error." msgstr "" -#: howto/logging-cookbook.rst:2284 +#: howto/logging-cookbook.rst:2299 msgid "" "Here is an example which shows how you could do this using a decorator for " "your functions where you want logging to behave this way. It makes use of " @@ -1273,7 +1641,7 @@ msgid "" "subclass of ``MemoryHandler`` if you want custom flushing behavior." msgstr "" -#: howto/logging-cookbook.rst:2294 +#: howto/logging-cookbook.rst:2309 msgid "" "The example script has a simple function, ``foo``, which just cycles through " "all the logging levels, writing to ``sys.stderr`` to say what level it's " @@ -1282,7 +1650,7 @@ msgid "" "levels - otherwise, it only logs at DEBUG, INFO and WARNING levels." msgstr "" -#: howto/logging-cookbook.rst:2300 +#: howto/logging-cookbook.rst:2315 msgid "" "The script just arranges to decorate ``foo`` with a decorator which will do " "the conditional logging that's required. The decorator takes a logger as a " @@ -1294,36 +1662,36 @@ msgid "" "respectively." msgstr "" -#: howto/logging-cookbook.rst:2308 +#: howto/logging-cookbook.rst:2323 msgid "Here's the script::" msgstr "" -#: howto/logging-cookbook.rst:2371 +#: howto/logging-cookbook.rst:2386 msgid "When this script is run, the following output should be observed:" msgstr "" -#: howto/logging-cookbook.rst:2401 +#: howto/logging-cookbook.rst:2416 msgid "" "As you can see, actual logging output only occurs when an event is logged " "whose severity is ERROR or greater, but in that case, any previous events at " "lower severities are also logged." msgstr "" -#: howto/logging-cookbook.rst:2405 +#: howto/logging-cookbook.rst:2420 msgid "You can of course use the conventional means of decoration::" msgstr "" -#: howto/logging-cookbook.rst:2415 +#: howto/logging-cookbook.rst:2430 msgid "Formatting times using UTC (GMT) via configuration" msgstr "" -#: howto/logging-cookbook.rst:2417 +#: howto/logging-cookbook.rst:2432 msgid "" "Sometimes you want to format times using UTC, which can be done using a " "class such as `UTCFormatter`, shown below::" msgstr "" -#: howto/logging-cookbook.rst:2426 +#: howto/logging-cookbook.rst:2441 msgid "" "and you can then use the ``UTCFormatter`` in your code instead of :class:" "`~logging.Formatter`. If you want to do that via configuration, you can use " @@ -1331,21 +1699,21 @@ msgid "" "the following complete example::" msgstr "" -#: howto/logging-cookbook.rst:2469 +#: howto/logging-cookbook.rst:2484 msgid "When this script is run, it should print something like:" msgstr "" -#: howto/logging-cookbook.rst:2476 +#: howto/logging-cookbook.rst:2491 msgid "" "showing how the time is formatted both as local time and UTC, one for each " "handler." msgstr "" -#: howto/logging-cookbook.rst:2483 +#: howto/logging-cookbook.rst:2498 msgid "Using a context manager for selective logging" msgstr "" -#: howto/logging-cookbook.rst:2485 +#: howto/logging-cookbook.rst:2500 msgid "" "There are times when it would be useful to temporarily change the logging " "configuration and revert it back after doing something. For this, a context " @@ -1355,7 +1723,7 @@ msgid "" "scope of the context manager::" msgstr "" -#: howto/logging-cookbook.rst:2518 +#: howto/logging-cookbook.rst:2533 msgid "" "If you specify a level value, the logger's level is set to that value in the " "scope of the with block covered by the context manager. If you specify a " @@ -1364,13 +1732,13 @@ msgid "" "block exit - you could do this if you don't need the handler any more." msgstr "" -#: howto/logging-cookbook.rst:2524 +#: howto/logging-cookbook.rst:2539 msgid "" "To illustrate how it works, we can add the following block of code to the " "above::" msgstr "" -#: howto/logging-cookbook.rst:2542 +#: howto/logging-cookbook.rst:2557 msgid "" "We initially set the logger's level to ``INFO``, so message #1 appears and " "message #2 doesn't. We then change the level to ``DEBUG`` temporarily in the " @@ -1383,56 +1751,56 @@ msgid "" "(like message #1) whereas message #7 doesn't (just like message #2)." msgstr "" -#: howto/logging-cookbook.rst:2552 +#: howto/logging-cookbook.rst:2567 msgid "If we run the resulting script, the result is as follows:" msgstr "" -#: howto/logging-cookbook.rst:2563 +#: howto/logging-cookbook.rst:2578 msgid "" "If we run it again, but pipe ``stderr`` to ``/dev/null``, we see the " "following, which is the only message written to ``stdout``:" msgstr "" -#: howto/logging-cookbook.rst:2571 +#: howto/logging-cookbook.rst:2586 msgid "Once again, but piping ``stdout`` to ``/dev/null``, we get:" msgstr "" -#: howto/logging-cookbook.rst:2581 +#: howto/logging-cookbook.rst:2596 msgid "" "In this case, the message #5 printed to ``stdout`` doesn't appear, as " "expected." msgstr "" -#: howto/logging-cookbook.rst:2583 +#: howto/logging-cookbook.rst:2598 msgid "" "Of course, the approach described here can be generalised, for example to " "attach logging filters temporarily. Note that the above code works in Python " "2 as well as Python 3." msgstr "" -#: howto/logging-cookbook.rst:2591 +#: howto/logging-cookbook.rst:2606 msgid "A CLI application starter template" msgstr "" -#: howto/logging-cookbook.rst:2593 +#: howto/logging-cookbook.rst:2608 msgid "Here's an example which shows how you can:" msgstr "" -#: howto/logging-cookbook.rst:2595 +#: howto/logging-cookbook.rst:2610 msgid "Use a logging level based on command-line arguments" msgstr "" -#: howto/logging-cookbook.rst:2596 +#: howto/logging-cookbook.rst:2611 msgid "" "Dispatch to multiple subcommands in separate files, all logging at the same " "level in a consistent way" msgstr "" -#: howto/logging-cookbook.rst:2598 +#: howto/logging-cookbook.rst:2613 msgid "Make use of simple, minimal configuration" msgstr "" -#: howto/logging-cookbook.rst:2600 +#: howto/logging-cookbook.rst:2615 msgid "" "Suppose we have a command-line application whose job is to stop, start or " "restart some services. This could be organised for the purposes of " @@ -1443,53 +1811,53 @@ msgid "" "``logging.INFO``. Here's one way that ``app.py`` could be written::" msgstr "" -#: howto/logging-cookbook.rst:2649 +#: howto/logging-cookbook.rst:2664 msgid "" "And the ``start``, ``stop`` and ``restart`` commands can be implemented in " "separate modules, like so for starting::" msgstr "" -#: howto/logging-cookbook.rst:2662 +#: howto/logging-cookbook.rst:2677 msgid "and thus for stopping::" msgstr "" -#: howto/logging-cookbook.rst:2683 +#: howto/logging-cookbook.rst:2698 msgid "and similarly for restarting::" msgstr "" -#: howto/logging-cookbook.rst:2704 +#: howto/logging-cookbook.rst:2719 msgid "" "If we run this application with the default log level, we get output like " "this:" msgstr "" -#: howto/logging-cookbook.rst:2717 +#: howto/logging-cookbook.rst:2732 msgid "" "The first word is the logging level, and the second word is the module or " "package name of the place where the event was logged." msgstr "" -#: howto/logging-cookbook.rst:2720 +#: howto/logging-cookbook.rst:2735 msgid "" "If we change the logging level, then we can change the information sent to " "the log. For example, if we want more information:" msgstr "" -#: howto/logging-cookbook.rst:2737 +#: howto/logging-cookbook.rst:2752 msgid "And if we want less:" msgstr "" -#: howto/logging-cookbook.rst:2745 +#: howto/logging-cookbook.rst:2760 msgid "" "In this case, the commands don't print anything to the console, since " "nothing at ``WARNING`` level or above is logged by them." msgstr "" -#: howto/logging-cookbook.rst:2751 +#: howto/logging-cookbook.rst:2766 msgid "A Qt GUI for logging" msgstr "" -#: howto/logging-cookbook.rst:2753 +#: howto/logging-cookbook.rst:2768 msgid "" "A question that comes up from time to time is about how to log to a GUI " "application. The `Qt `_ framework is a popular cross-" @@ -1497,7 +1865,7 @@ msgid "" "project/PySide2/>`_ or `PyQt5 `_ libraries." msgstr "" -#: howto/logging-cookbook.rst:2759 +#: howto/logging-cookbook.rst:2774 msgid "" "The following example shows how to log to a Qt GUI. This introduces a simple " "``QtHandler`` class which takes a callable, which should be a slot in the " @@ -1507,17 +1875,134 @@ msgid "" "logging messages at random levels with random short delays in between)." msgstr "" -#: howto/logging-cookbook.rst:2766 +#: howto/logging-cookbook.rst:2781 msgid "" "The worker thread is implemented using Qt's ``QThread`` class rather than " "the :mod:`threading` module, as there are circumstances where one has to use " "``QThread``, which offers better integration with other ``Qt`` components." msgstr "" -#: howto/logging-cookbook.rst:2770 +#: howto/logging-cookbook.rst:2785 msgid "" "The code should work with recent releases of either ``PySide2`` or " "``PyQt5``. You should be able to adapt the approach to earlier versions of " "Qt. Please refer to the comments in the code snippet for more detailed " "information." msgstr "" + +#: howto/logging-cookbook.rst:3002 +msgid "Patterns to avoid" +msgstr "" + +#: howto/logging-cookbook.rst:3004 +msgid "" +"Although the preceding sections have described ways of doing things you " +"might need to do or deal with, it is worth mentioning some usage patterns " +"which are *unhelpful*, and which should therefore be avoided in most cases. " +"The following sections are in no particular order." +msgstr "" + +#: howto/logging-cookbook.rst:3011 +msgid "Opening the same log file multiple times" +msgstr "" + +#: howto/logging-cookbook.rst:3013 +msgid "" +"On Windows, you will generally not be able to open the same file multiple " +"times as this will lead to a \"file is in use by another process\" error. " +"However, on POSIX platforms you'll not get any errors if you open the same " +"file multiple times. This could be done accidentally, for example by:" +msgstr "" + +#: howto/logging-cookbook.rst:3018 +msgid "" +"Adding a file handler more than once which references the same file (e.g. by " +"a copy/paste/forget-to-change error)." +msgstr "" + +#: howto/logging-cookbook.rst:3021 +msgid "" +"Opening two files that look different, as they have different names, but are " +"the same because one is a symbolic link to the other." +msgstr "" + +#: howto/logging-cookbook.rst:3024 +msgid "" +"Forking a process, following which both parent and child have a reference to " +"the same file. This might be through use of the :mod:`multiprocessing` " +"module, for example." +msgstr "" + +#: howto/logging-cookbook.rst:3028 +msgid "" +"Opening a file multiple times might *appear* to work most of the time, but " +"can lead to a number of problems in practice:" +msgstr "" + +#: howto/logging-cookbook.rst:3031 +msgid "" +"Logging output can be garbled because multiple threads or processes try to " +"write to the same file. Although logging guards against concurrent use of " +"the same handler instance by multiple threads, there is no such protection " +"if concurrent writes are attempted by two different threads using two " +"different handler instances which happen to point to the same file." +msgstr "" + +#: howto/logging-cookbook.rst:3037 +msgid "" +"An attempt to delete a file (e.g. during file rotation) silently fails, " +"because there is another reference pointing to it. This can lead to " +"confusion and wasted debugging time - log entries end up in unexpected " +"places, or are lost altogether. Or a file that was supposed to be moved " +"remains in place, and grows in size unexpectedly despite size-based rotation " +"being supposedly in place." +msgstr "" + +#: howto/logging-cookbook.rst:3044 +msgid "" +"Use the techniques outlined in :ref:`multiple-processes` to circumvent such " +"issues." +msgstr "" + +#: howto/logging-cookbook.rst:3048 +msgid "Using loggers as attributes in a class or passing them as parameters" +msgstr "" + +#: howto/logging-cookbook.rst:3050 +msgid "" +"While there might be unusual cases where you'll need to do this, in general " +"there is no point because loggers are singletons. Code can always access a " +"given logger instance by name using ``logging.getLogger(name)``, so passing " +"instances around and holding them as instance attributes is pointless. Note " +"that in other languages such as Java and C#, loggers are often static class " +"attributes. However, this pattern doesn't make sense in Python, where the " +"module (and not the class) is the unit of software decomposition." +msgstr "" + +#: howto/logging-cookbook.rst:3060 +msgid "" +"Adding handlers other than :class:`NullHandler` to a logger in a library" +msgstr "" + +#: howto/logging-cookbook.rst:3062 +msgid "" +"Configuring logging by adding handlers, formatters and filters is the " +"responsibility of the application developer, not the library developer. If " +"you are maintaining a library, ensure that you don't add handlers to any of " +"your loggers other than a :class:`~logging.NullHandler` instance." +msgstr "" + +#: howto/logging-cookbook.rst:3069 +msgid "Creating a lot of loggers" +msgstr "" + +#: howto/logging-cookbook.rst:3071 +msgid "" +"Loggers are singletons that are never freed during a script execution, and " +"so creating lots of loggers will use up memory which can't then be freed. " +"Rather than create a logger per e.g. file processed or network connection " +"made, use the :ref:`existing mechanisms ` for passing " +"contextual information into your logs and restrict the loggers created to " +"those describing areas within your application (generally modules, but " +"occasionally slightly more fine-grained than that)." +msgstr "" diff --git a/howto/logging.po b/howto/logging.po index c315acab55..2208fe86f9 100644 --- a/howto/logging.po +++ b/howto/logging.po @@ -4,15 +4,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2021-01-28 15:44+0100\n" -"Last-Translator: Jules Lasne \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-11-14 16:11+0100\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.2\n" +"X-Generator: Poedit 3.0\n" #: howto/logging.rst:3 msgid "Logging HOWTO" @@ -28,7 +28,7 @@ msgstr "Vinay Sajip " #: howto/logging.rst:12 msgid "Basic Logging Tutorial" -msgstr "Les bases de l'utilisation du module `logging`" +msgstr "Les bases de l'utilisation du module ``logging``" #: howto/logging.rst:14 msgid "" @@ -52,7 +52,7 @@ msgstr "" #: howto/logging.rst:23 msgid "When to use logging" -msgstr "Quand utiliser `logging`" +msgstr "Quand utiliser ``logging``" #: howto/logging.rst:25 msgid "" @@ -161,7 +161,7 @@ msgstr "" "sévérité des évènements qu'elles suivent. Les niveaux standards et leurs " "applications sont décrits ci-dessous (par ordre croissant de sévérité) :" -#: howto/logging.rst:855 +#: howto/logging.rst:861 msgid "Level" msgstr "Niveau" @@ -169,7 +169,7 @@ msgstr "Niveau" msgid "When it's used" msgstr "Quand il est utilisé" -#: howto/logging.rst:865 +#: howto/logging.rst:871 msgid "``DEBUG``" msgstr "``DEBUG``" @@ -180,7 +180,7 @@ msgstr "" "Information détaillée, intéressante seulement lorsqu'on diagnostique un " "problème." -#: howto/logging.rst:863 +#: howto/logging.rst:869 msgid "``INFO``" msgstr "``INFO``" @@ -188,7 +188,7 @@ msgstr "``INFO``" msgid "Confirmation that things are working as expected." msgstr "Confirmation que tout fonctionne comme prévu." -#: howto/logging.rst:861 +#: howto/logging.rst:867 msgid "``WARNING``" msgstr "``WARNING``" @@ -202,7 +202,7 @@ msgstr "" "d'un problème dans un futur proche (par exemple « espace disque faible »). " "Le logiciel fonctionne encore normalement." -#: howto/logging.rst:859 +#: howto/logging.rst:865 msgid "``ERROR``" msgstr "``ERROR``" @@ -214,7 +214,7 @@ msgstr "" "Du fait d'un problème plus sérieux, le logiciel n'a pas été capable de " "réaliser une tâche." -#: howto/logging.rst:857 +#: howto/logging.rst:863 msgid "``CRITICAL``" msgstr "``CRITICAL``" @@ -337,7 +337,7 @@ msgid "" "and you have the value of the parameter passed for ``--log`` in some " "variable *loglevel*, you can use::" msgstr "" -"et que vous passez ensuite la valeur du paramètre donné à l'option `--log` " +"et que vous passez ensuite la valeur du paramètre donné à l'option ``--log`` " "dans une variable *loglevel*, vous pouvez utiliser ::" #: howto/logging.rst:169 @@ -415,7 +415,7 @@ msgstr "" "Remarquez qu'avec cette méthode simple, vous ne pourrez pas savoir, en " "lisant le fichier de log, *d'où* viennent les messages dans votre " "application, sauf dans la description de l'évènement. Si vous voulez suivre " -"la localisation des messages, référerez-vous à la documentation avancée :ref:" +"la localisation des messages, référez-vous à la documentation avancée :ref:" "`logging-advanced-tutorial`." #: howto/logging.rst:242 @@ -446,10 +446,10 @@ msgid "" msgstr "" "Comme vous pouvez le voir, l'inclusion des données variables dans le message " "de description de l'évènement emploie le vieux style de formatage avec %. " -"C'est pour assurer la rétrocompatibilité : le module `logging` est antérieur " -"aux nouvelles options de formatage comme :meth:`str.format` ou :class:" -"`string.Template`. Ces nouvelles options de formatage *sont* gérées, mais " -"leur exploration sort du cadre de ce tutoriel, voyez :ref:`formatting-" +"C'est pour assurer la rétrocompatibilité : le module ``logging`` est " +"antérieur aux nouvelles options de formatage comme :meth:`str.format` ou :" +"class:`string.Template`. Ces nouvelles options de formatage *sont* gérées, " +"mais leur exploration sort du cadre de ce tutoriel, voyez :ref:`formatting-" "styles` pour plus d'information." #: howto/logging.rst:265 @@ -477,13 +477,13 @@ msgid "" "including variable data) and perhaps to display when the event occurred. " "This is described in the next section." msgstr "" -"Notez que le `root` qui apparaissait dans les exemples précédents a disparu. " -"Pour voir l'ensemble des éléments qui peuvent apparaître dans la chaîne de " -"format, référez-vous à la documentation pour :ref:`logrecord-attributes`. " -"Pour une utilisation simple, vous avez seulement besoin du *levelname* (la " -"sévérité), du *message* (la description de l'évènement, avec les données " -"variables) et peut-être du moment auquel l'évènement a eu lieu. Nous " -"décrivons ces points dans la prochaine section." +"Notez que le ``root`` qui apparaissait dans les exemples précédents a " +"disparu. Pour voir l'ensemble des éléments qui peuvent apparaître dans la " +"chaîne de format, référez-vous à la documentation pour :ref:`logrecord-" +"attributes`. Pour une utilisation simple, vous avez seulement besoin du " +"*levelname* (la sévérité), du *message* (la description de l'évènement, avec " +"les données variables) et peut-être du moment auquel l'évènement a eu lieu. " +"Nous décrivons ces points dans la prochaine section." #: howto/logging.rst:293 msgid "Displaying the date/time in messages" @@ -494,8 +494,8 @@ msgid "" "To display the date and time of an event, you would place '%(asctime)s' in " "your format string::" msgstr "" -"Pour afficher la date ou le temps d'un évènement, ajoutez `%(asctime)` dans " -"votre chaîne de formatage ::" +"Pour afficher la date ou le temps d'un évènement, ajoutez ``'%(asctime)'`` " +"dans votre chaîne de formatage ::" #: howto/logging.rst:302 msgid "which should print something like this:" @@ -535,10 +535,10 @@ msgid "" "of your favourite beverage and carry on." msgstr "" "Nous concluons ainsi le tutoriel basique. Il devrait suffire à vous mettre " -"le pied à l'étrier pour utiliser `logging`. Le module `logging` a beaucoup " -"d'autre cordes à son arc, mais pour en profiter au maximum, vous devez " -"prendre le temps de lire les sections suivantes. Si vous êtes prêt, servez-" -"vous votre boisson préférée et poursuivons." +"le pied à l'étrier pour utiliser ``logging``. Le module ``logging`` a " +"beaucoup d'autre cordes à son arc, mais pour en profiter au maximum, vous " +"devez prendre le temps de lire les sections suivantes. Si vous êtes prêt, " +"servez-vous votre boisson préférée et poursuivons." #: howto/logging.rst:335 msgid "" @@ -548,10 +548,10 @@ msgid "" "group (available at https://groups.google.com/forum/#!forum/comp.lang." "python) and you should receive help before too long." msgstr "" -"Si vos besoins avec `logging` sont simples, vous pouvez incorporer les " +"Si vos besoins avec ``logging`` sont simples, vous pouvez incorporer les " "exemples ci-dessus dans vos scripts. Si vous rencontrez des difficultés ou " "s'il y a quelque chose que vous ne comprenez pas, vous pouvez poser une " -"question sur le groupe Usenet `comp.lang.python` (accessible à https://" +"question sur le groupe Usenet ``comp.lang.python`` (accessible à https://" "groups.google.com/forum/#!forum/comp.lang.python), on vous répondra " "rapidement." @@ -628,9 +628,9 @@ msgstr "" "classe :class:`Logger` (que l'on appelle ci-dessous :dfn:`loggers`). Chaque " "instance a un nom et les instances sont organisées conceptuellement comme " "des hiérarchies dans l'espace de nommage, en utilisant un point comme " -"séparateur. Par exemple, un `logger` appelé `scan` est le parent des " -"`loggers` `scan.text`, `scan.html` et `scan.pdf`. Les noms des `loggers` " -"peuvent être ce que vous voulez et indiquent le sous-domaine d'une " +"séparateur. Par exemple, un *logger* appelé ``scan`` est le parent des " +"*loggers* ``scan.text``, ``scan.html`` et ``scan.pdf``. Les noms des " +"*loggers* peuvent être ce que vous voulez et indiquent le sous-domaine d'une " "application depuis lequel le message enregistré a été émis." #: howto/logging.rst:371 @@ -639,7 +639,7 @@ msgid "" "logger, in each module which uses logging, named as follows::" msgstr "" "Une bonne convention lorsqu'on nomme les *loggers* est d'utiliser un " -"*logger* au niveau du module, dans chaque module qui emploie `logging`, " +"*logger* au niveau du module, dans chaque module qui emploie ``logging``, " "nommé de la façon suivante ::" #: howto/logging.rst:376 @@ -647,9 +647,9 @@ msgid "" "This means that logger names track the package/module hierarchy, and it's " "intuitively obvious where events are logged just from the logger name." msgstr "" -"Cela signifie que le nom d'un `logger` se rapporte à la hiérarchie du paquet " +"Cela signifie que le nom d'un *logger* se rapporte à la hiérarchie du paquet " "et des modules, et il est évident de voir où un événement a été enregistré " -"simplement en regardant le nom du `logger`." +"simplement en regardant le nom du *logger*." #: howto/logging.rst:379 msgid "" @@ -659,12 +659,12 @@ msgid "" "the root logger. The functions and the methods have the same signatures. The " "root logger's name is printed as 'root' in the logged output." msgstr "" -"La racine de la hiérarchie des `loggers` est appelée le *root logger*. C'est " -"le `logger` utilisé par les fonctions :func:`debug`, :func:`info`, :func:" -"`warning`, :func:`error` et :func:`critical`, qui appelle en fait les " +"La racine de la hiérarchie des enregistreurs est appelée le *root logger*. " +"C'est le *logger* utilisé par les fonctions :func:`debug`, :func:`info`, :" +"func:`warning`, :func:`error` et :func:`critical`, qui appelle en fait les " "méthodes du même nom de l'objet *root logger*. Les fonctions et les méthodes " -"ont la même signature. Le nom du *root logger* est affiché comme « `root` » " -"dans la sortie." +"ont la même signature. Le nom du *root logger* est affiché comme " +"« ``'root'`` » dans la sortie." #: howto/logging.rst:385 msgid "" @@ -733,8 +733,8 @@ msgid "" "The flow of log event information in loggers and handlers is illustrated in " "the following diagram." msgstr "" -"Le flux des informations associées à un évènement dans les `loggers` et les " -"`handlers` est illustré dans le diagramme suivant." +"Le flux des informations associées à un évènement dans les *loggers* et les " +"*handlers* est illustré dans le diagramme suivant." #: howto/logging.rst:419 msgid "Loggers" @@ -752,17 +752,17 @@ msgstr "" "Les objets de classe :class:`Logger` ont un rôle triple. Premièrement, ils " "exposent plusieurs méthodes au code de l'application, de manière à ce " "qu'elle puisse enregistrer des messages en cours d'exécution. Deuxièmement, " -"les objets `logger` déterminent sur quel message agir selon leur sévérité (à " -"partir des filtres par défaut) ou selon les objets `filter` associés. " -"Troisièmement, les objets `logger` transmettent les messages pertinents à " -"tous les `handlers` concernés." +"les objets *logger* déterminent sur quel message agir selon leur sévérité (à " +"partir des filtres par défaut) ou selon les objets *filter* associés. " +"Troisièmement, les objets *logger* transmettent les messages pertinents à " +"tous les *handlers* concernés." #: howto/logging.rst:427 msgid "" "The most widely used methods on logger objects fall into two categories: " "configuration and message sending." msgstr "" -"Les méthodes des objets `logger` les plus utilisées appartiennent à deux " +"Les méthodes des objets *logger* les plus utilisées appartiennent à deux " "catégories : la configuration et l'envoi de messages." #: howto/logging.rst:430 @@ -778,10 +778,11 @@ msgid "" "messages and will ignore DEBUG messages." msgstr "" ":meth:`Logger.setLevel` spécifie le plus bas niveau de sévérité qu'un " -"`logger` traitera. Ainsi, `debug` est le niveau de sévérité défini par " -"défaut le plus bas et `critical` est le plus haut. Par exemple, si le niveau " -"de sévérité est INFO, le `logger` ne traite que les messages de niveau INFO, " -"WARNING, ERROR et CRITICAL ; il ignore les messages de niveau DEBUG." +"*logger* traitera. Ainsi, ``DEBUG`` est le niveau de sévérité défini par " +"défaut le plus bas et ``CRITICAL`` est le plus haut. Par exemple, si le " +"niveau de sévérité est ``INFO``, le *logger* ne traite que les messages de " +"niveau ``INFO``, ``WARNING``, ``ERROR`` et ``CRITICAL`` ; il ignore les " +"messages de niveau DEBUG." #: howto/logging.rst:438 msgid "" @@ -790,7 +791,7 @@ msgid "" "in :ref:`handler-basic`." msgstr "" ":meth:`Logger.addHandler` et :meth:`Logger.removeHandler` ajoutent ou " -"enlèvent des objets `handlers` au `logger`. Les objets `handlers` sont " +"enlèvent des objets *handlers* au *logger*. Les objets *handlers* sont " "expliqués plus en détail dans :ref:`handler-basic`." #: howto/logging.rst:442 @@ -800,7 +801,7 @@ msgid "" "in :ref:`filter`." msgstr "" ":meth:`Logger.addFilter` et :meth:`Logger.removeFilter` ajoutent ou enlèvent " -"des objets `filter` au `logger`. Les objets `filters` sont expliqués plus en " +"des objets *filter* au *logger*. Les objets *filters* sont expliqués plus en " "détail dans :ref:`filter`." #: howto/logging.rst:446 @@ -810,13 +811,13 @@ msgid "" msgstr "" "Comme nous l'expliquons aux deux derniers paragraphes de cette section, vous " "n'avez pas besoin de faire appel à ces méthodes à chaque fois que vous créez " -"un `logger`." +"un *logger*." #: howto/logging.rst:449 msgid "" "With the logger object configured, the following methods create log messages:" msgstr "" -"Une fois que l'objet `logger` est correctement configuré, les méthodes " +"Une fois que l'objet *logger* est correctement configuré, les méthodes " "suivantes permettent de créer un message :" #: howto/logging.rst:451 @@ -838,7 +839,7 @@ msgstr "" "de substitution de chaînes de caractères : ``%s``, ``%d``, ``%f``, etc. " "L'argument suivant est une liste des objets correspondant aux champs à " "substituer dans le message. En ce qui concerne ``**kwargs``, les méthodes de " -"`logging` ne tiennent compte que du mot clef ``exc_info`` et l'utilisent " +"``logging`` ne tiennent compte que du mot clef ``exc_info`` et l'utilisent " "pour déterminer s'il faut enregistrer les informations associées à une " "exception." @@ -877,13 +878,13 @@ msgid "" "loggers with names of ``foo.bar``, ``foo.bar.baz``, and ``foo.bam`` are all " "descendants of ``foo``." msgstr "" -":func:`getLogger` renvoie une référence à un objet `logger` du nom spécifié " -"si celui-ci est donné en argument. Dans le cas contraire, se sera le `logger " -"root`. Ces noms sont des structures hiérarchiques séparées par des points. " +":func:`getLogger` renvoie une référence à un objet *logger* du nom spécifié " +"si celui-ci est donné en argument. Dans le cas contraire, se sera le *logger " +"root*. Ces noms sont des structures hiérarchiques séparées par des points. " "Des appels répétés à :func:`getLogger` avec le même nom renvoient une " -"référence au même objet `logger`. Les `loggers` qui sont plus bas dans cette " -"liste hiérarchique sont des enfants des `loggers` plus haut dans la liste. " -"Par exemple, si un `logger` a le nom ``foo``, les `loggers` avec les noms " +"référence au même objet *logger*. Les *loggers* qui sont plus bas dans cette " +"liste hiérarchique sont des enfants des *loggers* plus haut dans la liste. " +"Par exemple, si un *logger* a le nom ``foo``, les *loggers* avec les noms " "``foo.bar``, ``foo.bar.baz``, et ``foo.bam`` sont tous des descendants de " "``foo``." @@ -898,14 +899,14 @@ msgid "" "the logger is used to determine whether the event is passed to the logger's " "handlers." msgstr "" -"On associe aux `loggers` un concept de *niveau effectif*. Si aucun niveau " -"n'est explicitement défini pour un `logger`, c'est le niveau du parent qui " +"On associe aux *loggers* un concept de *niveau effectif*. Si aucun niveau " +"n'est explicitement défini pour un *logger*, c'est le niveau du parent qui " "est utilisé comme niveau effectif. Si le parent n'a pas de niveau défini, " "c'est celui de *son* parent qui est considéré, et ainsi de suite ; on " "examine tous les ancêtres jusqu'à ce qu'un niveau explicite soit trouvé. Le " -"`logger root` a toujours un niveau explicite (``WARNING`` par défaut). Quand " -"le `logger` traite un événement, c'est ce niveau effectif qui est utilisé " -"pour déterminer si cet événement est transmis à ses `handlers`." +"*logger root* a toujours un niveau explicite (``WARNING`` par défaut). Quand " +"le *logger* traite un événement, c'est ce niveau effectif qui est utilisé " +"pour déterminer si cet événement est transmis à ses *handlers*." #: howto/logging.rst:485 msgid "" @@ -916,13 +917,13 @@ msgid "" "needed. (You can, however, turn off propagation by setting the *propagate* " "attribute of a logger to ``False``.)" msgstr "" -"Les `loggers` fils font remonter leurs messages aux `handlers` associés à " -"leurs `loggers` parents. De ce fait, il n'est pas nécessaire de définir et " -"configurer des `handlers` pour tous les `loggers` employés par une " -"application. Il suffit de configurer les `handlers` pour un `logger` de haut " -"niveau et de créer des `loggers` fils quand c'est nécessaire (on peut " +"Les *loggers* fils font remonter leurs messages aux *handlers* associés à " +"leurs *loggers* parents. De ce fait, il n'est pas nécessaire de définir et " +"configurer des *handlers* pour tous les *loggers* employés par une " +"application. Il suffit de configurer les *handlers* pour un *logger* de haut " +"niveau et de créer des *loggers* fils quand c'est nécessaire (on peut " "cependant empêcher la propagation aux ancêtres des messages en donnant la " -"valeur ``False`` à l'attribut *propagate* d'un `logger`)." +"valeur ``False`` à l'attribut *propagate* d'un *logger*)." #: howto/logging.rst:496 msgid "Handlers" @@ -942,14 +943,14 @@ msgid "" msgstr "" "Les objets de type :class:`~logging.Handler` sont responsables de la " "distribution des messages (selon leur niveau de sévérité) vers les " -"destinations spécifiées pour ce `handler`. Les objets :class:`Logger` " -"peuvent ajouter des objets `handler` à eux-mêmes en appelant :meth:`~Logger." +"destinations spécifiées pour ce *handler*. Les objets :class:`Logger` " +"peuvent ajouter des objets *handler* à eux-mêmes en appelant :meth:`~Logger." "addHandler`. Pour donner un exemple, une application peut envoyer tous les " -"messages dans un fichier journal, tous les messages de niveau `error` ou " -"supérieur vers la sortie standard, et tous les messages de niveau `critical` " -"vers une adresse de courriel. Dans ce scenario, nous avons besoin de trois " -"`handlers`, responsable chacun d'envoyer des messages d'une sévérité donnée " -"vers une destination donnée." +"messages dans un fichier journal, tous les messages de niveau ``ERROR`` ou " +"supérieur vers la sortie standard, et tous les messages de niveau " +"``CRITICAL`` vers une adresse de courriel. Dans ce scénario, nous avons " +"besoin de trois *handlers*, responsable chacun d'envoyer des messages d'une " +"sévérité donnée vers une destination donnée." #: howto/logging.rst:508 msgid "" @@ -968,9 +969,9 @@ msgid "" "application developers who are using the built-in handler objects (that is, " "not creating custom handlers) are the following configuration methods:" msgstr "" -"Peu de méthodes des objets `handlers` sont intéressantes pour les " +"Peu de méthodes des objets *handlers* sont intéressantes pour les " "développeurs. Les seules méthodes intéressantes lorsqu'on utilise les objets " -"`handlers` natifs (c'est à dire si l'on ne crée pas d'`handler` " +"*handlers* natifs (c'est à dire si l'on ne crée pas de *handler* " "personnalisé) sont les méthodes de configuration suivantes :" #: howto/logging.rst:517 @@ -982,20 +983,20 @@ msgid "" "level set in each handler determines which messages that handler will send " "on." msgstr "" -"La méthode :meth:`~Handler.setLevel`, comme celle des objets `logger` permet " +"La méthode :meth:`~Handler.setLevel`, comme celle des objets *logger* permet " "de spécifier le plus bas niveau de sévérité qui sera distribué à la " "destination appropriée. Pourquoi y a-t-il deux méthodes :func:`setLevel` ? " -"Le niveau défini dans le `logger` détermine quelle sévérité doit avoir un " -"message pour être transmis à ses `handlers`. Le niveau mis pour chaque " -"`handler` détermine quels messages seront envoyés aux destinations." +"Le niveau défini dans le *logger* détermine quelle sévérité doit avoir un " +"message pour être transmis à ses *handlers*. Le niveau mis pour chaque " +"*handler* détermine quels messages seront envoyés aux destinations." #: howto/logging.rst:523 msgid "" ":meth:`~Handler.setFormatter` selects a Formatter object for this handler to " "use." msgstr "" -":meth:`~Handler.setFormatter` sélectionne l'objet `Formatter` utilisé par " -"cet `handler`." +":meth:`~Handler.setFormatter` sélectionne l'objet ``Formatter`` utilisé par " +"ce ``handler``." #: howto/logging.rst:526 msgid "" @@ -1003,7 +1004,7 @@ msgid "" "configure and deconfigure filter objects on handlers." msgstr "" ":meth:`~Handler.addFilter` et :meth:`~Handler.removeFilter` configurent et " -"respectivement dé-configurent des objets `filter` sur les `handlers`." +"respectivement dé-configurent des objets *filter* sur les *handlers*." #: howto/logging.rst:529 msgid "" @@ -1031,10 +1032,10 @@ msgid "" "takes three optional arguments -- a message format string, a date format " "string and a style indicator." msgstr "" -"Les objets `formatter` configurent l'ordre final, la structure et le contenu " +"Les objets *formatter* configurent l'ordre final, la structure et le contenu " "du message. Contrairement à la classe de base :class:`logging.Handler`, le " -"code d'une application peut instancier un objet de classe `formatter`, même " -"si vous pouvez toujours sous-classer `formatter` si vous avez besoin d'un " +"code d'une application peut instancier un objet de classe *formatter*, même " +"si vous pouvez toujours sous-classer *formatter* si vous avez besoin d'un " "comportement spécial dans votre application. Le constructeur a trois " "arguments optionnels : une chaîne de formatage du message, un chaîne de " "formatage de la date et un indicateur de style." @@ -1053,8 +1054,8 @@ msgid "" "with the milliseconds tacked on at the end. The ``style`` is one of `%`, '{' " "or '$'. If one of these is not specified, then '%' will be used." msgstr "" -"avec les millisecondes en suffixe. Le ``style`` est `%`, `{` ou `$`. Si " -"aucun n'est spécifié, `%` sera utilisé." +"avec les millisecondes en suffixe. Le ``style`` est ``%``, ``{`` ou ``$``. " +"Si aucun n'est spécifié, ``%`` sera utilisé." #: howto/logging.rst:557 msgid "" @@ -1065,12 +1066,12 @@ msgid "" "arguments), while if the style is '$' then the message format string should " "conform to what is expected by :meth:`string.Template.substitute`." msgstr "" -"Si l'argument ``style`` est `%`, la chaîne de formatage utilise ``%()s`` comme style de substitution de chaîne de caractères ; les " -"clefs possibles sont documentées dans :ref:`logrecord-attributes`. Si le " -"style est `{`, le message de la chaîne de formatage est compatible avec :" +"Si l'argument ``style`` est ``%``, la chaîne de formatage utilise ``%()s`` comme style de substitution de chaîne de caractères ; " +"les clefs possibles sont documentées dans :ref:`logrecord-attributes`. Si le " +"style est ``{``, le message de la chaîne de formatage est compatible avec :" "meth:`str.format` (en employant des arguments à mots clefs). Enfin si le " -"style est `$` alors la chaîne de formatage du message doit être conforme à " +"style est ``$`` alors la chaîne de formatage du message doit être conforme à " "ce qui est attendu de :meth:`string.Template.substitute`." #: howto/logging.rst:564 @@ -1097,30 +1098,30 @@ msgid "" "want all logging times to be shown in GMT, set the ``converter`` attribute " "in the Formatter class (to ``time.gmtime`` for GMT display)." msgstr "" -"Les `formatters` emploient une fonction configurable par l'utilisateur pour " +"Les *formatters* emploient une fonction configurable par l'utilisateur pour " "convertir le temps de création d'une entrée de journal en un *n*-uplet. Par " "défaut, :func:`time.localtime` est employé ; pour changer cela pour une " -"instance particulière de `formatter`, assignez une fonction avec la même " +"instance particulière de *formatter*, assignez une fonction avec la même " "signature que :func:`time.localtime` ou :func:`time.gmtime` à l'attribut " "``converter`` de cette instance. Pour changer cela pour tous les " -"`formatters`, par exemple si vous voulez que tous votre horodatage soit " +"*formatters*, par exemple si vous voulez que tous votre horodatage soit " "affiché en GMT, changez l'attribut ``converter`` de la classe ``Formatter`` " "en ``time.gmtime``." #: howto/logging.rst:583 msgid "Configuring Logging" -msgstr "Configuration de `Logging`" +msgstr "Configuration de ``logging``" #: howto/logging.rst:587 msgid "Programmers can configure logging in three ways:" -msgstr "On peut configurer `logging` de trois façons :" +msgstr "On peut configurer ``logging`` de trois façons :" #: howto/logging.rst:589 msgid "" "Creating loggers, handlers, and formatters explicitly using Python code that " "calls the configuration methods listed above." msgstr "" -"Créer des `loggers`, `handlers` et `formatters` explicitement en utilisant " +"Créer des *loggers*, *handlers* et *formatters* explicitement en utilisant " "du code Python qui appelle les méthodes de configuration listées ci-dessus." #: howto/logging.rst:591 @@ -1128,7 +1129,7 @@ msgid "" "Creating a logging config file and reading it using the :func:`fileConfig` " "function." msgstr "" -"Créer un fichier de configuration de `logging` et le lire en employant la " +"Créer un fichier de configuration de ``logging`` et le lire en employant la " "fonction :func:`fileConfig`." #: howto/logging.rst:593 @@ -1146,8 +1147,8 @@ msgid "" "console handler, and a simple formatter using Python code::" msgstr "" "Pour la documentation de référence de ces deux dernières options, voyez :ref:" -"`logging-config-api`. L'exemple suivant configure un `logger` très simple, " -"un `handler` employant la console, et un `formatter` simple en utilisant du " +"`logging-config-api`. L'exemple suivant configure un *logger* très simple, " +"un *handler* employant la console, et un *formatter* simple en utilisant du " "code Python ::" #: howto/logging.rst:626 @@ -1170,14 +1171,14 @@ msgstr "" msgid "Here is the logging.conf file:" msgstr "Voici le fichier *logging.conf* :" -#: howto/logging.rst:689 +#: howto/logging.rst:688 msgid "" "The output is nearly identical to that of the non-config-file-based example:" msgstr "" "La sortie est presque identique à celle de l'exemple qui n'est pas basé sur " "un fichier de configuration :" -#: howto/logging.rst:700 +#: howto/logging.rst:699 msgid "" "You can see that the config file approach has a few advantages over the " "Python code approach, mainly separation of configuration and code and the " @@ -1186,9 +1187,10 @@ msgstr "" "Vous pouvez constatez les avantages de l'approche par fichier de " "configuration par rapport à celle du code Python, principalement la " "séparation de la configuration et du code, et la possibilité pour une " -"personne qui ne code pas de modifier facilement les propriétés de `logging`." +"personne qui ne code pas de modifier facilement les propriétés de " +"``logging``." -#: howto/logging.rst:704 +#: howto/logging.rst:703 msgid "" "The :func:`fileConfig` function takes a default parameter, " "``disable_existing_loggers``, which defaults to ``True`` for reasons of " @@ -1207,7 +1209,7 @@ msgstr "" "documentation pour plus de détails, et donner la valeur ``False`` à ce " "paramètre si vous le souhaitez." -#: howto/logging.rst:712 +#: howto/logging.rst:711 msgid "" "The dictionary passed to :func:`dictConfig` can also specify a Boolean value " "with key ``disable_existing_loggers``, which if not specified explicitly in " @@ -1222,7 +1224,7 @@ msgstr "" "forcément celui que vous souhaitez ; dans ce cas, donnez explicitement la " "valeur ``False`` à cette clef." -#: howto/logging.rst:722 +#: howto/logging.rst:721 msgid "" "Note that the class names referenced in config files need to be either " "relative to the logging module, or absolute values which can be resolved " @@ -1233,14 +1235,15 @@ msgid "" "path)." msgstr "" "Notez que les noms de classe référencés dans le fichier de configuration " -"doivent être relatifs au module `logging`, ou des valeurs absolues qui " +"doivent être relatifs au module ``logging``, ou des valeurs absolues qui " "peuvent être résolues à travers les mécanismes d'importation habituels. " "Ainsi, on peut soit utiliser :class:`~logging.handlers.WatchedFileHandler` " -"(relativement au module `logging`) ou ``mypackage.mymodule.MyHandler`` (pour " -"une classe définie dans le paquet ``mypackage`` et le module ``mymodule``, " -"si ``mypackage`` est disponible dans les chemins d'importation de Python)." +"(relativement au module ``logging``) ou ``mypackage.mymodule.MyHandler`` " +"(pour une classe définie dans le paquet ``mypackage`` et le module " +"``mymodule``, si ``mypackage`` est disponible dans les chemins d'importation " +"de Python)." -#: howto/logging.rst:730 +#: howto/logging.rst:729 msgid "" "In Python 3.2, a new means of configuring logging has been introduced, using " "dictionaries to hold configuration information. This provides a superset of " @@ -1269,7 +1272,7 @@ msgstr "" "forme de *pickle* sur un connecteur, ou utiliser n'importe quelle approche " "suivant la logique de votre application." -#: howto/logging.rst:742 +#: howto/logging.rst:741 msgid "" "Here's an example of the same configuration as above, in YAML format for the " "new dictionary-based approach:" @@ -1277,7 +1280,7 @@ msgstr "" "Voici un exemple définissant la même configuration que ci-dessus, au format " "YAML pour le dictionnaire correspondant à cette nouvelle approche :" -#: howto/logging.rst:766 +#: howto/logging.rst:765 msgid "" "For more information about logging using a dictionary, see :ref:`logging-" "config-api`." @@ -1285,11 +1288,11 @@ msgstr "" "Pour plus d'informations sur la journalisation à l'aide d'un dictionnaire, " "consultez :ref:`logging-config-api`." -#: howto/logging.rst:770 +#: howto/logging.rst:769 msgid "What happens if no configuration is provided" msgstr "Comportement par défaut (si aucune configuration n'est fournie)" -#: howto/logging.rst:772 +#: howto/logging.rst:771 msgid "" "If no logging configuration is provided, it is possible to have a situation " "where a logging event needs to be output, but no handlers can be found to " @@ -1302,13 +1305,13 @@ msgstr "" "l'événement. Le comportement du paquet ``logging`` dans ces circonstances " "dépend de la version Python." -#: howto/logging.rst:777 +#: howto/logging.rst:776 msgid "For versions of Python prior to 3.2, the behaviour is as follows:" msgstr "" "Pour les versions de Python antérieures à 3.2, le comportement est le " "suivant :" -#: howto/logging.rst:779 +#: howto/logging.rst:778 msgid "" "If *logging.raiseExceptions* is ``False`` (production mode), the event is " "silently dropped." @@ -1316,7 +1319,7 @@ msgstr "" "Si *logging.raiseExceptions* vaut ``False`` (mode production), l’événement " "est silencieusement abandonné." -#: howto/logging.rst:782 +#: howto/logging.rst:781 msgid "" "If *logging.raiseExceptions* is ``True`` (development mode), a message 'No " "handlers could be found for logger X.Y.Z' is printed once." @@ -1325,11 +1328,11 @@ msgstr "" "message *No handlers could be found for logger X.Y.Z* est écrit sur la " "sortie standard une fois." -#: howto/logging.rst:785 +#: howto/logging.rst:784 msgid "In Python 3.2 and later, the behaviour is as follows:" msgstr "Dans Python 3.2 et ultérieur, le comportement est le suivant :" -#: howto/logging.rst:787 +#: howto/logging.rst:786 msgid "" "The event is output using a 'handler of last resort', stored in ``logging." "lastResort``. This internal handler is not associated with any logger, and " @@ -1350,7 +1353,7 @@ msgstr "" "gestionnaire est défini sur ``WARNING``, de sorte que tous les événements de " "cette sévérité et plus seront écrits." -#: howto/logging.rst:796 +#: howto/logging.rst:795 msgid "" "To obtain the pre-3.2 behaviour, ``logging.lastResort`` can be set to " "``None``." @@ -1358,11 +1361,11 @@ msgstr "" "Pour obtenir un comportement antérieur à 3.2, ``logging.lastResort`` peut " "être mis à ``None``." -#: howto/logging.rst:801 +#: howto/logging.rst:800 msgid "Configuring Logging for a Library" msgstr "Configuration de la journalisation pour une bibliothèque" -#: howto/logging.rst:803 +#: howto/logging.rst:802 msgid "" "When developing a library which uses logging, you should take care to " "document how the library uses logging - for example, the names of loggers " @@ -1382,7 +1385,7 @@ msgstr "" "``WARNING`` et au-dessus seront écrits sur ``sys.stderr``. Cela est " "considéré comme le meilleur comportement par défaut." -#: howto/logging.rst:811 +#: howto/logging.rst:810 msgid "" "If for some reason you *don't* want these messages printed in the absence of " "any logging configuration, you can attach a do-nothing handler to the top-" @@ -1405,7 +1408,7 @@ msgstr "" "appels effectués dans le code de bibliothèque enverra la sortie à ces " "gestionnaires, comme d'habitude." -#: howto/logging.rst:820 +#: howto/logging.rst:819 msgid "" "A do-nothing handler is included in the logging package: :class:`~logging." "NullHandler` (since Python 3.1). An instance of this handler could be added " @@ -1425,7 +1428,7 @@ msgstr "" "effectuée en utilisant des enregistreurs avec des noms correspondant à *foo." "x*, *foo.x.y*, etc., alors le code ::" -#: howto/logging.rst:831 +#: howto/logging.rst:830 msgid "" "should have the desired effect. If an organisation produces a number of " "libraries, then the logger name specified can be 'orgname.foo' rather than " @@ -1435,7 +1438,17 @@ msgstr "" "bibliothèques, le nom de l'enregistreur spécifié peut être ``orgname.foo`` " "plutôt que simplement ``foo``." -#: howto/logging.rst:835 +#: howto/logging.rst:834 +msgid "" +"It is strongly advised that you *do not log to the root logger* in your " +"library. Instead, use a logger with a unique and easily identifiable name, " +"such as the ``__name__`` for your library's top-level package or module. " +"Logging to the root logger will make it difficult or impossible for the " +"application developer to configure the logging verbosity or handlers of your " +"library as they wish." +msgstr "" + +#: howto/logging.rst:841 msgid "" "It is strongly advised that you *do not add any handlers other than* :class:" "`~logging.NullHandler` *to your library's loggers*. This is because the " @@ -1454,11 +1467,11 @@ msgstr "" "le manteau », vous pourriez bien interférer avec les tests unitaires et la " "journalisation qui convient à ses exigences." -#: howto/logging.rst:846 +#: howto/logging.rst:852 msgid "Logging Levels" msgstr "Niveaux de journalisation" -#: howto/logging.rst:848 +#: howto/logging.rst:854 msgid "" "The numeric values of logging levels are given in the following table. These " "are primarily of interest if you want to define your own levels, and need " @@ -1472,39 +1485,39 @@ msgstr "" "prédéfinis. Si vous définissez un niveau avec la même valeur numérique, il " "écrase la valeur prédéfinie ; le nom prédéfini est perdu." -#: howto/logging.rst:855 +#: howto/logging.rst:861 msgid "Numeric value" msgstr "Valeur numérique" -#: howto/logging.rst:857 +#: howto/logging.rst:863 msgid "50" msgstr "50" -#: howto/logging.rst:859 +#: howto/logging.rst:865 msgid "40" msgstr "40" -#: howto/logging.rst:861 +#: howto/logging.rst:867 msgid "30" msgstr "30" -#: howto/logging.rst:863 +#: howto/logging.rst:869 msgid "20" msgstr "20" -#: howto/logging.rst:865 +#: howto/logging.rst:871 msgid "10" msgstr "10" -#: howto/logging.rst:867 +#: howto/logging.rst:873 msgid "``NOTSET``" msgstr "``NOTSET``" -#: howto/logging.rst:867 +#: howto/logging.rst:873 msgid "0" msgstr "0" -#: howto/logging.rst:870 +#: howto/logging.rst:876 msgid "" "Levels can also be associated with loggers, being set either by the " "developer or through loading a saved logging configuration. When a logging " @@ -1522,7 +1535,7 @@ msgstr "" "réellement généré. C'est le mécanisme de base contrôlant la verbosité de la " "sortie de journalisation." -#: howto/logging.rst:877 +#: howto/logging.rst:883 msgid "" "Logging messages are encoded as instances of the :class:`~logging.LogRecord` " "class. When a logger decides to actually log an event, a :class:`~logging." @@ -1533,7 +1546,7 @@ msgstr "" "enregistrer un événement, une instance de :class:`~logging.LogRecord` est " "créée à partir du message de journalisation." -#: howto/logging.rst:881 +#: howto/logging.rst:887 msgid "" "Logging messages are subjected to a dispatch mechanism through the use of :" "dfn:`handlers`, which are instances of subclasses of the :class:`Handler` " @@ -1567,7 +1580,7 @@ msgstr "" "enregistreur soit défini sur la valeur ``False``, auquel cas le passage à " "l'ancêtre gestionnaires s'arrête)." -#: howto/logging.rst:895 +#: howto/logging.rst:901 msgid "" "Just as for loggers, handlers can have levels associated with them. A " "handler's level acts as a filter in the same way as a logger's level does. " @@ -1584,11 +1597,11 @@ msgstr "" "classes définies par l'utilisateur de :class:`Handler` devront remplacer ce :" "meth:`~Handler.emit`." -#: howto/logging.rst:904 +#: howto/logging.rst:910 msgid "Custom Levels" msgstr "Niveaux personnalisés" -#: howto/logging.rst:906 +#: howto/logging.rst:912 msgid "" "Defining your own levels is possible, but should not be necessary, as the " "existing levels have been chosen on the basis of practical experience. " @@ -1612,11 +1625,11 @@ msgstr "" "contrôler et/ou interpréter, car une valeur numérique donnée peut signifier " "des choses différentes pour différentes bibliothèques." -#: howto/logging.rst:919 +#: howto/logging.rst:925 msgid "Useful Handlers" msgstr "Gestionnaires utiles" -#: howto/logging.rst:921 +#: howto/logging.rst:927 msgid "" "In addition to the base :class:`Handler` class, many useful subclasses are " "provided:" @@ -1624,7 +1637,7 @@ msgstr "" "En plus de la classe de base :class:`Handler`, de nombreuses sous-classes " "utiles sont fournies :" -#: howto/logging.rst:924 +#: howto/logging.rst:930 msgid "" ":class:`StreamHandler` instances send messages to streams (file-like " "objects)." @@ -1632,13 +1645,13 @@ msgstr "" "Les instances :class:`StreamHandler` envoient des messages aux flux (objets " "de type fichier)." -#: howto/logging.rst:927 +#: howto/logging.rst:933 msgid ":class:`FileHandler` instances send messages to disk files." msgstr "" "Les instances :class:`FileHandler` envoient des messages à des fichiers sur " "le disque." -#: howto/logging.rst:929 +#: howto/logging.rst:935 msgid "" ":class:`~handlers.BaseRotatingHandler` is the base class for handlers that " "rotate log files at a certain point. It is not meant to be instantiated " @@ -1651,7 +1664,7 @@ msgstr "" "directement. Utilisez plutôt :class:`~handlers.RotatingFileHandler` ou :" "class:`~handlers.TimedRotatingFileHandler`." -#: howto/logging.rst:934 +#: howto/logging.rst:940 msgid "" ":class:`~handlers.RotatingFileHandler` instances send messages to disk " "files, with support for maximum log file sizes and log file rotation." @@ -1660,7 +1673,7 @@ msgstr "" "des fichiers sur le disque, avec la prise en charge des tailles maximales de " "fichiers de journalisation et de la rotation des fichiers de journalisation." -#: howto/logging.rst:937 +#: howto/logging.rst:943 msgid "" ":class:`~handlers.TimedRotatingFileHandler` instances send messages to disk " "files, rotating the log file at certain timed intervals." @@ -1669,7 +1682,7 @@ msgstr "" "messages aux fichiers de disque, en permutant le fichier journal à " "intervalles réguliers." -#: howto/logging.rst:940 +#: howto/logging.rst:946 msgid "" ":class:`~handlers.SocketHandler` instances send messages to TCP/IP sockets. " "Since 3.4, Unix domain sockets are also supported." @@ -1678,7 +1691,7 @@ msgstr "" "connecteurs TCP/IP. Depuis 3.4, les connecteurs UNIX sont également pris en " "charge." -#: howto/logging.rst:943 +#: howto/logging.rst:949 msgid "" ":class:`~handlers.DatagramHandler` instances send messages to UDP sockets. " "Since 3.4, Unix domain sockets are also supported." @@ -1687,7 +1700,7 @@ msgstr "" "aux connecteurs UDP. Depuis 3.4, les connecteurs UNIX sont également pris en " "charge." -#: howto/logging.rst:946 +#: howto/logging.rst:952 msgid "" ":class:`~handlers.SMTPHandler` instances send messages to a designated email " "address." @@ -1695,7 +1708,7 @@ msgstr "" "Les instances de :class:`~handlers.SMTPHandler` envoient des messages à une " "adresse e-mail désignée." -#: howto/logging.rst:949 +#: howto/logging.rst:955 msgid "" ":class:`~handlers.SysLogHandler` instances send messages to a Unix syslog " "daemon, possibly on a remote machine." @@ -1703,7 +1716,7 @@ msgstr "" "Les instances de :class:`~handlers.SysLogHandler` envoient des messages à un " "*daemon* *syslog* UNIX, éventuellement sur un ordinateur distant." -#: howto/logging.rst:952 +#: howto/logging.rst:958 msgid "" ":class:`~handlers.NTEventLogHandler` instances send messages to a Windows " "NT/2000/XP event log." @@ -1711,7 +1724,7 @@ msgstr "" "Les instances de :class:`~handlers.NTEventLogHandler` envoient des messages " "à un journal des événements Windows NT/2000/XP." -#: howto/logging.rst:955 +#: howto/logging.rst:961 msgid "" ":class:`~handlers.MemoryHandler` instances send messages to a buffer in " "memory, which is flushed whenever specific criteria are met." @@ -1720,7 +1733,7 @@ msgstr "" "tampon en mémoire, qui est vidé chaque fois que des critères spécifiques " "sont remplis." -#: howto/logging.rst:958 +#: howto/logging.rst:964 msgid "" ":class:`~handlers.HTTPHandler` instances send messages to an HTTP server " "using either ``GET`` or ``POST`` semantics." @@ -1728,7 +1741,7 @@ msgstr "" "Les instances de :class:`~handlers.HTTPHandler` envoient des messages à un " "serveur HTTP à l'aide de la sémantique ``GET`` ou ``POST``." -#: howto/logging.rst:961 +#: howto/logging.rst:967 msgid "" ":class:`~handlers.WatchedFileHandler` instances watch the file they are " "logging to. If the file changes, it is closed and reopened using the file " @@ -1741,7 +1754,7 @@ msgstr "" "les systèmes de type UNIX ; Windows ne prend pas en charge le mécanisme sous-" "jacent utilisé." -#: howto/logging.rst:966 +#: howto/logging.rst:972 msgid "" ":class:`~handlers.QueueHandler` instances send messages to a queue, such as " "those implemented in the :mod:`queue` or :mod:`multiprocessing` modules." @@ -1750,7 +1763,7 @@ msgstr "" "file d'attente, telles que celles implémentées dans les modules :mod:`queue` " "ou :mod:`multiprocessing`." -#: howto/logging.rst:969 +#: howto/logging.rst:975 msgid "" ":class:`NullHandler` instances do nothing with error messages. They are used " "by library developers who want to use logging, but want to avoid the 'No " @@ -1765,15 +1778,15 @@ msgstr "" "n'a pas configuré la journalisation. Voir :ref:`library-config` pour plus " "d'informations." -#: howto/logging.rst:975 +#: howto/logging.rst:981 msgid "The :class:`NullHandler` class." msgstr "La classe :class:`NullHandler`." -#: howto/logging.rst:978 +#: howto/logging.rst:984 msgid "The :class:`~handlers.QueueHandler` class." msgstr "La classe :class:`~handlers.QueueHandler`." -#: howto/logging.rst:981 +#: howto/logging.rst:987 msgid "" "The :class:`NullHandler`, :class:`StreamHandler` and :class:`FileHandler` " "classes are defined in the core logging package. The other handlers are " @@ -1786,7 +1799,7 @@ msgstr "" "handlers` (il existe également un autre sous-module, :mod:`logging.config`, " "pour la fonctionnalité de configuration)." -#: howto/logging.rst:986 +#: howto/logging.rst:992 msgid "" "Logged messages are formatted for presentation through instances of the :" "class:`Formatter` class. They are initialized with a format string suitable " @@ -1797,7 +1810,7 @@ msgstr "" "chaîne de format appropriée pour une utilisation avec l'opérateur % et un " "dictionnaire." -#: howto/logging.rst:990 +#: howto/logging.rst:996 msgid "" "For formatting multiple messages in a batch, instances of :class:`~handlers." "BufferingFormatter` can be used. In addition to the format string (which is " @@ -1809,7 +1822,7 @@ msgstr "" "de format (qui est appliquée à chaque message dans le lot), il existe des " "dispositions pour les chaînes de format d'en-tête et de fin." -#: howto/logging.rst:995 +#: howto/logging.rst:1001 msgid "" "When filtering based on logger level and/or handler level is not enough, " "instances of :class:`Filter` can be added to both :class:`Logger` and :class:" @@ -1826,7 +1839,7 @@ msgstr "" "consultent tous leurs filtres pour obtenir l'autorisation. Si un filtre " "renvoie une valeur ``False``, le traitement du message est arrêté." -#: howto/logging.rst:1002 +#: howto/logging.rst:1008 msgid "" "The basic :class:`Filter` functionality allows filtering by specific logger " "name. If this feature is used, messages sent to the named logger and its " @@ -1837,11 +1850,11 @@ msgstr "" "envoyés à l'enregistreur nommé et à ses enfants sont autorisés via le filtre " "et tous les autres sont abandonnés." -#: howto/logging.rst:1010 +#: howto/logging.rst:1016 msgid "Exceptions raised during logging" msgstr "Exceptions levées par la journalisation" -#: howto/logging.rst:1012 +#: howto/logging.rst:1018 msgid "" "The logging package is designed to swallow exceptions which occur while " "logging in production. This is so that errors which occur while handling " @@ -1855,7 +1868,7 @@ msgstr "" "journalisation, une erreur réseau ou d'autres erreurs similaires) ne " "provoquent pas l'arrêt de l'application utilisant la journalisation." -#: howto/logging.rst:1017 +#: howto/logging.rst:1023 msgid "" ":class:`SystemExit` and :class:`KeyboardInterrupt` exceptions are never " "swallowed. Other exceptions which occur during the :meth:`~Handler.emit` " @@ -1867,7 +1880,7 @@ msgstr "" "la méthode :meth:`~Handler.emit` d'une sous classe :class:`Handler` sont " "passées à sa méthode :meth:`~Handler.handleError`." -#: howto/logging.rst:1022 +#: howto/logging.rst:1028 msgid "" "The default implementation of :meth:`~Handler.handleError` in :class:" "`Handler` checks to see if a module-level variable, :data:`raiseExceptions`, " @@ -1880,7 +1893,7 @@ msgstr "" "pile d'appels est affichée sur :data:`sys.stderr`. Si elle n'est pas " "définie, l'exception est passée sous silence." -#: howto/logging.rst:1027 +#: howto/logging.rst:1033 msgid "" "The default value of :data:`raiseExceptions` is ``True``. This is because " "during development, you typically want to be notified of any exceptions that " @@ -1892,11 +1905,11 @@ msgstr "" "toutes les exceptions qui se produisent. Il est conseillé de définir :data:" "`raiseExceptions` à ``False`` pour une utilisation en production." -#: howto/logging.rst:1037 +#: howto/logging.rst:1043 msgid "Using arbitrary objects as messages" msgstr "Utilisation d'objets arbitraires comme messages" -#: howto/logging.rst:1039 +#: howto/logging.rst:1045 msgid "" "In the preceding sections and examples, it has been assumed that the message " "passed when logging the event is a string. However, this is not the only " @@ -1917,11 +1930,11 @@ msgstr "" "gestionnaires :class:`~handlers.SocketHandler` émettent un événement en lui " "appliquant *pickle* et en l'envoyant sur le réseau." -#: howto/logging.rst:1050 +#: howto/logging.rst:1056 msgid "Optimization" msgstr "Optimisation" -#: howto/logging.rst:1052 +#: howto/logging.rst:1058 msgid "" "Formatting of message arguments is deferred until it cannot be avoided. " "However, computing the arguments passed to the logging method can also be " @@ -1940,7 +1953,7 @@ msgstr "" "renvoie ``True`` si un événement est créé par l'enregistreur pour ce niveau " "d'appel. Vous pouvez écrire un code qui ressemble à ça ::" -#: howto/logging.rst:1064 +#: howto/logging.rst:1070 msgid "" "so that if the logger's threshold is set above ``DEBUG``, the calls to :func:" "`expensive_func1` and :func:`expensive_func2` are never made." @@ -1949,7 +1962,7 @@ msgstr "" "les appels à :func:`expensive_func1` et :func:`expensive_func2` ne sont " "jamais faits." -#: howto/logging.rst:1067 +#: howto/logging.rst:1073 msgid "" "In some cases, :meth:`~Logger.isEnabledFor` can itself be more expensive " "than you'd like (e.g. for deeply nested loggers where an explicit level is " @@ -1971,7 +1984,7 @@ msgstr "" "configuration de journalisation change dynamiquement pendant l'exécution de " "l'application (ce qui est rarement le cas)." -#: howto/logging.rst:1076 +#: howto/logging.rst:1082 msgid "" "There are other optimizations which can be made for specific applications " "which need more precise control over what logging information is collected. " @@ -1984,19 +1997,19 @@ msgstr "" "vous pouvez faire pour éviter le traitement pendant la journalisation dont " "vous n'avez pas besoin :" -#: howto/logging.rst:1082 +#: howto/logging.rst:1088 msgid "What you don't want to collect" msgstr "Ce que vous ne voulez pas collecter" -#: howto/logging.rst:1082 +#: howto/logging.rst:1088 msgid "How to avoid collecting it" msgstr "Comment éviter de le collecter" -#: howto/logging.rst:1084 +#: howto/logging.rst:1090 msgid "Information about where calls were made from." msgstr "Informations sur l'endroit où les appels ont été faits." -#: howto/logging.rst:1084 +#: howto/logging.rst:1090 msgid "" "Set ``logging._srcfile`` to ``None``. This avoids calling :func:`sys." "_getframe`, which may help to speed up your code in environments like PyPy " @@ -2007,23 +2020,35 @@ msgstr "" "comme PyPy (qui ne peut pas accélérer le code qui utilise :func:`sys." "_getframe`)." -#: howto/logging.rst:1091 +#: howto/logging.rst:1096 msgid "Threading information." msgstr "Informations de *threading*." -#: howto/logging.rst:1091 -msgid "Set ``logging.logThreads`` to ``0``." -msgstr "Mettez ``logging.logThreads`` à ``0``." +#: howto/logging.rst:1096 +msgid "Set ``logging.logThreads`` to ``False``." +msgstr "Mettez ``logging.logThreads`` à ``False``." -#: howto/logging.rst:1093 -msgid "Process information." -msgstr "Informations sur le processus." +#: howto/logging.rst:1098 +msgid "Current process ID (:func:`os.getpid`)" +msgstr "Identifiant du processus courant (résultat de :func:`os.getpid`)" -#: howto/logging.rst:1093 -msgid "Set ``logging.logProcesses`` to ``0``." -msgstr "Mettez ``logging.logProcesses`` à ``0``." +#: howto/logging.rst:1098 +msgid "Set ``logging.logProcesses`` to ``False``." +msgstr "Mettez ``logging.logProcesses`` à ``False``." -#: howto/logging.rst:1096 +#: howto/logging.rst:1100 +msgid "" +"Current process name when using ``multiprocessing`` to manage multiple " +"processes." +msgstr "" +"Nom du processus actuel, si vous vous servez de ``multiprocessing`` pour " +"gérer plusieurs processus à la fois" + +#: howto/logging.rst:1100 +msgid "Set ``logging.logMultiprocessing`` to ``False``." +msgstr "Mettez ``logging.logMultiProcessing`` à ``False``." + +#: howto/logging.rst:1104 msgid "" "Also note that the core logging module only includes the basic handlers. If " "you don't import :mod:`logging.handlers` and :mod:`logging.config`, they " @@ -2033,30 +2058,33 @@ msgstr "" "les gestionnaires de base. Si vous n'importez pas :mod:`logging.handlers` " "et :mod:`logging.config`, ils ne prendront pas de mémoire." -#: howto/logging.rst:1103 +#: howto/logging.rst:1111 msgid "Module :mod:`logging`" msgstr "Module :mod:`logging`" -#: howto/logging.rst:1103 +#: howto/logging.rst:1111 msgid "API reference for the logging module." msgstr "Référence d'API pour le module de journalisation." -#: howto/logging.rst:1106 +#: howto/logging.rst:1114 msgid "Module :mod:`logging.config`" msgstr "Module :mod:`logging.config`" -#: howto/logging.rst:1106 +#: howto/logging.rst:1114 msgid "Configuration API for the logging module." msgstr "API de configuration pour le module de journalisation." -#: howto/logging.rst:1109 +#: howto/logging.rst:1117 msgid "Module :mod:`logging.handlers`" msgstr "Module :mod:`logging.handlers`" -#: howto/logging.rst:1109 +#: howto/logging.rst:1117 msgid "Useful handlers included with the logging module." msgstr "Gestionnaires utiles inclus avec le module de journalisation." -#: howto/logging.rst:1111 +#: howto/logging.rst:1119 msgid ":ref:`A logging cookbook `" msgstr ":ref:`A logging cookbook `" + +#~ msgid "Process information." +#~ msgstr "Informations sur le processus." diff --git a/howto/pyporting.po b/howto/pyporting.po index e18dfabd00..35dc7d0a07 100644 --- a/howto/pyporting.po +++ b/howto/pyporting.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2021-01-28 15:50+0100\n" -"Last-Translator: Jules Lasne \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-12-11 16:27+0100\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.2\n" +"X-Generator: Poedit 3.0\n" #: howto/pyporting.rst:5 msgid "Porting Python 2 Code to Python 3" @@ -61,13 +61,13 @@ msgstr "" "qui a motivé la création de Python 3, vous pouvez lire le `Python 3 Q & A`_ " "de Nick Coghlan ou bien `Why Python 3 exists`_ de Brett Cannon." -#: howto/pyporting.rst:23 +#: howto/pyporting.rst:24 msgid "" -"For help with porting, you can email the python-porting_ mailing list with " -"questions." +"For help with porting, you can view the archived python-porting_ mailing " +"list." msgstr "" -"Vous pouvez solliciter par courriel l'aide de la liste de diffusion python-" -"porting_ pour vos questions liées au portage." +"Vous pouvez lire les archives de la liste diffusion python-porting_ dans vos " +"recherches sur les questions liées au portage." #: howto/pyporting.rst:27 msgid "The Short Explanation" @@ -150,7 +150,7 @@ msgid "" "is the one installed for the Python currently in use, whether it be a system-" "wide ``pip`` or one installed within a :ref:`virtual environment `." msgstr "" -"Note : L'utilisation de ``python -m pip install`` garantit que le `pip` " +"Note : L'utilisation de ``python -m pip install`` garantit que le ``pip`` " "invoqué est bien celui installé avec la version de Python que vous utilisez, " "que ce soit un ``pip`` du système ou un ``pip`` installé dans un :ref:" "`environnement virtuel `." @@ -194,7 +194,7 @@ msgid "" "Keep those key points in mind while you read on about the details of porting " "your code to support Python 2 & 3 simultaneously." msgstr "" -"Gardez ces points-clés en tête pendant que vous lisez les détails ci-dessous " +"Gardez ces points clés en tête pendant que vous lisez les détails ci-dessous " "concernant le portage de votre code vers une compatibilité simultanée Python " "2 et 3." @@ -318,7 +318,7 @@ msgstr "" "Python 3 par rapport à Python 2. Pour atteindre cet objectif, les deux " "meilleurs moyens sont de lire le document :ref:`whatsnew-index` de chaque " "version de Python 3 et le livre `Porting to Python 3`_ (gratuit en ligne, en " -"anglais). Il y a également une « anti-sèche » (`cheat sheet`_, ressource en " +"anglais). Il y a également une « antisèche » (`cheat sheet`_, ressource en " "anglais) très pratique du projet Python-Future." #: howto/pyporting.rst:134 @@ -435,7 +435,7 @@ msgid "" "division or continue using ``/`` and expect a float" msgstr "" "Remplacer tous les opérateurs de division par ``//`` pour la division " -"entière, le cas échant, ou utiliser ``/`` et vous attendre à un résultat " +"entière, le cas échéant, ou utiliser ``/`` et vous attendre à un résultat " "flottant" #: howto/pyporting.rst:182 diff --git a/howto/regex.po b/howto/regex.po index 5ab025dd69..7473498c6b 100644 --- a/howto/regex.po +++ b/howto/regex.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2020-11-10 10:27+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-10-18 12:27+0200\n" "Last-Translator: Nabil Bendafi \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.3\n" +"X-Generator: Poedit 3.0.1\n" #: howto/regex.rst:5 msgid "Regular Expression HOWTO" @@ -191,7 +191,7 @@ msgstr "" "utilisés pour spécifier une classe de caractères, qui forme un ensemble de " "caractères dont vous souhaitez trouver la correspondance. Les caractères " "peuvent être listés individuellement, ou une plage de caractères peut être " -"indiquée en fournissant deux caractères séparés par un `'-'``. Par exemple, " +"indiquée en fournissant deux caractères séparés par un ``'-'``. Par exemple, " "``[abc]`` correspond à n'importe quel caractère parmi ``a``, ``b`` ou " "``c`` ; c'est équivalent à ``[a-c]``, qui utilise une plage pour exprimer le " "même ensemble de caractères. Si vous voulez trouver une chaîne qui ne " @@ -199,15 +199,16 @@ msgstr "" #: howto/regex.rst:92 msgid "" -"Metacharacters are not active inside classes. For example, ``[akm$]`` will " -"match any of the characters ``'a'``, ``'k'``, ``'m'``, or ``'$'``; ``'$'`` " -"is usually a metacharacter, but inside a character class it's stripped of " -"its special nature." +"Metacharacters (except ``\\``) are not active inside classes. For example, " +"``[akm$]`` will match any of the characters ``'a'``, ``'k'``, ``'m'``, or " +"``'$'``; ``'$'`` is usually a metacharacter, but inside a character class " +"it's stripped of its special nature." msgstr "" -"Les métacaractères ne sont pas actifs dans les classes. Par exemple, ``[akm" -"$]`` correspond à n'importe quel caractère parmi ``'a'``, ``'k'``, ``'m'`` " -"ou ``'$'`` ; ``'$'`` est habituellement un métacaractère mais dans une " -"classe de caractères, il est dépourvu de sa signification spéciale." +"Les métacaractères (à l’exception de ``\\``) ne sont pas actifs dans les " +"classes. Par exemple, ``[akm$]`` correspond à n'importe quel caractère parmi " +"``'a'``, ``'k'``, ``'m'`` ou ``'$'`` ; ``'$'`` est habituellement un " +"métacaractère mais dans une classe de caractères, il est dépourvu de sa " +"signification spéciale." #: howto/regex.rst:97 msgid "" @@ -587,11 +588,12 @@ msgstr "" "``'cht'``." #: howto/regex.rst:233 +#, fuzzy msgid "" -"There are two more repeating qualifiers. The question mark character, ``?" -"``, matches either once or zero times; you can think of it as marking " -"something as being optional. For example, ``home-?brew`` matches either " -"``'homebrew'`` or ``'home-brew'``." +"There are two more repeating operators or quantifiers. The question mark " +"character, ``?``, matches either once or zero times; you can think of it as " +"marking something as being optional. For example, ``home-?brew`` matches " +"either ``'homebrew'`` or ``'home-brew'``." msgstr "" "Il existe deux autres quantificateurs pour les répétitions. Le point " "d'interrogation, ``?``, fait correspondre zéro ou une fois ; vous pouvez " @@ -600,12 +602,13 @@ msgstr "" "caractère``." #: howto/regex.rst:238 +#, fuzzy msgid "" -"The most complicated repeated qualifier is ``{m,n}``, where *m* and *n* are " -"decimal integers. This qualifier means there must be at least *m* " -"repetitions, and at most *n*. For example, ``a/{1,3}b`` will match ``'a/" -"b'``, ``'a//b'``, and ``'a///b'``. It won't match ``'ab'``, which has no " -"slashes, or ``'a////b'``, which has four." +"The most complicated quantifier is ``{m,n}``, where *m* and *n* are decimal " +"integers. This quantifier means there must be at least *m* repetitions, and " +"at most *n*. For example, ``a/{1,3}b`` will match ``'a/b'``, ``'a//b'``, " +"and ``'a///b'``. It won't match ``'ab'``, which has no slashes, or ``'a////" +"b'``, which has four." msgstr "" "Le plus compliqué des quantificateurs est ``{m,n}`` où *m* et *n* sont des " "entiers décimaux. Ce quantificateur indique qu'il faut au moins *m* " @@ -624,8 +627,9 @@ msgstr "" "est 0 alors qu'omettre *n* signifie qu'il n'y a pas de borne supérieure." #: howto/regex.rst:248 +#, fuzzy msgid "" -"Readers of a reductionist bent may notice that the three other qualifiers " +"Readers of a reductionist bent may notice that the three other quantifiers " "can all be expressed using this notation. ``{0,}`` is the same as ``*``, " "``{1,}`` is equivalent to ``+``, and ``{0,1}`` is the same as ``?``. It's " "better to use ``*``, ``+``, or ``?`` when you can, simply because they're " @@ -1253,7 +1257,7 @@ msgid "" "z]`` or ``[A-Z]`` are used in combination with the :const:`IGNORECASE` flag, " "they will match the 52 ASCII letters and 4 additional non-ASCII letters: " "'İ' (U+0130, Latin capital letter I with dot above), 'ı' (U+0131, Latin " -"small letter dotless i), 'ſ' (U+017F, Latin small letter long s) and 'K' (U" +"small letter dotless i), 'ſ' (U+017F, Latin small letter long s) and 'K' (U" "+212A, Kelvin sign). ``Spam`` will match ``'Spam'``, ``'spam'``, " "``'spAM'``, or ``'ſpam'`` (the latter is matched only in Unicode mode). This " "lowercasing doesn't take the current locale into account; it will if you " @@ -1269,7 +1273,7 @@ msgstr "" "lettres ASCII et 4 lettres non ASCII supplémentaires : 'İ' (U+0130, lettre I " "en majuscule latine avec un point au-dessus), 'ı' (U+0131, lettre minuscule " "latine i sans point au-dessus), 'ſ' (U+017F, lettre minuscule latine longue " -"s) et 'K' (U+212A, signe du Kelvin). ``Spam`` correspond ainsi à ``'Spam'``, " +"s) et 'K' (U+212A, signe du Kelvin). ``Spam`` correspond ainsi à ``'Spam'``, " "``'spam'``, ``'spAM'`` ou ``'ſpam'`` (ce dernier ne correspond qu'en mode " "Unicode). Le passage en minuscules ne prend pas en compte la configuration " "de région courante ; elle le fait si vous mettez aussi l'option :const:" @@ -1475,7 +1479,7 @@ msgid "" "``'ervo'``." msgstr "" "Union ensembliste ou opérateur « ou ». Si *A* et *B* sont des expressions " -"régulières, ``A|B`` correspond à toute chaine qui correspond à A ou à B. La " +"régulières, ``A|B`` correspond à toute chaîne qui correspond à A ou à B. La " "priorité de ``|`` est très faible afin de pouvoir effectuer simplement des " "unions de chaînes de plusieurs caractères. ``Crow|Servo`` correspond avec " "``'Crow'`` ou ``'Servo'``, mais pas avec ``'Cro'``, un ``'w'`` ou un " @@ -1663,12 +1667,13 @@ msgstr "" "l'en-tête, et un autre groupe correspondant à la valeur de l'en-tête." #: howto/regex.rst:803 +#, fuzzy msgid "" "Groups are marked by the ``'('``, ``')'`` metacharacters. ``'('`` and " "``')'`` have much the same meaning as they do in mathematical expressions; " "they group together the expressions contained inside them, and you can " -"repeat the contents of a group with a repeating qualifier, such as ``*``, ``" -"+``, ``?``, or ``{m,n}``. For example, ``(ab)*`` will match zero or more " +"repeat the contents of a group with a quantifier, such as ``*``, ``+``, ``?" +"``, or ``{m,n}``. For example, ``(ab)*`` will match zero or more " "repetitions of ``ab``. ::" msgstr "" "Les groupes sont délimités par les métacaractères marqueurs ``'('`` et " @@ -1995,7 +2000,7 @@ msgid "" msgstr "" "Assertion prédictive négative. C'est l'opposée de l'assertion positive ; " "elle réussit si l'expression régulière contenue *ne* correspond *pas* à " -"l'emplacement courant dans la chaine." +"l'emplacement courant dans la chaîne." #: howto/regex.rst:996 msgid "" @@ -2583,8 +2588,9 @@ msgstr "" "title>'``, ce qui n'est pas ce que vous voulez." #: howto/regex.rst:1329 +#, fuzzy msgid "" -"In this case, the solution is to use the non-greedy qualifiers ``*?``, ``+?" +"In this case, the solution is to use the non-greedy quantifiers ``*?``, ``+?" "``, ``??``, or ``{m,n}?``, which match as *little* text as possible. In the " "above example, the ``'>'`` is tried immediately after the first ``'<'`` " "matches, and when it fails, the engine advances a character at a time, " diff --git a/howto/sockets.po b/howto/sockets.po index f8cb8ccc03..dfaf3feb20 100644 --- a/howto/sockets.po +++ b/howto/sockets.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2020-09-30 17:07+0200\n" -"Last-Translator: Mathieu Dupuy \n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2022-10-18 12:27+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.1\n" +"X-Generator: Poedit 3.0\n" #: howto/sockets.rst:5 msgid "Socket Programming HOWTO" @@ -113,7 +113,7 @@ msgstr "" #: howto/sockets.rst:47 msgid "" "They were invented in Berkeley as part of the BSD flavor of Unix. They " -"spread like wildfire with the Internet. With good reason --- the combination " +"spread like wildfire with the internet. With good reason --- the combination " "of sockets with INET makes talking to arbitrary machines around the world " "unbelievably easy (at least compared to other schemes)." msgstr "" @@ -227,7 +227,7 @@ msgstr "" "importante à comprendre maintenant est la suivante : c'est *tout* ce que " "fait un connecteur « serveur ». Il n'envoie aucune donnée. Il ne reçoit " "aucune donnée. Il ne fait que produire des connecteurs « clients ». Chaque " -"``clientsocket`` est créé en réponse à un *autre* connecteur « client » qui " +"``clientsocket`` est créé en réponse à un *autre* connecteur « client » qui " "se connecte à l'hôte et au port auxquels nous sommes liés. Dès que nous " "avons créé ce ``clientsocket``, nous retournons à l'écoute pour d'autres " "connexions. Les deux « clients » sont libres de discuter — ils utilisent un " @@ -248,7 +248,7 @@ msgstr "" "Si vous avez besoin d'une communication rapide entre deux processus sur une " "même machine, vous devriez regarder comment utiliser les tubes (*pipe*, en " "anglais) ou la mémoire partagée. Si vous décidez d'utiliser les connecteurs " -"*AF_INET*, liez le connecteur « serveur » à ``'localhost'``. Sur la plupart " +"*AF_INET*, liez le connecteur « serveur » à ``'localhost'``. Sur la plupart " "des plates-formes, cela contourne quelques couches réseau et est un peu plus " "rapide." @@ -257,7 +257,7 @@ msgid "" "The :mod:`multiprocessing` integrates cross-platform IPC into a higher-level " "API." msgstr "" -"Le :mod:`multiprocessing` intègre de l’IPC multiplateforme dans une API de " +"Le :mod:`multiprocessing` intègre de l’IPC multiplateformes dans une API de " "plus haut niveau." #: howto/sockets.rst:134 @@ -274,8 +274,8 @@ msgid "" "in a request, or perhaps a signon. But that's a design decision - it's not a " "rule of sockets." msgstr "" -"La première chose à noter, c'est que la prise « client » du navigateur web " -"et la prise « client » du serveur web sont des bêtes identiques. C'est-à-" +"La première chose à noter, c'est que la prise « client » du navigateur web " +"et la prise « client » du serveur web sont des bêtes identiques. C'est-à-" "dire qu'il s'agit d'une conversation « pair à pair ». Ou pour le dire " "autrement, *en tant que concepteur, vous devrez décider quelles sont les " "règles d'étiquette pour une conversation*. Normalement, la connexion via " @@ -299,7 +299,7 @@ msgstr "" "connecteur client en une bête imitant un fichier et utiliser ``read`` et " "``write``. C'est la façon dont Java présente ses connecteurs. Je ne vais pas " "en parler ici, sauf pour vous avertir que vous devez utiliser ``flush`` sur " -"les connecteurs. Ce sont des « fichiers », mis en mémoire tampon, et une " +"les connecteurs. Ce sont des « fichiers », mis en mémoire tampon, et une " "erreur courante est d'« écrire » via ``write`` quelque chose, puis de " "« lire » via ``read`` pour obtenir une réponse. Sans un ``flush``, vous " "pouvez attendre la réponse pour toujours, parce que la requête peut encore " @@ -475,9 +475,9 @@ msgid "" "example, a Motorola chip will represent a 16 bit integer with the value 1 as " "the two hex bytes 00 01. Intel and DEC, however, are byte-reversed - that " "same 1 is 01 00. Socket libraries have calls for converting 16 and 32 bit " -"integers - ``ntohl, htonl, ntohs, htons`` where \"n\" means *network* and \"h" -"\" means *host*, \"s\" means *short* and \"l\" means *long*. Where network " -"order is host order, these do nothing, but where the machine is byte-" +"integers - ``ntohl, htonl, ntohs, htons`` where \"n\" means *network* and " +"\"h\" means *host*, \"s\" means *short* and \"l\" means *long*. Where " +"network order is host order, these do nothing, but where the machine is byte-" "reversed, these swap the bytes around appropriately." msgstr "" "Il est parfaitement possible d’envoyer des données binaires sur un " @@ -566,7 +566,7 @@ msgstr "" "mauvaise habitude de s’appuyer sur ce système. Si votre connecteur disparaît " "sans avoir fait un ``close``, le connecteur à l’autre bout peut rester " "suspendu indéfiniment, pensant que vous êtes juste lent. Fermez vos " -"connecteurs quand vous avez terminé *s’il vous plait*." +"connecteurs quand vous avez terminé *s’il vous plaît*." #: howto/sockets.rst:297 msgid "When Sockets Die" @@ -642,7 +642,7 @@ msgid "" "will grow large, buggy and suck CPU. So let's skip the brain-dead solutions " "and do it right." msgstr "" -"La différence majeure de fonctionnement est que `send``, ``recv``, " +"La différence majeure de fonctionnement est que ``send``, ``recv``, " "``connect`` et ``accept`` peuvent rendre la main sans avoir rien fait. Vous " "avez (bien sûr) un certain nombre de choix. Vous pouvez vérifier le code de " "retour et les codes d'erreur et, en général, devenir fou. Si vous ne me " @@ -721,7 +721,7 @@ msgid "" "it in the potential_writers list. If it shows up in the writable list, you " "have a decent chance that it has connected." msgstr "" -"Si vous avez un connecteur « serveur », mettez-le dans la liste des " +"Si vous avez un connecteur « serveur », mettez-le dans la liste des " "connecteurs potentiellement lisibles ``potential_readers``. S’il apparaît " "dans la liste renvoyée des connecteurs que vous pouvez lire, votre " "``accept`` fonctionnera (presque certainement). Si vous avez créé un nouveau " diff --git a/howto/sorting.po b/howto/sorting.po index e63244675d..fc87f61989 100644 --- a/howto/sorting.po +++ b/howto/sorting.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2021-01-28 15:46+0100\n" -"Last-Translator: Jules Lasne \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-07-08 17:51+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.2\n" +"X-Generator: Poedit 3.0.1\n" #: howto/sorting.rst:4 msgid "Sorting HOW TO" @@ -60,12 +60,12 @@ msgstr "Les bases du tri" #: howto/sorting.rst:20 msgid "" "A simple ascending sort is very easy: just call the :func:`sorted` function. " -"It returns a new sorted list::" +"It returns a new sorted list:" msgstr "" "Un tri ascendant simple est très facile : il suffit d'appeler la fonction :" -"func:`sorted`. Elle renvoie une nouvelle liste triée ::" +"func:`sorted`. Elle renvoie une nouvelle liste triée :" -#: howto/sorting.rst:26 +#: howto/sorting.rst:28 msgid "" "You can also use the :meth:`list.sort` method. It modifies the list in-place " "(and returns ``None`` to avoid confusion). Usually it's less convenient " @@ -78,7 +78,7 @@ msgstr "" "`sorted` -- mais si vous n'avez pas besoin de la liste originale, cette " "technique est légèrement plus efficace." -#: howto/sorting.rst:36 +#: howto/sorting.rst:40 msgid "" "Another difference is that the :meth:`list.sort` method is only defined for " "lists. In contrast, the :func:`sorted` function accepts any iterable." @@ -87,11 +87,11 @@ msgstr "" "définie pour les listes. Au contraire, la fonction :func:`sorted` accepte " "n'importe quel itérable." -#: howto/sorting.rst:43 +#: howto/sorting.rst:49 msgid "Key Functions" msgstr "Fonctions clef" -#: howto/sorting.rst:45 +#: howto/sorting.rst:51 msgid "" "Both :meth:`list.sort` and :func:`sorted` have a *key* parameter to specify " "a function (or other callable) to be called on each list element prior to " @@ -101,11 +101,11 @@ msgstr "" "une fonction (ou autre appelable) qui peut être appelée sur chaque élément " "de la liste avant d'effectuer des comparaisons." -#: howto/sorting.rst:49 +#: howto/sorting.rst:55 msgid "For example, here's a case-insensitive string comparison:" msgstr "Par exemple, voici une comparaison de texte insensible à la casse:" -#: howto/sorting.rst:54 +#: howto/sorting.rst:62 msgid "" "The value of the *key* parameter should be a function (or other callable) " "that takes a single argument and returns a key to use for sorting purposes. " @@ -117,7 +117,7 @@ msgstr "" "Cette technique est rapide car la fonction clef est appelée exactement une " "seule fois pour chaque enregistrement en entrée." -#: howto/sorting.rst:59 +#: howto/sorting.rst:67 msgid "" "A common pattern is to sort complex objects using some of the object's " "indices as keys. For example:" @@ -125,18 +125,18 @@ msgstr "" "Un usage fréquent est de faire un tri sur des objets complexes en utilisant " "les indices des objets en tant que clef. Par exemple :" -#: howto/sorting.rst:70 +#: howto/sorting.rst:80 msgid "" "The same technique works for objects with named attributes. For example:" msgstr "" "La même technique marche pour des objets avec des attributs nommés. Par " "exemple :" -#: howto/sorting.rst:89 +#: howto/sorting.rst:101 msgid "Operator Module Functions" msgstr "Fonctions du module *operator*" -#: howto/sorting.rst:91 +#: howto/sorting.rst:103 msgid "" "The key-function patterns shown above are very common, so Python provides " "convenience functions to make accessor functions easier and faster. The :mod:" @@ -149,13 +149,13 @@ msgstr "" "func:`~operator.itemgetter`, :func:`~operator.attrgetter`, et :func:" "`~operator.methodcaller`." -#: howto/sorting.rst:96 +#: howto/sorting.rst:108 msgid "Using those functions, the above examples become simpler and faster:" msgstr "" "En utilisant ces fonctions, les exemples au dessus deviennent plus simples " "et plus rapides :" -#: howto/sorting.rst:106 +#: howto/sorting.rst:120 msgid "" "The operator module functions allow multiple levels of sorting. For example, " "to sort by *grade* then by *age*:" @@ -163,11 +163,11 @@ msgstr "" "Les fonctions du module *operator* permettent plusieurs niveaux de tri. Par " "exemple, pour trier par *grade* puis par *age* :" -#: howto/sorting.rst:116 +#: howto/sorting.rst:132 msgid "Ascending and Descending" msgstr "Ascendant et descendant" -#: howto/sorting.rst:118 +#: howto/sorting.rst:134 msgid "" "Both :meth:`list.sort` and :func:`sorted` accept a *reverse* parameter with " "a boolean value. This is used to flag descending sorts. For example, to get " @@ -178,11 +178,11 @@ msgstr "" "des tris. Par exemple, pour avoir les données des étudiants dans l'ordre " "inverse par *age* :" -#: howto/sorting.rst:129 +#: howto/sorting.rst:147 msgid "Sort Stability and Complex Sorts" msgstr "Stabilité des tris et tris complexes" -#: howto/sorting.rst:131 +#: howto/sorting.rst:149 msgid "" "Sorts are guaranteed to be `stable `_\\. That means that when multiple records have " @@ -192,7 +192,7 @@ msgstr "" "Algorithme_de_tri#Caract.C3.A8re_stable>`_\\. Cela signifie que lorsque " "plusieurs enregistrements on la même clef, leur ordre original est préservé." -#: howto/sorting.rst:139 +#: howto/sorting.rst:159 msgid "" "Notice how the two records for *blue* retain their original order so that " "``('blue', 1)`` is guaranteed to precede ``('blue', 2)``." @@ -201,7 +201,7 @@ msgstr "" "et que par conséquent il est garanti que ``('blue', 1)`` précède ``('blue', " "2)``." -#: howto/sorting.rst:142 +#: howto/sorting.rst:162 msgid "" "This wonderful property lets you build complex sorts in a series of sorting " "steps. For example, to sort the student data by descending *grade* and then " @@ -212,7 +212,7 @@ msgstr "" "des étudiants en ordre descendant par *grade* puis en ordre ascendant par " "*age*, effectuez un tri par *age* en premier puis un second tri par *grade* :" -#: howto/sorting.rst:150 +#: howto/sorting.rst:172 msgid "" "This can be abstracted out into a wrapper function that can take a list and " "tuples of field and order to sort them on multiple passes." @@ -220,7 +220,7 @@ msgstr "" "Ceci peut être encapsulé dans une fonction qui prend une liste et des n-" "uplets (attribut, ordre) pour les trier en plusieurs passes." -#: howto/sorting.rst:161 +#: howto/sorting.rst:185 msgid "" "The `Timsort `_ algorithm used in " "Python does multiple sorts efficiently because it can take advantage of any " @@ -230,17 +230,17 @@ msgstr "" "Python effectue de multiples tris efficacement parce qu'il peut tirer " "avantage de l'ordre existant dans un jeu de données." -#: howto/sorting.rst:166 +#: howto/sorting.rst:190 msgid "The Old Way Using Decorate-Sort-Undecorate" msgstr "La méthode traditionnelle utilisant Decorate-Sort-Undecorate" -#: howto/sorting.rst:168 +#: howto/sorting.rst:192 msgid "This idiom is called Decorate-Sort-Undecorate after its three steps:" msgstr "" "Cette technique est appelée Decorate-Sort-Undecorate et se base sur trois " "étapes :" -#: howto/sorting.rst:170 +#: howto/sorting.rst:194 msgid "" "First, the initial list is decorated with new values that control the sort " "order." @@ -248,11 +248,11 @@ msgstr "" "Premièrement, la liste de départ est décorée avec les nouvelles valeurs qui " "contrôlent l'ordre du tri." -#: howto/sorting.rst:172 +#: howto/sorting.rst:196 msgid "Second, the decorated list is sorted." msgstr "En second lieu, la liste décorée est triée." -#: howto/sorting.rst:174 +#: howto/sorting.rst:198 msgid "" "Finally, the decorations are removed, creating a list that contains only the " "initial values in the new order." @@ -260,14 +260,14 @@ msgstr "" "Enfin, la décoration est supprimée, créant ainsi une liste qui contient " "seulement la valeur initiale dans le nouvel ordre." -#: howto/sorting.rst:177 +#: howto/sorting.rst:201 msgid "" "For example, to sort the student data by *grade* using the DSU approach:" msgstr "" "Par exemple, pour trier les données étudiant par *grade* en utilisant " "l'approche DSU :" -#: howto/sorting.rst:184 +#: howto/sorting.rst:208 msgid "" "This idiom works because tuples are compared lexicographically; the first " "items are compared; if they are the same then the second items are compared, " @@ -277,7 +277,7 @@ msgstr "" "lexicographique; les premiers objets sont comparés; si il y a des objets " "identiques, alors l'objet suivant est comparé, et ainsi de suite." -#: howto/sorting.rst:188 +#: howto/sorting.rst:212 msgid "" "It is not strictly necessary in all cases to include the index *i* in the " "decorated list, but including it gives two benefits:" @@ -285,7 +285,7 @@ msgstr "" "Il n'est pas strictement nécessaire dans tous les cas d’inclure l'indice *i* " "dans la liste décorée, mais l'inclure donne deux avantages :" -#: howto/sorting.rst:191 +#: howto/sorting.rst:215 msgid "" "The sort is stable -- if two items have the same key, their order will be " "preserved in the sorted list." @@ -293,7 +293,7 @@ msgstr "" "Le tri est stable -- si deux objets on la même clef, leur ordre sera " "préservé dans la liste triée." -#: howto/sorting.rst:194 +#: howto/sorting.rst:218 msgid "" "The original items do not have to be comparable because the ordering of the " "decorated tuples will be determined by at most the first two items. So for " @@ -305,7 +305,7 @@ msgstr "" "par exemple la liste originale pourrait contenir des nombres complexes qui " "pourraient ne pas être triés directement." -#: howto/sorting.rst:199 +#: howto/sorting.rst:223 msgid "" "Another name for this idiom is `Schwartzian transform `_\\, after Randal L. Schwartz, who " @@ -315,7 +315,7 @@ msgstr "" "wikipedia.org/wiki/Schwartzian_transform>`_\\, après que Randal L. Schwartz " "l'ait popularisé chez les développeurs Perl." -#: howto/sorting.rst:203 +#: howto/sorting.rst:227 msgid "" "Now that Python sorting provides key-functions, this technique is not often " "needed." @@ -323,11 +323,11 @@ msgstr "" "Maintenant que le tri Python fournit des fonctions-clef, cette technique " "n'est plus souvent utilisée." -#: howto/sorting.rst:207 +#: howto/sorting.rst:231 msgid "The Old Way Using the *cmp* Parameter" msgstr "La méthode traditionnelle d'utiliser le paramètre *cmp*" -#: howto/sorting.rst:209 +#: howto/sorting.rst:233 msgid "" "Many constructs given in this HOWTO assume Python 2.4 or later. Before that, " "there was no :func:`sorted` builtin and :meth:`list.sort` took no keyword " @@ -340,7 +340,7 @@ msgstr "" "versions Python 2.x utilisaient un paramètre *cmp* pour prendre en charge " "les fonctions de comparaisons définies par les utilisateurs." -#: howto/sorting.rst:214 +#: howto/sorting.rst:238 msgid "" "In Py3.0, the *cmp* parameter was removed entirely (as part of a larger " "effort to simplify and unify the language, eliminating the conflict between " @@ -350,7 +350,7 @@ msgstr "" "effort plus général pour simplifier et unifier le langage, en éliminant le " "conflit entre les comparaisons riches et la méthode magique :meth:`__cmp__`)." -#: howto/sorting.rst:218 +#: howto/sorting.rst:242 msgid "" "In Py2.x, sort allowed an optional function which can be called for doing " "the comparisons. That function should take two arguments to be compared and " @@ -363,28 +363,28 @@ msgstr "" "inférieur-à, renvoyer zéro si ils sont égaux, ou renvoyer une valeur " "positive pour supérieur-à. Par exemple, nous pouvons faire :" -#: howto/sorting.rst:228 +#: howto/sorting.rst:254 msgid "Or you can reverse the order of comparison with:" msgstr "Ou nous pouvons inverser l'ordre de comparaison avec :" -#: howto/sorting.rst:235 +#: howto/sorting.rst:263 msgid "" "When porting code from Python 2.x to 3.x, the situation can arise when you " "have the user supplying a comparison function and you need to convert that " -"to a key function. The following wrapper makes that easy to do::" +"to a key function. The following wrapper makes that easy to do:" msgstr "" "En portant du code depuis Python 2.X vers 3.x, des problèmes peuvent " "survenir quand des utilisateurs fournissent une fonction de comparaison et " "qu'il faut convertir cette fonction en une fonction-clef. La fonction " "d'encapsulation suivante rend cela plus facile à faire ::" -#: howto/sorting.rst:258 +#: howto/sorting.rst:294 msgid "To convert to a key function, just wrap the old comparison function:" msgstr "" "Pour convertir une fonction clef, ils suffit d'encapsuler l'ancienne " "fonction de comparaison :" -#: howto/sorting.rst:269 +#: howto/sorting.rst:305 msgid "" "In Python 3.2, the :func:`functools.cmp_to_key` function was added to the :" "mod:`functools` module in the standard library." @@ -392,11 +392,12 @@ msgstr "" "En Python 3.2, la fonction :func:`functools.cmp_to_key` à été ajoutée au " "module :mod:`functools` dans la librairie standard." -#: howto/sorting.rst:273 -msgid "Odd and Ends" +#: howto/sorting.rst:309 +#, fuzzy +msgid "Odds and Ends" msgstr "Curiosités et conclusion" -#: howto/sorting.rst:275 +#: howto/sorting.rst:311 msgid "" "For locale aware sorting, use :func:`locale.strxfrm` for a key function or :" "func:`locale.strcoll` for a comparison function." @@ -404,7 +405,7 @@ msgstr "" "Pour du tri de texte localisé, utilisez :func:`locale.strxfrm` en tant que " "fonction clef ou :func:`locale.strcoll` comme fonction de comparaison." -#: howto/sorting.rst:278 +#: howto/sorting.rst:314 msgid "" "The *reverse* parameter still maintains sort stability (so that records with " "equal keys retain the original order). Interestingly, that effect can be " @@ -416,18 +417,26 @@ msgstr "" "cet effet peut être simulé sans le paramètre en utilisant la fonction " "native :func:`reversed` deux fois :" -#: howto/sorting.rst:290 +#: howto/sorting.rst:328 +msgid "" +"The sort routines use ``<`` when making comparisons between two objects. So, " +"it is easy to add a standard sort order to a class by defining an :meth:" +"`__lt__` method:" +msgstr "" +"Pour effectuer les comparaisons entre deux objets, les routines de tri " +"utilisent l'opérateur ``<``. Il est donc facile d'ajouter un ordre de tri " +"standard à une classe en définissant sa méthode :meth:`__lt__` ::" + +#: howto/sorting.rst:338 msgid "" -"The sort routines are guaranteed to use :meth:`__lt__` when making " -"comparisons between two objects. So, it is easy to add a standard sort order " -"to a class by defining an :meth:`__lt__` method::" +"However, note that ``<`` can fall back to using :meth:`__gt__` if :meth:" +"`__lt__` is not implemented (see :func:`object.__lt__`)." msgstr "" -"Il est garanti que les routines de tri utilisent les méthodes :meth:`__lt__` " -"lorsqu'elles effectuent des comparaisons entre deux objets. Donc il est " -"facile d'ajouter un ordre de tri standard à une classe en définissant sa " -"méthode :meth:`__lt__` ::" +"Notez toutefois que l'opérateur ``<`` peut utiliser la méthode :meth:" +"`__gt__` si :meth:`__lt__` n'est pas implémentée ; voir :func:`object." +"__lt__`." -#: howto/sorting.rst:298 +#: howto/sorting.rst:341 msgid "" "Key functions need not depend directly on the objects being sorted. A key " "function can also access external resources. For instance, if the student " diff --git a/howto/unicode.po b/howto/unicode.po index c8ea85114d..fd0bb58560 100644 --- a/howto/unicode.po +++ b/howto/unicode.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2020-09-30 17:16+0200\n" -"Last-Translator: Melançon Victor \n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2021-12-11 17:16+0100\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.1\n" +"X-Generator: Poedit 3.0\n" #: howto/unicode.rst:5 msgid "Unicode HOWTO" @@ -111,8 +111,8 @@ msgstr "" "entre ``0`` et ``0x10FFFF`` (environ 1,1 million de valeurs possibles, le " "`nombre de valeurs réellement assignées `_ est inférieur à ce nombre). Dans le standard et dans le " -"présent document, un point de code est écrit en utilisant la notation ``U" -"+265E`` pour désigner le caractère avec la valeur ``0x265e`` (9 822 en " +"présent document, un point de code est écrit en utilisant la notation " +"``U+265E`` pour désigner le caractère avec la valeur ``0x265e`` (9 822 en " "décimal)." #: howto/unicode.rst:50 @@ -533,10 +533,10 @@ msgstr "" "Le paramètre *errors* est le même que le paramètre de la méthode :meth:" "`~bytes.decode` mais possède quelques gestionnaires supplémentaires. En plus " "de ``'strict'``, ``'ignore'`` et ``'remplace'`` (qui dans ce cas insère un " -"point d'interrogation au lieu du caractère non codable), il y a aussi " +"point d'interrogation au lieu du caractère non encodable), il y a aussi " "``'xmlcharrefreplace'`` (insère une référence XML), ``backslashreplace`` " -"(insère une séquence ``\\uNNNN``) et ``namereplace`` (insère une séquence ``" -"\\N{...}``)." +"(insère une séquence ``\\uNNNN``) et ``namereplace`` (insère une séquence " +"``\\N{...}``)." #: howto/unicode.rst:280 msgid "The following example shows the different results::" @@ -572,8 +572,8 @@ msgid "" msgstr "" "Dans le code source Python, des points de code Unicode spécifiques peuvent " "être écrits en utilisant la séquence d'échappement ``\\u``, suivie de quatre " -"chiffres hexadécimaux donnant le point de code. La séquence d'échappement ``" -"\\U`` est similaire, mais attend huit chiffres hexadécimaux, pas quatre ::" +"chiffres hexadécimaux donnant le point de code. La séquence d'échappement " +"``\\U`` est similaire, mais attend huit chiffres hexadécimaux, pas quatre ::" #: howto/unicode.rst:324 msgid "" @@ -709,11 +709,11 @@ msgstr "" "Unicode ajoute une certaine complication à la comparaison des chaînes de " "caractères, car le même jeu de caractères peut être représenté par " "différentes séquences de points de code. Par exemple, une lettre comme « ê » " -"peut être représentée comme un point de code unique ``U+00EA``, ou comme ``U" -"+0065 U+0302``, qui est le point de code pour « e » suivi d'un point de code " -"pour ``COMBINING CIRCUMFLEX ACCENT``. Celles-ci produisent le même résultat " -"lorsqu'elles sont affichées, mais l'une est une chaîne de caractères de " -"longueur 1 et l'autre de longueur 2." +"peut être représentée comme un point de code unique ``U+00EA``, ou comme " +"``U+0065 U+0302``, qui est le point de code pour « e » suivi d'un point de " +"code pour ``COMBINING CIRCUMFLEX ACCENT``. Celles-ci produisent le même " +"résultat lorsqu'elles sont affichées, mais l'une est une chaîne de " +"caractères de longueur 1 et l'autre de longueur 2." #: howto/unicode.rst:412 msgid "" @@ -1033,9 +1033,10 @@ msgid "" "converting the Unicode string into some encoding that varies depending on " "the system. Today Python is converging on using UTF-8: Python on MacOS has " "used UTF-8 for several versions, and Python 3.6 switched to using UTF-8 on " -"Windows as well. On Unix systems, there will only be a filesystem encoding " -"if you've set the ``LANG`` or ``LC_CTYPE`` environment variables; if you " -"haven't, the default encoding is again UTF-8." +"Windows as well. On Unix systems, there will only be a :term:`filesystem " +"encoding `. if you've set the " +"``LANG`` or ``LC_CTYPE`` environment variables; if you haven't, the default " +"encoding is again UTF-8." msgstr "" "La plupart des systèmes d'exploitation couramment utilisés aujourd'hui " "prennent en charge les noms de fichiers qui contiennent des caractères " @@ -1043,9 +1044,10 @@ msgstr "" "chaîne Unicode en un encodage qui varie en fonction du système. Aujourd'hui, " "Python converge vers l'utilisation d'UTF-8 : Python sous MacOS utilise UTF-8 " "depuis plusieurs versions et Python 3.6 sous Windows est passé à UTF-8 " -"également. Sur les systèmes Unix, il n'y aura un encodage pour le système de " -"fichiers que si vous avez défini les variables d'environnement ``LANG`` ou " -"``LC_CTYPE`` ; sinon, l'encodage par défaut est UTF-8." +"également. Sur les systèmes Unix, il n'y aura un :term:`encodage pour le " +"système de fichiers ` que si vous " +"avez défini les variables d'environnement ``LANG`` ou ``LC_CTYPE`` ; sinon, " +"l'encodage par défaut est UTF-8." #: howto/unicode.rst:616 msgid "" @@ -1079,8 +1081,8 @@ msgid "" "you pass a Unicode string as the path, filenames will be decoded using the " "filesystem's encoding and a list of Unicode strings will be returned, while " "passing a byte path will return the filenames as bytes. For example, " -"assuming the default filesystem encoding is UTF-8, running the following " -"program::" +"assuming the default :term:`filesystem encoding ` is UTF-8, running the following program::" msgstr "" "La fonction :func:`os.listdir` renvoie des noms de fichiers, ce qui soulève " "un problème : doit-elle renvoyer la version Unicode des noms de fichiers ou " @@ -1090,9 +1092,9 @@ msgstr "" "chaîne Unicode comme chemin d'accès, les noms de fichiers sont décodés en " "utilisant l'encodage du système de fichiers et une liste de chaînes Unicode " "est renvoyée, tandis que passer un chemin d'accès en chaîne d'octets renvoie " -"les noms de fichiers comme chaîne d'octets. Par exemple, en supposant que " -"l'encodage par défaut du système de fichiers est UTF-8, exécuter le " -"programme suivant ::" +"les noms de fichiers comme chaîne d'octets. Par exemple, en supposant que l':" +"term:`encodage par défaut du système de fichiers ` est UTF-8, exécuter le programme suivant ::" #: howto/unicode.rst:647 msgid "will produce the following output:" @@ -1230,9 +1232,9 @@ msgid "" "error handler is used to encode the data and write it back out." msgstr "" "Le gestionnaire d'erreurs ``surrogateescape`` décode tous les octets non-" -"ASCII comme points de code dans une plage spéciale allant de ``U+DC80`` à ``U" -"+DCFF``. Ces points de code redeviennent alors les mêmes octets lorsque le " -"gestionnaire d'erreurs ``surrogateescape`` est utilisé pour encoder les " +"ASCII comme points de code dans une plage spéciale allant de ``U+DC80`` à " +"``U+DCFF``. Ces points de code redeviennent alors les mêmes octets lorsque " +"le gestionnaire d'erreurs ``surrogateescape`` est utilisé pour encoder les " "données et les réécrire." #: howto/unicode.rst:737 diff --git a/howto/urllib2.po b/howto/urllib2.po index 906bd8ef2c..17875778ba 100644 --- a/howto/urllib2.po +++ b/howto/urllib2.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-24 17:33+0100\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -130,8 +130,8 @@ msgid "" "In the case of HTTP, there are two extra things that Request objects allow " "you to do: First, you can pass data to be sent to the server. Second, you " "can pass extra information (\"metadata\") *about* the data or about the " -"request itself, to the server - this information is sent as HTTP \"headers" -"\". Let's look at each of these in turn." +"request itself, to the server - this information is sent as HTTP " +"\"headers\". Let's look at each of these in turn." msgstr "" #: howto/urllib2.rst:105 @@ -481,10 +481,10 @@ msgstr "" #: howto/urllib2.rst:522 msgid "" "``top_level_url`` is in fact *either* a full URL (including the 'http:' " -"scheme component and the hostname and optionally the port number) e.g. ``" -"\"http://example.com/\"`` *or* an \"authority\" (i.e. the hostname, " -"optionally including the port number) e.g. ``\"example.com\"`` or ``" -"\"example.com:8080\"`` (the latter example includes a port number). The " +"scheme component and the hostname and optionally the port number) e.g. " +"``\"http://example.com/\"`` *or* an \"authority\" (i.e. the hostname, " +"optionally including the port number) e.g. ``\"example.com\"`` or " +"``\"example.com:8080\"`` (the latter example includes a port number). The " "authority, if present, must NOT contain the \"userinfo\" component - for " "example ``\"joe:password@example.com\"`` is not correct." msgstr "" diff --git a/install/index.po b/install/index.po index d6552a6d56..9fc9bc23ef 100644 --- a/install/index.po +++ b/install/index.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-24 17:33+0100\n" -"PO-Revision-Date: 2021-04-27 15:27+0200\n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 15:59+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -27,11 +27,19 @@ msgstr "Auteur" msgid "Greg Ward" msgstr "Greg Ward" -#: install/index.rst:16 +#: install/index.rst:15 +msgid "" +"The entire ``distutils`` package has been deprecated and will be removed in " +"Python 3.12. This documentation is retained as a reference only, and will be " +"removed with the package. See the :ref:`What's New ` " +"entry for more information." +msgstr "" + +#: install/index.rst:23 msgid ":ref:`installing-index`" msgstr ":ref:`installing-index`" -#: install/index.rst:16 +#: install/index.rst:23 msgid "" "The up to date module installation documentation. For regular Python usage, " "you almost certainly want that document rather than this one." @@ -50,7 +58,7 @@ msgstr "" "html couvre de manière indépendante toutes les informations pertinentes " "actuellement incluses ici." -#: install/index.rst:23 +#: install/index.rst:30 msgid "" "This guide only covers the basic tools for building and distributing " "extensions that are provided as part of this version of Python. Third party " @@ -65,11 +73,11 @@ msgstr "" "recommendations/>`__ dans le *Python Packaging User Guide* pour plus " "d'informations." -#: install/index.rst:34 +#: install/index.rst:41 msgid "Introduction" msgstr "Introduction" -#: install/index.rst:36 +#: install/index.rst:43 msgid "" "In Python 2.0, the ``distutils`` API was first added to the standard " "library. This provided Linux distro maintainers with a standard way of " @@ -83,7 +91,7 @@ msgstr "" "administrateurs système une façon standard de les installer directement sur " "les systèmes cibles." -#: install/index.rst:41 +#: install/index.rst:48 msgid "" "In the many years since Python 2.0 was released, tightly coupling the build " "system and package installer to the language runtime release cycle has " @@ -97,14 +105,14 @@ msgstr "" "gestionnaire de paquets ``pip`` ainsi que le système d'intégration " "``setuptools`` plutôt que d'utiliser ``distutils`` directement." -#: install/index.rst:47 +#: install/index.rst:54 msgid "" "See :ref:`installing-index` and :ref:`distributing-index` for more details." msgstr "" "Voir :ref:`installing-index` et :ref:`distributing-index` pour plus de " "détails." -#: install/index.rst:49 +#: install/index.rst:56 msgid "" "This legacy documentation is being retained only until we're confident that " "the ``setuptools`` documentation covers everything needed." @@ -113,11 +121,11 @@ msgstr "" "certains que la documentation sur ``setuptools`` couvre tout ce qui est " "nécessaire." -#: install/index.rst:55 +#: install/index.rst:62 msgid "Distutils based source distributions" msgstr "Distributions basées sur *distutils*" -#: install/index.rst:57 +#: install/index.rst:64 msgid "" "If you download a module source distribution, you can tell pretty quickly if " "it was packaged and distributed in the standard way, i.e. using the " @@ -142,7 +150,7 @@ msgstr "" "doit expliquer que la construction et l'installation de la distribution du " "module se fait simplement en exécutant ceci ::" -#: install/index.rst:70 +#: install/index.rst:77 msgid "" "For Windows, this command should be run from a command prompt window (:" "menuselection:`Start --> Accessories`)::" @@ -150,7 +158,7 @@ msgstr "" "Sous Windows, cette commande doit être lancée depuis une invite de commande " "(:menuselection:`Démarrer --> Accessoires`) ::" -#: install/index.rst:75 +#: install/index.rst:82 msgid "" "If all these things are true, then you already know how to build and install " "the modules you've just downloaded: Run the command above. Unless you need " @@ -165,11 +173,11 @@ msgstr "" "construction, vous n'avez pas vraiment besoin de ce manuel. Ou plutôt, la " "commande ci-dessus est tout ce dont vous avez besoin de retenir de ce manuel." -#: install/index.rst:85 +#: install/index.rst:92 msgid "Standard Build and Install" msgstr "Construction standard et installation" -#: install/index.rst:87 +#: install/index.rst:94 msgid "" "As described in section :ref:`inst-new-standard`, building and installing a " "module distribution using the Distutils is usually one simple command to run " @@ -179,11 +187,11 @@ msgstr "" "installer une distribution de modules en utilisant les Distutils consiste " "généralement à exécuter une simple commande dans un terminal ::" -#: install/index.rst:97 +#: install/index.rst:104 msgid "Platform variations" msgstr "Différences selon les plateformes" -#: install/index.rst:99 +#: install/index.rst:106 msgid "" "You should always run the setup command from the distribution root " "directory, i.e. the top-level subdirectory that the module source " @@ -198,7 +206,7 @@ msgstr "" "distribution du module :file:`foo-1.0.tar.gz` sous un système UNIX, la " "méthode normale consiste à faire ::" -#: install/index.rst:108 +#: install/index.rst:115 msgid "" "On Windows, you'd probably download :file:`foo-1.0.zip`. If you downloaded " "the archive file to :file:`C:\\\\Temp`, then it would unpack into :file:`C:\\" @@ -215,11 +223,11 @@ msgstr "" "pour décompresser l'archive. Ensuite, ouvrez une fenêtre d'invite de " "commandes et exécutez ::" -#: install/index.rst:122 +#: install/index.rst:129 msgid "Splitting the job up" msgstr "Fractionnement du travail" -#: install/index.rst:124 +#: install/index.rst:131 msgid "" "Running ``setup.py install`` builds and installs all modules in one run. If " "you prefer to work incrementally---especially useful if you want to " @@ -241,7 +249,7 @@ msgstr "" "l'installation (ou le faire vous-même, avec les privilèges de super-" "utilisateur)." -#: install/index.rst:132 +#: install/index.rst:139 msgid "" "For example, you can build everything in one step, and then install " "everything in a second step, by invoking the setup script twice::" @@ -250,7 +258,7 @@ msgstr "" "installer le tout dans une deuxième étape, en invoquant le script " "d'installation deux fois ::" -#: install/index.rst:138 +#: install/index.rst:145 msgid "" "If you do this, you will notice that running the :command:`install` command " "first runs the :command:`build` command, which---in this case---quickly " @@ -262,7 +270,7 @@ msgstr "" "cas, s'aperçoit vite qu'il n'a rien à faire, puisque tout dans le dossier :" "file:`build` est à jour." -#: install/index.rst:143 +#: install/index.rst:150 msgid "" "You may not need this ability to break things down often if all you do is " "install modules downloaded off the 'net, but it's very handy for more " @@ -276,11 +284,11 @@ msgstr "" "Python, vous allez exécuter beaucoup de commandes individuelles de " "Distutils, indépendamment les unes des autres." -#: install/index.rst:152 +#: install/index.rst:159 msgid "How building works" msgstr "Comment fonctionne une construction" -#: install/index.rst:154 +#: install/index.rst:161 msgid "" "As implied above, the :command:`build` command is responsible for putting " "the files to install into a *build directory*. By default, this is :file:" @@ -295,7 +303,7 @@ msgstr "" "sources d'origine, vous pouvez changer le répertoire de construction avec " "l'option :option:`!--build-base`. Par exemple ::" -#: install/index.rst:162 +#: install/index.rst:169 msgid "" "(Or you could do this permanently with a directive in your system or " "personal Distutils configuration file; see section :ref:`inst-config-" @@ -305,13 +313,13 @@ msgstr "" "système ou dans le fichier de configuration personnelle de Distutils ; voir " "la section :ref:`inst-config-files`.) Normalement, ce n'est pas nécessaire." -#: install/index.rst:166 +#: install/index.rst:173 msgid "The default layout for the build tree is as follows::" msgstr "" "L'arborescence par défaut produite par la compilation se présente comme " "suit ::" -#: install/index.rst:173 +#: install/index.rst:180 msgid "" "where ```` expands to a brief description of the current OS/hardware " "platform and Python version. The first form, with just a :file:`lib` " @@ -337,7 +345,7 @@ msgstr "" "`) contient tous les modules Python (Python pur et extensions) qui seront " "installés." -#: install/index.rst:183 +#: install/index.rst:190 msgid "" "In the future, more directories will be added to handle Python scripts, " "documentation, binary executables, and whatever else is needed to handle the " @@ -348,11 +356,11 @@ msgstr "" "nécessaire pour gérer le travail de l'installation de modules et " "d'applications Python." -#: install/index.rst:191 +#: install/index.rst:198 msgid "How installation works" msgstr "Comment fonctionne l'installation" -#: install/index.rst:193 +#: install/index.rst:200 msgid "" "After the :command:`build` command runs (whether you run it explicitly, or " "the :command:`install` command does it for you), the work of the :command:" @@ -367,13 +375,14 @@ msgstr "" "file:`build/lib.{plat}`) dans le répertoire que vous avez choisi pour " "l'installation." -#: install/index.rst:199 +#: install/index.rst:206 +#, fuzzy msgid "" "If you don't choose an installation directory---i.e., if you just run " "``setup.py install``\\ ---then the :command:`install` command installs to " "the standard location for third-party Python modules. This location varies " -"by platform and by how you built/installed Python itself. On Unix (and Mac " -"OS X, which is also Unix-based), it also depends on whether the module " +"by platform and by how you built/installed Python itself. On Unix (and " +"macOS, which is also Unix-based), it also depends on whether the module " "distribution being installed is pure Python or contains extensions (\"non-" "pure\"):" msgstr "" @@ -386,67 +395,67 @@ msgstr "" "distribution en cours d'installation, suivant qu'il est en pur Python ou " "s'il contient des extensions (« non-pur ») :" -#: install/index.rst:209 +#: install/index.rst:216 msgid "Platform" msgstr "Plateforme" -#: install/index.rst:209 +#: install/index.rst:216 msgid "Standard installation location" msgstr "Emplacement standard de l'installation" -#: install/index.rst:209 +#: install/index.rst:216 msgid "Default value" msgstr "Valeur par défaut" -#: install/index.rst:735 install/index.rst:747 +#: install/index.rst:742 install/index.rst:754 msgid "Notes" msgstr "Notes" -#: install/index.rst:211 +#: install/index.rst:218 msgid "Unix (pure)" msgstr "UNIX (pur)" -#: install/index.rst:424 +#: install/index.rst:431 msgid ":file:`{prefix}/lib/python{X.Y}/site-packages`" msgstr ":file:`{prefix}/lib/python{X.Y}/site-packages`" -#: install/index.rst:213 +#: install/index.rst:220 msgid ":file:`/usr/local/lib/python{X.Y}/site-packages`" msgstr ":file:`/usr/local/lib/python{X.Y}/site-packages`" -#: install/index.rst:213 install/index.rst:737 +#: install/index.rst:220 install/index.rst:744 msgid "\\(1)" msgstr "\\(1)" -#: install/index.rst:213 +#: install/index.rst:220 msgid "Unix (non-pure)" msgstr "UNIX (non-pur)" -#: install/index.rst:425 +#: install/index.rst:432 msgid ":file:`{exec-prefix}/lib/python{X.Y}/site-packages`" msgstr ":file:`{exec-prefix}/lib/python{X.Y}/site-packages`" -#: install/index.rst:215 +#: install/index.rst:222 msgid "Windows" msgstr "Windows" -#: install/index.rst:476 +#: install/index.rst:483 msgid ":file:`{prefix}\\\\Lib\\\\site-packages`" msgstr ":file:`{prefix}\\\\Lib\\\\site-packages`" -#: install/index.rst:215 +#: install/index.rst:222 msgid ":file:`C:\\\\Python{XY}\\\\Lib\\\\site-packages`" msgstr ":file:`C:\\\\Python{XY}\\\\Lib\\\\site-packages`" -#: install/index.rst:739 +#: install/index.rst:746 msgid "\\(2)" msgstr "\\(2)" -#: install/index.rst:759 +#: install/index.rst:766 msgid "Notes:" msgstr "Notes :" -#: install/index.rst:221 +#: install/index.rst:228 msgid "" "Most Linux distributions include Python as a standard part of the system, " "so :file:`{prefix}` and :file:`{exec-prefix}` are usually both :file:`/usr` " @@ -460,20 +469,21 @@ msgstr "" "sous Linux (ou tout autre système de type Unix), les valeurs par défaut de :" "file:`{prefix}` et :file:`{exec-prefix}` sont souvent :file:`/usr/local`." -#: install/index.rst:227 +#: install/index.rst:234 msgid "" -"The default installation directory on Windows was :file:`C:\\\\Program Files" -"\\\\Python` under Python 1.6a1, 1.5.2, and earlier." +"The default installation directory on Windows was :file:`C:\\\\Program " +"Files\\\\Python` under Python 1.6a1, 1.5.2, and earlier." msgstr "" "Sous Windows, le dossier d'installation par défaut était : :file:`C:\\" "\\Program Files\\\\Python` sous Python 1.6a1, 1.5.2 et avant." -#: install/index.rst:230 +#: install/index.rst:237 +#, fuzzy msgid "" ":file:`{prefix}` and :file:`{exec-prefix}` stand for the directories that " "Python is installed to, and where it finds its libraries at run-time. They " "are always the same under Windows, and very often the same under Unix and " -"Mac OS X. You can find out what your Python installation uses for :file:" +"macOS. You can find out what your Python installation uses for :file:" "`{prefix}` and :file:`{exec-prefix}` by running Python in interactive mode " "and typing a few simple commands. Under Unix, just type ``python`` at the " "shell prompt. Under Windows, choose :menuselection:`Start --> Programs --> " @@ -495,7 +505,7 @@ msgstr "" "tape les trois instructions ci-dessous et obtiens la sortie suivante pour " "trouver mes :file:`{prefix}` et :file:`{exec-prefix}` :" -#: install/index.rst:252 +#: install/index.rst:259 msgid "" "A few other placeholders are used in this document: :file:`{X.Y}` stands for " "the version of Python, for example ``3.2``; :file:`{abiflags}` will be " @@ -507,14 +517,14 @@ msgid "" msgstr "" "Quelques autres remplacements utilisés dans ce document : :file:`{X.Y}` " "représente la version de Python, par exemple ``3.2`` ; :file:`{abiflags}` " -"sera remplacé par la valeur de :data:`sys.abiflags` ou la chaine vide pour " +"sera remplacé par la valeur de :data:`sys.abiflags` ou la chaîne vide pour " "les plateformes qui ne définissent pas d’indicateurs d’ABI ; :file:" "`{distname}` sera remplacé par le nom de la distribution de modules en train " "d’être installée. Les points et la capitalisation sont importantes dans les " "chemins ; par exemple, une valeur qui utilise ``python3.2`` sur Unix " "utilisera typiquement ``Python32`` sur Windows." -#: install/index.rst:260 +#: install/index.rst:267 msgid "" "If you don't want to install modules to the standard location, or if you " "don't have permission to write there, then you need to read about alternate " @@ -529,11 +539,11 @@ msgstr "" "lisez la section :ref:`inst-custom-install` sur les installations " "personnalisées." -#: install/index.rst:270 +#: install/index.rst:277 msgid "Alternate Installation" msgstr "Installation alternative" -#: install/index.rst:272 +#: install/index.rst:279 msgid "" "Often, it is necessary or desirable to install modules to a location other " "than the standard location for third-party Python modules. For example, on " @@ -554,7 +564,7 @@ msgstr "" "base de scripts fonctionne encore avec la nouvelle version avant de faire la " "mise à jour pour de bon." -#: install/index.rst:280 +#: install/index.rst:287 msgid "" "The Distutils :command:`install` command is designed to make installing " "module distributions to an alternate location simple and painless. The " @@ -572,7 +582,7 @@ msgstr "" "lequel elle installe les fichiers. Les détails diffèrent d’une plateforme à " "une autre, donc lisez les sections ci-dessous qui s’appliquent à vous." -#: install/index.rst:288 +#: install/index.rst:295 msgid "" "Note that the various alternate installation schemes are mutually exclusive: " "you can pass ``--user``, or ``--home``, or ``--prefix`` and ``--exec-" @@ -584,11 +594,11 @@ msgstr "" "``--prefix`` et ``--exc-prefix``, ou ``--install-base`` et ``--install-" "platbase``, mais vous ne pouvez pas mélanger ces groupes." -#: install/index.rst:297 +#: install/index.rst:304 msgid "Alternate installation: the user scheme" msgstr "Installation alternative : le schéma *user*" -#: install/index.rst:299 +#: install/index.rst:306 msgid "" "This scheme is designed to be the most convenient solution for users that " "don't have write permission to the global site-packages directory or don't " @@ -599,12 +609,13 @@ msgstr "" "packages global, ou qui ne veulent pas y écrire. Il est activé avec une " "simple option ::" -#: install/index.rst:305 +#: install/index.rst:312 +#, fuzzy msgid "" "Files will be installed into subdirectories of :data:`site.USER_BASE` " "(written as :file:`{userbase}` hereafter). This scheme installs pure Python " "modules and extension modules in the same location (also known as :data:" -"`site.USER_SITE`). Here are the values for UNIX, including Mac OS X:" +"`site.USER_SITE`). Here are the values for UNIX, including macOS:" msgstr "" "Les fichiers seront installés dans des sous-dossiers de :data:`site." "USER_BASE` (écrit :file:`{userbase}` dans la suite). Ce schéma installe des " @@ -612,64 +623,64 @@ msgstr "" "sous le nom de :data:`site.USER_SITE`).Voici les valeurs pour UNIX, y " "compris Mac OS X ::" -#: install/index.rst:322 install/index.rst:422 install/index.rst:499 -#: install/index.rst:747 +#: install/index.rst:329 install/index.rst:429 install/index.rst:506 +#: install/index.rst:754 msgid "Type of file" msgstr "Type de fichier" -#: install/index.rst:322 install/index.rst:422 install/index.rst:474 +#: install/index.rst:329 install/index.rst:429 install/index.rst:481 msgid "Installation directory" msgstr "Dossier d'installation" -#: install/index.rst:324 install/index.rst:476 +#: install/index.rst:331 install/index.rst:483 msgid "modules" msgstr "modules" -#: install/index.rst:313 +#: install/index.rst:320 msgid ":file:`{userbase}/lib/python{X.Y}/site-packages`" msgstr ":file:`{userbase}/lib/python{X.Y}/site-packages`" -#: install/index.rst:325 install/index.rst:426 install/index.rst:504 +#: install/index.rst:332 install/index.rst:433 install/index.rst:511 msgid "scripts" msgstr "scripts" -#: install/index.rst:314 +#: install/index.rst:321 msgid ":file:`{userbase}/bin`" msgstr ":file:`{userbase}/bin`" -#: install/index.rst:326 install/index.rst:427 install/index.rst:505 +#: install/index.rst:333 install/index.rst:434 install/index.rst:512 msgid "data" msgstr "données" -#: install/index.rst:326 +#: install/index.rst:333 msgid ":file:`{userbase}`" msgstr ":file:`{userbase}`" -#: install/index.rst:327 install/index.rst:428 install/index.rst:506 +#: install/index.rst:334 install/index.rst:435 install/index.rst:513 msgid "C headers" msgstr "en-têtes C" -#: install/index.rst:316 +#: install/index.rst:323 msgid ":file:`{userbase}/include/python{X.Y}{abiflags}/{distname}`" msgstr ":file:`{userbase}/include/python{X.Y}{abiflags}/{distname}`" -#: install/index.rst:319 +#: install/index.rst:326 msgid "And here are the values used on Windows:" msgstr "Et voici les valeurs utilisées sur Windows ::" -#: install/index.rst:324 +#: install/index.rst:331 msgid ":file:`{userbase}\\\\Python{XY}\\\\site-packages`" msgstr ":file:`{userbase}\\\\Python{XY}\\\\site-packages`" -#: install/index.rst:325 +#: install/index.rst:332 msgid ":file:`{userbase}\\\\Python{XY}\\\\Scripts`" msgstr ":file:`{userbase}\\\\Python{XY}\\\\Scripts`" -#: install/index.rst:327 +#: install/index.rst:334 msgid ":file:`{userbase}\\\\Python{XY}\\\\Include\\\\{distname}`" msgstr ":file:`{userbase}\\\\Python{XY}\\\\Include\\\\{distname}`" -#: install/index.rst:330 +#: install/index.rst:337 msgid "" "The advantage of using this scheme compared to the other ones described " "below is that the user site-packages directory is under normal conditions " @@ -683,7 +694,7 @@ msgstr "" "qui signifie qu’il n’y a rien d’autre à faire après avoir exécuté le script :" "file:`setup.py` pour finaliser l’installation." -#: install/index.rst:336 +#: install/index.rst:343 msgid "" "The :command:`build_ext` command also has a ``--user`` option to add :file:" "`{userbase}/include` to the compiler search path for header files and :file:" @@ -694,13 +705,13 @@ msgstr "" "ajouter :file:`{userbase}/include` dans les chemins où le compilateur " "recherche les fichiers d'en-têtes et :file:`{userbase}/lib` dans les chemins " "où le compilateur recherche les bibliothèques ainsi que les bibliothèques C " -"partagées chargeables à l'exécution (`rpath`)." +"partagées chargeables à l'exécution (``rpath``)." -#: install/index.rst:345 +#: install/index.rst:352 msgid "Alternate installation: the home scheme" msgstr "Installation alternative : le schéma *home*" -#: install/index.rst:347 +#: install/index.rst:354 msgid "" "The idea behind the \"home scheme\" is that you build and maintain a " "personal stash of Python modules. This scheme's name is derived from the " @@ -716,11 +727,11 @@ msgstr "" "file:`/usr/local/`. Ce schéma peut être utilisé par n’importe qui, quel que " "soit le système d’exploitation." -#: install/index.rst:354 +#: install/index.rst:361 msgid "Installing a new module distribution is as simple as ::" msgstr "Installer une nouvelle distribution de module est aussi simple que ::" -#: install/index.rst:358 +#: install/index.rst:365 msgid "" "where you can supply any directory you like for the :option:`!--home` " "option. On Unix, lazy typists can just type a tilde (``~``); the :command:" @@ -731,7 +742,7 @@ msgstr "" "commande :command:`install` le remplacera par le chemin vers votre dossier " "personnel ::" -#: install/index.rst:364 +#: install/index.rst:371 msgid "" "To make Python find the distributions installed with this scheme, you may " "have to :ref:`modify Python's search path ` or edit :mod:" @@ -743,7 +754,7 @@ msgstr "" "path>` ou modifier :mod:`sitecustomize` (voir :mod:`site`) pour appeler :" "func:`site.addsitedir` ou modifier :data:`sys.path`." -#: install/index.rst:369 +#: install/index.rst:376 msgid "" "The :option:`!--home` option defines the installation base directory. Files " "are installed to the following directories under the installation base as " @@ -753,33 +764,33 @@ msgstr "" "fichiers sont installés dans les dossiers suivants sous la base de " "l'installation de la façon suivante ::" -#: install/index.rst:375 +#: install/index.rst:382 msgid ":file:`{home}/lib/python`" msgstr ":file:`{home}/lib/python`" -#: install/index.rst:376 +#: install/index.rst:383 msgid ":file:`{home}/bin`" msgstr ":file:`{home}/bin`" -#: install/index.rst:377 +#: install/index.rst:384 msgid ":file:`{home}`" msgstr ":file:`{home}`" -#: install/index.rst:378 +#: install/index.rst:385 msgid ":file:`{home}/include/python/{distname}`" msgstr ":file:`{home}/include/python/{distname}`" -#: install/index.rst:381 +#: install/index.rst:388 msgid "(Mentally replace slashes with backslashes if you're on Windows.)" msgstr "" "(Remplacez mentalement les slashs avec des antislashs si vous êtes sur " "Windows.)" -#: install/index.rst:387 +#: install/index.rst:394 msgid "Alternate installation: Unix (the prefix scheme)" msgstr "Installation alternative : Unix (le schéma de préfixe)" -#: install/index.rst:389 +#: install/index.rst:396 msgid "" "The \"prefix scheme\" is useful when you wish to use one Python installation " "to perform the build/install (i.e., to run the setup script), but install " @@ -797,7 +808,7 @@ msgstr "" "schémas *user* et *home* viennent avant. Cependant, il y a au moins deux cas " "connus où le schéma *prefix* est utile." -#: install/index.rst:396 +#: install/index.rst:403 msgid "" "First, consider that many Linux distributions put Python in :file:`/usr`, " "rather than the more traditional :file:`/usr/local`. This is entirely " @@ -814,7 +825,7 @@ msgstr "" "file:`/usr/local/lib/python2.{X}` plutôt que dans :file:`/usr/lib/python2.{X}" "`. Ça peut être fait avec ::" -#: install/index.rst:405 +#: install/index.rst:412 msgid "" "Another possibility is a network filesystem where the name used to write to " "a remote directory is different from the name used to read it: for example, " @@ -830,7 +841,7 @@ msgstr "" "python2.{X}`, mais ces modules doivent être installés dans, par exemple, :" "file:`/mnt/{@server}/export/lib/python2.{X}`. Ça peut être fait avec ::" -#: install/index.rst:414 +#: install/index.rst:421 msgid "" "In either case, the :option:`!--prefix` option defines the installation " "base, and the :option:`!--exec-prefix` option defines the platform-specific " @@ -849,27 +860,27 @@ msgstr "" "n’est pas fournie, elle vaut par défaut :option:`!--prefix`. Les fichiers " "sont installés ainsi :" -#: install/index.rst:501 +#: install/index.rst:508 msgid "Python modules" msgstr "Modules Python" -#: install/index.rst:502 +#: install/index.rst:509 msgid "extension modules" msgstr "modules d'extension" -#: install/index.rst:426 +#: install/index.rst:433 msgid ":file:`{prefix}/bin`" msgstr ":file:`{prefix}/bin`" -#: install/index.rst:478 +#: install/index.rst:485 msgid ":file:`{prefix}`" msgstr ":file:`{prefix}`" -#: install/index.rst:428 +#: install/index.rst:435 msgid ":file:`{prefix}/include/python{X.Y}{abiflags}/{distname}`" msgstr ":file:`{prefix}/include/python{X.Y}{abiflags}/{distname}`" -#: install/index.rst:431 +#: install/index.rst:438 msgid "" "There is no requirement that :option:`!--prefix` or :option:`!--exec-prefix` " "actually point to an alternate Python installation; if the directories " @@ -879,7 +890,7 @@ msgstr "" "pointent vers une installation alternative de Python. Si les dossiers listés " "ci-dessus n’existent pas, ils sont créés au moment de l’installation." -#: install/index.rst:435 +#: install/index.rst:442 msgid "" "Incidentally, the real reason the prefix scheme is important is simply that " "a standard Unix installation uses the prefix scheme, but with :option:`!--" @@ -896,7 +907,7 @@ msgstr "" "schéma *prefix*, mais à chaque fois que vous lancez ``python setup.py " "install`` sans autre option, vous l’utilisez." -#: install/index.rst:442 +#: install/index.rst:449 msgid "" "Note that installing extensions to an alternate Python installation has no " "effect on how those extensions are built: in particular, the Python header " @@ -923,11 +934,11 @@ msgstr "" "`!--prefix` et :option:`!--exec-prefix` ne pointent pas vers une " "installation alternative de Python, cela n’a pas de sens.)" -#: install/index.rst:457 +#: install/index.rst:464 msgid "Alternate installation: Windows (the prefix scheme)" msgstr "Installation alternative : Windows (le schéma de préfixe)" -#: install/index.rst:459 +#: install/index.rst:466 msgid "" "Windows has no concept of a user's home directory, and since the standard " "Python installation under Windows is simpler than under Unix, the :option:" @@ -939,7 +950,7 @@ msgstr "" "l':option:`!--prefix` option a traditionnellement été utilisée pour " "installer des paquets supplémentaires à des endroits séparés sur Windows. ::" -#: install/index.rst:466 +#: install/index.rst:473 msgid "" "to install modules to the :file:`\\\\Temp\\\\Python` directory on the " "current drive." @@ -947,7 +958,7 @@ msgstr "" "pour installer des modules dans le dossier :file:`\\\\Temp\\\\Python` du " "disque courant." -#: install/index.rst:468 +#: install/index.rst:475 msgid "" "The installation base is defined by the :option:`!--prefix` option; the :" "option:`!--exec-prefix` option is not supported under Windows, which means " @@ -959,19 +970,19 @@ msgstr "" "qui signifie que les modules Python et les modules d'extension sont " "installés au même endroit. Les fichiers sont installés selon ce tableau :" -#: install/index.rst:477 +#: install/index.rst:484 msgid ":file:`{prefix}\\\\Scripts`" msgstr ":file:`{prefix}\\\\Scripts`" -#: install/index.rst:479 +#: install/index.rst:486 msgid ":file:`{prefix}\\\\Include\\\\{distname}`" msgstr ":file:`{prefix}\\\\Include\\\\{distname}`" -#: install/index.rst:486 +#: install/index.rst:493 msgid "Custom Installation" msgstr "Installation personnalisée" -#: install/index.rst:488 +#: install/index.rst:495 msgid "" "Sometimes, the alternate installation schemes described in section :ref:" "`inst-alt-install` just don't do what you want. You might want to tweak " @@ -986,7 +997,7 @@ msgstr "" "d'installation. Quel que soit le cas, vous créez ainsi un *procédé " "d'installation personnalisé*." -#: install/index.rst:494 +#: install/index.rst:501 msgid "" "To create a custom installation scheme, you start with one of the alternate " "schemes and override some of the installation directories used for the " @@ -996,39 +1007,39 @@ msgstr "" "alternatif et remplacez les dossiers d'installation de types de fichiers " "donnés via ces options :" -#: install/index.rst:499 +#: install/index.rst:506 msgid "Override option" msgstr "Option" -#: install/index.rst:501 +#: install/index.rst:508 msgid "``--install-purelib``" msgstr "``--install-purelib``" -#: install/index.rst:502 +#: install/index.rst:509 msgid "``--install-platlib``" msgstr "``--install-platlib``" -#: install/index.rst:503 +#: install/index.rst:510 msgid "all modules" msgstr "tous les modules" -#: install/index.rst:503 +#: install/index.rst:510 msgid "``--install-lib``" msgstr "``--install-lib``" -#: install/index.rst:504 +#: install/index.rst:511 msgid "``--install-scripts``" msgstr "``--install-scripts``" -#: install/index.rst:505 +#: install/index.rst:512 msgid "``--install-data``" msgstr "``--install-data``" -#: install/index.rst:506 +#: install/index.rst:513 msgid "``--install-headers``" msgstr "``--install-headers``" -#: install/index.rst:509 +#: install/index.rst:516 msgid "" "These override options can be relative, absolute, or explicitly defined in " "terms of one of the installation base directories. (There are two " @@ -1040,7 +1051,7 @@ msgid "" "between Python and extension modules.)" msgstr "" -#: install/index.rst:518 +#: install/index.rst:525 msgid "" "For example, say you're installing a module distribution to your home " "directory under Unix---but you want scripts to go in :file:`~/scripts` " @@ -1051,7 +1062,7 @@ msgid "" "case)::" msgstr "" -#: install/index.rst:527 +#: install/index.rst:534 msgid "" "Another Unix example: suppose your Python installation was built and " "installed with a prefix of :file:`/usr/local/python`, so under a standard " @@ -1060,14 +1071,14 @@ msgid "" "directory for the :option:`!--install-scripts` option::" msgstr "" -#: install/index.rst:535 +#: install/index.rst:542 msgid "" "(This performs an installation using the \"prefix scheme\", where the prefix " "is whatever your Python interpreter was installed with--- :file:`/usr/local/" "python` in this case.)" msgstr "" -#: install/index.rst:539 +#: install/index.rst:546 msgid "" "If you maintain Python on Windows, you might want third-party modules to " "live in a subdirectory of :file:`{prefix}`, rather than right in :file:" @@ -1077,7 +1088,7 @@ msgid "" "conveniently be both controlled by one option::" msgstr "" -#: install/index.rst:548 +#: install/index.rst:555 msgid "" "The specified installation directory is relative to :file:`{prefix}`. Of " "course, you also have to ensure that this directory is in Python's module " @@ -1086,7 +1097,7 @@ msgid "" "modify Python's search path." msgstr "" -#: install/index.rst:554 +#: install/index.rst:561 msgid "" "If you want to define an entire installation scheme, you just have to supply " "all of the installation directory options. The recommended way to do this " @@ -1096,18 +1107,18 @@ msgid "" "from, you might define the following installation scheme::" msgstr "" -#: install/index.rst:567 +#: install/index.rst:574 msgid "or, equivalently, ::" msgstr "ou ::" -#: install/index.rst:575 +#: install/index.rst:582 msgid "" "``$PLAT`` is not (necessarily) an environment variable---it will be expanded " "by the Distutils as it parses your command line options, just as it does " "when parsing your configuration file(s)." msgstr "" -#: install/index.rst:579 +#: install/index.rst:586 msgid "" "Obviously, specifying the entire installation scheme every time you install " "a new module distribution would be very tedious. Thus, you can put these " @@ -1115,24 +1126,24 @@ msgid "" "files`):" msgstr "" -#: install/index.rst:592 +#: install/index.rst:599 msgid "or, equivalently," msgstr "ou (équivalent)," -#: install/index.rst:603 +#: install/index.rst:610 msgid "" "Note that these two are *not* equivalent if you supply a different " "installation base directory when you run the setup script. For example, ::" msgstr "" -#: install/index.rst:608 +#: install/index.rst:615 msgid "" "would install pure modules to :file:`/tmp/python/lib` in the first case, and " "to :file:`/tmp/lib` in the second case. (For the second case, you probably " "want to supply an installation base of :file:`/tmp/python`.)" msgstr "" -#: install/index.rst:612 +#: install/index.rst:619 msgid "" "You probably noticed the use of ``$HOME`` and ``$PLAT`` in the sample " "configuration file input. These are Distutils configuration variables, " @@ -1145,7 +1156,7 @@ msgid "" "section :ref:`inst-config-files` for details." msgstr "" -#: install/index.rst:622 +#: install/index.rst:629 msgid "" "When a :ref:`virtual environment ` is activated, any options that " "change the installation path will be ignored from all distutils " @@ -1153,11 +1164,11 @@ msgid "" "the virtual environment." msgstr "" -#: install/index.rst:636 +#: install/index.rst:643 msgid "Modifying Python's Search Path" msgstr "" -#: install/index.rst:638 +#: install/index.rst:645 msgid "" "When the Python interpreter executes an :keyword:`import` statement, it " "searches for both Python code and extension modules along a search path. A " @@ -1166,12 +1177,12 @@ msgid "" "module and printing the value of ``sys.path``. ::" msgstr "" -#: install/index.rst:655 +#: install/index.rst:662 msgid "" "The null string in ``sys.path`` represents the current working directory." msgstr "" -#: install/index.rst:657 +#: install/index.rst:664 msgid "" "The expected convention for locally installed packages is to put them in " "the :file:`{...}/site-packages/` directory, but you may want to install " @@ -1182,7 +1193,7 @@ msgid "" "There are several different ways to add the directory." msgstr "" -#: install/index.rst:665 +#: install/index.rst:672 msgid "" "The most convenient way is to add a path configuration file to a directory " "that's already on Python's path, usually to the :file:`.../site-packages/` " @@ -1193,14 +1204,14 @@ msgid "" "this mechanism for installing fixed versions of standard modules.)" msgstr "" -#: install/index.rst:673 +#: install/index.rst:680 msgid "" "Paths can be absolute or relative, in which case they're relative to the " "directory containing the :file:`.pth` file. See the documentation of the :" "mod:`site` module for more information." msgstr "" -#: install/index.rst:677 +#: install/index.rst:684 msgid "" "A slightly less convenient way is to edit the :file:`site.py` file in " "Python's standard library, and modify ``sys.path``. :file:`site.py` is " @@ -1209,7 +1220,7 @@ msgid "" "simply edit :file:`site.py` and add two lines to it:" msgstr "" -#: install/index.rst:688 +#: install/index.rst:695 msgid "" "However, if you reinstall the same major version of Python (perhaps when " "upgrading from 2.2 to 2.2.2, for example) :file:`site.py` will be " @@ -1217,7 +1228,7 @@ msgid "" "modified and save a copy before doing the installation." msgstr "" -#: install/index.rst:693 +#: install/index.rst:700 msgid "" "There are two environment variables that can modify ``sys.path``. :envvar:" "`PYTHONHOME` sets an alternate value for the prefix of the Python " @@ -1226,7 +1237,7 @@ msgid "" "Y/', '/www/python/lib/pythonX.Y/plat-linux2', ...]``." msgstr "" -#: install/index.rst:699 +#: install/index.rst:706 msgid "" "The :envvar:`PYTHONPATH` variable can be set to a list of paths that will be " "added to the beginning of ``sys.path``. For example, if :envvar:" @@ -1236,17 +1247,17 @@ msgid "" "don't exist.)" msgstr "" -#: install/index.rst:706 +#: install/index.rst:713 msgid "" "Finally, ``sys.path`` is just a regular Python list, so any Python " "application can modify it by adding or removing entries." msgstr "" -#: install/index.rst:713 +#: install/index.rst:720 msgid "Distutils Configuration Files" msgstr "" -#: install/index.rst:715 +#: install/index.rst:722 msgid "" "As mentioned above, you can use Distutils configuration files to record " "personal or site preferences for any Distutils options. That is, any option " @@ -1258,76 +1269,76 @@ msgid "" "files are overridden by \"later\" files." msgstr "" -#: install/index.rst:728 +#: install/index.rst:735 msgid "Location and names of config files" msgstr "" -#: install/index.rst:730 +#: install/index.rst:737 msgid "" "The names and locations of the configuration files vary slightly across " -"platforms. On Unix and Mac OS X, the three configuration files (in the " -"order they are processed) are:" +"platforms. On Unix and macOS, the three configuration files (in the order " +"they are processed) are:" msgstr "" -#: install/index.rst:747 +#: install/index.rst:754 msgid "Location and filename" msgstr "" -#: install/index.rst:749 +#: install/index.rst:756 msgid "system" msgstr "" -#: install/index.rst:737 +#: install/index.rst:744 msgid ":file:`{prefix}/lib/python{ver}/distutils/distutils.cfg`" -msgstr "" +msgstr ":file:`{prefix}/lib/python{ver}/distutils/distutils.cfg`" -#: install/index.rst:751 +#: install/index.rst:758 msgid "personal" msgstr "" -#: install/index.rst:739 +#: install/index.rst:746 msgid ":file:`$HOME/.pydistutils.cfg`" -msgstr "" +msgstr ":file:`$HOME/.pydistutils.cfg`" -#: install/index.rst:753 +#: install/index.rst:760 msgid "local" msgstr "" -#: install/index.rst:753 +#: install/index.rst:760 msgid ":file:`setup.cfg`" -msgstr "" +msgstr ":file:`setup.cfg`" -#: install/index.rst:753 +#: install/index.rst:760 msgid "\\(3)" msgstr "\\(3)" -#: install/index.rst:744 +#: install/index.rst:751 msgid "And on Windows, the configuration files are:" msgstr "" -#: install/index.rst:749 +#: install/index.rst:756 msgid ":file:`{prefix}\\\\Lib\\\\distutils\\\\distutils.cfg`" -msgstr "" +msgstr ":file:`{prefix}\\\\Lib\\\\distutils\\\\distutils.cfg`" -#: install/index.rst:749 +#: install/index.rst:756 msgid "\\(4)" msgstr "\\(4)" -#: install/index.rst:751 +#: install/index.rst:758 msgid ":file:`%HOME%\\\\pydistutils.cfg`" -msgstr "" +msgstr ":file:`%HOME%\\\\pydistutils.cfg`" -#: install/index.rst:751 +#: install/index.rst:758 msgid "\\(5)" msgstr "\\(5)" -#: install/index.rst:756 +#: install/index.rst:763 msgid "" "On all platforms, the \"personal\" file can be temporarily disabled by " "passing the `--no-user-cfg` option." msgstr "" -#: install/index.rst:762 +#: install/index.rst:769 msgid "" "Strictly speaking, the system-wide configuration file lives in the directory " "where the Distutils are installed; under Python 1.6 and later on Unix, this " @@ -1336,7 +1347,7 @@ msgid "" "configuration file should be put there under Python 1.5.2." msgstr "" -#: install/index.rst:769 +#: install/index.rst:776 msgid "" "On Unix, if the :envvar:`HOME` environment variable is not defined, the " "user's home directory will be determined with the :func:`getpwuid` function " @@ -1344,12 +1355,12 @@ msgid "" "expanduser` function used by Distutils." msgstr "" -#: install/index.rst:775 +#: install/index.rst:782 msgid "" "I.e., in the current directory (usually the location of the setup script)." msgstr "" -#: install/index.rst:778 +#: install/index.rst:785 msgid "" "(See also note (1).) Under Python 1.6 and later, Python's default " "\"installation prefix\" is :file:`C:\\\\Python`, so the system configuration " @@ -1361,7 +1372,7 @@ msgid "" "Windows." msgstr "" -#: install/index.rst:787 +#: install/index.rst:794 msgid "" "On Windows, if the :envvar:`HOME` environment variable is not defined, :" "envvar:`USERPROFILE` then :envvar:`HOMEDRIVE` and :envvar:`HOMEPATH` will be " @@ -1369,11 +1380,11 @@ msgid "" "Distutils." msgstr "" -#: install/index.rst:796 +#: install/index.rst:803 msgid "Syntax of config files" msgstr "" -#: install/index.rst:798 +#: install/index.rst:805 msgid "" "The Distutils configuration files all have the same syntax. The config " "files are grouped into sections. There is one section for each Distutils " @@ -1382,13 +1393,13 @@ msgid "" "``option=value``." msgstr "" -#: install/index.rst:803 +#: install/index.rst:810 msgid "" "For example, the following is a complete config file that just forces all " "commands to run quietly by default:" msgstr "" -#: install/index.rst:811 +#: install/index.rst:818 msgid "" "If this is installed as the system config file, it will affect all " "processing of any Python module distribution by any user on the current " @@ -1398,18 +1409,18 @@ msgid "" "distribution, it affects only that distribution." msgstr "" -#: install/index.rst:818 +#: install/index.rst:825 msgid "" "You could override the default \"build base\" directory and make the :" "command:`build\\*` commands always forcibly rebuild all files with the " "following:" msgstr "" -#: install/index.rst:828 +#: install/index.rst:835 msgid "which corresponds to the command-line arguments ::" msgstr "" -#: install/index.rst:832 +#: install/index.rst:839 msgid "" "except that including the :command:`build` command on the command-line means " "that command will be run. Including a particular command in config files " @@ -1418,29 +1429,29 @@ msgid "" "values from it are run, they will use the values in the config file.)" msgstr "" -#: install/index.rst:838 +#: install/index.rst:845 msgid "" "You can find out the complete list of options for any command using the :" "option:`!--help` option, e.g.::" msgstr "" -#: install/index.rst:843 +#: install/index.rst:850 msgid "" "and you can find out the complete list of global options by using :option:" "`!--help` without a command::" msgstr "" -#: install/index.rst:848 +#: install/index.rst:855 msgid "" "See also the \"Reference\" section of the \"Distributing Python Modules\" " "manual." msgstr "" -#: install/index.rst:854 +#: install/index.rst:861 msgid "Building Extensions: Tips and Tricks" msgstr "" -#: install/index.rst:856 +#: install/index.rst:863 msgid "" "Whenever possible, the Distutils try to use the configuration information " "made available by the Python interpreter used to run the :file:`setup.py` " @@ -1450,11 +1461,11 @@ msgid "" "section discusses how to override the usual Distutils behaviour." msgstr "" -#: install/index.rst:867 +#: install/index.rst:874 msgid "Tweaking compiler/linker flags" msgstr "" -#: install/index.rst:869 +#: install/index.rst:876 msgid "" "Compiling a Python extension written in C or C++ will sometimes require " "specifying custom flags for the compiler and linker in order to use a " @@ -1463,7 +1474,7 @@ msgid "" "you're trying to cross-compile Python." msgstr "" -#: install/index.rst:875 +#: install/index.rst:882 msgid "" "In the most general case, the extension author might have foreseen that " "compiling the extensions would be complicated, and provided a :file:`Setup` " @@ -1472,18 +1483,18 @@ msgid "" "require elaborate sets of compiler flags in order to work." msgstr "" -#: install/index.rst:881 +#: install/index.rst:888 msgid "" "A :file:`Setup` file, if present, is parsed in order to get a list of " "extensions to build. Each line in a :file:`Setup` describes a single " "module. Lines have the following structure::" msgstr "" -#: install/index.rst:888 +#: install/index.rst:895 msgid "Let's examine each of the fields in turn." msgstr "" -#: install/index.rst:890 +#: install/index.rst:897 msgid "" "*module* is the name of the extension module to be built, and should be a " "valid Python identifier. You can't just change this in order to rename a " @@ -1491,7 +1502,7 @@ msgid "" "left alone." msgstr "" -#: install/index.rst:894 +#: install/index.rst:901 msgid "" "*sourcefile* is anything that's likely to be a source code file, at least " "judging by the filename. Filenames ending in :file:`.c` are assumed to be " @@ -1500,75 +1511,75 @@ msgid "" "assumed to be in Objective C." msgstr "" -#: install/index.rst:900 +#: install/index.rst:907 msgid "" "*cpparg* is an argument for the C preprocessor, and is anything starting " "with :option:`!-I`, :option:`!-D`, :option:`!-U` or :option:`!-C`." msgstr "" -#: install/index.rst:903 +#: install/index.rst:910 msgid "" "*library* is anything ending in :file:`.a` or beginning with :option:`!-l` " "or :option:`!-L`." msgstr "" -#: install/index.rst:906 +#: install/index.rst:913 msgid "" "If a particular platform requires a special library on your platform, you " "can add it by editing the :file:`Setup` file and running ``python setup.py " "build``. For example, if the module defined by the line ::" msgstr "" -#: install/index.rst:912 +#: install/index.rst:919 msgid "" "must be linked with the math library :file:`libm.a` on your platform, simply " "add :option:`!-lm` to the line::" msgstr "" -#: install/index.rst:917 +#: install/index.rst:924 msgid "" "Arbitrary switches intended for the compiler or the linker can be supplied " "with the :option:`!-Xcompiler` *arg* and :option:`!-Xlinker` *arg* options::" msgstr "" -#: install/index.rst:922 +#: install/index.rst:929 msgid "" "The next option after :option:`!-Xcompiler` and :option:`!-Xlinker` will be " "appended to the proper command line, so in the above example the compiler " "will be passed the :option:`!-o32` option, and the linker will be passed :" "option:`!-shared`. If a compiler option requires an argument, you'll have " -"to supply multiple :option:`!-Xcompiler` options; for example, to pass ``-x c" -"++`` the :file:`Setup` file would have to contain ``-Xcompiler -x -Xcompiler " -"c++``." +"to supply multiple :option:`!-Xcompiler` options; for example, to pass ``-x " +"c++`` the :file:`Setup` file would have to contain ``-Xcompiler -x -" +"Xcompiler c++``." msgstr "" -#: install/index.rst:929 +#: install/index.rst:936 msgid "" "Compiler flags can also be supplied through setting the :envvar:`CFLAGS` " "environment variable. If set, the contents of :envvar:`CFLAGS` will be " "added to the compiler flags specified in the :file:`Setup` file." msgstr "" -#: install/index.rst:937 +#: install/index.rst:944 msgid "Using non-Microsoft compilers on Windows" msgstr "" -#: install/index.rst:944 +#: install/index.rst:951 msgid "Borland/CodeGear C++" msgstr "" -#: install/index.rst:946 +#: install/index.rst:953 msgid "" "This subsection describes the necessary steps to use Distutils with the " "Borland C++ compiler version 5.5. First you have to know that Borland's " "object file format (OMF) is different from the format used by the Python " -"version you can download from the Python or ActiveState Web site. (Python " +"version you can download from the Python or ActiveState web site. (Python " "is built with Microsoft Visual C++, which uses COFF as the object file " "format.) For this reason you have to convert Python's library :file:" "`python25.lib` into the Borland format. You can do this as follows:" msgstr "" -#: install/index.rst:961 +#: install/index.rst:968 msgid "" "The :file:`coff2omf` program comes with the Borland compiler. The file :" "file:`python25.lib` is in the :file:`Libs` directory of your Python " @@ -1576,13 +1587,13 @@ msgid "" "to convert them too." msgstr "" -#: install/index.rst:966 +#: install/index.rst:973 msgid "" "The converted files have to reside in the same directories as the normal " "libraries." msgstr "" -#: install/index.rst:969 +#: install/index.rst:976 msgid "" "How does Distutils manage to use these libraries with their changed names? " "If the extension needs a library (eg. :file:`foo`) Distutils checks first if " @@ -1591,46 +1602,46 @@ msgid "" "it uses the default name (:file:`foo.lib`.) [#]_" msgstr "" -#: install/index.rst:975 +#: install/index.rst:982 msgid "" "To let Distutils compile your extension with Borland C++ you now have to " "type::" msgstr "" -#: install/index.rst:979 +#: install/index.rst:986 msgid "" "If you want to use the Borland C++ compiler as the default, you could " "specify this in your personal or system-wide configuration file for " "Distutils (see section :ref:`inst-config-files`.)" msgstr "" -#: install/index.rst:988 +#: install/index.rst:995 msgid "`C++Builder Compiler `_" msgstr "" -#: install/index.rst:987 +#: install/index.rst:994 msgid "" "Information about the free C++ compiler from Borland, including links to the " "download pages." msgstr "" -#: install/index.rst:991 +#: install/index.rst:998 msgid "" "`Creating Python Extensions Using Borland's Free Compiler `_" msgstr "" -#: install/index.rst:991 +#: install/index.rst:998 msgid "" "Document describing how to use Borland's free command-line C++ compiler to " "build Python." msgstr "" -#: install/index.rst:996 +#: install/index.rst:1003 msgid "GNU C / Cygwin / MinGW" msgstr "" -#: install/index.rst:998 +#: install/index.rst:1005 msgid "" "This section describes the necessary steps to use Distutils with the GNU C/C+" "+ compilers in their Cygwin and MinGW distributions. [#]_ For a Python " @@ -1638,40 +1649,40 @@ msgid "" "of these following steps." msgstr "" -#: install/index.rst:1003 +#: install/index.rst:1010 msgid "" "Not all extensions can be built with MinGW or Cygwin, but many can. " "Extensions most likely to not work are those that use C++ or depend on " "Microsoft Visual C extensions." msgstr "" -#: install/index.rst:1007 +#: install/index.rst:1014 msgid "To let Distutils compile your extension with Cygwin you have to type::" msgstr "" -#: install/index.rst:1011 +#: install/index.rst:1018 msgid "and for Cygwin in no-cygwin mode [#]_ or for MinGW type::" msgstr "" -#: install/index.rst:1015 +#: install/index.rst:1022 msgid "" "If you want to use any of these options/compilers as default, you should " "consider writing it in your personal or system-wide configuration file for " "Distutils (see section :ref:`inst-config-files`.)" msgstr "" -#: install/index.rst:1020 +#: install/index.rst:1027 msgid "Older Versions of Python and MinGW" msgstr "" -#: install/index.rst:1021 +#: install/index.rst:1028 msgid "" "The following instructions only apply if you're using a version of Python " "inferior to 2.4.1 with a MinGW inferior to 3.0.0 (with " "binutils-2.13.90-20030111-1)." msgstr "" -#: install/index.rst:1025 +#: install/index.rst:1032 msgid "" "These compilers require some special libraries. This task is more complex " "than for Borland's C++, because there is no program to convert the library. " @@ -1680,7 +1691,7 @@ msgid "" "projects/mingw/files/MinGW/Extension/pexports/)." msgstr "" -#: install/index.rst:1038 +#: install/index.rst:1045 msgid "" "The location of an installed :file:`python25.dll` will depend on the " "installation options and the version and language of Windows. In a \"just " @@ -1689,51 +1700,51 @@ msgid "" "directory." msgstr "" -#: install/index.rst:1043 +#: install/index.rst:1050 msgid "" "Then you can create from these information an import library for gcc. ::" msgstr "" -#: install/index.rst:1047 +#: install/index.rst:1054 msgid "" "The resulting library has to be placed in the same directory as :file:" "`python25.lib`. (Should be the :file:`libs` directory under your Python " "installation directory.)" msgstr "" -#: install/index.rst:1051 +#: install/index.rst:1058 msgid "" "If your extension uses other libraries (zlib,...) you might have to convert " "them too. The converted files have to reside in the same directories as the " "normal libraries do." msgstr "" -#: install/index.rst:1058 +#: install/index.rst:1065 msgid "" "`Building Python modules on MS Windows platform with MinGW `_" msgstr "" -#: install/index.rst:1059 +#: install/index.rst:1066 msgid "" "Information about building the required libraries for the MinGW environment." msgstr "" -#: install/index.rst:1063 +#: install/index.rst:1070 msgid "Footnotes" msgstr "Notes" -#: install/index.rst:1064 +#: install/index.rst:1071 msgid "" "This also means you could replace all existing COFF-libraries with OMF-" "libraries of the same name." msgstr "" -#: install/index.rst:1067 +#: install/index.rst:1074 msgid "Check https://www.sourceware.org/cygwin/ for more information" msgstr "" -#: install/index.rst:1069 +#: install/index.rst:1076 msgid "" "Then you have no POSIX emulation available, but you also don't need :file:" "`cygwin1.dll`." diff --git a/installing/index.po b/installing/index.po index 3b4b7dea90..a833814a26 100644 --- a/installing/index.po +++ b/installing/index.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2019-12-15 21:18+0100\n" +"POT-Creation-Date: 2021-10-21 15:04+0200\n" +"PO-Revision-Date: 2022-02-23 18:50+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.4\n" +"X-Generator: Poedit 3.0.1\n" #: installing/index.rst:7 msgid "Installing Python Modules" @@ -118,7 +118,7 @@ msgstr "" #: installing/index.rst:47 msgid "" -"The `Python Packaging Index `__ is a public repository of " +"The `Python Package Index `__ is a public repository of " "open source licensed packages made available for use by other Python users." msgstr "" "L'`Index des Paquets Python `__ est un dépôt public des " @@ -188,14 +188,14 @@ msgstr "" #: installing/index.rst:80 msgid "" "The following command will install the latest version of a module and its " -"dependencies from the Python Packaging Index::" +"dependencies from the Python Package Index::" msgstr "" "La commande suivante va installer la dernière version d'un module et ses " "dépendances depuis le *Python Package Index* ::" #: installing/index.rst:87 msgid "" -"For POSIX users (including Mac OS X and Linux users), the examples in this " +"For POSIX users (including macOS and Linux users), the examples in this " "guide assume the use of a :term:`virtual environment`." msgstr "" "Pour les utilisateurs POSIX (y compris Mac OS X et Linux), les exemples de " @@ -340,9 +340,9 @@ msgstr "" #: installing/index.rst:166 msgid "" -"On Linux, Mac OS X, and other POSIX systems, use the versioned Python " -"commands in combination with the ``-m`` switch to run the appropriate copy " -"of ``pip``::" +"On Linux, macOS, and other POSIX systems, use the versioned Python commands " +"in combination with the ``-m`` switch to run the appropriate copy of " +"``pip``::" msgstr "" "Sous Linux, Max OS X et autres systèmes POSIX, utiliser les commandes Python " "de la version souhaitée en combinaison avec l'option ``-m`` permet de lancer " @@ -432,10 +432,10 @@ msgstr "" #: installing/index.rst:227 msgid "" "With the introduction of support for the binary ``wheel`` format, and the " -"ability to publish wheels for at least Windows and Mac OS X through the " -"Python Packaging Index, this problem is expected to diminish over time, as " -"users are more regularly able to install pre-built extensions rather than " -"needing to build them themselves." +"ability to publish wheels for at least Windows and macOS through the Python " +"Package Index, this problem is expected to diminish over time, as users are " +"more regularly able to install pre-built extensions rather than needing to " +"build them themselves." msgstr "" "Avec l'introduction du format binaire ``wheel``, et la possibilité de " "publier des *wheels*, pour, au moins Windows et Mac OS X, via le *Python " diff --git a/library/2to3.po b/library/2to3.po index 819a3cdb0f..11d67b3b15 100644 --- a/library/2to3.po +++ b/library/2to3.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2021-04-29 13:57+0200\n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 15:44+0200\n" "Last-Translator: Dimitri Merejkowsky \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -34,11 +34,19 @@ msgstr "" "utilisée par *2to3* est cependant une bibliothèque flexible et générique, il " "est donc possible d'écrire vos propres correcteurs pour *2to3*." -#: library/2to3.rst:18 +#: library/2to3.rst:19 +msgid "" +"The ``lib2to3`` module was marked pending for deprecation in Python 3.9 " +"(raising :exc:`PendingDeprecationWarning` on import) and fully deprecated in " +"Python 3.11 (raising :exc:`DeprecationWarning`). The ``2to3`` tool is part " +"of that. It will be removed in Python 3.13." +msgstr "" + +#: library/2to3.rst:23 msgid "Using 2to3" msgstr "Utilisation de *2to3*" -#: library/2to3.rst:20 +#: library/2to3.rst:25 msgid "" "2to3 will usually be installed with the Python interpreter as a script. It " "is also located in the :file:`Tools/scripts` directory of the Python root." @@ -47,7 +55,7 @@ msgstr "" "script. Il est également situé dans le dossier :file:`Tools/scripts` à " "racine de Python." -#: library/2to3.rst:23 +#: library/2to3.rst:28 msgid "" "2to3's basic arguments are a list of files or directories to transform. The " "directories are recursively traversed for Python sources." @@ -56,16 +64,16 @@ msgstr "" "à transformer. Les répertoires sont parcourus récursivement pour trouver " "les sources Python." -#: library/2to3.rst:26 +#: library/2to3.rst:31 msgid "Here is a sample Python 2.x source file, :file:`example.py`::" msgstr "Voici un exemple de fichier source Python 2.x, :file:`example.py` ::" -#: library/2to3.rst:34 +#: library/2to3.rst:39 msgid "It can be converted to Python 3.x code via 2to3 on the command line:" msgstr "" "Il peut être converti en code Python 3.x par *2to3* en ligne de commande :" -#: library/2to3.rst:40 +#: library/2to3.rst:45 msgid "" "A diff against the original source file is printed. 2to3 can also write the " "needed modifications right back to the source file. (A backup of the " @@ -78,11 +86,11 @@ msgstr "" "l'option :option:`!-n` soit également donnée.) L'écriture des modifications " "est activée avec l'option :option:`!-w` :" -#: library/2to3.rst:49 +#: library/2to3.rst:54 msgid "After transformation, :file:`example.py` looks like this::" msgstr "Après transformation, :file:`example.py` ressemble à ::" -#: library/2to3.rst:57 +#: library/2to3.rst:62 msgid "" "Comments and exact indentation are preserved throughout the translation " "process." @@ -90,7 +98,7 @@ msgstr "" "Les commentaires et les retraits sont préservés tout au long du processus de " "traduction." -#: library/2to3.rst:59 +#: library/2to3.rst:64 msgid "" "By default, 2to3 runs a set of :ref:`predefined fixers <2to3-fixers>`. The :" "option:`!-l` flag lists all available fixers. An explicit set of fixers to " @@ -105,12 +113,12 @@ msgstr "" "L'exemple suivant exécute uniquement les ``import`` et les correcteurs " "``has_key`` :" -#: library/2to3.rst:68 +#: library/2to3.rst:73 msgid "This command runs every fixer except the ``apply`` fixer:" msgstr "" "Cette commande exécute tous les correcteurs, sauf le correcteurs ``apply`` :" -#: library/2to3.rst:74 +#: library/2to3.rst:79 msgid "" "Some fixers are *explicit*, meaning they aren't run by default and must be " "listed on the command line to be run. Here, in addition to the default " @@ -121,11 +129,11 @@ msgstr "" "exécuter. Ici, en plus des correcteurs par défaut, le correcteur ``idioms`` " "est exécuté :" -#: library/2to3.rst:82 +#: library/2to3.rst:87 msgid "Notice how passing ``all`` enables all default fixers." msgstr "Notez que passer ``all`` active tous les correcteurs par défaut." -#: library/2to3.rst:84 +#: library/2to3.rst:89 msgid "" "Sometimes 2to3 will find a place in your source code that needs to be " "changed, but 2to3 cannot fix automatically. In this case, 2to3 will print a " @@ -137,7 +145,7 @@ msgstr "" "*2to3* affiche un avertissement sous la comparaison d'un fichier. Vous " "devez traiter l'avertissement afin d'avoir un code conforme à Python 3.x." -#: library/2to3.rst:89 +#: library/2to3.rst:94 msgid "" "2to3 can also refactor doctests. To enable this mode, use the :option:`!-d` " "flag. Note that *only* doctests will be refactored. This also doesn't " @@ -150,7 +158,7 @@ msgstr "" "*doctests* tels que des exemples dans un document *reST* peuvent également " "être réusinés avec cette option." -#: library/2to3.rst:94 +#: library/2to3.rst:99 msgid "" "The :option:`!-v` option enables output of more information on the " "translation process." @@ -158,7 +166,7 @@ msgstr "" "L'option :option:`!-v` augmente la quantité de messages générés par le " "processus de traduction." -#: library/2to3.rst:97 +#: library/2to3.rst:102 msgid "" "Since some print statements can be parsed as function calls or statements, " "2to3 cannot always read files containing the print function. When 2to3 " @@ -180,7 +188,7 @@ msgstr "" "converties. Notez également l'usage de l'option :option:`!-e` pour " "transformer :func:`exec` en fonction." -#: library/2to3.rst:105 +#: library/2to3.rst:110 msgid "" "The :option:`!-o` or :option:`!--output-dir` option allows specification of " "an alternate directory for processed output files to be written to. The :" @@ -192,11 +200,11 @@ msgstr "" "est requise quand on les utilise comme fichiers de sauvegarde qui n'ont pas " "de sens si les fichiers d'entrée ne sont pas écrasés." -#: library/2to3.rst:110 +#: library/2to3.rst:115 msgid "The :option:`!-o` option was added." msgstr "L'option :option:`!-o` a été ajoutée." -#: library/2to3.rst:113 +#: library/2to3.rst:118 msgid "" "The :option:`!-W` or :option:`!--write-unchanged-files` flag tells 2to3 to " "always write output files even if no changes were required to the file. " @@ -206,16 +214,16 @@ msgid "" msgstr "" "L'option :option:`!-W` ou :option:`!—write-unchanged-files` indique à *2to3* " "de toujours écrire des fichiers de sortie même si aucun changement du " -"fichier n'était nécessaire. Ceci est très utile avec `!-o` pour qu'un arbre " -"des sources Python entier soit copié avec la traduction d'un répertoire à " -"l'autre. Cette option implique :option:`!-w` sans quoi elle n'aurait pas de " -"sens." +"fichier n'était nécessaire. Ceci est très utile avec :option:`!-o` pour " +"qu'un arbre des sources Python entier soit copié avec la traduction d'un " +"répertoire à l'autre. Cette option implique :option:`!-w` sans quoi elle " +"n'aurait pas de sens." -#: library/2to3.rst:119 +#: library/2to3.rst:124 msgid "The :option:`!-W` flag was added." msgstr "L'option :option:`!-W` a été ajoutée." -#: library/2to3.rst:122 +#: library/2to3.rst:127 msgid "" "The :option:`!--add-suffix` option specifies a string to append to all " "output filenames. The :option:`!-n` flag is required when specifying this " @@ -226,25 +234,25 @@ msgstr "" "cas, puisque sauvegarder n'est pas nécessaire en écrivant dans des fichiers " "différents. Exemple:" -#: library/2to3.rst:130 +#: library/2to3.rst:135 msgid "Will cause a converted file named ``example.py3`` to be written." msgstr "Écrit un fichier converti nommé ``example.py3``." -#: library/2to3.rst:132 +#: library/2to3.rst:137 msgid "The :option:`!--add-suffix` option was added." msgstr "L'option :option:`!--add-suffix` est ajoutée." -#: library/2to3.rst:135 +#: library/2to3.rst:140 msgid "To translate an entire project from one directory tree to another use:" msgstr "" "Pour traduire un projet entier d'une arborescence de répertoires à une " "autre, utilisez :" -#: library/2to3.rst:145 +#: library/2to3.rst:150 msgid "Fixers" msgstr "Correcteurs" -#: library/2to3.rst:147 +#: library/2to3.rst:152 msgid "" "Each step of transforming code is encapsulated in a fixer. The command " "``2to3 -l`` lists them. As :ref:`documented above <2to3-using>`, each can " @@ -255,7 +263,7 @@ msgstr "" "dessus <2to3-using>`, chacun peut être activé ou désactivé " "individuellement. Ils sont décrits plus en détails ici." -#: library/2to3.rst:154 +#: library/2to3.rst:159 msgid "" "Removes usage of :func:`apply`. For example ``apply(function, *args, " "**kwargs)`` is converted to ``function(*args, **kwargs)``." @@ -263,103 +271,103 @@ msgstr "" "Supprime l'usage d':func:`apply`. Par exemple, ``apply(function, *args, " "**kwargs)`` est converti en ``function(*args, **kwargs)``." -#: library/2to3.rst:159 +#: library/2to3.rst:164 msgid "Replaces deprecated :mod:`unittest` method names with the correct ones." msgstr "" "Remplace les noms de méthodes obsolètes du module :mod:`unittest` par les " "bons." -#: library/2to3.rst:350 +#: library/2to3.rst:356 msgid "From" msgstr "De" -#: library/2to3.rst:350 +#: library/2to3.rst:356 msgid "To" msgstr "À" -#: library/2to3.rst:164 +#: library/2to3.rst:169 msgid "``failUnlessEqual(a, b)``" msgstr "``failUnlessEqual(a, b)``" -#: library/2to3.rst:166 +#: library/2to3.rst:171 msgid ":meth:`assertEqual(a, b) `" msgstr ":meth:`assertEqual(a, b) `" -#: library/2to3.rst:166 +#: library/2to3.rst:171 msgid "``assertEquals(a, b)``" msgstr "``assertEquals(a, b)``" -#: library/2to3.rst:168 +#: library/2to3.rst:173 msgid "``failIfEqual(a, b)``" msgstr "``failIfEqual(a, b)``" -#: library/2to3.rst:170 +#: library/2to3.rst:175 msgid ":meth:`assertNotEqual(a, b) `" msgstr ":meth:`assertNotEqual(a, b) `" -#: library/2to3.rst:170 +#: library/2to3.rst:175 msgid "``assertNotEquals(a, b)``" msgstr "``assertNotEquals(a, b)``" -#: library/2to3.rst:172 +#: library/2to3.rst:177 msgid "``failUnless(a)``" msgstr "``failUnless(a)``" -#: library/2to3.rst:174 +#: library/2to3.rst:179 msgid ":meth:`assertTrue(a) `" msgstr ":meth:`assertTrue(a) `" -#: library/2to3.rst:174 +#: library/2to3.rst:179 msgid "``assert_(a)``" msgstr "``assert_(a)``" -#: library/2to3.rst:176 +#: library/2to3.rst:181 msgid "``failIf(a)``" msgstr "``failIf(a)``" -#: library/2to3.rst:176 +#: library/2to3.rst:181 msgid ":meth:`assertFalse(a) `" msgstr ":meth:`assertFalse(a) `" -#: library/2to3.rst:178 +#: library/2to3.rst:183 msgid "``failUnlessRaises(exc, cal)``" msgstr "``failUnlessRaises(exc, cal)``" -#: library/2to3.rst:178 +#: library/2to3.rst:183 msgid ":meth:`assertRaises(exc, cal) `" msgstr ":meth:`assertRaises(exc, cal) `" -#: library/2to3.rst:180 +#: library/2to3.rst:185 msgid "``failUnlessAlmostEqual(a, b)``" msgstr "``failUnlessAlmostEqual(a, b)``" -#: library/2to3.rst:182 +#: library/2to3.rst:187 msgid ":meth:`assertAlmostEqual(a, b) `" msgstr ":meth:`assertAlmostEqual(a, b) `" -#: library/2to3.rst:182 +#: library/2to3.rst:187 msgid "``assertAlmostEquals(a, b)``" msgstr "``assertAlmostEquals(a, b)``" -#: library/2to3.rst:184 +#: library/2to3.rst:189 msgid "``failIfAlmostEqual(a, b)``" msgstr "``failIfAlmostEqual(a, b)``" -#: library/2to3.rst:186 +#: library/2to3.rst:191 msgid "" ":meth:`assertNotAlmostEqual(a, b) `" msgstr "" ":meth:`assertNotAlmostEqual(a, b) `" -#: library/2to3.rst:186 +#: library/2to3.rst:191 msgid "``assertNotAlmostEquals(a, b)``" msgstr "``assertNotAlmostEquals(a, b)``" -#: library/2to3.rst:192 +#: library/2to3.rst:197 msgid "Converts :class:`basestring` to :class:`str`." msgstr "Convertit une :class:`basestring` en :class:`str`." -#: library/2to3.rst:196 +#: library/2to3.rst:201 msgid "" "Converts :class:`buffer` to :class:`memoryview`. This fixer is optional " "because the :class:`memoryview` API is similar but not exactly the same as " @@ -369,7 +377,7 @@ msgstr "" "optionnel car l'API :class:`memoryview` est similaire mais pas exactement " "pareil que celle de :class:`buffer`." -#: library/2to3.rst:202 +#: library/2to3.rst:207 msgid "" "Fixes dictionary iteration methods. :meth:`dict.iteritems` is converted to :" "meth:`dict.items`, :meth:`dict.iterkeys` to :meth:`dict.keys`, and :meth:" @@ -388,15 +396,15 @@ msgstr "" "items`, :meth:`dict.keys` et :meth:`dict.values` dans un appel à :class:" "`list`." -#: library/2to3.rst:212 +#: library/2to3.rst:217 msgid "Converts ``except X, T`` to ``except X as T``." msgstr "Convertit ``except X, T`` en ``except X as T``." -#: library/2to3.rst:216 +#: library/2to3.rst:221 msgid "Converts the ``exec`` statement to the :func:`exec` function." msgstr "Convertit l'instruction ``exec`` en fonction :func:`exec`." -#: library/2to3.rst:220 +#: library/2to3.rst:225 msgid "" "Removes usage of :func:`execfile`. The argument to :func:`execfile` is " "wrapped in calls to :func:`open`, :func:`compile`, and :func:`exec`." @@ -404,7 +412,7 @@ msgstr "" "Supprime l'usage de :func:`execfile`. L'argument de :func:`execfile` est " "encapsulé dans des appels à :func:`open`, :func:`compile` et :func:`exec`." -#: library/2to3.rst:225 +#: library/2to3.rst:230 msgid "" "Changes assignment of :attr:`sys.exitfunc` to use of the :mod:`atexit` " "module." @@ -412,11 +420,11 @@ msgstr "" "Change l'affectation de :attr:`sys.exitfunc` pour utiliser le module :mod:" "`atexit`." -#: library/2to3.rst:230 +#: library/2to3.rst:235 msgid "Wraps :func:`filter` usage in a :class:`list` call." msgstr "Encapsule l'usage de :func:`filter` dans un appel à :class:`list`." -#: library/2to3.rst:234 +#: library/2to3.rst:239 msgid "" "Fixes function attributes that have been renamed. For example, " "``my_function.func_closure`` is converted to ``my_function.__closure__``." @@ -424,19 +432,19 @@ msgstr "" "Fixe les attributs de fonction ayant été renommés. Par exemple, " "``my_function.func_closure`` est converti en ``my_function.__closure__``." -#: library/2to3.rst:239 +#: library/2to3.rst:244 msgid "Removes ``from __future__ import new_feature`` statements." msgstr "Supprime les instructions ``from __future__ import new_feature``." -#: library/2to3.rst:243 +#: library/2to3.rst:248 msgid "Renames :func:`os.getcwdu` to :func:`os.getcwd`." msgstr "Renomme :func:`os.getcwdu` en :func:`os.getcwd`." -#: library/2to3.rst:247 +#: library/2to3.rst:252 msgid "Changes ``dict.has_key(key)`` to ``key in dict``." msgstr "Change ``dict.has_key(key)`` en ``key in dict``." -#: library/2to3.rst:251 +#: library/2to3.rst:256 msgid "" "This optional fixer performs several transformations that make Python code " "more idiomatic. Type comparisons like ``type(x) is SomeClass`` and " @@ -451,20 +459,20 @@ msgstr "" "aussi d'utiliser :func:`sorted` aux endroits appropriés. Par exemple, ce " "bloc ::" -#: library/2to3.rst:260 +#: library/2to3.rst:265 msgid "is changed to ::" msgstr "est transformé en ::" -#: library/2to3.rst:266 +#: library/2to3.rst:271 msgid "Detects sibling imports and converts them to relative imports." msgstr "" "Détecte les importations voisines et les convertit en importations relatives." -#: library/2to3.rst:270 +#: library/2to3.rst:275 msgid "Handles module renames in the standard library." msgstr "Gère les renommages de modules dans la bibliothèque standard." -#: library/2to3.rst:274 +#: library/2to3.rst:279 msgid "" "Handles other modules renames in the standard library. It is separate from " "the :2to3fixer:`imports` fixer only because of technical limitations." @@ -473,15 +481,15 @@ msgstr "" "distinct de :2to3fixer:`imports` seulement en raison de limitations " "techniques." -#: library/2to3.rst:279 +#: library/2to3.rst:284 msgid "Converts ``input(prompt)`` to ``eval(input(prompt))``." msgstr "Convertit ``input(prompt)`` en ``eval(input(prompt))``." -#: library/2to3.rst:283 +#: library/2to3.rst:288 msgid "Converts :func:`intern` to :func:`sys.intern`." msgstr "Convertit :func:`intern` en :func:`sys.intern`." -#: library/2to3.rst:287 +#: library/2to3.rst:292 msgid "" "Fixes duplicate types in the second argument of :func:`isinstance`. For " "example, ``isinstance(x, (int, int))`` is converted to ``isinstance(x, " @@ -493,7 +501,7 @@ msgstr "" "int)`` et ``isinstance(x, (int, float, int))`` est converti en " "``isinstance(x, (int, float))``." -#: library/2to3.rst:294 +#: library/2to3.rst:299 msgid "" "Removes imports of :func:`itertools.ifilter`, :func:`itertools.izip`, and :" "func:`itertools.imap`. Imports of :func:`itertools.ifilterfalse` are also " @@ -503,7 +511,7 @@ msgstr "" "izip` et :func:`itertools.imap`. Les importations de :func:`itertools." "ifilterfalse` sont aussi changées en :func:`itertools.filterfalse`." -#: library/2to3.rst:300 +#: library/2to3.rst:305 msgid "" "Changes usage of :func:`itertools.ifilter`, :func:`itertools.izip`, and :" "func:`itertools.imap` to their built-in equivalents. :func:`itertools." @@ -513,11 +521,11 @@ msgstr "" "`itertools.imap` en leurs équivalents intégrés. :func:`itertools." "ifilterfalse` est changé en :func:`itertools.filterfalse`." -#: library/2to3.rst:306 +#: library/2to3.rst:311 msgid "Renames :class:`long` to :class:`int`." msgstr "Renomme :class:`long` en :class:`int`." -#: library/2to3.rst:310 +#: library/2to3.rst:315 msgid "" "Wraps :func:`map` in a :class:`list` call. It also changes ``map(None, x)`` " "to ``list(x)``. Using ``from future_builtins import map`` disables this " @@ -527,7 +535,7 @@ msgstr "" "``map(None, x)`` en ``list(x)``. L'usage de ``from future_builtins import " "map`` désactive ce correcteur." -#: library/2to3.rst:316 +#: library/2to3.rst:321 msgid "" "Converts the old metaclass syntax (``__metaclass__ = Meta`` in the class " "body) to the new (``class X(metaclass=Meta)``)." @@ -535,7 +543,7 @@ msgstr "" "Convertit l'ancienne syntaxe de métaclasse (``__metaclass__ = Meta`` dans le " "corps de la classe) à la nouvelle (``class X(metaclasse=Meta)``)." -#: library/2to3.rst:321 +#: library/2to3.rst:326 msgid "" "Fixes old method attribute names. For example, ``meth.im_func`` is " "converted to ``meth.__func__``." @@ -543,11 +551,11 @@ msgstr "" "Fixe les anciens noms d'attributs de méthodes. Par exemple, ``meth." "im_func`` est converti en ``meth.__func__``." -#: library/2to3.rst:326 +#: library/2to3.rst:331 msgid "Converts the old not-equal syntax, ``<>``, to ``!=``." msgstr "Convertit l'ancienne syntaxe d'inégalité, ``<>``, en ``!=``." -#: library/2to3.rst:330 +#: library/2to3.rst:335 msgid "" "Converts the use of iterator's :meth:`~iterator.next` methods to the :func:" "`next` function. It also renames :meth:`next` methods to :meth:`~iterator." @@ -557,17 +565,20 @@ msgstr "" "func:`next`. Renomme également les méthodes :meth:`next` en :meth:" "`~iterator.__next__`." -#: library/2to3.rst:336 -msgid "Renames :meth:`__nonzero__` to :meth:`~object.__bool__`." +#: library/2to3.rst:341 +#, fuzzy +msgid "" +"Renames definitions of methods called :meth:`__nonzero__` to :meth:`~object." +"__bool__`." msgstr "Renomme :meth:`__nonzero__` en :meth:`~object.__bool__`." -#: library/2to3.rst:340 +#: library/2to3.rst:346 msgid "Converts octal literals into the new syntax." msgstr "" "Convertit les nombres écrits littéralement en octal dans leur nouvelle " "syntaxe." -#: library/2to3.rst:344 +#: library/2to3.rst:350 msgid "" "Converts calls to various functions in the :mod:`operator` module to other, " "but equivalent, function calls. When needed, the appropriate ``import`` " @@ -579,63 +590,63 @@ msgstr "" "``import`` appropriées sont ajoutées, e.g. ``import collections.abc``. Les " "correspondances suivantes sont appliquées :" -#: library/2to3.rst:352 +#: library/2to3.rst:358 msgid "``operator.isCallable(obj)``" msgstr "``operator.isCallable(obj)``" -#: library/2to3.rst:352 +#: library/2to3.rst:358 msgid "``callable(obj)``" msgstr "``callable(obj)``" -#: library/2to3.rst:353 +#: library/2to3.rst:359 msgid "``operator.sequenceIncludes(obj)``" msgstr "``operator.sequenceIncludes(obj)``" -#: library/2to3.rst:353 +#: library/2to3.rst:359 msgid "``operator.contains(obj)``" msgstr "``operator.contains(obj)``" -#: library/2to3.rst:354 +#: library/2to3.rst:360 msgid "``operator.isSequenceType(obj)``" msgstr "``operator.isSequenceType(obj)``" -#: library/2to3.rst:354 +#: library/2to3.rst:360 msgid "``isinstance(obj, collections.abc.Sequence)``" msgstr "``isinstance(obj, collections.abc.Sequence)``" -#: library/2to3.rst:355 +#: library/2to3.rst:361 msgid "``operator.isMappingType(obj)``" msgstr "``operator.isMappingType(obj)``" -#: library/2to3.rst:355 +#: library/2to3.rst:361 msgid "``isinstance(obj, collections.abc.Mapping)``" msgstr "``isinstance(obj, collections.abc.Mapping)``" -#: library/2to3.rst:356 +#: library/2to3.rst:362 msgid "``operator.isNumberType(obj)``" msgstr "``operator.isNumberType(obj)``" -#: library/2to3.rst:356 +#: library/2to3.rst:362 msgid "``isinstance(obj, numbers.Number)``" msgstr "``isinstance(obj, numbers.Number)``" -#: library/2to3.rst:357 +#: library/2to3.rst:363 msgid "``operator.repeat(obj, n)``" msgstr "``operator.repeat(obj, n)``" -#: library/2to3.rst:357 +#: library/2to3.rst:363 msgid "``operator.mul(obj, n)``" msgstr "``operator.mul(obj, n)``" -#: library/2to3.rst:358 +#: library/2to3.rst:364 msgid "``operator.irepeat(obj, n)``" msgstr "``operator.irepeat(obj, n)``" -#: library/2to3.rst:358 +#: library/2to3.rst:364 msgid "``operator.imul(obj, n)``" msgstr "``operator.imul(obj, n)``" -#: library/2to3.rst:363 +#: library/2to3.rst:369 msgid "" "Add extra parenthesis where they are required in list comprehensions. For " "example, ``[x for x in 1, 2]`` becomes ``[x for x in (1, 2)]``." @@ -644,11 +655,11 @@ msgstr "" "les listes en compréhension. Par exemple, ``[x for x in 1, 2]`` devient " "``[x for x in (1, 2)]``." -#: library/2to3.rst:368 +#: library/2to3.rst:374 msgid "Converts the ``print`` statement to the :func:`print` function." msgstr "Convertit l'instruction ``print`` en fonction :func:`print`." -#: library/2to3.rst:372 +#: library/2to3.rst:378 msgid "" "Converts ``raise E, V`` to ``raise E(V)``, and ``raise E, V, T`` to ``raise " "E(V).with_traceback(T)``. If ``E`` is a tuple, the translation will be " @@ -659,30 +670,30 @@ msgstr "" "incorrecte puisque la substitution de *n*-uplets aux exceptions a été " "supprimée en 3.0." -#: library/2to3.rst:378 +#: library/2to3.rst:384 msgid "Converts :func:`raw_input` to :func:`input`." msgstr "Convertit :func:`raw_input` en :func:`input`." -#: library/2to3.rst:382 +#: library/2to3.rst:388 msgid "Handles the move of :func:`reduce` to :func:`functools.reduce`." msgstr "Gère le déplacement de :func:`reduce` à :func:`functools.reduce`." -#: library/2to3.rst:386 +#: library/2to3.rst:392 msgid "Converts :func:`reload` to :func:`importlib.reload`." msgstr "" "Convertit les appels à :func:`reload` en appels à :func:`importlib.reload`." -#: library/2to3.rst:390 +#: library/2to3.rst:396 msgid "Changes :data:`sys.maxint` to :data:`sys.maxsize`." msgstr "Change :data:`sys.maxint` en :data:`sys.maxsize`." -#: library/2to3.rst:394 +#: library/2to3.rst:400 msgid "Replaces backtick repr with the :func:`repr` function." msgstr "" "Remplace les accents graves utilisés comme ``repr`` par des appels à :func:" "`repr`." -#: library/2to3.rst:398 +#: library/2to3.rst:404 msgid "" "Replaces use of the :class:`set` constructor with set literals. This fixer " "is optional." @@ -690,11 +701,11 @@ msgstr "" "Remplace l'usage du constructeur de :class:`set` par les ensembles " "littéraux. Ce correcteur est optionnel." -#: library/2to3.rst:403 +#: library/2to3.rst:409 msgid "Renames :exc:`StandardError` to :exc:`Exception`." msgstr "Renomme :exc:`StandardError` en :exc:`Exception`." -#: library/2to3.rst:407 +#: library/2to3.rst:413 msgid "" "Changes the deprecated :data:`sys.exc_value`, :data:`sys.exc_type`, :data:" "`sys.exc_traceback` to use :func:`sys.exc_info`." @@ -702,12 +713,12 @@ msgstr "" "Change les :data:`sys.exc_value`, :data:`sys.exc_type`, :data:`sys." "exc_traceback` dépréciés en :func:`sys.exc_info`." -#: library/2to3.rst:412 +#: library/2to3.rst:418 msgid "Fixes the API change in generator's :meth:`throw` method." msgstr "" "Fixe le changement de l'API dans la méthode :meth:`throw` du générateur." -#: library/2to3.rst:416 +#: library/2to3.rst:422 msgid "" "Removes implicit tuple parameter unpacking. This fixer inserts temporary " "variables." @@ -715,7 +726,7 @@ msgstr "" "Supprime la décompression implicite des paramètres d'un *n*-uplet. Ce " "correcteur ajoute des variables temporaires." -#: library/2to3.rst:421 +#: library/2to3.rst:427 msgid "" "Fixes code broken from the removal of some members in the :mod:`types` " "module." @@ -723,11 +734,11 @@ msgstr "" "Fixe le code cassé par la suppression de certains membres du module :mod:" "`types`." -#: library/2to3.rst:426 +#: library/2to3.rst:432 msgid "Renames :class:`unicode` to :class:`str`." msgstr "Renomme :class:`unicode` en :class:`str`." -#: library/2to3.rst:430 +#: library/2to3.rst:436 msgid "" "Handles the rename of :mod:`urllib` and :mod:`urllib2` to the :mod:`urllib` " "package." @@ -735,7 +746,7 @@ msgstr "" "Gère le renommage des paquets :mod:`urllib` et :mod:`urllib2` en :mod:" "`urllib`." -#: library/2to3.rst:435 +#: library/2to3.rst:441 msgid "" "Removes excess whitespace from comma separated items. This fixer is " "optional." @@ -743,7 +754,7 @@ msgstr "" "Supprime l'espace excédentaire des éléments séparés par des virgules. Ce " "correcteur est optionnel." -#: library/2to3.rst:440 +#: library/2to3.rst:446 msgid "" "Renames :func:`xrange` to :func:`range` and wraps existing :func:`range` " "calls with :class:`list`." @@ -751,11 +762,11 @@ msgstr "" "Renomme la fonction :func:`xrange` en :func:`range` et encapsule les appels " "à la fonction :func:`range` avec des appels à :class:`list`." -#: library/2to3.rst:445 +#: library/2to3.rst:451 msgid "Changes ``for x in file.xreadlines()`` to ``for x in file``." msgstr "Change ``for x in file.xreadlines()`` en ``for x in file``." -#: library/2to3.rst:449 +#: library/2to3.rst:455 msgid "" "Wraps :func:`zip` usage in a :class:`list` call. This is disabled when " "``from future_builtins import zip`` appears." @@ -763,21 +774,25 @@ msgstr "" "Encapsule l'usage de :func:`zip` dans un appel à :class:`list`. Ceci est " "désactivé lorsque ``from future_builtins import zip`` apparaît." -#: library/2to3.rst:454 +#: library/2to3.rst:460 msgid ":mod:`lib2to3` - 2to3's library" msgstr ":mod:`lib2to3` — la bibliothèque de *2to3*" -#: library/2to3.rst:463 +#: library/2to3.rst:469 msgid "**Source code:** :source:`Lib/lib2to3/`" msgstr "**Code source:** :source:`Lib/lib2to3/`" -#: library/2to3.rst:467 +#: library/2to3.rst:482 +#, fuzzy msgid "" -"Python 3.9 will switch to a PEG parser (see :pep:`617`), and Python 3.10 may " -"include new language syntax that is not parsable by lib2to3's LL(1) parser. " -"The ``lib2to3`` module may be removed from the standard library in a future " -"Python version. Consider third-party alternatives such as `LibCST`_ or " -"`parso`_." +"Python 3.9 switched to a PEG parser (see :pep:`617`) while lib2to3 is using " +"a less flexible LL(1) parser. Python 3.10 includes new language syntax that " +"is not parsable by lib2to3's LL(1) parser (see :pep:`634`). The ``lib2to3`` " +"module was marked pending for deprecation in Python 3.9 (raising :exc:" +"`PendingDeprecationWarning` on import) and fully deprecated in Python 3.11 " +"(raising :exc:`DeprecationWarning`). It will be removed from the standard " +"library in Python 3.13. Consider third-party alternatives such as `LibCST`_ " +"or `parso`_." msgstr "" "Python 3.9 utilisera prochainement un analyseur syntaxique PEG (voir :pep:" "`617`) et il est possible que Python 3.10 introduise une nouvelle syntaxe " @@ -787,7 +802,7 @@ msgstr "" "une approche alternative, vous pouvez utiliser des outils tiers tels que " "`LibCST`_ ou `parso`_." -#: library/2to3.rst:476 +#: library/2to3.rst:485 msgid "" "The :mod:`lib2to3` API should be considered unstable and may change " "drastically in the future." diff --git a/library/__future__.po b/library/__future__.po index 9b5db45427..0f2cdd0239 100644 --- a/library/__future__.po +++ b/library/__future__.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2019-06-01 23:02+0200\n" -"Last-Translator: Jules Lasne \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2021-11-06 19:52+0100\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.1\n" +"X-Generator: Poedit 3.0\n" #: library/__future__.rst:2 msgid ":mod:`__future__` --- Future statement definitions" @@ -277,20 +277,37 @@ msgid "3.7.0b1" msgstr "3.7.0b1" #: library/__future__.rst:93 -msgid "3.10" +msgid "TBD [1]_" msgstr "" #: library/__future__.rst:93 msgid ":pep:`563`: *Postponed evaluation of annotations*" msgstr ":pep:`563` : *Évaluation différée des annotations*" -#: library/__future__.rst:102 +#: library/__future__.rst:100 +msgid "" +"``from __future__ import annotations`` was previously scheduled to become " +"mandatory in Python 3.10, but the Python Steering Council twice decided to " +"delay the change (`announcement for Python 3.10 `__; `announcement for Python 3.11 `__). No " +"final decision has been made yet. See also :pep:`563` and :pep:`649`." +msgstr "" + +#: library/__future__.rst:110 msgid ":ref:`future`" msgstr ":ref:`future`" -#: library/__future__.rst:103 +#: library/__future__.rst:111 msgid "How the compiler treats future imports." msgstr "Comment le compilateur gère les importations « futures »." +#~ msgid "3.11" +#~ msgstr "3.11" + +#~ msgid "3.10" +#~ msgstr "3.10" + #~ msgid "4.0" #~ msgstr "4.0" diff --git a/library/__main__.po b/library/__main__.po index 2c954e7eee..74894eb40f 100644 --- a/library/__main__.po +++ b/library/__main__.po @@ -5,47 +5,522 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2017-11-07 22:52+0100\n" -"Last-Translator: Julien Palard \n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2022-05-18 13:39+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0.1\n" -#: library/__main__.rst:3 -msgid ":mod:`__main__` --- Top-level script environment" -msgstr ":mod:`__main__` — Point d'entrée des scripts" +#: library/__main__.rst:2 +msgid ":mod:`__main__` --- Top-level code environment" +msgstr ":mod:`__main__` — Environnement d'exécution principal" #: library/__main__.rst:10 msgid "" -"``'__main__'`` is the name of the scope in which top-level code executes. A " -"module's __name__ is set equal to ``'__main__'`` when read from standard " -"input, a script, or from an interactive prompt." +"In Python, the special name ``__main__`` is used for two important " +"constructs:" msgstr "" -"``'__main__'`` est le nom du *scope* dans lequel le code s'exécute en " -"premier. Le nom d'un module (son *__name__*) vaut ``'__main__'`` lorsqu'il " -"est lu de l'entrée standard, lorsque c'est un script, ou une invite " -"interactive." +"En Python, le nom ``__main__`` a une fonction particulière. Il intervient " +"dans deux cas :" + +#: library/__main__.rst:12 +msgid "" +"the name of the top-level environment of the program, which can be checked " +"using the ``__name__ == '__main__'`` expression; and" +msgstr "" +"c'est le nom de l'environnement d'exécution principal, ce qui donne lieu au " +"test courant ``__name__ == '__main__'`` ;" #: library/__main__.rst:14 +msgid "the ``__main__.py`` file in Python packages." +msgstr "c'est aussi le nom du fichier ``__main__.py`` dans les paquets Python." + +#: library/__main__.rst:16 +msgid "" +"Both of these mechanisms are related to Python modules; how users interact " +"with them and how they interact with each other. They are explained in " +"detail below. If you're new to Python modules, see the tutorial section :" +"ref:`tut-modules` for an introduction." +msgstr "" +"Les deux sont liés aux modules Python, à la manière de s'en servir en tant " +"qu'utilisateur et à la manière dont ils interagissent entre eux. Cette page " +"contient des détails sur les modules Python. Si vous ne les avez jamais " +"utilisés, commencez par la section qui leur est consacrée dans le " +"tutoriel : :ref:`tut-modules`." + +#: library/__main__.rst:25 +msgid "``__name__ == '__main__'``" +msgstr "``__name__ == '__main__'``" + +#: library/__main__.rst:27 +msgid "" +"When a Python module or package is imported, ``__name__`` is set to the " +"module's name. Usually, this is the name of the Python file itself without " +"the ``.py`` extension::" +msgstr "" +"Lorsqu'un module ou un paquet Python est importé, son attribut ``__name__`` " +"est défini à son nom, qui est la plupart du temps le nom du fichier qui le " +"contient sans l'extension ``.py`` :" + +#: library/__main__.rst:35 +msgid "" +"If the file is part of a package, ``__name__`` will also include the parent " +"package's path::" +msgstr "" +"Si le fichier fait partie d'un paquet, ``__name__`` donne tout le chemin " +"d'accès :" + +#: library/__main__.rst:42 +msgid "" +"However, if the module is executed in the top-level code environment, its " +"``__name__`` is set to the string ``'__main__'``." +msgstr "" +"En revanche, si le module est exécuté dans l'environnement d'exécution " +"principal, la variable ``__name__`` vaut ``'__main__'``." + +#: library/__main__.rst:46 +msgid "What is the \"top-level code environment\"?" +msgstr "Qu'est-ce que l'« environnement d'exécution principal » ?" + +#: library/__main__.rst:48 +msgid "" +"``__main__`` is the name of the environment where top-level code is run. " +"\"Top-level code\" is the first user-specified Python module that starts " +"running. It's \"top-level\" because it imports all other modules that the " +"program needs. Sometimes \"top-level code\" is called an *entry point* to " +"the application." +msgstr "" +"L'environnement principal a pour nom ``__main__``. Il s'agit du premier " +"module Python dont l'exécution a été demandée par l'utilisateur final. On le " +"qualifie de principal car c'est lui qui importe tous les autres modules " +"nécessités par le programme. On l'appelle parfois le point d'entrée de " +"l'application." + +#: library/__main__.rst:53 +msgid "The top-level code environment can be:" +msgstr "L'environnement principal peut prendre diverses formes :" + +#: library/__main__.rst:55 +msgid "the scope of an interactive prompt::" +msgstr "l'environnement d'une invite de commande interactive :" + +#: library/__main__.rst:60 +msgid "the Python module passed to the Python interpreter as a file argument:" +msgstr "" +"le module passé directement en tant que fichier à la commande de " +"l'interpréteur Python :" + +#: library/__main__.rst:67 +msgid "" +"the Python module or package passed to the Python interpreter with the :" +"option:`-m` argument:" +msgstr "" +"le module ou paquet passé à l'interpréteur avec l'option :option:`-m` :" + +# Minuscule car toujours dans la même énumération, ignorez +# l'avertissement que Poedit affiche à cause de la majuscule à +# « Python ». +#: library/__main__.rst:75 +msgid "Python code read by the Python interpreter from standard input:" +msgstr "le code lu par l'interpréteur depuis l'entrée standard :" + +#: library/__main__.rst:86 +msgid "" +"Python code passed to the Python interpreter with the :option:`-c` argument:" +msgstr "le code passé à l'interpréteur avec l'option :option:`-c` :" + +#: library/__main__.rst:97 +msgid "" +"In each of these situations, the top-level module's ``__name__`` is set to " +"``'__main__'``." +msgstr "" +"Dans chacun de ces cas, l'attribut ``__name__`` du module principal est mis " +"à ``'__main__'``." + +#: library/__main__.rst:100 +msgid "" +"As a result, a module can discover whether or not it is running in the top-" +"level environment by checking its own ``__name__``, which allows a common " +"idiom for conditionally executing code when the module is not initialized " +"from an import statement::" +msgstr "" +"Un module peut donc savoir s'il est exécuté dans l'environnement principal " +"en vérifiant son ``__name__``, ce qui permet typiquement d'exécuter du code " +"lorsque le module est initialisé d'une manière autre que l'importation ::" + +#: library/__main__.rst:111 +msgid "" +"For a more detailed look at how ``__name__`` is set in all situations, see " +"the tutorial section :ref:`tut-modules`." +msgstr "" +"Pour plus de détails sur la manière dont ``__name__`` est défini dans les " +"divers cas, voir la section :ref:`tut-modules` dans le tutoriel." + +#: library/__main__.rst:239 +msgid "Idiomatic Usage" +msgstr "Utilisation idiomatique" + +#: library/__main__.rst:118 +msgid "" +"Some modules contain code that is intended for script use only, like parsing " +"command-line arguments or fetching data from standard input. If a module " +"like this was imported from a different module, for example to unit test it, " +"the script code would unintentionally execute as well." +msgstr "" +"Il arrive qu'un module contienne du code qui ne doit s'exécuter que lorsque " +"le module est utilisé comme script. On peut penser à l'analyse des arguments " +"passés en ligne de commande, ou bien à la lecture de l'entrée standard. Il " +"ne faudrait pas que ces opérations soient effectuées lorsque le module est " +"importé depuis un autre module, comme pour les tests." + +#: library/__main__.rst:123 +msgid "" +"This is where using the ``if __name__ == '__main__'`` code block comes in " +"handy. Code within this block won't run unless the module is executed in the " +"top-level environment." +msgstr "" +"C'est dans ces situations que sert la construction ``if __name__ == " +"'__main__'``. Le code mis à l'intérieur du bloc n'est exécuté que si le " +"module est dans l'environnement principal." + +#: library/__main__.rst:127 +msgid "" +"Putting as few statements as possible in the block below ``if __name___ == " +"'__main__'`` can improve code clarity and correctness. Most often, a " +"function named ``main`` encapsulates the program's primary behavior::" +msgstr "" +"Il vaut mieux mettre aussi peu de code que possible sous le ``if __name__ == " +"'__main__'`` pour garder le code clair et limiter les risques d'erreur. La " +"plupart du temps, on écrit une fonction ``main`` qui contient tout le code " +"spécifique à l'utilisation comme script :" + +#: library/__main__.rst:151 +msgid "" +"Note that if the module didn't encapsulate code inside the ``main`` function " +"but instead put it directly within the ``if __name__ == '__main__'`` block, " +"the ``phrase`` variable would be global to the entire module. This is error-" +"prone as other functions within the module could be unintentionally using " +"the global variable instead of a local name. A ``main`` function solves " +"this problem." +msgstr "" +"Si, dans le module ci-dessus, le code de ``main`` était placé directement " +"dans le ``if __name__ == '__main__'``, la variable ``phrase`` serait " +"globale, et d'autres fonctions pourraient s'en servir par erreur à la place " +"d'une variable locale. Encapsuler le code dans la fonction ``main`` évite " +"cet ennui." + +#: library/__main__.rst:158 +msgid "" +"Using a ``main`` function has the added benefit of the ``echo`` function " +"itself being isolated and importable elsewhere. When ``echo.py`` is " +"imported, the ``echo`` and ``main`` functions will be defined, but neither " +"of them will be called, because ``__name__ != '__main__'``." +msgstr "" +"De plus, la fonction ``echo`` est elle-même séparée du reste, et on peut " +"l'importer dans un autre module. Le fait d'importer ``echo.py`` définit les " +"fonctions ``main`` et ``echo``, mais n'en appelle aucune, puisque " +"``__name__ != '__main__'``." + +#: library/__main__.rst:165 +msgid "Packaging Considerations" +msgstr "Considérations liées à l'empaquetage" + +#: library/__main__.rst:167 +msgid "" +"``main`` functions are often used to create command-line tools by specifying " +"them as entry points for console scripts. When this is done, `pip `_ inserts the function call into a template script, where the " +"return value of ``main`` is passed into :func:`sys.exit`. For example::" +msgstr "" +"Les fonctions ``main`` servent souvent à créer des outils qui s'exécutent en " +"ligne de commande. Les scripts sont ajoutés au système à l'aide de points " +"d'entrée, qui demandent à `pip `_ de créer un " +"exécutable. Il le fait en insérant un appel à la fonction à l'intérieur d'un " +"modèle prédéfini où la valeur qu'elle renvoie est passée directement à :func:" +"`sys.exit` :" + +#: library/__main__.rst:175 +msgid "" +"Since the call to ``main`` is wrapped in :func:`sys.exit`, the expectation " +"is that your function will return some value acceptable as an input to :func:" +"`sys.exit`; typically, an integer or ``None`` (which is implicitly returned " +"if your function does not have a return statement)." +msgstr "" +"Puisque l'appel de ``main`` est encapsulé dans :func:`sys.exit`, ``main`` " +"doit renvoyer une valeur qui convienne comme argument à :func:`sys.exit`, " +"par exemple un code de retour sous forme d'entier. La valeur ``None`` est " +"également acceptée, et c'est d'ailleurs celle que renvoie la fonction si " +"elle se termine sans rencontrer d'instruction ``return``." + +#: library/__main__.rst:180 +msgid "" +"By proactively following this convention ourselves, our module will have the " +"same behavior when run directly (i.e. ``python3 echo.py``) as it will have " +"if we later package it as a console script entry-point in a pip-installable " +"package." +msgstr "" +"Il est utile de se conformer à cette convention. De cette manière, le module " +"se comporte de la même manière s'il est distribué comme script à l'aide des " +"points d'entrée que lorsqu'il est exécuté directement (avec ``python3 echo." +"py``)." + +#: library/__main__.rst:185 +msgid "" +"In particular, be careful about returning strings from your ``main`` " +"function. :func:`sys.exit` will interpret a string argument as a failure " +"message, so your program will have an exit code of ``1``, indicating " +"failure, and the string will be written to :data:`sys.stderr`. The ``echo." +"py`` example from earlier exemplifies using the ``sys.exit(main())`` " +"convention." +msgstr "" +"En particulier, mieux vaut éviter de renvoyer une chaîne de caractères " +"depuis la fonction ``main``. En effet, si :func:`sys.exit` reçoit une " +"chaîne, elle l'interprète comme un message d'erreur, qu'elle affiche sur :" +"data:`sys.stderr` avant de terminer le programme avec le code de retour 1 " +"(erreur). L'exemple de ``echo.py`` ci-dessus montre la pratique recommandée." + +#: library/__main__.rst:193 +msgid "" +"`Python Packaging User Guide `_ contains a " +"collection of tutorials and references on how to distribute and install " +"Python packages with modern tools." +msgstr "" +"Le `guide de l'empaquetage en Python `_ (en " +"anglais) contient plusieurs tutoriels et documents de référence autour de la " +"distribution et de l'installation de paquets Python avec des outils modernes." + +#: library/__main__.rst:199 +msgid "``__main__.py`` in Python Packages" +msgstr "Le fichier ``__main__.py`` dans les paquets Python" + +#: library/__main__.rst:201 +msgid "" +"If you are not familiar with Python packages, see section :ref:`tut-" +"packages` of the tutorial. Most commonly, the ``__main__.py`` file is used " +"to provide a command-line interface for a package. Consider the following " +"hypothetical package, \"bandclass\":" +msgstr "" +"Si vous n'êtes pas familier des paquets Python, lisez :ref:`tut-packages` " +"dans le tutoriel. Un fichier ``__main__.py`` permet à un paquet de définir " +"une interface en ligne de commande. Prenons pour exemple un paquet nommé " +"*bandclass* :" + +#: library/__main__.rst:213 +msgid "" +"``__main__.py`` will be executed when the package itself is invoked directly " +"from the command line using the :option:`-m` flag. For example:" +msgstr "" +"Le fichier ``__main__.py`` qu'il contient s'exécute lorsque le paquet est " +"appelé depuis la ligne de commande avec l'option :option:`-m` de " +"l'interpréteur, comme ceci :" + +#: library/__main__.rst:220 +msgid "" +"This command will cause ``__main__.py`` to run. How you utilize this " +"mechanism will depend on the nature of the package you are writing, but in " +"this hypothetical case, it might make sense to allow the teacher to search " +"for students::" +msgstr "" +"Cette commande lance l'exécution de ``__main__.py``. Il vous appartient, en " +"tant que concepteur du paquet, de déterminer ce qu'elle doit faire. Dans " +"notre exemple, elle pourrait rechercher un étudiant dans une base de " +"données ::" + +#: library/__main__.rst:233 +msgid "" +"Note that ``from .student import search_students`` is an example of a " +"relative import. This import style can be used when referencing modules " +"within a package. For more details, see :ref:`intra-package-references` in " +"the :ref:`tut-modules` section of the tutorial." +msgstr "" +"Remarquez l'importation ``from .student import search_students``. Le point " +"avant ``student`` sert à rendre le chemin ``student`` relatif à la position " +"du module qui l'importe. Pour plus d'informations, voir :ref:`intra-package-" +"references` dans la section :ref:`tut-modules` du tutoriel." + +#: library/__main__.rst:241 +msgid "" +"The contents of ``__main__.py`` typically isn't fenced with ``if __name__ == " +"'__main__'`` blocks. Instead, those files are kept short, functions to " +"execute from other modules. Those other modules can then be easily unit-" +"tested and are properly reusable." +msgstr "" +"En général, on ne met pas le code de ``__main__.py`` dans un bloc ``if " +"__name__ == '__main__'``. Il vaut mieux définir toutes les fonctions utiles " +"dans d'autres modules et réduire la taille du fichier ``__main__.py`` au " +"minimum. Il est alors plus facile de tester et réutiliser ces autres modules." + +#: library/__main__.rst:246 +msgid "" +"If used, an ``if __name__ == '__main__'`` block will still work as expected " +"for a ``__main__.py`` file within a package, because its ``__name__`` " +"attribute will include the package's path if imported::" +msgstr "" +"Cependant, un ``if __name__ == '__main__'``, s'il est présent dans le " +"``__main__.py``, fonctionne correctement. En effet, si ``__main__.py`` est " +"importé depuis autre module, son attribut ``__name__`` contient, avant " +"``__main__``, le nom du paquet dont il fait partie :" + +#: library/__main__.rst:254 +msgid "" +"This won't work for ``__main__.py`` files in the root directory of a .zip " +"file though. Hence, for consistency, minimal ``__main__.py`` like the :mod:" +"`venv` one mentioned below are preferred." +msgstr "" +"Malgré tout, cela ne fonctionne pas pour les fichiers ``__main__.py`` à la " +"racine d'une archive ZIP. Aussi est-il préférable d'écrire des ``__main__." +"py`` dans le style minimal de celui de :mod:`venv` mentionné ci-dessus." + +#: library/__main__.rst:260 +msgid "" +"See :mod:`venv` for an example of a package with a minimal ``__main__.py`` " +"in the standard library. It doesn't contain a ``if __name__ == '__main__'`` " +"block. You can invoke it with ``python3 -m venv [directory]``." +msgstr "" +"Le module :mod:`venv` de la bibliothèque standard est un exemple de paquet " +"contenant un fichier ``__main__.py`` minimal, sans ``if __name__ == " +"'__main__'``. Il s'appelle avec la commande :samp:`python3 -m venv {dossier}" +"`." + +#: library/__main__.rst:264 +msgid "" +"See :mod:`runpy` for more details on the :option:`-m` flag to the " +"interpreter executable." +msgstr "" +"La documentation du module :mod:`runpy` fournit une description complète de " +"l'option :option:`-m` de l'interpréteur." + +#: library/__main__.rst:267 +msgid "" +"See :mod:`zipapp` for how to run applications packaged as *.zip* files. In " +"this case Python looks for a ``__main__.py`` file in the root directory of " +"the archive." +msgstr "" +"Le module :mod:`zipapp` exécute des applications emballées dans une archive " +"ZIP. Dans ce cas, l'interpréteur recherche un fichier ``__main__.py`` à la " +"racine de l'archive." + +#: library/__main__.rst:274 +msgid "``import __main__``" +msgstr "``import __main__``" + +#: library/__main__.rst:276 msgid "" -"A module can discover whether or not it is running in the main scope by " -"checking its own ``__name__``, which allows a common idiom for conditionally " -"executing code in a module when it is run as a script or with ``python -m`` " -"but not when it is imported::" +"Regardless of which module a Python program was started with, other modules " +"running within that same program can import the top-level environment's " +"scope (:term:`namespace`) by importing the ``__main__`` module. This " +"doesn't import a ``__main__.py`` file but rather whichever module that " +"received the special name ``'__main__'``." msgstr "" -"Un module peut découvrir s'il est exécuté dans le *scope* principal en " -"vérifiant son ``__name__``, ce qui permet typiquement d'exécuter du code " -"lorsque le module est exécuté avec ``python -m`` mais pas lorsqu'il est " -"importé ::" +"Quel que soit le module principal d'un programme, les autres modules peuvent " +"accéder à l':term:`espace de nommage ` dans lequel il s'exécute " +"en important le module spécial ``__main__``. Celui-ci ne correspond pas " +"forcément à un fichier ``__main__.py``. Il s'agit simplement du module qui a " +"reçu le nom ``'__main__'``." + +#: library/__main__.rst:282 +msgid "Here is an example module that consumes the ``__main__`` namespace::" +msgstr "Voici un exemple d'utilisation du module ``__main__`` :" -#: library/__main__.rst:23 +#: library/__main__.rst:300 +msgid "Example usage of this module could be as follows::" +msgstr "Ce code s'utilise comme ceci :" + +#: library/__main__.rst:319 +msgid "Now, if we started our program, the result would look like this:" +msgstr "Le programme ci-dessus donne la sortie :" + +#: library/__main__.rst:326 msgid "" -"For a package, the same effect can be achieved by including a ``__main__." -"py`` module, the contents of which will be executed when the module is run " -"with ``-m``." +"The exit code of the program would be 1, indicating an error. Uncommenting " +"the line with ``my_name = \"Dinsdale\"`` fixes the program and now it exits " +"with status code 0, indicating success:" msgstr "" -"Pour un paquet, le même effet peut être obtenu en utilisant un module " -"``__main__.py``, son contenu sera exécuté si le paquet est lancé via ``-m``." +"Son code de retour est 1, ce qui signifie une erreur. En supprimant la " +"marque de commentaire en début de ligne ``my_name = \"Dinsdale\"``, le " +"programme est corrigé, et renvoie au système le code 0 car il n'y a plus " +"d'erreur :" + +#: library/__main__.rst:335 +msgid "" +"Note that importing ``__main__`` doesn't cause any issues with " +"unintentionally running top-level code meant for script use which is put in " +"the ``if __name__ == \"__main__\"`` block of the ``start`` module. Why does " +"this work?" +msgstr "" +"On pourrait s'attendre à un problème au moment de l'importation de " +"``__main__`` : cela ne provoque-t-il pas l'exécution anticipée du code de " +"script sous ``if __name__ == '__main__'`` dans le module principal " +"``start`` ?" + +#: library/__main__.rst:339 +msgid "" +"Python inserts an empty ``__main__`` module in :attr:`sys.modules` at " +"interpreter startup, and populates it by running top-level code. In our " +"example this is the ``start`` module which runs line by line and imports " +"``namely``. In turn, ``namely`` imports ``__main__`` (which is really " +"``start``). That's an import cycle! Fortunately, since the partially " +"populated ``__main__`` module is present in :attr:`sys.modules`, Python " +"passes that to ``namely``. See :ref:`Special considerations for __main__ " +"` in the import system's reference for details on how " +"this works." +msgstr "" +"En fait, le déroulement de l'exécution est le suivant : au lancement de " +"l'interpréteur, un module ``__main__`` initialement vide est inséré dans :" +"attr:`sys.modules`. Il se remplit au fur et à mesure de l'exécution du code " +"principal. Dans notre exemple, le module principal est ``start``, qui " +"s'exécute ligne par ligne et en vient à importer ``namely``. Or ``namely``, " +"à son tour, importe ``__main__``, c'est-à-dire en fait ``start``. On a donc " +"une importation cyclique. Puisque le module ``__main__`` est déjà présent " +"dans :attr:`sys.modules`, bien qu'encore incomplet, il est directement passé " +"à ``namely`` sans réimportation. La section :ref:`import-dunder-main` dans " +"le document de référence du système d'importation explique plus avant ce " +"fonctionnement." + +#: library/__main__.rst:348 +msgid "" +"The Python REPL is another example of a \"top-level environment\", so " +"anything defined in the REPL becomes part of the ``__main__`` scope::" +msgstr "" +"L'interpréteur interactif est un autre environnement d'exécution principal " +"possible. Toute variable qui y est définie appartient à l'espace de nommage " +"``__main__`` :" + +#: library/__main__.rst:364 +msgid "" +"Note that in this case the ``__main__`` scope doesn't contain a ``__file__`` " +"attribute as it's interactive." +msgstr "" +"Dans ce cas, il n'y a pas de variable ``__file__``, puisque cela n'a pas de " +"sens dans le mode interactif." + +#: library/__main__.rst:367 +msgid "" +"The ``__main__`` scope is used in the implementation of :mod:`pdb` and :mod:" +"`rlcompleter`." +msgstr "" +"Le module ``__main__`` est notamment employé dans les implémentations de :" +"mod:`pdb` et :mod:`rlcompleter`." + +#~ msgid "" +#~ "``'__main__'`` is the name of the scope in which top-level code executes. " +#~ "A module's __name__ is set equal to ``'__main__'`` when read from " +#~ "standard input, a script, or from an interactive prompt." +#~ msgstr "" +#~ "``'__main__'`` est le nom du *scope* dans lequel le code s'exécute en " +#~ "premier. Le nom d'un module (son *__name__*) vaut ``'__main__'`` " +#~ "lorsqu'il est lu de l'entrée standard, lorsque c'est un script, ou une " +#~ "invite interactive." + +#~ msgid "" +#~ "For a package, the same effect can be achieved by including a ``__main__." +#~ "py`` module, the contents of which will be executed when the module is " +#~ "run with ``-m``." +#~ msgstr "" +#~ "Pour un paquet, le même effet peut être obtenu en utilisant un module " +#~ "``__main__.py``, son contenu sera exécuté si le paquet est lancé via ``-" +#~ "m``." diff --git a/library/_thread.po b/library/_thread.po index 1bd122261d..4954327782 100644 --- a/library/_thread.po +++ b/library/_thread.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2020-10-15 09:06+0200\n" -"Last-Translator: Inebhis \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-11-06 20:06+0100\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.4\n" +"X-Generator: Poedit 3.0\n" #: library/_thread.rst:2 msgid ":mod:`_thread` --- Low-level threading API" @@ -101,23 +101,45 @@ msgstr "" #: library/_thread.rst:66 msgid "" -"Simulate the effect of a :data:`signal.SIGINT` signal arriving in the main " -"thread. A thread can use this function to interrupt the main thread." +"Simulate the effect of a signal arriving in the main thread. A thread can " +"use this function to interrupt the main thread, though there is no guarantee " +"that the interruption will happen immediately." msgstr "" -"Simule l'effet d'un signal :data:`signal.SIGINT` arrivant au fil d'exécution " -"principal. Un fil d'exécution peut utiliser cette fonction pour interrompre " -"le fil d'exécution principal." +"Simule l'effet d'un signal arrivant au fil d'exécution principal. Un fil " +"d'exécution peut utiliser cette fonction pour interrompre le fil d'exécution " +"principal, bien qu'une interruption immédiate ne soit pas garantie." -#: library/_thread.rst:69 +#: library/_thread.rst:70 msgid "" -"If :data:`signal.SIGINT` isn't handled by Python (it was set to :data:" -"`signal.SIG_DFL` or :data:`signal.SIG_IGN`), this function does nothing." +"If given, *signum* is the number of the signal to simulate. If *signum* is " +"not given, :data:`signal.SIGINT` is simulated." msgstr "" -"Si le signal :data:`signal.SIGINT` n'est pas géré par Python (s'il a été " -"paramétré à :data:`signal.SIG_DFL` ou :data:`signal.SIG_IGN`), cette " -"fonction ne fait rien." +"Le signal simulé est *signum*. La valeur par défaut est :data:`signal." +"SIGINT`." -#: library/_thread.rst:76 +#: library/_thread.rst:73 +msgid "" +"If the given signal isn't handled by Python (it was set to :data:`signal." +"SIG_DFL` or :data:`signal.SIG_IGN`), this function does nothing." +msgstr "" +"Si le signal n'est pas géré par Python (s'il a été paramétré à :data:`signal." +"SIG_DFL` ou :data:`signal.SIG_IGN`), cette fonction ne fait rien." + +#: library/_thread.rst:77 +msgid "The *signum* argument is added to customize the signal number." +msgstr "Ajout du paramètre *signum* pour modifier le numéro du signal." + +#: library/_thread.rst:81 +msgid "" +"This does not emit the corresponding signal but schedules a call to the " +"associated handler (if it exists). If you want to truly emit the signal, " +"use :func:`signal.raise_signal`." +msgstr "" +"Cette fonction n'émet pas vraiment le signal, mais programme un appel du " +"gestionnaire associé (à condition qu'il existe). Pour émettre réellement le " +"signal, utilisez :func:`signal.raise_signal`." + +#: library/_thread.rst:88 msgid "" "Raise the :exc:`SystemExit` exception. When not caught, this will cause the " "thread to exit silently." @@ -125,7 +147,7 @@ msgstr "" "Lève une exception :exc:`SystemExit`. Quand elle n'est pas interceptée, le " "fil d'exécution se terminera silencieusement." -#: library/_thread.rst:90 +#: library/_thread.rst:102 msgid "" "Return a new lock object. Methods of locks are described below. The lock " "is initially unlocked." @@ -133,7 +155,7 @@ msgstr "" "Renvoie un nouveau verrou. Les méthodes des verrous sont décrites ci-" "dessous. Le verrou est initialement déverrouillé." -#: library/_thread.rst:96 +#: library/_thread.rst:108 msgid "" "Return the 'thread identifier' of the current thread. This is a nonzero " "integer. Its value has no direct meaning; it is intended as a magic cookie " @@ -141,14 +163,14 @@ msgid "" "identifiers may be recycled when a thread exits and another thread is " "created." msgstr "" -"Renvoie l'« identifiant de fil » du fil d'exécution courant. C'est un " +"Renvoie l'« identifiant de fil » du fil d'exécution courant. C'est un " "entier non nul. Sa valeur n'a pas de signification directe ; il est destiné " "à être utilisé comme *cookie* magique, par exemple pour indexer un " "dictionnaire de données pour chaque fil. Les identifiants de fils peuvent " "être recyclés lorsqu'un fil d'exécution se termine et qu'un autre fil est " "créé." -#: library/_thread.rst:104 +#: library/_thread.rst:116 msgid "" "Return the native integral Thread ID of the current thread assigned by the " "kernel. This is a non-negative integer. Its value may be used to uniquely " @@ -161,7 +183,7 @@ msgstr "" "fil d'exécution se termine, après quoi la valeur peut être recyclée par le " "système d'exploitation)." -#: library/_thread.rst:110 +#: library/_thread.rst:122 msgid "" ":ref:`Availability `: Windows, FreeBSD, Linux, macOS, OpenBSD, " "NetBSD, AIX." @@ -169,7 +191,7 @@ msgstr "" ":ref:`Disponibilité ` : Windows, FreeBSD, Linux, macOS, " "OpenBSD, NetBSD, AIX." -#: library/_thread.rst:116 +#: library/_thread.rst:128 msgid "" "Return the thread stack size used when creating new threads. The optional " "*size* argument specifies the stack size to be used for subsequently created " @@ -206,14 +228,14 @@ msgstr "" "en l'absence de renseignements plus spécifiques, l'approche suggérée est " "l'utilisation de multiples de 4 096 octets pour la taille de la pile)." -#: library/_thread.rst:131 +#: library/_thread.rst:143 msgid "" ":ref:`Availability `: Windows, systems with POSIX threads." msgstr "" ":ref:`Disponibilité ` : Windows et systèmes gérant les fils " "d'exécution POSIX." -#: library/_thread.rst:136 +#: library/_thread.rst:148 msgid "" "The maximum value allowed for the *timeout* parameter of :meth:`Lock." "acquire`. Specifying a timeout greater than this value will raise an :exc:" @@ -223,11 +245,11 @@ msgstr "" "meth:`Lock.acquire`. Préciser un délai d'attente supérieur à cette valeur " "lève une exception :exc:`OverflowError`." -#: library/_thread.rst:143 +#: library/_thread.rst:155 msgid "Lock objects have the following methods:" msgstr "Les verrous ont les méthodes suivantes :" -#: library/_thread.rst:148 +#: library/_thread.rst:160 msgid "" "Without any optional argument, this method acquires the lock " "unconditionally, if necessary waiting until it is released by another thread " @@ -239,7 +261,7 @@ msgstr "" "par un autre fil d'exécution (un seul fil d'exécution à la fois peut " "acquérir le verrou — c'est leur raison d'être)." -#: library/_thread.rst:152 +#: library/_thread.rst:164 msgid "" "If the integer *waitflag* argument is present, the action depends on its " "value: if it is zero, the lock is only acquired if it can be acquired " @@ -251,7 +273,7 @@ msgstr "" "acquis immédiatement, sans attendre, sinon le verrou est acquis " "inconditionnellement comme ci-dessus." -#: library/_thread.rst:157 +#: library/_thread.rst:169 msgid "" "If the floating-point *timeout* argument is present and positive, it " "specifies the maximum wait time in seconds before returning. A negative " @@ -263,7 +285,7 @@ msgstr "" "argument *timeout* négatif spécifie une attente illimitée. Vous ne pouvez " "pas spécifier un *timeout* si *waitflag* est à zéro." -#: library/_thread.rst:162 +#: library/_thread.rst:174 msgid "" "The return value is ``True`` if the lock is acquired successfully, ``False`` " "if not." @@ -271,16 +293,16 @@ msgstr "" "La valeur renvoyée est ``True`` si le verrou est acquis avec succès, sinon " "``False``." -#: library/_thread.rst:165 +#: library/_thread.rst:177 msgid "The *timeout* parameter is new." msgstr "Le paramètre *timeout* est nouveau." -#: library/_thread.rst:168 +#: library/_thread.rst:180 msgid "Lock acquires can now be interrupted by signals on POSIX." msgstr "" "Le verrou acquis peut maintenant être interrompu par des signaux sur POSIX." -#: library/_thread.rst:174 +#: library/_thread.rst:186 msgid "" "Releases the lock. The lock must have been acquired earlier, but not " "necessarily by the same thread." @@ -288,7 +310,7 @@ msgstr "" "Relâche le verrou. Le verrou doit avoir été acquis plus tôt, mais pas " "nécessairement par le même fil d'exécution." -#: library/_thread.rst:180 +#: library/_thread.rst:192 msgid "" "Return the status of the lock: ``True`` if it has been acquired by some " "thread, ``False`` if not." @@ -296,7 +318,7 @@ msgstr "" "Renvoie le statut du verrou : ``True`` s'il a été acquis par certains fils " "d'exécution, sinon ``False``." -#: library/_thread.rst:183 +#: library/_thread.rst:195 msgid "" "In addition to these methods, lock objects can also be used via the :keyword:" "`with` statement, e.g.::" @@ -304,11 +326,11 @@ msgstr "" "En plus de ces méthodes, les objets verrous peuvent aussi être utilisés via " "l'instruction :keyword:`with`, e.g. ::" -#: library/_thread.rst:193 +#: library/_thread.rst:205 msgid "**Caveats:**" msgstr "**Avertissements :**" -#: library/_thread.rst:197 +#: library/_thread.rst:209 msgid "" "Threads interact strangely with interrupts: the :exc:`KeyboardInterrupt` " "exception will be received by an arbitrary thread. (When the :mod:`signal` " @@ -319,7 +341,7 @@ msgstr "" "arbitraire. (Quand le module :mod:`signal` est disponible, les interruptions " "vont toujours au fil d'exécution principal)." -#: library/_thread.rst:201 +#: library/_thread.rst:213 msgid "" "Calling :func:`sys.exit` or raising the :exc:`SystemExit` exception is " "equivalent to calling :func:`_thread.exit`." @@ -327,7 +349,7 @@ msgstr "" "Appeler la fonction :func:`sys.exit` ou lever l'exception :exc:`SystemExit` " "est équivalent à appeler la fonction :func:`_thread.exit`." -#: library/_thread.rst:204 +#: library/_thread.rst:216 msgid "" "It is not possible to interrupt the :meth:`acquire` method on a lock --- " "the :exc:`KeyboardInterrupt` exception will happen after the lock has been " @@ -337,7 +359,7 @@ msgstr "" "— l'exception :exc:`KeyboardInterrupt` surviendra après que le verrou a été " "acquis." -#: library/_thread.rst:207 +#: library/_thread.rst:219 msgid "" "When the main thread exits, it is system defined whether the other threads " "survive. On most systems, they are killed without executing :keyword:" @@ -348,7 +370,7 @@ msgstr "" "tués sans l'exécution des clauses :keyword:`try`… :keyword:`finally` ou " "l'exécution des destructeurs d'objets." -#: library/_thread.rst:212 +#: library/_thread.rst:224 msgid "" "When the main thread exits, it does not do any of its usual cleanup (except " "that :keyword:`try` ... :keyword:`finally` clauses are honored), and the " diff --git a/library/abc.po b/library/abc.po index 202130fcf1..b294dd36af 100644 --- a/library/abc.po +++ b/library/abc.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2019-02-21 17:32+0100\n" -"Last-Translator: Julien Palard \n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2021-11-06 20:18+0100\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.2\n" +"X-Generator: Poedit 3.0\n" #: library/abc.rst:2 msgid ":mod:`abc` --- Abstract Base Classes" @@ -106,9 +106,9 @@ msgstr "" "Utilisez cette métaclasse pour créer une ABC. Il est possible d'hériter " "d'une ABC directement, cette classe de base abstraite fonctionne alors comme " "une classe *mixin*. Vous pouvez également enregistrer une classe concrète " -"sans lien (même une classe native) et des ABC comme \"sous-classes virtuelles" -"\" -- celles-ci et leur descendantes seront considérées comme des sous-" -"classes de la classe de base abstraite par la fonction native :func:" +"sans lien (même une classe native) et des ABC comme \"sous-classes " +"virtuelles\" -- celles-ci et leur descendantes seront considérées comme des " +"sous-classes de la classe de base abstraite par la fonction native :func:" "`issubclass`, mais les ABC enregistrées n'apparaitront pas dans leur ordre " "de résolution des méthodes (*MRO* pour *Method Resolution Order* en " "anglais). Les implémentations de méthodes définies par l'ABC ne seront pas " @@ -258,19 +258,20 @@ msgstr "" #: library/abc.rst:176 msgid "" "Dynamically adding abstract methods to a class, or attempting to modify the " -"abstraction status of a method or class once it is created, are not " -"supported. The :func:`abstractmethod` only affects subclasses derived using " -"regular inheritance; \"virtual subclasses\" registered with the ABC's :meth:" -"`register` method are not affected." +"abstraction status of a method or class once it is created, are only " +"supported using the :func:`update_abstractmethods` function. The :func:" +"`abstractmethod` only affects subclasses derived using regular inheritance; " +"\"virtual subclasses\" registered with the ABC's :meth:`register` method are " +"not affected." msgstr "" -"Python ne gère pas l'ajout dynamique de méthodes abstraites à une classe, il " -"n'est pas non plus possible de modifier l'état d'abstraction d'une méthode " -"ou d'une classe une fois celle-ci créée. :func:`abstractmethod` n'affecte " -"que les sous-classes dérivées utilisant l'héritage classique. Les \"sous-" -"classes virtuelles\" enregistrées avec la méthode :meth:`register` de l'ABC " -"ne sont pas affectées." +"L'ajout dynamique de méthodes abstraites à une classe comme la modification " +"de l'état d'abstraction d'une méthode ou d'une classe une fois celle-ci " +"créée sont des opérations à réaliser avec :func:`update_abstractmethods`. En " +"effet, :func:`abstractmethod` n'affecte que les sous-classes dérivées " +"utilisant l'héritage classique. Les \"sous-classes virtuelles\" enregistrées " +"avec la méthode :meth:`register` de l'ABC ne sont pas affectées." -#: library/abc.rst:182 +#: library/abc.rst:183 msgid "" "When :func:`abstractmethod` is applied in combination with other method " "descriptors, it should be applied as the innermost decorator, as shown in " @@ -280,7 +281,7 @@ msgstr "" "d'autres descripteurs de méthodes, il doit être appliqué en tant que " "décorateur le plus interne. Voir les exemples d'utilisation suivants ::" -#: library/abc.rst:216 +#: library/abc.rst:217 msgid "" "In order to correctly interoperate with the abstract base class machinery, " "the descriptor must identify itself as abstract using :attr:" @@ -294,7 +295,7 @@ msgstr "" "moins une des méthodes faisant partie du descripteur est abstraite. Par " "exemple, la classe native :class:`property` de python fait l'équivalent de ::" -#: library/abc.rst:231 +#: library/abc.rst:232 msgid "" "Unlike Java abstract methods, these abstract methods may have an " "implementation. This implementation can be called via the :func:`super` " @@ -428,10 +429,40 @@ msgstr "" "n'importe quelle ABC." #: library/abc.rst:340 +msgid "" +"A function to recalculate an abstract class's abstraction status. This " +"function should be called if a class's abstract methods have been " +"implemented or changed after it was created. Usually, this function should " +"be called from within a class decorator." +msgstr "" +"Recalcule l'état d'abstraction de la classe. Il est nécessaire d'appeler " +"cette fonction si les méthodes abstraites d'une classe sont ajoutées ou " +"modifiées après la création de la classe. C'est notamment le cas dans les " +"décorateurs de classe." + +#: library/abc.rst:345 +msgid "Returns *cls*, to allow usage as a class decorator." +msgstr "" +"Pour permettre une utilisation en tant que décorateur, cette fonction " +"renvoie *cls*." + +#: library/abc.rst:347 +msgid "If *cls* is not an instance of :class:`ABCMeta`, does nothing." +msgstr "Ne fait rien si *cls* n'est pas une instance de :class:`ABCMeta`." + +#: library/abc.rst:351 +msgid "" +"This function assumes that *cls*'s superclasses are already updated. It does " +"not update any subclasses." +msgstr "" +"Cette fonction suppose que les classes mères de *cls* ont vu leur état " +"recalculé, et ne fait rien pour recalculer celui des classes filles." + +#: library/abc.rst:357 msgid "Footnotes" msgstr "Notes" -#: library/abc.rst:341 +#: library/abc.rst:358 msgid "" "C++ programmers should note that Python's virtual base class concept is not " "the same as C++'s." diff --git a/library/aifc.po b/library/aifc.po index a10b27b3f3..05c8164adb 100644 --- a/library/aifc.po +++ b/library/aifc.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2020-12-11 15:56+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -18,11 +18,17 @@ msgstr "" msgid ":mod:`aifc` --- Read and write AIFF and AIFC files" msgstr ":mod:`aifc` — Lis et écrit dans les fichiers AIFF et AIFC" -#: library/aifc.rst:7 +#: library/aifc.rst:8 msgid "**Source code:** :source:`Lib/aifc.py`" msgstr "**Code source:** :source:`Lib/aifc.py`" -#: library/aifc.rst:16 +#: library/aifc.rst:19 +msgid "" +"The :mod:`aifc` module is deprecated (see :pep:`PEP 594 <594#aifc>` for " +"details)." +msgstr "" + +#: library/aifc.rst:22 msgid "" "This module provides support for reading and writing AIFF and AIFF-C files. " "AIFF is Audio Interchange File Format, a format for storing digital audio " @@ -30,7 +36,7 @@ msgid "" "the ability to compress the audio data." msgstr "" -#: library/aifc.rst:21 +#: library/aifc.rst:27 msgid "" "Audio files have a number of parameters that describe the audio data. The " "sampling rate or frame rate is the number of times per second the sound is " @@ -41,7 +47,7 @@ msgid "" "samplesize * framerate`` bytes." msgstr "" -#: library/aifc.rst:29 +#: library/aifc.rst:35 msgid "" "For example, CD quality audio has a sample size of two bytes (16 bits), uses " "two channels (stereo) and has a frame rate of 44,100 frames/second. This " @@ -49,11 +55,11 @@ msgid "" "2\\*2\\*44100 bytes (176,400 bytes)." msgstr "" -#: library/aifc.rst:34 +#: library/aifc.rst:40 msgid "Module :mod:`aifc` defines the following function:" msgstr "Le module :mod:`aifc` définit les fonctions suivantes :" -#: library/aifc.rst:39 +#: library/aifc.rst:45 msgid "" "Open an AIFF or AIFF-C file and return an object instance with methods that " "are described below. The argument *file* is either a string naming a file " @@ -67,48 +73,48 @@ msgid "" "keyword:`!with` block completes, the :meth:`~aifc.close` method is called." msgstr "" -#: library/aifc.rst:50 +#: library/aifc.rst:56 msgid "Support for the :keyword:`with` statement was added." msgstr "La prise en charge de l'instruction :keyword:`with` a été ajoutée." -#: library/aifc.rst:53 +#: library/aifc.rst:59 msgid "" "Objects returned by :func:`.open` when a file is opened for reading have the " "following methods:" msgstr "" -#: library/aifc.rst:59 +#: library/aifc.rst:65 #, fuzzy msgid "Return the number of audio channels (1 for mono, 2 for stereo)." msgstr "" "Renvoie le nombre de canaux audio (``1`` pour mono, ``2`` pour stéréo)." -#: library/aifc.rst:64 +#: library/aifc.rst:70 msgid "Return the size in bytes of individual samples." msgstr "Donne la taille en octets des échantillons, individuellement." -#: library/aifc.rst:69 +#: library/aifc.rst:75 msgid "Return the sampling rate (number of audio frames per second)." msgstr "" -#: library/aifc.rst:74 +#: library/aifc.rst:80 msgid "Return the number of audio frames in the file." msgstr "Donne le nombre de trames (*frames*) audio du fichier." -#: library/aifc.rst:79 +#: library/aifc.rst:85 msgid "" "Return a bytes array of length 4 describing the type of compression used in " "the audio file. For AIFF files, the returned value is ``b'NONE'``." msgstr "" -#: library/aifc.rst:86 +#: library/aifc.rst:92 msgid "" "Return a bytes array convertible to a human-readable description of the type " "of compression used in the audio file. For AIFF files, the returned value " "is ``b'not compressed'``." msgstr "" -#: library/aifc.rst:93 +#: library/aifc.rst:99 msgid "" "Returns a :func:`~collections.namedtuple` ``(nchannels, sampwidth, " "framerate, nframes, comptype, compname)``, equivalent to output of the :meth:" @@ -118,7 +124,7 @@ msgstr "" "framerate, nframes, comptype, compname)``, équivalent à la sortie des " "méthodes :meth:`get\\*`." -#: library/aifc.rst:100 +#: library/aifc.rst:106 msgid "" "Return a list of markers in the audio file. A marker consists of a tuple of " "three elements. The first is the mark ID (an integer), the second is the " @@ -126,40 +132,40 @@ msgid "" "third is the name of the mark (a string)." msgstr "" -#: library/aifc.rst:108 +#: library/aifc.rst:114 msgid "" "Return the tuple as described in :meth:`getmarkers` for the mark with the " "given *id*." msgstr "" -#: library/aifc.rst:114 +#: library/aifc.rst:120 msgid "" "Read and return the next *nframes* frames from the audio file. The returned " "data is a string containing for each frame the uncompressed samples of all " "channels." msgstr "" -#: library/aifc.rst:121 +#: library/aifc.rst:127 msgid "" "Rewind the read pointer. The next :meth:`readframes` will start from the " "beginning." msgstr "" -#: library/aifc.rst:127 +#: library/aifc.rst:133 msgid "Seek to the specified frame number." msgstr "Va à la trame de numéro donné." -#: library/aifc.rst:132 +#: library/aifc.rst:138 msgid "Return the current frame number." msgstr "Donne le numéro de la trame courante." -#: library/aifc.rst:137 +#: library/aifc.rst:143 msgid "" "Close the AIFF file. After calling this method, the object can no longer be " "used." msgstr "" -#: library/aifc.rst:140 +#: library/aifc.rst:146 msgid "" "Objects returned by :func:`.open` when a file is opened for writing have all " "the above methods, except for :meth:`readframes` and :meth:`setpos`. In " @@ -169,40 +175,40 @@ msgid "" "parameters except for the number of frames must be filled in." msgstr "" -#: library/aifc.rst:150 +#: library/aifc.rst:156 msgid "" "Create an AIFF file. The default is that an AIFF-C file is created, unless " "the name of the file ends in ``'.aiff'`` in which case the default is an " "AIFF file." msgstr "" -#: library/aifc.rst:156 +#: library/aifc.rst:162 msgid "" "Create an AIFF-C file. The default is that an AIFF-C file is created, " "unless the name of the file ends in ``'.aiff'`` in which case the default is " "an AIFF file." msgstr "" -#: library/aifc.rst:163 +#: library/aifc.rst:169 msgid "Specify the number of channels in the audio file." msgstr "Définit le nombre de canaux du fichier audio." -#: library/aifc.rst:168 +#: library/aifc.rst:174 msgid "Specify the size in bytes of audio samples." msgstr "Définit la taille en octets des échantillons audio." -#: library/aifc.rst:173 +#: library/aifc.rst:179 msgid "Specify the sampling frequency in frames per second." msgstr "" -#: library/aifc.rst:178 +#: library/aifc.rst:184 msgid "" "Specify the number of frames that are to be written to the audio file. If " "this parameter is not set, or not set correctly, the file needs to support " "seeking." msgstr "" -#: library/aifc.rst:189 +#: library/aifc.rst:195 msgid "" "Specify the compression type. If not specified, the audio data will not be " "compressed. In AIFF files, compression is not possible. The name parameter " @@ -212,42 +218,42 @@ msgid "" "``b'ALAW'``, ``b'G722'``." msgstr "" -#: library/aifc.rst:199 +#: library/aifc.rst:205 msgid "" "Set all the above parameters at once. The argument is a tuple consisting of " "the various parameters. This means that it is possible to use the result of " "a :meth:`getparams` call as argument to :meth:`setparams`." msgstr "" -#: library/aifc.rst:206 +#: library/aifc.rst:212 msgid "" "Add a mark with the given id (larger than 0), and the given name at the " "given position. This method can be called at any time before :meth:`close`." msgstr "" -#: library/aifc.rst:213 +#: library/aifc.rst:219 msgid "" "Return the current write position in the output file. Useful in combination " "with :meth:`setmark`." msgstr "" -#: library/aifc.rst:219 +#: library/aifc.rst:225 msgid "" "Write data to the output file. This method can only be called after the " "audio file parameters have been set." msgstr "" -#: library/aifc.rst:231 +#: library/aifc.rst:237 msgid "Any :term:`bytes-like object` is now accepted." msgstr "N'importe quel :term:`bytes-like object` est maintenant accepté." -#: library/aifc.rst:228 +#: library/aifc.rst:234 msgid "" "Like :meth:`writeframes`, except that the header of the audio file is not " "updated." msgstr "" -#: library/aifc.rst:238 +#: library/aifc.rst:244 msgid "" "Close the AIFF file. The header of the file is updated to reflect the " "actual size of the audio data. After calling this method, the object can no " diff --git a/library/argparse.po b/library/argparse.po index 0b6ca18708..d241ec4246 100644 --- a/library/argparse.po +++ b/library/argparse.po @@ -5,9 +5,9 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" -"PO-Revision-Date: 2021-03-29 15:50+0200\n" -"Last-Translator: Yannick Gingras \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-05-30 11:00+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -42,12 +42,14 @@ msgstr "" "tutoriel argparse `." #: library/argparse.rst:22 +#, fuzzy msgid "" "The :mod:`argparse` module makes it easy to write user-friendly command-line " "interfaces. The program defines what arguments it requires, and :mod:" "`argparse` will figure out how to parse those out of :data:`sys.argv`. The :" -"mod:`argparse` module also automatically generates help and usage messages " -"and issues errors when users give the program invalid arguments." +"mod:`argparse` module also automatically generates help and usage messages. " +"The module will also issue errors when users give the program invalid " +"arguments." msgstr "" "Le module :mod:`argparse` facilite l'écriture d'interfaces en ligne de " "commande agréables à l'emploi. Le programme définit les arguments requis et :" @@ -57,10 +59,171 @@ msgstr "" "au programme des arguments invalides." #: library/argparse.rst:30 +msgid "Core Functionality" +msgstr "" + +#: library/argparse.rst:32 +msgid "" +"The :mod:`argparse` module's support for command-line interfaces is built " +"around an instance of :class:`argparse.ArgumentParser`. It is a container " +"for argument specifications and has options that apply the parser as whole::" +msgstr "" + +#: library/argparse.rst:41 +msgid "" +"The :meth:`ArgumentParser.add_argument` method attaches individual argument " +"specifications to the parser. It supports positional arguments, options " +"that accept values, and on/off flags::" +msgstr "" + +#: library/argparse.rst:50 +msgid "" +"The :meth:`ArgumentParser.parse_args` method runs the parser and places the " +"extracted data in a :class:`argparse.Namespace` object::" +msgstr "" + +#: library/argparse.rst:58 +msgid "Quick Links for add_argument()" +msgstr "" + +#: library/argparse.rst:61 +msgid "Name" +msgstr "" + +#: library/argparse.rst:61 +#, fuzzy +msgid "Description" +msgstr "Le paramètre *description*" + +#: library/argparse.rst:61 +msgid "Values" +msgstr "" + +#: library/argparse.rst:63 +#, fuzzy +msgid "action_" +msgstr "Le paramètre *action*" + +#: library/argparse.rst:63 +msgid "Specify how an argument should be handled" +msgstr "" + +#: library/argparse.rst:63 +msgid "" +"``'store'``, ``'store_const'``, ``'store_true'``, ``'append'``, " +"``'append_const'``, ``'count'``, ``'help'``, ``'version'``" +msgstr "" + +#: library/argparse.rst:64 +#, fuzzy +msgid "choices_" +msgstr "Le paramètre *choices*" + +#: library/argparse.rst:64 +msgid "Limit values to a specific set of choices" +msgstr "" + +#: library/argparse.rst:64 +msgid "" +"``['foo', 'bar']``, ``range(1, 10)``, or :class:`~collections.abc.Container` " +"instance" +msgstr "" + +#: library/argparse.rst:65 +#, fuzzy +msgid "const_" +msgstr "Le paramètre *const*" + +#: library/argparse.rst:65 +msgid "Store a constant value" +msgstr "" + +#: library/argparse.rst:66 +#, fuzzy +msgid "default_" +msgstr "Le paramètre *default*" + +#: library/argparse.rst:66 +msgid "Default value used when an argument is not provided" +msgstr "" + +#: library/argparse.rst:66 +msgid "Defaults to *None*" +msgstr "" + +#: library/argparse.rst:67 +#, fuzzy +msgid "dest_" +msgstr "Le paramètre *dest*" + +#: library/argparse.rst:67 +msgid "Specify the attribute name used in the result namespace" +msgstr "" + +#: library/argparse.rst:68 +#, fuzzy +msgid "help_" +msgstr "Le paramètre *help*" + +#: library/argparse.rst:68 +msgid "Help message for an argument" +msgstr "" + +#: library/argparse.rst:69 +#, fuzzy +msgid "metavar_" +msgstr "Le paramètre *metavar*" + +#: library/argparse.rst:69 +msgid "Alternate display name for the argument as shown in help" +msgstr "" + +#: library/argparse.rst:70 +#, fuzzy +msgid "nargs_" +msgstr "Le paramètre *nargs*" + +#: library/argparse.rst:70 +msgid "Number of times the argument can be used" +msgstr "" + +#: library/argparse.rst:70 +msgid ":class:`int`, ``'?'``, ``'*'``, ``'+'``, or ``argparse.REMAINDER``" +msgstr "" + +#: library/argparse.rst:71 +#, fuzzy +msgid "required_" +msgstr "Le paramètre *required*" + +#: library/argparse.rst:71 +msgid "Indicate whether an argument is required or optional" +msgstr "" + +#: library/argparse.rst:71 +msgid "``True`` or ``False``" +msgstr "" + +#: library/argparse.rst:72 +#, fuzzy +msgid "type_" +msgstr "Le paramètre *type*" + +#: library/argparse.rst:72 +msgid "Automatically convert an argument to the given type" +msgstr "" + +#: library/argparse.rst:72 +msgid "" +":class:`int`, :class:`float`, ``argparse.FileType('w')``, or callable " +"function" +msgstr "" + +#: library/argparse.rst:77 msgid "Example" msgstr "Exemple" -#: library/argparse.rst:32 +#: library/argparse.rst:79 msgid "" "The following code is a Python program that takes a list of integers and " "produces either the sum or the max::" @@ -68,16 +231,17 @@ msgstr "" "Le code suivant est un programme Python acceptant une liste de nombre " "entiers et en donnant soit la somme, soit le maximum ::" -#: library/argparse.rst:47 +#: library/argparse.rst:94 +#, fuzzy msgid "" -"Assuming the Python code above is saved into a file called ``prog.py``, it " -"can be run at the command line and provides useful help messages:" +"Assuming the above Python code is saved into a file called ``prog.py``, it " +"can be run at the command line and it provides useful help messages:" msgstr "" "En supposant que le code Python ci-dessus est sauvegardé dans un fichier " "nommé ``prog.py``, il peut être lancé en ligne de commande et fournit des " "messages d'aide utiles :" -#: library/argparse.rst:64 +#: library/argparse.rst:111 msgid "" "When run with the appropriate arguments, it prints either the sum or the max " "of the command-line integers:" @@ -85,19 +249,20 @@ msgstr "" "Lorsqu'il est lancé avec les arguments appropriés, il affiche la somme ou le " "maximum des entiers fournis en ligne de commande :" -#: library/argparse.rst:75 -msgid "If invalid arguments are passed in, it will issue an error:" +#: library/argparse.rst:122 +#, fuzzy +msgid "If invalid arguments are passed in, an error will be displayed:" msgstr "Si des arguments invalides sont passés, il lève une erreur :" -#: library/argparse.rst:83 +#: library/argparse.rst:130 msgid "The following sections walk you through this example." msgstr "Les sections suivantes vous guident au travers de cet exemple." -#: library/argparse.rst:87 +#: library/argparse.rst:134 msgid "Creating a parser" msgstr "Créer un analyseur (*parser* en anglais)" -#: library/argparse.rst:89 +#: library/argparse.rst:136 msgid "" "The first step in using the :mod:`argparse` is creating an :class:" "`ArgumentParser` object::" @@ -105,7 +270,7 @@ msgstr "" "La première étape dans l'utilisation de :mod:`argparse` est de créer un " "objet :class:`ArgumentParser` ::" -#: library/argparse.rst:94 +#: library/argparse.rst:141 msgid "" "The :class:`ArgumentParser` object will hold all the information necessary " "to parse the command line into Python data types." @@ -114,11 +279,11 @@ msgstr "" "nécessaires pour interpréter la ligne de commande comme des types de données " "de Python." -#: library/argparse.rst:99 +#: library/argparse.rst:146 msgid "Adding arguments" msgstr "Ajouter des arguments" -#: library/argparse.rst:101 +#: library/argparse.rst:148 msgid "" "Filling an :class:`ArgumentParser` with information about program arguments " "is done by making calls to the :meth:`~ArgumentParser.add_argument` method. " @@ -135,13 +300,14 @@ msgstr "" "utilisée lorsque :meth:`~ArgumentParser.parse_args` est appelée. Par " "exemple ::" -#: library/argparse.rst:113 +#: library/argparse.rst:160 +#, fuzzy msgid "" "Later, calling :meth:`~ArgumentParser.parse_args` will return an object with " "two attributes, ``integers`` and ``accumulate``. The ``integers`` attribute " -"will be a list of one or more ints, and the ``accumulate`` attribute will be " -"either the :func:`sum` function, if ``--sum`` was specified at the command " -"line, or the :func:`max` function if it was not." +"will be a list of one or more integers, and the ``accumulate`` attribute " +"will be either the :func:`sum` function, if ``--sum`` was specified at the " +"command line, or the :func:`max` function if it was not." msgstr "" "Ensuite, appeler :meth:`~ArgumentParser.parse_args` va renvoyer un objet " "avec deux attributs, ``integers`` et ``accumulate``. L'attribut ``integers`` " @@ -149,11 +315,11 @@ msgstr "" "soit la fonction :func:`sum`, si ``--sum`` était fourni à la ligne de " "commande, soit la fonction :func:`max` dans le cas contraire." -#: library/argparse.rst:121 +#: library/argparse.rst:168 msgid "Parsing arguments" msgstr "Analyse des arguments" -#: library/argparse.rst:123 +#: library/argparse.rst:170 msgid "" ":class:`ArgumentParser` parses arguments through the :meth:`~ArgumentParser." "parse_args` method. This will inspect the command line, convert each " @@ -167,7 +333,7 @@ msgstr "" "Dans la plupart des cas, le résultat est la construction d'un objet :class:" "`Namespace` à partir des attributs analysés dans la ligne de commande ::" -#: library/argparse.rst:132 +#: library/argparse.rst:179 msgid "" "In a script, :meth:`~ArgumentParser.parse_args` will typically be called " "with no arguments, and the :class:`ArgumentParser` will automatically " @@ -177,11 +343,11 @@ msgstr "" "sans arguments et l'objet :class:`ArgumentParser` détermine automatiquement " "les arguments de la ligne de commande à partir de :data:`sys.argv`." -#: library/argparse.rst:138 +#: library/argparse.rst:185 msgid "ArgumentParser objects" msgstr "Objets ``ArgumentParser``" -#: library/argparse.rst:147 +#: library/argparse.rst:194 msgid "" "Create a new :class:`ArgumentParser` object. All parameters should be passed " "as keyword arguments. Each parameter has its own more detailed description " @@ -191,11 +357,13 @@ msgstr "" "être passés en arguments nommés. Chaque paramètre a sa propre description " "détaillée ci-dessous, mais en résumé ils sont :" -#: library/argparse.rst:151 -msgid "prog_ - The name of the program (default: ``sys.argv[0]``)" -msgstr "prog_ – Nom du programme (par défaut : ``sys.argv[0]``) ;" +#: library/argparse.rst:198 +msgid "" +"prog_ - The name of the program (default: ``os.path.basename(sys.argv[0])``)" +msgstr "" +"prog_ – Nom du programme (par défaut : ``os.path.basename(sys.argv[0])``) ;" -#: library/argparse.rst:153 +#: library/argparse.rst:201 msgid "" "usage_ - The string describing the program usage (default: generated from " "arguments added to parser)" @@ -203,18 +371,18 @@ msgstr "" "usage_ – Chaîne décrivant l'utilisation du programme (par défaut : générée à " "partir des arguments ajoutés à l'analyseur) ;" -#: library/argparse.rst:156 +#: library/argparse.rst:204 msgid "description_ - Text to display before the argument help (default: none)" msgstr "" "description_ – Texte à afficher avant l'aide des arguments (par défaut : " "vide) ;" -#: library/argparse.rst:158 +#: library/argparse.rst:206 msgid "epilog_ - Text to display after the argument help (default: none)" msgstr "" "epilog_ – Texte à afficher après l'aide des arguments (par défaut : vide) ;" -#: library/argparse.rst:160 +#: library/argparse.rst:208 msgid "" "parents_ - A list of :class:`ArgumentParser` objects whose arguments should " "also be included" @@ -222,12 +390,12 @@ msgstr "" "parents_ – Liste d'objets :class:`ArgumentParser` contenant des arguments " "qui devraient aussi être inclus ;" -#: library/argparse.rst:163 +#: library/argparse.rst:211 msgid "formatter_class_ - A class for customizing the help output" msgstr "" "formatter_class_ – Classe pour personnaliser la sortie du message d'aide ;" -#: library/argparse.rst:165 +#: library/argparse.rst:213 msgid "" "prefix_chars_ - The set of characters that prefix optional arguments " "(default: '-')" @@ -235,7 +403,7 @@ msgstr "" "prefix_chars_ – Jeu de caractères qui précède les arguments optionnels (par " "défaut : ``'-'``) ;" -#: library/argparse.rst:168 +#: library/argparse.rst:216 msgid "" "fromfile_prefix_chars_ - The set of characters that prefix files from which " "additional arguments should be read (default: ``None``)" @@ -243,7 +411,7 @@ msgstr "" "fromfile_prefix_chars_ – Jeu de caractères qui précède les fichiers d'où des " "arguments additionnels doivent être lus (par défaut : ``None``) ;" -#: library/argparse.rst:171 +#: library/argparse.rst:219 msgid "" "argument_default_ - The global default value for arguments (default: " "``None``)" @@ -251,7 +419,7 @@ msgstr "" "argument_default_ – Valeur globale par défaut pour les arguments (par " "défaut : ``None``) ;" -#: library/argparse.rst:174 +#: library/argparse.rst:222 msgid "" "conflict_handler_ - The strategy for resolving conflicting optionals " "(usually unnecessary)" @@ -259,14 +427,14 @@ msgstr "" "conflict_handler_ – Stratégie pour résoudre les conflits entre les arguments " "optionnels (non-nécessaire en général) ;" -#: library/argparse.rst:177 +#: library/argparse.rst:225 msgid "" "add_help_ - Add a ``-h/--help`` option to the parser (default: ``True``)" msgstr "" "add_help_ – Ajoute une option d'aide ``-h/--help`` à l'analyseur (par " "défaut : ``True``) ;" -#: library/argparse.rst:179 +#: library/argparse.rst:227 msgid "" "allow_abbrev_ - Allows long options to be abbreviated if the abbreviation is " "unambiguous. (default: ``True``)" @@ -274,7 +442,7 @@ msgstr "" "allow_abbrev_ – Permet l'acceptation d'abréviations non-ambigües pour les " "options longues (par défaut : ``True``) ;" -#: library/argparse.rst:182 +#: library/argparse.rst:230 msgid "" "exit_on_error_ - Determines whether or not ArgumentParser exits with error " "info when an error occurs. (default: ``True``)" @@ -283,11 +451,11 @@ msgstr "" "avec un message d'erreur quand une erreur est rencontrée (par défaut : " "``True``)." -#: library/argparse.rst:185 +#: library/argparse.rst:233 msgid "*allow_abbrev* parameter was added." msgstr "Le paramètre *allow_abbrev* est ajouté." -#: library/argparse.rst:188 +#: library/argparse.rst:236 msgid "" "In previous versions, *allow_abbrev* also disabled grouping of short flags " "such as ``-vv`` to mean ``-v -v``." @@ -296,21 +464,21 @@ msgstr "" "regroupement de plusieurs options courtes telles que ``-vv`` pour signifier " "``-v -v``." -#: library/argparse.rst:192 +#: library/argparse.rst:240 msgid "*exit_on_error* parameter was added." msgstr "Le paramètre *exit_on_error* est ajouté." -#: library/argparse.rst:715 +#: library/argparse.rst:769 msgid "The following sections describe how each of these are used." msgstr "" "Les sections suivantes décrivent comment chacune de ces options sont " "utilisées." -#: library/argparse.rst:199 +#: library/argparse.rst:249 msgid "prog" msgstr "Le paramètre *prog*" -#: library/argparse.rst:201 +#: library/argparse.rst:251 msgid "" "By default, :class:`ArgumentParser` objects use ``sys.argv[0]`` to determine " "how to display the name of the program in help messages. This default is " @@ -325,7 +493,7 @@ msgstr "" "programme sur la ligne de commande. Par exemple, si on a un fichier nommé " "``myprogram.py`` avec le code suivant ::" -#: library/argparse.rst:212 +#: library/argparse.rst:262 msgid "" "The help for this program will display ``myprogram.py`` as the program name " "(regardless of where the program was invoked from):" @@ -333,7 +501,7 @@ msgstr "" "Le message d'aide pour ce programme affiche ``myprogram.py`` pour le nom du " "programme (peu importe d'où le programme est lancé) :" -#: library/argparse.rst:231 +#: library/argparse.rst:281 msgid "" "To change this default behavior, another value can be supplied using the " "``prog=`` argument to :class:`ArgumentParser`::" @@ -341,7 +509,7 @@ msgstr "" "Pour changer ce comportement par défaut, une valeur alternative est passée " "par l'argument ``prog=`` du constructeur d':class:`ArgumentParser` ::" -#: library/argparse.rst:241 +#: library/argparse.rst:291 msgid "" "Note that the program name, whether determined from ``sys.argv[0]`` or from " "the ``prog=`` argument, is available to help messages using the ``%(prog)s`` " @@ -351,11 +519,11 @@ msgstr "" "argv[0]`` ou de l'argument ``prog=``, est accessible aux messages d'aide " "grâce au spécificateur de formatage ``%(prog)s``." -#: library/argparse.rst:258 +#: library/argparse.rst:308 msgid "usage" msgstr "Le paramètre *usage*" -#: library/argparse.rst:260 +#: library/argparse.rst:310 msgid "" "By default, :class:`ArgumentParser` calculates the usage message from the " "arguments it contains::" @@ -363,14 +531,14 @@ msgstr "" "Par défaut, l'objet :class:`ArgumentParser` construit le message relatif à " "l'utilisation à partir des arguments qu'il contient ::" -#: library/argparse.rst:276 +#: library/argparse.rst:326 msgid "" "The default message can be overridden with the ``usage=`` keyword argument::" msgstr "" "Le message par défaut peut être remplacé grâce à l'argument nommé " "``usage=`` ::" -#: library/argparse.rst:291 +#: library/argparse.rst:341 msgid "" "The ``%(prog)s`` format specifier is available to fill in the program name " "in your usage messages." @@ -378,11 +546,11 @@ msgstr "" "Le spécificateur de formatage ``%(prog)s`` est disponible pour insérer le " "nom du programme dans vos messages d'utilisation." -#: library/argparse.rst:296 +#: library/argparse.rst:348 msgid "description" msgstr "Le paramètre *description*" -#: library/argparse.rst:298 +#: library/argparse.rst:350 msgid "" "Most calls to the :class:`ArgumentParser` constructor will use the " "``description=`` keyword argument. This argument gives a brief description " @@ -396,7 +564,7 @@ msgstr "" "d'aide, cette description est affichée entre le prototype de ligne de " "commande et les messages d'aide des arguments ::" -#: library/argparse.rst:313 +#: library/argparse.rst:365 msgid "" "By default, the description will be line-wrapped so that it fits within the " "given space. To change this behavior, see the formatter_class_ argument." @@ -405,11 +573,11 @@ msgstr "" "se conformer à l'espace disponible. Pour changer ce comportement, voyez " "l'argument formatter_class_." -#: library/argparse.rst:318 +#: library/argparse.rst:370 msgid "epilog" msgstr "Le paramètre *epilog*" -#: library/argparse.rst:320 +#: library/argparse.rst:372 msgid "" "Some programs like to display additional description of the program after " "the description of the arguments. Such text can be specified using the " @@ -419,7 +587,7 @@ msgstr "" "description des arguments. Un tel texte peut être spécifié grâce à " "l'argument ``epilog=`` du constructeur d':class:`ArgumentParser` ::" -#: library/argparse.rst:337 +#: library/argparse.rst:389 msgid "" "As with the description_ argument, the ``epilog=`` text is by default line-" "wrapped, but this behavior can be adjusted with the formatter_class_ " @@ -430,11 +598,11 @@ msgstr "" "grâce à l'argument formatter_class_ du constructeur d':class:" "`ArgumentParser`." -#: library/argparse.rst:343 +#: library/argparse.rst:395 msgid "parents" msgstr "Le paramètre *parents*" -#: library/argparse.rst:345 +#: library/argparse.rst:397 msgid "" "Sometimes, several parsers share a common set of arguments. Rather than " "repeating the definitions of these arguments, a single parser with all the " @@ -453,7 +621,7 @@ msgstr "" "puis les ajoute à l'instance d':class:`ArgumentParser` en cours de " "création ::" -#: library/argparse.rst:365 +#: library/argparse.rst:417 msgid "" "Note that most parent parsers will specify ``add_help=False``. Otherwise, " "the :class:`ArgumentParser` will see two ``-h/--help`` options (one in the " @@ -464,7 +632,7 @@ msgstr "" "voir plus d'une option ``-h/--help`` (une pour le parent et une pour " "l'instance en cours de création) et va lever une erreur." -#: library/argparse.rst:370 +#: library/argparse.rst:422 msgid "" "You must fully initialize the parsers before passing them via ``parents=``. " "If you change the parent parsers after the child parser, those changes will " @@ -474,11 +642,11 @@ msgstr "" "``parents=``. Si vous changez les analyseurs parents après la création de " "l'analyseur enfant, ces changements ne seront pas répercutés sur l'enfant." -#: library/argparse.rst:376 +#: library/argparse.rst:430 msgid "formatter_class" msgstr "Le paramètre *formatter_class*" -#: library/argparse.rst:378 +#: library/argparse.rst:432 msgid "" ":class:`ArgumentParser` objects allow the help formatting to be customized " "by specifying an alternate formatting class. Currently, there are four such " @@ -488,7 +656,7 @@ msgstr "" "en page des messages d'aide en spécifiant une classe de formatage " "alternative. Il y a actuellement quatre classes de formatage :" -#: library/argparse.rst:387 +#: library/argparse.rst:441 msgid "" ":class:`RawDescriptionHelpFormatter` and :class:`RawTextHelpFormatter` give " "more control over how textual descriptions are displayed. By default, :class:" @@ -501,7 +669,7 @@ msgstr "" "class:`ArgumentParser` font l'objet du retour à la ligne automatique dans " "les messages d'aide ::" -#: library/argparse.rst:412 +#: library/argparse.rst:466 msgid "" "Passing :class:`RawDescriptionHelpFormatter` as ``formatter_class=`` " "indicates that description_ and epilog_ are already correctly formatted and " @@ -512,7 +680,7 @@ msgstr "" "correctement et qu'ils ne doivent pas faire l'objet d'un retour à la ligne " "automatique ::" -#: library/argparse.rst:438 +#: library/argparse.rst:492 msgid "" ":class:`RawTextHelpFormatter` maintains whitespace for all sorts of help " "text, including argument descriptions. However, multiple new lines are " @@ -525,7 +693,7 @@ msgstr "" "seul. Si vous voulez garder plusieurs sauts de ligne, ajoutez des espaces " "entre les caractères de changement de ligne." -#: library/argparse.rst:443 +#: library/argparse.rst:497 msgid "" ":class:`ArgumentDefaultsHelpFormatter` automatically adds information about " "default values to each of the argument help messages::" @@ -533,7 +701,7 @@ msgstr "" ":class:`ArgumentDefaultsHelpFormatter` ajoute automatiquement l'information " "sur les valeurs par défaut aux messages d'aide de tous les arguments ::" -#: library/argparse.rst:461 +#: library/argparse.rst:515 msgid "" ":class:`MetavarTypeHelpFormatter` uses the name of the type_ argument for " "each argument as the display name for its values (rather than using the " @@ -543,11 +711,11 @@ msgstr "" "chacun des arguments comme nom d'affichage pour leurs valeurs (contrairement " "au formateur standard qui utilise dest_) ::" -#: library/argparse.rst:482 +#: library/argparse.rst:536 msgid "prefix_chars" msgstr "Le paramètre *prefix_chars*" -#: library/argparse.rst:484 +#: library/argparse.rst:538 msgid "" "Most command-line options will use ``-`` as the prefix, e.g. ``-f/--foo``. " "Parsers that need to support different or additional prefix characters, e.g. " @@ -560,7 +728,7 @@ msgstr "" "les options ``+f`` ou ``/foo``), vous devez les spécifier en utilisant " "l'argument ``prefix_chars=`` du constructeur d'``ArgumentParser`` ::" -#: library/argparse.rst:496 +#: library/argparse.rst:550 msgid "" "The ``prefix_chars=`` argument defaults to ``'-'``. Supplying a set of " "characters that does not include ``-`` will cause ``-f/--foo`` options to be " @@ -570,18 +738,18 @@ msgstr "" "caractères qui n'inclut pas ``-`` provoquera le refus des options comme ``-" "f/--foo``." -#: library/argparse.rst:502 +#: library/argparse.rst:556 msgid "fromfile_prefix_chars" msgstr "Le paramètre *fromfile_prefix_chars*" -#: library/argparse.rst:504 +#: library/argparse.rst:558 msgid "" -"Sometimes, for example when dealing with a particularly long argument lists, " -"it may make sense to keep the list of arguments in a file rather than typing " -"it out at the command line. If the ``fromfile_prefix_chars=`` argument is " -"given to the :class:`ArgumentParser` constructor, then arguments that start " -"with any of the specified characters will be treated as files, and will be " -"replaced by the arguments they contain. For example::" +"Sometimes, when dealing with a particularly long argument list, it may make " +"sense to keep the list of arguments in a file rather than typing it out at " +"the command line. If the ``fromfile_prefix_chars=`` argument is given to " +"the :class:`ArgumentParser` constructor, then arguments that start with any " +"of the specified characters will be treated as files, and will be replaced " +"by the arguments they contain. For example::" msgstr "" "Parfois, par exemple quand on traite une liste d'arguments particulièrement " "longue, il est logique de stocker la liste d'arguments dans un fichier " @@ -591,7 +759,7 @@ msgstr "" "spécifiés seront traités comme des fichiers et seront remplacés par les " "arguments contenus dans ces fichiers. Par exemple ::" -#: library/argparse.rst:518 +#: library/argparse.rst:572 msgid "" "Arguments read from a file must by default be one per line (but see also :" "meth:`~ArgumentParser.convert_arg_line_to_args`) and are treated as if they " @@ -607,7 +775,7 @@ msgstr "" "commande. Ainsi dans l'exemple ci-dessus, l'expression ``['-f', 'foo', " "'@args.txt']`` est équivalente à l'expression ``['-f', 'foo', '-f', 'bar']``." -#: library/argparse.rst:524 +#: library/argparse.rst:578 msgid "" "The ``fromfile_prefix_chars=`` argument defaults to ``None``, meaning that " "arguments will never be treated as file references." @@ -616,11 +784,11 @@ msgstr "" "signifie que les arguments ne seront pas traités en tant que références à " "des fichiers." -#: library/argparse.rst:529 +#: library/argparse.rst:583 msgid "argument_default" msgstr "Le paramètre *argument_default*" -#: library/argparse.rst:531 +#: library/argparse.rst:585 msgid "" "Generally, argument defaults are specified either by passing a default to :" "meth:`~ArgumentParser.add_argument` or by calling the :meth:`~ArgumentParser." @@ -642,11 +810,11 @@ msgstr "" "de :meth:`~ArgumentParser.parse_args`, on fournit " "``argument_default=SUPPRESS`` ::" -#: library/argparse.rst:551 +#: library/argparse.rst:605 msgid "allow_abbrev" msgstr "Le paramètre *allow_abbrev*" -#: library/argparse.rst:553 +#: library/argparse.rst:607 msgid "" "Normally, when you pass an argument list to the :meth:`~ArgumentParser." "parse_args` method of an :class:`ArgumentParser`, it :ref:`recognizes " @@ -656,17 +824,17 @@ msgstr "" "meth:`~ArgumentParser.parse_args` d':class:`ArgumentParser` :ref:`elle " "accepte les abréviations ` des options longues." -#: library/argparse.rst:557 +#: library/argparse.rst:611 msgid "This feature can be disabled by setting ``allow_abbrev`` to ``False``::" msgstr "" "Cette fonctionnalité peut être désactivée en passant ``False`` à " "``allow_abbrev`` ::" -#: library/argparse.rst:570 +#: library/argparse.rst:624 msgid "conflict_handler" msgstr "Le paramètre *conflict_handler*" -#: library/argparse.rst:572 +#: library/argparse.rst:626 msgid "" ":class:`ArgumentParser` objects do not allow two actions with the same " "option string. By default, :class:`ArgumentParser` objects raise an " @@ -678,7 +846,7 @@ msgstr "" "lèvent une exception si on essaie de créer un argument avec une chaîne " "d'option qui est déjà utilisée ::" -#: library/argparse.rst:584 +#: library/argparse.rst:638 msgid "" "Sometimes (e.g. when using parents_) it may be useful to simply override any " "older arguments with the same option string. To get this behavior, the " @@ -690,7 +858,7 @@ msgstr "" "d'option. Pour obtenir ce comportement, vous devez passer ``'resolve'`` à " "l'argument ``conflict_handler=`` du constructeur d':class:`ArgumentParser` ::" -#: library/argparse.rst:600 +#: library/argparse.rst:654 msgid "" "Note that :class:`ArgumentParser` objects only remove an action if all of " "its option strings are overridden. So, in the example above, the old ``-f/--" @@ -702,11 +870,11 @@ msgstr "" "dessus, l'action ``-f/--foo`` du parent est conservée comme l'action ``-f`` " "puisque ``--foo`` est la seule chaîne d'options qui a été surchargée." -#: library/argparse.rst:607 +#: library/argparse.rst:661 msgid "add_help" msgstr "Le paramètre *add_help*" -#: library/argparse.rst:609 +#: library/argparse.rst:663 msgid "" "By default, ArgumentParser objects add an option which simply displays the " "parser's help message. For example, consider a file named ``myprogram.py`` " @@ -716,7 +884,7 @@ msgstr "" "l'affichage du message d'aide de l'analyseur. Par exemple, prenons le " "fichier ``myprogram.py`` qui contient le code suivant ::" -#: library/argparse.rst:618 +#: library/argparse.rst:672 msgid "" "If ``-h`` or ``--help`` is supplied at the command line, the ArgumentParser " "help will be printed:" @@ -724,7 +892,7 @@ msgstr "" "Si ``-h`` ou ``--help`` est passé sur la ligne de commande, le message " "d'aide de l'``ArgumentParser`` sera affiché :" -#: library/argparse.rst:630 +#: library/argparse.rst:684 msgid "" "Occasionally, it may be useful to disable the addition of this help option. " "This can be achieved by passing ``False`` as the ``add_help=`` argument to :" @@ -734,7 +902,7 @@ msgstr "" "faire, vous devez passer ``False`` à l'argument ``add_help=`` du " "constructeur d':class:`ArgumentParser` ::" -#: library/argparse.rst:642 +#: library/argparse.rst:696 msgid "" "The help option is typically ``-h/--help``. The exception to this is if the " "``prefix_chars=`` is specified and does not include ``-``, in which case ``-" @@ -747,11 +915,11 @@ msgstr "" "ce cas, le premier caractère de ``prefix_chars`` est utilisé comme préfixe " "des options d'aide ::" -#: library/argparse.rst:657 +#: library/argparse.rst:711 msgid "exit_on_error" msgstr "Le paramètre *exit_on_error*" -#: library/argparse.rst:659 +#: library/argparse.rst:713 msgid "" "Normally, when you pass an invalid argument list to the :meth:" "`~ArgumentParser.parse_args` method of an :class:`ArgumentParser`, it will " @@ -761,8 +929,7 @@ msgstr "" "invalide à la méthode :meth:`~ArgumentParser.parse_args` d'une instance d':" "class:`ArgumentParser`, l'exécution se termine avec un message d'erreur." -#: library/argparse.rst:662 -#, fuzzy +#: library/argparse.rst:716 msgid "" "If the user would like to catch errors manually, the feature can be enabled " "by setting ``exit_on_error`` to ``False``::" @@ -770,11 +937,11 @@ msgstr "" "Si vous souhaitez intercepter les erreurs manuellement, la fonctionnalité " "peut être activée en assignant ``False`` à ``exit_on_error`` ::" -#: library/argparse.rst:679 +#: library/argparse.rst:733 msgid "The add_argument() method" msgstr "La méthode *add_argument()*" -#: library/argparse.rst:685 +#: library/argparse.rst:739 msgid "" "Define how a single command-line argument should be parsed. Each parameter " "has its own more detailed description below, but in short they are:" @@ -782,7 +949,7 @@ msgstr "" "Définie comment une option de ligne de commande doit être analysée. Chacun " "des paramètres est décrit plus en détails ci-bas, mais en résumé ils sont :" -#: library/argparse.rst:688 +#: library/argparse.rst:742 msgid "" "`name or flags`_ - Either a name or a list of option strings, e.g. ``foo`` " "or ``-f, --foo``." @@ -790,7 +957,7 @@ msgstr "" "`name_or_flags`_ – Nom ou liste de chaînes d'options. Par exemple : ``foo`` " "ou ``-f, --foo`` ;" -#: library/argparse.rst:691 +#: library/argparse.rst:745 msgid "" "action_ - The basic type of action to be taken when this argument is " "encountered at the command line." @@ -798,17 +965,17 @@ msgstr "" "action_ – Type élémentaire de l'action à entreprendre quand cet argument est " "reconnu sur la ligne de commande ;" -#: library/argparse.rst:694 +#: library/argparse.rst:748 msgid "nargs_ - The number of command-line arguments that should be consumed." msgstr "nargs_ – Nombre d'arguments de la ligne de commande à capturer ;" -#: library/argparse.rst:696 +#: library/argparse.rst:750 msgid "" "const_ - A constant value required by some action_ and nargs_ selections." msgstr "" "const_ – Valeur constante requise par certains choix d'action_ et de nargs_ ;" -#: library/argparse.rst:698 +#: library/argparse.rst:752 msgid "" "default_ - The value produced if the argument is absent from the command " "line and if it is absent from the namespace object." @@ -816,20 +983,20 @@ msgstr "" "default_ – Valeur produite si l'argument est absent de la ligne de " "commande et absent de l'objet ``namespace`` ;" -#: library/argparse.rst:701 +#: library/argparse.rst:755 msgid "" "type_ - The type to which the command-line argument should be converted." msgstr "" "type_ – Type vers lequel l'argument sur la ligne de commande doit être " "converti ;" -#: library/argparse.rst:703 +#: library/argparse.rst:757 msgid "choices_ - A container of the allowable values for the argument." msgstr "" "choices_ – Conteneur qui contient toutes les valeurs permises pour cet " "argument ;" -#: library/argparse.rst:705 +#: library/argparse.rst:759 msgid "" "required_ - Whether or not the command-line option may be omitted (optionals " "only)." @@ -837,15 +1004,15 @@ msgstr "" "required_ – ``True`` si l'option sur la ligne de commande est obligatoire " "(ne s'applique qu'aux arguments optionnels) ;" -#: library/argparse.rst:708 +#: library/argparse.rst:762 msgid "help_ - A brief description of what the argument does." msgstr "help_ – Brève description de ce que fait l'argument ;" -#: library/argparse.rst:710 +#: library/argparse.rst:764 msgid "metavar_ - A name for the argument in usage messages." msgstr "metavar_ – Nom de l'argument dans les messages d'utilisations ;" -#: library/argparse.rst:712 +#: library/argparse.rst:766 msgid "" "dest_ - The name of the attribute to be added to the object returned by :" "meth:`parse_args`." @@ -853,18 +1020,18 @@ msgstr "" "dest_ – Nom de l'attribut qui sera ajouté à l'objet retourné par :meth:" "`parse_args`." -#: library/argparse.rst:719 +#: library/argparse.rst:775 msgid "name or flags" msgstr "Le paramètre *name_or_flags*" -#: library/argparse.rst:721 +#: library/argparse.rst:777 +#, fuzzy msgid "" "The :meth:`~ArgumentParser.add_argument` method must know whether an " "optional argument, like ``-f`` or ``--foo``, or a positional argument, like " "a list of filenames, is expected. The first arguments passed to :meth:" "`~ArgumentParser.add_argument` must therefore be either a series of flags, " -"or a simple argument name. For example, an optional argument could be " -"created like::" +"or a simple argument name." msgstr "" "La méthode :meth:`~ArgumentParser.add_argument` doit savoir si c'est un " "argument optionnel (tel que ``-f`` ou ``--foo``) ou plutôt un argument " @@ -874,11 +1041,16 @@ msgstr "" "commande, soit simplement un nom si on désire un argument positionnel. Par " "exemple, un argument optionnel est créé comme suit ::" -#: library/argparse.rst:730 +#: library/argparse.rst:783 +#, fuzzy +msgid "For example, an optional argument could be created like::" +msgstr "alors qu'un argument positionnel est créé comme suit ::" + +#: library/argparse.rst:787 msgid "while a positional argument could be created like::" msgstr "alors qu'un argument positionnel est créé comme suit ::" -#: library/argparse.rst:734 +#: library/argparse.rst:791 msgid "" "When :meth:`~ArgumentParser.parse_args` is called, optional arguments will " "be identified by the ``-`` prefix, and the remaining arguments will be " @@ -888,11 +1060,11 @@ msgstr "" "commencent par le préfixe ``-`` sont présumés optionnels et tous les autres " "sont présumés positionnels ::" -#: library/argparse.rst:751 +#: library/argparse.rst:810 msgid "action" msgstr "Le paramètre *action*" -#: library/argparse.rst:753 +#: library/argparse.rst:812 msgid "" ":class:`ArgumentParser` objects associate command-line arguments with " "actions. These actions can do just about anything with the command-line " @@ -909,7 +1081,7 @@ msgstr "" "indique comment l'argument de la ligne de commande sera traité. Les actions " "natives sont :" -#: library/argparse.rst:759 +#: library/argparse.rst:818 msgid "" "``'store'`` - This just stores the argument's value. This is the default " "action. For example::" @@ -917,18 +1089,20 @@ msgstr "" "``'store'`` – Stocke la valeur de l'argument sans autre traitement. Ceci est " "l'action par défaut. Par exemple ::" -#: library/argparse.rst:767 +#: library/argparse.rst:826 +#, fuzzy msgid "" "``'store_const'`` - This stores the value specified by the const_ keyword " -"argument. The ``'store_const'`` action is most commonly used with optional " -"arguments that specify some sort of flag. For example::" +"argument; note that the const_ keyword argument defaults to ``None``. The " +"``'store_const'`` action is most commonly used with optional arguments that " +"specify some sort of flag. For example::" msgstr "" "``'store_const'`` – Stocke la valeur passée à l'argument nommé const_. " "L'action ``'store_const'`` est typiquement utilisée avec des arguments " "optionnels qui représentent un drapeau ou une condition similaire. Par " "exemple ::" -#: library/argparse.rst:776 +#: library/argparse.rst:836 msgid "" "``'store_true'`` and ``'store_false'`` - These are special cases of " "``'store_const'`` used for storing the values ``True`` and ``False`` " @@ -940,21 +1114,25 @@ msgstr "" "``True`` et ``False``, respectivement. Aussi, ces actions ont comme valeur " "par défaut ``False`` et ``True``, respectivement. Par exemple ::" -#: library/argparse.rst:788 +#: library/argparse.rst:848 +#, fuzzy msgid "" "``'append'`` - This stores a list, and appends each argument value to the " -"list. This is useful to allow an option to be specified multiple times. " -"Example usage::" +"list. It is useful to allow an option to be specified multiple times. If the " +"default value is non-empty, the default elements will be present in the " +"parsed value for the option, with any values from the command line appended " +"after those default values. Example usage::" msgstr "" "``'append'`` – Stocke une liste et ajoute la valeur de l'argument à la " "liste. Ceci est pratique pour les options qui peuvent être répétées sur la " "ligne de commande ::" -#: library/argparse.rst:797 +#: library/argparse.rst:859 +#, fuzzy msgid "" "``'append_const'`` - This stores a list, and appends the value specified by " -"the const_ keyword argument to the list. (Note that the const_ keyword " -"argument defaults to ``None``.) The ``'append_const'`` action is typically " +"the const_ keyword argument to the list; note that the const_ keyword " +"argument defaults to ``None``. The ``'append_const'`` action is typically " "useful when multiple arguments need to store constants to the same list. For " "example::" msgstr "" @@ -964,7 +1142,7 @@ msgstr "" "pratique quand plusieurs arguments ont besoin de stocker des constantes dans " "la même liste. Par exemple ::" -#: library/argparse.rst:809 +#: library/argparse.rst:871 msgid "" "``'count'`` - This counts the number of times a keyword argument occurs. For " "example, this is useful for increasing verbosity levels::" @@ -972,13 +1150,13 @@ msgstr "" "``'count'`` – Compte le nombre d'occurrences de l'argument nommé. Ceci est " "pratique, par exemple, pour augmenter le niveau de verbosité ::" -#: library/argparse.rst:817 +#: library/argparse.rst:879 msgid "Note, the *default* will be ``None`` unless explicitly set to *0*." msgstr "" "Prenez note que la valeur de *default* sera ``None`` à moins qu'elle soit " "explicitement définie à ``0``." -#: library/argparse.rst:819 +#: library/argparse.rst:881 msgid "" "``'help'`` - This prints a complete help message for all the options in the " "current parser and then exits. By default a help action is automatically " @@ -990,7 +1168,7 @@ msgstr "" "automatiquement ajoutée à l'analyseur par défaut. Consultez :class:" "`ArgumentParser` pour les détails de la création du contenu de l'aide." -#: library/argparse.rst:824 +#: library/argparse.rst:886 msgid "" "``'version'`` - This expects a ``version=`` keyword argument in the :meth:" "`~ArgumentParser.add_argument` call, and prints version information and " @@ -1000,7 +1178,7 @@ msgstr "" "Cette action requiert l'argument nommé ``version=`` dans l'appel à :meth:" "`~ArgumentParser.add_argument` ::" -#: library/argparse.rst:834 +#: library/argparse.rst:896 msgid "" "``'extend'`` - This stores a list, and extends each argument value to the " "list. Example usage::" @@ -1008,7 +1186,7 @@ msgstr "" "``'extend'`` – Stock une liste et ajoute à la liste chacune des valeurs de " "l'argument reçues. Voici un exemple de son utilisation ::" -#: library/argparse.rst:845 +#: library/argparse.rst:907 msgid "" "You may also specify an arbitrary action by passing an Action subclass or " "other object that implements the same interface. The " @@ -1020,7 +1198,7 @@ msgstr "" "``BooleanOptionalAction`` est disponible dans ``argparse`` et elle ajoute la " "gestion des options booléennes telles que ``--foo`` et ``--no-foo`` ::" -#: library/argparse.rst:856 +#: library/argparse.rst:920 msgid "" "The recommended way to create a custom action is to extend :class:`Action`, " "overriding the ``__call__`` method and optionally the ``__init__`` and " @@ -1030,19 +1208,19 @@ msgstr "" "class:`Action` en surchargeant la méthode ``__call__``. Vous avez également " "l'option de surcharger les méthodes ``__init__`` et ``format_usage``." -#: library/argparse.rst:860 +#: library/argparse.rst:924 msgid "An example of a custom action::" msgstr "Un exemple d'action personnalisée ::" -#: library/argparse.rst:880 +#: library/argparse.rst:944 msgid "For more details, see :class:`Action`." msgstr "Pour plus d'information, voir :class:`Action`." -#: library/argparse.rst:883 +#: library/argparse.rst:950 msgid "nargs" msgstr "Le paramètre *nargs*" -#: library/argparse.rst:885 +#: library/argparse.rst:952 msgid "" "ArgumentParser objects usually associate a single command-line argument with " "a single action to be taken. The ``nargs`` keyword argument associates a " @@ -1054,7 +1232,7 @@ msgstr "" "``nargs`` associe un nombre différent d'arguments de la ligne de commande à " "une action. Les valeurs reconnues sont :" -#: library/argparse.rst:890 +#: library/argparse.rst:957 msgid "" "``N`` (an integer). ``N`` arguments from the command line will be gathered " "together into a list. For example::" @@ -1062,7 +1240,7 @@ msgstr "" "``N`` (un entier). ``N`` arguments de la ligne de commande seront capturés " "ensemble et stockés dans une liste. Par exemple ::" -#: library/argparse.rst:899 +#: library/argparse.rst:966 msgid "" "Note that ``nargs=1`` produces a list of one item. This is different from " "the default, in which the item is produced by itself." @@ -1071,7 +1249,7 @@ msgstr "" "différent du comportement par défaut qui produit l'élément directement " "(comme un scalaire)." -#: library/argparse.rst:904 +#: library/argparse.rst:971 msgid "" "``'?'``. One argument will be consumed from the command line if possible, " "and produced as a single item. If no command-line argument is present, the " @@ -1087,7 +1265,7 @@ msgstr "" "qu'elle ne soit pas suivie d'un argument. Dans ce cas, la valeur de const_ " "est produite. Voici quelques exemples pour illustrer ceci ::" -#: library/argparse.rst:921 +#: library/argparse.rst:988 msgid "" "One of the more common uses of ``nargs='?'`` is to allow optional input and " "output files::" @@ -1095,7 +1273,7 @@ msgstr "" "``nargs='?'`` est fréquemment utilisé pour accepter des fichiers d'entrée et " "de sortie optionnels ::" -#: library/argparse.rst:938 +#: library/argparse.rst:1005 msgid "" "``'*'``. All command-line arguments present are gathered into a list. Note " "that it generally doesn't make much sense to have more than one positional " @@ -1108,7 +1286,7 @@ msgstr "" "d'avoir plusieurs arguments optionnels qui spécifient ``nargs='*'``. Par " "exemple ::" -#: library/argparse.rst:952 +#: library/argparse.rst:1019 msgid "" "``'+'``. Just like ``'*'``, all command-line args present are gathered into " "a list. Additionally, an error message will be generated if there wasn't at " @@ -1119,7 +1297,7 @@ msgstr "" "produit s'il n'y a pas au moins un argument présent sur la ligne de " "commande. Par exemple ::" -#: library/argparse.rst:964 +#: library/argparse.rst:1031 msgid "" "If the ``nargs`` keyword argument is not provided, the number of arguments " "consumed is determined by the action_. Generally this means a single " @@ -1130,11 +1308,11 @@ msgstr "" "capturés est déterminé par l'action_. En général, c'est un seul argument de " "la ligne de commande qui est capturé et il est produit directement." -#: library/argparse.rst:970 +#: library/argparse.rst:1039 msgid "const" msgstr "Le paramètre *const*" -#: library/argparse.rst:972 +#: library/argparse.rst:1041 msgid "" "The ``const`` argument of :meth:`~ArgumentParser.add_argument` is used to " "hold constant values that are not read from the command line but are " @@ -1146,12 +1324,15 @@ msgstr "" "est requise par certaines actions d':class:`ArgumentParser`. Les deux " "utilisations les plus communes sont :" -#: library/argparse.rst:976 +#: library/argparse.rst:1045 +#, fuzzy msgid "" "When :meth:`~ArgumentParser.add_argument` is called with " "``action='store_const'`` or ``action='append_const'``. These actions add " "the ``const`` value to one of the attributes of the object returned by :meth:" -"`~ArgumentParser.parse_args`. See the action_ description for examples." +"`~ArgumentParser.parse_args`. See the action_ description for examples. If " +"``const`` is not provided to :meth:`~ArgumentParser.add_argument`, it will " +"receive a default value of ``None``." msgstr "" "quand :meth:`~ArgumentParser.add_argument` est appelée avec " "``action='store_const'`` ou ``action='append_const'``. Ces actions ajoutent " @@ -1161,14 +1342,15 @@ msgstr "" # Nous sommes dans une énumération après un :, donc pas de majuscule et le # paragraphe doit se terminer par ;. -#: library/argparse.rst:981 +#: library/argparse.rst:1053 +#, fuzzy msgid "" "When :meth:`~ArgumentParser.add_argument` is called with option strings " "(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional " "argument that can be followed by zero or one command-line arguments. When " "parsing the command line, if the option string is encountered with no " "command-line argument following it, the value of ``const`` will be assumed " -"instead. See the nargs_ description for examples." +"to be ``None`` instead. See the nargs_ description for examples." msgstr "" "Quand la méthode :meth:`~ArgumentParser.add_argument` est appelée avec des " "chaînes d'options (telles que ``-f`` ou ``--foo``) et ``nargs='?'``. Ceci " @@ -1178,20 +1360,17 @@ msgstr "" "valeur de ``const`` est utilisée. Consultez la description de nargs_ pour " "voir quelques exemples." -#: library/argparse.rst:988 +#: library/argparse.rst:1060 msgid "" -"With the ``'store_const'`` and ``'append_const'`` actions, the ``const`` " -"keyword argument must be given. For other actions, it defaults to ``None``." +"``const=None`` by default, including when ``action='append_const'`` or " +"``action='store_const'``." msgstr "" -"Pour les actions ``'store_const'`` et ``'append_const'``, l'argument nommé " -"``const`` doit être spécifié. Pour toutes les autres actions, il est " -"optionnel et sa valeur par défaut est ``None``." -#: library/argparse.rst:993 +#: library/argparse.rst:1067 msgid "default" msgstr "Le paramètre *default*" -#: library/argparse.rst:995 +#: library/argparse.rst:1069 msgid "" "All optional arguments and some positional arguments may be omitted at the " "command line. The ``default`` keyword argument of :meth:`~ArgumentParser." @@ -1207,7 +1386,7 @@ msgstr "" "commande. Pour les arguments optionnels, la valeur de ``default`` est " "utilisée si la chaîne d'option n'est pas présente sur la ligne de commande ::" -#: library/argparse.rst:1009 +#: library/argparse.rst:1083 msgid "" "If the target namespace already has an attribute set, the action *default* " "will not over write it::" @@ -1215,7 +1394,7 @@ msgstr "" "Si l'objet ``namespace`` cible a déjà un attribut assigné, l'action " "*default* ne l'écrase pas ::" -#: library/argparse.rst:1017 +#: library/argparse.rst:1091 msgid "" "If the ``default`` value is a string, the parser parses the value as if it " "were a command-line argument. In particular, the parser applies any type_ " @@ -1228,7 +1407,7 @@ msgstr "" "est fournie) avant d'affecter l'attribut à l'objet :class:`Namespace` " "renvoyé. Autrement, l'analyseur utilise la valeur telle qu'elle ::" -#: library/argparse.rst:1028 +#: library/argparse.rst:1102 msgid "" "For positional arguments with nargs_ equal to ``?`` or ``*``, the " "``default`` value is used when no command-line argument was present::" @@ -1237,7 +1416,7 @@ msgstr "" "valeur de ``default`` est utilisée quand l'argument est absent de la ligne " "de commande ::" -#: library/argparse.rst:1039 +#: library/argparse.rst:1113 msgid "" "Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if " "the command-line argument was not present::" @@ -1246,11 +1425,11 @@ msgstr "" "à l'objet ``Namespace`` quand l'argument est absent de la ligne de " "commande ::" -#: library/argparse.rst:1051 +#: library/argparse.rst:1127 msgid "type" msgstr "Le paramètre *type*" -#: library/argparse.rst:1053 +#: library/argparse.rst:1129 msgid "" "By default, the parser reads command-line arguments in as simple strings. " "However, quite often the command-line string should instead be interpreted " @@ -1264,16 +1443,16 @@ msgstr "" "`int`. L'argument nommé ``type`` d':meth:`~ArgumentParser.add_argument` nous " "permet de faire les vérifications et les conversions de type nécessaires." -#: library/argparse.rst:1059 +#: library/argparse.rst:1135 msgid "" "If the type_ keyword is used with the default_ keyword, the type converter " "is only applied if the default is a string." msgstr "" "Si l'argument nommé type_ est utilisé en conjonction avec l'argument nommé " -"keyword_, le convertisseur de type n'est appliqué que si la valeur par " +"default_, le convertisseur de type n'est appliqué que si la valeur par " "défaut est une chaîne." -#: library/argparse.rst:1062 +#: library/argparse.rst:1138 msgid "" "The argument to ``type`` can be any callable that accepts a single string. " "If the function raises :exc:`ArgumentTypeError`, :exc:`TypeError`, or :exc:" @@ -1286,18 +1465,18 @@ msgstr "" "d'erreur agréablement formaté est affiché. Aucun autre type d'exception " "n'est géré." -#: library/argparse.rst:1067 +#: library/argparse.rst:1143 msgid "Common built-in types and functions can be used as type converters:" msgstr "" "Les types et les fonctions natives peuvent être utilisés comme " "convertisseurs de types :" -#: library/argparse.rst:1083 +#: library/argparse.rst:1159 msgid "User defined functions can be used as well:" msgstr "" "Des fonctions définies par l'utilisateur peuvent aussi être utilisées :" -#: library/argparse.rst:1095 +#: library/argparse.rst:1171 msgid "" "The :func:`bool` function is not recommended as a type converter. All it " "does is convert empty strings to ``False`` and non-empty strings to " @@ -1307,7 +1486,7 @@ msgstr "" "comportement se limite à convertir les chaînes vides à ``False`` et les " "chaînes non-vides à ``True``. Ce n'est généralement pas le résultat désiré." -#: library/argparse.rst:1099 +#: library/argparse.rst:1175 msgid "" "In general, the ``type`` keyword is a convenience that should only be used " "for simple conversions that can only raise one of the three supported " @@ -1320,10 +1499,10 @@ msgstr "" "d'erreurs plus intéressant ou une gestion de ressources devraient être " "effectuées plus tard dans l’exécution suite à l'analyse des arguments." -#: library/argparse.rst:1104 +#: library/argparse.rst:1180 msgid "" "For example, JSON or YAML conversions have complex error cases that require " -"better reporting than can be given by the ``type`` keyword. An :exc:`~json." +"better reporting than can be given by the ``type`` keyword. A :exc:`~json." "JSONDecodeError` would not be well formatted and a :exc:`FileNotFound` " "exception would not be handled at all." msgstr "" @@ -1333,7 +1512,7 @@ msgstr "" "JSONDecodeError` ne serait pas adéquatement formatée et une exception :exc:" "`FileNotFound` ne serait pas du tout traitée." -#: library/argparse.rst:1109 +#: library/argparse.rst:1185 msgid "" "Even :class:`~argparse.FileType` has its limitations for use with the " "``type`` keyword. If one argument uses *FileType* and then a subsequent " @@ -1348,7 +1527,7 @@ msgstr "" "fin de l'exécution de l'analyseur puis de gérer les fichiers à l'aide d'un " "bloc :keyword:`with`." -#: library/argparse.rst:1115 +#: library/argparse.rst:1191 msgid "" "For type checkers that simply check against a fixed set of values, consider " "using the choices_ keyword instead." @@ -1356,11 +1535,11 @@ msgstr "" "Pour les vérificateurs de types qui ne font que tester l'appartenance à un " "ensemble de valeurs, pensez plutôt à utiliser l'argument nommé choices_." -#: library/argparse.rst:1120 +#: library/argparse.rst:1198 msgid "choices" msgstr "Le paramètre *choices*" -#: library/argparse.rst:1122 +#: library/argparse.rst:1200 msgid "" "Some command-line arguments should be selected from a restricted set of " "values. These can be handled by passing a container object as the *choices* " @@ -1375,7 +1554,7 @@ msgstr "" "l'argument sont comparées et un message d'erreur est affiché si l'argument " "n'est pas parmi les valeurs acceptables ::" -#: library/argparse.rst:1137 +#: library/argparse.rst:1215 msgid "" "Note that inclusion in the *choices* container is checked after any type_ " "conversions have been performed, so the type of the objects in the *choices* " @@ -1385,7 +1564,7 @@ msgstr "" "la conversion de type_. Le type des objets dans le conteneur *choices* " "doivent donc correspondre au type_ spécifié ::" -#: library/argparse.rst:1149 +#: library/argparse.rst:1227 msgid "" "Any container can be passed as the *choices* value, so :class:`list` " "objects, :class:`set` objects, and custom containers are all supported." @@ -1394,7 +1573,7 @@ msgstr "" "les objets :class:`list`, les objets :class:`set` et les conteneurs " "personnalisés sont tous acceptés." -#: library/argparse.rst:1152 +#: library/argparse.rst:1230 msgid "" "Use of :class:`enum.Enum` is not recommended because it is difficult to " "control its appearance in usage, help, and error messages." @@ -1402,9 +1581,10 @@ msgstr "" "L'utilisation d':class:`enum.Enum` est déconseillée, car il est difficile de " "contrôler son apparence dans les messages d'usage, d'aide et d'erreur." -#: library/argparse.rst:1155 +#: library/argparse.rst:1233 +#, fuzzy msgid "" -"Formatted choices overrides the default *metavar* which is normally derived " +"Formatted choices override the default *metavar* which is normally derived " "from *dest*. This is usually what you want because the user never sees the " "*dest* parameter. If this display isn't desirable (perhaps because there " "are many choices), just specify an explicit metavar_." @@ -1415,11 +1595,11 @@ msgstr "" "pas souhaité (comme lorsque les choix sont nombreux) spécifiez simplement " "metavar_ de façon explicite." -#: library/argparse.rst:1162 +#: library/argparse.rst:1242 msgid "required" msgstr "Le paramètre *required*" -#: library/argparse.rst:1164 +#: library/argparse.rst:1244 msgid "" "In general, the :mod:`argparse` module assumes that flags like ``-f`` and " "``--bar`` indicate *optional* arguments, which can always be omitted at the " @@ -1432,7 +1612,7 @@ msgstr "" "*obligatoire*, ``True`` peut être passé à l'argument nommé ``required=`` d':" "meth:`~ArgumentParser.add_argument` ::" -#: library/argparse.rst:1177 +#: library/argparse.rst:1257 msgid "" "As the example shows, if an option is marked as ``required``, :meth:" "`~ArgumentParser.parse_args` will report an error if that option is not " @@ -1442,7 +1622,7 @@ msgstr "" "``required``, :meth:`~ArgumentParser.parse_args` mentionne une erreur si " "l'option est absente de la ligne de commande." -#: library/argparse.rst:1183 +#: library/argparse.rst:1263 msgid "" "Required options are generally considered bad form because users expect " "*options* to be *optional*, and thus they should be avoided when possible." @@ -1451,11 +1631,11 @@ msgstr "" "utilisateurs s'attendent que les *options* soient *optionnelles*. Elles " "devraient donc être évitées si possible." -#: library/argparse.rst:1188 +#: library/argparse.rst:1270 msgid "help" msgstr "Le paramètre *help*" -#: library/argparse.rst:1190 +#: library/argparse.rst:1272 msgid "" "The ``help`` value is a string containing a brief description of the " "argument. When a user requests help (usually by using ``-h`` or ``--help`` " @@ -1467,7 +1647,7 @@ msgstr "" "l'utilisation de ``-h`` ou ``--help`` sur la ligne de commande), ces " "descriptions d'aide seront affichées pour chacun des arguments ::" -#: library/argparse.rst:1210 +#: library/argparse.rst:1292 msgid "" "The ``help`` strings can include various format specifiers to avoid " "repetition of things like the program name or the argument default_. The " @@ -1482,7 +1662,7 @@ msgstr "" "plupart des arguments nommés d':meth:`~ArgumentParser.add_argument`, tels " "que ``%(default)s``, ``%(type)s``, etc. ::" -#: library/argparse.rst:1227 +#: library/argparse.rst:1309 msgid "" "As the help string supports %-formatting, if you want a literal ``%`` to " "appear in the help string, you must escape it as ``%%``." @@ -1491,7 +1671,7 @@ msgstr "" "désirez afficher un ``%`` littéral dans la chaîne d'aide, vous devez en " "faire l’échappement avec ``%%``." -#: library/argparse.rst:1230 +#: library/argparse.rst:1312 msgid "" ":mod:`argparse` supports silencing the help entry for certain options, by " "setting the ``help`` value to ``argparse.SUPPRESS``::" @@ -1499,11 +1679,11 @@ msgstr "" ":mod:`argparse` peut supprimer la rubrique d'aide de certaines options. Pour " "ce faire, passez ``argparse.SUPPRESS`` à ``help`` ::" -#: library/argparse.rst:1243 +#: library/argparse.rst:1327 msgid "metavar" msgstr "Le paramètre *metavar*" -#: library/argparse.rst:1245 +#: library/argparse.rst:1329 msgid "" "When :class:`ArgumentParser` generates help messages, it needs some way to " "refer to each expected argument. By default, ArgumentParser objects use the " @@ -1524,11 +1704,11 @@ msgstr "" "positionnel unique ``--foo`` qui prend un seul argument sur la ligne de " "commande sera affiché comme ``FOO``. Par exemple ::" -#: library/argparse.rst:1269 +#: library/argparse.rst:1353 msgid "An alternative name can be specified with ``metavar``::" msgstr "Un nom alternatif peut être fourni à ``metavar`` ::" -#: library/argparse.rst:1286 +#: library/argparse.rst:1370 msgid "" "Note that ``metavar`` only changes the *displayed* name - the name of the " "attribute on the :meth:`~ArgumentParser.parse_args` object is still " @@ -1538,7 +1718,7 @@ msgstr "" "l'attribut ajouté à l'objet renvoyé par :meth:`~ArgumentParser.parse_args` " "est toujours déterminé par la valeur de dest_." -#: library/argparse.rst:1290 +#: library/argparse.rst:1374 msgid "" "Different values of ``nargs`` may cause the metavar to be used multiple " "times. Providing a tuple to ``metavar`` specifies a different display for " @@ -1548,11 +1728,11 @@ msgstr "" "plus d'une fois. Passer un *n-uplet* à ``metavar`` indique les différents " "noms à afficher pour chacun des arguments ::" -#: library/argparse.rst:1307 +#: library/argparse.rst:1393 msgid "dest" msgstr "Le paramètre *dest*" -#: library/argparse.rst:1309 +#: library/argparse.rst:1395 msgid "" "Most :class:`ArgumentParser` actions add some value as an attribute of the " "object returned by :meth:`~ArgumentParser.parse_args`. The name of this " @@ -1568,7 +1748,7 @@ msgstr "" "est généralement le premier argument d':meth:`~ArgumentParser." "add_argument` ::" -#: library/argparse.rst:1321 +#: library/argparse.rst:1407 msgid "" "For optional argument actions, the value of ``dest`` is normally inferred " "from the option strings. :class:`ArgumentParser` generates the value of " @@ -1588,15 +1768,15 @@ msgstr "" "s'assurer que la chaîne est un nom d'attribut valide. Les exemples suivants " "illustrent ce comportement ::" -#: library/argparse.rst:1338 +#: library/argparse.rst:1424 msgid "``dest`` allows a custom attribute name to be provided::" msgstr "``dest`` vous permet de fournir un nom d'attribut personnalisé ::" -#: library/argparse.rst:1346 +#: library/argparse.rst:1432 msgid "Action classes" msgstr "Classes Action" -#: library/argparse.rst:1348 +#: library/argparse.rst:1434 msgid "" "Action classes implement the Action API, a callable which returns a callable " "which processes arguments from the command-line. Any object which follows " @@ -1607,7 +1787,7 @@ msgstr "" "qui suit cette API peut être passé comme paramètre ``action`` d':meth:" "`add_argument`." -#: library/argparse.rst:1357 +#: library/argparse.rst:1443 msgid "" "Action objects are used by an ArgumentParser to represent the information " "needed to parse a single argument from one or more strings from the command " @@ -1621,7 +1801,7 @@ msgstr "" "doit accepter les deux arguments positionnels d':meth:`ArgumentParser." "add_argument` ainsi que tous ses arguments nommés, sauf ``action``." -#: library/argparse.rst:1363 +#: library/argparse.rst:1449 msgid "" "Instances of Action (or return value of any callable to the ``action`` " "parameter) should have attributes \"dest\", \"option_strings\", \"default\", " @@ -1634,7 +1814,7 @@ msgstr "" "plus simple de s'assurer que ces attributs sont définis est d'appeler " "``Action.__init__``." -#: library/argparse.rst:1368 +#: library/argparse.rst:1454 msgid "" "Action instances should be callable, so subclasses must override the " "``__call__`` method, which should accept four parameters:" @@ -1643,11 +1823,11 @@ msgstr "" "doivent surcharger la méthode ``__call__``. Cette méthode doit accepter " "quatre paramètres :" -#: library/argparse.rst:1371 +#: library/argparse.rst:1457 msgid "``parser`` - The ArgumentParser object which contains this action." msgstr "``parser`` – L'objet ``ArgumentParser`` qui contient cette action ;" -#: library/argparse.rst:1373 +#: library/argparse.rst:1459 msgid "" "``namespace`` - The :class:`Namespace` object that will be returned by :meth:" "`~ArgumentParser.parse_args`. Most actions add an attribute to this object " @@ -1657,7 +1837,7 @@ msgstr "" "`~ArgumentParser.parse_args`. La majorité des actions ajoutent un attribut à " "cet objet avec :func:`setattr` ;" -#: library/argparse.rst:1377 +#: library/argparse.rst:1463 msgid "" "``values`` - The associated command-line arguments, with any type " "conversions applied. Type conversions are specified with the type_ keyword " @@ -1668,7 +1848,7 @@ msgstr "" "spécifiées grâce à l’argument nommé type_ d':meth:`~ArgumentParser." "add_argument` ;" -#: library/argparse.rst:1381 +#: library/argparse.rst:1467 msgid "" "``option_string`` - The option string that was used to invoke this action. " "The ``option_string`` argument is optional, and will be absent if the action " @@ -1678,7 +1858,7 @@ msgstr "" "L'argument ``option_string`` est optionnel et est absent si l'action est " "associée à un argument positionnel." -#: library/argparse.rst:1385 +#: library/argparse.rst:1471 msgid "" "The ``__call__`` method may perform arbitrary actions, but will typically " "set attributes on the ``namespace`` based on ``dest`` and ``values``." @@ -1687,7 +1867,7 @@ msgstr "" "général elle affecte des attributs sur le ``namespace`` en fonction de " "``dest`` et de ``values``." -#: library/argparse.rst:1388 +#: library/argparse.rst:1474 msgid "" "Action subclasses can define a ``format_usage`` method that takes no " "argument and return a string which will be used when printing the usage of " @@ -1698,11 +1878,11 @@ msgstr "" "utilisée lors de l'affichage du message d'utilisation du programme. Si cette " "méthode n'est pas fournie, une valeur raisonnable est utilisée par défaut." -#: library/argparse.rst:1393 +#: library/argparse.rst:1479 msgid "The parse_args() method" msgstr "La méthode *parse_args()*" -#: library/argparse.rst:1397 +#: library/argparse.rst:1483 msgid "" "Convert argument strings to objects and assign them as attributes of the " "namespace. Return the populated namespace." @@ -1710,7 +1890,7 @@ msgstr "" "Convertie les chaînes d'arguments en objets et les assigne comme attributs " "de l'objet ``namespace``. Retourne l'objet ``namespace`` rempli." -#: library/argparse.rst:1400 +#: library/argparse.rst:1486 msgid "" "Previous calls to :meth:`add_argument` determine exactly what objects are " "created and how they are assigned. See the documentation for :meth:" @@ -1720,7 +1900,7 @@ msgstr "" "quels objets sont créés et comment ils sont affectés. Consultez la rubrique " "d':meth:`add_argument` pour les détails." -#: library/argparse.rst:1404 +#: library/argparse.rst:1490 msgid "" "args_ - List of strings to parse. The default is taken from :data:`sys." "argv`." @@ -1728,7 +1908,7 @@ msgstr "" "args_ – Liste de chaînes à analyser. La valeur par défaut est récupérée " "dans : :data:`sys.argv`." -#: library/argparse.rst:1407 +#: library/argparse.rst:1493 msgid "" "namespace_ - An object to take the attributes. The default is a new empty :" "class:`Namespace` object." @@ -1736,11 +1916,11 @@ msgstr "" "namespace_ – Un objet pour recevoir les attributs. Par défaut : une nouvelle " "instance (vide) de :class:`Namespace`." -#: library/argparse.rst:1412 +#: library/argparse.rst:1498 msgid "Option value syntax" msgstr "Syntaxe de la valeur des options" -#: library/argparse.rst:1414 +#: library/argparse.rst:1500 msgid "" "The :meth:`~ArgumentParser.parse_args` method supports several ways of " "specifying the value of an option (if it takes one). In the simplest case, " @@ -1751,7 +1931,7 @@ msgstr "" "simple, l'option et sa valeur sont passées en tant que deux arguments " "distincts ::" -#: library/argparse.rst:1426 +#: library/argparse.rst:1512 msgid "" "For long options (options with names longer than a single character), the " "option and value can also be passed as a single command-line argument, using " @@ -1761,7 +1941,7 @@ msgstr "" "caractère), l'option et sa valeur peuvent être passées comme un seul " "argument de la ligne de commande en utilisant ``=`` comme séparateur ::" -#: library/argparse.rst:1433 +#: library/argparse.rst:1519 msgid "" "For short options (options only one character long), the option and its " "value can be concatenated::" @@ -1769,7 +1949,7 @@ msgstr "" "Pour les options courtes (les options qui utilisent un seul caractère), " "l'option et sa valeur peuvent être concaténées ::" -#: library/argparse.rst:1439 +#: library/argparse.rst:1525 msgid "" "Several short options can be joined together, using only a single ``-`` " "prefix, as long as only the last option (or none of them) requires a value::" @@ -1778,11 +1958,11 @@ msgstr "" "préfixe ``-`` pour autant que seule la dernière (ou aucune) nécessite une " "valeur ::" -#: library/argparse.rst:1451 +#: library/argparse.rst:1537 msgid "Invalid arguments" msgstr "Arguments invalides" -#: library/argparse.rst:1453 +#: library/argparse.rst:1539 msgid "" "While parsing the command line, :meth:`~ArgumentParser.parse_args` checks " "for a variety of errors, including ambiguous options, invalid types, invalid " @@ -1796,11 +1976,11 @@ msgstr "" "elle affiche l'erreur accompagnée du message d'aide puis termine " "l'exécution ::" -#: library/argparse.rst:1479 +#: library/argparse.rst:1565 msgid "Arguments containing ``-``" msgstr "Arguments contenant ``-``" -#: library/argparse.rst:1481 +#: library/argparse.rst:1567 msgid "" "The :meth:`~ArgumentParser.parse_args` method attempts to give errors " "whenever the user has clearly made a mistake, but some situations are " @@ -1821,7 +2001,7 @@ msgstr "" "que l'analyseur ne contient aucune option qui a l'apparence d'un nombre " "négatif ::" -#: library/argparse.rst:1519 +#: library/argparse.rst:1605 msgid "" "If you have positional arguments that must begin with ``-`` and don't look " "like negative numbers, you can insert the pseudo-argument ``'--'`` which " @@ -1833,11 +2013,11 @@ msgstr "" "argument ``'--'`` qui indique à :meth:`~ArgumentParser.parse_args` de " "traiter tout ce qui suit comme un argument positionnel ::" -#: library/argparse.rst:1530 +#: library/argparse.rst:1616 msgid "Argument abbreviations (prefix matching)" msgstr "Arguments abrégés (Par comparaison de leurs préfixes)" -#: library/argparse.rst:1532 +#: library/argparse.rst:1618 msgid "" "The :meth:`~ArgumentParser.parse_args` method :ref:`by default " "` allows long options to be abbreviated to a prefix, if the " @@ -1848,7 +2028,7 @@ msgstr "" "autant que l’abréviation soit non-ambigüe, c'est-à-dire qu'elle ne " "corresponde qu'à une seule option ::" -#: library/argparse.rst:1547 +#: library/argparse.rst:1633 msgid "" "An error is produced for arguments that could produce more than one options. " "This feature can be disabled by setting :ref:`allow_abbrev` to ``False``." @@ -1857,11 +2037,11 @@ msgstr "" "option. Ce comportement peut être désactivé en passant ``False`` à :ref:" "`allow_abbrev`." -#: library/argparse.rst:1553 +#: library/argparse.rst:1639 msgid "Beyond ``sys.argv``" msgstr "Au-delà de ``sys.argv``" -#: library/argparse.rst:1555 +#: library/argparse.rst:1641 msgid "" "Sometimes it may be useful to have an ArgumentParser parse arguments other " "than those of :data:`sys.argv`. This can be accomplished by passing a list " @@ -1874,20 +2054,20 @@ msgstr "" "parse_args`. Cette approche est pratique pour faire des tests depuis " "l'invite de commande ::" -#: library/argparse.rst:1575 +#: library/argparse.rst:1661 msgid "The Namespace object" msgstr "L'objet ``Namespace``" -#: library/argparse.rst:1579 +#: library/argparse.rst:1665 msgid "" "Simple class used by default by :meth:`~ArgumentParser.parse_args` to create " "an object holding attributes and return it." msgstr "" -"Classe rudimentaire qui est utilisé par défaut par :meth:`~ArgumentParser." -"parse_args` pour créer un objet qui stock les attributs. Cet objet est " +"Classe rudimentaire utilisée par défaut par :meth:`~ArgumentParser." +"parse_args` pour créer un objet qui stocke les attributs. Cet objet est " "renvoyé par ``ArgumentParser.parse_args``." -#: library/argparse.rst:1582 +#: library/argparse.rst:1668 msgid "" "This class is deliberately simple, just an :class:`object` subclass with a " "readable string representation. If you prefer to have dict-like view of the " @@ -1898,7 +2078,7 @@ msgstr "" "une vue *dict-compatible*, vous devez utiliser :func:`vars` (un idiome " "Python classique) ::" -#: library/argparse.rst:1592 +#: library/argparse.rst:1678 msgid "" "It may also be useful to have an :class:`ArgumentParser` assign attributes " "to an already existing object, rather than a new :class:`Namespace` object. " @@ -1909,15 +2089,15 @@ msgstr "" "création d'un nouvel objet :class:`Namespace`. Ceci peut être réalisé avec " "l'argument nommé ``namespace=`` ::" -#: library/argparse.rst:1608 +#: library/argparse.rst:1694 msgid "Other utilities" msgstr "Autres outils" -#: library/argparse.rst:1611 +#: library/argparse.rst:1697 msgid "Sub-commands" msgstr "Sous commandes" -#: library/argparse.rst:1618 +#: library/argparse.rst:1704 msgid "" "Many programs split up their functionality into a number of sub-commands, " "for example, the ``svn`` program can invoke sub-commands like ``svn " @@ -1945,11 +2125,11 @@ msgstr "" "constructeur d':class:`ArgumentParser` ; elle renvoie un objet :class:" "`ArgumentParser` qui peut être modifié normalement." -#: library/argparse.rst:1630 +#: library/argparse.rst:1716 msgid "Description of parameters:" msgstr "Description des paramètres :" -#: library/argparse.rst:1632 +#: library/argparse.rst:1718 msgid "" "title - title for the sub-parser group in help output; by default " "\"subcommands\" if description is provided, otherwise uses title for " @@ -1959,7 +2139,7 @@ msgstr "" "défaut : ``\"subcommands\"`` si ``description`` est fournie, sinon utilise " "la valeur de ``title`` de la section sur les arguments positionnels ;" -#: library/argparse.rst:1636 +#: library/argparse.rst:1722 msgid "" "description - description for the sub-parser group in help output, by " "default ``None``" @@ -1969,7 +2149,7 @@ msgstr "" # I think the English version is very misleading here. Even for subcommands, # ``prog`` is only a tiny prefix of the auto generater usage string. -#: library/argparse.rst:1639 +#: library/argparse.rst:1725 msgid "" "prog - usage information that will be displayed with sub-command help, by " "default the name of the program and any positional arguments before the " @@ -1979,7 +2159,7 @@ msgstr "" "commandes ; par défaut : le nom du programme et les arguments positionnels " "qui arrivent avant l'argument de ce sous-analyseur ;" -#: library/argparse.rst:1643 +#: library/argparse.rst:1729 msgid "" "parser_class - class which will be used to create sub-parser instances, by " "default the class of the current parser (e.g. ArgumentParser)" @@ -1988,7 +2168,7 @@ msgstr "" "analyseurs ; par défaut : la classe de l'analyseur courant (par exemple " "``ArgumentParser``) ;" -#: library/argparse.rst:1646 +#: library/argparse.rst:1732 msgid "" "action_ - the basic type of action to be taken when this argument is " "encountered at the command line" @@ -1996,7 +2176,7 @@ msgstr "" "action_ – action à entreprendre quand cet argument est reconnu sur la ligne " "de commande ;" -#: library/argparse.rst:1649 +#: library/argparse.rst:1735 msgid "" "dest_ - name of the attribute under which sub-command name will be stored; " "by default ``None`` and no value is stored" @@ -2004,7 +2184,7 @@ msgstr "" "dest_ – nom de l'attribut sous lequel la sous-commande est stockée ; par " "défaut : ``None`` et aucune valeur n'est stockée ;" -#: library/argparse.rst:1652 +#: library/argparse.rst:1738 msgid "" "required_ - Whether or not a subcommand must be provided, by default " "``False`` (added in 3.7)" @@ -2012,13 +2192,13 @@ msgstr "" "required_ – ``True`` si la sous-commande est obligatoire ; par défaut : " "``False`` (ajouté dans 3.7) ;" -#: library/argparse.rst:1655 +#: library/argparse.rst:1741 msgid "help_ - help for sub-parser group in help output, by default ``None``" msgstr "" "help_ – message d'aide pour le groupe du sous-analyseur dans la sortie " "d'aide ; par défaut : ``None`` ;" -#: library/argparse.rst:1657 +#: library/argparse.rst:1743 msgid "" "metavar_ - string presenting available sub-commands in help; by default it " "is ``None`` and presents sub-commands in form {cmd1, cmd2, ..}" @@ -2027,11 +2207,11 @@ msgstr "" "messages d'aide ; par défaut : ``None``, ce qui entraine la génération d'une " "chaîne suivant le format ``'{cmd1, cmd2, …}'``." -#: library/argparse.rst:1660 +#: library/argparse.rst:1746 msgid "Some example usage::" msgstr "Quelques exemples d'utilisation ::" -#: library/argparse.rst:1681 +#: library/argparse.rst:1767 msgid "" "Note that the object returned by :meth:`parse_args` will only contain " "attributes for the main parser and the subparser that was selected by the " @@ -2048,7 +2228,7 @@ msgstr "" "présents ; quand la commande ``b`` est spécifiée, seuls les attributs " "``foo`` et ``baz`` sont présents." -#: library/argparse.rst:1688 +#: library/argparse.rst:1774 msgid "" "Similarly, when a help message is requested from a subparser, only the help " "for that particular parser will be printed. The help message will not " @@ -2063,7 +2243,7 @@ msgstr "" "d'aide pour chacun des sous-analyseurs grâce à l'argument ``help=`` d':meth:" "`add_parser` tel qu'illustré ci-dessus." -#: library/argparse.rst:1724 +#: library/argparse.rst:1810 msgid "" "The :meth:`add_subparsers` method also supports ``title`` and " "``description`` keyword arguments. When either is present, the subparser's " @@ -2074,7 +2254,7 @@ msgstr "" "sous-analyseur sont affichées dans leur propre groupe dans la sortie d'aide. " "Par exemple ::" -#: library/argparse.rst:1745 +#: library/argparse.rst:1831 msgid "" "Furthermore, ``add_parser`` supports an additional ``aliases`` argument, " "which allows multiple strings to refer to the same subparser. This example, " @@ -2085,7 +2265,7 @@ msgstr "" "L'exemple suivant, à la manière de ``svn``, utilise ``co`` comme une " "abréviation de ``checkout`` ::" -#: library/argparse.rst:1756 +#: library/argparse.rst:1842 msgid "" "One particularly effective way of handling sub-commands is to combine the " "use of the :meth:`add_subparsers` method with calls to :meth:`set_defaults` " @@ -2097,7 +2277,7 @@ msgstr "" "`set_defaults` pour que chaque sous-analyseur sache quelle fonction Python " "doit être exécutée. Par exemple ::" -#: library/argparse.rst:1793 +#: library/argparse.rst:1879 msgid "" "This way, you can let :meth:`parse_args` do the job of calling the " "appropriate function after argument parsing is complete. Associating " @@ -2113,15 +2293,15 @@ msgstr "" "avez besoin de consulter le nom de du sous-analyseur qui a été invoqué, vous " "pouvez utiliser l'argument nommé ``dest`` d':meth:`add_subparsers` ::" -#: library/argparse.rst:1809 +#: library/argparse.rst:1895 msgid "New *required* keyword argument." msgstr "Introduction des arguments nommés obligatoires." -#: library/argparse.rst:1814 +#: library/argparse.rst:1900 msgid "FileType objects" msgstr "Objets ``FileType``" -#: library/argparse.rst:1818 +#: library/argparse.rst:1904 msgid "" "The :class:`FileType` factory creates objects that can be passed to the type " "argument of :meth:`ArgumentParser.add_argument`. Arguments that have :class:" @@ -2136,7 +2316,7 @@ msgstr "" "taille du tampon, encodage et gestion des erreurs (voir la fonction :func:" "`open` pour plus de détails) ::" -#: library/argparse.rst:1830 +#: library/argparse.rst:1916 msgid "" "FileType objects understand the pseudo-argument ``'-'`` and automatically " "convert this into ``sys.stdin`` for readable :class:`FileType` objects and " @@ -2147,15 +2327,15 @@ msgstr "" "`FileType` ouverts en lecture et vers ``sys.stdout`` pour les objets :class:" "`FileType` ouverts en écriture ::" -#: library/argparse.rst:1839 +#: library/argparse.rst:1925 msgid "The *encodings* and *errors* keyword arguments." msgstr "Les arguments nommés ``encodings`` et ``errors``." -#: library/argparse.rst:1844 +#: library/argparse.rst:1930 msgid "Argument groups" msgstr "Groupes d'arguments" -#: library/argparse.rst:1848 +#: library/argparse.rst:1934 msgid "" "By default, :class:`ArgumentParser` groups command-line arguments into " "\"positional arguments\" and \"optional arguments\" when displaying help " @@ -2169,7 +2349,7 @@ msgstr "" "meilleur regroupement conceptuel des arguments, les groupes adéquats peuvent " "être créés avec la méthode :meth:`add_argument_group` ::" -#: library/argparse.rst:1865 +#: library/argparse.rst:1951 msgid "" "The :meth:`add_argument_group` method returns an argument group object which " "has an :meth:`~ArgumentParser.add_argument` method just like a regular :" @@ -2187,7 +2367,7 @@ msgstr "" "d'aide. Afin de personnaliser l'affichage, la méthode :meth:" "`add_argument_group` accepte les arguments ``title`` et ``description`` ::" -#: library/argparse.rst:1891 +#: library/argparse.rst:1977 msgid "" "Note that any arguments not in your user-defined groups will end up back in " "the usual \"positional arguments\" and \"optional arguments\" sections." @@ -2196,11 +2376,19 @@ msgstr "" "affiché dans l'une des sections usuelles *positional arguments* et *optional " "arguments*." -#: library/argparse.rst:1896 +#: library/argparse.rst:1980 +msgid "" +"Calling :meth:`add_argument_group` on an argument group is deprecated. This " +"feature was never supported and does not always work correctly. The function " +"exists on the API by accident through inheritance and will be removed in the " +"future." +msgstr "" + +#: library/argparse.rst:1988 msgid "Mutual exclusion" msgstr "Exclusion mutuelle" -#: library/argparse.rst:1900 +#: library/argparse.rst:1992 msgid "" "Create a mutually exclusive group. :mod:`argparse` will make sure that only " "one of the arguments in the mutually exclusive group was present on the " @@ -2210,7 +2398,7 @@ msgstr "" "qu'au plus un des arguments du groupe mutuellement exclusif est présent sur " "la ligne de commande ::" -#: library/argparse.rst:1916 +#: library/argparse.rst:2008 msgid "" "The :meth:`add_mutually_exclusive_group` method also accepts a *required* " "argument, to indicate that at least one of the mutually exclusive arguments " @@ -2220,7 +2408,7 @@ msgstr "" "``required`` pour indiquer qu'au moins un des arguments mutuellement " "exclusifs est nécessaire ::" -#: library/argparse.rst:1928 +#: library/argparse.rst:2020 msgid "" "Note that currently mutually exclusive argument groups do not support the " "*title* and *description* arguments of :meth:`~ArgumentParser." @@ -2230,11 +2418,19 @@ msgstr "" "n'acceptent pas les arguments ``title`` et ``description`` d':meth:" "`~ArgumentParser.add_argument_group`." -#: library/argparse.rst:1934 +#: library/argparse.rst:2024 +msgid "" +"Calling :meth:`add_argument_group` or :meth:`add_mutually_exclusive_group` " +"on a mutually exclusive group is deprecated. These features were never " +"supported and do not always work correctly. The functions exist on the API " +"by accident through inheritance and will be removed in the future." +msgstr "" + +#: library/argparse.rst:2032 msgid "Parser defaults" msgstr "Valeurs par défaut de l'analyseur" -#: library/argparse.rst:1938 +#: library/argparse.rst:2036 msgid "" "Most of the time, the attributes of the object returned by :meth:" "`parse_args` will be fully determined by inspecting the command-line " @@ -2248,14 +2444,14 @@ msgstr "" "`set_defaults` permet l'ajout d'attributs additionnels qui sont définis sans " "nécessiter l'inspection de la ligne de commande ::" -#: library/argparse.rst:1950 +#: library/argparse.rst:2048 msgid "" "Note that parser-level defaults always override argument-level defaults::" msgstr "" "Prenez note que les valeurs par défaut au niveau de l'analyseur ont " "précédence sur les valeurs par défaut au niveau de l'argument ::" -#: library/argparse.rst:1958 +#: library/argparse.rst:2056 msgid "" "Parser-level defaults can be particularly useful when working with multiple " "parsers. See the :meth:`~ArgumentParser.add_subparsers` method for an " @@ -2265,7 +2461,7 @@ msgstr "" "quand on travaille avec plusieurs analyseurs. Voir la méthode :meth:" "`~ArgumentParser.add_subparsers` pour un exemple de cette utilisation." -#: library/argparse.rst:1964 +#: library/argparse.rst:2062 msgid "" "Get the default value for a namespace attribute, as set by either :meth:" "`~ArgumentParser.add_argument` or by :meth:`~ArgumentParser.set_defaults`::" @@ -2274,11 +2470,11 @@ msgstr "" "qu'il a été défini soit par :meth:`~ArgumentParser.add_argument` ou par :" "meth:`~ArgumentParser.set_defaults` ::" -#: library/argparse.rst:1975 +#: library/argparse.rst:2073 msgid "Printing help" msgstr "Afficher l'aide" -#: library/argparse.rst:1977 +#: library/argparse.rst:2075 msgid "" "In most typical applications, :meth:`~ArgumentParser.parse_args` will take " "care of formatting and printing any usage or error messages. However, " @@ -2288,7 +2484,7 @@ msgstr "" "charge du formatage et de l'affichage des messages d'erreur et " "d'utilisation. Plusieurs méthodes de formatage sont toutefois disponibles :" -#: library/argparse.rst:1983 +#: library/argparse.rst:2081 msgid "" "Print a brief description of how the :class:`ArgumentParser` should be " "invoked on the command line. If *file* is ``None``, :data:`sys.stdout` is " @@ -2298,7 +2494,7 @@ msgstr "" "`ArgumentParser` depuis la ligne de commande. Si ``file`` est ``None``, " "utilise :data:`sys.stdout`." -#: library/argparse.rst:1989 +#: library/argparse.rst:2087 msgid "" "Print a help message, including the program usage and information about the " "arguments registered with the :class:`ArgumentParser`. If *file* is " @@ -2308,7 +2504,7 @@ msgstr "" "l'information sur les arguments répertoriés dans l':class:`ArgumentParser`. " "Si ``file`` est ``None``, utilise :data:`sys.stdout`." -#: library/argparse.rst:1993 +#: library/argparse.rst:2091 msgid "" "There are also variants of these methods that simply return a string instead " "of printing it:" @@ -2316,7 +2512,7 @@ msgstr "" "Des variantes de ces méthodes sont fournies pour renvoyer la chaîne plutôt " "que de l'afficher :" -#: library/argparse.rst:1998 +#: library/argparse.rst:2096 msgid "" "Return a string containing a brief description of how the :class:" "`ArgumentParser` should be invoked on the command line." @@ -2324,7 +2520,7 @@ msgstr "" "Renvoie une chaîne contenant une brève description sur la façon d'invoquer " "l':class:`ArgumentParser` depuis la ligne de commande." -#: library/argparse.rst:2003 +#: library/argparse.rst:2101 msgid "" "Return a string containing a help message, including the program usage and " "information about the arguments registered with the :class:`ArgumentParser`." @@ -2333,11 +2529,11 @@ msgstr "" "informations sur l'utilisation du programme et sur les arguments définis " "dans l':class:`ArgumentParser`." -#: library/argparse.rst:2008 +#: library/argparse.rst:2106 msgid "Partial parsing" msgstr "Analyse partielle" -#: library/argparse.rst:2012 +#: library/argparse.rst:2110 msgid "" "Sometimes a script may only parse a few of the command-line arguments, " "passing the remaining arguments on to another script or program. In these " @@ -2355,7 +2551,7 @@ msgstr "" "sont présents. Au lieu, elle renvoie une paire de valeurs : l'objet " "``Namespace`` rempli et la liste des arguments non-traités." -#: library/argparse.rst:2028 +#: library/argparse.rst:2126 msgid "" ":ref:`Prefix matching ` rules apply to :meth:" "`parse_known_args`. The parser may consume an option even if it's just a " @@ -2367,11 +2563,11 @@ msgstr "" "option même si elle n'est que le préfixe d'une option reconnue plutôt que de " "la laisser dans la liste des arguments non-traités." -#: library/argparse.rst:2035 +#: library/argparse.rst:2133 msgid "Customizing file parsing" msgstr "Personnaliser le *parsing* de fichiers" -#: library/argparse.rst:2039 +#: library/argparse.rst:2137 msgid "" "Arguments that are read from a file (see the *fromfile_prefix_chars* keyword " "argument to the :class:`ArgumentParser` constructor) are read one argument " @@ -2383,7 +2579,7 @@ msgstr "" "un traitement plus élaboré. Voir aussi l'argument nommé " "``fromfile_prefix_chars`` du constructeur d':class:`ArgumentParser`." -#: library/argparse.rst:2044 +#: library/argparse.rst:2142 msgid "" "This method takes a single argument *arg_line* which is a string read from " "the argument file. It returns a list of arguments parsed from this string. " @@ -2395,7 +2591,7 @@ msgstr "" "appelée une fois pour chaque ligne lue du fichier d'arguments. L'ordre est " "préservé." -#: library/argparse.rst:2048 +#: library/argparse.rst:2146 msgid "" "A useful override of this method is one that treats each space-separated " "word as an argument. The following example demonstrates how to do this::" @@ -2404,11 +2600,11 @@ msgstr "" "par des espaces d'être traité comme un argument. L'exemple suivant illustre " "comment réaliser ceci ::" -#: library/argparse.rst:2057 +#: library/argparse.rst:2155 msgid "Exiting methods" msgstr "Méthodes d'interruptions" -#: library/argparse.rst:2061 +#: library/argparse.rst:2159 msgid "" "This method terminates the program, exiting with the specified *status* and, " "if given, it prints a *message* before that. The user can override this " @@ -2419,7 +2615,7 @@ msgstr "" "est affichée avant la fin de l'exécution. Vous pouvez surcharger cette " "méthode pour traiter ces étapes différemment ::" -#: library/argparse.rst:2073 +#: library/argparse.rst:2171 msgid "" "This method prints a usage message including the *message* to the standard " "error and terminates the program with a status code of 2." @@ -2428,11 +2624,11 @@ msgstr "" "``message`` sur la sortie d'erreur standard puis termine l'exécution avec le " "code de fin d'exécution 2." -#: library/argparse.rst:2078 +#: library/argparse.rst:2176 msgid "Intermixed parsing" msgstr "Analyse entremêlée" -#: library/argparse.rst:2083 +#: library/argparse.rst:2181 msgid "" "A number of Unix commands allow the user to intermix optional arguments with " "positional arguments. The :meth:`~ArgumentParser.parse_intermixed_args` " @@ -2444,7 +2640,7 @@ msgstr "" "`~ArgumentParser.parse_intermixed_args` et :meth:`~ArgumentParser." "parse_known_intermixed_args` permettent ce style d'analyse." -#: library/argparse.rst:2088 +#: library/argparse.rst:2186 msgid "" "These parsers do not support all the argparse features, and will raise " "exceptions if unsupported features are used. In particular, subparsers, " @@ -2457,7 +2653,7 @@ msgstr "" "groupes mutuellement exclusifs qui contiennent à la fois des arguments " "optionnels et des arguments positionnels ne sont pas pris en charge." -#: library/argparse.rst:2093 +#: library/argparse.rst:2191 msgid "" "The following example shows the difference between :meth:`~ArgumentParser." "parse_known_args` and :meth:`~ArgumentParser.parse_intermixed_args`: the " @@ -2469,7 +2665,7 @@ msgstr "" "premier renvoie ``['2', '3']`` comme arguments non-traités alors que le " "second capture tous les arguments positionnels dans ``rest`` ::" -#: library/argparse.rst:2108 +#: library/argparse.rst:2206 msgid "" ":meth:`~ArgumentParser.parse_known_intermixed_args` returns a two item tuple " "containing the populated namespace and the list of remaining argument " @@ -2481,14 +2677,14 @@ msgstr "" "non-traités. :meth:`~ArgumentParser.parse_intermixed_args` lève une erreur " "s'il reste des chaînes d'arguments non-traités." -#: library/argparse.rst:2118 +#: library/argparse.rst:2216 msgid "Upgrading optparse code" msgstr "Mettre à jour du code ``optparse``" # Surchargé n'est pas une traduction exact de monkey-patch, mais c'est # probablement permission içi puisqu'on parle du context historique général # plutôt que de détails d'implantation. -#: library/argparse.rst:2120 +#: library/argparse.rst:2218 msgid "" "Originally, the :mod:`argparse` module had attempted to maintain " "compatibility with :mod:`optparse`. However, :mod:`optparse` was difficult " @@ -2505,7 +2701,7 @@ msgstr "" "d'utilisation améliorés. Après avoir porté ou surchargé tout le code d':mod:" "`optparse`, la rétro-compatibilité pouvait difficilement être conservée." -#: library/argparse.rst:2127 +#: library/argparse.rst:2225 msgid "" "The :mod:`argparse` module improves on the standard library :mod:`optparse` " "module in a number of ways including:" @@ -2513,38 +2709,38 @@ msgstr "" "Le module :mod:`argparse` fournit plusieurs améliorations par rapport au " "module :mod:`optparse` de la bibliothèque standard :" -#: library/argparse.rst:2130 +#: library/argparse.rst:2228 msgid "Handling positional arguments." msgstr "Gère les arguments positionnels ;" -#: library/argparse.rst:2131 +#: library/argparse.rst:2229 msgid "Supporting sub-commands." msgstr "Prise en charge des sous commandes ;" -#: library/argparse.rst:2132 +#: library/argparse.rst:2230 msgid "Allowing alternative option prefixes like ``+`` and ``/``." msgstr "" "Permet d'utiliser les alternatives ``+`` ou ``/`` comme préfixes d'option ;" -#: library/argparse.rst:2133 +#: library/argparse.rst:2231 msgid "Handling zero-or-more and one-or-more style arguments." msgstr "Prend en charge la répétition de valeurs (zéro ou plus, un ou plus) ;" -#: library/argparse.rst:2134 +#: library/argparse.rst:2232 msgid "Producing more informative usage messages." msgstr "Fournit des messages d'aide plus complets ;" -#: library/argparse.rst:2135 +#: library/argparse.rst:2233 msgid "Providing a much simpler interface for custom ``type`` and ``action``." msgstr "" "Fournit une interface plus simple pour les types et les actions " "personnalisés." -#: library/argparse.rst:2137 +#: library/argparse.rst:2235 msgid "A partial upgrade path from :mod:`optparse` to :mod:`argparse`:" msgstr "Le portage partiel d':mod:`optparse` à :mod:`argparse` :" -#: library/argparse.rst:2139 +#: library/argparse.rst:2237 msgid "" "Replace all :meth:`optparse.OptionParser.add_option` calls with :meth:" "`ArgumentParser.add_argument` calls." @@ -2552,7 +2748,7 @@ msgstr "" "Remplacer tous les appels à :meth:`optparse.OptionParser.add_option` par des " "appels à :meth:`ArgumentParser.add_argument` ;" -#: library/argparse.rst:2142 +#: library/argparse.rst:2240 msgid "" "Replace ``(options, args) = parser.parse_args()`` with ``args = parser." "parse_args()`` and add additional :meth:`ArgumentParser.add_argument` calls " @@ -2565,7 +2761,7 @@ msgstr "" "appelées ``options`` sont appelées ``args`` dans le contexte d':mod:" "`argparse` ;" -#: library/argparse.rst:2147 +#: library/argparse.rst:2245 msgid "" "Replace :meth:`optparse.OptionParser.disable_interspersed_args` by using :" "meth:`~ArgumentParser.parse_intermixed_args` instead of :meth:" @@ -2575,7 +2771,7 @@ msgstr "" "appelant :meth:`~ArgumentParser.parse_intermixed_args` plutôt que :meth:" "`~ArgumentParser.parse_args` ;" -#: library/argparse.rst:2151 +#: library/argparse.rst:2249 msgid "" "Replace callback actions and the ``callback_*`` keyword arguments with " "``type`` or ``action`` arguments." @@ -2583,7 +2779,7 @@ msgstr "" "Remplacer les actions de rappel (*callback actions* en anglais) et les " "arguments nommés ``callback_*`` par des arguments ``type`` et ``actions`` ;" -#: library/argparse.rst:2154 +#: library/argparse.rst:2252 msgid "" "Replace string names for ``type`` keyword arguments with the corresponding " "type objects (e.g. int, float, complex, etc)." @@ -2592,7 +2788,7 @@ msgstr "" "``type`` par les objets types correspondants (par exemple : ``int``, " "``float``, ``complex``, etc) ;" -#: library/argparse.rst:2157 +#: library/argparse.rst:2255 msgid "" "Replace :class:`optparse.Values` with :class:`Namespace` and :exc:`optparse." "OptionError` and :exc:`optparse.OptionValueError` with :exc:`ArgumentError`." @@ -2601,7 +2797,7 @@ msgstr "" "`optparse.OptionError` et :exc:`optparse.OptionValueError` par :exc:" "`ArgumentError` ;" -#: library/argparse.rst:2161 +#: library/argparse.rst:2259 msgid "" "Replace strings with implicit arguments such as ``%default`` or ``%prog`` " "with the standard Python syntax to use dictionaries to format strings, that " @@ -2612,7 +2808,7 @@ msgstr "" "l'interpolation d'un dictionnaire dans les chaînes de formatage (c'est-à-" "dire ``%(default)s`` et ``%(prog)s``) ;" -#: library/argparse.rst:2165 +#: library/argparse.rst:2263 msgid "" "Replace the OptionParser constructor ``version`` argument with a call to " "``parser.add_argument('--version', action='version', version='\n" "Language-Team: FRENCH \n" @@ -407,12 +407,16 @@ msgstr "" #: library/array.rst:182 msgid "" "Return the smallest *i* such that *i* is the index of the first occurrence " -"of *x* in the array." +"of *x* in the array. The optional arguments *start* and *stop* can be " +"specified to search for *x* within a subsection of the array. Raise :exc:" +"`ValueError` if *x* is not found." msgstr "" -"Renvoie le plus petit *i* tel que *i* est l'index de la première occurrence " -"de *x* dans le tableau." -#: library/array.rst:188 +#: library/array.rst:187 +msgid "Added optional *start* and *stop* parameters." +msgstr "" + +#: library/array.rst:192 msgid "" "Insert a new item with value *x* in the array before position *i*. Negative " "values are treated as being relative to the end of the array." @@ -421,7 +425,7 @@ msgstr "" "position *i*. Les valeurs négatives sont traitées relativement à la fin du " "tableau." -#: library/array.rst:194 +#: library/array.rst:198 msgid "" "Removes the item with the index *i* from the array and returns it. The " "optional argument defaults to ``-1``, so that by default the last item is " @@ -431,15 +435,15 @@ msgstr "" "optionnel par défaut est à ``-1``, de sorte que par défaut le dernier " "élément est supprimé et renvoyé." -#: library/array.rst:201 +#: library/array.rst:205 msgid "Remove the first occurrence of *x* from the array." msgstr "Supprime la première occurrence de *x* du tableau." -#: library/array.rst:206 +#: library/array.rst:210 msgid "Reverse the order of the items in the array." msgstr "Inverse l'ordre des éléments du tableau." -#: library/array.rst:211 +#: library/array.rst:215 msgid "" "Convert the array to an array of machine values and return the bytes " "representation (the same sequence of bytes that would be written to a file " @@ -449,22 +453,22 @@ msgstr "" "représentation en octets (la même séquence d'octets qui serait écrite par la " "méthode :meth:`tofile`)." -#: library/array.rst:215 +#: library/array.rst:219 msgid ":meth:`tostring` is renamed to :meth:`tobytes` for clarity." msgstr "" ":meth:`tostring` est renommé en :meth:`tobytes` pour plus de lisibilité." -#: library/array.rst:221 +#: library/array.rst:225 msgid "Write all items (as machine values) to the :term:`file object` *f*." msgstr "" "Écrit tous les éléments (en tant que valeurs machine) du :term:`file object` " "*f*." -#: library/array.rst:226 +#: library/array.rst:230 msgid "Convert the array to an ordinary list with the same items." msgstr "Convertit le tableau en une liste ordinaire avec les mêmes éléments." -#: library/array.rst:231 +#: library/array.rst:235 msgid "" "Convert the array to a unicode string. The array must be a type ``'u'`` " "array; otherwise a :exc:`ValueError` is raised. Use ``array.tobytes()." @@ -475,7 +479,7 @@ msgstr "" "tobytes().decode(enc)`` pour obtenir une chaîne Unicode depuis un tableau de " "tout autre type." -#: library/array.rst:236 +#: library/array.rst:240 msgid "" "When an array object is printed or converted to a string, it is represented " "as ``array(typecode, initializer)``. The *initializer* is omitted if the " @@ -493,19 +497,19 @@ msgstr "" "func:`eval`, tant que la classe :class:`~array.array` a été importée en " "utilisant ``from array import array``. Exemples ::" -#: library/array.rst:253 +#: library/array.rst:257 msgid "Module :mod:`struct`" msgstr "Module :mod:`struct`" -#: library/array.rst:253 +#: library/array.rst:257 msgid "Packing and unpacking of heterogeneous binary data." msgstr "Empaquetage et dépaquetage de données binaires hétérogènes." -#: library/array.rst:257 +#: library/array.rst:261 msgid "Module :mod:`xdrlib`" msgstr "Module :mod:`xdrlib`" -#: library/array.rst:256 +#: library/array.rst:260 msgid "" "Packing and unpacking of External Data Representation (XDR) data as used in " "some remote procedure call systems." @@ -514,17 +518,31 @@ msgstr "" "telles qu'elles sont utilisées dans certains systèmes d'appels de procédures " "à distance (ou RPC pour *remote procedure call* en anglais)." -#: library/array.rst:260 -msgid "`The Numerical Python Documentation `_" -msgstr "`La documentation de *Numerical Python* `" +#: library/array.rst:263 +msgid "`NumPy `_" +msgstr "" -#: library/array.rst:260 -msgid "" -"The Numeric Python extension (NumPy) defines another array type; see http://" -"www.numpy.org/ for further information about Numerical Python." +#: library/array.rst:264 +msgid "The NumPy package defines another array type." msgstr "" -"L'extension *Numeric Python* (NumPy) définit un autre type de tableau ; voir " -"http://www.numpy.org/ pour plus d'informations sur *Numeric Python*." + +#~ msgid "" +#~ "Return the smallest *i* such that *i* is the index of the first " +#~ "occurrence of *x* in the array." +#~ msgstr "" +#~ "Renvoie le plus petit *i* tel que *i* est l'index de la première " +#~ "occurrence de *x* dans le tableau." + +#~ msgid "`The Numerical Python Documentation `_" +#~ msgstr "" +#~ "`La documentation de *Numerical Python* `" + +#~ msgid "" +#~ "The Numeric Python extension (NumPy) defines another array type; see " +#~ "http://www.numpy.org/ for further information about Numerical Python." +#~ msgstr "" +#~ "L'extension *Numeric Python* (NumPy) définit un autre type de tableau ; " +#~ "voir http://www.numpy.org/ pour plus d'informations sur *Numeric Python*." #~ msgid "Py_UNICODE" #~ msgstr "Py_UNICODE" diff --git a/library/ast.po b/library/ast.po index 4e95dcd5ac..501edc1aa6 100644 --- a/library/ast.po +++ b/library/ast.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-29 16:33+0200\n" -"PO-Revision-Date: 2018-09-11 07:42+0200\n" -"Last-Translator: Julien VITARD \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2021-09-15 23:54+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.11\n" +"X-Generator: Poedit 2.4.1\n" #: library/ast.rst:2 msgid ":mod:`ast` --- Abstract Syntax Trees" @@ -30,10 +30,11 @@ msgid "" "with each Python release; this module helps to find out programmatically " "what the current grammar looks like." msgstr "" -"Le module :mod:`ast` permet aux applications Python de traiter la grammaire " -"abstraite de l'arbre syntaxique Python. La grammaire abstraite Python elle-" -"même est susceptible d'être modifiée à chaque nouvelle version de Python; ce " -"module permet de trouver à quoi la grammaire actuelle ressemble." +"Le module :mod:`ast` permet aux applications Python de traiter les arbres " +"syntaxiques, dérivés directement de la grammaire abstraite du langage. On " +"peut notamment déterminer dans un programme la forme de chaque élément de " +"grammaire, qui est susceptible d'être modifiée par les nouvelles versions de " +"Python." #: library/ast.rst:23 msgid "" @@ -45,11 +46,11 @@ msgid "" "func:`compile` function." msgstr "" "Un arbre syntaxique abstrait peut être généré en passant l'option :data:`ast." -"PyCF_ONLY_AST` à la fonction native :func:`compile`, ou en utilisant la " -"fonction de facilité :func:`parse` fournie par le module. Le résultat est un " +"PyCF_ONLY_AST` à la fonction native :func:`compile`, ou à l'aide de la " +"fonction auxiliaire :func:`parse` fournie par ce module. Le résultat est un " "arbre composé d'objets dont les classes héritent toutes de :class:`ast.AST`. " -"Un arbre syntaxique abstrait peut être compilé en code objet Python en " -"utilisant la fonction native :func:`compile`." +"On peut compiler les arbres en code objet Python à l'aide de la fonction " +"native :func:`compile`." #: library/ast.rst:33 msgid "Abstract Grammar" @@ -57,11 +58,11 @@ msgstr "Grammaire abstraite" #: library/ast.rst:35 msgid "The abstract grammar is currently defined as follows:" -msgstr "La grammaire abstraite est actuellement définie comme suit :" +msgstr "La grammaire abstraite est actuellement définie comme suit :" #: library/ast.rst:42 msgid "Node classes" -msgstr "Les classes nœud" +msgstr "Classes de nœuds" #: library/ast.rst:46 msgid "" @@ -70,10 +71,11 @@ msgid "" "`below `. They are defined in the :mod:`_ast` C module " "and re-exported in :mod:`ast`." msgstr "" -"C'est la classe de base de toute classe nœud de l'AST. Les classes nœud " -"courantes sont dérivées du fichier :file:`Parser/Python.asdl`, qui est " -"reproduit :ref:`ci-dessous `. Ils sont définis dans le " -"module C :mod:`_ast` et ré-exportés dans le module :mod:`ast`." +"C'est la classe de base de toute classe de nœuds des d'arbres syntaxiques " +"abstraits. Les classes de nœuds elle-mêmes sont dérivées du fichier :file:" +"`Parser/Python.asdl`, qui est reproduit :ref:`ci-dessous `. Elles sont définies dans le module C :mod:`_ast` et ré-exportées " +"dans le module :mod:`ast`." #: library/ast.rst:51 msgid "" @@ -86,13 +88,13 @@ msgid "" "abstract: only instances of specific constructor nodes are ever created." msgstr "" "Il y a une classe définie pour chacun des symboles présents à gauche dans la " -"grammaire abstraite (par exemple, :class:`ast.stmt` ou :class:`ast.expr`). " -"En plus de cela, il y a une classe définie pour chacun des constructeurs " -"présentés à droite; ces classes héritent des classes situées à gauche dans " +"grammaire abstraite (par exemple :class:`ast.stmt` ou :class:`ast.expr`). En " +"plus de cela, une classe est définie pour chacun des constructeurs présentés " +"à droite ; ces classes héritent des classes situées à leur gauche dans " "l'arbre. Par exemple, la classe :class:`ast.BinOp` hérite de la classe :" -"class:`ast.expr`. Pour les règles de réécriture avec alternatives (comme " -"*sums*), la partie gauche est abstraite : seules les instances des " -"constructeurs spécifiques aux nœuds sont créés." +"class:`ast.expr`. Pour les règles de réécriture avec alternatives (les " +"« sommes »), la classe de la partie gauche est abstraite : seules les " +"classes de nœuds à droite sont instanciées." #: library/ast.rst:64 msgid "" @@ -120,12 +122,12 @@ msgid "" "lists. All possible attributes must be present and have valid values when " "compiling an AST with :func:`compile`." msgstr "" -"Si ces attributs sont marqués comme optionnels dans la grammaire (en " -"utilisant un point d'interrogation ``?``), la valeur peut être ``None``. Si " -"les attributs peuvent avoir zéro ou plus valeurs (marqués avec un astérisque " -"``*``), les valeurs sont représentées par des listes Python. Tous les " -"attributs possibles doivent être présents et avoir une valeur valide pour " -"compiler un AST avec :func:`compile`." +"Si un attribut est marqué comme optionnel dans la grammaire (avec un point " +"d'interrogation ``?``), sa valeur peut être ``None``. S'il peut avoir zéro, " +"une ou plusieurs valeurs (ce qui est marqué par un astérisque ``*``), elles " +"sont regroupées dans une liste Python. Tous les attributs possibles doivent " +"être présents et avoir une valeur valide pour compiler un arbre syntaxique " +"avec :func:`compile`." #: library/ast.rst:82 #, fuzzy @@ -133,19 +135,21 @@ msgid "" "Instances of :class:`ast.expr` and :class:`ast.stmt` subclasses have :attr:" "`lineno`, :attr:`col_offset`, :attr:`end_lineno`, and :attr:`end_col_offset` " "attributes. The :attr:`lineno` and :attr:`end_lineno` are the first and " -"last line numbers of the source text span (1-indexed so the first line is " -"line 1), and the :attr:`col_offset` and :attr:`end_col_offset` are the " +"last line numbers of source text span (1-indexed so the first line is line " +"1) and the :attr:`col_offset` and :attr:`end_col_offset` are the " "corresponding UTF-8 byte offsets of the first and last tokens that generated " "the node. The UTF-8 offset is recorded because the parser uses UTF-8 " "internally." msgstr "" -"Les instances des sous-classes :class:`ast.expr` et :class:`ast.stmt` " -"possèdent les attributs :attr:`lineno` et :attr:`col_offset`. L'attribut :" -"attr:`lineno` est le numéro de ligne dans le code source (indexé à partir de " -"1 tel que la première ligne est la ligne 1) et l'attribut :attr:`col_offset` " -"qui représente le décalage UTF-8 en byte du premier jeton qui a généré le " -"nœud. Le décalage UTF-8 est enregistré parce que l'analyseur syntaxique " -"utilise l'UTF-8 en interne." +"Les instances des sous-classes de :class:`ast.expr` et :class:`ast.stmt` " +"possèdent les attributs :attr:`lineno`, :attr:`col_offset`, :attr:" +"`end_lineno` et :attr:`end_col_offset`. Les attributs :attr:`lineno` et :" +"attr:`end_lineno` sont les numéros de ligne de début et de fin dans le code " +"source (indexés à partir de 1, la première ligne est la ligne 1). Les " +"attributs :attr:`col_offset` et :attr:`end_col_offset` représentent quant à " +"eux les décalages respectifs, en octets au format UTF-8, du premier et du " +"dernier lexème qui ont généré le nœud. Les décalages sont exprimés en octets " +"au format UTF-8 parce que l'analyseur syntaxique utilise l'UTF-8 en interne." #: library/ast.rst:91 msgid "" @@ -154,13 +158,17 @@ msgid "" "one can get the source segment of a one-line expression node using " "``source_line[node.col_offset : node.end_col_offset]``." msgstr "" +"Les décalages *end…* ne sont pas obligatoires ni nécessaires au compilateur. " +"*end_col_offset* pointe *après* le dernier lexème. On peut donc obtenir la " +"partie du code source ayant donné lieu à une expression avec " +"``ligne_source[nœud.col_offset : nœud.end_col_offset]``." #: library/ast.rst:96 msgid "" "The constructor of a class :class:`ast.T` parses its arguments as follows:" msgstr "" -"Le constructeur d'une classe :class:`ast.T` analyse ses arguments comme " -"suit :" +"Le constructeur d'une classe nommée :class:`ast.T` analyse ses arguments " +"comme suit :" #: library/ast.rst:98 msgid "" @@ -168,7 +176,7 @@ msgid "" "in :attr:`T._fields`; they will be assigned as attributes of these names." msgstr "" "S'il y a des arguments positionnels, il doit y avoir autant de termes dans :" -"attr:`T._fields`; ils sont assignés comme attributs portant ces noms." +"attr:`T._fields` ; ils sont assignés comme attributs portant ces noms." #: library/ast.rst:100 msgid "" @@ -184,15 +192,17 @@ msgid "" "use ::" msgstr "" "Par exemple, pour créer et peupler un nœud :class:`ast.UnaryOp`, on peut " -"utiliser ::" +"utiliser ::" #: library/ast.rst:115 msgid "or the more compact ::" -msgstr "ou, plus compact ::" +msgstr "ou, plus compact ::" #: library/ast.rst:122 msgid "Class :class:`ast.Constant` is now used for all constants." msgstr "" +"toutes les constantes sont désormais représentées par des instances de :" +"class:`ast.Constant`." #: library/ast.rst:126 msgid "" @@ -207,6 +217,10 @@ msgid "" "will be removed in future Python releases. In the meantime, instantiating " "them will return an instance of a different class." msgstr "" +"les classes :class:`ast.Num`, :class:`ast.Str`, :class:`ast.Bytes`, :class:" +"`ast.NameConstant` et :class:`ast.Ellipsis` sont toujours présentes, mais " +"seront supprimées dans une version future. Pour l'instant, leurs " +"constructeurs renvoient des instances de classes différentes." #: library/ast.rst:138 msgid "" @@ -214,6 +228,9 @@ msgid "" "available, but they will be removed in future Python releases. In the " "meantime, instantiating them will return an instance of a different class." msgstr "" +"les classes :class:`ast.Index` et :class:`ast.ExtSlice` seront retirées à " +"l'avenir. Pour l'instant, elles sont toujours disponibles mais leurs " +"constructeurs renvoient des instances de classes différentes." #: library/ast.rst:144 msgid "" @@ -221,6 +238,10 @@ msgid "" "adapted from the fantastic `Green Tree Snakes `__ project and all its contributors." msgstr "" +"Les descriptions individuelles des classes de nœuds dans la prochaine " +"section sont au départ adaptées du merveilleux projet `Green Tree Snakes " +"`_, porté par de nombreux " +"contributeurs." #: library/ast.rst:150 msgid "Literals" @@ -234,6 +255,10 @@ msgid "" "container types (tuples and frozensets) if all of their elements are " "constant." msgstr "" +"Valeur constante, contenue dans le champ *value*. Les valeurs possibles sont " +"celles de types simples comme les nombres, les chaînes de caractères, ou " +"encore ``None``, mais aussi certains conteneurs immuables (*n*-uplets et " +"ensembles figés) lorsque tous leurs éléments sont constants." #: library/ast.rst:168 msgid "" @@ -241,32 +266,37 @@ msgid "" "contains a single formatting field and nothing else the node can be isolated " "otherwise it appears in :class:`JoinedStr`." msgstr "" +"Champ de formatage dans une chaîne littérale formatée (*f-string*). Ce nœud " +"peut être isolé si la chaîne contient un unique champ et rien d'autre. " +"Sinon, il apparaît dans :class:`JoinedStr`." #: library/ast.rst:172 msgid "" "``value`` is any expression node (such as a literal, a variable, or a " "function call)." msgstr "" +"*value* est un nœud d'expression quelconque (comme un littéral, une " +"variable, ou encore un appel de fonction)." #: library/ast.rst:174 msgid "``conversion`` is an integer:" -msgstr "" +msgstr "*conversion* est un entier parmi les valeurs suivantes :" #: library/ast.rst:176 msgid "-1: no formatting" -msgstr "" +msgstr "-1, aucun formatage ;" #: library/ast.rst:177 msgid "115: ``!s`` string formatting" -msgstr "" +msgstr "115, pour le formatage par ``str()`` correspondant à ``!s`` ;" #: library/ast.rst:178 msgid "114: ``!r`` repr formatting" -msgstr "" +msgstr "114, pour le formatage par ``repr()`` correspondant à ``!r`` ;" #: library/ast.rst:179 msgid "97: ``!a`` ascii formatting" -msgstr "" +msgstr "97, pour le formatage par ``ascii()`` correspondant à ``!a``." #: library/ast.rst:181 msgid "" @@ -274,12 +304,18 @@ msgid "" "the value, or ``None`` if no format was specified. Both ``conversion`` and " "``format_spec`` can be set at the same time." msgstr "" +"*format_spec* est un nœud :class:`JoinedStr` qui précise la manière de " +"formater la valeur. Si aucun formatage particulier n'a été donné, " +"*format_spec* vaut ``None``. *conversion* et *format_spec* peuvent tout à " +"fait coexister." #: library/ast.rst:188 msgid "" "An f-string, comprising a series of :class:`FormattedValue` and :class:" "`Constant` nodes." msgstr "" +"Chaîne littérale formatée (*f-string*), qui contient une liste de nœuds :" +"class:`FormattedValue` et :class:`Constant`." #: library/ast.rst:217 msgid "" @@ -287,10 +323,14 @@ msgid "" "``ctx`` is :class:`Store` if the container is an assignment target (i.e. " "``(x,y)=something``), and :class:`Load` otherwise." msgstr "" +"Liste ou *n*-uplet, dont les éléments sont rassemblés dans la liste *elts*. " +"*ctx* est une instance de :class:`Store` si la liste ou le *n*-uplet est la " +"cible d'une affectation (par exemple ``(x, y) = quelque_chose``). Sinon, " +"c'est une instance de :class:`Load`." #: library/ast.rst:243 msgid "A set. ``elts`` holds a list of nodes representing the set's elements." -msgstr "" +msgstr "Ensemble. *elts* est la liste de ses éléments." #: library/ast.rst:258 msgid "" @@ -298,6 +338,11 @@ msgid "" "keys and the values respectively, in matching order (what would be returned " "when calling :code:`dictionary.keys()` and :code:`dictionary.values()`)." msgstr "" +"Dictionnaire. Les listes *keys* et *values* contiennent respectivement les " +"clés et les valeurs. Leurs ordres se correspondent, c'est-à-dire que la " +"valeur associée à l'élément d'indice *i* dans *keys* est à chercher à " +"l'indice *i* de *values*. *keys* et *values* sont donc des équivalents à " +"``dictionnaire.keys()`` et ``dictionnaire.values()``." #: library/ast.rst:262 msgid "" @@ -305,16 +350,21 @@ msgid "" "be expanded goes in the ``values`` list, with a ``None`` at the " "corresponding position in ``keys``." msgstr "" +"Si un dictionnaire littéral contient une expression doublement étoilée à " +"déballer, elle est intégrée dans *values*, et ``None`` est mis à la place " +"correspondante dans *keys*." #: library/ast.rst:280 msgid "Variables" -msgstr "" +msgstr "Variables" #: library/ast.rst:284 msgid "" "A variable name. ``id`` holds the name as a string, and ``ctx`` is one of " "the following types." msgstr "" +"Variable, dont le nom est *id* (une chaîne de caractères). *ctx* est de l'un " +"des trois types :" #: library/ast.rst:292 msgid "" @@ -322,6 +372,9 @@ msgid "" "new value to it, or to delete it. Variable references are given a context to " "distinguish these cases." msgstr "" +"Ces types de contexte distinguent les variables selon qu'elles sont " +"utilisées pour lire la valeur, mettre la variable à une nouvelle valeur, ou " +"supprimer la variable." #: library/ast.rst:325 msgid "" @@ -329,6 +382,10 @@ msgid "" "class:`Name` node. This type must be used when building a :class:`Call` node " "with ``*args``." msgstr "" +"Élément étoilé. *value* est le nœud auquel s'applique l'étoile. Le plus " +"souvent, *value* est une instance de :class:`Name`. Ce type est notamment " +"nécessaire pour les appels de fonction avec déballage d'arguments (par " +"exemple ``fonction(*args)`` ; voir aussi :class:`Call`)." #: library/ast.rst:348 msgid "Expressions" @@ -342,28 +399,40 @@ msgid "" "`Constant`, a :class:`Name`, a :class:`Lambda`, a :class:`Yield` or :class:" "`YieldFrom` node." msgstr "" +"Lorsque une expression, comme l'appel d'une fonction, apparaît comme une " +"instruction à elle seule, sans que la valeur ne soit utilisée ou " +"sauvegardée, l'expression est insérée dans ce conteneur. Le type de *value* " +"peut être l'un des autres nœuds décrits dans cette section, ou bien parmi :" +"class:`Constant`, :class:`Name`, :class:`Lambda`, :class:`Yield` et :class:" +"`YieldFrom`." #: library/ast.rst:371 msgid "" "A unary operation. ``op`` is the operator, and ``operand`` any expression " "node." msgstr "" +"Unité lexicale désignant une opération unaire. L'opérateur est *op*, " +"l'opérande *operand* est un nœud d'expression quelconque." #: library/ast.rst:380 msgid "" "Unary operator tokens. :class:`Not` is the ``not`` keyword, :class:`Invert` " "is the ``~`` operator." msgstr "" +"Unités lexicales désignant des opérations unaires. :class:`Not` correspond " +"au mot-clé ``not``, :class:`Invert` à l'opérateur ``~``." #: library/ast.rst:394 msgid "" "A binary operation (like addition or division). ``op`` is the operator, and " "``left`` and ``right`` are any expression nodes." msgstr "" +"Opération binaire (comme l'addition ou la division). L'opérateur est *op*, " +"les opérandes *left* et *right* sont des nœuds d'expression quelconques." #: library/ast.rst:421 msgid "Binary operator tokens." -msgstr "" +msgstr "Unités lexicales pour les opérations binaires." #: library/ast.rst:426 msgid "" @@ -372,14 +441,21 @@ msgid "" "operator, such as ``a or b or c``, are collapsed into one node with several " "values." msgstr "" +"Opération booléenne, c'est-à-dire ``and`` ou ``or``, entre *op* et les " +"éléments de *values*. Les deux opérateurs sont distingués par le type de " +"*op*, à savoir :class:`And` ou :class:`Or`. Les applications successives du " +"même opérateur (comme ``a or b or c``) sont regroupées dans un nœud unique " +"avec plusieurs éléments dans la liste *values*." #: library/ast.rst:431 msgid "This doesn't include ``not``, which is a :class:`UnaryOp`." msgstr "" +"L'opérateur ``not`` n'est pas implémenté ici, mais bien dans :class:" +"`UnaryOp`." #: library/ast.rst:447 msgid "Boolean operator tokens." -msgstr "" +msgstr "Unités lexicales pour les opérations booléennes." #: library/ast.rst:452 msgid "" @@ -387,32 +463,45 @@ msgid "" "comparison, ``ops`` the list of operators, and ``comparators`` the list of " "values after the first element in the comparison." msgstr "" +"Comparaison de deux valeurs ou plus. *left* est le premier élément de la " +"comparaison, *ops* la liste des opérateurs, et *comparators* la liste des " +"éléments restants de la comparaison." #: library/ast.rst:481 msgid "Comparison operator tokens." -msgstr "" +msgstr "Unités lexicales pour les comparaisons." #: library/ast.rst:486 msgid "" "A function call. ``func`` is the function, which will often be a :class:" "`Name` or :class:`Attribute` object. Of the arguments:" msgstr "" +"Appel d'une fonction. Le nœud *func*, représentant la fonction appelée, est " +"habituellement de type :class:`Name` ou :class:`Attribute`. Les arguments " +"sont contenus dans :" #: library/ast.rst:489 msgid "``args`` holds a list of the arguments passed by position." msgstr "" +"*args*, la liste des arguments passés sans les nommer (arguments " +"positionnels) ;" #: library/ast.rst:490 msgid "" "``keywords`` holds a list of :class:`keyword` objects representing arguments " "passed by keyword." msgstr "" +"*keywords*, la liste des arguments nommés sous forme de nœuds :class:" +"`keyword`." #: library/ast.rst:493 msgid "" "When creating a ``Call`` node, ``args`` and ``keywords`` are required, but " "they can be empty lists. ``starargs`` and ``kwargs`` are optional." msgstr "" +"Les arguments *args* et *keywords* du constructeur de ``Call`` sont " +"obligatoires (mais peuvent être des listes vides). *starargs* (arguments " +"étoilés) et *kwargs* (arguments nommés) sont facultatifs." #: library/ast.rst:517 msgid "" @@ -425,6 +514,8 @@ msgid "" "An expression such as ``a if b else c``. Each field holds a single node, so " "in the following example, all three are :class:`Name` nodes." msgstr "" +"Expression ternaire (``a if b else c``). Chaque champ contient un unique " +"nœud. Dans l'exemple suivant, les trois sont de la classe :class:`Name`." #: library/ast.rst:538 msgid "" @@ -433,6 +524,10 @@ msgid "" "``ctx`` is :class:`Load`, :class:`Store` or :class:`Del` according to how " "the attribute is acted on." msgstr "" +"Accès à un attribut (comme ``d.keys``). *value* est un nœud, souvent de la " +"classe :class:`Name`. *attr* est le nom de l'attribut, sous forme de chaîne " +"de caractères. *ctx* est de classe :class:`Load`, :class:`Store` ou :class:" +"`Del` selon le type de l'action effectuée sur l'attribut." #: library/ast.rst:555 msgid "" @@ -441,10 +536,14 @@ msgid "" "`Assign` node in which the first argument can be multiple nodes, in this " "case both ``target`` and ``value`` must be single nodes." msgstr "" +"Expression d'affectation. Ces nœuds proviennent de l'opérateur « morse » ``:" +"=``. Contrairement à :class:`Assign`, dont le premier argument est une liste " +"qui peut contenir plusieurs cibles, les arguments *target* et *value* sont " +"ici des nœuds simples." #: library/ast.rst:570 msgid "Subscripting" -msgstr "" +msgstr "Indiçage" #: library/ast.rst:574 msgid "" @@ -453,6 +552,12 @@ msgid "" "class:`Tuple` and contain a :class:`Slice`. ``ctx`` is :class:`Load`, :class:" "`Store` or :class:`Del` according to the action performed with the subscript." msgstr "" +"Accès à un indice, par exemple ``liste[1]``. *value* est l'objet où l'indice " +"est pris, donc la plupart du temps une séquence ou une table associative. " +"*slice* est soit un indice, soit une tranche, soit une clé. Les instances " +"de :class:`Tuple` pour *slice* peuvent contenir des objets :class:`Slice`. " +"*ctx* est de type :class:`Load`, :class:`Store` ou :class:`Del` selon " +"l'action appliquée à l'indice." #: library/ast.rst:598 msgid "" @@ -460,10 +565,14 @@ msgid "" "occur only inside the *slice* field of :class:`Subscript`, either directly " "or as an element of :class:`Tuple`." msgstr "" +"Tranches normales (de la forme ``début:fin`` ou ``début:fin:pas``). Les " +"instances de cette classe ne peuvent apparaître que dans le champ *slice* " +"d'un :class:`Subscript`, que ce soit directement ou en tant qu'élément d'un :" +"class:`Tuple`." #: library/ast.rst:615 msgid "Comprehensions" -msgstr "" +msgstr "Compréhensions" #: library/ast.rst:622 msgid "" @@ -471,10 +580,14 @@ msgid "" "comprehensions. ``elt`` (or ``key`` and ``value``) is a single node " "representing the part that will be evaluated for each item." msgstr "" +"Liste, ensemble ou dictionnaire en compréhension, ou expression génératrice. " +"*elt* est l'expression avant le premier ``for``, évaluée à chaque itération. " +"Il est remplacé par *key* (expression pour la clé) et *value* (expression " +"pour la valeur) dans le cas des dictionnaires." #: library/ast.rst:626 msgid "``generators`` is a list of :class:`comprehension` nodes." -msgstr "" +msgstr "*generators* est une liste de nœuds :class:`comprehension`." #: library/ast.rst:668 msgid "" @@ -483,22 +596,32 @@ msgid "" "``iter`` is the object to iterate over. ``ifs`` is a list of test " "expressions: each ``for`` clause can have multiple ``ifs``." msgstr "" +"Une clause ``for`` à l'intérieur d'une compréhension. *iter* est l'objet à " +"parcourir, *target* est la cible de l'affectation qui se produit à chaque " +"itération (la plupart du temps un nœud :class:`Name` ou :class:`Tuple`). " +"*ifs* contient les tests qui décident si l'élément doit être inséré. C'est " +"une liste, car chaque ``for`` peut être suivi de plusieurs ``if``." #: library/ast.rst:673 msgid "" "``is_async`` indicates a comprehension is asynchronous (using an ``async " "for`` instead of ``for``). The value is an integer (0 or 1)." msgstr "" +"*is_async* est une valeur booléenne sous forme d'entier, 0 ou 1, qui indique " +"si la compréhension est asynchrone, c'est-à-dire qu'elle a été écrite avec " +"``async for`` au lieu de ``for``." #: library/ast.rst:739 msgid "Statements" -msgstr "" +msgstr "Instructions" #: library/ast.rst:743 msgid "" "An assignment. ``targets`` is a list of nodes, and ``value`` is a single " "node." msgstr "" +"Affectation. *targets* est une liste de nœuds, *value* est simplement un " +"nœud." #: library/ast.rst:745 msgid "" @@ -506,11 +629,17 @@ msgid "" "Unpacking is represented by putting a :class:`Tuple` or :class:`List` within " "``targets``." msgstr "" +"S'il y a plusieurs nœuds dans *targets*, ils sont tous pris comme des cibles " +"auxquelles est affectée la même expression. Le déballage de séquences est " +"représenté par des nœuds :class:`Tuple` ou :class:`List` comme éléments de " +"*targets*." -#: library/ast.rst:1038 library/ast.rst:1264 +#: library/ast.rst:1038 library/ast.rst:1663 msgid "" "``type_comment`` is an optional string with the type annotation as a comment." msgstr "" +"Le champ facultatif *type_comment* contient une annotation de type fournie " +"par un commentaire, et ce sous la forme d'une chaîne de caractères." #: library/ast.rst:781 msgid "" @@ -521,6 +650,14 @@ msgid "" "integer set to True for a :class:`Name` node in ``target`` that do not " "appear in between parenthesis and are hence pure names and not expressions." msgstr "" +"Affectation accompagnée d'une annotation de type. La cible *target* est un " +"nœud de type :class:`Name`, :class:`Attribute` ou :class:`Subscript`. " +"*annotation* est le contenu de l'annotation, par exemple un nœud :class:" +"`Constant` ou :class:`Name`. Le champ *value* est facultatif et peut " +"contenir un nœud, la valeur affectée à la cible. *simple* est une valeur " +"booléenne sous forme d'entier, 0 ou 1, qui vaut 1 si et seulement si " +"*target* est de type :class:`Name` et provient d'un nom sans parenthèses, " +"donc un nom simple plutôt qu'une expression." #: library/ast.rst:836 msgid "" @@ -529,12 +666,19 @@ msgid "" "context), ``op`` is :class:`Add`, and ``value`` is a :class:`Constant` with " "value for 1." msgstr "" +"Affectation incrémentale, par exemple ``a += 1``. Dans l'exemple qui suit, " +"*target* est un nœud de type :class:`Name` avec le nom ``'x'`` (de contexte :" +"class:`Store`), *op* est une instance de :class:`Add`, et *value* est un " +"nœud :class:`Constant` contenant la valeur 1." #: library/ast.rst:841 +#, fuzzy msgid "" -"The ``target`` attribute connot be of class :class:`Tuple` or :class:`List`, " +"The ``target`` attribute cannot be of class :class:`Tuple` or :class:`List`, " "unlike the targets of :class:`Assign`." msgstr "" +"Contrairement aux cibles acceptées par :class:`Assign`, le champ *target* ne " +"peut pas être ici de type :class:`Tuple` ou :class:`List`." #: library/ast.rst:858 msgid "" @@ -542,36 +686,50 @@ msgid "" "normally a :class:`Call` or :class:`Name`, or ``None`` for a standalone " "``raise``. ``cause`` is the optional part for ``y`` in ``raise x from y``." msgstr "" +"Instruction ``raise``. *exc* est l'exception à lever, la plupart du temps un " +"nœud de type :class:`Call` ou :class:`Name`. Ce champ vaut ``None`` dans le " +"cas d'un ``raise`` sans rien d'autre. Le champ facultatif *cause* correspond " +"à la partie après le ``from`` dans ``raise ... from ...``." #: library/ast.rst:875 msgid "" "An assertion. ``test`` holds the condition, such as a :class:`Compare` node. " "``msg`` holds the failure message." msgstr "" +"Assertion. *test* est la condition, par exemple un nœud :class:`Compare`. " +"*msg* est le message d'erreur affiché si le test s'évalue comme faux." #: library/ast.rst:891 msgid "" "Represents a ``del`` statement. ``targets`` is a list of nodes, such as :" "class:`Name`, :class:`Attribute` or :class:`Subscript` nodes." msgstr "" +"Instruction ``del``. Les éléments à supprimer sont rassemblés dans la liste " +"*target*. Ce sont généralement des nœuds de type :class:`Name`, :class:" +"`Attribute` ou :class:`Subscript`." #: library/ast.rst:909 msgid "A ``pass`` statement." -msgstr "" +msgstr "Instruction ``pass``." #: library/ast.rst:920 msgid "" "Other statements which are only applicable inside functions or loops are " "described in other sections." msgstr "" +"Il existe d'autres instructions, qui ne peuvent apparaître que dans certains " +"contextes spécifiques comme l'intérieur d'une fonction ou d'une boucle. " +"Elles sont décrites dans d'autres sections de ce document." #: library/ast.rst:924 msgid "Imports" -msgstr "" +msgstr "Importations" #: library/ast.rst:928 msgid "An import statement. ``names`` is a list of :class:`alias` nodes." msgstr "" +"Instruction ``import``. *names* prend la forme d'une liste de nœuds :class:" +"`alias`." #: library/ast.rst:945 msgid "" @@ -580,28 +738,47 @@ msgid "" "import foo``. ``level`` is an integer holding the level of the relative " "import (0 means absolute import)." msgstr "" +"Instruction ``from ... import ...``. La partie après ``from`` est mise dans " +"*module* comme une simple chaîne de caractères. Dans le cas des importations " +"relatives, comme ``from ..module import quelque_chose``, *module* ne " +"contient pas les points au début. Dans les instructions de la forme ``from . " +"import toto``, *module* vaut ``None``. *level* est le niveau d'importation " +"relative sous forme d'entier (0 pour les importations absolues)." #: library/ast.rst:967 msgid "" "Both parameters are raw strings of the names. ``asname`` can be ``None`` if " "the regular name is to be used." msgstr "" +"Correspond à ``... as ...`` dans une importation. *name* et *asname* sont de " +"simples chaînes de caractères, qui correspondent aux deux parties de ``... " +"as ...``. Dans les instructions sans ``as`` (où le module n'est pas " +"renommé), *asname* vaut ``None``." #: library/ast.rst:984 msgid "Control flow" -msgstr "" +msgstr "Contrôle de l'exécution" #: library/ast.rst:987 msgid "" "Optional clauses such as ``else`` are stored as an empty list if they're not " "present." msgstr "" +"Si une clause facultative comme ``else`` est absente, le champ correspondant " +"dans l'arbre est une liste vide." +# Il faut développer un peu plus que l'original car le lecteur ne +# comprend pas forcément les termes « body » et « orelse ». La même +# considération s'applique à bien des descriptions par la suite. #: library/ast.rst:992 msgid "" "An ``if`` statement. ``test`` holds a single node, such as a :class:" "`Compare` node. ``body`` and ``orelse`` each hold a list of nodes." msgstr "" +"Instruction ``if``. La condition, *test*, est un nœud, par exemple une " +"instance de :class:`Compare`. *body* est la liste des instructions du bloc. " +"*orelse* contient les instructions dans le ``else`` (liste vide s'il n'y a " +"pas de ``else``)." #: library/ast.rst:995 msgid "" @@ -609,6 +786,9 @@ msgid "" "appear as extra :class:`If` nodes within the ``orelse`` section of the " "previous one." msgstr "" +"Les clauses ``elif`` ne possèdent pas de représentation particulière. Elles " +"sont simplement mises dans le *orelse* du ``if`` ou ``elif`` précédent, " +"comme nœuds de type :class:`If`." #: library/ast.rst:1030 msgid "" @@ -618,198 +798,412 @@ msgid "" "contain lists of nodes to execute. Those in ``orelse`` are executed if the " "loop finishes normally, rather than via a ``break`` statement." msgstr "" +"Boucle ``for``. Elle porte sur l'itérable donné par le nœud *iter*. La cible " +"des affectations successives est *target*, qui est un nœud de type :class:" +"`Name`, :class:`Tuple` ou :class:`List`. Les instructions du bloc ``for`` " +"forment la liste *body*. Celles de la liste *orelse* proviennent d'une " +"éventuelle clause ``else`` et sont exécutées si la boucle se termine par " +"épuisement de l'itérable, et non pas par un ``break``." #: library/ast.rst:1064 msgid "" "A ``while`` loop. ``test`` holds the condition, such as a :class:`Compare` " "node." msgstr "" +"Boucle ``while``. *test* est la condition évaluée à chaque itération, par " +"exemple un nœud :class:`Compare`. *body* contient les instructions du bloc, " +"et *orelse* celles d'un éventuel bloc ``else``, exécuté lorsque la boucle " +"termine parce que la condition devient fausse et non pas à cause d'une " +"instruction ``break``." #: library/ast.rst:1091 msgid "The ``break`` and ``continue`` statements." -msgstr "" +msgstr "Instructions ``break`` et ``continue``." #: library/ast.rst:1126 msgid "" "``try`` blocks. All attributes are list of nodes to execute, except for " "``handlers``, which is a list of :class:`ExceptHandler` nodes." msgstr "" +"Bloc ``try``. Les nœuds de la liste *body* sont les instructions à exécuter " +"sous contrôle des exceptions. La liste *handlers* contient des nœuds :class:" +"`ExceptHandler`, un par ``except``. Les listes *orelse* et *finalbody* " +"contiennent respectivement les instructions se trouvant dans d'éventuels " +"blocs ``else`` et ``finally``." #: library/ast.rst:1172 msgid "" +"``try`` blocks which are followed by ``except*`` clauses. The attributes are " +"the same as for :class:`Try` but the :class:`ExceptHandler` nodes in " +"``handlers`` are interpreted as ``except*`` blocks rather then ``except``." +msgstr "" + +#: library/ast.rst:1203 +msgid "" "A single ``except`` clause. ``type`` is the exception type it will match, " "typically a :class:`Name` node (or ``None`` for a catch-all ``except:`` " "clause). ``name`` is a raw string for the name to hold the exception, or " "``None`` if the clause doesn't have ``as foo``. ``body`` is a list of nodes." msgstr "" +"Une clause ``except``. Elle intercepte les exceptions de types donnés par " +"*type*, qui est le plus souvent un nœud :class:`Name` ou bien ``None`` " +"(cette dernière valeur pour les clauses fourre-tout ``except:``). Le nom " +"éventuel de la variable à laquelle affecter l'exception est dans la chaîne " +"de caractères *name* (``None`` s'il n'y a pas de ``as``). Les instructions " +"sous le ``except`` sont dans la liste *body*." -#: library/ast.rst:1206 +#: library/ast.rst:1237 msgid "" "A ``with`` block. ``items`` is a list of :class:`withitem` nodes " "representing the context managers, and ``body`` is the indented block inside " "the context." msgstr "" +"Bloc ``with``. Les gestionnaires de contexte sont stockés dans *items* comme " +"instances de :class:`withitem`. Les instructions sous le ``with`` forment la " +"liste *body*." -#: library/ast.rst:1216 +#: library/ast.rst:1247 msgid "" "A single context manager in a ``with`` block. ``context_expr`` is the " "context manager, often a :class:`Call` node. ``optional_vars`` is a :class:" "`Name`, :class:`Tuple` or :class:`List` for the ``as foo`` part, or ``None`` " "if that isn't used." msgstr "" +"Gestionnaire de contexte dans un bloc ``with``. Le gestionnaire est donné " +"par le nœud *context_expr*, souvent une instance de :class:`Call`. S'il y a " +"affectation avec ``as``, *optional_vars* contient sa cible, qui est un nœud " +"de type :class:`Name`, :class:`Tuple` ou :class:`List`. Sinon, " +"*optional_vars* vaut ``None``." -#: library/ast.rst:1249 -msgid "Function and class definitions" +#: library/ast.rst:1280 +msgid "Pattern matching" msgstr "" -#: library/ast.rst:1253 -msgid "A function definition." +#: library/ast.rst:1285 +msgid "" +"A ``match`` statement. ``subject`` holds the subject of the match (the " +"object that is being matched against the cases) and ``cases`` contains an " +"iterable of :class:`match_case` nodes with the different cases." +msgstr "" + +#: library/ast.rst:1291 +msgid "" +"A single case pattern in a ``match`` statement. ``pattern`` contains the " +"match pattern that the subject will be matched against. Note that the :class:" +"`AST` nodes produced for patterns differ from those produced for " +"expressions, even when they share the same syntax." +msgstr "" + +#: library/ast.rst:1296 +msgid "" +"The ``guard`` attribute contains an expression that will be evaluated if the " +"pattern matches the subject." +msgstr "" + +#: library/ast.rst:1299 +msgid "" +"``body`` contains a list of nodes to execute if the pattern matches and the " +"result of evaluating the guard expression is true." +msgstr "" + +#: library/ast.rst:1342 +msgid "" +"A match literal or value pattern that compares by equality. ``value`` is an " +"expression node. Permitted value nodes are restricted as described in the " +"match statement documentation. This pattern succeeds if the match subject is " +"equal to the evaluated value." +msgstr "" + +#: library/ast.rst:1369 +msgid "" +"A match literal pattern that compares by identity. ``value`` is the " +"singleton to be compared against: ``None``, ``True``, or ``False``. This " +"pattern succeeds if the match subject is the given constant." +msgstr "" + +#: library/ast.rst:1394 +msgid "" +"A match sequence pattern. ``patterns`` contains the patterns to be matched " +"against the subject elements if the subject is a sequence. Matches a " +"variable length sequence if one of the subpatterns is a ``MatchStar`` node, " +"otherwise matches a fixed length sequence." +msgstr "" + +#: library/ast.rst:1425 +msgid "" +"Matches the rest of the sequence in a variable length match sequence " +"pattern. If ``name`` is not ``None``, a list containing the remaining " +"sequence elements is bound to that name if the overall sequence pattern is " +"successful." msgstr "" -#: library/ast.rst:1255 +#: library/ast.rst:1465 +msgid "" +"A match mapping pattern. ``keys`` is a sequence of expression nodes. " +"``patterns`` is a corresponding sequence of pattern nodes. ``rest`` is an " +"optional name that can be specified to capture the remaining mapping " +"elements. Permitted key expressions are restricted as described in the match " +"statement documentation." +msgstr "" + +#: library/ast.rst:1471 +msgid "" +"This pattern succeeds if the subject is a mapping, all evaluated key " +"expressions are present in the mapping, and the value corresponding to each " +"key matches the corresponding subpattern. If ``rest`` is not ``None``, a " +"dict containing the remaining mapping elements is bound to that name if the " +"overall mapping pattern is successful." +msgstr "" + +#: library/ast.rst:1511 +msgid "" +"A match class pattern. ``cls`` is an expression giving the nominal class to " +"be matched. ``patterns`` is a sequence of pattern nodes to be matched " +"against the class defined sequence of pattern matching attributes. " +"``kwd_attrs`` is a sequence of additional attributes to be matched " +"(specified as keyword arguments in the class pattern), ``kwd_patterns`` are " +"the corresponding patterns (specified as keyword values in the class " +"pattern)." +msgstr "" + +#: library/ast.rst:1518 +msgid "" +"This pattern succeeds if the subject is an instance of the nominated class, " +"all positional patterns match the corresponding class-defined attributes, " +"and any specified keyword attributes match their corresponding pattern." +msgstr "" + +#: library/ast.rst:1522 +msgid "" +"Note: classes may define a property that returns self in order to match a " +"pattern node against the instance being matched. Several builtin types are " +"also matched that way, as described in the match statement documentation." +msgstr "" + +#: library/ast.rst:1575 +msgid "" +"A match \"as-pattern\", capture pattern or wildcard pattern. ``pattern`` " +"contains the match pattern that the subject will be matched against. If the " +"pattern is ``None``, the node represents a capture pattern (i.e a bare name) " +"and will always succeed." +msgstr "" + +#: library/ast.rst:1580 +msgid "" +"The ``name`` attribute contains the name that will be bound if the pattern " +"is successful. If ``name`` is ``None``, ``pattern`` must also be ``None`` " +"and the node represents the wildcard pattern." +msgstr "" + +#: library/ast.rst:1616 +msgid "" +"A match \"or-pattern\". An or-pattern matches each of its subpatterns in " +"turn to the subject, until one succeeds. The or-pattern is then deemed to " +"succeed. If none of the subpatterns succeed the or-pattern fails. The " +"``patterns`` attribute contains a list of match pattern nodes that will be " +"matched against the subject." +msgstr "" + +#: library/ast.rst:1648 +msgid "Function and class definitions" +msgstr "Définition de fonctions et de classes" + +#: library/ast.rst:1652 +msgid "A function definition." +msgstr "Définition d'une fonction." + +#: library/ast.rst:1654 msgid "``name`` is a raw string of the function name." msgstr "" +"*name* donne le nom de la fonction sous forme d'une chaîne de caractères." -#: library/ast.rst:1256 -msgid "``args`` is a :class:`arguments` node." +#: library/ast.rst:1655 +#, fuzzy +msgid "``args`` is an :class:`arguments` node." msgstr "" +"*args* est un nœud de type :class:`arguments` qui contient les arguments de " +"la signature." -#: library/ast.rst:1257 +#: library/ast.rst:1656 msgid "``body`` is the list of nodes inside the function." -msgstr "" +msgstr "*body* est la liste des instructions dans le corps de la fonction." -#: library/ast.rst:1258 +#: library/ast.rst:1657 msgid "" "``decorator_list`` is the list of decorators to be applied, stored outermost " "first (i.e. the first in the list will be applied last)." msgstr "" +"*decorators_list* est une liste de décorateurs appliqués à la fonction. Ils " +"sont rangés dans leur ordre d'apparition, c'est-à-dire que le premier de la " +"liste est appliqué en dernier." -#: library/ast.rst:1260 +#: library/ast.rst:1659 msgid "``returns`` is the return annotation." -msgstr "" +msgstr "*returns* est l'annotation de renvoi éventuelle." -#: library/ast.rst:1269 +#: library/ast.rst:1668 msgid "" "``lambda`` is a minimal function definition that can be used inside an " "expression. Unlike :class:`FunctionDef`, ``body`` holds a single node." msgstr "" +"Fonction anonyme. Elle est créée avec le mot-clé ``lambda``, limitée à " +"renvoyer une simple expression, et peut être intégrée à une expression plus " +"large. Contrairement à :class:`FunctionDef`, *body* est ici un nœud unique. " +"*args* est une instance de ``arguments`` qui contient les arguments de la " +"signature." -#: library/ast.rst:1293 +#: library/ast.rst:1692 msgid "The arguments for a function." -msgstr "" +msgstr "Arguments d'une fonction." -#: library/ast.rst:1295 +#: library/ast.rst:1694 msgid "" "``posonlyargs``, ``args`` and ``kwonlyargs`` are lists of :class:`arg` nodes." msgstr "" +"*posonlyargs*, *args* et *kwonlyargs* sont des listes de nœuds :class:`arg` " +"qui correspondent respectivement aux arguments obligatoirement positionnels, " +"positionnels ou nommés et obligatoirement nommés." -#: library/ast.rst:1296 +#: library/ast.rst:1695 msgid "" "``vararg`` and ``kwarg`` are single :class:`arg` nodes, referring to the " "``*args, **kwargs`` parameters." msgstr "" +"*varargs* et *kwargs* sont des nœuds :class:`arg` qui apparaissent avec la " +"capture des arguments restants, positionnels (``*arguments_positionnels``) " +"et nommés (``**arguments_nommés``)." -#: library/ast.rst:1298 +#: library/ast.rst:1697 msgid "" "``kw_defaults`` is a list of default values for keyword-only arguments. If " "one is ``None``, the corresponding argument is required." msgstr "" +"*kw_defaults* est la liste des valeurs par défaut pour les arguments " +"obligatoirement nommés. Si l'un des éléments n'est pas un nœud mais " +"``None``, il n'y a pas de valeur par défaut et l'argument correspondant doit " +"être passé obligatoirement à la fonction." -#: library/ast.rst:1300 +#: library/ast.rst:1699 msgid "" "``defaults`` is a list of default values for arguments that can be passed " "positionally. If there are fewer defaults, they correspond to the last n " "arguments." msgstr "" +"*defaults* est, quant à elle, la liste des valeurs par défauts pour les " +"arguments qui peuvent être passés de manière positionnelle (obligatoirement " +"ou non). S'il y a moins d'éléments dans la liste que d'arguments " +"positionnels, ces éléments donnent les valeurs par défaut des *n* derniers " +"arguments positionnels (avec *n* la longueur de *defaults*)." -#: library/ast.rst:1307 +#: library/ast.rst:1706 msgid "" "A single argument in a list. ``arg`` is a raw string of the argument name, " "``annotation`` is its annotation, such as a :class:`Str` or :class:`Name` " "node." msgstr "" -#: library/ast.rst:1313 +#: library/ast.rst:1712 msgid "" "``type_comment`` is an optional string with the type annotation as a comment" msgstr "" +"Le champ facultatif *type_comment* est, sous forme de chaîne, une annotation " +"de type fournie par un commentaire." -#: library/ast.rst:1357 +#: library/ast.rst:1756 msgid "A ``return`` statement." -msgstr "" +msgstr "Instruction ``return``, qui renvoie *value*." -#: library/ast.rst:1372 +#: library/ast.rst:1771 msgid "" "A ``yield`` or ``yield from`` expression. Because these are expressions, " "they must be wrapped in a :class:`Expr` node if the value sent back is not " "used." msgstr "" +"Expression ``yield`` ou ``yield from``. Ce sont bien des expressions, non " +"pas des instructions. Il faut donc les placer dans un nœud :class:`Expr` si " +"la valeur qu'elles renvoient n'est pas utilisée dans une expression plus " +"large." -#: library/ast.rst:1397 +#: library/ast.rst:1796 msgid "" "``global`` and ``nonlocal`` statements. ``names`` is a list of raw strings." msgstr "" +"Instruction ``global`` ou ``nonlocal``. Elle s'applique aux noms de " +"variables donnés dans *names*, une liste de chaînes de caractères." -#: library/ast.rst:1424 +#: library/ast.rst:1823 msgid "A class definition." -msgstr "" +msgstr "Définition d'une classe." -#: library/ast.rst:1426 +#: library/ast.rst:1825 msgid "``name`` is a raw string for the class name" -msgstr "" +msgstr "*name* est le nom de la classe sous forme de chaîne de caractères ;" -#: library/ast.rst:1427 +#: library/ast.rst:1826 msgid "``bases`` is a list of nodes for explicitly specified base classes." -msgstr "" +msgstr "*bases* est la liste des classes mères données explicitement ;" -#: library/ast.rst:1428 +#: library/ast.rst:1827 +#, fuzzy msgid "" "``keywords`` is a list of :class:`keyword` nodes, principally for " "'metaclass'. Other keywords will be passed to the metaclass, as per " -"`PEP-3115 `_." +"`PEP-3115 `_." msgstr "" +"*keywords* est une liste de nœuds de type :class:`keyword`. Le principal mot-" +"clé qui peut y apparaître est ``metaclass``. Les autres sont passés à la " +"métaclasse (voir la :pep:`3115`) ;" -#: library/ast.rst:1431 +#: library/ast.rst:1830 msgid "" "``starargs`` and ``kwargs`` are each a single node, as in a function call. " "starargs will be expanded to join the list of base classes, and kwargs will " "be passed to the metaclass." msgstr "" -#: library/ast.rst:1434 +#: library/ast.rst:1833 msgid "" "``body`` is a list of nodes representing the code within the class " "definition." msgstr "" +"*body* est la liste des instructions contenues dans la définition de classe ;" -#: library/ast.rst:1436 +#: library/ast.rst:1835 msgid "``decorator_list`` is a list of nodes, as in :class:`FunctionDef`." msgstr "" +"*decorators_list* est une liste de nœuds, comme pour :class:`FunctionDef`." -#: library/ast.rst:1465 +#: library/ast.rst:1864 msgid "Async and await" -msgstr "" +msgstr "``async`` et ``await``" -#: library/ast.rst:1469 +#: library/ast.rst:1868 msgid "" "An ``async def`` function definition. Has the same fields as :class:" "`FunctionDef`." msgstr "" +"Fonction déclarée avec ``async def``. Les champs sont les mêmes que dans :" +"class:`FunctionDef`." -#: library/ast.rst:1475 +#: library/ast.rst:1874 msgid "" "An ``await`` expression. ``value`` is what it waits for. Only valid in the " "body of an :class:`AsyncFunctionDef`." msgstr "" +"Expression ``await``, qui attend *value*. Ces nœuds ne peuvent apparaître " +"qu'à l'intérieur de :class:`AsyncFunctionDef`." -#: library/ast.rst:1508 +#: library/ast.rst:1907 msgid "" "``async for`` loops and ``async with`` context managers. They have the same " "fields as :class:`For` and :class:`With`, respectively. Only valid in the " "body of an :class:`AsyncFunctionDef`." msgstr "" +"Instruction ``async for`` ou ``async with``. Les champs sont les mêmes que " +"ceux de :class:`For` et :class:`With`. Ces nœuds ne peuvent apparaître qu'à " +"l'intérieur de :class:`AsyncFunctionDef`." -#: library/ast.rst:1513 +#: library/ast.rst:1912 msgid "" "When a string is parsed by :func:`ast.parse`, operator nodes (subclasses of :" "class:`ast.operator`, :class:`ast.unaryop`, :class:`ast.cmpop`, :class:`ast." @@ -817,28 +1211,36 @@ msgid "" "singletons. Changes to one will be reflected in all other occurrences of the " "same value (e.g. :class:`ast.Add`)." msgstr "" +"Lorsqu'une chaîne contenant du code est transformée en arbre syntaxique par :" +"func:`ast.parse`, les nœuds représentants les opérateurs (classes filles de :" +"class:`ast.operator`, :class:`ast.unaryop`, :class:`ast.cmpop`, :class:`ast." +"boolop` et :class:`ast.expr_context`) sont des singletons à l'intérieur de " +"l'arbre renvoyé. Si l'un, par exemple une instance de :class:`ast.Add`, est " +"muté, la modification sera visible sur toutes les autres apparitions de " +"l'opérateur." -#: library/ast.rst:1521 +#: library/ast.rst:1920 msgid ":mod:`ast` Helpers" msgstr "Outils du module :mod:`ast`" -#: library/ast.rst:1523 +#: library/ast.rst:1922 msgid "" "Apart from the node classes, the :mod:`ast` module defines these utility " "functions and classes for traversing abstract syntax trees:" msgstr "" -"À part la classe nœud, le module :mod:`ast` définit ces fonctions et classes " -"utilitaires pour traverser les arbres syntaxiques abstraits :" +"À part les classes de nœuds, le module :mod:`ast` définit plusieurs " +"fonctions et classes utilitaires pour traverser les arbres syntaxiques " +"abstraits." -#: library/ast.rst:1528 +#: library/ast.rst:1927 msgid "" "Parse the source into an AST node. Equivalent to ``compile(source, " "filename, mode, ast.PyCF_ONLY_AST)``." msgstr "" -"Analyse le code source en un nœud AST. Équivalent à ``compile(source, " -"filename, mode, ast.PyCF_ONLY_AST)``." +"Analyse le code source et renvoie un arbre syntaxique. Équivalent à " +"``compile(source, filename, mode, ast.PyCF_ONLY_AST)``." -#: library/ast.rst:1531 +#: library/ast.rst:1930 msgid "" "If ``type_comments=True`` is given, the parser is modified to check and " "return type comments as specified by :pep:`484` and :pep:`526`. This is " @@ -850,15 +1252,25 @@ msgid "" "the ``type_ignores`` attribute of :class:`Module` (otherwise it is always an " "empty list)." msgstr "" +"Si *type_comments* est mis à ``True``, l'analyseur syntaxique reconnaît les " +"commentaires de type et les ajoute à l'arbre, comme décrit dans la :pep:" +"`484` et la :pep:`526`. Ceci revient à ajouter :data:`ast." +"PyCF_TYPE_COMMENTS` à l'argument *flags* de :func:`compile`. Une erreur de " +"syntaxe est levée si un commentaire de type est placé au mauvais endroit. " +"Les commentaires ``# type: ignore`` sont également détectés et leurs " +"positions dans la source sont placées dans l'attribut *type_ignores* du " +"nœud :class:`Module`. Sans cette option, les commentaires de type sont " +"ignorés tout comme les commentaires ordinaires, et l'attribut *type_comment* " +"des nœuds dont le type possède ce champ sera toujours mis à ``None``." -#: library/ast.rst:1541 +#: library/ast.rst:1940 msgid "" "In addition, if ``mode`` is ``'func_type'``, the input syntax is modified to " "correspond to :pep:`484` \"signature type comments\", e.g. ``(str, int) -> " "List[str]``." msgstr "" -#: library/ast.rst:1545 +#: library/ast.rst:1944 msgid "" "Also, setting ``feature_version`` to a tuple ``(major, minor)`` will attempt " "to parse using that Python version's grammar. Currently ``major`` must equal " @@ -866,54 +1278,89 @@ msgid "" "use of ``async`` and ``await`` as variable names. The lowest supported " "version is ``(3, 4)``; the highest is ``sys.version_info[0:2]``." msgstr "" +"Si *feature_version* est défini à une version de Python, sous la forme d'un " +"couple ``(version_majeure, version_mineure)``, l'analyseur tentera de lire " +"la source en se conformant à la syntaxe de cette version. Ainsi, avec " +"``feature_version=(3, 4)``, les noms ``async`` et ``await`` peuvent nommer " +"des variables. La version la plus ancienne prise en charge est actuellement " +"``(3, 4)`` ; la plus récente est ``sys.version_info[0:2]``." + +#: library/ast.rst:1951 +msgid "" +"If source contains a null character ('\\0'), :exc:`ValueError` is raised." +msgstr "" -#: library/ast.rst:1592 +#: library/ast.rst:1954 +msgid "" +"Note that successfully parsing source code into an AST object doesn't " +"guarantee that the source code provided is valid Python code that can be " +"executed as the compilation step can raise further :exc:`SyntaxError` " +"exceptions. For instance, the source ``return 42`` generates a valid AST " +"node for a return statement, but it cannot be compiled alone (it needs to be " +"inside a function node)." +msgstr "" + +#: library/ast.rst:1961 +msgid "" +"In particular, :func:`ast.parse` won't do any scoping checks, which the " +"compilation step does." +msgstr "" + +#: library/ast.rst:2004 msgid "" "It is possible to crash the Python interpreter with a sufficiently large/" "complex string due to stack depth limitations in Python's AST compiler." msgstr "" "Il est possible de faire planter l'interpréteur Python avec des chaînes " -"suffisamment grandes ou complexes lors de la compilation d'un objet AST dû à " -"la limitation de la profondeur de la pile d'appels." +"suffisamment grandes ou complexes lors de la compilation d'un arbre " +"syntaxique en raison de la limitation de la profondeur de la pile d'appels." -#: library/ast.rst:1557 +#: library/ast.rst:1969 msgid "Added ``type_comments``, ``mode='func_type'`` and ``feature_version``." msgstr "" +"ajout des paramètres *type_comments* et *feature_version* ainsi que de la " +"valeur ``'func_type'`` pour *mode*." -#: library/ast.rst:1563 +#: library/ast.rst:1975 msgid "" "Unparse an :class:`ast.AST` object and generate a string with code that " "would produce an equivalent :class:`ast.AST` object if parsed back with :" "func:`ast.parse`." msgstr "" +"À partir d'un arbre syntaxique :class:`ast.AST`, reconstruit un code sous " +"forme de chaîne de caractères. S'il est passé à :func:`ast.parse`, le " +"résultat produit un arbre :class:`ast.AST` équivalent à l'original." -#: library/ast.rst:1568 +#: library/ast.rst:1980 msgid "" "The produced code string will not necessarily be equal to the original code " "that generated the :class:`ast.AST` object (without any compiler " "optimizations, such as constant tuples/frozensets)." msgstr "" -#: library/ast.rst:1573 +#: library/ast.rst:1985 msgid "" "Trying to unparse a highly complex expression would result with :exc:" "`RecursionError`." msgstr "" +"Une :exc:`RecursionError` est levée si l'expression comporte de très " +"nombreux niveaux d'imbrication." -#: library/ast.rst:1581 +#: library/ast.rst:1993 +#, fuzzy msgid "" "Safely evaluate an expression node or a string containing a Python literal " "or container display. The string or node provided may only consist of the " "following Python literal structures: strings, bytes, numbers, tuples, lists, " -"dicts, sets, booleans, and ``None``." +"dicts, sets, booleans, ``None`` and ``Ellipsis``." msgstr "" -"Évalue de manière sûre un nœud expression ou une chaîne de caractères " -"contenant une expression littérale Python ou un conteneur. La chaîne de " -"caractères ou le nœud fourni peut seulement faire partie des littéraux " -"Python suivants : chaînes de caractères, bytes, nombres, *n*-uplets, listes, " -"dictionnaires, ensembles, booléens, et ``None``." +"Évalue de manière sûre un nœud d'expression, ou bien une chaîne de " +"caractères contenant une valeur littérale simple ou un conteneur sous forme " +"littérale. La chaîne de caractères ou le nœud fourni ne doit contenir que " +"des littéraux parmi les types suivants : chaînes de caractères, octets, " +"nombres, *n*-uplets, listes, dictionnaires, ensembles, booléens, et ``None``." -#: library/ast.rst:1586 +#: library/ast.rst:1998 msgid "" "This can be used for safely evaluating strings containing Python values from " "untrusted sources without the need to parse the values oneself. It is not " @@ -921,50 +1368,63 @@ msgid "" "operators or indexing." msgstr "" "Cela peut être utilisé pour évaluer de manière sûre la chaîne de caractères " -"contenant des valeurs Python de sources non fiable sans avoir besoin " +"contenant des valeurs Python de source non fiable sans avoir besoin " "d'analyser les valeurs elles-mêmes. Cette fonction n'est pas capable " -"d'évaluer des expressions complexes arbitraires, par exemple impliquant des " -"opérateurs ou de l'indexation." +"d'évaluer des expressions arbitrairement complexes, par exemple impliquant " +"des opérateurs ou de l'indiçage." -#: library/ast.rst:1596 +#: library/ast.rst:2008 +msgid "" +"It can raise :exc:`ValueError`, :exc:`TypeError`, :exc:`SyntaxError`, :exc:" +"`MemoryError` and :exc:`RecursionError` depending on the malformed input." +msgstr "" + +#: library/ast.rst:2012 msgid "Now allows bytes and set literals." -msgstr "Accepte maintenant les littéraux suivants *bytes* et *sets*." +msgstr "accepte maintenant les octets et ensembles littéraux." -#: library/ast.rst:1599 +#: library/ast.rst:2015 msgid "Now supports creating empty sets with ``'set()'``." +msgstr "accepte ``set()`` pour les ensembles vides." + +#: library/ast.rst:2018 +msgid "For string inputs, leading spaces and tabs are now stripped." msgstr "" -#: library/ast.rst:1605 +#: library/ast.rst:2024 msgid "" "Return the docstring of the given *node* (which must be a :class:" "`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or :class:" "`Module` node), or ``None`` if it has no docstring. If *clean* is true, " "clean up the docstring's indentation with :func:`inspect.cleandoc`." msgstr "" -"Renvoie la *docstring* du *node* donné (qui doit être un nœud de type :class:" -"`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or :class:" -"`Module`), ou ``None`` s'il n'a pas de *docstring*. Si *clean* est vrai, " -"cette fonction nettoie l'indentation de la *docstring* avec :func:`inspect." -"cleandoc`." +"Renvoie la *docstring* du nœud *node* (de type :class:`FunctionDef`, :class:" +"`AsyncFunctionDef`, :class:`ClassDef` or :class:`Module`), ou ``None`` s'il " +"n'a pas de *docstring*. Si *clean* est vrai, cette fonction nettoie " +"l'indentation de la *docstring* avec :func:`inspect.cleandoc`." -#: library/ast.rst:1611 +#: library/ast.rst:2030 msgid ":class:`AsyncFunctionDef` is now supported." -msgstr ":class:`AsyncFunctionDef` est maintenant gérée" +msgstr ":class:`AsyncFunctionDef` est maintenant gérée." -#: library/ast.rst:1617 +#: library/ast.rst:2036 msgid "" "Get source code segment of the *source* that generated *node*. If some " "location information (:attr:`lineno`, :attr:`end_lineno`, :attr:" "`col_offset`, or :attr:`end_col_offset`) is missing, return ``None``." msgstr "" +"Donne la partie de *source* (le code source) qui a donné lieu à *node*. Si " +"l'un des attributs de localisation du nœud (:attr:`lineno`, :attr:" +"`end_lineno`, :attr:`col_offset` et :attr:`end_col_offset`) n'est pas " +"rempli, cette fonction renvoie ``None``." -#: library/ast.rst:1621 +#: library/ast.rst:2040 msgid "" "If *padded* is ``True``, the first line of a multi-line statement will be " "padded with spaces to match its original position." msgstr "" -#: library/ast.rst:1629 +#: library/ast.rst:2048 msgid "" "When you compile a node tree with :func:`compile`, the compiler expects :" "attr:`lineno` and :attr:`col_offset` attributes for every node that supports " @@ -974,51 +1434,51 @@ msgid "" msgstr "" "Lorsque l'on compile un arbre avec :func:`compile`, le compilateur attend " "les attributs :attr:`lineno` et :attr:`col_offset` pour tous les nœuds qui " -"les supportent. Il est fastidieux de les remplir pour les nœuds générés, " -"cette fonction utilitaire ajoute ces attributs de manière récursive là où " -"ils ne sont pas déjà définis, en les définissant comme les valeurs du nœud " -"parent. Elle fonctionne récursivement en démarrant de *node*." +"les prennent en charge. Il est fastidieux de les remplir pour les nœuds " +"générés par du code. Cette fonction utilitaire ajoute ces attributs de " +"manière récursive là où ils ne sont pas déjà définis, en les définissant " +"comme les valeurs du nœud parent. Elle fonctionne récursivement en démarrant " +"de *node*." -#: library/ast.rst:1638 -#, fuzzy +#: library/ast.rst:2057 msgid "" "Increment the line number and end line number of each node in the tree " "starting at *node* by *n*. This is useful to \"move code\" to a different " "location in a file." msgstr "" -"Incrémente de *n* le numéro de ligne de chaque nœud dans l'arbre en " -"commençant par le nœud *node*. C'est utile pour \"déplacer du code\" à un " -"endroit différent dans un fichier." +"Incrémente de *n* les numéros des lignes de début et ligne de fin de chaque " +"nœud dans l'arbre, en commençant par le nœud *node*. C'est utile pour " +"« déplacer du code » à un endroit différent dans un fichier." -#: library/ast.rst:1645 -#, fuzzy +#: library/ast.rst:2064 msgid "" "Copy source location (:attr:`lineno`, :attr:`col_offset`, :attr:" "`end_lineno`, and :attr:`end_col_offset`) from *old_node* to *new_node* if " "possible, and return *new_node*." msgstr "" -"Copie le code source (:attr:`lineno` et :attr:`col_offset`) de l'ancien nœud " -"*old_node* vers le nouveau nœud *new_node* si possible, et renvoie " +"Copie la position dans la source (attributs :attr:`lineno`, :attr:" +"`col_offset`, :attr:`end_lineno` et :attr:`end_col_offset`) de l'ancien nœud " +"*old_node* vers le nouveau nœud *new_node*, si possible, et renvoie " "*new_node*." -#: library/ast.rst:1652 +#: library/ast.rst:2071 msgid "" "Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` " "that is present on *node*." msgstr "" -"Produit un *n*-uplet de ``(fieldname, value)`` pour chaque champ de ``node." -"_fields`` qui est présent dans *node*." +"Produit un *n*-uplet de couples ``(nom_du_champ, valeur)`` pour chaque champ " +"de ``node._fields`` qui est présent dans *node*." -#: library/ast.rst:1658 +#: library/ast.rst:2077 msgid "" "Yield all direct child nodes of *node*, that is, all fields that are nodes " "and all items of fields that are lists of nodes." msgstr "" -"Produit tous les nœuds enfants directs de *node*, c'est à dire, tous les " +"Produit tous les nœuds enfants directs de *node*, c'est-à-dire tous les " "champs qui sont des nœuds et tous les éléments des champs qui sont des " "listes de nœuds." -#: library/ast.rst:1664 +#: library/ast.rst:2083 msgid "" "Recursively yield all descendant nodes in the tree starting at *node* " "(including *node* itself), in no specified order. This is useful if you " @@ -1029,7 +1489,7 @@ msgstr "" "lorsque l'on souhaite modifier les nœuds sur place sans prêter attention au " "contexte." -#: library/ast.rst:1671 +#: library/ast.rst:2090 msgid "" "A node visitor base class that walks the abstract syntax tree and calls a " "visitor function for every node found. This function may return a value " @@ -1037,10 +1497,10 @@ msgid "" msgstr "" "Classe de base pour un visiteur de nœud, qui parcourt l'arbre syntaxique " "abstrait et appelle une fonction de visite pour chacun des nœuds trouvés. " -"Cette fonction peut renvoyer une valeur qui est transmise par la méthode :" +"Cette fonction peut renvoyer une valeur, qui est transmise par la méthode :" "meth:`visit`." -#: library/ast.rst:1675 +#: library/ast.rst:2094 msgid "" "This class is meant to be subclassed, with the subclass adding visitor " "methods." @@ -1048,31 +1508,31 @@ msgstr "" "Cette classe est faite pour être dérivée, en ajoutant des méthodes de visite " "à la sous-classe." -#: library/ast.rst:1680 +#: library/ast.rst:2099 msgid "" "Visit a node. The default implementation calls the method called :samp:" "`self.visit_{classname}` where *classname* is the name of the node class, " "or :meth:`generic_visit` if that method doesn't exist." msgstr "" "Visite un nœud. L'implémentation par défaut appelle la méthode :samp:`self." -"visit_{classname}` où *classname* représente le nom de la classe du nœud, " -"ou :meth:`generic_visit` si cette méthode n'existe pas." +"visit_{classe}` où *classe* représente le nom de la classe du nœud, ou :meth:" +"`generic_visit` si cette méthode n'existe pas." -#: library/ast.rst:1686 +#: library/ast.rst:2105 msgid "This visitor calls :meth:`visit` on all children of the node." msgstr "" "Le visiteur appelle la méthode :meth:`visit` de tous les enfants du nœud." -#: library/ast.rst:1688 +#: library/ast.rst:2107 msgid "" "Note that child nodes of nodes that have a custom visitor method won't be " "visited unless the visitor calls :meth:`generic_visit` or visits them itself." msgstr "" "Notons que les nœuds enfants qui possèdent une méthode de visite spéciale ne " -"seront pas visités à moins que le visiteur n'appelle la méthode :meth:" +"sont pas visités à moins que le visiteur n'appelle la méthode :meth:" "`generic_visit` ou ne les visite lui-même." -#: library/ast.rst:1692 +#: library/ast.rst:2111 msgid "" "Don't use the :class:`NodeVisitor` if you want to apply changes to nodes " "during traversal. For this a special visitor exists (:class:" @@ -1082,23 +1542,28 @@ msgstr "" "changements sur les nœuds lors du parcours. Pour cela, un visiteur spécial " "existe (:class:`NodeTransformer`) qui permet les modifications." -#: library/ast.rst:1698 +#: library/ast.rst:2117 msgid "" "Methods :meth:`visit_Num`, :meth:`visit_Str`, :meth:`visit_Bytes`, :meth:" "`visit_NameConstant` and :meth:`visit_Ellipsis` are deprecated now and will " "not be called in future Python versions. Add the :meth:`visit_Constant` " "method to handle all constant nodes." msgstr "" +"les méthodes :meth:`visit_Num`, :meth:`visit_Str`, :meth:`visit_Bytes`, :" +"meth:`visit_NameConstant` et :meth:`visit_Ellipsis` sont devenues obsolètes " +"et cesseront d'être appelées dans une version ultérieure de Python. Écrivez " +"une méthode :meth:`visit_Constant` pour traiter tous les nœuds qui " +"représentent des valeurs constantes." -#: library/ast.rst:1706 +#: library/ast.rst:2125 msgid "" "A :class:`NodeVisitor` subclass that walks the abstract syntax tree and " "allows modification of nodes." msgstr "" -"Une sous-classe :class:`NodeVisitor` qui traverse l'arbre syntaxique " -"abstrait et permet les modifications des nœuds." +"Une sous-classe de :class:`NodeVisitor` qui traverse l'arbre syntaxique " +"abstrait et permet de modifier les nœuds." -#: library/ast.rst:1709 +#: library/ast.rst:2128 msgid "" "The :class:`NodeTransformer` will walk the AST and use the return value of " "the visitor methods to replace or remove the old node. If the return value " @@ -1106,55 +1571,57 @@ msgid "" "location, otherwise it is replaced with the return value. The return value " "may be the original node in which case no replacement takes place." msgstr "" -"Le :class:`NodeTransformer` traverse l'AST et utilise la valeur renvoyée par " -"les méthodes du visiteur pour remplacer ou supprimer l'ancien nœud. Si la " -"valeur renvoyée par la méthode du visiteur est ``None``, le nœud est " -"supprimé de sa position, sinon il est remplacé par la valeur de retour. La " -"valeur de retour peut être le nœud original et dans ce cas, il n'y a pas de " -"remplacement. " +"Le :class:`NodeTransformer` traverse l'arbre syntaxique et utilise la valeur " +"renvoyée par les méthodes du visiteur pour remplacer ou supprimer l'ancien " +"nœud. Si la valeur renvoyée par la méthode du visiteur est ``None``, le nœud " +"est supprimé de sa position, sinon il est remplacé par cette valeur. Elle " +"peut être le nœud original, auquel cas il n'y a pas de remplacement." -#: library/ast.rst:1715 +#: library/ast.rst:2134 msgid "" "Here is an example transformer that rewrites all occurrences of name lookups " "(``foo``) to ``data['foo']``::" msgstr "" -"Voici un exemple du *transformer* qui réécrit les occurrences du " -"dictionnaire (``foo``) en ``data['foo']`` ::" +"Voici un exemple de transformation qui réécrit tous les accès à la valeur " +"d'une variable ``toto`` en ``data['toto']`` ::" -#: library/ast.rst:1727 +#: library/ast.rst:2146 msgid "" "Keep in mind that if the node you're operating on has child nodes you must " "either transform the child nodes yourself or call the :meth:`generic_visit` " "method for the node first." msgstr "" "Gardez en tête que si un nœud sur lequel vous travaillez a des nœuds " -"enfants, vous devez transformer également ces nœuds enfant vous-même ou " +"enfants, vous devez transformer également ces nœuds enfants vous-même ou " "appeler d'abord la méthode :meth:`generic_visit` sur le nœud." -#: library/ast.rst:1731 +#: library/ast.rst:2150 msgid "" "For nodes that were part of a collection of statements (that applies to all " "statement nodes), the visitor may also return a list of nodes rather than " "just a single node." msgstr "" -"Pour les nœuds qui font partie d'une collection d'instructions (cela " -"s'applique à tous les nœuds instruction), le visiteur peut aussi renvoyer la " -"liste des nœuds plutôt qu'un seul nœud." +"Pour les nœuds qui font partie d'un groupe (notamment toutes les " +"instructions), le visiteur peut aussi renvoyer une liste des nœuds plutôt " +"qu'un seul nœud." -#: library/ast.rst:1735 +#: library/ast.rst:2154 msgid "" "If :class:`NodeTransformer` introduces new nodes (that weren't part of " "original tree) without giving them location information (such as :attr:" "`lineno`), :func:`fix_missing_locations` should be called with the new sub-" "tree to recalculate the location information::" msgstr "" +"Si :class:`NodeTransformer` ajoute de nouveaux nœuds à l'original sans leur " +"donner les attributs de position dans la source (:attr:`lineno` et " +"consorts), il faut passer le nouvel arbre (ou la nouvelle partie de l'arbre) " +"à :func:`fix_missing_locations` pour calculer les positions manquantes :" -#: library/ast.rst:1743 +#: library/ast.rst:2162 msgid "Usually you use the transformer like this::" -msgstr "Utilisation typique du *transformer* ::" +msgstr "Utilisation typique des transformations ::" -#: library/ast.rst:1750 -#, fuzzy +#: library/ast.rst:2169 msgid "" "Return a formatted dump of the tree in *node*. This is mainly useful for " "debugging purposes. If *annotate_fields* is true (by default), the returned " @@ -1164,133 +1631,174 @@ msgid "" "dumped by default. If this is wanted, *include_attributes* can be set to " "true." msgstr "" -"Renvoie un *dump* formaté de l'arbre dans *node*. C'est principalement utile " -"à des fins de débogage. La chaîne de caractères renvoyée présente les noms " -"et valeurs des champs. Cela rend le code impossible à évaluer, si l'on " -"souhaite évaluer ce code, l'option *annotate_fields* doit être définie comme " -"``False``. Les attributs comme les numéros de ligne et les décalages de " -"colonne ne sont pas récupérés par défaut. Si l'on souhaite les récupérer, " -"l'option *include_attributes* peut être définie comme ``True``." +"Renvoie une représentation sous forme de chaîne de caractères de l'arbre " +"contenu dans *node*. Ceci est principalement utile à des fins de débogage. " +"Par défaut, les champs sont passés comme paramètres nommés aux constructeurs " +"des classes d'arbre syntaxiques. Cependant, si *annotate_fields* est mis à " +"``False``, les valeurs sont passées, lorsque cela est possible, comme " +"arguments positionnels, rendant la représentation plus compacte. Les " +"attributs comme les numéros de lignes et positions sur les lignes sont " +"masqués par défaut, mais on peut les inclure en mettant *include_attributes* " +"à ``True``." -#: library/ast.rst:1758 +#: library/ast.rst:2177 msgid "" "If *indent* is a non-negative integer or string, then the tree will be " -"pretty-printed with that indent level. An indent level of 0, negative, or ``" -"\"\"`` will only insert newlines. ``None`` (the default) selects the single " -"line representation. Using a positive integer indent indents that many " -"spaces per level. If *indent* is a string (such as ``\"\\t\"``), that " +"pretty-printed with that indent level. An indent level of 0, negative, or " +"``\"\"`` will only insert newlines. ``None`` (the default) selects the " +"single line representation. Using a positive integer indent indents that " +"many spaces per level. If *indent* is a string (such as ``\"\\t\"``), that " "string is used to indent each level." msgstr "" +"La représentation peut comprendre une indentation afin d'être plus lisible. " +"Si *indent* est une chaîne de caractères (par exemple une tabulation " +"``\"\\t\"``), elle est insérée au début des lignes en la répétant autant de " +"fois que le niveau d'indentation. Un entier positif équivaut à un certain " +"nombre d'espaces. Un entier strictement négatif produit un effet identique à " +"0 ou la chaîne vide, c'est-à-dire des retours à la ligne sans indentation. " +"Avec la valeur par défaut de ``None``, la sortie tient sur une seule ligne." -#: library/ast.rst:1765 +#: library/ast.rst:2184 msgid "Added the *indent* option." -msgstr "" +msgstr "ajout du paramètre *indent*." -#: library/ast.rst:1772 +#: library/ast.rst:2191 msgid "Compiler Flags" -msgstr "" +msgstr "Options du compilateur" -#: library/ast.rst:1774 +#: library/ast.rst:2193 msgid "" "The following flags may be passed to :func:`compile` in order to change " "effects on the compilation of a program:" msgstr "" +"Les options suivantes sont prises en charge par la fonction :func:`compile`. " +"Elles permettent de modifier le comportement de la compilation." -#: library/ast.rst:1779 +#: library/ast.rst:2198 msgid "" "Enables support for top-level ``await``, ``async for``, ``async with`` and " "async comprehensions." msgstr "" +"Active la reconnaissance de ``await``, ``async for``, ``async with`` et des " +"compréhensions asynchrones au niveau le plus haut." -#: library/ast.rst:1786 +#: library/ast.rst:2205 msgid "" "Generates and returns an abstract syntax tree instead of returning a " "compiled code object." msgstr "" +"Génère et renvoie un arbre syntaxique au lieu d'un objet de code compilé." -#: library/ast.rst:1791 +#: library/ast.rst:2210 msgid "" "Enables support for :pep:`484` and :pep:`526` style type comments (``# type: " "``, ``# type: ignore ``)." msgstr "" +"Ajoute la prise en charge des commentaires de types tels que définis dans " +"la :pep:`484` et la :pep:`526` (``# type: un_type`` et ``# type: ignore``)." -#: library/ast.rst:1800 +#: library/ast.rst:2219 msgid "Command-Line Usage" -msgstr "Utilisation en ligne de commande." +msgstr "Utilisation en ligne de commande" -#: library/ast.rst:1804 +#: library/ast.rst:2223 msgid "" "The :mod:`ast` module can be executed as a script from the command line. It " "is as simple as:" msgstr "" +"Le module :mod:`ast` peut être exécuté en tant que script en ligne de " +"commande. C'est aussi simple que ceci :" -#: library/ast.rst:1811 +#: library/ast.rst:2230 msgid "The following options are accepted:" msgstr "Les options suivantes sont acceptées :" -#: library/ast.rst:1817 +#: library/ast.rst:2236 msgid "Show the help message and exit." -msgstr "" +msgstr "Affiche un message d'aide et quitte." -#: library/ast.rst:1822 +#: library/ast.rst:2241 msgid "" "Specify what kind of code must be compiled, like the *mode* argument in :" "func:`parse`." msgstr "" +"Précise le type de code à compiler, comme l'argument *mode* de la fonction :" +"func:`parse`." -#: library/ast.rst:1827 +#: library/ast.rst:2246 msgid "Don't parse type comments." -msgstr "" +msgstr "Désactive la reconnaissance des commentaires de type." -#: library/ast.rst:1831 +#: library/ast.rst:2250 msgid "Include attributes such as line numbers and column offsets." msgstr "" +"Affiche les attributs comme les numéros de lignes et les décalages par " +"rapport aux débuts des lignes." -#: library/ast.rst:1836 +#: library/ast.rst:2255 msgid "Indentation of nodes in AST (number of spaces)." -msgstr "" +msgstr "Nombre d'espaces pour chaque niveau d'indentation dans la sortie." -#: library/ast.rst:1838 +#: library/ast.rst:2257 msgid "" "If :file:`infile` is specified its contents are parsed to AST and dumped to " "stdout. Otherwise, the content is read from stdin." msgstr "" +"L'entrée est lue dans le fichier :file:`infile`, s'il est donné, ou l'entrée " +"standard sinon. Le code source est transformé en un arbre syntaxique, qui " +"est affiché sur la sortie standard." -#: library/ast.rst:1844 +#: library/ast.rst:2263 msgid "" "`Green Tree Snakes `_, an external " "documentation resource, has good details on working with Python ASTs." msgstr "" "`Green Tree Snakes `_, une " "ressource documentaire externe, qui possède plus de détails pour travailler " -"avec des ASTs Python." +"avec des arbres syntaxiques Python." -#: library/ast.rst:1847 +#: library/ast.rst:2266 msgid "" "`ASTTokens `_ " "annotates Python ASTs with the positions of tokens and text in the source " "code that generated them. This is helpful for tools that make source code " "transformations." msgstr "" +"`ASTTokens `_ " +"annote les arbres syntaxiques Python avec les positions des lexèmes et les " +"extraits de code source à partir desquels ils sont produits. Ceci est utile " +"pour les outils qui transforment du code source." -#: library/ast.rst:1852 +#: library/ast.rst:2271 msgid "" "`leoAst.py `_ unifies the " "token-based and parse-tree-based views of python programs by inserting two-" "way links between tokens and ast nodes." msgstr "" +"`leoAst.py `_ unifie les " +"visions des lexèmes et des arbres syntaxiques en insérant des liens " +"bidirectionnels entre les deux." -#: library/ast.rst:1856 +#: library/ast.rst:2275 msgid "" "`LibCST `_ parses code as a Concrete Syntax " "Tree that looks like an ast tree and keeps all formatting details. It's " "useful for building automated refactoring (codemod) applications and linters." msgstr "" +"`LibCST `_ produit à partir du code source " +"des arbres syntaxiques concrets, qui ressemblent à leurs homologues " +"abstraits et conservent tous les détails du formatage. Cette bibliothèque " +"est utile aux outils de réusinage et d'analyse de code." -#: library/ast.rst:1861 +#: library/ast.rst:2280 msgid "" "`Parso `_ is a Python parser that supports " "error recovery and round-trip parsing for different Python versions (in " "multiple Python versions). Parso is also able to list multiple syntax errors " "in your python file." msgstr "" +"`Parso `_ est un analyseur syntaxique de code " +"Python qui gère la récupération d'erreurs et la génération de code (de " +"l'arbre syntaxique vers le code source), le tout pour les grammaires de " +"différentes versions de Python et en utilisant différentes versions. Il sait " +"également donner plusieurs erreurs de syntaxe en une seule fois." diff --git a/library/asynchat.po b/library/asynchat.po index 0cdb440a7a..33303e044d 100644 --- a/library/asynchat.po +++ b/library/asynchat.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2018-10-06 17:04+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -21,15 +21,17 @@ msgstr "" ":mod:`asynchat` --- Gestionnaire d'interfaces de connexion (*socket*) " "commande/réponse asynchrones" -#: library/asynchat.rst:10 +#: library/asynchat.rst:11 msgid "**Source code:** :source:`Lib/asynchat.py`" msgstr "*Code source :** :source:`Lib/asynchat.py`" -#: library/asynchat.rst:12 -msgid "Please use :mod:`asyncio` instead." -msgstr "Utilisez :mod:`asyncio` à la place." +#: library/asynchat.rst:17 +msgid "" +"The :mod:`asynchat` module is deprecated (see :pep:`PEP 594 <594#asynchat>` " +"for details). Please use :mod:`asyncio` instead." +msgstr "" -#: library/asynchat.rst:19 +#: library/asynchat.rst:22 msgid "" "This module exists for backwards compatibility only. For new code we " "recommend using :mod:`asyncio`." @@ -37,7 +39,7 @@ msgstr "" "Ce module n'existe que pour des raisons de rétrocompatibilité. Pour du code " "nouveau, l'utilisation de :mod:`asyncio` est recommandée." -#: library/asynchat.rst:22 +#: library/asynchat.rst:25 msgid "" "This module builds on the :mod:`asyncore` infrastructure, simplifying " "asynchronous clients and servers and making it easier to handle protocols " @@ -64,7 +66,7 @@ msgstr "" "d'objets :class:`asynchat.async_chat` à la réception de requêtes de " "connexion." -#: library/asynchat.rst:37 +#: library/asynchat.rst:40 msgid "" "This class is an abstract subclass of :class:`asyncore.dispatcher`. To make " "practical use of the code you must subclass :class:`async_chat`, providing " @@ -79,7 +81,7 @@ msgstr "" "de :class:`asyncore.dispatcher` peuvent être utilisées, même si toutes " "n'ont pas de sens dans un contexte de messages/réponse." -#: library/asynchat.rst:44 +#: library/asynchat.rst:47 msgid "" "Like :class:`asyncore.dispatcher`, :class:`async_chat` defines a set of " "events that are generated by an analysis of socket conditions after a :c:" @@ -94,7 +96,7 @@ msgstr "" "objets :class:`async_chat` sont appelées par le *framework* de traitement " "d’événements sans que le programmeur n'ait à le spécifier." -#: library/asynchat.rst:50 +#: library/asynchat.rst:53 msgid "" "Two class attributes can be modified, to improve performance, or possibly " "even to conserve memory." @@ -102,15 +104,15 @@ msgstr "" "Deux attributs de classe peuvent être modifiés, pour améliorer la " "performance, ou potentiellement pour économiser de la mémoire." -#: library/asynchat.rst:56 +#: library/asynchat.rst:59 msgid "The asynchronous input buffer size (default ``4096``)." msgstr "La taille du tampon d'entrées asynchrones (``4096`` par défaut)." -#: library/asynchat.rst:61 +#: library/asynchat.rst:64 msgid "The asynchronous output buffer size (default ``4096``)." msgstr "La taille du tampon de sorties asynchrones (``4096`` par défaut)." -#: library/asynchat.rst:63 +#: library/asynchat.rst:66 msgid "" "Unlike :class:`asyncore.dispatcher`, :class:`async_chat` allows you to " "define a :abbr:`FIFO (first-in, first-out)` queue of *producers*. A producer " @@ -137,7 +139,7 @@ msgstr "" "d'un point d'arrêt, dans in transmission entrante depuis le point d’accès " "distant." -#: library/asynchat.rst:76 +#: library/asynchat.rst:79 msgid "" "To build a functioning :class:`async_chat` subclass your input methods :" "meth:`collect_incoming_data` and :meth:`found_terminator` must handle the " @@ -149,7 +151,7 @@ msgstr "" "`found_terminator` doivent gérer la donnée que le canal reçoit de manière " "asynchrone. Ces méthodes sont décrites ci-dessous." -#: library/asynchat.rst:84 +#: library/asynchat.rst:87 msgid "" "Pushes a ``None`` on to the producer queue. When this producer is popped off " "the queue it causes the channel to be closed." @@ -157,7 +159,7 @@ msgstr "" "Pousse un ``None`` sur la pile de producteurs. Quand ce producteur est " "récupéré dans la queue, le canal est fermé." -#: library/asynchat.rst:90 +#: library/asynchat.rst:93 msgid "" "Called with *data* holding an arbitrary amount of received data. The " "default method, which must be overridden, raises a :exc:" @@ -166,7 +168,7 @@ msgstr "" "Appelé avec *data* contenant une quantité arbitraire de données. La méthode " "par défaut, qui doit être écrasée, lève une :exc:`NotImplementedError`." -#: library/asynchat.rst:97 +#: library/asynchat.rst:100 msgid "" "In emergencies this method will discard any data held in the input and/or " "output buffers and the producer queue." @@ -174,7 +176,7 @@ msgstr "" "En cas d'urgence, cette méthode va supprimer tout donnée présente dans les " "tampons d'entrée et/ou de sortie dans la queue de producteurs." -#: library/asynchat.rst:103 +#: library/asynchat.rst:106 msgid "" "Called when the incoming data stream matches the termination condition set " "by :meth:`set_terminator`. The default method, which must be overridden, " @@ -186,11 +188,11 @@ msgstr "" "lève une :exc:`NotImplementedError`. Les données entrantes mise en tampon " "devraient être disponible via un attribut de l'instance." -#: library/asynchat.rst:111 +#: library/asynchat.rst:114 msgid "Returns the current terminator for the channel." msgstr "Renvoie le terminateur courant pour le canal." -#: library/asynchat.rst:116 +#: library/asynchat.rst:119 msgid "" "Pushes data on to the channel's queue to ensure its transmission. This is " "all you need to do to have the channel write the data out to the network, " @@ -203,7 +205,7 @@ msgstr "" "schémas plus complexes qui implémentent de la cryptographie et du *chunking* " "par exemple." -#: library/asynchat.rst:124 +#: library/asynchat.rst:127 msgid "" "Takes a producer object and adds it to the producer queue associated with " "the channel. When all currently-pushed producers have been exhausted the " @@ -215,7 +217,7 @@ msgstr "" "canal consomme les données de ce producteur en appelant sa méthode :meth:" "`more` et envoie les données au point d’accès distant." -#: library/asynchat.rst:132 +#: library/asynchat.rst:135 msgid "" "Sets the terminating condition to be recognized on the channel. ``term`` " "may be any of three types of value, corresponding to three different ways to " @@ -225,19 +227,19 @@ msgstr "" "n'importe lequel des trois types de valeurs, correspondant aux trois " "différentes manières de gérer les données entrantes." -#: library/asynchat.rst:137 +#: library/asynchat.rst:140 msgid "term" msgstr "*term*" -#: library/asynchat.rst:137 +#: library/asynchat.rst:140 msgid "Description" msgstr "Description" -#: library/asynchat.rst:139 +#: library/asynchat.rst:142 msgid "*string*" msgstr "*string*" -#: library/asynchat.rst:139 +#: library/asynchat.rst:142 msgid "" "Will call :meth:`found_terminator` when the string is found in the input " "stream" @@ -245,11 +247,11 @@ msgstr "" "Appellera :meth:`found_terminator` quand la chaîne est trouvée dans le flux " "d'entré" -#: library/asynchat.rst:142 +#: library/asynchat.rst:145 msgid "*integer*" msgstr "*integer*" -#: library/asynchat.rst:142 +#: library/asynchat.rst:145 msgid "" "Will call :meth:`found_terminator` when the indicated number of characters " "have been received" @@ -257,15 +259,15 @@ msgstr "" "Appellera :meth:`found_terminator` quand le nombre de caractère indiqué à " "été reçu" -#: library/asynchat.rst:146 +#: library/asynchat.rst:149 msgid "``None``" msgstr "``None``" -#: library/asynchat.rst:146 +#: library/asynchat.rst:149 msgid "The channel continues to collect data forever" msgstr "Le canal continue de collecter des informations indéfiniment" -#: library/asynchat.rst:150 +#: library/asynchat.rst:153 msgid "" "Note that any data following the terminator will be available for reading by " "the channel after :meth:`found_terminator` is called." @@ -273,11 +275,11 @@ msgstr "" "Notez que toute donnée située après le marqueur de fin sera accessible en " "lecture par le canal après que :meth:`found_terminator` ai été appelé." -#: library/asynchat.rst:157 +#: library/asynchat.rst:160 msgid "asynchat Example" msgstr "Exemple *asynchat*" -#: library/asynchat.rst:159 +#: library/asynchat.rst:162 msgid "" "The following partial example shows how HTTP requests can be read with :" "class:`async_chat`. A web server might create an :class:" @@ -293,7 +295,7 @@ msgstr "" "lignes vides à la fin des entêtes HTTP, et une option indique que les " "entêtes sont en train d'être lues." -#: library/asynchat.rst:166 +#: library/asynchat.rst:169 msgid "" "Once the headers have been read, if the request is of type POST (indicating " "that further data are present in the input stream) then the ``Content-Length:" @@ -305,7 +307,7 @@ msgstr "" "alors l'entête ``Content-Length:`` est utilisé pour définir un marqueur de " "fin numérique pour lire la bonne quantité de donné depuis le canal." -#: library/asynchat.rst:171 +#: library/asynchat.rst:174 msgid "" "The :meth:`handle_request` method is called once all relevant input has been " "marshalled, after setting the channel terminator to ``None`` to ensure that " @@ -315,3 +317,6 @@ msgstr "" "données pertinentes ont été rassemblées, après avoir définit le marqueur de " "fin à ``None`` pour s'assurer que toute données étrangères envoyées par le " "client web sont ignorées. ::" + +#~ msgid "Please use :mod:`asyncio` instead." +#~ msgstr "Utilisez :mod:`asyncio` à la place." diff --git a/library/asyncio-api-index.po b/library/asyncio-api-index.po index 0a5d13a1c0..213ba83db4 100644 --- a/library/asyncio-api-index.po +++ b/library/asyncio-api-index.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -43,7 +43,7 @@ msgstr "" #: library/asyncio-api-index.rst:24 msgid ":func:`create_task`" -msgstr "" +msgstr ":func:`create_task`" #: library/asyncio-api-index.rst:25 msgid "Start an asyncio Task." @@ -91,7 +91,7 @@ msgstr "" #: library/asyncio-api-index.rst:42 msgid ":func:`current_task`" -msgstr "" +msgstr ":func:`current_task`" #: library/asyncio-api-index.rst:43 msgid "Return the current Task." @@ -99,7 +99,7 @@ msgstr "" #: library/asyncio-api-index.rst:45 msgid ":func:`all_tasks`" -msgstr "" +msgstr ":func:`all_tasks`" #: library/asyncio-api-index.rst:46 msgid "Return all tasks for an event loop." @@ -107,7 +107,7 @@ msgstr "" #: library/asyncio-api-index.rst:48 msgid ":class:`Task`" -msgstr "" +msgstr ":class:`Task`" #: library/asyncio-api-index.rst:49 msgid "Task object." @@ -119,12 +119,12 @@ msgid ":func:`to_thread`" msgstr ":func:`round`" #: library/asyncio-api-index.rst:52 -msgid "Asychronously run a function in a separate OS thread." +msgid "Asynchronously run a function in a separate OS thread." msgstr "" #: library/asyncio-api-index.rst:54 msgid ":func:`run_coroutine_threadsafe`" -msgstr "" +msgstr ":func:`run_coroutine_threadsafe`" #: library/asyncio-api-index.rst:55 msgid "Schedule a coroutine from another OS thread." @@ -140,7 +140,7 @@ msgstr "" #: library/asyncio-api-index.rst:62 library/asyncio-api-index.rst:98 #: library/asyncio-api-index.rst:122 library/asyncio-api-index.rst:158 -#: library/asyncio-api-index.rst:191 library/asyncio-api-index.rst:216 +#: library/asyncio-api-index.rst:194 library/asyncio-api-index.rst:219 msgid "Examples" msgstr "Exemples" @@ -286,7 +286,7 @@ msgstr "" #: library/asyncio-api-index.rst:150 msgid ":class:`StreamReader`" -msgstr "" +msgstr ":class:`StreamReader`" #: library/asyncio-api-index.rst:151 msgid "High-level async/await object to receive network data." @@ -294,7 +294,7 @@ msgstr "" #: library/asyncio-api-index.rst:153 msgid ":class:`StreamWriter`" -msgstr "" +msgstr ":class:`StreamWriter`" #: library/asyncio-api-index.rst:154 msgid "High-level async/await object to send network data." @@ -356,46 +356,56 @@ msgstr ":class:`BoundedSemaphore`" msgid "A bounded semaphore." msgstr "" -#: library/asyncio-api-index.rst:192 +#: library/asyncio-api-index.rst:189 +#, fuzzy +msgid ":class:`Barrier`" +msgstr ":class:`Semaphore`" + +#: library/asyncio-api-index.rst:190 +msgid "A barrier object." +msgstr "" + +#: library/asyncio-api-index.rst:195 msgid ":ref:`Using asyncio.Event `." msgstr "" -#: library/asyncio-api-index.rst:194 +#: library/asyncio-api-index.rst:197 +msgid ":ref:`Using asyncio.Barrier `." +msgstr "" + +#: library/asyncio-api-index.rst:199 msgid "" "See also the documentation of asyncio :ref:`synchronization primitives " "`." msgstr "" -#: library/asyncio-api-index.rst:199 +#: library/asyncio-api-index.rst:204 msgid "Exceptions" msgstr "Exceptions" -#: library/asyncio-api-index.rst:206 -msgid ":exc:`asyncio.TimeoutError`" -msgstr "" - -#: library/asyncio-api-index.rst:207 -msgid "" -"Raised on timeout by functions like :func:`wait_for`. Keep in mind that " -"``asyncio.TimeoutError`` is **unrelated** to the built-in :exc:" -"`TimeoutError` exception." -msgstr "" - #: library/asyncio-api-index.rst:211 msgid ":exc:`asyncio.CancelledError`" -msgstr "" +msgstr ":exc:`asyncio.CancelledError`" #: library/asyncio-api-index.rst:212 msgid "Raised when a Task is cancelled. See also :meth:`Task.cancel`." msgstr "" -#: library/asyncio-api-index.rst:217 +#: library/asyncio-api-index.rst:214 +msgid ":exc:`asyncio.BrokenBarrierError`" +msgstr "" + +#: library/asyncio-api-index.rst:215 +msgid "Raised when a Barrier is broken. See also :meth:`Barrier.wait`." +msgstr "" + +#: library/asyncio-api-index.rst:220 msgid "" ":ref:`Handling CancelledError to run code on cancellation request " "`." msgstr "" -#: library/asyncio-api-index.rst:220 +#: library/asyncio-api-index.rst:223 msgid "" "See also the full list of :ref:`asyncio-specific exceptions `." diff --git a/library/asyncio-dev.po b/library/asyncio-dev.po index 4787e5fd19..ef23f7be4c 100644 --- a/library/asyncio-dev.po +++ b/library/asyncio-dev.po @@ -5,14 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2018-10-13 17:38+0200\n" -"Last-Translator: Julien Palard \n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2022-06-06 21:29-0400\n" +"Last-Translator: Nicolas Haller \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0.1\n" #: library/asyncio-dev.rst:7 msgid "Developing with asyncio" @@ -23,45 +24,54 @@ msgid "" "Asynchronous programming is different from classic \"sequential\" " "programming." msgstr "" +"La programmation asynchrone est différente de la programmation " +"« séquentielle » classique." #: library/asyncio-dev.rst:12 msgid "" "This page lists common mistakes and traps and explains how to avoid them." msgstr "" +"Cette page liste les pièges et erreurs communs que le développeur pourrait " +"rencontrer et décrit comment les éviter." #: library/asyncio-dev.rst:19 msgid "Debug Mode" -msgstr "" +msgstr "Mode débogage" #: library/asyncio-dev.rst:21 msgid "" "By default asyncio runs in production mode. In order to ease the " "development asyncio has a *debug mode*." msgstr "" +"Par défaut, *asyncio* s'exécute en mode production. Pour faciliter le " +"développement, *asyncio* possède un « mode débogage »." #: library/asyncio-dev.rst:24 msgid "There are several ways to enable asyncio debug mode:" -msgstr "" +msgstr "Il existe plusieurs façons d'activer le mode débogage de *asyncio* :" #: library/asyncio-dev.rst:26 msgid "Setting the :envvar:`PYTHONASYNCIODEBUG` environment variable to ``1``." msgstr "" +"en réglant la variable d’environnement :envvar:`PYTHONASYNCIODEBUG` à ``1`` ;" #: library/asyncio-dev.rst:28 msgid "Using the :ref:`Python Development Mode `." msgstr "" +"en utilisant le mode développement de Python (:ref:`Python Development Mode " +"`) ;" #: library/asyncio-dev.rst:30 msgid "Passing ``debug=True`` to :func:`asyncio.run`." -msgstr "" +msgstr "en passant ``debug=True`` à la fonction :func:`asyncio.run` ;" #: library/asyncio-dev.rst:32 msgid "Calling :meth:`loop.set_debug`." -msgstr "" +msgstr "en appelant la méthode :meth:`loop.set_debug`." #: library/asyncio-dev.rst:34 msgid "In addition to enabling the debug mode, consider also:" -msgstr "" +msgstr "En plus d'activer le mode débogage, vous pouvez également :" #: library/asyncio-dev.rst:36 msgid "" @@ -69,6 +79,10 @@ msgid "" "data:`logging.DEBUG`, for example the following snippet of code can be run " "at startup of the application::" msgstr "" +"régler le niveau de journalisation pour l'enregistreur d'*asyncio* (:ref:" +"`asyncio logger `) à :py:data:`logging.DEBUG` ; par exemple, " +"le fragment de code suivant peut être exécuté au démarrage de " +"l'application ::" #: library/asyncio-dev.rst:42 msgid "" @@ -76,41 +90,59 @@ msgid "" "warnings. One way of doing that is by using the :option:`-W` ``default`` " "command line option." msgstr "" +"configurer le module :mod:`warnings` afin d'afficher les avertissements de " +"type :exc:`ResourceWarning` ; vous pouvez faire cela en utilisant l'option :" +"option:`-W` ``default`` sur la ligne de commande." #: library/asyncio-dev.rst:47 msgid "When the debug mode is enabled:" -msgstr "" +msgstr "Lorsque le mode débogage est activé :" +# long ref #: library/asyncio-dev.rst:49 msgid "" "asyncio checks for :ref:`coroutines that were not awaited ` and logs them; this mitigates the \"forgotten await\" " "pitfall." msgstr "" +"*asyncio* surveille les :ref:`coroutines qui ne sont jamais attendues " +"` et les journalise ; cela atténue le " +"problème des « *await* oubliés » ;" +# thread safe comment traduire #: library/asyncio-dev.rst:53 msgid "" "Many non-threadsafe asyncio APIs (such as :meth:`loop.call_soon` and :meth:" "`loop.call_at` methods) raise an exception if they are called from a wrong " "thread." msgstr "" +"beaucoup d'*API* *asyncio* ne prenant pas en charge les fils d'exécution " +"multiples (comme les méthodes :meth:`loop.call_soon` et :meth:`loop." +"call_at`) lèvent une exception si elles sont appelées par le mauvais fil " +"d’exécution ;" #: library/asyncio-dev.rst:57 msgid "" "The execution time of the I/O selector is logged if it takes too long to " "perform an I/O operation." msgstr "" +"le temps d'exécution du sélecteur d'entrée-sortie est journalisé si une " +"opération prend trop de temps à s'effectuer ;" #: library/asyncio-dev.rst:60 msgid "" -"Callbacks taking longer than 100ms are logged. The :attr:`loop." +"Callbacks taking longer than 100 milliseconds are logged. The :attr:`loop." "slow_callback_duration` attribute can be used to set the minimum execution " "duration in seconds that is considered \"slow\"." msgstr "" +"les fonctions de rappel prenant plus de 100 ms sont journalisées ; " +"l'attribut :attr:`loop.slow_callback_duration` peut être utilisé pour " +"changer la limite (en secondes) après laquelle une fonction de rappel est " +"considérée comme « lent »." #: library/asyncio-dev.rst:68 msgid "Concurrency and Multithreading" -msgstr "Concourance et *multithreading*" +msgstr "Programmation concurrente et multi-fils" #: library/asyncio-dev.rst:70 msgid "" @@ -120,12 +152,21 @@ msgid "" "``await`` expression, the running Task gets suspended, and the event loop " "executes the next Task." msgstr "" +"Une boucle d'évènements s'exécute dans un fil d’exécution (typiquement dans " +"le fil principal) et traite toutes les fonctions de rappel (*callbacks*) " +"ainsi que toutes les tâches dans ce même fil. Lorsqu'une tâche est en cours " +"d'exécution dans la boucle d'évènements, aucune autre tâche ne peut " +"s'exécuter dans ce fil. Quand une tâche traite une expression ``await``, " +"elle se suspend et laisse la boucle d’évènements traiter la tâche suivante." #: library/asyncio-dev.rst:76 msgid "" "To schedule a :term:`callback` from another OS thread, the :meth:`loop." "call_soon_threadsafe` method should be used. Example::" msgstr "" +"Pour planifier un :term:`rappel ` depuis un autre fil d'exécution " +"système, utilisez la méthode :meth:`loop.call_soon_threadsafe`. Par " +"exemple ::" #: library/asyncio-dev.rst:81 msgid "" @@ -134,6 +175,12 @@ msgid "" "a callback. If there's a need for such code to call a low-level asyncio " "API, the :meth:`loop.call_soon_threadsafe` method should be used, e.g.::" msgstr "" +"La plupart des objets *asyncio* ne sont pas conçus pour être exécutés dans " +"un contexte multi-fils (*thread-safe*) mais cela n'est en général pas un " +"problème à moins que l'objet ne fasse appel à du code se trouvant en dehors " +"d'une tâche ou d'une fonction de rappel. Dans ce dernier cas, si le code " +"appelle les *API* bas niveau de *asyncio*, utilisez la méthode :meth:`loop." +"call_soon_threadsafe`. Par exemple ::" #: library/asyncio-dev.rst:89 msgid "" @@ -141,12 +188,17 @@ msgid "" "`run_coroutine_threadsafe` function should be used. It returns a :class:" "`concurrent.futures.Future` to access the result::" msgstr "" +"Pour planifier un objet concurrent depuis un autre fil d'exécution système, " +"utilisez :func:`run_coroutine_threadsafe`. Cette fonction renvoie un objet :" +"class:`concurrent.futures.Future` pour accéder au résultat ::" #: library/asyncio-dev.rst:102 msgid "" "To handle signals and to execute subprocesses, the event loop must be run in " "the main thread." msgstr "" +"Pour pouvoir traiter les signaux et démarrer des processus enfants, la " +"boucle d'évènements doit être exécutée dans le fil principal." #: library/asyncio-dev.rst:105 msgid "" @@ -155,6 +207,10 @@ msgid "" "different OS thread without blocking the OS thread that the event loop runs " "in." msgstr "" +"La méthode :meth:`loop.run_in_executor` peut être utilisée avec :class:" +"`concurrent.futures.ThreadPoolExecutor` pour exécuter du code bloquant dans " +"un autre fil d'exécution, afin de ne pas bloquer le fil où la boucle " +"d'évènements se trouve." #: library/asyncio-dev.rst:110 msgid "" @@ -168,10 +224,21 @@ msgid "" "a :class:`concurrent.futures.ProcessPoolExecutor` to execute code in a " "different process." msgstr "" +"Il n'y a actuellement aucune façon de planifier des coroutines ou des " +"rappels directement depuis un autre processus (comme, par exemple, un " +"processus démarré avec :mod:`multiprocessing`). La section :ref:`Méthodes de " +"la boucle d'évènements ` liste les *API* pouvant lire " +"les tubes (*pipes*) et surveiller les descripteurs de fichiers sans bloquer " +"la boucle d'évènements. De plus, les *API* :ref:`Subprocess ` d'*asyncio* fournissent un moyen de démarrer un processus et de " +"communiquer avec lui depuis la boucle d'évènements. Enfin, la méthode :meth:" +"`loop.run_in_executor` peut également être utilisée avec :class:`concurrent." +"futures.ProcessPoolExecutor` pour exécuter du code dans un processus " +"différent." #: library/asyncio-dev.rst:124 msgid "Running Blocking Code" -msgstr "" +msgstr "Exécution de code bloquant" #: library/asyncio-dev.rst:126 msgid "" @@ -179,6 +246,11 @@ msgid "" "function performs a CPU-intensive calculation for 1 second, all concurrent " "asyncio Tasks and IO operations would be delayed by 1 second." msgstr "" +"Du code bloquant sur des opérations de calcul (*CPU-bound*) ne devrait pas " +"être appelé directement. Par exemple, si une fonction effectue des calculs " +"utilisant le CPU intensivement pendant une seconde, toutes les tâches " +"*asyncio* concurrentes et les opérations d'entrées-sorties seront bloquées " +"pour une seconde." #: library/asyncio-dev.rst:131 msgid "" @@ -186,6 +258,10 @@ msgid "" "different process to avoid blocking the OS thread with the event loop. See " "the :meth:`loop.run_in_executor` method for more details." msgstr "" +"Un exécuteur peut être utilisé pour traiter une tâche dans un fil " +"d'exécution ou un processus différent, afin d'éviter de bloquer le fil " +"d'exécution système dans lequel se trouve la boucle d’évènements. Voir :meth:" +"`loop.run_in_executor` pour plus de détails." #: library/asyncio-dev.rst:140 msgid "Logging" @@ -196,16 +272,20 @@ msgid "" "asyncio uses the :mod:`logging` module and all logging is performed via the " "``\"asyncio\"`` logger." msgstr "" +"*Asyncio* utilise le module :mod:`logging`. Toutes les opérations de " +"journalisation sont effectuées via l'enregistreur (*logger*) ``\"asyncio\"``." #: library/asyncio-dev.rst:145 msgid "" "The default log level is :py:data:`logging.INFO`, which can be easily " "adjusted::" msgstr "" +"Le niveau de journalisation par défaut est :py:data:`logging.INFO` mais peut " +"être ajusté facilement ::" #: library/asyncio-dev.rst:154 msgid "Detect never-awaited coroutines" -msgstr "" +msgstr "Détection des coroutines jamais attendues" #: library/asyncio-dev.rst:156 msgid "" @@ -213,6 +293,10 @@ msgid "" "instead of ``await coro()``) or the coroutine is not scheduled with :meth:" "`asyncio.create_task`, asyncio will emit a :exc:`RuntimeWarning`::" msgstr "" +"Lorsqu'une fonction coroutine est appelée mais qu'elle n'est pas attendue " +"(p. ex. ``coro()`` au lieu de ``await coro()``) ou si la coroutine n'est " +"pas planifiée avec :meth:`asyncio.create_task`, *asyncio* émet un :exc:" +"`RuntimeWarning` ::" #: library/asyncio-dev.rst:216 msgid "Output::" @@ -227,10 +311,12 @@ msgid "" "The usual fix is to either await the coroutine or call the :meth:`asyncio." "create_task` function::" msgstr "" +"La façon habituelle de régler ce problème est d'attendre (*await*) la " +"coroutine ou bien d'appeler la fonction :meth:`asyncio.create_task` ::" #: library/asyncio-dev.rst:197 msgid "Detect never-retrieved exceptions" -msgstr "" +msgstr "Détection des exceptions jamais récupérées" #: library/asyncio-dev.rst:199 msgid "" @@ -239,13 +325,19 @@ msgid "" "this case, asyncio would emit a log message when the Future object is " "garbage collected." msgstr "" +"Si la méthode :meth:`Future.set_exception` est appelée mais que l'objet " +"*Future* n'est pas attendu, l'exception n'est pas propagée au code " +"utilisateur. Dans ce cas, *asyncio* écrit un message dans le journal lorsque " +"l'objet *Future* est récupéré par le ramasse-miette." #: library/asyncio-dev.rst:204 msgid "Example of an unhandled exception::" -msgstr "" +msgstr "Exemple d'une exception non-gérée ::" #: library/asyncio-dev.rst:227 msgid "" ":ref:`Enable the debug mode ` to get the traceback where " "the task was created::" msgstr "" +":ref:`Activez le mode débogage ` pour récupérer la trace " +"d'appels indiquant où la tâche a été créée ::" diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index 32b59e959c..9edd9b57fc 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-29 16:33+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: 2019-06-10 15:50+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -90,92 +90,98 @@ msgid "" "level functions to manually create and close an event loop." msgstr "" -#: library/asyncio-eventloop.rst:58 +#: library/asyncio-eventloop.rst:56 +msgid "" +"Deprecation warning is emitted if there is no running event loop. In future " +"Python releases, this function will be an alias of :func:`get_running_loop`." +msgstr "" + +#: library/asyncio-eventloop.rst:63 msgid "Set *loop* as a current event loop for the current OS thread." msgstr "" -#: library/asyncio-eventloop.rst:62 -msgid "Create a new event loop object." +#: library/asyncio-eventloop.rst:67 +msgid "Create and return a new event loop object." msgstr "" -#: library/asyncio-eventloop.rst:64 +#: library/asyncio-eventloop.rst:69 msgid "" "Note that the behaviour of :func:`get_event_loop`, :func:`set_event_loop`, " "and :func:`new_event_loop` functions can be altered by :ref:`setting a " "custom event loop policy `." msgstr "" -#: library/asyncio-eventloop.rst:70 +#: library/asyncio-eventloop.rst:75 msgid "Contents" msgstr "Sommaire" -#: library/asyncio-eventloop.rst:71 +#: library/asyncio-eventloop.rst:76 msgid "This documentation page contains the following sections:" msgstr "" -#: library/asyncio-eventloop.rst:73 +#: library/asyncio-eventloop.rst:78 msgid "" "The `Event Loop Methods`_ section is the reference documentation of the " "event loop APIs;" msgstr "" -#: library/asyncio-eventloop.rst:76 +#: library/asyncio-eventloop.rst:81 msgid "" "The `Callback Handles`_ section documents the :class:`Handle` and :class:" "`TimerHandle` instances which are returned from scheduling methods such as :" "meth:`loop.call_soon` and :meth:`loop.call_later`;" msgstr "" -#: library/asyncio-eventloop.rst:80 +#: library/asyncio-eventloop.rst:85 msgid "" "The `Server Objects`_ section documents types returned from event loop " "methods like :meth:`loop.create_server`;" msgstr "" -#: library/asyncio-eventloop.rst:83 +#: library/asyncio-eventloop.rst:88 msgid "" "The `Event Loop Implementations`_ section documents the :class:" "`SelectorEventLoop` and :class:`ProactorEventLoop` classes;" msgstr "" -#: library/asyncio-eventloop.rst:86 +#: library/asyncio-eventloop.rst:91 msgid "" "The `Examples`_ section showcases how to work with some event loop APIs." msgstr "" -#: library/asyncio-eventloop.rst:93 +#: library/asyncio-eventloop.rst:98 msgid "Event Loop Methods" msgstr "Méthodes de la boucle d'évènements" -#: library/asyncio-eventloop.rst:95 +#: library/asyncio-eventloop.rst:100 msgid "Event loops have **low-level** APIs for the following:" msgstr "" -#: library/asyncio-eventloop.rst:103 +#: library/asyncio-eventloop.rst:108 msgid "Running and stopping the loop" msgstr "Démarrer et arrêter une boucle d'évènements" -#: library/asyncio-eventloop.rst:107 +#: library/asyncio-eventloop.rst:112 msgid "Run until the *future* (an instance of :class:`Future`) has completed." msgstr "" "Lance la boucle jusqu'à ce que *future* (une instance de :class:`Future`) " "soit terminée." -#: library/asyncio-eventloop.rst:110 +#: library/asyncio-eventloop.rst:115 msgid "" "If the argument is a :ref:`coroutine object ` it is implicitly " "scheduled to run as a :class:`asyncio.Task`." msgstr "" -#: library/asyncio-eventloop.rst:113 +#: library/asyncio-eventloop.rst:118 msgid "Return the Future's result or raise its exception." msgstr "" -#: library/asyncio-eventloop.rst:117 +#: library/asyncio-eventloop.rst:122 msgid "Run the event loop until :meth:`stop` is called." msgstr "" -#: library/asyncio-eventloop.rst:119 +#: library/asyncio-eventloop.rst:124 msgid "" "If :meth:`stop` is called before :meth:`run_forever()` is called, the loop " "will poll the I/O selector once with a timeout of zero, run all callbacks " @@ -183,7 +189,7 @@ msgid "" "and then exit." msgstr "" -#: library/asyncio-eventloop.rst:124 +#: library/asyncio-eventloop.rst:129 msgid "" "If :meth:`stop` is called while :meth:`run_forever` is running, the loop " "will run the current batch of callbacks and then exit. Note that new " @@ -192,41 +198,41 @@ msgid "" "called." msgstr "" -#: library/asyncio-eventloop.rst:132 +#: library/asyncio-eventloop.rst:137 msgid "Stop the event loop." msgstr "Arrête l'exécution de la boucle d'évènements." -#: library/asyncio-eventloop.rst:136 +#: library/asyncio-eventloop.rst:141 msgid "Return ``True`` if the event loop is currently running." msgstr "Renvoie ``True`` si la boucle d'évènements est démarrée." -#: library/asyncio-eventloop.rst:140 +#: library/asyncio-eventloop.rst:145 msgid "Return ``True`` if the event loop was closed." msgstr "Renvoie ``True`` si la boucle d'évènements est arrêtée." -#: library/asyncio-eventloop.rst:144 +#: library/asyncio-eventloop.rst:149 msgid "Close the event loop." msgstr "Arrête la boucle d'évènements." -#: library/asyncio-eventloop.rst:146 +#: library/asyncio-eventloop.rst:151 msgid "" "The loop must not be running when this function is called. Any pending " "callbacks will be discarded." msgstr "" -#: library/asyncio-eventloop.rst:149 +#: library/asyncio-eventloop.rst:154 msgid "" "This method clears all queues and shuts down the executor, but does not wait " "for the executor to finish." msgstr "" -#: library/asyncio-eventloop.rst:152 +#: library/asyncio-eventloop.rst:157 msgid "" "This method is idempotent and irreversible. No other methods should be " "called after the event loop is closed." msgstr "" -#: library/asyncio-eventloop.rst:157 +#: library/asyncio-eventloop.rst:162 msgid "" "Schedule all currently open :term:`asynchronous generator` objects to close " "with an :meth:`~agen.aclose()` call. After calling this method, the event " @@ -234,18 +240,18 @@ msgid "" "should be used to reliably finalize all scheduled asynchronous generators." msgstr "" -#: library/asyncio-eventloop.rst:163 library/asyncio-eventloop.rst:183 +#: library/asyncio-eventloop.rst:168 library/asyncio-eventloop.rst:188 msgid "" "Note that there is no need to call this function when :func:`asyncio.run` is " "used." msgstr "" -#: library/asyncio-eventloop.rst:166 library/asyncio-eventloop.rst:1074 -#: library/asyncio-eventloop.rst:1456 +#: library/asyncio-eventloop.rst:171 library/asyncio-eventloop.rst:1170 +#: library/asyncio-eventloop.rst:1552 msgid "Example::" msgstr "Exemple ::" -#: library/asyncio-eventloop.rst:178 +#: library/asyncio-eventloop.rst:183 msgid "" "Schedule the closure of the default executor and wait for it to join all of " "the threads in the :class:`ThreadPoolExecutor`. After calling this method, " @@ -253,46 +259,52 @@ msgid "" "called while using the default executor." msgstr "" -#: library/asyncio-eventloop.rst:190 +#: library/asyncio-eventloop.rst:195 msgid "Scheduling callbacks" msgstr "" -#: library/asyncio-eventloop.rst:194 +#: library/asyncio-eventloop.rst:199 msgid "" "Schedule the *callback* :term:`callback` to be called with *args* arguments " "at the next iteration of the event loop." msgstr "" -#: library/asyncio-eventloop.rst:197 +#: library/asyncio-eventloop.rst:202 msgid "" "Callbacks are called in the order in which they are registered. Each " "callback will be called exactly once." msgstr "" -#: library/asyncio-eventloop.rst:200 library/asyncio-eventloop.rst:263 +#: library/asyncio-eventloop.rst:205 library/asyncio-eventloop.rst:272 msgid "" "An optional keyword-only *context* argument allows specifying a custom :" "class:`contextvars.Context` for the *callback* to run in. The current " "context is used when no *context* is provided." msgstr "" -#: library/asyncio-eventloop.rst:204 +#: library/asyncio-eventloop.rst:209 msgid "" "An instance of :class:`asyncio.Handle` is returned, which can be used later " "to cancel the callback." msgstr "" -#: library/asyncio-eventloop.rst:207 +#: library/asyncio-eventloop.rst:212 msgid "This method is not thread-safe." msgstr "" -#: library/asyncio-eventloop.rst:211 +#: library/asyncio-eventloop.rst:216 msgid "" "A thread-safe variant of :meth:`call_soon`. Must be used to schedule " "callbacks *from another thread*." msgstr "" -#: library/asyncio-eventloop.rst:214 +#: library/asyncio-eventloop.rst:219 +msgid "" +"Raises :exc:`RuntimeError` if called on a loop that's been closed. This can " +"happen on a secondary thread when the main application is shutting down." +msgstr "" + +#: library/asyncio-eventloop.rst:223 msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." @@ -300,223 +312,236 @@ msgstr "" "Voir la section :ref:`exécution concurrente et multi-fils d'exécution " "` de la documentation." -#: library/asyncio-eventloop.rst:217 library/asyncio-eventloop.rst:267 -#: library/asyncio-eventloop.rst:287 +#: library/asyncio-eventloop.rst:226 library/asyncio-eventloop.rst:276 +#: library/asyncio-eventloop.rst:296 msgid "" "The *context* keyword-only parameter was added. See :pep:`567` for more " "details." msgstr "" -#: library/asyncio-eventloop.rst:225 +#: library/asyncio-eventloop.rst:234 msgid "" "Most :mod:`asyncio` scheduling functions don't allow passing keyword " "arguments. To do that, use :func:`functools.partial`::" msgstr "" -#: library/asyncio-eventloop.rst:232 +#: library/asyncio-eventloop.rst:241 msgid "" "Using partial objects is usually more convenient than using lambdas, as " "asyncio can render partial objects better in debug and error messages." msgstr "" -#: library/asyncio-eventloop.rst:240 +#: library/asyncio-eventloop.rst:249 msgid "Scheduling delayed callbacks" msgstr "" -#: library/asyncio-eventloop.rst:242 +#: library/asyncio-eventloop.rst:251 msgid "" "Event loop provides mechanisms to schedule callback functions to be called " "at some point in the future. Event loop uses monotonic clocks to track time." msgstr "" -#: library/asyncio-eventloop.rst:249 +#: library/asyncio-eventloop.rst:258 msgid "" "Schedule *callback* to be called after the given *delay* number of seconds " "(can be either an int or a float)." msgstr "" -#: library/asyncio-eventloop.rst:252 library/asyncio-eventloop.rst:284 +#: library/asyncio-eventloop.rst:261 library/asyncio-eventloop.rst:293 msgid "" "An instance of :class:`asyncio.TimerHandle` is returned which can be used to " "cancel the callback." msgstr "" -#: library/asyncio-eventloop.rst:255 +#: library/asyncio-eventloop.rst:264 msgid "" "*callback* will be called exactly once. If two callbacks are scheduled for " "exactly the same time, the order in which they are called is undefined." msgstr "" -#: library/asyncio-eventloop.rst:259 +#: library/asyncio-eventloop.rst:268 msgid "" "The optional positional *args* will be passed to the callback when it is " "called. If you want the callback to be called with keyword arguments use :" "func:`functools.partial`." msgstr "" -#: library/asyncio-eventloop.rst:271 +#: library/asyncio-eventloop.rst:280 msgid "" "In Python 3.7 and earlier with the default event loop implementation, the " "*delay* could not exceed one day. This has been fixed in Python 3.8." msgstr "" -#: library/asyncio-eventloop.rst:278 +#: library/asyncio-eventloop.rst:287 msgid "" "Schedule *callback* to be called at the given absolute timestamp *when* (an " "int or a float), using the same time reference as :meth:`loop.time`." msgstr "" -#: library/asyncio-eventloop.rst:282 +#: library/asyncio-eventloop.rst:291 msgid "This method's behavior is the same as :meth:`call_later`." msgstr "" -#: library/asyncio-eventloop.rst:291 +#: library/asyncio-eventloop.rst:300 msgid "" "In Python 3.7 and earlier with the default event loop implementation, the " "difference between *when* and the current time could not exceed one day. " "This has been fixed in Python 3.8." msgstr "" -#: library/asyncio-eventloop.rst:298 +#: library/asyncio-eventloop.rst:307 msgid "" "Return the current time, as a :class:`float` value, according to the event " "loop's internal monotonic clock." msgstr "" -#: library/asyncio-eventloop.rst:302 +#: library/asyncio-eventloop.rst:311 msgid "" "In Python 3.7 and earlier timeouts (relative *delay* or absolute *when*) " "should not exceed one day. This has been fixed in Python 3.8." msgstr "" -#: library/asyncio-eventloop.rst:308 +#: library/asyncio-eventloop.rst:317 msgid "The :func:`asyncio.sleep` function." msgstr "La fonction :func:`asyncio.sleep`." -#: library/asyncio-eventloop.rst:312 +#: library/asyncio-eventloop.rst:321 msgid "Creating Futures and Tasks" msgstr "" -#: library/asyncio-eventloop.rst:316 +#: library/asyncio-eventloop.rst:325 msgid "Create an :class:`asyncio.Future` object attached to the event loop." msgstr "" -#: library/asyncio-eventloop.rst:318 +#: library/asyncio-eventloop.rst:327 msgid "" "This is the preferred way to create Futures in asyncio. This lets third-" "party event loops provide alternative implementations of the Future object " "(with better performance or instrumentation)." msgstr "" -#: library/asyncio-eventloop.rst:326 +#: library/asyncio-eventloop.rst:335 msgid "" "Schedule the execution of a :ref:`coroutine`. Return a :class:`Task` object." msgstr "" -#: library/asyncio-eventloop.rst:329 +#: library/asyncio-eventloop.rst:338 msgid "" "Third-party event loops can use their own subclass of :class:`Task` for " "interoperability. In this case, the result type is a subclass of :class:" "`Task`." msgstr "" -#: library/asyncio-eventloop.rst:333 +#: library/asyncio-eventloop.rst:342 msgid "" "If the *name* argument is provided and not ``None``, it is set as the name " "of the task using :meth:`Task.set_name`." msgstr "" -#: library/asyncio-eventloop.rst:336 -msgid "Added the ``name`` parameter." +#: library/asyncio-eventloop.rst:345 +msgid "" +"An optional keyword-only *context* argument allows specifying a custom :" +"class:`contextvars.Context` for the *coro* to run in. The current context " +"copy is created when no *context* is provided." +msgstr "" + +#: library/asyncio-eventloop.rst:349 +#, fuzzy +msgid "Added the *name* parameter." +msgstr "ajout du paramètre ``name``." + +#: library/asyncio-eventloop.rst:352 +#, fuzzy +msgid "Added the *context* parameter." msgstr "ajout du paramètre ``name``." -#: library/asyncio-eventloop.rst:341 +#: library/asyncio-eventloop.rst:357 msgid "Set a task factory that will be used by :meth:`loop.create_task`." msgstr "" -#: library/asyncio-eventloop.rst:344 +#: library/asyncio-eventloop.rst:360 msgid "" "If *factory* is ``None`` the default task factory will be set. Otherwise, " -"*factory* must be a *callable* with the signature matching ``(loop, coro)``, " -"where *loop* is a reference to the active event loop, and *coro* is a " -"coroutine object. The callable must return a :class:`asyncio.Future`-" -"compatible object." +"*factory* must be a *callable* with the signature matching ``(loop, coro, " +"context=None)``, where *loop* is a reference to the active event loop, and " +"*coro* is a coroutine object. The callable must return a :class:`asyncio." +"Future`-compatible object." msgstr "" -#: library/asyncio-eventloop.rst:352 +#: library/asyncio-eventloop.rst:368 msgid "Return a task factory or ``None`` if the default one is in use." msgstr "" -#: library/asyncio-eventloop.rst:356 +#: library/asyncio-eventloop.rst:372 msgid "Opening network connections" msgstr "Créer des connexions" -#: library/asyncio-eventloop.rst:365 +#: library/asyncio-eventloop.rst:382 msgid "" "Open a streaming transport connection to a given address specified by *host* " "and *port*." msgstr "" -#: library/asyncio-eventloop.rst:368 +#: library/asyncio-eventloop.rst:385 msgid "" "The socket family can be either :py:data:`~socket.AF_INET` or :py:data:" "`~socket.AF_INET6` depending on *host* (or the *family* argument, if " "provided)." msgstr "" -#: library/asyncio-eventloop.rst:372 +#: library/asyncio-eventloop.rst:389 msgid "The socket type will be :py:data:`~socket.SOCK_STREAM`." msgstr "" -#: library/asyncio-eventloop.rst:374 library/asyncio-eventloop.rst:990 -#: library/asyncio-eventloop.rst:1006 +#: library/asyncio-eventloop.rst:391 library/asyncio-eventloop.rst:1086 +#: library/asyncio-eventloop.rst:1102 msgid "" "*protocol_factory* must be a callable returning an :ref:`asyncio protocol " "` implementation." msgstr "" -#: library/asyncio-eventloop.rst:377 +#: library/asyncio-eventloop.rst:394 msgid "" "This method will try to establish the connection in the background. When " "successful, it returns a ``(transport, protocol)`` pair." msgstr "" -#: library/asyncio-eventloop.rst:380 +#: library/asyncio-eventloop.rst:397 msgid "The chronological synopsis of the underlying operation is as follows:" msgstr "" -#: library/asyncio-eventloop.rst:382 +#: library/asyncio-eventloop.rst:399 msgid "" "The connection is established and a :ref:`transport ` is " "created for it." msgstr "" -#: library/asyncio-eventloop.rst:385 +#: library/asyncio-eventloop.rst:402 msgid "" "*protocol_factory* is called without arguments and is expected to return a :" "ref:`protocol ` instance." msgstr "" -#: library/asyncio-eventloop.rst:388 +#: library/asyncio-eventloop.rst:405 msgid "" "The protocol instance is coupled with the transport by calling its :meth:" "`~BaseProtocol.connection_made` method." msgstr "" -#: library/asyncio-eventloop.rst:391 +#: library/asyncio-eventloop.rst:408 msgid "A ``(transport, protocol)`` tuple is returned on success." msgstr "" -#: library/asyncio-eventloop.rst:393 +#: library/asyncio-eventloop.rst:410 msgid "" "The created transport is an implementation-dependent bidirectional stream." msgstr "" -#: library/asyncio-eventloop.rst:396 library/asyncio-eventloop.rst:518 +#: library/asyncio-eventloop.rst:413 library/asyncio-eventloop.rst:528 msgid "Other arguments:" msgstr "" -#: library/asyncio-eventloop.rst:398 +#: library/asyncio-eventloop.rst:415 msgid "" "*ssl*: if given and not false, a SSL/TLS transport is created (by default a " "plain TCP transport is created). If *ssl* is a :class:`ssl.SSLContext` " @@ -525,11 +550,11 @@ msgid "" "is used." msgstr "" -#: library/asyncio-eventloop.rst:404 +#: library/asyncio-eventloop.rst:421 msgid ":ref:`SSL/TLS security considerations `" msgstr "" -#: library/asyncio-eventloop.rst:406 +#: library/asyncio-eventloop.rst:423 msgid "" "*server_hostname* sets or overrides the hostname that the target server's " "certificate will be matched against. Should only be passed if *ssl* is not " @@ -540,7 +565,7 @@ msgid "" "potential man-in-the-middle attacks)." msgstr "" -#: library/asyncio-eventloop.rst:414 +#: library/asyncio-eventloop.rst:431 msgid "" "*family*, *proto*, *flags* are the optional address family, protocol and " "flags to be passed through to getaddrinfo() for *host* resolution. If given, " @@ -548,28 +573,28 @@ msgid "" "constants." msgstr "" -#: library/asyncio-eventloop.rst:419 +#: library/asyncio-eventloop.rst:436 msgid "" "*happy_eyeballs_delay*, if given, enables Happy Eyeballs for this " "connection. It should be a floating-point number representing the amount of " "time in seconds to wait for a connection attempt to complete, before " -"starting the next attempt in parallel. This is the \"Connection Attempt Delay" -"\" as defined in :rfc:`8305`. A sensible default value recommended by the " -"RFC is ``0.25`` (250 milliseconds)." +"starting the next attempt in parallel. This is the \"Connection Attempt " +"Delay\" as defined in :rfc:`8305`. A sensible default value recommended by " +"the RFC is ``0.25`` (250 milliseconds)." msgstr "" -#: library/asyncio-eventloop.rst:427 +#: library/asyncio-eventloop.rst:444 msgid "" "*interleave* controls address reordering when a host name resolves to " "multiple IP addresses. If ``0`` or unspecified, no reordering is done, and " "addresses are tried in the order returned by :meth:`getaddrinfo`. If a " "positive integer is specified, the addresses are interleaved by address " -"family, and the given integer is interpreted as \"First Address Family Count" -"\" as defined in :rfc:`8305`. The default is ``0`` if *happy_eyeballs_delay* " -"is not specified, and ``1`` if it is." +"family, and the given integer is interpreted as \"First Address Family " +"Count\" as defined in :rfc:`8305`. The default is ``0`` if " +"*happy_eyeballs_delay* is not specified, and ``1`` if it is." msgstr "" -#: library/asyncio-eventloop.rst:436 +#: library/asyncio-eventloop.rst:453 msgid "" "*sock*, if given, should be an existing, already connected :class:`socket." "socket` object to be used by the transport. If *sock* is given, none of " @@ -577,25 +602,48 @@ msgid "" "*interleave* and *local_addr* should be specified." msgstr "" -#: library/asyncio-eventloop.rst:442 +#: library/asyncio-eventloop.rst:459 msgid "" "*local_addr*, if given, is a ``(local_host, local_port)`` tuple used to bind " "the socket locally. The *local_host* and *local_port* are looked up using " "``getaddrinfo()``, similarly to *host* and *port*." msgstr "" -#: library/asyncio-eventloop.rst:446 library/asyncio-eventloop.rst:799 +#: library/asyncio-eventloop.rst:463 library/asyncio-eventloop.rst:851 msgid "" "*ssl_handshake_timeout* is (for a TLS connection) the time in seconds to " "wait for the TLS handshake to complete before aborting the connection. " "``60.0`` seconds if ``None`` (default)." msgstr "" -#: library/asyncio-eventloop.rst:452 +#: library/asyncio-eventloop.rst:467 library/asyncio-eventloop.rst:688 +#: library/asyncio-eventloop.rst:776 library/asyncio-eventloop.rst:855 +msgid "" +"*ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown " +"to complete before aborting the connection. ``30.0`` seconds if ``None`` " +"(default)." +msgstr "" + +#: library/asyncio-eventloop.rst:473 library/asyncio-eventloop.rst:700 +msgid "Added support for SSL/TLS in :class:`ProactorEventLoop`." +msgstr "" + +#: library/asyncio-eventloop.rst:477 +msgid "" +"The socket option :py:data:`~socket.TCP_NODELAY` is set by default for all " +"TCP connections." +msgstr "" + +#: library/asyncio-eventloop.rst:482 library/asyncio-eventloop.rst:786 +#, fuzzy +msgid "Added the *ssl_handshake_timeout* parameter." +msgstr "ajout du paramètre ``name``." + +#: library/asyncio-eventloop.rst:486 msgid "Added the *happy_eyeballs_delay* and *interleave* parameters." msgstr "" -#: library/asyncio-eventloop.rst:454 +#: library/asyncio-eventloop.rst:488 msgid "" "Happy Eyeballs Algorithm: Success with Dual-Stack Hosts. When a server's " "IPv4 path and protocol are working, but the server's IPv6 path and protocol " @@ -606,95 +654,65 @@ msgid "" "visible delay and provides an algorithm." msgstr "" -#: library/asyncio-eventloop.rst:463 +#: library/asyncio-eventloop.rst:497 msgid "For more information: https://tools.ietf.org/html/rfc6555" msgstr "" -#: library/asyncio-eventloop.rst:467 library/asyncio-eventloop.rst:584 -#: library/asyncio-eventloop.rst:737 -msgid "The *ssl_handshake_timeout* parameter." -msgstr "" - -#: library/asyncio-eventloop.rst:471 library/asyncio-eventloop.rst:667 -msgid "" -"The socket option :py:data:`~socket.TCP_NODELAY` is set by default for all " -"TCP connections." -msgstr "" - -#: library/asyncio-eventloop.rst:476 library/asyncio-eventloop.rst:672 -msgid "Added support for SSL/TLS in :class:`ProactorEventLoop`." -msgstr "" +#: library/asyncio-eventloop.rst:501 library/asyncio-eventloop.rst:614 +#: library/asyncio-eventloop.rst:714 library/asyncio-eventloop.rst:749 +#: library/asyncio-eventloop.rst:790 library/asyncio-eventloop.rst:863 +#, fuzzy +msgid "Added the *ssl_shutdown_timeout* parameter." +msgstr "ajout du paramètre ``name``." -#: library/asyncio-eventloop.rst:480 +#: library/asyncio-eventloop.rst:505 msgid "" "The :func:`open_connection` function is a high-level alternative API. It " "returns a pair of (:class:`StreamReader`, :class:`StreamWriter`) that can be " "used directly in async/await code." msgstr "" -#: library/asyncio-eventloop.rst:491 -msgid "" -"The parameter *reuse_address* is no longer supported, as using :py:data:" -"`~sockets.SO_REUSEADDR` poses a significant security concern for UDP. " -"Explicitly passing ``reuse_address=True`` will raise an exception." -msgstr "" - -#: library/asyncio-eventloop.rst:495 -msgid "" -"When multiple processes with differing UIDs assign sockets to an identical " -"UDP socket address with ``SO_REUSEADDR``, incoming packets can become " -"randomly distributed among the sockets." -msgstr "" - -#: library/asyncio-eventloop.rst:499 -msgid "" -"For supported platforms, *reuse_port* can be used as a replacement for " -"similar functionality. With *reuse_port*, :py:data:`~sockets.SO_REUSEPORT` " -"is used instead, which specifically prevents processes with differing UIDs " -"from assigning sockets to the same socket address." -msgstr "" - -#: library/asyncio-eventloop.rst:505 +#: library/asyncio-eventloop.rst:515 msgid "Create a datagram connection." msgstr "Créer une connexion par datagramme" -#: library/asyncio-eventloop.rst:507 +#: library/asyncio-eventloop.rst:517 msgid "" "The socket family can be either :py:data:`~socket.AF_INET`, :py:data:" "`~socket.AF_INET6`, or :py:data:`~socket.AF_UNIX`, depending on *host* (or " "the *family* argument, if provided)." msgstr "" -#: library/asyncio-eventloop.rst:511 +#: library/asyncio-eventloop.rst:521 msgid "The socket type will be :py:data:`~socket.SOCK_DGRAM`." msgstr "" -#: library/asyncio-eventloop.rst:513 library/asyncio-eventloop.rst:609 -#: library/asyncio-eventloop.rst:720 +#: library/asyncio-eventloop.rst:523 library/asyncio-eventloop.rst:637 +#: library/asyncio-eventloop.rst:763 msgid "" "*protocol_factory* must be a callable returning a :ref:`protocol ` implementation." msgstr "" -#: library/asyncio-eventloop.rst:516 library/asyncio-eventloop.rst:570 +#: library/asyncio-eventloop.rst:526 library/asyncio-eventloop.rst:596 msgid "A tuple of ``(transport, protocol)`` is returned on success." msgstr "" -#: library/asyncio-eventloop.rst:520 +#: library/asyncio-eventloop.rst:530 msgid "" "*local_addr*, if given, is a ``(local_host, local_port)`` tuple used to bind " "the socket locally. The *local_host* and *local_port* are looked up using :" "meth:`getaddrinfo`." msgstr "" -#: library/asyncio-eventloop.rst:524 +#: library/asyncio-eventloop.rst:534 msgid "" "*remote_addr*, if given, is a ``(remote_host, remote_port)`` tuple used to " "connect the socket to a remote address. The *remote_host* and *remote_port* " "are looked up using :meth:`getaddrinfo`." msgstr "" -#: library/asyncio-eventloop.rst:528 +#: library/asyncio-eventloop.rst:538 msgid "" "*family*, *proto*, *flags* are the optional address family, protocol and " "flags to be passed through to :meth:`getaddrinfo` for *host* resolution. If " @@ -702,7 +720,7 @@ msgid "" "module constants." msgstr "" -#: library/asyncio-eventloop.rst:533 +#: library/asyncio-eventloop.rst:543 msgid "" "*reuse_port* tells the kernel to allow this endpoint to be bound to the same " "port as other existing endpoints are bound to, so long as they all set this " @@ -711,13 +729,13 @@ msgid "" "this capability is unsupported." msgstr "" -#: library/asyncio-eventloop.rst:539 +#: library/asyncio-eventloop.rst:549 msgid "" "*allow_broadcast* tells the kernel to allow this endpoint to send messages " "to the broadcast address." msgstr "" -#: library/asyncio-eventloop.rst:542 +#: library/asyncio-eventloop.rst:552 msgid "" "*sock* can optionally be specified in order to use a preexisting, already " "connected, :class:`socket.socket` object to be used by the transport. If " @@ -725,155 +743,187 @@ msgid "" "`None`)." msgstr "" -#: library/asyncio-eventloop.rst:547 +#: library/asyncio-eventloop.rst:557 msgid "" "See :ref:`UDP echo client protocol ` and :" "ref:`UDP echo server protocol ` examples." msgstr "" -#: library/asyncio-eventloop.rst:550 +#: library/asyncio-eventloop.rst:560 msgid "" -"The *family*, *proto*, *flags*, *reuse_address*, *reuse_port, " +"The *family*, *proto*, *flags*, *reuse_address*, *reuse_port*, " "*allow_broadcast*, and *sock* parameters were added." msgstr "" -#: library/asyncio-eventloop.rst:554 +#: library/asyncio-eventloop.rst:564 +msgid "" +"The *reuse_address* parameter is no longer supported, as using :py:data:" +"`~sockets.SO_REUSEADDR` poses a significant security concern for UDP. " +"Explicitly passing ``reuse_address=True`` will raise an exception." +msgstr "" + +#: library/asyncio-eventloop.rst:569 msgid "" -"The *reuse_address* parameter is no longer supported due to security " -"concerns." +"When multiple processes with differing UIDs assign sockets to an identical " +"UDP socket address with ``SO_REUSEADDR``, incoming packets can become " +"randomly distributed among the sockets." msgstr "" -#: library/asyncio-eventloop.rst:558 +#: library/asyncio-eventloop.rst:573 +msgid "" +"For supported platforms, *reuse_port* can be used as a replacement for " +"similar functionality. With *reuse_port*, :py:data:`~sockets.SO_REUSEPORT` " +"is used instead, which specifically prevents processes with differing UIDs " +"from assigning sockets to the same socket address." +msgstr "" + +#: library/asyncio-eventloop.rst:579 msgid "Added support for Windows." msgstr "Prise en charge sur Windows." -#: library/asyncio-eventloop.rst:565 +#: library/asyncio-eventloop.rst:582 +msgid "" +"The *reuse_address* parameter, disabled since Python 3.9.0, 3.8.1, 3.7.6 and " +"3.6.10, has been entirely removed." +msgstr "" + +#: library/asyncio-eventloop.rst:591 msgid "Create a Unix connection." msgstr "Créer une connexion Unix" -#: library/asyncio-eventloop.rst:567 +#: library/asyncio-eventloop.rst:593 msgid "" "The socket family will be :py:data:`~socket.AF_UNIX`; socket type will be :" "py:data:`~socket.SOCK_STREAM`." msgstr "" -#: library/asyncio-eventloop.rst:572 +#: library/asyncio-eventloop.rst:598 msgid "" "*path* is the name of a Unix domain socket and is required, unless a *sock* " "parameter is specified. Abstract Unix sockets, :class:`str`, :class:" "`bytes`, and :class:`~pathlib.Path` paths are supported." msgstr "" -#: library/asyncio-eventloop.rst:577 +#: library/asyncio-eventloop.rst:603 msgid "" "See the documentation of the :meth:`loop.create_connection` method for " "information about arguments to this method." msgstr "" -#: library/asyncio-eventloop.rst:581 library/asyncio-eventloop.rst:701 -#: library/asyncio-eventloop.rst:1057 +#: library/asyncio-eventloop.rst:607 library/asyncio-eventloop.rst:741 +#: library/asyncio-eventloop.rst:1153 msgid ":ref:`Availability `: Unix." msgstr ":ref:`Disponibilité ` : Unix." -#: library/asyncio-eventloop.rst:588 -msgid "The *path* parameter can now be a :term:`path-like object`." +#: library/asyncio-eventloop.rst:608 +msgid "" +"Added the *ssl_handshake_timeout* parameter. The *path* parameter can now be " +"a :term:`path-like object`." msgstr "" -#: library/asyncio-eventloop.rst:592 +#: library/asyncio-eventloop.rst:618 msgid "Creating network servers" msgstr "Créer des serveurs" -#: library/asyncio-eventloop.rst:602 +#: library/asyncio-eventloop.rst:630 msgid "" "Create a TCP server (socket type :data:`~socket.SOCK_STREAM`) listening on " "*port* of the *host* address." msgstr "" -#: library/asyncio-eventloop.rst:605 +#: library/asyncio-eventloop.rst:633 msgid "Returns a :class:`Server` object." msgstr "" -#: library/asyncio-eventloop.rst:607 +#: library/asyncio-eventloop.rst:635 #, fuzzy msgid "Arguments:" msgstr "Arguments" -#: library/asyncio-eventloop.rst:612 +#: library/asyncio-eventloop.rst:640 msgid "" "The *host* parameter can be set to several types which determine where the " "server would be listening:" msgstr "" -#: library/asyncio-eventloop.rst:615 +#: library/asyncio-eventloop.rst:643 msgid "" "If *host* is a string, the TCP server is bound to a single network interface " "specified by *host*." msgstr "" -#: library/asyncio-eventloop.rst:618 +#: library/asyncio-eventloop.rst:646 msgid "" "If *host* is a sequence of strings, the TCP server is bound to all network " "interfaces specified by the sequence." msgstr "" -#: library/asyncio-eventloop.rst:621 +#: library/asyncio-eventloop.rst:649 msgid "" "If *host* is an empty string or ``None``, all interfaces are assumed and a " "list of multiple sockets will be returned (most likely one for IPv4 and " "another one for IPv6)." msgstr "" -#: library/asyncio-eventloop.rst:625 +#: library/asyncio-eventloop.rst:653 +msgid "" +"The *port* parameter can be set to specify which port the server should " +"listen on. If ``0`` or ``None`` (the default), a random unused port will be " +"selected (note that if *host* resolves to multiple network interfaces, a " +"different random port will be selected for each interface)." +msgstr "" + +#: library/asyncio-eventloop.rst:658 msgid "" "*family* can be set to either :data:`socket.AF_INET` or :data:`~socket." "AF_INET6` to force the socket to use IPv4 or IPv6. If not set, the *family* " "will be determined from host name (defaults to :data:`~socket.AF_UNSPEC`)." msgstr "" -#: library/asyncio-eventloop.rst:630 +#: library/asyncio-eventloop.rst:663 msgid "*flags* is a bitmask for :meth:`getaddrinfo`." msgstr "*flags* est un masque de bits pour :meth:`getaddrinfo`." -#: library/asyncio-eventloop.rst:632 +#: library/asyncio-eventloop.rst:665 msgid "" "*sock* can optionally be specified in order to use a preexisting socket " "object. If specified, *host* and *port* must not be specified." msgstr "" -#: library/asyncio-eventloop.rst:635 +#: library/asyncio-eventloop.rst:668 msgid "" "*backlog* is the maximum number of queued connections passed to :meth:" "`~socket.socket.listen` (defaults to 100)." msgstr "" -#: library/asyncio-eventloop.rst:638 +#: library/asyncio-eventloop.rst:671 msgid "" "*ssl* can be set to an :class:`~ssl.SSLContext` instance to enable TLS over " "the accepted connections." msgstr "" -#: library/asyncio-eventloop.rst:641 +#: library/asyncio-eventloop.rst:674 msgid "" "*reuse_address* tells the kernel to reuse a local socket in ``TIME_WAIT`` " "state, without waiting for its natural timeout to expire. If not specified " "will automatically be set to ``True`` on Unix." msgstr "" -#: library/asyncio-eventloop.rst:646 +#: library/asyncio-eventloop.rst:679 msgid "" "*reuse_port* tells the kernel to allow this endpoint to be bound to the same " "port as other existing endpoints are bound to, so long as they all set this " "flag when being created. This option is not supported on Windows." msgstr "" -#: library/asyncio-eventloop.rst:651 +#: library/asyncio-eventloop.rst:684 msgid "" "*ssl_handshake_timeout* is (for a TLS server) the time in seconds to wait " "for the TLS handshake to complete before aborting the connection. ``60.0`` " "seconds if ``None`` (default)." msgstr "" -#: library/asyncio-eventloop.rst:655 +#: library/asyncio-eventloop.rst:692 msgid "" "*start_serving* set to ``True`` (the default) causes the created server to " "start accepting connections immediately. When set to ``False``, the user " @@ -881,103 +931,104 @@ msgid "" "to make the server to start accepting connections." msgstr "" -#: library/asyncio-eventloop.rst:663 -msgid "Added *ssl_handshake_timeout* and *start_serving* parameters." +#: library/asyncio-eventloop.rst:704 +msgid "The *host* parameter can be a sequence of strings." msgstr "" -#: library/asyncio-eventloop.rst:676 -msgid "The *host* parameter can be a sequence of strings." +#: library/asyncio-eventloop.rst:708 +msgid "" +"Added *ssl_handshake_timeout* and *start_serving* parameters. The socket " +"option :py:data:`~socket.TCP_NODELAY` is set by default for all TCP " +"connections." msgstr "" -#: library/asyncio-eventloop.rst:680 +#: library/asyncio-eventloop.rst:718 msgid "" "The :func:`start_server` function is a higher-level alternative API that " "returns a pair of :class:`StreamReader` and :class:`StreamWriter` that can " "be used in an async/await code." msgstr "" -#: library/asyncio-eventloop.rst:689 +#: library/asyncio-eventloop.rst:729 msgid "" "Similar to :meth:`loop.create_server` but works with the :py:data:`~socket." "AF_UNIX` socket family." msgstr "" -#: library/asyncio-eventloop.rst:692 +#: library/asyncio-eventloop.rst:732 msgid "" "*path* is the name of a Unix domain socket, and is required, unless a *sock* " "argument is provided. Abstract Unix sockets, :class:`str`, :class:`bytes`, " "and :class:`~pathlib.Path` paths are supported." msgstr "" -#: library/asyncio-eventloop.rst:697 +#: library/asyncio-eventloop.rst:737 msgid "" "See the documentation of the :meth:`loop.create_server` method for " "information about arguments to this method." msgstr "" -#: library/asyncio-eventloop.rst:704 -msgid "The *ssl_handshake_timeout* and *start_serving* parameters." -msgstr "" - -#: library/asyncio-eventloop.rst:708 -msgid "The *path* parameter can now be a :class:`~pathlib.Path` object." +#: library/asyncio-eventloop.rst:744 +msgid "" +"Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " +"parameter can now be a :class:`~pathlib.Path` object." msgstr "" -#: library/asyncio-eventloop.rst:713 +#: library/asyncio-eventloop.rst:756 msgid "Wrap an already accepted connection into a transport/protocol pair." msgstr "" -#: library/asyncio-eventloop.rst:715 +#: library/asyncio-eventloop.rst:758 msgid "" "This method can be used by servers that accept connections outside of " "asyncio but that use asyncio to handle them." msgstr "" -#: library/asyncio-eventloop.rst:718 library/asyncio-eventloop.rst:785 +#: library/asyncio-eventloop.rst:761 library/asyncio-eventloop.rst:837 msgid "Parameters:" msgstr "Paramètres :" -#: library/asyncio-eventloop.rst:723 +#: library/asyncio-eventloop.rst:766 msgid "" "*sock* is a preexisting socket object returned from :meth:`socket.accept " "`." msgstr "" -#: library/asyncio-eventloop.rst:726 +#: library/asyncio-eventloop.rst:769 msgid "" "*ssl* can be set to an :class:`~ssl.SSLContext` to enable SSL over the " "accepted connections." msgstr "" -#: library/asyncio-eventloop.rst:729 +#: library/asyncio-eventloop.rst:772 msgid "" "*ssl_handshake_timeout* is (for an SSL connection) the time in seconds to " "wait for the SSL handshake to complete before aborting the connection. " "``60.0`` seconds if ``None`` (default)." msgstr "" -#: library/asyncio-eventloop.rst:733 +#: library/asyncio-eventloop.rst:780 msgid "Returns a ``(transport, protocol)`` pair." msgstr "" -#: library/asyncio-eventloop.rst:743 +#: library/asyncio-eventloop.rst:794 msgid "Transferring files" msgstr "" -#: library/asyncio-eventloop.rst:748 +#: library/asyncio-eventloop.rst:799 msgid "" "Send a *file* over a *transport*. Return the total number of bytes sent." msgstr "" -#: library/asyncio-eventloop.rst:751 +#: library/asyncio-eventloop.rst:802 msgid "The method uses high-performance :meth:`os.sendfile` if available." msgstr "" -#: library/asyncio-eventloop.rst:753 +#: library/asyncio-eventloop.rst:804 msgid "*file* must be a regular file object opened in binary mode." msgstr "" -#: library/asyncio-eventloop.rst:755 library/asyncio-eventloop.rst:945 +#: library/asyncio-eventloop.rst:806 library/asyncio-eventloop.rst:1041 msgid "" "*offset* tells from where to start reading the file. If specified, *count* " "is the total number of bytes to transmit as opposed to sending the file " @@ -986,97 +1037,97 @@ msgid "" "obtain the actual number of bytes sent." msgstr "" -#: library/asyncio-eventloop.rst:762 +#: library/asyncio-eventloop.rst:813 msgid "" "*fallback* set to ``True`` makes asyncio to manually read and send the file " "when the platform does not support the sendfile system call (e.g. Windows or " "SSL socket on Unix)." msgstr "" -#: library/asyncio-eventloop.rst:766 +#: library/asyncio-eventloop.rst:817 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support the " "*sendfile* syscall and *fallback* is ``False``." msgstr "" -#: library/asyncio-eventloop.rst:773 +#: library/asyncio-eventloop.rst:824 msgid "TLS Upgrade" msgstr "" -#: library/asyncio-eventloop.rst:779 +#: library/asyncio-eventloop.rst:831 msgid "Upgrade an existing transport-based connection to TLS." msgstr "Convertit une connexion existante en connexion TLS." -#: library/asyncio-eventloop.rst:781 +#: library/asyncio-eventloop.rst:833 msgid "" "Return a new transport instance, that the *protocol* must start using " "immediately after the *await*. The *transport* instance passed to the " "*start_tls* method should never be used again." msgstr "" -#: library/asyncio-eventloop.rst:787 +#: library/asyncio-eventloop.rst:839 msgid "" "*transport* and *protocol* instances that methods like :meth:`~loop." "create_server` and :meth:`~loop.create_connection` return." msgstr "" -#: library/asyncio-eventloop.rst:791 +#: library/asyncio-eventloop.rst:843 msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." msgstr "" -#: library/asyncio-eventloop.rst:793 +#: library/asyncio-eventloop.rst:845 msgid "" "*server_side* pass ``True`` when a server-side connection is being upgraded " "(like the one created by :meth:`~loop.create_server`)." msgstr "" -#: library/asyncio-eventloop.rst:796 +#: library/asyncio-eventloop.rst:848 msgid "" "*server_hostname*: sets or overrides the host name that the target server's " "certificate will be matched against." msgstr "" -#: library/asyncio-eventloop.rst:807 +#: library/asyncio-eventloop.rst:868 msgid "Watching file descriptors" msgstr "Surveiller des descripteurs de fichiers" -#: library/asyncio-eventloop.rst:811 +#: library/asyncio-eventloop.rst:872 msgid "" "Start monitoring the *fd* file descriptor for read availability and invoke " "*callback* with the specified arguments once *fd* is available for reading." msgstr "" -#: library/asyncio-eventloop.rst:817 +#: library/asyncio-eventloop.rst:878 msgid "Stop monitoring the *fd* file descriptor for read availability." msgstr "" -#: library/asyncio-eventloop.rst:821 +#: library/asyncio-eventloop.rst:882 msgid "" "Start monitoring the *fd* file descriptor for write availability and invoke " "*callback* with the specified arguments once *fd* is available for writing." msgstr "" -#: library/asyncio-eventloop.rst:825 library/asyncio-eventloop.rst:1044 +#: library/asyncio-eventloop.rst:886 library/asyncio-eventloop.rst:1140 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *callback*." msgstr "" -#: library/asyncio-eventloop.rst:830 +#: library/asyncio-eventloop.rst:891 msgid "Stop monitoring the *fd* file descriptor for write availability." msgstr "" -#: library/asyncio-eventloop.rst:832 +#: library/asyncio-eventloop.rst:893 msgid "" "See also :ref:`Platform Support ` section for some " "limitations of these methods." msgstr "" -#: library/asyncio-eventloop.rst:837 +#: library/asyncio-eventloop.rst:898 msgid "Working with socket objects directly" msgstr "" -#: library/asyncio-eventloop.rst:839 +#: library/asyncio-eventloop.rst:900 msgid "" "In general, protocol implementations that use transport-based APIs such as :" "meth:`loop.create_connection` and :meth:`loop.create_server` are faster than " @@ -1085,46 +1136,68 @@ msgid "" "socket` objects directly is more convenient." msgstr "" -#: library/asyncio-eventloop.rst:848 +#: library/asyncio-eventloop.rst:909 msgid "" "Receive up to *nbytes* from *sock*. Asynchronous version of :meth:`socket." "recv() `." msgstr "" -#: library/asyncio-eventloop.rst:851 +#: library/asyncio-eventloop.rst:912 msgid "Return the received data as a bytes object." msgstr "" -#: library/asyncio-eventloop.rst:853 library/asyncio-eventloop.rst:867 -#: library/asyncio-eventloop.rst:882 library/asyncio-eventloop.rst:895 -#: library/asyncio-eventloop.rst:921 library/asyncio-eventloop.rst:959 +#: library/asyncio-eventloop.rst:914 library/asyncio-eventloop.rst:928 +#: library/asyncio-eventloop.rst:939 library/asyncio-eventloop.rst:951 +#: library/asyncio-eventloop.rst:966 library/asyncio-eventloop.rst:981 +#: library/asyncio-eventloop.rst:991 library/asyncio-eventloop.rst:1017 +#: library/asyncio-eventloop.rst:1055 msgid "*sock* must be a non-blocking socket." msgstr "Le connecteur *sock* ne doit pas être bloquant." -#: library/asyncio-eventloop.rst:855 +#: library/asyncio-eventloop.rst:916 msgid "" "Even though this method was always documented as a coroutine method, " "releases before Python 3.7 returned a :class:`Future`. Since Python 3.7 this " "is an ``async def`` method." msgstr "" -#: library/asyncio-eventloop.rst:862 +#: library/asyncio-eventloop.rst:923 msgid "" "Receive data from *sock* into the *buf* buffer. Modeled after the blocking :" "meth:`socket.recv_into() ` method." msgstr "" -#: library/asyncio-eventloop.rst:865 +#: library/asyncio-eventloop.rst:926 msgid "Return the number of bytes written to the buffer." msgstr "" -#: library/asyncio-eventloop.rst:873 +#: library/asyncio-eventloop.rst:934 +msgid "" +"Receive a datagram of up to *bufsize* from *sock*. Asynchronous version of :" +"meth:`socket.recvfrom() `." +msgstr "" + +#: library/asyncio-eventloop.rst:937 +msgid "Return a tuple of (received data, remote address)." +msgstr "" + +#: library/asyncio-eventloop.rst:945 +msgid "" +"Receive a datagram of up to *nbytes* from *sock* into *buf*. Asynchronous " +"version of :meth:`socket.recvfrom_into() `." +msgstr "" + +#: library/asyncio-eventloop.rst:949 +msgid "Return a tuple of (number of bytes received, remote address)." +msgstr "" + +#: library/asyncio-eventloop.rst:957 msgid "" "Send *data* to the *sock* socket. Asynchronous version of :meth:`socket." "sendall() `." msgstr "" -#: library/asyncio-eventloop.rst:876 +#: library/asyncio-eventloop.rst:960 msgid "" "This method continues to send to the socket until either all data in *data* " "has been sent or an error occurs. ``None`` is returned on success. On " @@ -1133,23 +1206,34 @@ msgid "" "the connection." msgstr "" -#: library/asyncio-eventloop.rst:884 +#: library/asyncio-eventloop.rst:968 library/asyncio-eventloop.rst:1019 msgid "" "Even though the method was always documented as a coroutine method, before " -"Python 3.7 it returned an :class:`Future`. Since Python 3.7, this is an " +"Python 3.7 it returned a :class:`Future`. Since Python 3.7, this is an " "``async def`` method." msgstr "" -#: library/asyncio-eventloop.rst:891 +#: library/asyncio-eventloop.rst:975 +msgid "" +"Send a datagram from *sock* to *address*. Asynchronous version of :meth:" +"`socket.sendto() `." +msgstr "" + +#: library/asyncio-eventloop.rst:979 +#, fuzzy +msgid "Return the number of bytes sent." +msgstr "Active le mode débogage pour la boucle d'évènements." + +#: library/asyncio-eventloop.rst:987 msgid "Connect *sock* to a remote socket at *address*." msgstr "" -#: library/asyncio-eventloop.rst:893 +#: library/asyncio-eventloop.rst:989 msgid "" "Asynchronous version of :meth:`socket.connect() `." msgstr "" -#: library/asyncio-eventloop.rst:897 +#: library/asyncio-eventloop.rst:993 msgid "" "``address`` no longer needs to be resolved. ``sock_connect`` will try to " "check if the *address* is already resolved by calling :func:`socket." @@ -1157,19 +1241,19 @@ msgid "" "*address*." msgstr "" -#: library/asyncio-eventloop.rst:906 +#: library/asyncio-eventloop.rst:1002 msgid "" ":meth:`loop.create_connection` and :func:`asyncio.open_connection() " "`." msgstr "" -#: library/asyncio-eventloop.rst:912 +#: library/asyncio-eventloop.rst:1008 msgid "" "Accept a connection. Modeled after the blocking :meth:`socket.accept() " "` method." msgstr "" -#: library/asyncio-eventloop.rst:915 +#: library/asyncio-eventloop.rst:1011 msgid "" "The socket must be bound to an address and listening for connections. The " "return value is a pair ``(conn, address)`` where *conn* is a *new* socket " @@ -1177,64 +1261,57 @@ msgid "" "the address bound to the socket on the other end of the connection." msgstr "" -#: library/asyncio-eventloop.rst:923 -msgid "" -"Even though the method was always documented as a coroutine method, before " -"Python 3.7 it returned a :class:`Future`. Since Python 3.7, this is an " -"``async def`` method." -msgstr "" - -#: library/asyncio-eventloop.rst:930 +#: library/asyncio-eventloop.rst:1026 msgid ":meth:`loop.create_server` and :func:`start_server`." msgstr "" -#: library/asyncio-eventloop.rst:935 +#: library/asyncio-eventloop.rst:1031 msgid "" "Send a file using high-performance :mod:`os.sendfile` if possible. Return " "the total number of bytes sent." msgstr "" -#: library/asyncio-eventloop.rst:938 +#: library/asyncio-eventloop.rst:1034 msgid "" "Asynchronous version of :meth:`socket.sendfile() `." msgstr "" -#: library/asyncio-eventloop.rst:940 +#: library/asyncio-eventloop.rst:1036 msgid "" "*sock* must be a non-blocking :const:`socket.SOCK_STREAM` :class:`~socket." "socket`." msgstr "" -#: library/asyncio-eventloop.rst:943 +#: library/asyncio-eventloop.rst:1039 msgid "*file* must be a regular file object open in binary mode." msgstr "" -#: library/asyncio-eventloop.rst:952 +#: library/asyncio-eventloop.rst:1048 msgid "" "*fallback*, when set to ``True``, makes asyncio manually read and send the " "file when the platform does not support the sendfile syscall (e.g. Windows " "or SSL socket on Unix)." msgstr "" -#: library/asyncio-eventloop.rst:956 +#: library/asyncio-eventloop.rst:1052 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support " "*sendfile* syscall and *fallback* is ``False``." msgstr "" -#: library/asyncio-eventloop.rst:965 +#: library/asyncio-eventloop.rst:1061 msgid "DNS" msgstr "" -#: library/asyncio-eventloop.rst:970 +#: library/asyncio-eventloop.rst:1066 msgid "Asynchronous version of :meth:`socket.getaddrinfo`." msgstr "" -#: library/asyncio-eventloop.rst:974 +#: library/asyncio-eventloop.rst:1070 msgid "Asynchronous version of :meth:`socket.getnameinfo`." msgstr "" -#: library/asyncio-eventloop.rst:976 +#: library/asyncio-eventloop.rst:1072 msgid "" "Both *getaddrinfo* and *getnameinfo* methods were always documented to " "return a coroutine, but prior to Python 3.7 they were, in fact, returning :" @@ -1242,67 +1319,67 @@ msgid "" "coroutines." msgstr "" -#: library/asyncio-eventloop.rst:984 +#: library/asyncio-eventloop.rst:1080 msgid "Working with pipes" msgstr "" -#: library/asyncio-eventloop.rst:988 +#: library/asyncio-eventloop.rst:1084 msgid "Register the read end of *pipe* in the event loop." msgstr "" "Branche l'extrémité en lecture du tube *pipe* à la boucle d'évènements." -#: library/asyncio-eventloop.rst:993 +#: library/asyncio-eventloop.rst:1089 msgid "*pipe* is a :term:`file-like object `." msgstr "" -#: library/asyncio-eventloop.rst:995 +#: library/asyncio-eventloop.rst:1091 msgid "" "Return pair ``(transport, protocol)``, where *transport* supports the :class:" "`ReadTransport` interface and *protocol* is an object instantiated by the " "*protocol_factory*." msgstr "" -#: library/asyncio-eventloop.rst:999 library/asyncio-eventloop.rst:1015 +#: library/asyncio-eventloop.rst:1095 library/asyncio-eventloop.rst:1111 msgid "" "With :class:`SelectorEventLoop` event loop, the *pipe* is set to non-" "blocking mode." msgstr "" -#: library/asyncio-eventloop.rst:1004 +#: library/asyncio-eventloop.rst:1100 msgid "Register the write end of *pipe* in the event loop." msgstr "Branche l'extrémité en écriture de *pipe* à la boucle d'évènements." -#: library/asyncio-eventloop.rst:1009 +#: library/asyncio-eventloop.rst:1105 msgid "*pipe* is :term:`file-like object `." msgstr "" -#: library/asyncio-eventloop.rst:1011 +#: library/asyncio-eventloop.rst:1107 msgid "" "Return pair ``(transport, protocol)``, where *transport* supports :class:" "`WriteTransport` interface and *protocol* is an object instantiated by the " "*protocol_factory*." msgstr "" -#: library/asyncio-eventloop.rst:1020 +#: library/asyncio-eventloop.rst:1116 msgid "" ":class:`SelectorEventLoop` does not support the above methods on Windows. " "Use :class:`ProactorEventLoop` instead for Windows." msgstr "" -#: library/asyncio-eventloop.rst:1025 +#: library/asyncio-eventloop.rst:1121 msgid "" "The :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` methods." msgstr "" -#: library/asyncio-eventloop.rst:1030 +#: library/asyncio-eventloop.rst:1126 msgid "Unix signals" msgstr "Signaux Unix" -#: library/asyncio-eventloop.rst:1034 +#: library/asyncio-eventloop.rst:1130 msgid "Set *callback* as the handler for the *signum* signal." msgstr "" -#: library/asyncio-eventloop.rst:1036 +#: library/asyncio-eventloop.rst:1132 msgid "" "The callback will be invoked by *loop*, along with other queued callbacks " "and runnable coroutines of that event loop. Unlike signal handlers " @@ -1310,56 +1387,56 @@ msgid "" "function is allowed to interact with the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1041 +#: library/asyncio-eventloop.rst:1137 msgid "" "Raise :exc:`ValueError` if the signal number is invalid or uncatchable. " "Raise :exc:`RuntimeError` if there is a problem setting up the handler." msgstr "" -#: library/asyncio-eventloop.rst:1047 +#: library/asyncio-eventloop.rst:1143 msgid "" "Like :func:`signal.signal`, this function must be invoked in the main thread." msgstr "" -#: library/asyncio-eventloop.rst:1052 +#: library/asyncio-eventloop.rst:1148 msgid "Remove the handler for the *sig* signal." msgstr "Supprime le gestionnaire du signal *sig*." -#: library/asyncio-eventloop.rst:1054 +#: library/asyncio-eventloop.rst:1150 msgid "" "Return ``True`` if the signal handler was removed, or ``False`` if no " "handler was set for the given signal." msgstr "" -#: library/asyncio-eventloop.rst:1061 +#: library/asyncio-eventloop.rst:1157 msgid "The :mod:`signal` module." msgstr "Le module :mod:`signal`." -#: library/asyncio-eventloop.rst:1065 +#: library/asyncio-eventloop.rst:1161 msgid "Executing code in thread or process pools" msgstr "" -#: library/asyncio-eventloop.rst:1069 +#: library/asyncio-eventloop.rst:1165 msgid "Arrange for *func* to be called in the specified executor." msgstr "" -#: library/asyncio-eventloop.rst:1071 +#: library/asyncio-eventloop.rst:1167 msgid "" "The *executor* argument should be an :class:`concurrent.futures.Executor` " "instance. The default executor is used if *executor* is ``None``." msgstr "" -#: library/asyncio-eventloop.rst:1115 +#: library/asyncio-eventloop.rst:1211 msgid "This method returns a :class:`asyncio.Future` object." msgstr "" -#: library/asyncio-eventloop.rst:1117 +#: library/asyncio-eventloop.rst:1213 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *func*." msgstr "" -#: library/asyncio-eventloop.rst:1120 +#: library/asyncio-eventloop.rst:1216 msgid "" ":meth:`loop.run_in_executor` no longer configures the ``max_workers`` of the " "thread pool executor it creates, instead leaving it up to the thread pool " @@ -1367,38 +1444,32 @@ msgid "" "default." msgstr "" -#: library/asyncio-eventloop.rst:1129 +#: library/asyncio-eventloop.rst:1225 msgid "" "Set *executor* as the default executor used by :meth:`run_in_executor`. " -"*executor* should be an instance of :class:`~concurrent.futures." +"*executor* must be an instance of :class:`~concurrent.futures." "ThreadPoolExecutor`." msgstr "" -#: library/asyncio-eventloop.rst:1133 +#: library/asyncio-eventloop.rst:1229 msgid "" -"Using an executor that is not an instance of :class:`~concurrent.futures." -"ThreadPoolExecutor` is deprecated and will trigger an error in Python 3.9." -msgstr "" - -#: library/asyncio-eventloop.rst:1138 -msgid "" -"*executor* must be an instance of :class:`concurrent.futures." +"*executor* must be an instance of :class:`~concurrent.futures." "ThreadPoolExecutor`." msgstr "" -#: library/asyncio-eventloop.rst:1143 +#: library/asyncio-eventloop.rst:1235 msgid "Error Handling API" msgstr "API de gestion d'erreur" -#: library/asyncio-eventloop.rst:1145 +#: library/asyncio-eventloop.rst:1237 msgid "Allows customizing how exceptions are handled in the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1149 +#: library/asyncio-eventloop.rst:1241 msgid "Set *handler* as the new event loop exception handler." msgstr "" -#: library/asyncio-eventloop.rst:1151 +#: library/asyncio-eventloop.rst:1243 msgid "" "If *handler* is ``None``, the default exception handler will be set. " "Otherwise, *handler* must be a callable with the signature matching ``(loop, " @@ -1407,148 +1478,161 @@ msgid "" "(see :meth:`call_exception_handler` documentation for details about context)." msgstr "" -#: library/asyncio-eventloop.rst:1161 +#: library/asyncio-eventloop.rst:1253 msgid "" "Return the current exception handler, or ``None`` if no custom exception " "handler was set." msgstr "" -#: library/asyncio-eventloop.rst:1168 +#: library/asyncio-eventloop.rst:1260 msgid "Default exception handler." msgstr "Gestionnaire d'exception par défaut." -#: library/asyncio-eventloop.rst:1170 +#: library/asyncio-eventloop.rst:1262 msgid "" "This is called when an exception occurs and no exception handler is set. " "This can be called by a custom exception handler that wants to defer to the " "default handler behavior." msgstr "" -#: library/asyncio-eventloop.rst:1174 +#: library/asyncio-eventloop.rst:1266 msgid "" "*context* parameter has the same meaning as in :meth:" "`call_exception_handler`." msgstr "" -#: library/asyncio-eventloop.rst:1179 +#: library/asyncio-eventloop.rst:1271 msgid "Call the current event loop exception handler." msgstr "" "Appelle le gestionnaire d'exception de la boucle d'évènements actuelle." -#: library/asyncio-eventloop.rst:1181 +#: library/asyncio-eventloop.rst:1273 msgid "" "*context* is a ``dict`` object containing the following keys (new keys may " "be introduced in future Python versions):" msgstr "" -#: library/asyncio-eventloop.rst:1184 +#: library/asyncio-eventloop.rst:1276 msgid "'message': Error message;" msgstr "``message`` : Message d'erreur ;" -#: library/asyncio-eventloop.rst:1185 +#: library/asyncio-eventloop.rst:1277 msgid "'exception' (optional): Exception object;" msgstr "``exception`` (optionnel): Un objet exception ;" -#: library/asyncio-eventloop.rst:1186 +#: library/asyncio-eventloop.rst:1278 msgid "'future' (optional): :class:`asyncio.Future` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1187 +#: library/asyncio-eventloop.rst:1279 +msgid "'task' (optional): :class:`asyncio.Task` instance;" +msgstr "" + +#: library/asyncio-eventloop.rst:1280 msgid "'handle' (optional): :class:`asyncio.Handle` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1188 +#: library/asyncio-eventloop.rst:1281 msgid "'protocol' (optional): :ref:`Protocol ` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1189 +#: library/asyncio-eventloop.rst:1282 msgid "'transport' (optional): :ref:`Transport ` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1190 -msgid "'socket' (optional): :class:`socket.socket` instance." +#: library/asyncio-eventloop.rst:1283 +msgid "'socket' (optional): :class:`socket.socket` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1194 +#: library/asyncio-eventloop.rst:1285 +msgid "'asyncgen' (optional): Asynchronous generator that caused" +msgstr "" + +#: library/asyncio-eventloop.rst:1285 +#, fuzzy +msgid "the exception." +msgstr "Gestionnaire d'exception par défaut." + +#: library/asyncio-eventloop.rst:1289 msgid "" "This method should not be overloaded in subclassed event loops. For custom " "exception handling, use the :meth:`set_exception_handler()` method." msgstr "" -#: library/asyncio-eventloop.rst:1199 +#: library/asyncio-eventloop.rst:1294 msgid "Enabling debug mode" msgstr "Active le mode débogage" -#: library/asyncio-eventloop.rst:1203 +#: library/asyncio-eventloop.rst:1298 msgid "Get the debug mode (:class:`bool`) of the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1205 +#: library/asyncio-eventloop.rst:1300 msgid "" "The default value is ``True`` if the environment variable :envvar:" "`PYTHONASYNCIODEBUG` is set to a non-empty string, ``False`` otherwise." msgstr "" -#: library/asyncio-eventloop.rst:1211 +#: library/asyncio-eventloop.rst:1306 msgid "Set the debug mode of the event loop." msgstr "Active le mode débogage pour la boucle d'évènements." -#: library/asyncio-eventloop.rst:1215 +#: library/asyncio-eventloop.rst:1310 msgid "" "The new :ref:`Python Development Mode ` can now also be used to " "enable the debug mode." msgstr "" -#: library/asyncio-eventloop.rst:1220 +#: library/asyncio-eventloop.rst:1315 msgid "The :ref:`debug mode of asyncio `." msgstr "" -#: library/asyncio-eventloop.rst:1224 +#: library/asyncio-eventloop.rst:1319 msgid "Running Subprocesses" msgstr "" -#: library/asyncio-eventloop.rst:1226 +#: library/asyncio-eventloop.rst:1321 msgid "" "Methods described in this subsections are low-level. In regular async/await " "code consider using the high-level :func:`asyncio.create_subprocess_shell` " "and :func:`asyncio.create_subprocess_exec` convenience functions instead." msgstr "" -#: library/asyncio-eventloop.rst:1233 +#: library/asyncio-eventloop.rst:1328 msgid "" -"The default asyncio event loop on **Windows** does not support subprocesses. " -"See :ref:`Subprocess Support on Windows ` for " -"details." +"On Windows, the default event loop :class:`ProactorEventLoop` supports " +"subprocesses, whereas :class:`SelectorEventLoop` does not. See :ref:" +"`Subprocess Support on Windows ` for details." msgstr "" -#: library/asyncio-eventloop.rst:1241 +#: library/asyncio-eventloop.rst:1337 msgid "" "Create a subprocess from one or more string arguments specified by *args*." msgstr "" -#: library/asyncio-eventloop.rst:1244 +#: library/asyncio-eventloop.rst:1340 msgid "*args* must be a list of strings represented by:" msgstr "" -#: library/asyncio-eventloop.rst:1246 +#: library/asyncio-eventloop.rst:1342 #, fuzzy msgid ":class:`str`;" msgstr ":class:`str`" -#: library/asyncio-eventloop.rst:1247 +#: library/asyncio-eventloop.rst:1343 msgid "" "or :class:`bytes`, encoded to the :ref:`filesystem encoding `." msgstr "" -#: library/asyncio-eventloop.rst:1250 +#: library/asyncio-eventloop.rst:1346 msgid "" "The first string specifies the program executable, and the remaining strings " "specify the arguments. Together, string arguments form the ``argv`` of the " "program." msgstr "" -#: library/asyncio-eventloop.rst:1254 +#: library/asyncio-eventloop.rst:1350 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=False`` and the list of strings passed as the first " @@ -1556,133 +1640,133 @@ msgid "" "which is list of strings, *subprocess_exec* takes multiple string arguments." msgstr "" -#: library/asyncio-eventloop.rst:1260 +#: library/asyncio-eventloop.rst:1356 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`asyncio.SubprocessProtocol` class." msgstr "" -#: library/asyncio-eventloop.rst:1263 +#: library/asyncio-eventloop.rst:1359 msgid "Other parameters:" msgstr "Autres paramètres :" -#: library/asyncio-eventloop.rst:1265 +#: library/asyncio-eventloop.rst:1361 msgid "*stdin* can be any of these:" msgstr "" -#: library/asyncio-eventloop.rst:1267 +#: library/asyncio-eventloop.rst:1363 msgid "" "a file-like object representing a pipe to be connected to the subprocess's " "standard input stream using :meth:`~loop.connect_write_pipe`" msgstr "" -#: library/asyncio-eventloop.rst:1270 library/asyncio-eventloop.rst:1282 -#: library/asyncio-eventloop.rst:1294 +#: library/asyncio-eventloop.rst:1366 library/asyncio-eventloop.rst:1378 +#: library/asyncio-eventloop.rst:1390 msgid "" "the :const:`subprocess.PIPE` constant (default) which will create a new pipe " "and connect it," msgstr "" -#: library/asyncio-eventloop.rst:1272 library/asyncio-eventloop.rst:1284 -#: library/asyncio-eventloop.rst:1296 +#: library/asyncio-eventloop.rst:1368 library/asyncio-eventloop.rst:1380 +#: library/asyncio-eventloop.rst:1392 msgid "" "the value ``None`` which will make the subprocess inherit the file " "descriptor from this process" msgstr "" -#: library/asyncio-eventloop.rst:1274 library/asyncio-eventloop.rst:1286 -#: library/asyncio-eventloop.rst:1298 +#: library/asyncio-eventloop.rst:1370 library/asyncio-eventloop.rst:1382 +#: library/asyncio-eventloop.rst:1394 msgid "" "the :const:`subprocess.DEVNULL` constant which indicates that the special :" "data:`os.devnull` file will be used" msgstr "" -#: library/asyncio-eventloop.rst:1277 +#: library/asyncio-eventloop.rst:1373 msgid "*stdout* can be any of these:" msgstr "" -#: library/asyncio-eventloop.rst:1279 +#: library/asyncio-eventloop.rst:1375 msgid "" "a file-like object representing a pipe to be connected to the subprocess's " "standard output stream using :meth:`~loop.connect_write_pipe`" msgstr "" -#: library/asyncio-eventloop.rst:1289 +#: library/asyncio-eventloop.rst:1385 msgid "*stderr* can be any of these:" msgstr "" -#: library/asyncio-eventloop.rst:1291 +#: library/asyncio-eventloop.rst:1387 msgid "" "a file-like object representing a pipe to be connected to the subprocess's " "standard error stream using :meth:`~loop.connect_write_pipe`" msgstr "" -#: library/asyncio-eventloop.rst:1300 +#: library/asyncio-eventloop.rst:1396 msgid "" "the :const:`subprocess.STDOUT` constant which will connect the standard " "error stream to the process' standard output stream" msgstr "" -#: library/asyncio-eventloop.rst:1303 +#: library/asyncio-eventloop.rst:1399 msgid "" "All other keyword arguments are passed to :class:`subprocess.Popen` without " "interpretation, except for *bufsize*, *universal_newlines*, *shell*, *text*, " "*encoding* and *errors*, which should not be specified at all." msgstr "" -#: library/asyncio-eventloop.rst:1308 +#: library/asyncio-eventloop.rst:1404 msgid "" "The ``asyncio`` subprocess API does not support decoding the streams as " "text. :func:`bytes.decode` can be used to convert the bytes returned from " "the stream to text." msgstr "" -#: library/asyncio-eventloop.rst:1312 +#: library/asyncio-eventloop.rst:1408 msgid "" "See the constructor of the :class:`subprocess.Popen` class for documentation " "on other arguments." msgstr "" -#: library/asyncio-eventloop.rst:1315 +#: library/asyncio-eventloop.rst:1411 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`asyncio.SubprocessTransport` base class and *protocol* is an " "object instantiated by the *protocol_factory*." msgstr "" -#: library/asyncio-eventloop.rst:1323 +#: library/asyncio-eventloop.rst:1419 msgid "" "Create a subprocess from *cmd*, which can be a :class:`str` or a :class:" "`bytes` string encoded to the :ref:`filesystem encoding `, using the platform's \"shell\" syntax." msgstr "" -#: library/asyncio-eventloop.rst:1328 +#: library/asyncio-eventloop.rst:1424 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=True``." msgstr "" -#: library/asyncio-eventloop.rst:1331 +#: library/asyncio-eventloop.rst:1427 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`SubprocessProtocol` class." msgstr "" -#: library/asyncio-eventloop.rst:1334 +#: library/asyncio-eventloop.rst:1430 msgid "" "See :meth:`~loop.subprocess_exec` for more details about the remaining " "arguments." msgstr "" -#: library/asyncio-eventloop.rst:1337 +#: library/asyncio-eventloop.rst:1433 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`SubprocessTransport` base class and *protocol* is an object " "instantiated by the *protocol_factory*." msgstr "" -#: library/asyncio-eventloop.rst:1342 +#: library/asyncio-eventloop.rst:1438 msgid "" "It is the application's responsibility to ensure that all whitespace and " "special characters are quoted appropriately to avoid `shell injection " @@ -1692,105 +1776,105 @@ msgid "" "used to construct shell commands." msgstr "" -#: library/asyncio-eventloop.rst:1351 +#: library/asyncio-eventloop.rst:1447 msgid "Callback Handles" msgstr "" -#: library/asyncio-eventloop.rst:1355 +#: library/asyncio-eventloop.rst:1451 msgid "" "A callback wrapper object returned by :meth:`loop.call_soon`, :meth:`loop." "call_soon_threadsafe`." msgstr "" -#: library/asyncio-eventloop.rst:1360 +#: library/asyncio-eventloop.rst:1456 msgid "" "Cancel the callback. If the callback has already been canceled or executed, " "this method has no effect." msgstr "" -#: library/asyncio-eventloop.rst:1365 +#: library/asyncio-eventloop.rst:1461 msgid "Return ``True`` if the callback was cancelled." msgstr "Renvoie ``True`` si la fonction de rappel à été annulé." -#: library/asyncio-eventloop.rst:1371 +#: library/asyncio-eventloop.rst:1467 msgid "" "A callback wrapper object returned by :meth:`loop.call_later`, and :meth:" "`loop.call_at`." msgstr "" -#: library/asyncio-eventloop.rst:1374 +#: library/asyncio-eventloop.rst:1470 msgid "This class is a subclass of :class:`Handle`." msgstr "" -#: library/asyncio-eventloop.rst:1378 +#: library/asyncio-eventloop.rst:1474 msgid "Return a scheduled callback time as :class:`float` seconds." msgstr "" -#: library/asyncio-eventloop.rst:1380 +#: library/asyncio-eventloop.rst:1476 msgid "" "The time is an absolute timestamp, using the same time reference as :meth:" "`loop.time`." msgstr "" -#: library/asyncio-eventloop.rst:1387 +#: library/asyncio-eventloop.rst:1483 msgid "Server Objects" msgstr "Objets Serveur" -#: library/asyncio-eventloop.rst:1389 +#: library/asyncio-eventloop.rst:1485 msgid "" "Server objects are created by :meth:`loop.create_server`, :meth:`loop." "create_unix_server`, :func:`start_server`, and :func:`start_unix_server` " "functions." msgstr "" -#: library/asyncio-eventloop.rst:1393 +#: library/asyncio-eventloop.rst:1489 msgid "Do not instantiate the class directly." msgstr "" -#: library/asyncio-eventloop.rst:1397 +#: library/asyncio-eventloop.rst:1493 msgid "" "*Server* objects are asynchronous context managers. When used in an ``async " "with`` statement, it's guaranteed that the Server object is closed and not " "accepting new connections when the ``async with`` statement is completed::" msgstr "" -#: library/asyncio-eventloop.rst:1410 +#: library/asyncio-eventloop.rst:1506 msgid "Server object is an asynchronous context manager since Python 3.7." msgstr "" -#: library/asyncio-eventloop.rst:1415 +#: library/asyncio-eventloop.rst:1511 msgid "" "Stop serving: close listening sockets and set the :attr:`sockets` attribute " "to ``None``." msgstr "" -#: library/asyncio-eventloop.rst:1418 +#: library/asyncio-eventloop.rst:1514 msgid "" "The sockets that represent existing incoming client connections are left " "open." msgstr "" -#: library/asyncio-eventloop.rst:1421 +#: library/asyncio-eventloop.rst:1517 msgid "" "The server is closed asynchronously, use the :meth:`wait_closed` coroutine " "to wait until the server is closed." msgstr "" -#: library/asyncio-eventloop.rst:1426 +#: library/asyncio-eventloop.rst:1522 msgid "Return the event loop associated with the server object." msgstr "" -#: library/asyncio-eventloop.rst:1432 +#: library/asyncio-eventloop.rst:1528 msgid "Start accepting connections." msgstr "Commence à accepter les connexions." -#: library/asyncio-eventloop.rst:1434 +#: library/asyncio-eventloop.rst:1530 msgid "" "This method is idempotent, so it can be called when the server is already " -"being serving." +"serving." msgstr "" -#: library/asyncio-eventloop.rst:1437 +#: library/asyncio-eventloop.rst:1533 msgid "" "The *start_serving* keyword-only parameter to :meth:`loop.create_server` " "and :meth:`asyncio.start_server` allows creating a Server object that is not " @@ -1799,97 +1883,97 @@ msgid "" "accepting connections." msgstr "" -#: library/asyncio-eventloop.rst:1448 +#: library/asyncio-eventloop.rst:1544 msgid "" "Start accepting connections until the coroutine is cancelled. Cancellation " "of ``serve_forever`` task causes the server to be closed." msgstr "" -#: library/asyncio-eventloop.rst:1452 +#: library/asyncio-eventloop.rst:1548 msgid "" "This method can be called if the server is already accepting connections. " "Only one ``serve_forever`` task can exist per one *Server* object." msgstr "" -#: library/asyncio-eventloop.rst:1474 +#: library/asyncio-eventloop.rst:1570 msgid "Return ``True`` if the server is accepting new connections." msgstr "Donne ``True`` si le serveur accepte de nouvelles connexions." -#: library/asyncio-eventloop.rst:1480 +#: library/asyncio-eventloop.rst:1576 msgid "Wait until the :meth:`close` method completes." msgstr "Attends que la méthode :meth:`close` se termine." -#: library/asyncio-eventloop.rst:1484 +#: library/asyncio-eventloop.rst:1580 msgid "List of :class:`socket.socket` objects the server is listening on." msgstr "" -#: library/asyncio-eventloop.rst:1486 +#: library/asyncio-eventloop.rst:1582 msgid "" "Prior to Python 3.7 ``Server.sockets`` used to return an internal list of " "server sockets directly. In 3.7 a copy of that list is returned." msgstr "" -#: library/asyncio-eventloop.rst:1495 +#: library/asyncio-eventloop.rst:1591 msgid "Event Loop Implementations" msgstr "Implémentations de boucle d'évènements" -#: library/asyncio-eventloop.rst:1497 +#: library/asyncio-eventloop.rst:1593 msgid "" "asyncio ships with two different event loop implementations: :class:" "`SelectorEventLoop` and :class:`ProactorEventLoop`." msgstr "" -#: library/asyncio-eventloop.rst:1500 +#: library/asyncio-eventloop.rst:1596 msgid "" "By default asyncio is configured to use :class:`SelectorEventLoop` on Unix " "and :class:`ProactorEventLoop` on Windows." msgstr "" -#: library/asyncio-eventloop.rst:1506 +#: library/asyncio-eventloop.rst:1602 msgid "An event loop based on the :mod:`selectors` module." msgstr "" -#: library/asyncio-eventloop.rst:1508 +#: library/asyncio-eventloop.rst:1604 msgid "" "Uses the most efficient *selector* available for the given platform. It is " "also possible to manually configure the exact selector implementation to be " "used::" msgstr "" -#: library/asyncio-eventloop.rst:1520 +#: library/asyncio-eventloop.rst:1616 msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`Disponibilité ` : Unix, Windows." -#: library/asyncio-eventloop.rst:1525 +#: library/asyncio-eventloop.rst:1621 msgid "An event loop for Windows that uses \"I/O Completion Ports\" (IOCP)." msgstr "" -#: library/asyncio-eventloop.rst:1528 +#: library/asyncio-eventloop.rst:1624 msgid ":ref:`Availability `: Windows." msgstr ":ref:`Disponibilité ` : Windows." -#: library/asyncio-eventloop.rst:1531 +#: library/asyncio-eventloop.rst:1627 msgid "" "`MSDN documentation on I/O Completion Ports `_." msgstr "" -#: library/asyncio-eventloop.rst:1537 +#: library/asyncio-eventloop.rst:1633 msgid "Abstract base class for asyncio-compliant event loops." msgstr "" -#: library/asyncio-eventloop.rst:1539 +#: library/asyncio-eventloop.rst:1635 msgid "" "The :ref:`Event Loop Methods ` section lists all methods " "that an alternative implementation of ``AbstractEventLoop`` should have " "defined." msgstr "" -#: library/asyncio-eventloop.rst:1545 +#: library/asyncio-eventloop.rst:1641 msgid "Examples" msgstr "Exemples" -#: library/asyncio-eventloop.rst:1547 +#: library/asyncio-eventloop.rst:1643 msgid "" "Note that all examples in this section **purposefully** show how to use the " "low-level event loop APIs, such as :meth:`loop.run_forever` and :meth:`loop." @@ -1897,70 +1981,70 @@ msgid "" "consider using the high-level functions like :func:`asyncio.run`." msgstr "" -#: library/asyncio-eventloop.rst:1557 +#: library/asyncio-eventloop.rst:1653 msgid "Hello World with call_soon()" msgstr "\"Hello World\" avec ``call_soon()``" -#: library/asyncio-eventloop.rst:1559 +#: library/asyncio-eventloop.rst:1655 msgid "" "An example using the :meth:`loop.call_soon` method to schedule a callback. " "The callback displays ``\"Hello World\"`` and then stops the event loop::" msgstr "" -#: library/asyncio-eventloop.rst:1583 +#: library/asyncio-eventloop.rst:1679 msgid "" "A similar :ref:`Hello World ` example created with a coroutine " "and the :func:`run` function." msgstr "" -#: library/asyncio-eventloop.rst:1590 +#: library/asyncio-eventloop.rst:1686 msgid "Display the current date with call_later()" msgstr "Afficher la date actuelle avec ``call_later()``" -#: library/asyncio-eventloop.rst:1592 +#: library/asyncio-eventloop.rst:1688 msgid "" "An example of a callback displaying the current date every second. The " "callback uses the :meth:`loop.call_later` method to reschedule itself after " "5 seconds, and then stops the event loop::" msgstr "" -#: library/asyncio-eventloop.rst:1620 +#: library/asyncio-eventloop.rst:1716 msgid "" "A similar :ref:`current date ` example created with a " "coroutine and the :func:`run` function." msgstr "" -#: library/asyncio-eventloop.rst:1627 +#: library/asyncio-eventloop.rst:1723 msgid "Watch a file descriptor for read events" msgstr "" -#: library/asyncio-eventloop.rst:1629 +#: library/asyncio-eventloop.rst:1725 msgid "" "Wait until a file descriptor received some data using the :meth:`loop." "add_reader` method and then close the event loop::" msgstr "" -#: library/asyncio-eventloop.rst:1667 +#: library/asyncio-eventloop.rst:1763 msgid "" "A similar :ref:`example ` using " "transports, protocols, and the :meth:`loop.create_connection` method." msgstr "" -#: library/asyncio-eventloop.rst:1671 +#: library/asyncio-eventloop.rst:1767 msgid "" "Another similar :ref:`example ` " "using the high-level :func:`asyncio.open_connection` function and streams." msgstr "" -#: library/asyncio-eventloop.rst:1679 +#: library/asyncio-eventloop.rst:1775 msgid "Set signal handlers for SIGINT and SIGTERM" msgstr "Définit les gestionnaires de signaux pour *SIGINT* et *SIGTERM*" -#: library/asyncio-eventloop.rst:1681 +#: library/asyncio-eventloop.rst:1777 msgid "(This ``signals`` example only works on Unix.)" msgstr "(Cet exemple ne fonctionne que sur Unix.)" -#: library/asyncio-eventloop.rst:1683 +#: library/asyncio-eventloop.rst:1779 msgid "" "Register handlers for signals :py:data:`SIGINT` and :py:data:`SIGTERM` using " "the :meth:`loop.add_signal_handler` method::" diff --git a/library/asyncio-exceptions.po b/library/asyncio-exceptions.po index 36806d636f..30705f8ce0 100644 --- a/library/asyncio-exceptions.po +++ b/library/asyncio-exceptions.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -24,75 +24,76 @@ msgstr "" #: library/asyncio-exceptions.rst:16 #, fuzzy -msgid "The operation has exceeded the given deadline." +msgid "" +"A deprecated alias of :exc:`TimeoutError`, raised when the operation has " +"exceeded the given deadline." msgstr "L'opération a dépassé le délai donné." -#: library/asyncio-exceptions.rst:19 -msgid "" -"This exception is different from the builtin :exc:`TimeoutError` exception." +#: library/asyncio-exceptions.rst:21 +msgid "This class was made an alias of :exc:`TimeoutError`." msgstr "" -#: library/asyncio-exceptions.rst:25 +#: library/asyncio-exceptions.rst:26 msgid "The operation has been cancelled." msgstr "" -#: library/asyncio-exceptions.rst:27 +#: library/asyncio-exceptions.rst:28 msgid "" "This exception can be caught to perform custom operations when asyncio Tasks " "are cancelled. In almost all situations the exception must be re-raised." msgstr "" -#: library/asyncio-exceptions.rst:33 +#: library/asyncio-exceptions.rst:34 msgid ":exc:`CancelledError` is now a subclass of :class:`BaseException`." msgstr "" -#: library/asyncio-exceptions.rst:38 +#: library/asyncio-exceptions.rst:39 msgid "Invalid internal state of :class:`Task` or :class:`Future`." msgstr "" -#: library/asyncio-exceptions.rst:40 +#: library/asyncio-exceptions.rst:41 msgid "" "Can be raised in situations like setting a result value for a *Future* " "object that already has a result value set." msgstr "" -#: library/asyncio-exceptions.rst:46 +#: library/asyncio-exceptions.rst:47 msgid "" "The \"sendfile\" syscall is not available for the given socket or file type." msgstr "" -#: library/asyncio-exceptions.rst:49 +#: library/asyncio-exceptions.rst:50 msgid "A subclass of :exc:`RuntimeError`." msgstr "" -#: library/asyncio-exceptions.rst:54 +#: library/asyncio-exceptions.rst:55 msgid "The requested read operation did not complete fully." msgstr "" -#: library/asyncio-exceptions.rst:56 +#: library/asyncio-exceptions.rst:57 msgid "Raised by the :ref:`asyncio stream APIs`." msgstr "" -#: library/asyncio-exceptions.rst:58 +#: library/asyncio-exceptions.rst:59 msgid "This exception is a subclass of :exc:`EOFError`." msgstr "" -#: library/asyncio-exceptions.rst:62 +#: library/asyncio-exceptions.rst:63 msgid "The total number (:class:`int`) of expected bytes." msgstr "" -#: library/asyncio-exceptions.rst:66 +#: library/asyncio-exceptions.rst:67 msgid "A string of :class:`bytes` read before the end of stream was reached." msgstr "" -#: library/asyncio-exceptions.rst:71 +#: library/asyncio-exceptions.rst:72 msgid "Reached the buffer size limit while looking for a separator." msgstr "" -#: library/asyncio-exceptions.rst:73 +#: library/asyncio-exceptions.rst:74 msgid "Raised by the :ref:`asyncio stream APIs `." msgstr "" -#: library/asyncio-exceptions.rst:77 +#: library/asyncio-exceptions.rst:78 msgid "The total number of to be consumed bytes." msgstr "" diff --git a/library/asyncio-extending.po b/library/asyncio-extending.po new file mode 100644 index 0000000000..1dbdc544ba --- /dev/null +++ b/library/asyncio-extending.po @@ -0,0 +1,160 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001-2022, Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.11\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-05-23 00:51+0200\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/asyncio-extending.rst:6 +msgid "Extending" +msgstr "" + +#: library/asyncio-extending.rst:8 +msgid "" +"The main direction for :mod:`asyncio` extending is writing custom *event " +"loop* classes. Asyncio has helpers that could be used to simplify this task." +msgstr "" + +#: library/asyncio-extending.rst:13 +msgid "" +"Third-parties should reuse existing asyncio code with caution, a new Python " +"version is free to break backward compatibility in *internal* part of API." +msgstr "" + +#: library/asyncio-extending.rst:19 +msgid "Writing a Custom Event Loop" +msgstr "" + +#: library/asyncio-extending.rst:21 +msgid "" +":class:`asyncio.AbstractEventLoop` declares very many methods. Implementing " +"all them from scratch is a tedious job." +msgstr "" + +#: library/asyncio-extending.rst:24 +msgid "" +"A loop can get many common methods implementation for free by inheriting " +"from :class:`asyncio.BaseEventLoop`." +msgstr "" + +#: library/asyncio-extending.rst:27 +msgid "" +"In turn, the successor should implement a bunch of *private* methods " +"declared but not implemented in :class:`asyncio.BaseEventLoop`." +msgstr "" + +#: library/asyncio-extending.rst:30 +msgid "" +"For example, ``loop.create_connection()`` checks arguments, resolves DNS " +"addresses, and calls ``loop._make_socket_transport()`` that should be " +"implemented by inherited class. The ``_make_socket_transport()`` method is " +"not documented and is considered as an *internal* API." +msgstr "" + +#: library/asyncio-extending.rst:38 +msgid "Future and Task private constructors" +msgstr "" + +#: library/asyncio-extending.rst:40 +msgid "" +":class:`asyncio.Future` and :class:`asyncio.Task` should be never created " +"directly, please use corresponding :meth:`loop.create_future` and :meth:" +"`loop.create_task`, or :func:`asyncio.create_task` factories instead." +msgstr "" + +#: library/asyncio-extending.rst:44 +msgid "" +"However, third-party *event loops* may *reuse* built-in future and task " +"implementations for the sake of getting a complex and highly optimized code " +"for free." +msgstr "" + +#: library/asyncio-extending.rst:47 +msgid "For this purpose the following, *private* constructors are listed:" +msgstr "" + +#: library/asyncio-extending.rst:51 +msgid "Create a built-in future instance." +msgstr "" + +#: library/asyncio-extending.rst:53 +msgid "*loop* is an optional event loop instance." +msgstr "" + +#: library/asyncio-extending.rst:57 +msgid "Create a built-in task instance." +msgstr "" + +#: library/asyncio-extending.rst:59 +msgid "" +"*loop* is an optional event loop instance. The rest of arguments are " +"described in :meth:`loop.create_task` description." +msgstr "" + +#: library/asyncio-extending.rst:64 +msgid "*context* argument is added." +msgstr "" + +#: library/asyncio-extending.rst:68 +msgid "" +"Return ``True`` if *future* is attached to the same loop as the task, " +"``False`` otherwise." +msgstr "" + +#: library/asyncio-extending.rst:75 +msgid "Task lifetime support" +msgstr "" + +#: library/asyncio-extending.rst:77 +msgid "" +"A third party task implementation should call the following functions to " +"keep a task visible by :func:`asyncio.get_tasks` and :func:`asyncio." +"current_task`:" +msgstr "" + +#: library/asyncio-extending.rst:82 +msgid "Register a new *task* as managed by *asyncio*." +msgstr "" + +#: library/asyncio-extending.rst:84 +msgid "Call the function from a task constructor." +msgstr "" + +#: library/asyncio-extending.rst:88 +msgid "Unregister a *task* from *asyncio* internal structures." +msgstr "" + +#: library/asyncio-extending.rst:90 +msgid "The function should be called when a task is about to finish." +msgstr "" + +#: library/asyncio-extending.rst:94 +msgid "Switch the current task to the *task* argument." +msgstr "" + +#: library/asyncio-extending.rst:96 +msgid "" +"Call the function just before executing a portion of embedded *coroutine* (:" +"meth:`coroutine.send` or :meth:`coroutine.throw`)." +msgstr "" + +#: library/asyncio-extending.rst:101 +msgid "Switch the current task back from *task* to ``None``." +msgstr "" + +#: library/asyncio-extending.rst:103 +msgid "" +"Call the function just after :meth:`coroutine.send` or :meth:`coroutine." +"throw` execution." +msgstr "" diff --git a/library/asyncio-future.po b/library/asyncio-future.po index b908f0f7ef..c7279122d6 100644 --- a/library/asyncio-future.po +++ b/library/asyncio-future.po @@ -5,60 +5,71 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2022-08-22 22:57-0400\n" +"Last-Translator: Nicolas Haller \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.1.1\n" #: library/asyncio-future.rst:8 msgid "Futures" -msgstr "Futurs" +msgstr "Futures" #: library/asyncio-future.rst:10 msgid "" "**Source code:** :source:`Lib/asyncio/futures.py`, :source:`Lib/asyncio/" "base_futures.py`" msgstr "" +"**Code source :** :source:`Lib/asyncio/futures.py`, :source:`Lib/asyncio/" +"base_futures.py`" #: library/asyncio-future.rst:15 msgid "" "*Future* objects are used to bridge **low-level callback-based code** with " "high-level async/await code." msgstr "" +"Les objets *Future* sont utilisés comme passerelles entre du **code bas " +"niveau basé sur des fonctions de rappel** et du code haut niveau utilisant " +"*async* et *await*." #: library/asyncio-future.rst:20 msgid "Future Functions" -msgstr "" +msgstr "Fonctions pour *Future*" #: library/asyncio-future.rst:24 msgid "Return ``True`` if *obj* is either of:" -msgstr "" +msgstr "Renvoie ``True`` si *obj* est soit :" #: library/asyncio-future.rst:26 msgid "an instance of :class:`asyncio.Future`," -msgstr "" +msgstr "une instance de :class:`asyncio.Future` ;" #: library/asyncio-future.rst:27 msgid "an instance of :class:`asyncio.Task`," -msgstr "" +msgstr "une instance de :class:`asyncio.Task` ;" #: library/asyncio-future.rst:28 msgid "a Future-like object with a ``_asyncio_future_blocking`` attribute." msgstr "" +"un objet se comportant comme *Future* et possédant un attribut " +"``_asyncio_future_blocking``." #: library/asyncio-future.rst:36 msgid "Return:" -msgstr "" +msgstr "Renvoie :" #: library/asyncio-future.rst:38 msgid "" "*obj* argument as is, if *obj* is a :class:`Future`, a :class:`Task`, or a " "Future-like object (:func:`isfuture` is used for the test.)" msgstr "" +"l'objet *obj* tel quel si c'est un objet :class:`Future`, :class:" +"`Task` ou se comportant comme un *Future*. :func:`isfuture` est utilisée " +"pour le test ;" #: library/asyncio-future.rst:42 msgid "" @@ -66,96 +77,158 @@ msgid "" "`iscoroutine` is used for the test); in this case the coroutine will be " "scheduled by ``ensure_future()``." msgstr "" +"un objet :class:`Task` encapsulant *obj* si ce dernier est une " +"coroutine (:func:`iscoroutine` est utilisée pour le test). Dans ce cas, " +"l’exécution de la coroutine sera planifiée par ``ensure_future()`` ;" #: library/asyncio-future.rst:47 msgid "" "a :class:`Task` object that would await on *obj*, if *obj* is an awaitable (:" "func:`inspect.isawaitable` is used for the test.)" msgstr "" +"un objet :class:`Task` qui attendra (*await*) *obj* si ce " +"dernier peut être attendu (*awaitable*). :func:`iscoroutine` est utilisée " +"pour le test." #: library/asyncio-future.rst:50 msgid "If *obj* is neither of the above a :exc:`TypeError` is raised." msgstr "" +"Si *obj* ne correspond à aucun des critères ci-dessus, une exception :exc:" +"`TypeError` est levée." #: library/asyncio-future.rst:54 msgid "" "See also the :func:`create_task` function which is the preferred way for " "creating new Tasks." msgstr "" +"Voir aussi la fonction :func:`create_task` qui est la manière privilégiée " +"pour créer des nouvelles tâches." #: library/asyncio-future.rst:57 +msgid "" +"Save a reference to the result of this function, to avoid a task " +"disappearing mid execution." +msgstr "" +"Gardez une référence au résultat de cette fonction pour éviter de voir une " +"tâche disparaitre au milieu de son exécution." + +#: library/asyncio-future.rst:60 msgid "The function accepts any :term:`awaitable` object." msgstr "La fonction accepte n'importe quel objet :term:`awaitable`." #: library/asyncio-future.rst:63 msgid "" +"Deprecation warning is emitted if *obj* is not a Future-like object and " +"*loop* is not specified and there is no running event loop." +msgstr "" +"Un ``DeprecationWarning`` est levé si *obj* n'est pas un objet se comportant " +"comme un *Future*, si *loop* n'est pas spécifié et s'il n'y a pas de boucle " +"d'évènements en cours d'exécution." + +#: library/asyncio-future.rst:70 +msgid "" "Wrap a :class:`concurrent.futures.Future` object in a :class:`asyncio." "Future` object." msgstr "" +"Encapsule un objet :class:`concurrent.futures.Future` dans un objet :class:" +"`asyncio.Future`." -#: library/asyncio-future.rst:68 -msgid "Future Object" +#: library/asyncio-future.rst:73 +msgid "" +"Deprecation warning is emitted if *future* is not a Future-like object and " +"*loop* is not specified and there is no running event loop." msgstr "" +"Un ``DeprecationWarning`` est levé si *future* n'est pas un objet se " +"comportant comme un *Future*, si *loop* n'est pas spécifié et s'il n'y a pas " +"de boucle d'évènements en cours d'exécution." + +#: library/asyncio-future.rst:79 +msgid "Future Object" +msgstr "Objet *Future*" -#: library/asyncio-future.rst:72 +#: library/asyncio-future.rst:83 msgid "" "A Future represents an eventual result of an asynchronous operation. Not " "thread-safe." msgstr "" +"Un *Future* représente le résultat final d'une opération asynchrone. Il " +"n'est pas conçu pour pouvoir être utilisé par plusieurs fils d'exécution." -#: library/asyncio-future.rst:75 +#: library/asyncio-future.rst:86 msgid "" "Future is an :term:`awaitable` object. Coroutines can await on Future " "objects until they either have a result or an exception set, or until they " "are cancelled." msgstr "" +"*Future* est un objet qui peut être attendu (:term:`awaitable`). Les " +"coroutines peuvent attendre les objets *Future* jusqu'à ce qu'ils renvoient " +"un résultat, ils lèvent une exception ou qu'ils soient annulés." -#: library/asyncio-future.rst:79 +#: library/asyncio-future.rst:90 msgid "" "Typically Futures are used to enable low-level callback-based code (e.g. in " "protocols implemented using asyncio :ref:`transports `) to interoperate with high-level async/await code." msgstr "" +"Les *Futures* sont habituellement utilisés pour permettre à du code bas " +"niveau basé sur des fonctions de rappel (par exemple : les protocoles " +"utilisant *asyncio* :ref:`transports `) " +"d'interagir avec du code haut niveau utilisant *async* et *await*." -#: library/asyncio-future.rst:84 +#: library/asyncio-future.rst:95 msgid "" "The rule of thumb is to never expose Future objects in user-facing APIs, and " "the recommended way to create a Future object is to call :meth:`loop." "create_future`. This way alternative event loop implementations can inject " "their own optimized implementations of a Future object." msgstr "" +"Une bonne règle empirique est de ne jamais exposer des objets *Future* dans " +"des *API* destinées à l'utilisateur. La façon privilégiée de créer des " +"objets *Future* est d'appeler la méthode :meth:`loop.create_future`. Cela " +"permet aux implémentations alternatives de la boucle d'évènements d'utiliser " +"leur propre implémentation de l'objet *Future*." -#: library/asyncio-future.rst:90 +#: library/asyncio-future.rst:101 msgid "Added support for the :mod:`contextvars` module." msgstr "Ajout du support du module :mod:`contextvars`." -#: library/asyncio-future.rst:95 -msgid "Return the result of the Future." +#: library/asyncio-future.rst:104 +msgid "" +"Deprecation warning is emitted if *loop* is not specified and there is no " +"running event loop." msgstr "" +"Un ``DeprecationWarning`` est levé si *loop* n'est pas spécifié et s'il n'y " +"a pas de boucle d'évènements en cours d'exécution." + +#: library/asyncio-future.rst:110 +msgid "Return the result of the Future." +msgstr "Renvoie le résultat du *Future*." -#: library/asyncio-future.rst:97 +#: library/asyncio-future.rst:112 msgid "" "If the Future is *done* and has a result set by the :meth:`set_result` " "method, the result value is returned." msgstr "" +"Si le *Future* est « terminé » et a un résultat défini par la méthode :meth:" +"`set_result`, ce résultat est renvoyé." -#: library/asyncio-future.rst:100 +#: library/asyncio-future.rst:115 msgid "" "If the Future is *done* and has an exception set by the :meth:" "`set_exception` method, this method raises the exception." msgstr "" +"Si le *Future* est « terminé » et a une exception définie par la méthode :" +"meth:`set_exception`, cette méthode lève l'exception." -#: library/asyncio-future.rst:191 -#, fuzzy +#: library/asyncio-future.rst:211 msgid "" "If the Future has been *cancelled*, this method raises a :exc:" "`CancelledError` exception." msgstr "" -"Si la tâche a été *annulée*, cette méthode lève une exception :exc:" +"Si le *Future* a été *annulé*, cette méthode lève une exception :exc:" "`CancelledError`." -#: library/asyncio-future.rst:106 -#, fuzzy +#: library/asyncio-future.rst:121 msgid "" "If the Future's result isn't yet available, this method raises a :exc:" "`InvalidStateError` exception." @@ -163,166 +236,212 @@ msgstr "" "Si le résultat de la tâche n'est pas encore disponible, cette méthode lève " "une exception :exc:`InvalidStateError`." -#: library/asyncio-future.rst:111 -#, fuzzy +#: library/asyncio-future.rst:126 msgid "Mark the Future as *done* and set its result." -msgstr "Marque le futur comme terminé et définit son résultat." +msgstr "Marque le *Future* comme « terminé » et définit son résultat." -#: library/asyncio-future.rst:120 +#: library/asyncio-future.rst:135 msgid "" "Raises a :exc:`InvalidStateError` error if the Future is already *done*." msgstr "" +"Lève une erreur :exc:`InvalidStateError` si le *Future* est déjà « terminé »." -#: library/asyncio-future.rst:118 -#, fuzzy +#: library/asyncio-future.rst:133 msgid "Mark the Future as *done* and set an exception." -msgstr "Marque le futur comme terminé et définit une exception." +msgstr "Marque le *Future* comme « terminé » et définit une exception." -#: library/asyncio-future.rst:125 +#: library/asyncio-future.rst:140 msgid "Return ``True`` if the Future is *done*." -msgstr "" +msgstr "Renvoie ``True`` si le *Future* est « terminé »." -#: library/asyncio-future.rst:127 +#: library/asyncio-future.rst:142 msgid "" "A Future is *done* if it was *cancelled* or if it has a result or an " "exception set with :meth:`set_result` or :meth:`set_exception` calls." msgstr "" +"Un *Future* est « terminé » s'il a été « annulé » ou si un résultat ou une " +"exception a été définie par les méthodes :meth:`set_result` ou :meth:" +"`set_exception`." -#: library/asyncio-future.rst:133 +#: library/asyncio-future.rst:148 msgid "Return ``True`` if the Future was *cancelled*." -msgstr "" +msgstr "Renvoie ``True`` si le *Future* a été « annulé »." -#: library/asyncio-future.rst:135 +#: library/asyncio-future.rst:150 msgid "" "The method is usually used to check if a Future is not *cancelled* before " "setting a result or an exception for it::" msgstr "" +"Cette méthode est habituellement utilisée pour vérifier qu'un *Future* n'est " +"pas « annulé » avant de définir un résultat ou une exception pour celui-ci ::" -#: library/asyncio-future.rst:143 +#: library/asyncio-future.rst:158 msgid "Add a callback to be run when the Future is *done*." msgstr "" +"Ajoute une fonction de rappel à exécuter lorsque le *Future* est « terminé »." -#: library/asyncio-future.rst:145 +#: library/asyncio-future.rst:160 msgid "The *callback* is called with the Future object as its only argument." msgstr "" +"L'argument *callback* est appelé avec l'objet *Future* comme seul argument." -#: library/asyncio-future.rst:148 +#: library/asyncio-future.rst:163 msgid "" "If the Future is already *done* when this method is called, the callback is " "scheduled with :meth:`loop.call_soon`." msgstr "" +"Si le *Future* est déjà « terminé » lorsque la méthode est appelée, " +"l'exécution de la fonction de rappel est planifiée avec :meth:`loop." +"call_soon`." -#: library/asyncio-future.rst:151 +#: library/asyncio-future.rst:166 msgid "" "An optional keyword-only *context* argument allows specifying a custom :" "class:`contextvars.Context` for the *callback* to run in. The current " "context is used when no *context* is provided." msgstr "" +"L'argument nommé optionnel *context* permet de spécifier une classe :class:" +"`contextvars.Context` personnalisée dans laquelle la fonction de rappel " +"s’exécutera. Le contexte actuel est utilisé si *context* n'est pas fourni." -#: library/asyncio-future.rst:155 +#: library/asyncio-future.rst:170 msgid "" ":func:`functools.partial` can be used to pass parameters to the callback, e." "g.::" msgstr "" +":func:`functools.partial` peut être utilisée pour passer des paramètres à la " +"fonction de rappel ::" -#: library/asyncio-future.rst:162 +#: library/asyncio-future.rst:177 msgid "" "The *context* keyword-only parameter was added. See :pep:`567` for more " "details." msgstr "" +"Ajout de l'argument nommé *context*. Voir :pep:`567` pour plus de détails." -#: library/asyncio-future.rst:168 +#: library/asyncio-future.rst:183 msgid "Remove *callback* from the callbacks list." msgstr "Retire *callback* de la liste de fonctions de rappel." -#: library/asyncio-future.rst:170 +#: library/asyncio-future.rst:185 msgid "" "Returns the number of callbacks removed, which is typically 1, unless a " "callback was added more than once." msgstr "" +"Renvoie le nombre de fonctions de rappel retiré. La méthode renvoie " +"généralement 1, à moins que la fonction ait été ajoutée plus d'une fois." -#: library/asyncio-future.rst:175 +#: library/asyncio-future.rst:190 msgid "Cancel the Future and schedule callbacks." -msgstr "" +msgstr "Annule le *Future* et planifie l'exécution des fonctions de rappel." -#: library/asyncio-future.rst:177 +#: library/asyncio-future.rst:192 msgid "" "If the Future is already *done* or *cancelled*, return ``False``. Otherwise, " "change the Future's state to *cancelled*, schedule the callbacks, and return " "``True``." msgstr "" +"Si le *Future* est déjà « terminé » ou « annulé », renvoie ``False``. " +"Autrement, change l'état du *Future* à « annulé », planifie l'exécution des " +"fonctions de rappel et renvoie ``True``." + +#: library/asyncio-future.rst:196 +msgid "Added the *msg* parameter." +msgstr "Ajout du paramètre *msg*." -#: library/asyncio-future.rst:181 -msgid "Added the ``msg`` parameter." +#: library/asyncio-future.rst:288 +msgid "" +"*msg* parameter is ambiguous when multiple :meth:`cancel` are called with " +"different cancellation messages. The argument will be removed." msgstr "" -#: library/asyncio-future.rst:186 +#: library/asyncio-future.rst:206 msgid "Return the exception that was set on this Future." -msgstr "" +msgstr "Renvoie l'exception définie pour ce *Future*." -#: library/asyncio-future.rst:188 +#: library/asyncio-future.rst:208 msgid "" "The exception (or ``None`` if no exception was set) is returned only if the " "Future is *done*." msgstr "" +"L'exception, ou ``None`` si aucune exception n'a été définie, est renvoyé " +"seulement si le *Future* est « terminé »." -#: library/asyncio-future.rst:194 -#, fuzzy +#: library/asyncio-future.rst:214 msgid "" "If the Future isn't *done* yet, this method raises an :exc:" "`InvalidStateError` exception." msgstr "" -"Si la tâche n'est pas encore *achevée*, cette méthode lève une exception :" -"exc:`InvalidStateError`." +"Si le *Future* n'est pas encore « terminé », cette méthode lève une " +"exception :exc:`InvalidStateError`." -#: library/asyncio-future.rst:199 +#: library/asyncio-future.rst:219 msgid "Return the event loop the Future object is bound to." -msgstr "" +msgstr "Renvoie la boucle d'évènements à laquelle le *Future* est attaché." -#: library/asyncio-future.rst:206 +#: library/asyncio-future.rst:226 msgid "" "This example creates a Future object, creates and schedules an asynchronous " "Task to set result for the Future, and waits until the Future has a result::" msgstr "" +"Cet exemple crée un objet *Future*, puis crée et planifie l’exécution d'une " +"tâche asynchrone qui définira le résultat du *Future* et attend jusqu'à ce " +"que le *Future* ait un résultat ::" -#: library/asyncio-future.rst:241 +#: library/asyncio-future.rst:261 msgid "" "The Future object was designed to mimic :class:`concurrent.futures.Future`. " "Key differences include:" msgstr "" +"L'objet *Future* est conçu pour imiter la classe :class:`concurrent.futures." +"Future`. Les principales différences sont :" -#: library/asyncio-future.rst:244 +#: library/asyncio-future.rst:264 msgid "" "unlike asyncio Futures, :class:`concurrent.futures.Future` instances cannot " "be awaited." msgstr "" +"contrairement au *Future asyncio*, les instances de :class:`concurrent." +"futures.Future` ne peuvent pas être attendues ;" -#: library/asyncio-future.rst:247 +#: library/asyncio-future.rst:267 msgid "" ":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` do not " "accept the *timeout* argument." msgstr "" +":meth:`asyncio.Future.result` et :meth:`asyncio.Future.exception` " +"n'acceptent pas d'argument *timeout* ;" -#: library/asyncio-future.rst:250 +#: library/asyncio-future.rst:270 msgid "" ":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` raise an :" "exc:`InvalidStateError` exception when the Future is not *done*." msgstr "" +":meth:`asyncio.Future.result` et :meth:`asyncio.Future.exception` lèvent une " +"exception :exc:`InvalidStateError` lorsque le *Future* n'est pas " +"« terminé » ;" -#: library/asyncio-future.rst:254 +#: library/asyncio-future.rst:274 msgid "" "Callbacks registered with :meth:`asyncio.Future.add_done_callback` are not " "called immediately. They are scheduled with :meth:`loop.call_soon` instead." msgstr "" +"les fonctions de rappel enregistrées à l'aide de :meth:`asyncio.Future." +"add_done_callback` ne sont pas exécutées immédiatement mais planifiées avec :" +"meth:`loop.call_soon` ;" -#: library/asyncio-future.rst:258 +#: library/asyncio-future.rst:278 msgid "" "asyncio Future is not compatible with the :func:`concurrent.futures.wait` " "and :func:`concurrent.futures.as_completed` functions." msgstr "" +"les *Future asyncio* ne sont pas compatibles avec les fonctions :func:" +"`concurrent.futures.wait` et :func:`concurrent.futures.as_completed` ;" -#: library/asyncio-future.rst:262 +#: library/asyncio-future.rst:282 msgid "" ":meth:`asyncio.Future.cancel` accepts an optional ``msg`` argument, but :" "func:`concurrent.futures.cancel` does not." msgstr "" +":meth:`asyncio.Future.cancel` accepte un argument optionnel ``msg`` mais " +"pas :func:`concurrent.futures.cancel`." diff --git a/library/asyncio-llapi-index.po b/library/asyncio-llapi-index.po index 0f66c5e75e..26e680f80e 100644 --- a/library/asyncio-llapi-index.po +++ b/library/asyncio-llapi-index.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -28,7 +28,7 @@ msgstr "Obtenir une boucle d'évènements" #: library/asyncio-llapi-index.rst:18 msgid ":func:`asyncio.get_running_loop`" -msgstr "" +msgstr ":func:`asyncio.get_running_loop`" #: library/asyncio-llapi-index.rst:19 msgid "The **preferred** function to get the running event loop." @@ -36,7 +36,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:21 msgid ":func:`asyncio.get_event_loop`" -msgstr "" +msgstr ":func:`asyncio.get_event_loop`" #: library/asyncio-llapi-index.rst:22 msgid "Get an event loop instance (current or via the policy)." @@ -44,7 +44,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:24 msgid ":func:`asyncio.set_event_loop`" -msgstr "" +msgstr ":func:`asyncio.set_event_loop`" #: library/asyncio-llapi-index.rst:25 msgid "Set the event loop as current via the current policy." @@ -52,13 +52,13 @@ msgstr "" #: library/asyncio-llapi-index.rst:27 msgid ":func:`asyncio.new_event_loop`" -msgstr "" +msgstr ":func:`asyncio.new_event_loop`" #: library/asyncio-llapi-index.rst:28 msgid "Create a new event loop." msgstr "" -#: library/asyncio-llapi-index.rst:32 library/asyncio-llapi-index.rst:260 +#: library/asyncio-llapi-index.rst:32 library/asyncio-llapi-index.rst:269 msgid "Examples" msgstr "Exemples" @@ -82,7 +82,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:47 msgid ":meth:`loop.run_until_complete`" -msgstr "" +msgstr ":meth:`loop.run_until_complete`" #: library/asyncio-llapi-index.rst:48 msgid "Run a Future/Task/awaitable until complete." @@ -90,7 +90,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:50 msgid ":meth:`loop.run_forever`" -msgstr "" +msgstr ":meth:`loop.run_forever`" #: library/asyncio-llapi-index.rst:51 msgid "Run the event loop forever." @@ -98,7 +98,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:53 msgid ":meth:`loop.stop`" -msgstr "" +msgstr ":meth:`loop.stop`" #: library/asyncio-llapi-index.rst:54 msgid "Stop the event loop." @@ -106,7 +106,7 @@ msgstr "Arrête l'exécution de la boucle d'évènements." #: library/asyncio-llapi-index.rst:56 msgid ":meth:`loop.close`" -msgstr "" +msgstr ":meth:`loop.close`" #: library/asyncio-llapi-index.rst:57 msgid "Close the event loop." @@ -114,7 +114,7 @@ msgstr "Arrête la boucle d'évènements." #: library/asyncio-llapi-index.rst:59 msgid ":meth:`loop.is_running()`" -msgstr "" +msgstr ":meth:`loop.is_running()`" #: library/asyncio-llapi-index.rst:60 msgid "Return ``True`` if the event loop is running." @@ -122,7 +122,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:62 msgid ":meth:`loop.is_closed()`" -msgstr "" +msgstr ":meth:`loop.is_closed()`" #: library/asyncio-llapi-index.rst:63 #, fuzzy @@ -143,7 +143,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:74 msgid ":meth:`loop.set_debug`" -msgstr "" +msgstr ":meth:`loop.set_debug`" #: library/asyncio-llapi-index.rst:75 msgid "Enable or disable the debug mode." @@ -151,7 +151,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:77 msgid ":meth:`loop.get_debug`" -msgstr "" +msgstr ":meth:`loop.get_debug`" #: library/asyncio-llapi-index.rst:78 msgid "Get the current debug mode." @@ -163,7 +163,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:86 msgid ":meth:`loop.call_soon`" -msgstr "" +msgstr ":meth:`loop.call_soon`" #: library/asyncio-llapi-index.rst:87 msgid "Invoke a callback soon." @@ -171,7 +171,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:89 msgid ":meth:`loop.call_soon_threadsafe`" -msgstr "" +msgstr ":meth:`loop.call_soon_threadsafe`" #: library/asyncio-llapi-index.rst:90 msgid "A thread-safe variant of :meth:`loop.call_soon`." @@ -179,7 +179,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:92 msgid ":meth:`loop.call_later`" -msgstr "" +msgstr ":meth:`loop.call_later`" #: library/asyncio-llapi-index.rst:93 msgid "Invoke a callback *after* the given time." @@ -187,7 +187,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:95 msgid ":meth:`loop.call_at`" -msgstr "" +msgstr ":meth:`loop.call_at`" #: library/asyncio-llapi-index.rst:96 msgid "Invoke a callback *at* the given time." @@ -209,7 +209,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:108 msgid ":meth:`loop.set_default_executor`" -msgstr "" +msgstr ":meth:`loop.set_default_executor`" #: library/asyncio-llapi-index.rst:109 msgid "Set the default executor for :meth:`loop.run_in_executor`." @@ -221,7 +221,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:117 msgid ":meth:`loop.create_future`" -msgstr "" +msgstr ":meth:`loop.create_future`" #: library/asyncio-llapi-index.rst:118 msgid "Create a :class:`Future` object." @@ -229,7 +229,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:120 msgid ":meth:`loop.create_task`" -msgstr "" +msgstr ":meth:`loop.create_task`" #: library/asyncio-llapi-index.rst:121 msgid "Schedule coroutine as a :class:`Task`." @@ -237,7 +237,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:123 msgid ":meth:`loop.set_task_factory`" -msgstr "" +msgstr ":meth:`loop.set_task_factory`" #: library/asyncio-llapi-index.rst:124 msgid "" @@ -247,7 +247,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:127 msgid ":meth:`loop.get_task_factory`" -msgstr "" +msgstr ":meth:`loop.get_task_factory`" #: library/asyncio-llapi-index.rst:128 msgid "" @@ -380,543 +380,567 @@ msgid "Receive data from the :class:`~socket.socket` into a buffer." msgstr "" #: library/asyncio-llapi-index.rst:192 -msgid "``await`` :meth:`loop.sock_sendall`" +msgid "``await`` :meth:`loop.sock_recvfrom`" msgstr "" #: library/asyncio-llapi-index.rst:193 -msgid "Send data to the :class:`~socket.socket`." +msgid "Receive a datagram from the :class:`~socket.socket`." msgstr "" #: library/asyncio-llapi-index.rst:195 -msgid "``await`` :meth:`loop.sock_connect`" +msgid "``await`` :meth:`loop.sock_recvfrom_into`" msgstr "" #: library/asyncio-llapi-index.rst:196 -msgid "Connect the :class:`~socket.socket`." +msgid "Receive a datagram from the :class:`~socket.socket` into a buffer." msgstr "" #: library/asyncio-llapi-index.rst:198 -msgid "``await`` :meth:`loop.sock_accept`" +msgid "``await`` :meth:`loop.sock_sendall`" msgstr "" #: library/asyncio-llapi-index.rst:199 -msgid "Accept a :class:`~socket.socket` connection." +msgid "Send data to the :class:`~socket.socket`." msgstr "" #: library/asyncio-llapi-index.rst:201 -msgid "``await`` :meth:`loop.sock_sendfile`" +msgid "``await`` :meth:`loop.sock_sendto`" msgstr "" #: library/asyncio-llapi-index.rst:202 -msgid "Send a file over the :class:`~socket.socket`." +msgid "Send a datagram via the :class:`~socket.socket` to the given address." msgstr "" #: library/asyncio-llapi-index.rst:204 -msgid ":meth:`loop.add_reader`" +msgid "``await`` :meth:`loop.sock_connect`" msgstr "" #: library/asyncio-llapi-index.rst:205 -msgid "Start watching a file descriptor for read availability." +msgid "Connect the :class:`~socket.socket`." msgstr "" #: library/asyncio-llapi-index.rst:207 -msgid ":meth:`loop.remove_reader`" +msgid "``await`` :meth:`loop.sock_accept`" msgstr "" #: library/asyncio-llapi-index.rst:208 -msgid "Stop watching a file descriptor for read availability." +msgid "Accept a :class:`~socket.socket` connection." msgstr "" #: library/asyncio-llapi-index.rst:210 -msgid ":meth:`loop.add_writer`" +msgid "``await`` :meth:`loop.sock_sendfile`" msgstr "" #: library/asyncio-llapi-index.rst:211 -msgid "Start watching a file descriptor for write availability." +msgid "Send a file over the :class:`~socket.socket`." msgstr "" #: library/asyncio-llapi-index.rst:213 -msgid ":meth:`loop.remove_writer`" -msgstr "" +msgid ":meth:`loop.add_reader`" +msgstr ":meth:`loop.add_reader`" #: library/asyncio-llapi-index.rst:214 -msgid "Stop watching a file descriptor for write availability." +msgid "Start watching a file descriptor for read availability." msgstr "" +#: library/asyncio-llapi-index.rst:216 +msgid ":meth:`loop.remove_reader`" +msgstr ":meth:`loop.remove_reader`" + #: library/asyncio-llapi-index.rst:217 +msgid "Stop watching a file descriptor for read availability." +msgstr "" + +#: library/asyncio-llapi-index.rst:219 +msgid ":meth:`loop.add_writer`" +msgstr ":meth:`loop.add_writer`" + +#: library/asyncio-llapi-index.rst:220 +msgid "Start watching a file descriptor for write availability." +msgstr "" + +#: library/asyncio-llapi-index.rst:222 +msgid ":meth:`loop.remove_writer`" +msgstr ":meth:`loop.remove_writer`" + +#: library/asyncio-llapi-index.rst:223 +msgid "Stop watching a file descriptor for write availability." +msgstr "" + +#: library/asyncio-llapi-index.rst:226 #, fuzzy msgid "Unix Signals" msgstr "Signaux Unix" -#: library/asyncio-llapi-index.rst:222 +#: library/asyncio-llapi-index.rst:231 msgid ":meth:`loop.add_signal_handler`" -msgstr "" +msgstr ":meth:`loop.add_signal_handler`" -#: library/asyncio-llapi-index.rst:223 +#: library/asyncio-llapi-index.rst:232 msgid "Add a handler for a :mod:`signal`." msgstr "" -#: library/asyncio-llapi-index.rst:225 +#: library/asyncio-llapi-index.rst:234 msgid ":meth:`loop.remove_signal_handler`" -msgstr "" +msgstr ":meth:`loop.remove_signal_handler`" -#: library/asyncio-llapi-index.rst:226 +#: library/asyncio-llapi-index.rst:235 msgid "Remove a handler for a :mod:`signal`." msgstr "" -#: library/asyncio-llapi-index.rst:229 +#: library/asyncio-llapi-index.rst:238 msgid "Subprocesses" msgstr "Sous-processus" -#: library/asyncio-llapi-index.rst:234 +#: library/asyncio-llapi-index.rst:243 msgid ":meth:`loop.subprocess_exec`" -msgstr "" +msgstr ":meth:`loop.subprocess_exec`" -#: library/asyncio-llapi-index.rst:235 +#: library/asyncio-llapi-index.rst:244 msgid "Spawn a subprocess." msgstr "" -#: library/asyncio-llapi-index.rst:237 +#: library/asyncio-llapi-index.rst:246 msgid ":meth:`loop.subprocess_shell`" -msgstr "" +msgstr ":meth:`loop.subprocess_shell`" -#: library/asyncio-llapi-index.rst:238 +#: library/asyncio-llapi-index.rst:247 msgid "Spawn a subprocess from a shell command." msgstr "" -#: library/asyncio-llapi-index.rst:241 +#: library/asyncio-llapi-index.rst:250 msgid "Error Handling" msgstr "Gestion des erreurs" -#: library/asyncio-llapi-index.rst:246 +#: library/asyncio-llapi-index.rst:255 msgid ":meth:`loop.call_exception_handler`" -msgstr "" +msgstr ":meth:`loop.call_exception_handler`" -#: library/asyncio-llapi-index.rst:247 +#: library/asyncio-llapi-index.rst:256 msgid "Call the exception handler." msgstr "" -#: library/asyncio-llapi-index.rst:249 +#: library/asyncio-llapi-index.rst:258 msgid ":meth:`loop.set_exception_handler`" -msgstr "" +msgstr ":meth:`loop.set_exception_handler`" -#: library/asyncio-llapi-index.rst:250 +#: library/asyncio-llapi-index.rst:259 msgid "Set a new exception handler." msgstr "" -#: library/asyncio-llapi-index.rst:252 +#: library/asyncio-llapi-index.rst:261 msgid ":meth:`loop.get_exception_handler`" -msgstr "" +msgstr ":meth:`loop.get_exception_handler`" -#: library/asyncio-llapi-index.rst:253 +#: library/asyncio-llapi-index.rst:262 msgid "Get the current exception handler." msgstr "" -#: library/asyncio-llapi-index.rst:255 +#: library/asyncio-llapi-index.rst:264 msgid ":meth:`loop.default_exception_handler`" -msgstr "" +msgstr ":meth:`loop.default_exception_handler`" -#: library/asyncio-llapi-index.rst:256 +#: library/asyncio-llapi-index.rst:265 msgid "The default exception handler implementation." msgstr "" -#: library/asyncio-llapi-index.rst:261 +#: library/asyncio-llapi-index.rst:270 msgid "" ":ref:`Using asyncio.get_event_loop() and loop.run_forever() " "`." msgstr "" -#: library/asyncio-llapi-index.rst:264 +#: library/asyncio-llapi-index.rst:273 msgid ":ref:`Using loop.call_later() `." msgstr "" -#: library/asyncio-llapi-index.rst:266 +#: library/asyncio-llapi-index.rst:275 msgid "" "Using ``loop.create_connection()`` to implement :ref:`an echo-client " "`." msgstr "" -#: library/asyncio-llapi-index.rst:269 +#: library/asyncio-llapi-index.rst:278 msgid "" "Using ``loop.create_connection()`` to :ref:`connect a socket " "`." msgstr "" -#: library/asyncio-llapi-index.rst:272 +#: library/asyncio-llapi-index.rst:281 msgid "" ":ref:`Using add_reader() to watch an FD for read events " "`." msgstr "" -#: library/asyncio-llapi-index.rst:275 +#: library/asyncio-llapi-index.rst:284 msgid ":ref:`Using loop.add_signal_handler() `." msgstr "" -#: library/asyncio-llapi-index.rst:277 +#: library/asyncio-llapi-index.rst:286 msgid ":ref:`Using loop.subprocess_exec() `." msgstr "" -#: library/asyncio-llapi-index.rst:281 +#: library/asyncio-llapi-index.rst:290 msgid "Transports" msgstr "Transports" -#: library/asyncio-llapi-index.rst:283 +#: library/asyncio-llapi-index.rst:292 msgid "All transports implement the following methods:" msgstr "" -#: library/asyncio-llapi-index.rst:289 +#: library/asyncio-llapi-index.rst:298 msgid ":meth:`transport.close() `" msgstr "" -#: library/asyncio-llapi-index.rst:290 +#: library/asyncio-llapi-index.rst:299 msgid "Close the transport." msgstr "Ferme le transport." -#: library/asyncio-llapi-index.rst:292 +#: library/asyncio-llapi-index.rst:301 msgid ":meth:`transport.is_closing() `" msgstr "" -#: library/asyncio-llapi-index.rst:293 +#: library/asyncio-llapi-index.rst:302 msgid "Return ``True`` if the transport is closing or is closed." msgstr "" -#: library/asyncio-llapi-index.rst:295 +#: library/asyncio-llapi-index.rst:304 msgid ":meth:`transport.get_extra_info() `" msgstr "" -#: library/asyncio-llapi-index.rst:296 +#: library/asyncio-llapi-index.rst:305 msgid "Request for information about the transport." msgstr "" -#: library/asyncio-llapi-index.rst:298 +#: library/asyncio-llapi-index.rst:307 msgid ":meth:`transport.set_protocol() `" msgstr "" -#: library/asyncio-llapi-index.rst:299 +#: library/asyncio-llapi-index.rst:308 msgid "Set a new protocol." msgstr "Change le protocole." -#: library/asyncio-llapi-index.rst:301 +#: library/asyncio-llapi-index.rst:310 msgid ":meth:`transport.get_protocol() `" msgstr "" -#: library/asyncio-llapi-index.rst:302 +#: library/asyncio-llapi-index.rst:311 msgid "Return the current protocol." msgstr "Renvoie le protocole courant." -#: library/asyncio-llapi-index.rst:305 +#: library/asyncio-llapi-index.rst:314 msgid "" "Transports that can receive data (TCP and Unix connections, pipes, etc). " "Returned from methods like :meth:`loop.create_connection`, :meth:`loop." "create_unix_connection`, :meth:`loop.connect_read_pipe`, etc:" msgstr "" -#: library/asyncio-llapi-index.rst:310 +#: library/asyncio-llapi-index.rst:319 msgid "Read Transports" msgstr "" -#: library/asyncio-llapi-index.rst:315 +#: library/asyncio-llapi-index.rst:324 msgid ":meth:`transport.is_reading() `" msgstr "" -#: library/asyncio-llapi-index.rst:316 +#: library/asyncio-llapi-index.rst:325 msgid "Return ``True`` if the transport is receiving." msgstr "" -#: library/asyncio-llapi-index.rst:318 +#: library/asyncio-llapi-index.rst:327 msgid ":meth:`transport.pause_reading() `" msgstr "" -#: library/asyncio-llapi-index.rst:319 +#: library/asyncio-llapi-index.rst:328 msgid "Pause receiving." msgstr "" -#: library/asyncio-llapi-index.rst:321 +#: library/asyncio-llapi-index.rst:330 msgid ":meth:`transport.resume_reading() `" msgstr "" -#: library/asyncio-llapi-index.rst:322 +#: library/asyncio-llapi-index.rst:331 msgid "Resume receiving." msgstr "" -#: library/asyncio-llapi-index.rst:325 +#: library/asyncio-llapi-index.rst:334 msgid "" "Transports that can Send data (TCP and Unix connections, pipes, etc). " "Returned from methods like :meth:`loop.create_connection`, :meth:`loop." "create_unix_connection`, :meth:`loop.connect_write_pipe`, etc:" msgstr "" -#: library/asyncio-llapi-index.rst:330 +#: library/asyncio-llapi-index.rst:339 msgid "Write Transports" msgstr "" -#: library/asyncio-llapi-index.rst:335 +#: library/asyncio-llapi-index.rst:344 msgid ":meth:`transport.write() `" msgstr "" -#: library/asyncio-llapi-index.rst:336 +#: library/asyncio-llapi-index.rst:345 msgid "Write data to the transport." msgstr "" -#: library/asyncio-llapi-index.rst:338 +#: library/asyncio-llapi-index.rst:347 msgid ":meth:`transport.writelines() `" msgstr "" -#: library/asyncio-llapi-index.rst:339 +#: library/asyncio-llapi-index.rst:348 msgid "Write buffers to the transport." msgstr "" -#: library/asyncio-llapi-index.rst:341 +#: library/asyncio-llapi-index.rst:350 msgid ":meth:`transport.can_write_eof() `" msgstr "" -#: library/asyncio-llapi-index.rst:342 +#: library/asyncio-llapi-index.rst:351 msgid "Return :const:`True` if the transport supports sending EOF." msgstr "" -#: library/asyncio-llapi-index.rst:344 +#: library/asyncio-llapi-index.rst:353 msgid ":meth:`transport.write_eof() `" msgstr "" -#: library/asyncio-llapi-index.rst:345 +#: library/asyncio-llapi-index.rst:354 msgid "Close and send EOF after flushing buffered data." msgstr "" -#: library/asyncio-llapi-index.rst:347 +#: library/asyncio-llapi-index.rst:356 msgid ":meth:`transport.abort() `" msgstr "" -#: library/asyncio-llapi-index.rst:348 library/asyncio-llapi-index.rst:370 +#: library/asyncio-llapi-index.rst:357 library/asyncio-llapi-index.rst:379 msgid "Close the transport immediately." msgstr "" -#: library/asyncio-llapi-index.rst:350 +#: library/asyncio-llapi-index.rst:359 msgid "" ":meth:`transport.get_write_buffer_size() `" msgstr "" -#: library/asyncio-llapi-index.rst:352 +#: library/asyncio-llapi-index.rst:361 msgid "Return high and low water marks for write flow control." msgstr "" -#: library/asyncio-llapi-index.rst:354 +#: library/asyncio-llapi-index.rst:363 msgid "" ":meth:`transport.set_write_buffer_limits() `" msgstr "" -#: library/asyncio-llapi-index.rst:356 +#: library/asyncio-llapi-index.rst:365 msgid "Set new high and low water marks for write flow control." msgstr "" -#: library/asyncio-llapi-index.rst:359 +#: library/asyncio-llapi-index.rst:368 msgid "Transports returned by :meth:`loop.create_datagram_endpoint`:" msgstr "" -#: library/asyncio-llapi-index.rst:361 +#: library/asyncio-llapi-index.rst:370 msgid "Datagram Transports" msgstr "Transports de datagrammes" -#: library/asyncio-llapi-index.rst:366 +#: library/asyncio-llapi-index.rst:375 msgid ":meth:`transport.sendto() `" msgstr "" -#: library/asyncio-llapi-index.rst:367 +#: library/asyncio-llapi-index.rst:376 msgid "Send data to the remote peer." msgstr "" -#: library/asyncio-llapi-index.rst:369 +#: library/asyncio-llapi-index.rst:378 msgid ":meth:`transport.abort() `" msgstr "" -#: library/asyncio-llapi-index.rst:373 +#: library/asyncio-llapi-index.rst:382 msgid "" "Low-level transport abstraction over subprocesses. Returned by :meth:`loop." "subprocess_exec` and :meth:`loop.subprocess_shell`:" msgstr "" -#: library/asyncio-llapi-index.rst:377 +#: library/asyncio-llapi-index.rst:386 msgid "Subprocess Transports" msgstr "Transports vers des sous-processus" -#: library/asyncio-llapi-index.rst:382 +#: library/asyncio-llapi-index.rst:391 msgid ":meth:`transport.get_pid() `" msgstr "" -#: library/asyncio-llapi-index.rst:383 +#: library/asyncio-llapi-index.rst:392 msgid "Return the subprocess process id." msgstr "" -#: library/asyncio-llapi-index.rst:385 +#: library/asyncio-llapi-index.rst:394 msgid "" ":meth:`transport.get_pipe_transport() `" msgstr "" -#: library/asyncio-llapi-index.rst:387 +#: library/asyncio-llapi-index.rst:396 msgid "" "Return the transport for the requested communication pipe (*stdin*, " "*stdout*, or *stderr*)." msgstr "" -#: library/asyncio-llapi-index.rst:390 +#: library/asyncio-llapi-index.rst:399 msgid ":meth:`transport.get_returncode() `" msgstr "" -#: library/asyncio-llapi-index.rst:391 +#: library/asyncio-llapi-index.rst:400 msgid "Return the subprocess return code." msgstr "" -#: library/asyncio-llapi-index.rst:393 +#: library/asyncio-llapi-index.rst:402 msgid ":meth:`transport.kill() `" msgstr "" -#: library/asyncio-llapi-index.rst:394 +#: library/asyncio-llapi-index.rst:403 msgid "Kill the subprocess." msgstr "Tue le sous-processus." -#: library/asyncio-llapi-index.rst:396 +#: library/asyncio-llapi-index.rst:405 msgid ":meth:`transport.send_signal() `" msgstr "" -#: library/asyncio-llapi-index.rst:397 +#: library/asyncio-llapi-index.rst:406 msgid "Send a signal to the subprocess." msgstr "" -#: library/asyncio-llapi-index.rst:399 +#: library/asyncio-llapi-index.rst:408 msgid ":meth:`transport.terminate() `" msgstr "" -#: library/asyncio-llapi-index.rst:400 +#: library/asyncio-llapi-index.rst:409 msgid "Stop the subprocess." msgstr "Termine le sous-processus." -#: library/asyncio-llapi-index.rst:402 +#: library/asyncio-llapi-index.rst:411 msgid ":meth:`transport.close() `" msgstr "" -#: library/asyncio-llapi-index.rst:403 +#: library/asyncio-llapi-index.rst:412 msgid "Kill the subprocess and close all pipes." msgstr "" -#: library/asyncio-llapi-index.rst:407 +#: library/asyncio-llapi-index.rst:416 msgid "Protocols" msgstr "" -#: library/asyncio-llapi-index.rst:409 +#: library/asyncio-llapi-index.rst:418 msgid "Protocol classes can implement the following **callback methods**:" msgstr "" -#: library/asyncio-llapi-index.rst:415 +#: library/asyncio-llapi-index.rst:424 msgid "``callback`` :meth:`connection_made() `" msgstr "" -#: library/asyncio-llapi-index.rst:416 +#: library/asyncio-llapi-index.rst:425 msgid "Called when a connection is made." msgstr "Appelé lorsqu'une connexion est établie." -#: library/asyncio-llapi-index.rst:418 +#: library/asyncio-llapi-index.rst:427 msgid "``callback`` :meth:`connection_lost() `" msgstr "" -#: library/asyncio-llapi-index.rst:419 +#: library/asyncio-llapi-index.rst:428 msgid "Called when the connection is lost or closed." msgstr "Appelé lorsqu'une connexion est perdue ou fermée." -#: library/asyncio-llapi-index.rst:421 +#: library/asyncio-llapi-index.rst:430 msgid "``callback`` :meth:`pause_writing() `" msgstr "" -#: library/asyncio-llapi-index.rst:422 +#: library/asyncio-llapi-index.rst:431 msgid "Called when the transport's buffer goes over the high water mark." msgstr "" -#: library/asyncio-llapi-index.rst:424 +#: library/asyncio-llapi-index.rst:433 msgid "``callback`` :meth:`resume_writing() `" msgstr "" -#: library/asyncio-llapi-index.rst:425 +#: library/asyncio-llapi-index.rst:434 msgid "Called when the transport's buffer drains below the low water mark." msgstr "" -#: library/asyncio-llapi-index.rst:428 +#: library/asyncio-llapi-index.rst:437 msgid "Streaming Protocols (TCP, Unix Sockets, Pipes)" msgstr "" -#: library/asyncio-llapi-index.rst:433 +#: library/asyncio-llapi-index.rst:442 msgid "``callback`` :meth:`data_received() `" msgstr "" -#: library/asyncio-llapi-index.rst:434 +#: library/asyncio-llapi-index.rst:443 msgid "Called when some data is received." msgstr "" -#: library/asyncio-llapi-index.rst:436 +#: library/asyncio-llapi-index.rst:445 msgid "``callback`` :meth:`eof_received() `" msgstr "" -#: library/asyncio-llapi-index.rst:437 library/asyncio-llapi-index.rst:452 +#: library/asyncio-llapi-index.rst:446 library/asyncio-llapi-index.rst:461 msgid "Called when an EOF is received." msgstr "" -#: library/asyncio-llapi-index.rst:440 +#: library/asyncio-llapi-index.rst:449 msgid "Buffered Streaming Protocols" msgstr "" -#: library/asyncio-llapi-index.rst:445 +#: library/asyncio-llapi-index.rst:454 msgid "``callback`` :meth:`get_buffer() `" msgstr "" -#: library/asyncio-llapi-index.rst:446 +#: library/asyncio-llapi-index.rst:455 msgid "Called to allocate a new receive buffer." msgstr "" -#: library/asyncio-llapi-index.rst:448 +#: library/asyncio-llapi-index.rst:457 msgid "``callback`` :meth:`buffer_updated() `" msgstr "" -#: library/asyncio-llapi-index.rst:449 +#: library/asyncio-llapi-index.rst:458 msgid "Called when the buffer was updated with the received data." msgstr "" -#: library/asyncio-llapi-index.rst:451 +#: library/asyncio-llapi-index.rst:460 msgid "``callback`` :meth:`eof_received() `" msgstr "" -#: library/asyncio-llapi-index.rst:455 +#: library/asyncio-llapi-index.rst:464 msgid "Datagram Protocols" msgstr "Protocoles non-connectés" -#: library/asyncio-llapi-index.rst:460 +#: library/asyncio-llapi-index.rst:469 msgid "" "``callback`` :meth:`datagram_received() `" msgstr "" -#: library/asyncio-llapi-index.rst:462 +#: library/asyncio-llapi-index.rst:471 msgid "Called when a datagram is received." msgstr "" -#: library/asyncio-llapi-index.rst:464 +#: library/asyncio-llapi-index.rst:473 msgid "``callback`` :meth:`error_received() `" msgstr "" -#: library/asyncio-llapi-index.rst:465 +#: library/asyncio-llapi-index.rst:474 msgid "" "Called when a previous send or receive operation raises an :class:`OSError`." msgstr "" -#: library/asyncio-llapi-index.rst:469 +#: library/asyncio-llapi-index.rst:478 msgid "Subprocess Protocols" msgstr "Protocoles liés aux sous-processus" -#: library/asyncio-llapi-index.rst:474 +#: library/asyncio-llapi-index.rst:483 msgid "" "``callback`` :meth:`pipe_data_received() `" msgstr "" -#: library/asyncio-llapi-index.rst:476 +#: library/asyncio-llapi-index.rst:485 #, fuzzy msgid "" "Called when the child process writes data into its *stdout* or *stderr* pipe." @@ -924,63 +948,63 @@ msgstr "" "Appelé lorsqu'un processus enfant écrit sur sa sortie d'erreur ou sa sortie " "standard." -#: library/asyncio-llapi-index.rst:479 +#: library/asyncio-llapi-index.rst:488 msgid "" "``callback`` :meth:`pipe_connection_lost() `" msgstr "" -#: library/asyncio-llapi-index.rst:481 +#: library/asyncio-llapi-index.rst:490 msgid "" "Called when one of the pipes communicating with the child process is closed." msgstr "" "Appelé lorsqu'une des *pipe*\\ s de communication avec un sous-processus est " "fermée." -#: library/asyncio-llapi-index.rst:484 +#: library/asyncio-llapi-index.rst:493 msgid "" "``callback`` :meth:`process_exited() `" msgstr "" -#: library/asyncio-llapi-index.rst:486 +#: library/asyncio-llapi-index.rst:495 msgid "Called when the child process has exited." msgstr "Appelé lorsqu'un processus enfant se termine." -#: library/asyncio-llapi-index.rst:490 +#: library/asyncio-llapi-index.rst:499 msgid "Event Loop Policies" msgstr "" -#: library/asyncio-llapi-index.rst:492 +#: library/asyncio-llapi-index.rst:501 msgid "" "Policies is a low-level mechanism to alter the behavior of functions like :" "func:`asyncio.get_event_loop`. See also the main :ref:`policies section " "` for more details." msgstr "" -#: library/asyncio-llapi-index.rst:498 +#: library/asyncio-llapi-index.rst:507 msgid "Accessing Policies" msgstr "" -#: library/asyncio-llapi-index.rst:503 +#: library/asyncio-llapi-index.rst:512 msgid ":meth:`asyncio.get_event_loop_policy`" -msgstr "" +msgstr ":meth:`asyncio.get_event_loop_policy`" -#: library/asyncio-llapi-index.rst:504 +#: library/asyncio-llapi-index.rst:513 msgid "Return the current process-wide policy." msgstr "Renvoie la stratégie actuelle à l'échelle du processus." -#: library/asyncio-llapi-index.rst:506 +#: library/asyncio-llapi-index.rst:515 msgid ":meth:`asyncio.set_event_loop_policy`" -msgstr "" +msgstr ":meth:`asyncio.set_event_loop_policy`" -#: library/asyncio-llapi-index.rst:507 +#: library/asyncio-llapi-index.rst:516 msgid "Set a new process-wide policy." msgstr "" -#: library/asyncio-llapi-index.rst:509 +#: library/asyncio-llapi-index.rst:518 msgid ":class:`AbstractEventLoopPolicy`" -msgstr "" +msgstr ":class:`AbstractEventLoopPolicy`" -#: library/asyncio-llapi-index.rst:510 +#: library/asyncio-llapi-index.rst:519 msgid "Base class for policy objects." msgstr "" diff --git a/library/asyncio-platforms.po b/library/asyncio-platforms.po index af3d408cfa..84857a42f3 100644 --- a/library/asyncio-platforms.po +++ b/library/asyncio-platforms.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -107,9 +107,9 @@ msgstr "" #: library/asyncio-platforms.rst:65 msgid "" "The resolution of the monotonic clock on Windows is usually around 15.6 " -"msec. The best resolution is 0.5 msec. The resolution depends on the " -"hardware (availability of `HPET `_) and on the Windows configuration." +"milliseconds. The best resolution is 0.5 milliseconds. The resolution " +"depends on the hardware (availability of `HPET `_) and on the Windows configuration." msgstr "" #: library/asyncio-platforms.rst:75 diff --git a/library/asyncio-queue.po b/library/asyncio-queue.po index 3f9e44725c..2e824ef12c 100644 --- a/library/asyncio-queue.po +++ b/library/asyncio-queue.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: 2018-10-13 17:37+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -61,8 +61,9 @@ msgid "" "always known and can be returned by calling the :meth:`qsize` method." msgstr "" -#: library/asyncio-queue.rst:42 -msgid "The *loop* parameter." +#: library/asyncio-queue.rst:39 +#, fuzzy +msgid "Removed the *loop* parameter." msgstr "Le paramètre *loop*." #: library/asyncio-queue.rst:43 diff --git a/library/asyncio-runner.po b/library/asyncio-runner.po new file mode 100644 index 0000000000..0d18bf9f2d --- /dev/null +++ b/library/asyncio-runner.po @@ -0,0 +1,201 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001-2022, Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.11\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-05-23 00:51+0200\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: library/asyncio-runner.rst:6 +msgid "Runners" +msgstr "" + +#: library/asyncio-runner.rst:8 +msgid "**Source code:** :source:`Lib/asyncio/runners.py`" +msgstr "" + +#: library/asyncio-runner.rst:11 +msgid "" +"This section outlines high-level asyncio primitives to run asyncio code." +msgstr "" + +#: library/asyncio-runner.rst:13 +msgid "" +"They are built on top of an :ref:`event loop ` with the " +"aim to simplify async code usage for common wide-spread scenarios." +msgstr "" + +#: library/asyncio-runner.rst:23 +msgid "Running an asyncio Program" +msgstr "" + +#: library/asyncio-runner.rst:27 +msgid "Execute the :term:`coroutine` *coro* and return the result." +msgstr "" + +#: library/asyncio-runner.rst:29 +msgid "" +"This function runs the passed coroutine, taking care of managing the asyncio " +"event loop, *finalizing asynchronous generators*, and closing the threadpool." +msgstr "" + +#: library/asyncio-runner.rst:101 +msgid "" +"This function cannot be called when another asyncio event loop is running in " +"the same thread." +msgstr "" + +#: library/asyncio-runner.rst:73 +msgid "" +"If *debug* is ``True``, the event loop will be run in debug mode. ``False`` " +"disables debug mode explicitly. ``None`` is used to respect the global :ref:" +"`asyncio-debug-mode` settings." +msgstr "" + +#: library/asyncio-runner.rst:40 +msgid "" +"This function always creates a new event loop and closes it at the end. It " +"should be used as a main entry point for asyncio programs, and should " +"ideally only be called once." +msgstr "" + +#: library/asyncio-runner.rst:44 +msgid "Example::" +msgstr "" + +#: library/asyncio-runner.rst:54 +msgid "Updated to use :meth:`loop.shutdown_default_executor`." +msgstr "" + +#: library/asyncio-runner.rst:59 +msgid "" +"*debug* is ``None`` by default to respect the global debug mode settings." +msgstr "" + +#: library/asyncio-runner.rst:63 +msgid "Runner context manager" +msgstr "" + +#: library/asyncio-runner.rst:67 +msgid "" +"A context manager that simplifies *multiple* async function calls in the " +"same context." +msgstr "" + +#: library/asyncio-runner.rst:70 +msgid "" +"Sometimes several top-level async functions should be called in the same :" +"ref:`event loop ` and :class:`contextvars.Context`." +msgstr "" + +#: library/asyncio-runner.rst:77 +msgid "" +"*loop_factory* could be used for overriding the loop creation. :func:" +"`asyncio.new_event_loop` is used if ``None``." +msgstr "" + +#: library/asyncio-runner.rst:80 +msgid "" +"Basically, :func:`asyncio.run()` example can be rewritten with the runner " +"usage::" +msgstr "" + +#: library/asyncio-runner.rst:93 +msgid "Run a :term:`coroutine ` *coro* in the embedded loop." +msgstr "" + +#: library/asyncio-runner.rst:95 +msgid "Return the coroutine's result or raise its exception." +msgstr "" + +#: library/asyncio-runner.rst:97 +msgid "" +"An optional keyword-only *context* argument allows specifying a custom :" +"class:`contextvars.Context` for the *coro* to run in. The runner's default " +"context is used if ``None``." +msgstr "" + +#: library/asyncio-runner.rst:106 +msgid "Close the runner." +msgstr "" + +#: library/asyncio-runner.rst:108 +msgid "" +"Finalize asynchronous generators, shutdown default executor, close the event " +"loop and release embedded :class:`contextvars.Context`." +msgstr "" + +#: library/asyncio-runner.rst:113 +msgid "Return the event loop associated with the runner instance." +msgstr "" + +#: library/asyncio-runner.rst:117 +msgid "" +":class:`Runner` uses the lazy initialization strategy, its constructor " +"doesn't initialize underlying low-level structures." +msgstr "" + +#: library/asyncio-runner.rst:120 +msgid "" +"Embedded *loop* and *context* are created at the :keyword:`with` body " +"entering or the first call of :meth:`run` or :meth:`get_loop`." +msgstr "" + +#: library/asyncio-runner.rst:125 +msgid "Handling Keyboard Interruption" +msgstr "" + +#: library/asyncio-runner.rst:129 +msgid "" +"When :const:`signal.SIGINT` is raised by :kbd:`Ctrl-C`, :exc:" +"`KeyboardInterrupt` exception is raised in the main thread by default. " +"However this doesn't work with :mod:`asyncio` because it can interrupt " +"asyncio internals and can hang the program from exiting." +msgstr "" + +#: library/asyncio-runner.rst:134 +msgid "" +"To mitigate this issue, :mod:`asyncio` handles :const:`signal.SIGINT` as " +"follows:" +msgstr "" + +#: library/asyncio-runner.rst:136 +msgid "" +":meth:`asyncio.Runner.run` installs a custom :const:`signal.SIGINT` handler " +"before any user code is executed and removes it when exiting from the " +"function." +msgstr "" + +#: library/asyncio-runner.rst:138 +msgid "" +"The :class:`~asyncio.Runner` creates the main task for the passed coroutine " +"for its execution." +msgstr "" + +#: library/asyncio-runner.rst:140 +msgid "" +"When :const:`signal.SIGINT` is raised by :kbd:`Ctrl-C`, the custom signal " +"handler cancels the main task by calling :meth:`asyncio.Task.cancel` which " +"raises :exc:`asyncio.CancelledError` inside the main task. This causes the " +"Python stack to unwind, ``try/except`` and ``try/finally`` blocks can be " +"used for resource cleanup. After the main task is cancelled, :meth:`asyncio." +"Runner.run` raises :exc:`KeyboardInterrupt`." +msgstr "" + +#: library/asyncio-runner.rst:146 +msgid "" +"A user could write a tight loop which cannot be interrupted by :meth:" +"`asyncio.Task.cancel`, in which case the second following :kbd:`Ctrl-C` " +"immediately raises the :exc:`KeyboardInterrupt` without cancelling the main " +"task." +msgstr "" diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index d5337ffed1..837f4d3dc4 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2019-09-06 13:48+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -48,45 +48,47 @@ msgid "" "with streams:" msgstr "" -#: library/asyncio-stream.rst:56 +#: library/asyncio-stream.rst:57 msgid "" "Establish a network connection and return a pair of ``(reader, writer)`` " "objects." msgstr "" -#: library/asyncio-stream.rst:59 +#: library/asyncio-stream.rst:60 msgid "" "The returned *reader* and *writer* objects are instances of :class:" "`StreamReader` and :class:`StreamWriter` classes." msgstr "" -#: library/asyncio-stream.rst:62 -msgid "" -"The *loop* argument is optional and can always be determined automatically " -"when this function is awaited from a coroutine." -msgstr "" - -#: library/asyncio-stream.rst:98 +#: library/asyncio-stream.rst:99 msgid "" "*limit* determines the buffer size limit used by the returned :class:" "`StreamReader` instance. By default the *limit* is set to 64 KiB." msgstr "" -#: library/asyncio-stream.rst:69 +#: library/asyncio-stream.rst:67 msgid "" "The rest of the arguments are passed directly to :meth:`loop." "create_connection`." msgstr "" -#: library/asyncio-stream.rst:127 -msgid "The *ssl_handshake_timeout* parameter." +#: library/asyncio-stream.rst:70 +msgid "Added the *ssl_handshake_timeout* parameter." +msgstr "" + +#: library/asyncio-stream.rst:73 +msgid "Added *happy_eyeballs_delay* and *interleave* parameters." +msgstr "" + +#: library/asyncio-stream.rst:109 library/asyncio-stream.rst:152 +msgid "Removed the *loop* parameter." msgstr "" -#: library/asyncio-stream.rst:84 +#: library/asyncio-stream.rst:88 msgid "Start a socket server." msgstr "" -#: library/asyncio-stream.rst:86 +#: library/asyncio-stream.rst:90 msgid "" "The *client_connected_cb* callback is called whenever a new client " "connection is established. It receives a ``(reader, writer)`` pair as two " @@ -94,67 +96,65 @@ msgid "" "classes." msgstr "" -#: library/asyncio-stream.rst:91 +#: library/asyncio-stream.rst:95 msgid "" "*client_connected_cb* can be a plain callable or a :ref:`coroutine function " "`; if it is a coroutine function, it will be automatically " "scheduled as a :class:`Task`." msgstr "" -#: library/asyncio-stream.rst:95 -msgid "" -"The *loop* argument is optional and can always be determined automatically " -"when this method is awaited from a coroutine." -msgstr "" - -#: library/asyncio-stream.rst:102 +#: library/asyncio-stream.rst:103 msgid "" "The rest of the arguments are passed directly to :meth:`loop.create_server`." msgstr "" -#: library/asyncio-stream.rst:149 -msgid "The *ssl_handshake_timeout* and *start_serving* parameters." +#: library/asyncio-stream.rst:106 +msgid "Added the *ssl_handshake_timeout* and *start_serving* parameters." msgstr "" -#: library/asyncio-stream.rst:111 +#: library/asyncio-stream.rst:114 msgid "Unix Sockets" msgstr "" -#: library/asyncio-stream.rst:116 +#: library/asyncio-stream.rst:119 msgid "" "Establish a Unix socket connection and return a pair of ``(reader, writer)``." msgstr "" -#: library/asyncio-stream.rst:119 +#: library/asyncio-stream.rst:122 msgid "Similar to :func:`open_connection` but operates on Unix sockets." msgstr "" -#: library/asyncio-stream.rst:121 +#: library/asyncio-stream.rst:124 msgid "See also the documentation of :meth:`loop.create_unix_connection`." msgstr "" -#: library/asyncio-stream.rst:146 +#: library/asyncio-stream.rst:147 msgid ":ref:`Availability `: Unix." msgstr ":ref:`Disponibilité ` : Unix." -#: library/asyncio-stream.rst:131 -msgid "The *path* parameter can now be a :term:`path-like object`" +#: library/asyncio-stream.rst:128 +msgid "" +"Added the *ssl_handshake_timeout* parameter. The *path* parameter can now be " +"a :term:`path-like object`" msgstr "" -#: library/asyncio-stream.rst:139 +#: library/asyncio-stream.rst:140 msgid "Start a Unix socket server." msgstr "" -#: library/asyncio-stream.rst:141 +#: library/asyncio-stream.rst:142 msgid "Similar to :func:`start_server` but works with Unix sockets." msgstr "" -#: library/asyncio-stream.rst:143 +#: library/asyncio-stream.rst:144 msgid "See also the documentation of :meth:`loop.create_unix_server`." msgstr "" -#: library/asyncio-stream.rst:153 -msgid "The *path* parameter can now be a :term:`path-like object`." +#: library/asyncio-stream.rst:148 +msgid "" +"Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " +"parameter can now be a :term:`path-like object`." msgstr "" #: library/asyncio-stream.rst:157 @@ -317,90 +317,115 @@ msgid "" "`drain` returns immediately." msgstr "" -#: library/asyncio-stream.rst:300 +#: library/asyncio-stream.rst:301 +msgid "Upgrade an existing stream-based connection to TLS." +msgstr "" + +#: library/asyncio-stream.rst:303 +msgid "Parameters:" +msgstr "" + +#: library/asyncio-stream.rst:305 +msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." +msgstr "" + +#: library/asyncio-stream.rst:307 +msgid "" +"*server_hostname*: sets or overrides the host name that the target server's " +"certificate will be matched against." +msgstr "" + +#: library/asyncio-stream.rst:310 +msgid "" +"*ssl_handshake_timeout* is the time in seconds to wait for the TLS handshake " +"to complete before aborting the connection. ``60.0`` seconds if ``None`` " +"(default)." +msgstr "" + +#: library/asyncio-stream.rst:318 msgid "" "Return ``True`` if the stream is closed or in the process of being closed." msgstr "" -#: library/asyncio-stream.rst:307 +#: library/asyncio-stream.rst:325 msgid "Wait until the stream is closed." msgstr "" -#: library/asyncio-stream.rst:309 +#: library/asyncio-stream.rst:327 msgid "" "Should be called after :meth:`close` to wait until the underlying connection " "is closed." msgstr "" -#: library/asyncio-stream.rst:316 +#: library/asyncio-stream.rst:334 msgid "Examples" msgstr "Exemples" -#: library/asyncio-stream.rst:321 +#: library/asyncio-stream.rst:339 msgid "TCP echo client using streams" msgstr "" -#: library/asyncio-stream.rst:323 +#: library/asyncio-stream.rst:341 msgid "TCP echo client using the :func:`asyncio.open_connection` function::" msgstr "" -#: library/asyncio-stream.rst:345 +#: library/asyncio-stream.rst:364 msgid "" "The :ref:`TCP echo client protocol " "` example uses the low-level :meth:" "`loop.create_connection` method." msgstr "" -#: library/asyncio-stream.rst:352 +#: library/asyncio-stream.rst:371 msgid "TCP echo server using streams" msgstr "" -#: library/asyncio-stream.rst:354 +#: library/asyncio-stream.rst:373 msgid "TCP echo server using the :func:`asyncio.start_server` function::" msgstr "" -#: library/asyncio-stream.rst:387 +#: library/asyncio-stream.rst:406 msgid "" "The :ref:`TCP echo server protocol " "` example uses the :meth:`loop." "create_server` method." msgstr "" -#: library/asyncio-stream.rst:392 +#: library/asyncio-stream.rst:411 msgid "Get HTTP headers" msgstr "Récupère les en-têtes HTTP" -#: library/asyncio-stream.rst:394 +#: library/asyncio-stream.rst:413 msgid "" "Simple example querying HTTP headers of the URL passed on the command line::" msgstr "" -#: library/asyncio-stream.rst:432 +#: library/asyncio-stream.rst:451 msgid "Usage::" msgstr "Utilisation ::" -#: library/asyncio-stream.rst:436 +#: library/asyncio-stream.rst:455 msgid "or with HTTPS::" msgstr "ou avec HTTPS ::" -#: library/asyncio-stream.rst:444 +#: library/asyncio-stream.rst:463 msgid "Register an open socket to wait for data using streams" msgstr "" -#: library/asyncio-stream.rst:446 +#: library/asyncio-stream.rst:465 msgid "" "Coroutine waiting until a socket receives data using the :func:" "`open_connection` function::" msgstr "" -#: library/asyncio-stream.rst:480 +#: library/asyncio-stream.rst:499 msgid "" "The :ref:`register an open socket to wait for data using a protocol " "` example uses a low-level protocol and " "the :meth:`loop.create_connection` method." msgstr "" -#: library/asyncio-stream.rst:484 +#: library/asyncio-stream.rst:503 msgid "" "The :ref:`watch a file descriptor for read events " "` example uses the low-level :meth:`loop." diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po index e5f7edabde..9b7a010c17 100644 --- a/library/asyncio-subprocess.po +++ b/library/asyncio-subprocess.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2018-10-15 00:37+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -57,41 +57,41 @@ msgstr "" msgid "Creating Subprocesses" msgstr "" -#: library/asyncio-subprocess.rst:68 +#: library/asyncio-subprocess.rst:67 msgid "Create a subprocess." msgstr "" -#: library/asyncio-subprocess.rst:70 library/asyncio-subprocess.rst:89 +#: library/asyncio-subprocess.rst:69 library/asyncio-subprocess.rst:87 msgid "" "The *limit* argument sets the buffer limit for :class:`StreamReader` " "wrappers for :attr:`Process.stdout` and :attr:`Process.stderr` (if :attr:" "`subprocess.PIPE` is passed to *stdout* and *stderr* arguments)." msgstr "" -#: library/asyncio-subprocess.rst:74 library/asyncio-subprocess.rst:93 +#: library/asyncio-subprocess.rst:73 library/asyncio-subprocess.rst:91 msgid "Return a :class:`~asyncio.subprocess.Process` instance." msgstr "" -#: library/asyncio-subprocess.rst:76 +#: library/asyncio-subprocess.rst:75 msgid "" "See the documentation of :meth:`loop.subprocess_exec` for other parameters." msgstr "" -#: library/asyncio-subprocess.rst:81 library/asyncio-subprocess.rst:109 +#: library/asyncio-subprocess.rst:78 library/asyncio-subprocess.rst:105 #, fuzzy -msgid "The *loop* parameter." +msgid "Removed the *loop* parameter." msgstr "Autres paramètres :" -#: library/asyncio-subprocess.rst:87 +#: library/asyncio-subprocess.rst:85 msgid "Run the *cmd* shell command." msgstr "Exécute la commande *cmd* dans un *shell*." -#: library/asyncio-subprocess.rst:95 +#: library/asyncio-subprocess.rst:93 msgid "" "See the documentation of :meth:`loop.subprocess_shell` for other parameters." msgstr "" -#: library/asyncio-subprocess.rst:100 +#: library/asyncio-subprocess.rst:98 msgid "" "It is the application's responsibility to ensure that all whitespace and " "special characters are quoted appropriately to avoid `shell injection " @@ -101,14 +101,14 @@ msgid "" "be used to construct shell commands." msgstr "" -#: library/asyncio-subprocess.rst:113 +#: library/asyncio-subprocess.rst:110 msgid "" "Subprocesses are available for Windows if a :class:`ProactorEventLoop` is " "used. See :ref:`Subprocess Support on Windows ` " "for details." msgstr "" -#: library/asyncio-subprocess.rst:119 +#: library/asyncio-subprocess.rst:116 msgid "" "asyncio also has the following *low-level* APIs to work with subprocesses: :" "meth:`loop.subprocess_exec`, :meth:`loop.subprocess_shell`, :meth:`loop." @@ -117,22 +117,22 @@ msgid "" "Protocols `." msgstr "" -#: library/asyncio-subprocess.rst:127 +#: library/asyncio-subprocess.rst:124 msgid "Constants" msgstr "Constantes" -#: library/asyncio-subprocess.rst:131 +#: library/asyncio-subprocess.rst:129 msgid "Can be passed to the *stdin*, *stdout* or *stderr* parameters." msgstr "" -#: library/asyncio-subprocess.rst:133 +#: library/asyncio-subprocess.rst:131 msgid "" "If *PIPE* is passed to *stdin* argument, the :attr:`Process.stdin ` attribute will point to a :class:`StreamWriter` " "instance." msgstr "" -#: library/asyncio-subprocess.rst:137 +#: library/asyncio-subprocess.rst:135 msgid "" "If *PIPE* is passed to *stdout* or *stderr* arguments, the :attr:`Process." "stdout ` and :attr:`Process.stderr " @@ -140,7 +140,7 @@ msgid "" "`StreamReader` instances." msgstr "" -#: library/asyncio-subprocess.rst:144 +#: library/asyncio-subprocess.rst:143 msgid "" "Special value that can be used as the *stderr* argument and indicates that " "standard error should be redirected into standard output." @@ -165,47 +165,47 @@ msgid "" "their completion." msgstr "" -#: library/asyncio-subprocess.rst:164 +#: library/asyncio-subprocess.rst:165 msgid "" "An object that wraps OS processes created by the :func:" "`create_subprocess_exec` and :func:`create_subprocess_shell` functions." msgstr "" -#: library/asyncio-subprocess.rst:168 +#: library/asyncio-subprocess.rst:169 msgid "" "This class is designed to have a similar API to the :class:`subprocess." "Popen` class, but there are some notable differences:" msgstr "" -#: library/asyncio-subprocess.rst:172 +#: library/asyncio-subprocess.rst:173 msgid "" "unlike Popen, Process instances do not have an equivalent to the :meth:" "`~subprocess.Popen.poll` method;" msgstr "" -#: library/asyncio-subprocess.rst:175 +#: library/asyncio-subprocess.rst:176 msgid "" "the :meth:`~asyncio.subprocess.Process.communicate` and :meth:`~asyncio." "subprocess.Process.wait` methods don't have a *timeout* parameter: use the :" "func:`wait_for` function;" msgstr "" -#: library/asyncio-subprocess.rst:179 +#: library/asyncio-subprocess.rst:180 msgid "" "the :meth:`Process.wait() ` method is " "asynchronous, whereas :meth:`subprocess.Popen.wait` method is implemented as " "a blocking busy loop;" msgstr "" -#: library/asyncio-subprocess.rst:183 +#: library/asyncio-subprocess.rst:184 msgid "the *universal_newlines* parameter is not supported." msgstr "" -#: library/asyncio-subprocess.rst:185 +#: library/asyncio-subprocess.rst:186 msgid "This class is :ref:`not thread safe `." msgstr "" -#: library/asyncio-subprocess.rst:187 +#: library/asyncio-subprocess.rst:188 msgid "" "See also the :ref:`Subprocess and Threads ` " "section." @@ -213,15 +213,15 @@ msgstr "" "Voir aussi la section :ref:`sous-processus et fils d'exécution `." -#: library/asyncio-subprocess.rst:192 +#: library/asyncio-subprocess.rst:193 msgid "Wait for the child process to terminate." msgstr "" -#: library/asyncio-subprocess.rst:194 +#: library/asyncio-subprocess.rst:195 msgid "Set and return the :attr:`returncode` attribute." msgstr "" -#: library/asyncio-subprocess.rst:198 +#: library/asyncio-subprocess.rst:199 msgid "" "This method can deadlock when using ``stdout=PIPE`` or ``stderr=PIPE`` and " "the child process generates so much output that it blocks waiting for the OS " @@ -229,33 +229,33 @@ msgid "" "using pipes to avoid this condition." msgstr "" -#: library/asyncio-subprocess.rst:206 +#: library/asyncio-subprocess.rst:207 msgid "Interact with process:" msgstr "" -#: library/asyncio-subprocess.rst:208 +#: library/asyncio-subprocess.rst:209 msgid "send data to *stdin* (if *input* is not ``None``);" msgstr "" -#: library/asyncio-subprocess.rst:209 +#: library/asyncio-subprocess.rst:210 msgid "read data from *stdout* and *stderr*, until EOF is reached;" msgstr "" -#: library/asyncio-subprocess.rst:210 +#: library/asyncio-subprocess.rst:211 msgid "wait for process to terminate." msgstr "" -#: library/asyncio-subprocess.rst:212 +#: library/asyncio-subprocess.rst:213 msgid "" "The optional *input* argument is the data (:class:`bytes` object) that will " "be sent to the child process." msgstr "" -#: library/asyncio-subprocess.rst:215 +#: library/asyncio-subprocess.rst:216 msgid "Return a tuple ``(stdout_data, stderr_data)``." msgstr "" -#: library/asyncio-subprocess.rst:217 +#: library/asyncio-subprocess.rst:218 msgid "" "If either :exc:`BrokenPipeError` or :exc:`ConnectionResetError` exception is " "raised when writing *input* into *stdin*, the exception is ignored. This " @@ -263,7 +263,7 @@ msgid "" "*stdin*." msgstr "" -#: library/asyncio-subprocess.rst:222 +#: library/asyncio-subprocess.rst:223 msgid "" "If it is desired to send data to the process' *stdin*, the process needs to " "be created with ``stdin=PIPE``. Similarly, to get anything other than " @@ -271,7 +271,7 @@ msgid "" "``stdout=PIPE`` and/or ``stderr=PIPE`` arguments." msgstr "" -#: library/asyncio-subprocess.rst:228 +#: library/asyncio-subprocess.rst:229 msgid "" "Note, that the data read is buffered in memory, so do not use this method if " "the data size is large or unlimited." @@ -279,11 +279,11 @@ msgstr "" "Notez que les données lues sont mises en cache en mémoire, donc n'utilisez " "pas cette méthode si la taille des données est importante voire illimitée." -#: library/asyncio-subprocess.rst:233 +#: library/asyncio-subprocess.rst:234 msgid "Sends the signal *signal* to the child process." msgstr "Envoie le signal *signal* au sous-processus." -#: library/asyncio-subprocess.rst:237 +#: library/asyncio-subprocess.rst:238 #, fuzzy msgid "" "On Windows, :py:data:`SIGTERM` is an alias for :meth:`terminate`. " @@ -294,11 +294,11 @@ msgstr "" "et *CTRL_BREAK_EVENT* peuvent être envoyés aux processus démarrés avec un " "paramètre *creationflags* incluant `CREATE_NEW_PROCESS_GROUP`." -#: library/asyncio-subprocess.rst:244 +#: library/asyncio-subprocess.rst:245 msgid "Stop the child process." msgstr "Arrête le sous-processus." -#: library/asyncio-subprocess.rst:246 +#: library/asyncio-subprocess.rst:247 msgid "" "On POSIX systems this method sends :py:data:`signal.SIGTERM` to the child " "process." @@ -306,18 +306,18 @@ msgstr "" "Sur les systèmes POSIX, cette méthode envoie un :py:data:`signal.SIGTERM` au " "sous-processus." -#: library/asyncio-subprocess.rst:249 +#: library/asyncio-subprocess.rst:250 msgid "" "On Windows the Win32 API function :c:func:`TerminateProcess` is called to " "stop the child process." msgstr "" -#: library/asyncio-subprocess.rst:254 +#: library/asyncio-subprocess.rst:255 #, fuzzy msgid "Kill the child process." msgstr "Arrête le sous-processus." -#: library/asyncio-subprocess.rst:256 +#: library/asyncio-subprocess.rst:257 #, fuzzy msgid "" "On POSIX systems this method sends :py:data:`SIGKILL` to the child process." @@ -325,55 +325,55 @@ msgstr "" "Sur les systèmes POSIX, cette méthode envoie un :py:data:`signal.SIGTERM` au " "sous-processus." -#: library/asyncio-subprocess.rst:259 +#: library/asyncio-subprocess.rst:260 msgid "On Windows this method is an alias for :meth:`terminate`." msgstr "" -#: library/asyncio-subprocess.rst:263 +#: library/asyncio-subprocess.rst:264 msgid "" "Standard input stream (:class:`StreamWriter`) or ``None`` if the process was " "created with ``stdin=None``." msgstr "" -#: library/asyncio-subprocess.rst:268 +#: library/asyncio-subprocess.rst:269 msgid "" "Standard output stream (:class:`StreamReader`) or ``None`` if the process " "was created with ``stdout=None``." msgstr "" -#: library/asyncio-subprocess.rst:273 +#: library/asyncio-subprocess.rst:274 msgid "" "Standard error stream (:class:`StreamReader`) or ``None`` if the process was " "created with ``stderr=None``." msgstr "" -#: library/asyncio-subprocess.rst:278 +#: library/asyncio-subprocess.rst:279 msgid "" "Use the :meth:`communicate` method rather than :attr:`process.stdin.write() " "`, :attr:`await process.stdout.read() ` or :attr:`await " -"process.stderr.read `. This avoids deadlocks due to streams pausing " -"reading or writing and blocking the child process." +"process.stderr.read() `. This avoids deadlocks due to streams " +"pausing reading or writing and blocking the child process." msgstr "" -#: library/asyncio-subprocess.rst:287 +#: library/asyncio-subprocess.rst:288 msgid "Process identification number (PID)." msgstr "" -#: library/asyncio-subprocess.rst:289 +#: library/asyncio-subprocess.rst:290 msgid "" "Note that for processes created by the :func:`create_subprocess_shell` " "function, this attribute is the PID of the spawned shell." msgstr "" -#: library/asyncio-subprocess.rst:294 +#: library/asyncio-subprocess.rst:295 msgid "Return code of the process when it exits." msgstr "" -#: library/asyncio-subprocess.rst:296 +#: library/asyncio-subprocess.rst:297 msgid "A ``None`` value indicates that the process has not terminated yet." msgstr "" -#: library/asyncio-subprocess.rst:298 +#: library/asyncio-subprocess.rst:299 msgid "" "A negative value ``-N`` indicates that the child was terminated by signal " "``N`` (POSIX only)." @@ -381,69 +381,69 @@ msgstr "" "Une valeur négative ``-N`` indique que le sous-processus a été terminé par " "un signal ``N`` (seulement sur les systèmes *POSIX*)." -#: library/asyncio-subprocess.rst:305 +#: library/asyncio-subprocess.rst:306 msgid "Subprocess and Threads" msgstr "Sous-processus et fils d'exécution" -#: library/asyncio-subprocess.rst:307 +#: library/asyncio-subprocess.rst:308 msgid "" "Standard asyncio event loop supports running subprocesses from different " "threads by default." msgstr "" -#: library/asyncio-subprocess.rst:310 +#: library/asyncio-subprocess.rst:311 msgid "" "On Windows subprocesses are provided by :class:`ProactorEventLoop` only " "(default), :class:`SelectorEventLoop` has no subprocess support." msgstr "" -#: library/asyncio-subprocess.rst:313 +#: library/asyncio-subprocess.rst:314 msgid "" "On UNIX *child watchers* are used for subprocess finish waiting, see :ref:" "`asyncio-watchers` for more info." msgstr "" -#: library/asyncio-subprocess.rst:319 +#: library/asyncio-subprocess.rst:320 msgid "" "UNIX switched to use :class:`ThreadedChildWatcher` for spawning subprocesses " "from different threads without any limitation." msgstr "" -#: library/asyncio-subprocess.rst:322 +#: library/asyncio-subprocess.rst:323 msgid "" "Spawning a subprocess with *inactive* current child watcher raises :exc:" "`RuntimeError`." msgstr "" -#: library/asyncio-subprocess.rst:325 +#: library/asyncio-subprocess.rst:326 msgid "" "Note that alternative event loop implementations might have own limitations; " "please refer to their documentation." msgstr "" -#: library/asyncio-subprocess.rst:330 +#: library/asyncio-subprocess.rst:331 msgid "" "The :ref:`Concurrency and multithreading in asyncio ` section." msgstr "" -#: library/asyncio-subprocess.rst:335 +#: library/asyncio-subprocess.rst:336 msgid "Examples" msgstr "Exemples" -#: library/asyncio-subprocess.rst:337 +#: library/asyncio-subprocess.rst:338 msgid "" "An example using the :class:`~asyncio.subprocess.Process` class to control a " "subprocess and the :class:`StreamReader` class to read from its standard " "output." msgstr "" -#: library/asyncio-subprocess.rst:343 +#: library/asyncio-subprocess.rst:344 msgid "" "The subprocess is created by the :func:`create_subprocess_exec` function::" msgstr "" -#: library/asyncio-subprocess.rst:370 +#: library/asyncio-subprocess.rst:371 msgid "" "See also the :ref:`same example ` written " "using low-level APIs." diff --git a/library/asyncio-sync.po b/library/asyncio-sync.po index 74698634b8..4b87dc8a66 100644 --- a/library/asyncio-sync.po +++ b/library/asyncio-sync.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2018-10-15 00:46+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -66,86 +66,92 @@ msgstr ":class:`Semaphore`" msgid ":class:`BoundedSemaphore`" msgstr ":class:`BoundedSemaphore`" -#: library/asyncio-sync.rst:37 +#: library/asyncio-sync.rst:31 +#, fuzzy +msgid ":class:`Barrier`" +msgstr ":class:`Semaphore`" + +#: library/asyncio-sync.rst:38 msgid "Lock" msgstr "" -#: library/asyncio-sync.rst:41 +#: library/asyncio-sync.rst:42 msgid "Implements a mutex lock for asyncio tasks. Not thread-safe." msgstr "" -#: library/asyncio-sync.rst:43 +#: library/asyncio-sync.rst:44 msgid "" "An asyncio lock can be used to guarantee exclusive access to a shared " "resource." msgstr "" -#: library/asyncio-sync.rst:46 +#: library/asyncio-sync.rst:47 msgid "The preferred way to use a Lock is an :keyword:`async with` statement::" msgstr "" -#: library/asyncio-sync.rst:200 library/asyncio-sync.rst:300 +#: library/asyncio-sync.rst:199 library/asyncio-sync.rst:298 msgid "which is equivalent to::" msgstr "" -#: library/asyncio-sync.rst:114 library/asyncio-sync.rst:290 -#: library/asyncio-sync.rst:345 -msgid "The *loop* parameter." +#: library/asyncio-sync.rst:112 library/asyncio-sync.rst:286 +#: library/asyncio-sync.rst:341 +#, fuzzy +msgid "Removed the *loop* parameter." msgstr "Le paramètre *loop*." -#: library/asyncio-sync.rst:71 +#: library/asyncio-sync.rst:72 msgid "Acquire the lock." msgstr "" -#: library/asyncio-sync.rst:73 +#: library/asyncio-sync.rst:74 msgid "" "This method waits until the lock is *unlocked*, sets it to *locked* and " "returns ``True``." msgstr "" -#: library/asyncio-sync.rst:76 +#: library/asyncio-sync.rst:77 msgid "" "When more than one coroutine is blocked in :meth:`acquire` waiting for the " "lock to be unlocked, only one coroutine eventually proceeds." msgstr "" -#: library/asyncio-sync.rst:80 +#: library/asyncio-sync.rst:81 msgid "" "Acquiring a lock is *fair*: the coroutine that proceeds will be the first " "coroutine that started waiting on the lock." msgstr "" -#: library/asyncio-sync.rst:85 +#: library/asyncio-sync.rst:86 msgid "Release the lock." msgstr "Libère un verrou." -#: library/asyncio-sync.rst:87 +#: library/asyncio-sync.rst:88 msgid "When the lock is *locked*, reset it to *unlocked* and return." msgstr "" -#: library/asyncio-sync.rst:89 +#: library/asyncio-sync.rst:90 msgid "If the lock is *unlocked*, a :exc:`RuntimeError` is raised." msgstr "" -#: library/asyncio-sync.rst:93 +#: library/asyncio-sync.rst:94 msgid "Return ``True`` if the lock is *locked*." msgstr "Donne ``True`` si le verrou est verrouillé." -#: library/asyncio-sync.rst:97 +#: library/asyncio-sync.rst:98 msgid "Event" msgstr "" -#: library/asyncio-sync.rst:101 +#: library/asyncio-sync.rst:102 msgid "An event object. Not thread-safe." msgstr "" -#: library/asyncio-sync.rst:103 +#: library/asyncio-sync.rst:104 msgid "" "An asyncio event can be used to notify multiple asyncio tasks that some " "event has happened." msgstr "" -#: library/asyncio-sync.rst:106 +#: library/asyncio-sync.rst:107 msgid "" "An Event object manages an internal flag that can be set to *true* with the :" "meth:`~Event.set` method and reset to *false* with the :meth:`clear` " @@ -153,7 +159,7 @@ msgid "" "*true*. The flag is set to *false* initially." msgstr "" -#: library/asyncio-sync.rst:117 +#: library/asyncio-sync.rst:365 msgid "Example::" msgstr "Exemple ::" @@ -218,90 +224,90 @@ msgid "" "the latter case a new Lock object is created automatically." msgstr "" -#: library/asyncio-sync.rst:191 +#: library/asyncio-sync.rst:190 msgid "" "The preferred way to use a Condition is an :keyword:`async with` statement::" msgstr "" -#: library/asyncio-sync.rst:213 +#: library/asyncio-sync.rst:212 msgid "Acquire the underlying lock." msgstr "" -#: library/asyncio-sync.rst:215 +#: library/asyncio-sync.rst:214 msgid "" "This method waits until the underlying lock is *unlocked*, sets it to " "*locked* and returns ``True``." msgstr "" -#: library/asyncio-sync.rst:220 +#: library/asyncio-sync.rst:219 msgid "" "Wake up at most *n* tasks (1 by default) waiting on this condition. The " "method is no-op if no tasks are waiting." msgstr "" -#: library/asyncio-sync.rst:238 +#: library/asyncio-sync.rst:237 msgid "" "The lock must be acquired before this method is called and released shortly " "after. If called with an *unlocked* lock a :exc:`RuntimeError` error is " "raised." msgstr "" -#: library/asyncio-sync.rst:229 +#: library/asyncio-sync.rst:228 msgid "Return ``True`` if the underlying lock is acquired." msgstr "" -#: library/asyncio-sync.rst:233 +#: library/asyncio-sync.rst:232 msgid "Wake up all tasks waiting on this condition." msgstr "" -#: library/asyncio-sync.rst:235 +#: library/asyncio-sync.rst:234 msgid "This method acts like :meth:`notify`, but wakes up all waiting tasks." msgstr "" -#: library/asyncio-sync.rst:244 +#: library/asyncio-sync.rst:243 msgid "Release the underlying lock." msgstr "Libère le verrou sous-jacent." -#: library/asyncio-sync.rst:246 +#: library/asyncio-sync.rst:245 msgid "When invoked on an unlocked lock, a :exc:`RuntimeError` is raised." msgstr "" -#: library/asyncio-sync.rst:251 +#: library/asyncio-sync.rst:250 msgid "Wait until notified." msgstr "Attends d'être notifié." -#: library/asyncio-sync.rst:253 +#: library/asyncio-sync.rst:252 msgid "" "If the calling task has not acquired the lock when this method is called, a :" "exc:`RuntimeError` is raised." msgstr "" -#: library/asyncio-sync.rst:256 +#: library/asyncio-sync.rst:255 msgid "" "This method releases the underlying lock, and then blocks until it is " "awakened by a :meth:`notify` or :meth:`notify_all` call. Once awakened, the " "Condition re-acquires its lock and this method returns ``True``." msgstr "" -#: library/asyncio-sync.rst:263 +#: library/asyncio-sync.rst:262 msgid "Wait until a predicate becomes *true*." msgstr "Attends jusqu'à ce qu'un prédicat devienne vrai." -#: library/asyncio-sync.rst:265 +#: library/asyncio-sync.rst:264 msgid "" "The predicate must be a callable which result will be interpreted as a " "boolean value. The final value is the return value." msgstr "" -#: library/asyncio-sync.rst:271 +#: library/asyncio-sync.rst:270 msgid "Semaphore" msgstr "Sémaphore" -#: library/asyncio-sync.rst:275 +#: library/asyncio-sync.rst:274 msgid "A Semaphore object. Not thread-safe." msgstr "" -#: library/asyncio-sync.rst:277 +#: library/asyncio-sync.rst:276 msgid "" "A semaphore manages an internal counter which is decremented by each :meth:" "`acquire` call and incremented by each :meth:`release` call. The counter can " @@ -309,62 +315,157 @@ msgid "" "waiting until some task calls :meth:`release`." msgstr "" -#: library/asyncio-sync.rst:283 +#: library/asyncio-sync.rst:282 msgid "" "The optional *value* argument gives the initial value for the internal " "counter (``1`` by default). If the given value is less than ``0`` a :exc:" "`ValueError` is raised." msgstr "" -#: library/asyncio-sync.rst:291 +#: library/asyncio-sync.rst:289 msgid "" "The preferred way to use a Semaphore is an :keyword:`async with` statement::" msgstr "" -#: library/asyncio-sync.rst:313 +#: library/asyncio-sync.rst:311 msgid "Acquire a semaphore." msgstr "" -#: library/asyncio-sync.rst:315 +#: library/asyncio-sync.rst:313 msgid "" "If the internal counter is greater than zero, decrement it by one and return " "``True`` immediately. If it is zero, wait until a :meth:`release` is called " "and return ``True``." msgstr "" -#: library/asyncio-sync.rst:321 +#: library/asyncio-sync.rst:319 msgid "Returns ``True`` if semaphore can not be acquired immediately." msgstr "" -#: library/asyncio-sync.rst:325 +#: library/asyncio-sync.rst:323 msgid "" "Release a semaphore, incrementing the internal counter by one. Can wake up a " "task waiting to acquire the semaphore." msgstr "" -#: library/asyncio-sync.rst:328 +#: library/asyncio-sync.rst:326 msgid "" "Unlike :class:`BoundedSemaphore`, :class:`Semaphore` allows making more " "``release()`` calls than ``acquire()`` calls." msgstr "" -#: library/asyncio-sync.rst:333 +#: library/asyncio-sync.rst:331 msgid "BoundedSemaphore" msgstr "BoundedSemaphore" -#: library/asyncio-sync.rst:337 +#: library/asyncio-sync.rst:335 msgid "A bounded semaphore object. Not thread-safe." msgstr "" -#: library/asyncio-sync.rst:339 +#: library/asyncio-sync.rst:337 msgid "" "Bounded Semaphore is a version of :class:`Semaphore` that raises a :exc:" "`ValueError` in :meth:`~Semaphore.release` if it increases the internal " "counter above the initial *value*." msgstr "" +#: library/asyncio-sync.rst:346 +msgid "Barrier" +msgstr "" + +#: library/asyncio-sync.rst:350 +msgid "A barrier object. Not thread-safe." +msgstr "" + #: library/asyncio-sync.rst:352 msgid "" +"A barrier is a simple synchronization primitive that allows to block until " +"*parties* number of tasks are waiting on it. Tasks can wait on the :meth:" +"`~Barrier.wait` method and would be blocked until the specified number of " +"tasks end up waiting on :meth:`~Barrier.wait`. At that point all of the " +"waiting tasks would unblock simultaneously." +msgstr "" + +#: library/asyncio-sync.rst:358 +msgid "" +":keyword:`async with` can be used as an alternative to awaiting on :meth:" +"`~Barrier.wait`." +msgstr "" + +#: library/asyncio-sync.rst:361 +msgid "The barrier can be reused any number of times." +msgstr "" + +#: library/asyncio-sync.rst:388 +msgid "Result of this example is::" +msgstr "" + +#: library/asyncio-sync.rst:399 +msgid "" +"Pass the barrier. When all the tasks party to the barrier have called this " +"function, they are all unblocked simultaneously." +msgstr "" + +#: library/asyncio-sync.rst:402 +msgid "" +"When a waiting or blocked task in the barrier is cancelled, this task exits " +"the barrier which stays in the same state. If the state of the barrier is " +"\"filling\", the number of waiting task decreases by 1." +msgstr "" + +#: library/asyncio-sync.rst:407 +msgid "" +"The return value is an integer in the range of 0 to ``parties-1``, different " +"for each task. This can be used to select a task to do some special " +"housekeeping, e.g.::" +msgstr "" + +#: library/asyncio-sync.rst:417 +msgid "" +"This method may raise a :class:`BrokenBarrierError` exception if the barrier " +"is broken or reset while a task is waiting. It could raise a :exc:" +"`CancelledError` if a task is cancelled." +msgstr "" + +#: library/asyncio-sync.rst:423 +msgid "" +"Return the barrier to the default, empty state. Any tasks waiting on it " +"will receive the :class:`BrokenBarrierError` exception." +msgstr "" + +#: library/asyncio-sync.rst:426 +msgid "" +"If a barrier is broken it may be better to just leave it and create a new " +"one." +msgstr "" + +#: library/asyncio-sync.rst:430 +msgid "" +"Put the barrier into a broken state. This causes any active or future calls " +"to :meth:`wait` to fail with the :class:`BrokenBarrierError`. Use this for " +"example if one of the taks needs to abort, to avoid infinite waiting tasks." +msgstr "" + +#: library/asyncio-sync.rst:437 +msgid "The number of tasks required to pass the barrier." +msgstr "" + +#: library/asyncio-sync.rst:441 +msgid "The number of tasks currently waiting in the barrier while filling." +msgstr "" + +#: library/asyncio-sync.rst:445 +msgid "A boolean that is ``True`` if the barrier is in the broken state." +msgstr "" + +#: library/asyncio-sync.rst:450 +msgid "" +"This exception, a subclass of :exc:`RuntimeError`, is raised when the :class:" +"`Barrier` object is reset or broken." +msgstr "" + +#: library/asyncio-sync.rst:458 +msgid "" "Acquiring a lock using ``await lock`` or ``yield from lock`` and/or :keyword:" "`with` statement (``with await lock``, ``with (yield from lock)``) was " "removed. Use ``async with lock`` instead." diff --git a/library/asyncio-task.po b/library/asyncio-task.po index 1d50f6fcdb..eb923537fc 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2020-09-22 17:11+0200\n" "Last-Translator: Philippe GALVAN \n" "Language-Team: FRENCH \n" @@ -32,11 +32,11 @@ msgid "Coroutines" msgstr "Coroutines" #: library/asyncio-task.rst:21 +#, fuzzy msgid "" ":term:`Coroutines ` declared with the async/await syntax is the " "preferred way of writing asyncio applications. For example, the following " -"snippet of code (requires Python 3.7+) prints \"hello\", waits 1 second, and " -"then prints \"world\"::" +"snippet of code prints \"hello\", waits 1 second, and then prints \"world\"::" msgstr "" "Les :term:`coroutines ` déclarées avec la syntaxe *async/await* " "sont la manière privilégiée d’écrire des applications *asyncio*. Par " @@ -147,25 +147,17 @@ msgid "" "a *coroutine object*: an object returned by calling a *coroutine function*." msgstr "un *objet coroutine* : un objet renvoyé par une *fonction coroutine*." -#: library/asyncio-task.rst:151 -msgid "" -"asyncio also supports legacy :ref:`generator-based " -"` coroutines." -msgstr "" -"*asyncio* implémente également les coroutines :ref:`basées sur des " -"générateurs ` ; celles-ci sont obsolètes." - -#: library/asyncio-task.rst:156 +#: library/asyncio-task.rst:153 msgid "Tasks" msgstr "Tâches" -#: library/asyncio-task.rst:157 +#: library/asyncio-task.rst:154 msgid "*Tasks* are used to schedule coroutines *concurrently*." msgstr "" "Les *tâches* servent à planifier des coroutines de façon à ce qu'elles " "s'exécutent de manière concurrente." -#: library/asyncio-task.rst:159 +#: library/asyncio-task.rst:156 msgid "" "When a coroutine is wrapped into a *Task* with functions like :func:`asyncio." "create_task` the coroutine is automatically scheduled to run soon::" @@ -174,11 +166,11 @@ msgstr "" "comme :func:`asyncio.create_task`, la coroutine est automatiquement " "planifiée pour s'exécuter prochainement ::" -#: library/asyncio-task.rst:181 +#: library/asyncio-task.rst:178 msgid "Futures" msgstr "Futurs" -#: library/asyncio-task.rst:182 +#: library/asyncio-task.rst:179 msgid "" "A :class:`Future` is a special **low-level** awaitable object that " "represents an **eventual result** of an asynchronous operation." @@ -186,7 +178,7 @@ msgstr "" "Un :class:`Future` est un objet *awaitable* spécial de **bas-niveau**, qui " "représente le **résultat final** d'une opération asynchrone." -#: library/asyncio-task.rst:185 +#: library/asyncio-task.rst:182 msgid "" "When a Future object is *awaited* it means that the coroutine will wait " "until the Future is resolved in some other place." @@ -194,7 +186,7 @@ msgstr "" "Quand un objet *Future* est *attendu*, cela signifie que la coroutine " "attendra que ce futur soit résolu à un autre endroit." -#: library/asyncio-task.rst:188 +#: library/asyncio-task.rst:185 msgid "" "Future objects in asyncio are needed to allow callback-based code to be used " "with async/await." @@ -202,7 +194,7 @@ msgstr "" "Les objets *Future* d'*asyncio* sont nécessaires pour permettre l'exécution " "de code basé sur les fonctions de rappel avec la syntaxe *async* / *await*." -#: library/asyncio-task.rst:191 +#: library/asyncio-task.rst:188 msgid "" "Normally **there is no need** to create Future objects at the application " "level code." @@ -210,7 +202,7 @@ msgstr "" "Il est normalement **inutile** de créer des objets *Future* dans la couche " "applicative du code." -#: library/asyncio-task.rst:194 +#: library/asyncio-task.rst:191 msgid "" "Future objects, sometimes exposed by libraries and some asyncio APIs, can be " "awaited::" @@ -218,7 +210,7 @@ msgstr "" "Les objets *Future*, parfois exposés par des bibliothèques et quelques API " "d'*asyncio*, peuvent être attendus ::" -#: library/asyncio-task.rst:206 +#: library/asyncio-task.rst:203 msgid "" "A good example of a low-level function that returns a Future object is :meth:" "`loop.run_in_executor`." @@ -226,68 +218,11 @@ msgstr "" ":meth:`loop.run_in_executor` est l'exemple typique d'une fonction bas-niveau " "renvoyant un objet *Future*." -#: library/asyncio-task.rst:211 -msgid "Running an asyncio Program" -msgstr "Exécution d'un programme *asyncio*" - -#: library/asyncio-task.rst:215 -msgid "Execute the :term:`coroutine` *coro* and return the result." -msgstr "Exécute la :term:`coroutine` *coro* et renvoie le résultat." - -#: library/asyncio-task.rst:217 -#, fuzzy -msgid "" -"This function runs the passed coroutine, taking care of managing the asyncio " -"event loop, *finalizing asynchronous generators*, and closing the threadpool." -msgstr "" -"Cette fonction exécute la coroutine passée en argument. Elle gère la boucle " -"d'événements *asyncio* et *finalise les générateurs asynchrones*." - -#: library/asyncio-task.rst:221 -msgid "" -"This function cannot be called when another asyncio event loop is running in " -"the same thread." -msgstr "" -"Cette fonction ne peut pas être appelée si une autre boucle d'événement " -"*asyncio* s'exécute dans le même fil d'exécution." - -#: library/asyncio-task.rst:224 -msgid "If *debug* is ``True``, the event loop will be run in debug mode." -msgstr "" -"Si *debug* vaut ``True``, la boucle d'événement s'exécute en mode de " -"débogage." - -#: library/asyncio-task.rst:226 -msgid "" -"This function always creates a new event loop and closes it at the end. It " -"should be used as a main entry point for asyncio programs, and should " -"ideally only be called once." -msgstr "" -"Cette fonction crée toujours une nouvelle boucle d'événement et la clôt à la " -"fin. Elle doit être utilisée comme point d'entrée principal des programmes " -"*asyncio* et ne doit être idéalement appelée qu'une seule fois." - -#: library/asyncio-task.rst:360 library/asyncio-task.rst:613 -msgid "Example::" -msgstr "Exemple ::" - -#: library/asyncio-task.rst:240 -msgid "Updated to use :meth:`loop.shutdown_default_executor`." -msgstr "" - -#: library/asyncio-task.rst:244 -msgid "" -"The source code for ``asyncio.run()`` can be found in :source:`Lib/asyncio/" -"runners.py`." -msgstr "" -"Le code source pour ``asyncio.run()`` est disponible dans :source:`Lib/" -"asyncio/runners.py`." - -#: library/asyncio-task.rst:248 +#: library/asyncio-task.rst:208 msgid "Creating Tasks" msgstr "Création de tâches" -#: library/asyncio-task.rst:252 +#: library/asyncio-task.rst:212 msgid "" "Wrap the *coro* :ref:`coroutine ` into a :class:`Task` and " "schedule its execution. Return the Task object." @@ -295,7 +230,7 @@ msgstr "" "Encapsule la :ref:`coroutine ` *coro* dans une tâche et la " "planifie pour exécution. Renvoie l'objet :class:`Task`." -#: library/asyncio-task.rst:255 +#: library/asyncio-task.rst:215 msgid "" "If *name* is not ``None``, it is set as the name of the task using :meth:" "`Task.set_name`." @@ -303,7 +238,14 @@ msgstr "" "Si *name* n’est pas ``None``, il est défini comme le nom de la tâche en " "utilisant :meth:`Task.set_name`." -#: library/asyncio-task.rst:258 +#: library/asyncio-task.rst:218 +msgid "" +"An optional keyword-only *context* argument allows specifying a custom :" +"class:`contextvars.Context` for the *coro* to run in. The current context " +"copy is created when no *context* is provided." +msgstr "" + +#: library/asyncio-task.rst:222 msgid "" "The task is executed in the loop returned by :func:`get_running_loop`, :exc:" "`RuntimeError` is raised if there is no running loop in current thread." @@ -312,28 +254,31 @@ msgstr "" "`get_running_loop` ; :exc:`RuntimeError` est levée s'il n'y a pas de boucle " "en cours d'exécution dans le fil actuel." -#: library/asyncio-task.rst:262 +#: library/asyncio-task.rst:228 msgid "" -"This function has been **added in Python 3.7**. Prior to Python 3.7, the " -"low-level :func:`asyncio.ensure_future` function can be used instead::" +"Save a reference to the result of this function, to avoid a task " +"disappearing mid execution." msgstr "" -"Cette fonction a été **ajoutée dans Python 3.7**. Pour les versions " -"antérieures à la 3.7, la fonction de bas-niveau :func:`asyncio." -"ensure_future` peut-être utilisée ::" -#: library/asyncio-task.rst:795 -msgid "Added the ``name`` parameter." +#: library/asyncio-task.rst:736 +#, fuzzy +msgid "Added the *name* parameter." +msgstr "ajout du paramètre ``name``." + +#: library/asyncio-task.rst:236 +#, fuzzy +msgid "Added the *context* parameter." msgstr "ajout du paramètre ``name``." -#: library/asyncio-task.rst:284 +#: library/asyncio-task.rst:241 msgid "Sleeping" msgstr "Attente" -#: library/asyncio-task.rst:288 +#: library/asyncio-task.rst:245 msgid "Block for *delay* seconds." msgstr "Attend pendant *delay* secondes." -#: library/asyncio-task.rst:290 +#: library/asyncio-task.rst:247 msgid "" "If *result* is provided, it is returned to the caller when the coroutine " "completes." @@ -341,37 +286,39 @@ msgstr "" "Si *result* est spécifié, il est renvoyé à l'appelant quand la coroutine se " "termine." -#: library/asyncio-task.rst:293 +#: library/asyncio-task.rst:250 msgid "" "``sleep()`` always suspends the current task, allowing other tasks to run." msgstr "" "``sleep()`` suspend systématiquement la tâche courante, ce qui permet aux " "autres tâches de s'exécuter." -#: library/asyncio-task.rst:296 +#: library/asyncio-task.rst:253 msgid "" "Setting the delay to 0 provides an optimized path to allow other tasks to " "run. This can be used by long-running functions to avoid blocking the event " "loop for the full duration of the function call." msgstr "" -#: library/asyncio-task.rst:357 library/asyncio-task.rst:478 -#: library/asyncio-task.rst:612 library/asyncio-task.rst:800 -msgid "The *loop* parameter." -msgstr "Le paramètre *loop*." - -#: library/asyncio-task.rst:305 +#: library/asyncio-task.rst:259 msgid "" "Example of coroutine displaying the current date every second for 5 seconds::" msgstr "" "Exemple d'une coroutine affichant la date toutes les secondes pendant 5 " "secondes ::" -#: library/asyncio-task.rst:324 +#: library/asyncio-task.rst:313 library/asyncio-task.rst:412 +#: library/asyncio-task.rst:476 library/asyncio-task.rst:544 +#: library/asyncio-task.rst:553 +#, fuzzy +msgid "Removed the *loop* parameter." +msgstr "Le paramètre *loop*." + +#: library/asyncio-task.rst:282 msgid "Running Tasks Concurrently" msgstr "Exécution de tâches de manière concurrente" -#: library/asyncio-task.rst:328 +#: library/asyncio-task.rst:286 msgid "" "Run :ref:`awaitable objects ` in the *aws* sequence " "*concurrently*." @@ -379,7 +326,7 @@ msgstr "" "Exécute les objets :ref:`awaitable ` de la séquence " "*aws*, *de manière concurrente*." -#: library/asyncio-task.rst:331 +#: library/asyncio-task.rst:289 msgid "" "If any awaitable in *aws* is a coroutine, it is automatically scheduled as a " "Task." @@ -387,7 +334,7 @@ msgstr "" "Si un *attendable* de *aws* est une coroutine, celui-ci est automatiquement " "planifié comme une tâche *Task*." -#: library/asyncio-task.rst:334 +#: library/asyncio-task.rst:292 msgid "" "If all awaitables are completed successfully, the result is an aggregate " "list of returned values. The order of result values corresponds to the " @@ -397,7 +344,7 @@ msgstr "" "des valeurs renvoyées. L'ordre de cette liste correspond à l'ordre des " "*awaitables* dans *aws*." -#: library/asyncio-task.rst:338 +#: library/asyncio-task.rst:296 msgid "" "If *return_exceptions* is ``False`` (default), the first raised exception is " "immediately propagated to the task that awaits on ``gather()``. Other " @@ -409,7 +356,7 @@ msgstr "" "``gather()``. Les autres *attendables* dans la séquence *aws* **ne sont pas " "annulés** et poursuivent leur exécution." -#: library/asyncio-task.rst:343 +#: library/asyncio-task.rst:301 msgid "" "If *return_exceptions* is ``True``, exceptions are treated the same as " "successful results, and aggregated in the result list." @@ -418,7 +365,7 @@ msgstr "" "même manière que les exécutions normales, et incluses dans la liste des " "résultats." -#: library/asyncio-task.rst:346 +#: library/asyncio-task.rst:304 msgid "" "If ``gather()`` is *cancelled*, all submitted awaitables (that have not " "completed yet) are also *cancelled*." @@ -426,7 +373,7 @@ msgstr "" "Si ``gather()`` est *annulé*, tous les *awaitables* en cours (ceux qui n'ont " "pas encore fini de s'exécuter) sont également *annulés*." -#: library/asyncio-task.rst:349 +#: library/asyncio-task.rst:307 msgid "" "If any Task or Future from the *aws* sequence is *cancelled*, it is treated " "as if it raised :exc:`CancelledError` -- the ``gather()`` call is **not** " @@ -439,7 +386,11 @@ msgstr "" "l'annulation d'une tâche ou d'un futur entraîne l'annulation des autres " "tâches ou futurs." -#: library/asyncio-task.rst:398 +#: library/asyncio-task.rst:451 library/asyncio-task.rst:547 +msgid "Example::" +msgstr "Exemple ::" + +#: library/asyncio-task.rst:356 msgid "" "If *return_exceptions* is False, cancelling gather() after it has been " "marked done won't cancel any submitted awaitables. For instance, gather can " @@ -448,7 +399,7 @@ msgid "" "the awaitables) from gather won't cancel any other awaitables." msgstr "" -#: library/asyncio-task.rst:405 +#: library/asyncio-task.rst:363 msgid "" "If the *gather* itself is cancelled, the cancellation is propagated " "regardless of *return_exceptions*." @@ -456,11 +407,18 @@ msgstr "" "Si *gather* est lui-même annulé, l'annulation est propagée indépendamment de " "*return_exceptions*." -#: library/asyncio-task.rst:411 +#: library/asyncio-task.rst:370 +msgid "" +"Deprecation warning is emitted if no positional arguments are provided or " +"not all positional arguments are Future-like objects and there is no running " +"event loop." +msgstr "" + +#: library/asyncio-task.rst:377 msgid "Shielding From Cancellation" msgstr "Protection contre l'annulation" -#: library/asyncio-task.rst:415 +#: library/asyncio-task.rst:381 msgid "" "Protect an :ref:`awaitable object ` from being :meth:" "`cancelled `." @@ -468,21 +426,21 @@ msgstr "" "Empêche qu'un objet :ref:`awaitable ` puisse être :meth:" "`annulé `." -#: library/asyncio-task.rst:458 +#: library/asyncio-task.rst:428 msgid "If *aw* is a coroutine it is automatically scheduled as a Task." msgstr "" "Si *aw* est une coroutine, elle est planifiée automatiquement comme une " "tâche." -#: library/asyncio-task.rst:420 +#: library/asyncio-task.rst:386 msgid "The statement::" msgstr "L'instruction ::" -#: library/asyncio-task.rst:424 +#: library/asyncio-task.rst:390 msgid "is equivalent to::" msgstr "est équivalente à ::" -#: library/asyncio-task.rst:428 +#: library/asyncio-task.rst:394 msgid "" "*except* that if the coroutine containing it is cancelled, the Task running " "in ``something()`` is not cancelled. From the point of view of " @@ -495,7 +453,7 @@ msgstr "" "``something()``, il n'y a pas eu d'annulation. Cependant, son appelant est " "bien annulé, donc l'expression *await* lève bien une :exc:`CancelledError`." -#: library/asyncio-task.rst:434 +#: library/asyncio-task.rst:400 msgid "" "If ``something()`` is cancelled by other means (i.e. from within itself) " "that would also cancel ``shield()``." @@ -503,7 +461,7 @@ msgstr "" "Si ``something()`` est annulée d'une autre façon (c.-à-d. depuis elle-même) " "ceci annule également ``shield()``." -#: library/asyncio-task.rst:437 +#: library/asyncio-task.rst:403 msgid "" "If it is desired to completely ignore cancellation (not recommended) the " "``shield()`` function should be combined with a try/except clause, as " @@ -513,11 +471,17 @@ msgstr "" "``shield()`` peut être combinée à une clause *try* / *except*, comme dans le " "code ci-dessous ::" -#: library/asyncio-task.rst:451 +#: library/asyncio-task.rst:415 +msgid "" +"Deprecation warning is emitted if *aw* is not Future-like object and there " +"is no running event loop." +msgstr "" + +#: library/asyncio-task.rst:421 msgid "Timeouts" msgstr "Délais d'attente" -#: library/asyncio-task.rst:455 +#: library/asyncio-task.rst:425 msgid "" "Wait for the *aw* :ref:`awaitable ` to complete with a " "timeout." @@ -525,7 +489,7 @@ msgstr "" "Attend la fin de l':ref:`awaitable ` *aw* avec délai " "d'attente." -#: library/asyncio-task.rst:460 +#: library/asyncio-task.rst:430 msgid "" "*timeout* can either be ``None`` or a float or int number of seconds to wait " "for. If *timeout* is ``None``, block until the future completes." @@ -534,15 +498,15 @@ msgstr "" "décimal) d'attente. Si *timeout* vaut ``None``, la fonction s'interrompt " "jusqu'à ce que le futur s'achève." -#: library/asyncio-task.rst:464 +#: library/asyncio-task.rst:434 +#, fuzzy msgid "" -"If a timeout occurs, it cancels the task and raises :exc:`asyncio." -"TimeoutError`." +"If a timeout occurs, it cancels the task and raises :exc:`TimeoutError`." msgstr "" "Si le délai d'attente maximal est dépassé, la tâche est annulée et " "l'exception :exc:`asyncio.TimeoutError` est levée." -#: library/asyncio-task.rst:467 +#: library/asyncio-task.rst:437 msgid "" "To avoid the task :meth:`cancellation `, wrap it in :func:" "`shield`." @@ -550,7 +514,7 @@ msgstr "" "Pour empêcher :meth:`l'annulation ` de la tâche, il est " "nécessaire de l'encapsuler dans une fonction :func:`shield`." -#: library/asyncio-task.rst:470 +#: library/asyncio-task.rst:440 #, fuzzy msgid "" "The function will wait until the future is actually cancelled, so the total " @@ -560,46 +524,48 @@ msgstr "" "Cette fonction attend que le futur soit réellement annulé, donc le temps " "d'attente total peut être supérieur à *timeout*." -#: library/asyncio-task.rst:474 +#: library/asyncio-task.rst:444 msgid "If the wait is cancelled, the future *aw* is also cancelled." msgstr "Si l'attente est annulée, le futur *aw* est également annulé." -#: library/asyncio-task.rst:501 +#: library/asyncio-task.rst:471 +#, fuzzy msgid "" "When *aw* is cancelled due to a timeout, ``wait_for`` waits for *aw* to be " -"cancelled. Previously, it raised :exc:`asyncio.TimeoutError` immediately." +"cancelled. Previously, it raised :exc:`TimeoutError` immediately." msgstr "" "Si le dépassement du délai d'attente maximal provoque l'annulation de *aw*, " "``wait_for`` attend que *aw* soit annulée. Auparavant, l'exception :exc:" "`asyncio.TimeoutError` était immédiatement levée." -#: library/asyncio-task.rst:508 +#: library/asyncio-task.rst:481 msgid "Waiting Primitives" msgstr "Primitives d'attente" -#: library/asyncio-task.rst:513 +#: library/asyncio-task.rst:485 #, fuzzy msgid "" -"Run :ref:`awaitable objects ` in the *aws* iterable " -"concurrently and block until the condition specified by *return_when*." +"Run :class:`~asyncio.Future` and :class:`~asyncio.Task` instances in the " +"*aws* iterable concurrently and block until the condition specified by " +"*return_when*." msgstr "" "Exécute les objets :ref:`awaitables ` de l'ensemble " "*aws* de manière concurrente, et s'interrompt jusqu'à ce que la condition " "décrite dans *return_when* soit vraie." -#: library/asyncio-task.rst:517 +#: library/asyncio-task.rst:489 msgid "The *aws* iterable must not be empty." msgstr "" -#: library/asyncio-task.rst:519 +#: library/asyncio-task.rst:491 msgid "Returns two sets of Tasks/Futures: ``(done, pending)``." msgstr "Renvoie deux ensembles de *Tasks* / *Futures* : ``(done, pending)``." -#: library/asyncio-task.rst:521 +#: library/asyncio-task.rst:493 msgid "Usage::" msgstr "Utilisation ::" -#: library/asyncio-task.rst:525 +#: library/asyncio-task.rst:497 msgid "" "*timeout* (a float or int), if specified, can be used to control the maximum " "number of seconds to wait before returning." @@ -607,17 +573,18 @@ msgstr "" "*timeout* (entier ou décimal), si précisé, peut-être utilisé pour contrôler " "le nombre maximal de secondes d'attente avant de se terminer." -#: library/asyncio-task.rst:528 +#: library/asyncio-task.rst:500 +#, fuzzy msgid "" -"Note that this function does not raise :exc:`asyncio.TimeoutError`. Futures " -"or Tasks that aren't done when the timeout occurs are simply returned in the " -"second set." +"Note that this function does not raise :exc:`TimeoutError`. Futures or Tasks " +"that aren't done when the timeout occurs are simply returned in the second " +"set." msgstr "" "Cette fonction ne lève pas :exc:`asyncio.TimeoutError`. Les futurs et les " "tâches qui ne sont pas finis quand le délai d'attente maximal est dépassé " "sont tout simplement renvoyés dans le second ensemble." -#: library/asyncio-task.rst:532 +#: library/asyncio-task.rst:504 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" @@ -625,28 +592,28 @@ msgstr "" "*return_when* indique quand la fonction doit se terminer. Il peut prendre " "les valeurs suivantes :" -#: library/asyncio-task.rst:538 +#: library/asyncio-task.rst:510 msgid "Constant" msgstr "Constante" -#: library/asyncio-task.rst:538 +#: library/asyncio-task.rst:510 msgid "Description" msgstr "Description" -#: library/asyncio-task.rst:540 +#: library/asyncio-task.rst:512 msgid ":const:`FIRST_COMPLETED`" msgstr ":const:`FIRST_COMPLETED`" -#: library/asyncio-task.rst:540 +#: library/asyncio-task.rst:512 msgid "The function will return when any future finishes or is cancelled." msgstr "" "La fonction se termine lorsque n'importe quel futur se termine ou est annulé." -#: library/asyncio-task.rst:543 +#: library/asyncio-task.rst:515 msgid ":const:`FIRST_EXCEPTION`" msgstr ":const:`FIRST_EXCEPTION`" -#: library/asyncio-task.rst:543 +#: library/asyncio-task.rst:515 msgid "" "The function will return when any future finishes by raising an exception. " "If no future raises an exception then it is equivalent to :const:" @@ -656,16 +623,16 @@ msgstr "" "exception. Si aucun *futur* ne lève d'exception, équivaut à :const:" "`ALL_COMPLETED`." -#: library/asyncio-task.rst:549 +#: library/asyncio-task.rst:521 msgid ":const:`ALL_COMPLETED`" msgstr ":const:`ALL_COMPLETED`" -#: library/asyncio-task.rst:549 +#: library/asyncio-task.rst:521 msgid "The function will return when all futures finish or are cancelled." msgstr "" "La fonction se termine lorsque les *futurs* sont tous finis ou annulés." -#: library/asyncio-task.rst:553 +#: library/asyncio-task.rst:525 msgid "" "Unlike :func:`~asyncio.wait_for`, ``wait()`` does not cancel the futures " "when a timeout occurs." @@ -673,36 +640,12 @@ msgstr "" "À la différence de :func:`~asyncio.wait_for`, ``wait()`` n'annule pas les " "futurs quand le délai d'attente est dépassé." -#: library/asyncio-task.rst:558 -msgid "" -"If any awaitable in *aws* is a coroutine, it is automatically scheduled as a " -"Task. Passing coroutines objects to ``wait()`` directly is deprecated as it " -"leads to :ref:`confusing behavior `." -msgstr "" -"Si un *awaitable* de *aws* est une coroutine, celle-ci est automatiquement " -"planifiée comme une tâche. Passer directement des objets coroutines à " -"``wait()`` est obsolète, car ceci conduisait :ref:`à un comportement portant " -"à confusion `." - -#: library/asyncio-task.rst:570 -msgid "" -"``wait()`` schedules coroutines as Tasks automatically and later returns " -"those implicitly created Task objects in ``(done, pending)`` sets. " -"Therefore the following code won't work as expected::" -msgstr "" -"``wait()`` planifie automatiquement les coroutines comme des tâches et " -"renvoie les objets *Task* ainsi créés dans les ensembles ``(done, " -"pending)``. Le code suivant ne fonctionne donc pas comme voulu ::" - -#: library/asyncio-task.rst:583 -msgid "Here is how the above snippet can be fixed::" -msgstr "Voici comment corriger le morceau de code ci-dessus ::" - -#: library/asyncio-task.rst:596 -msgid "Passing coroutine objects to ``wait()`` directly is deprecated." +#: library/asyncio-task.rst:531 +#, fuzzy +msgid "Passing coroutine objects to ``wait()`` directly is forbidden." msgstr "Passer directement des objets coroutines à ``wait()`` est obsolète." -#: library/asyncio-task.rst:602 +#: library/asyncio-task.rst:536 #, fuzzy msgid "" "Run :ref:`awaitable objects ` in the *aws* iterable " @@ -715,23 +658,29 @@ msgstr "" "`Future`. Chaque objet *futur* renvoyé représente le résultat le plus récent " "de l'ensemble des *awaitables* restants." -#: library/asyncio-task.rst:607 +#: library/asyncio-task.rst:541 +#, fuzzy msgid "" -"Raises :exc:`asyncio.TimeoutError` if the timeout occurs before all Futures " -"are done." +"Raises :exc:`TimeoutError` if the timeout occurs before all Futures are done." msgstr "" "Lève une exception :exc:`asyncio.TimeoutError` si le délai d'attente est " "dépassé avant que tous les futurs ne soient achevés." -#: library/asyncio-task.rst:621 +#: library/asyncio-task.rst:556 +msgid "" +"Deprecation warning is emitted if not all awaitable objects in the *aws* " +"iterable are Future-like objects and there is no running event loop." +msgstr "" + +#: library/asyncio-task.rst:562 msgid "Running in Threads" msgstr "" -#: library/asyncio-task.rst:625 +#: library/asyncio-task.rst:566 msgid "Asynchronously run function *func* in a separate thread." msgstr "" -#: library/asyncio-task.rst:627 +#: library/asyncio-task.rst:568 msgid "" "Any \\*args and \\*\\*kwargs supplied for this function are directly passed " "to *func*. Also, the current :class:`contextvars.Context` is propagated, " @@ -739,19 +688,19 @@ msgid "" "separate thread." msgstr "" -#: library/asyncio-task.rst:632 +#: library/asyncio-task.rst:573 msgid "" "Return a coroutine that can be awaited to get the eventual result of *func*." msgstr "" -#: library/asyncio-task.rst:634 +#: library/asyncio-task.rst:575 msgid "" "This coroutine function is primarily intended to be used for executing IO-" "bound functions/methods that would otherwise block the event loop if they " -"were ran in the main thread. For example::" +"were run in the main thread. For example::" msgstr "" -#: library/asyncio-task.rst:664 +#: library/asyncio-task.rst:605 msgid "" "Directly calling `blocking_io()` in any coroutine would block the event loop " "for its duration, resulting in an additional 1 second of run time. Instead, " @@ -759,7 +708,7 @@ msgid "" "blocking the event loop." msgstr "" -#: library/asyncio-task.rst:671 +#: library/asyncio-task.rst:612 msgid "" "Due to the :term:`GIL`, `asyncio.to_thread()` can typically only be used to " "make IO-bound functions non-blocking. However, for extension modules that " @@ -767,18 +716,18 @@ msgid "" "`asyncio.to_thread()` can also be used for CPU-bound functions." msgstr "" -#: library/asyncio-task.rst:680 +#: library/asyncio-task.rst:621 msgid "Scheduling From Other Threads" msgstr "Planification depuis d'autres fils d'exécution" -#: library/asyncio-task.rst:684 +#: library/asyncio-task.rst:625 msgid "Submit a coroutine to the given event loop. Thread-safe." msgstr "" "Enregistre une coroutine dans la boucle d'exécution actuelle. Cette " "opération est compatible avec les programmes à multiples fils d'exécution " "(*thread-safe*)." -#: library/asyncio-task.rst:686 +#: library/asyncio-task.rst:627 msgid "" "Return a :class:`concurrent.futures.Future` to wait for the result from " "another OS thread." @@ -786,7 +735,7 @@ msgstr "" "Renvoie un :class:`concurrent.futures.Future` pour attendre le résultat d'un " "autre fil d'exécution du système d'exploitation." -#: library/asyncio-task.rst:689 +#: library/asyncio-task.rst:630 msgid "" "This function is meant to be called from a different OS thread than the one " "where the event loop is running. Example::" @@ -794,7 +743,7 @@ msgstr "" "Cette fonction est faite pour être appelée par un fil d'exécution distinct " "de celui dans laquelle la boucle d'événement s'exécute. Exemple ::" -#: library/asyncio-task.rst:701 +#: library/asyncio-task.rst:642 msgid "" "If an exception is raised in the coroutine, the returned Future will be " "notified. It can also be used to cancel the task in the event loop::" @@ -803,7 +752,7 @@ msgstr "" "averti. Elle peut également être utilisée pour annuler la tâche de la boucle " "d'événement ::" -#: library/asyncio-task.rst:715 +#: library/asyncio-task.rst:656 msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." @@ -811,7 +760,7 @@ msgstr "" "Voir la section :ref:`exécution concurrente et multi-fils d'exécution " "` de la documentation." -#: library/asyncio-task.rst:718 +#: library/asyncio-task.rst:659 msgid "" "Unlike other asyncio functions this function requires the *loop* argument to " "be passed explicitly." @@ -819,11 +768,11 @@ msgstr "" "À la différence des autres fonctions d'*asyncio*, cette fonction requiert " "que *loop* soit passé de manière explicite." -#: library/asyncio-task.rst:725 +#: library/asyncio-task.rst:666 msgid "Introspection" msgstr "Introspection" -#: library/asyncio-task.rst:730 +#: library/asyncio-task.rst:671 msgid "" "Return the currently running :class:`Task` instance, or ``None`` if no task " "is running." @@ -831,7 +780,7 @@ msgstr "" "Renvoie l'instance de la :class:`Task` en cours d'exécution, ou ``None`` " "s'il n'y a pas de tâche en cours." -#: library/asyncio-task.rst:733 +#: library/asyncio-task.rst:674 msgid "" "If *loop* is ``None`` :func:`get_running_loop` is used to get the current " "loop." @@ -839,13 +788,13 @@ msgstr "" "Si *loop* vaut ``None``, :func:`get_running_loop` est appelée pour récupérer " "la boucle en cours d'exécution." -#: library/asyncio-task.rst:741 +#: library/asyncio-task.rst:682 msgid "Return a set of not yet finished :class:`Task` objects run by the loop." msgstr "" "Renvoie l'ensemble des :class:`Task` non terminés en cours d'exécution dans " "la boucle." -#: library/asyncio-task.rst:744 +#: library/asyncio-task.rst:685 msgid "" "If *loop* is ``None``, :func:`get_running_loop` is used for getting current " "loop." @@ -853,11 +802,11 @@ msgstr "" "Si *loop* vaut ``None``, :func:`get_running_loop` est appelée pour récupérer " "la boucle en cours d'exécution." -#: library/asyncio-task.rst:751 +#: library/asyncio-task.rst:692 msgid "Task Object" msgstr "Objets *Task*" -#: library/asyncio-task.rst:755 +#: library/asyncio-task.rst:696 msgid "" "A :class:`Future-like ` object that runs a Python :ref:`coroutine " "`. Not thread-safe." @@ -866,7 +815,7 @@ msgstr "" "`coroutine ` Python. Cet objet n'est pas utilisable dans des " "programmes à fils d'exécution multiples." -#: library/asyncio-task.rst:758 +#: library/asyncio-task.rst:699 msgid "" "Tasks are used to run coroutines in event loops. If a coroutine awaits on a " "Future, the Task suspends the execution of the coroutine and waits for the " @@ -878,7 +827,7 @@ msgstr "" "attend la fin de ce *futur*. Quand celui-ci est terminé, l'exécution de la " "coroutine encapsulée reprend." -#: library/asyncio-task.rst:764 +#: library/asyncio-task.rst:705 msgid "" "Event loops use cooperative scheduling: an event loop runs one Task at a " "time. While a Task awaits for the completion of a Future, the event loop " @@ -889,7 +838,7 @@ msgstr "" "futur, la boucle d'événement exécute d'autres tâches, des fonctions de " "rappel, ou effectue des opérations d'entrées-sorties." -#: library/asyncio-task.rst:769 +#: library/asyncio-task.rst:710 msgid "" "Use the high-level :func:`asyncio.create_task` function to create Tasks, or " "the low-level :meth:`loop.create_task` or :func:`ensure_future` functions. " @@ -900,7 +849,7 @@ msgstr "" "créer des tâches. Il est déconseillé d'instancier manuellement des objets " "*Task*." -#: library/asyncio-task.rst:774 +#: library/asyncio-task.rst:715 msgid "" "To cancel a running Task use the :meth:`cancel` method. Calling it will " "cause the Task to throw a :exc:`CancelledError` exception into the wrapped " @@ -912,7 +861,7 @@ msgstr "" "`CancelledError` dans la coroutine encapsulée. Si la coroutine attendait un " "*futur* au moment de l'annulation, celui-ci est annulé." -#: library/asyncio-task.rst:779 +#: library/asyncio-task.rst:720 msgid "" ":meth:`cancelled` can be used to check if the Task was cancelled. The method " "returns ``True`` if the wrapped coroutine did not suppress the :exc:" @@ -922,7 +871,7 @@ msgstr "" "Elle renvoie ``True`` si la coroutine encapsulée n'a pas ignoré l'exception :" "exc:`CancelledError` et a bien été annulée." -#: library/asyncio-task.rst:784 +#: library/asyncio-task.rst:725 msgid "" ":class:`asyncio.Task` inherits from :class:`Future` all of its APIs except :" "meth:`Future.set_result` and :meth:`Future.set_exception`." @@ -930,7 +879,7 @@ msgstr "" ":class:`asyncio.Task` hérite de :class:`Future`, de toute son API, à " "l'exception de :meth:`Future.set_result` et de :meth:`Future.set_exception`." -#: library/asyncio-task.rst:788 +#: library/asyncio-task.rst:729 msgid "" "Tasks support the :mod:`contextvars` module. When a Task is created it " "copies the current context and later runs its coroutine in the copied " @@ -940,15 +889,21 @@ msgstr "" "tâche effectue une copie du contexte actuel et exécutera ses coroutines dans " "cette copie." -#: library/asyncio-task.rst:792 +#: library/asyncio-task.rst:733 msgid "Added support for the :mod:`contextvars` module." msgstr "Ajout du support du module :mod:`contextvars`." -#: library/asyncio-task.rst:803 +#: library/asyncio-task.rst:739 +msgid "" +"Deprecation warning is emitted if *loop* is not specified and there is no " +"running event loop." +msgstr "" + +#: library/asyncio-task.rst:745 msgid "Request the Task to be cancelled." msgstr "Demande l'annulation d'une tâche." -#: library/asyncio-task.rst:805 +#: library/asyncio-task.rst:747 msgid "" "This arranges for a :exc:`CancelledError` exception to be thrown into the " "wrapped coroutine on the next cycle of the event loop." @@ -957,7 +912,7 @@ msgstr "" "encapsulée. L'exception sera levée au prochain cycle de la boucle " "d'exécution." -#: library/asyncio-task.rst:808 +#: library/asyncio-task.rst:750 msgid "" "The coroutine then has a chance to clean up or even deny the request by " "suppressing the exception with a :keyword:`try` ... ... ``except " @@ -973,11 +928,18 @@ msgstr "" "annulée, bien qu'ignorer totalement une annulation ne soit ni une pratique " "courante, ni encouragé." -#: library/asyncio-task.rst:816 -msgid "Added the ``msg`` parameter." +#: library/asyncio-task.rst:758 +#, fuzzy +msgid "Added the *msg* parameter." +msgstr "ajout du paramètre ``name``." + +#: library/asyncio-task.rst:765 +msgid "" +"*msg* parameter is ambiguous when multiple :meth:`cancel` are called with " +"different cancellation messages. The argument will be removed." msgstr "" -#: library/asyncio-task.rst:821 +#: library/asyncio-task.rst:768 msgid "" "The following example illustrates how coroutines can intercept the " "cancellation request::" @@ -985,11 +947,11 @@ msgstr "" "L'exemple ci-dessous illustre comment une coroutine peut intercepter une " "requête d'annulation ::" -#: library/asyncio-task.rst:860 +#: library/asyncio-task.rst:807 msgid "Return ``True`` if the Task is *cancelled*." msgstr "Renvoie ``True`` si la tâche est *annulée*." -#: library/asyncio-task.rst:862 +#: library/asyncio-task.rst:809 msgid "" "The Task is *cancelled* when the cancellation was requested with :meth:" "`cancel` and the wrapped coroutine propagated the :exc:`CancelledError` " @@ -999,11 +961,11 @@ msgstr "" "et la coroutine encapsulée a propagé l'exception :exc:`CancelledError` qui a " "été levée en son sein." -#: library/asyncio-task.rst:868 +#: library/asyncio-task.rst:815 msgid "Return ``True`` if the Task is *done*." msgstr "Renvoie ``True`` si la tâche est *achevée*." -#: library/asyncio-task.rst:870 +#: library/asyncio-task.rst:817 msgid "" "A Task is *done* when the wrapped coroutine either returned a value, raised " "an exception, or the Task was cancelled." @@ -1011,11 +973,11 @@ msgstr "" "Une tâche est dite *achevée* quand la coroutine encapsulée a soit renvoyé " "une valeur, soit levé une exception, ou que la tâche a été annulée." -#: library/asyncio-task.rst:875 +#: library/asyncio-task.rst:822 msgid "Return the result of the Task." msgstr "Renvoie le résultat de la tâche." -#: library/asyncio-task.rst:877 +#: library/asyncio-task.rst:824 msgid "" "If the Task is *done*, the result of the wrapped coroutine is returned (or " "if the coroutine raised an exception, that exception is re-raised.)" @@ -1024,7 +986,7 @@ msgstr "" "renvoyé (sinon, dans le cas où la coroutine a levé une exception, cette " "exception est de nouveau levée)." -#: library/asyncio-task.rst:895 +#: library/asyncio-task.rst:842 msgid "" "If the Task has been *cancelled*, this method raises a :exc:`CancelledError` " "exception." @@ -1032,7 +994,7 @@ msgstr "" "Si la tâche a été *annulée*, cette méthode lève une exception :exc:" "`CancelledError`." -#: library/asyncio-task.rst:884 +#: library/asyncio-task.rst:831 msgid "" "If the Task's result isn't yet available, this method raises a :exc:" "`InvalidStateError` exception." @@ -1040,11 +1002,11 @@ msgstr "" "Si le résultat de la tâche n'est pas encore disponible, cette méthode lève " "une exception :exc:`InvalidStateError`." -#: library/asyncio-task.rst:889 +#: library/asyncio-task.rst:836 msgid "Return the exception of the Task." msgstr "Renvoie l'exception de la tâche." -#: library/asyncio-task.rst:891 +#: library/asyncio-task.rst:838 msgid "" "If the wrapped coroutine raised an exception that exception is returned. If " "the wrapped coroutine returned normally this method returns ``None``." @@ -1052,7 +1014,7 @@ msgstr "" "Si la coroutine encapsulée lève une exception, cette exception est renvoyée. " "Si la coroutine s'est exécutée normalement, cette méthode renvoie ``None``." -#: library/asyncio-task.rst:898 +#: library/asyncio-task.rst:845 msgid "" "If the Task isn't *done* yet, this method raises an :exc:`InvalidStateError` " "exception." @@ -1060,30 +1022,30 @@ msgstr "" "Si la tâche n'est pas encore *achevée*, cette méthode lève une exception :" "exc:`InvalidStateError`." -#: library/asyncio-task.rst:903 +#: library/asyncio-task.rst:850 msgid "Add a callback to be run when the Task is *done*." msgstr "" "Ajoute une fonction de rappel qui sera exécutée quand la tâche sera " "*achevée*." -#: library/asyncio-task.rst:914 +#: library/asyncio-task.rst:861 msgid "This method should only be used in low-level callback-based code." msgstr "" "Cette méthode ne doit être utilisée que dans du code basé sur les fonctions " "de rappel de bas-niveau." -#: library/asyncio-task.rst:907 +#: library/asyncio-task.rst:854 msgid "" "See the documentation of :meth:`Future.add_done_callback` for more details." msgstr "" "Se référer à la documentation de :meth:`Future.add_done_callback` pour plus " "de détails." -#: library/asyncio-task.rst:912 +#: library/asyncio-task.rst:859 msgid "Remove *callback* from the callbacks list." msgstr "Retire *callback* de la liste de fonctions de rappel." -#: library/asyncio-task.rst:916 +#: library/asyncio-task.rst:863 msgid "" "See the documentation of :meth:`Future.remove_done_callback` for more " "details." @@ -1091,11 +1053,11 @@ msgstr "" "Se référer à la documentation de :meth:`Future.remove_done_callback` pour " "plus de détails." -#: library/asyncio-task.rst:921 +#: library/asyncio-task.rst:868 msgid "Return the list of stack frames for this Task." msgstr "Renvoie une liste représentant la pile d'appels de la tâche." -#: library/asyncio-task.rst:923 +#: library/asyncio-task.rst:870 msgid "" "If the wrapped coroutine is not done, this returns the stack where it is " "suspended. If the coroutine has completed successfully or was cancelled, " @@ -1108,15 +1070,15 @@ msgstr "" "renvoie une liste vide. Si la coroutine a été terminée par une exception, " "ceci renvoie la pile d'erreurs." -#: library/asyncio-task.rst:929 +#: library/asyncio-task.rst:876 msgid "The frames are always ordered from oldest to newest." msgstr "La pile est toujours affichée de l'appelant à l'appelé." -#: library/asyncio-task.rst:931 +#: library/asyncio-task.rst:878 msgid "Only one stack frame is returned for a suspended coroutine." msgstr "Une seule ligne est renvoyée si la coroutine est suspendue." -#: library/asyncio-task.rst:933 +#: library/asyncio-task.rst:880 msgid "" "The optional *limit* argument sets the maximum number of frames to return; " "by default all available frames are returned. The ordering of the returned " @@ -1130,11 +1092,11 @@ msgstr "" "renvoyés, si la pile est une pile d'erreurs, ce sont les appels les plus " "anciens qui le sont (dans un souci de cohérence avec le module *traceback*)." -#: library/asyncio-task.rst:942 +#: library/asyncio-task.rst:889 msgid "Print the stack or traceback for this Task." msgstr "Affiche la pile d'appels ou d'erreurs de la tâche." -#: library/asyncio-task.rst:944 +#: library/asyncio-task.rst:891 msgid "" "This produces output similar to that of the traceback module for the frames " "retrieved by :meth:`get_stack`." @@ -1142,11 +1104,11 @@ msgstr "" "Le format de sortie des appels produits par :meth:`get_stack` est similaire " "à celui du module *traceback*." -#: library/asyncio-task.rst:947 +#: library/asyncio-task.rst:894 msgid "The *limit* argument is passed to :meth:`get_stack` directly." msgstr "Le paramètre *limit* est directement passé à :meth:`get_stack`." -#: library/asyncio-task.rst:949 +#: library/asyncio-task.rst:896 msgid "" "The *file* argument is an I/O stream to which the output is written; by " "default output is written to :data:`sys.stderr`." @@ -1154,15 +1116,15 @@ msgstr "" "Le paramètre *file* est un flux d'entrées-sorties sur lequel le résultat est " "écrit ; par défaut, :data:`sys.stderr`." -#: library/asyncio-task.rst:954 +#: library/asyncio-task.rst:901 msgid "Return the coroutine object wrapped by the :class:`Task`." msgstr "Renvoie l’objet *coroutine* encapsulé par la :class:`Task`." -#: library/asyncio-task.rst:960 +#: library/asyncio-task.rst:907 msgid "Return the name of the Task." msgstr "Renvoie le nom de la tâche." -#: library/asyncio-task.rst:962 +#: library/asyncio-task.rst:909 msgid "" "If no name has been explicitly assigned to the Task, the default asyncio " "Task implementation generates a default name during instantiation." @@ -1171,18 +1133,18 @@ msgstr "" "défaut d’une *Task* *asyncio* génère un nom par défaut durant " "l’instanciation." -#: library/asyncio-task.rst:970 +#: library/asyncio-task.rst:917 msgid "Set the name of the Task." msgstr "Définit le nom de la tâche." -#: library/asyncio-task.rst:972 +#: library/asyncio-task.rst:919 msgid "" "The *value* argument can be any object, which is then converted to a string." msgstr "" "L’argument *value* peut être n’importe quel objet qui sera ensuite converti " "en chaine de caractères." -#: library/asyncio-task.rst:975 +#: library/asyncio-task.rst:922 msgid "" "In the default Task implementation, the name will be visible in the :func:" "`repr` output of a task object." @@ -1190,83 +1152,156 @@ msgstr "" "Dans l’implémentation par défaut de *Task*, le nom sera visible dans le " "résultat de :func:`repr` d’un objet *Task*." -#: library/asyncio-task.rst:984 -msgid "Generator-based Coroutines" -msgstr "Coroutines basées sur des générateurs" +#~ msgid "Running an asyncio Program" +#~ msgstr "Exécution d'un programme *asyncio*" -#: library/asyncio-task.rst:988 -msgid "" -"Support for generator-based coroutines is **deprecated** and is scheduled " -"for removal in Python 3.10." -msgstr "" -"Les coroutines basées sur des générateurs sont **obsolètes** et il est prévu " -"de les supprimer en Python 3.10." - -#: library/asyncio-task.rst:991 -msgid "" -"Generator-based coroutines predate async/await syntax. They are Python " -"generators that use ``yield from`` expressions to await on Futures and other " -"coroutines." -msgstr "" -"Les coroutines basées sur des générateurs sont antérieures à la syntaxe " -"*async* / *await*. Il existe des générateurs *Python* qui utilisent les " -"expressions ``yield from`` pour attendre des *futurs* et autres coroutines." +#~ msgid "Execute the :term:`coroutine` *coro* and return the result." +#~ msgstr "Exécute la :term:`coroutine` *coro* et renvoie le résultat." -#: library/asyncio-task.rst:995 -msgid "" -"Generator-based coroutines should be decorated with :func:`@asyncio." -"coroutine `, although this is not enforced." -msgstr "" -"Les coroutines basées sur des générateurs doivent être décorées avec :func:" -"`@asyncio.coroutine `, même si ce n'est pas vérifié par " -"l'interpréteur." - -#: library/asyncio-task.rst:1002 -msgid "Decorator to mark generator-based coroutines." -msgstr "Décorateur pour coroutines basées sur des générateurs." - -#: library/asyncio-task.rst:1004 -msgid "" -"This decorator enables legacy generator-based coroutines to be compatible " -"with async/await code::" -msgstr "" -"Ce décorateur rend compatibles les coroutines basées sur des générateurs " -"avec le code *async* / *await* ::" - -#: library/asyncio-task.rst:1014 -msgid "This decorator should not be used for :keyword:`async def` coroutines." -msgstr "" -"Ce décorateur ne doit pas être utilisé avec des coroutines :keyword:`async " -"def`." +#, fuzzy +#~ msgid "" +#~ "This function runs the passed coroutine, taking care of managing the " +#~ "asyncio event loop, *finalizing asynchronous generators*, and closing the " +#~ "threadpool." +#~ msgstr "" +#~ "Cette fonction exécute la coroutine passée en argument. Elle gère la " +#~ "boucle d'événements *asyncio* et *finalise les générateurs asynchrones*." + +#~ msgid "" +#~ "This function cannot be called when another asyncio event loop is running " +#~ "in the same thread." +#~ msgstr "" +#~ "Cette fonction ne peut pas être appelée si une autre boucle d'événement " +#~ "*asyncio* s'exécute dans le même fil d'exécution." + +#~ msgid "If *debug* is ``True``, the event loop will be run in debug mode." +#~ msgstr "" +#~ "Si *debug* vaut ``True``, la boucle d'événement s'exécute en mode de " +#~ "débogage." + +#~ msgid "" +#~ "This function always creates a new event loop and closes it at the end. " +#~ "It should be used as a main entry point for asyncio programs, and should " +#~ "ideally only be called once." +#~ msgstr "" +#~ "Cette fonction crée toujours une nouvelle boucle d'événement et la clôt à " +#~ "la fin. Elle doit être utilisée comme point d'entrée principal des " +#~ "programmes *asyncio* et ne doit être idéalement appelée qu'une seule fois." + +#~ msgid "" +#~ "The source code for ``asyncio.run()`` can be found in :source:`Lib/" +#~ "asyncio/runners.py`." +#~ msgstr "" +#~ "Le code source pour ``asyncio.run()`` est disponible dans :source:`Lib/" +#~ "asyncio/runners.py`." + +#~ msgid "" +#~ "This function has been **added in Python 3.7**. Prior to Python 3.7, the " +#~ "low-level :func:`asyncio.ensure_future` function can be used instead::" +#~ msgstr "" +#~ "Cette fonction a été **ajoutée dans Python 3.7**. Pour les versions " +#~ "antérieures à la 3.7, la fonction de bas-niveau :func:`asyncio." +#~ "ensure_future` peut-être utilisée ::" + +#~ msgid "" +#~ "asyncio also supports legacy :ref:`generator-based " +#~ "` coroutines." +#~ msgstr "" +#~ "*asyncio* implémente également les coroutines :ref:`basées sur des " +#~ "générateurs ` ; celles-ci sont obsolètes." + +#~ msgid "" +#~ "If any awaitable in *aws* is a coroutine, it is automatically scheduled " +#~ "as a Task. Passing coroutines objects to ``wait()`` directly is " +#~ "deprecated as it leads to :ref:`confusing behavior " +#~ "`." +#~ msgstr "" +#~ "Si un *awaitable* de *aws* est une coroutine, celle-ci est " +#~ "automatiquement planifiée comme une tâche. Passer directement des objets " +#~ "coroutines à ``wait()`` est obsolète, car ceci conduisait :ref:`à un " +#~ "comportement portant à confusion `." + +#~ msgid "" +#~ "``wait()`` schedules coroutines as Tasks automatically and later returns " +#~ "those implicitly created Task objects in ``(done, pending)`` sets. " +#~ "Therefore the following code won't work as expected::" +#~ msgstr "" +#~ "``wait()`` planifie automatiquement les coroutines comme des tâches et " +#~ "renvoie les objets *Task* ainsi créés dans les ensembles ``(done, " +#~ "pending)``. Le code suivant ne fonctionne donc pas comme voulu ::" + +#~ msgid "Here is how the above snippet can be fixed::" +#~ msgstr "Voici comment corriger le morceau de code ci-dessus ::" + +#~ msgid "Generator-based Coroutines" +#~ msgstr "Coroutines basées sur des générateurs" + +#~ msgid "" +#~ "Support for generator-based coroutines is **deprecated** and is scheduled " +#~ "for removal in Python 3.10." +#~ msgstr "" +#~ "Les coroutines basées sur des générateurs sont **obsolètes** et il est " +#~ "prévu de les supprimer en Python 3.10." + +#~ msgid "" +#~ "Generator-based coroutines predate async/await syntax. They are Python " +#~ "generators that use ``yield from`` expressions to await on Futures and " +#~ "other coroutines." +#~ msgstr "" +#~ "Les coroutines basées sur des générateurs sont antérieures à la syntaxe " +#~ "*async* / *await*. Il existe des générateurs *Python* qui utilisent les " +#~ "expressions ``yield from`` pour attendre des *futurs* et autres " +#~ "coroutines." + +#~ msgid "" +#~ "Generator-based coroutines should be decorated with :func:`@asyncio." +#~ "coroutine `, although this is not enforced." +#~ msgstr "" +#~ "Les coroutines basées sur des générateurs doivent être décorées avec :" +#~ "func:`@asyncio.coroutine `, même si ce n'est pas " +#~ "vérifié par l'interpréteur." + +#~ msgid "Decorator to mark generator-based coroutines." +#~ msgstr "Décorateur pour coroutines basées sur des générateurs." + +#~ msgid "" +#~ "This decorator enables legacy generator-based coroutines to be compatible " +#~ "with async/await code::" +#~ msgstr "" +#~ "Ce décorateur rend compatibles les coroutines basées sur des générateurs " +#~ "avec le code *async* / *await* ::" + +#~ msgid "" +#~ "This decorator should not be used for :keyword:`async def` coroutines." +#~ msgstr "" +#~ "Ce décorateur ne doit pas être utilisé avec des coroutines :keyword:" +#~ "`async def`." # pas de majuscule car suit un deux-points -#: library/asyncio-task.rst:1019 -msgid "Use :keyword:`async def` instead." -msgstr "utilisez :keyword:`async def` à la place." - -#: library/asyncio-task.rst:1023 -msgid "Return ``True`` if *obj* is a :ref:`coroutine object `." -msgstr "Renvoie ``True`` si *obj* est un :ref:`objet coroutine `." - -#: library/asyncio-task.rst:1025 -msgid "" -"This method is different from :func:`inspect.iscoroutine` because it returns " -"``True`` for generator-based coroutines." -msgstr "" -"Cette méthode est différente de :func:`inspect.iscoroutine` car elle renvoie " -"``True`` pour des coroutines basées sur des générateurs." - -#: library/asyncio-task.rst:1030 -msgid "Return ``True`` if *func* is a :ref:`coroutine function `." -msgstr "" -"Renvoie ``True`` si *func* est une :ref:`fonction coroutine `." - -#: library/asyncio-task.rst:1033 -msgid "" -"This method is different from :func:`inspect.iscoroutinefunction` because it " -"returns ``True`` for generator-based coroutine functions decorated with :" -"func:`@coroutine `." -msgstr "" -"Cette méthode est différente de :func:`inspect.iscoroutinefunction` car elle " -"renvoie ``True`` pour des coroutines basées sur des générateurs, décorées " -"avec :func:`@coroutine `." +#~ msgid "Use :keyword:`async def` instead." +#~ msgstr "utilisez :keyword:`async def` à la place." + +#~ msgid "Return ``True`` if *obj* is a :ref:`coroutine object `." +#~ msgstr "" +#~ "Renvoie ``True`` si *obj* est un :ref:`objet coroutine `." + +#~ msgid "" +#~ "This method is different from :func:`inspect.iscoroutine` because it " +#~ "returns ``True`` for generator-based coroutines." +#~ msgstr "" +#~ "Cette méthode est différente de :func:`inspect.iscoroutine` car elle " +#~ "renvoie ``True`` pour des coroutines basées sur des générateurs." + +#~ msgid "" +#~ "Return ``True`` if *func* is a :ref:`coroutine function `." +#~ msgstr "" +#~ "Renvoie ``True`` si *func* est une :ref:`fonction coroutine `." + +#~ msgid "" +#~ "This method is different from :func:`inspect.iscoroutinefunction` because " +#~ "it returns ``True`` for generator-based coroutine functions decorated " +#~ "with :func:`@coroutine `." +#~ msgstr "" +#~ "Cette méthode est différente de :func:`inspect.iscoroutinefunction` car " +#~ "elle renvoie ``True`` pour des coroutines basées sur des générateurs, " +#~ "décorées avec :func:`@coroutine `." diff --git a/library/asyncio.po b/library/asyncio.po index 41f60589f8..7b210fc6de 100644 --- a/library/asyncio.po +++ b/library/asyncio.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2021-05-24 21:49-0400\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" @@ -15,7 +15,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.4.3\n" -#: library/asyncio.rst:66 +#: library/asyncio.rst:65 msgid "High-level APIs" msgstr "Bibliothèques de haut-niveau" @@ -23,7 +23,7 @@ msgstr "Bibliothèques de haut-niveau" msgid "Low-level APIs" msgstr "Bibliothèques de bas-niveau" -#: library/asyncio.rst:87 +#: library/asyncio.rst:88 msgid "Guides and Tutorials" msgstr "Guides et tutoriels" @@ -35,39 +35,39 @@ msgstr ":mod:`asyncio` — Entrées/Sorties asynchrones" msgid "Hello World!" msgstr "Hello World !" -#: library/asyncio.rst:23 +#: library/asyncio.rst:22 msgid "" "asyncio is a library to write **concurrent** code using the **async/await** " "syntax." msgstr "" -"`asyncio` est une bibliothèque permettant de faire de la programmation " +"``asyncio`` est une bibliothèque permettant de faire de la programmation " "asynchrone en utilisant la syntaxe *async*/*await*." -#: library/asyncio.rst:26 +#: library/asyncio.rst:25 msgid "" "asyncio is used as a foundation for multiple Python asynchronous frameworks " "that provide high-performance network and web-servers, database connection " "libraries, distributed task queues, etc." msgstr "" -"`asyncio` constitue la base de nombreux cadriciels (*frameworks*) Python " +"``asyncio`` constitue la base de nombreux cadriciels (*frameworks*) Python " "asynchrones qui fournissent des utilitaires réseau et des serveurs web " "performants, des bibliothèques de connexion à des bases de données, des " "files d'exécution distribuées, etc." -#: library/asyncio.rst:30 +#: library/asyncio.rst:29 msgid "" "asyncio is often a perfect fit for IO-bound and high-level **structured** " "network code." msgstr "" -"`asyncio` est souvent le bon choix pour écrire du code réseau de haut-niveau " -"et tributaire des entrées-sorties (*IO-bound*)." +"``asyncio`` est souvent le bon choix pour écrire du code réseau de haut-" +"niveau et tributaire des entrées-sorties (*IO-bound*)." -#: library/asyncio.rst:33 +#: library/asyncio.rst:32 msgid "asyncio provides a set of **high-level** APIs to:" msgstr "" -"`asyncio` fournit des interfaces de programmation **haut-niveau** pour :" +"``asyncio`` fournit des interfaces de programmation **haut-niveau** pour :" -#: library/asyncio.rst:35 +#: library/asyncio.rst:34 msgid "" ":ref:`run Python coroutines ` concurrently and have full control " "over their execution;" @@ -75,27 +75,27 @@ msgstr "" ":ref:`exécuter des coroutines Python ` de manière concurrente et " "d'avoir le contrôle total sur leur exécution ;" -#: library/asyncio.rst:38 +#: library/asyncio.rst:37 msgid "perform :ref:`network IO and IPC `;" msgstr "" "effectuer :ref:`des entrées/sorties réseau et de la communication inter-" "processus ` ;" -#: library/asyncio.rst:40 +#: library/asyncio.rst:39 msgid "control :ref:`subprocesses `;" msgstr "contrôler des :ref:`sous-processus ` ;" -#: library/asyncio.rst:42 +#: library/asyncio.rst:41 msgid "distribute tasks via :ref:`queues `;" msgstr "distribuer des tâches avec des :ref:`queues ` ;" -#: library/asyncio.rst:44 +#: library/asyncio.rst:43 msgid ":ref:`synchronize ` concurrent code;" msgstr "" ":ref:`synchroniser ` du code s'exécutant de manière " "concurrente ;" -#: library/asyncio.rst:46 +#: library/asyncio.rst:45 msgid "" "Additionally, there are **low-level** APIs for *library and framework " "developers* to:" @@ -103,7 +103,7 @@ msgstr "" "En plus, il existe des bibliothèques de **bas-niveau** pour que les " "*développeurs de bibliothèques et de frameworks* puissent :" -#: library/asyncio.rst:49 +#: library/asyncio.rst:48 msgid "" "create and manage :ref:`event loops `, which provide " "asynchronous APIs for :meth:`networking `, running :meth:" @@ -115,7 +115,7 @@ msgstr "" "create_server>`, d'exécution de :meth:`subprocesses `, " "de gestion de :meth:`signaux système `, etc ;" -#: library/asyncio.rst:54 +#: library/asyncio.rst:53 msgid "" "implement efficient protocols using :ref:`transports `;" @@ -123,7 +123,7 @@ msgstr "" "implémenter des protocoles efficaces à l'aide de :ref:`transports ` ;" -#: library/asyncio.rst:57 +#: library/asyncio.rst:56 msgid "" ":ref:`bridge ` callback-based libraries and code with async/" "await syntax." @@ -131,11 +131,11 @@ msgstr "" ":ref:`lier ` des bibliothèques basées sur les fonctions de " "rappel et développer avec la syntaxe *async*/*await*." -#: library/asyncio.rst:65 +#: library/asyncio.rst:64 msgid "Reference" msgstr "Sommaire" -#: library/asyncio.rst:96 +#: library/asyncio.rst:97 msgid "The source code for asyncio can be found in :source:`Lib/asyncio/`." msgstr "" -"Le code source pour `asyncio` est disponible dans :source:`Lib/asyncio/`." +"Le code source d'``asyncio`` est disponible dans :source:`Lib/asyncio/`." diff --git a/library/asyncore.po b/library/asyncore.po index 2c366d3d72..35c98f0448 100644 --- a/library/asyncore.po +++ b/library/asyncore.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2018-07-27 23:21+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -18,15 +18,17 @@ msgstr "" msgid ":mod:`asyncore` --- Asynchronous socket handler" msgstr ":mod:`asyncore` — Gestionnaire de socket asynchrone" -#: library/asyncore.rst:13 +#: library/asyncore.rst:14 msgid "**Source code:** :source:`Lib/asyncore.py`" msgstr "**Code source :** :source:`Lib/asyncore.py`" -#: library/asyncore.rst:15 -msgid "Please use :mod:`asyncio` instead." -msgstr "Utilisez :mod:`asyncio` à la place." +#: library/asyncore.rst:20 +msgid "" +"The :mod:`asyncore` module is deprecated (see :pep:`PEP 594 <594#asyncore>` " +"for details). Please use :mod:`asyncio` instead." +msgstr "" -#: library/asyncore.rst:22 +#: library/asyncore.rst:25 msgid "" "This module exists for backwards compatibility only. For new code we " "recommend using :mod:`asyncio`." @@ -34,13 +36,13 @@ msgstr "" "Ce module n'existe que pour des raisons de rétrocompatibilité. Pour du code " "nouveau, l'utilisation de :mod:`asyncio` est recommandée." -#: library/asyncore.rst:25 +#: library/asyncore.rst:28 msgid "" "This module provides the basic infrastructure for writing asynchronous " "socket service clients and servers." msgstr "" -#: library/asyncore.rst:28 +#: library/asyncore.rst:31 msgid "" "There are only two ways to have a program on a single processor do \"more " "than one thing at a time.\" Multi-threaded programming is the simplest and " @@ -52,7 +54,7 @@ msgid "" "servers are rarely processor bound, however." msgstr "" -#: library/asyncore.rst:37 +#: library/asyncore.rst:40 msgid "" "If your operating system supports the :c:func:`select` system call in its I/" "O library (and nearly all do), then you can use it to juggle multiple " @@ -66,7 +68,7 @@ msgid "" "module is invaluable." msgstr "" -#: library/asyncore.rst:48 +#: library/asyncore.rst:51 msgid "" "The basic idea behind both modules is to create one or more network " "*channels*, instances of class :class:`asyncore.dispatcher` and :class:" @@ -75,7 +77,7 @@ msgid "" "*map*." msgstr "" -#: library/asyncore.rst:54 +#: library/asyncore.rst:57 msgid "" "Once the initial channel(s) is(are) created, calling the :func:`loop` " "function activates channel service, which continues until the last channel " @@ -83,7 +85,7 @@ msgid "" "is closed." msgstr "" -#: library/asyncore.rst:61 +#: library/asyncore.rst:64 msgid "" "Enter a polling loop that terminates after count passes or all open channels " "have been closed. All arguments are optional. The *count* parameter " @@ -95,7 +97,7 @@ msgid "" "preference to :func:`~select.select` (the default is ``False``)." msgstr "" -#: library/asyncore.rst:70 +#: library/asyncore.rst:73 msgid "" "The *map* parameter is a dictionary whose items are the channels to watch. " "As channels are closed they are deleted from their map. If *map* is " @@ -104,7 +106,7 @@ msgid "" "be mixed in the map." msgstr "" -#: library/asyncore.rst:79 +#: library/asyncore.rst:82 msgid "" "The :class:`dispatcher` class is a thin wrapper around a low-level socket " "object. To make it more useful, it has a few methods for event-handling " @@ -112,7 +114,7 @@ msgid "" "as a normal non-blocking socket object." msgstr "" -#: library/asyncore.rst:84 +#: library/asyncore.rst:87 msgid "" "The firing of low-level events at certain times or in certain connection " "states tells the asynchronous loop that certain higher-level events have " @@ -123,39 +125,39 @@ msgid "" "events are:" msgstr "" -#: library/asyncore.rst:93 +#: library/asyncore.rst:96 msgid "Event" msgstr "" -#: library/asyncore.rst:93 +#: library/asyncore.rst:96 msgid "Description" msgstr "Description" -#: library/asyncore.rst:95 +#: library/asyncore.rst:98 msgid "``handle_connect()``" msgstr "``handle_connect()``" -#: library/asyncore.rst:95 +#: library/asyncore.rst:98 msgid "Implied by the first read or write event" msgstr "" -#: library/asyncore.rst:98 +#: library/asyncore.rst:101 msgid "``handle_close()``" msgstr "``handle_close()``" -#: library/asyncore.rst:98 +#: library/asyncore.rst:101 msgid "Implied by a read event with no data available" msgstr "" -#: library/asyncore.rst:101 +#: library/asyncore.rst:104 msgid "``handle_accepted()``" msgstr "``handle_accepted()``" -#: library/asyncore.rst:101 +#: library/asyncore.rst:104 msgid "Implied by a read event on a listening socket" msgstr "" -#: library/asyncore.rst:105 +#: library/asyncore.rst:108 msgid "" "During asynchronous processing, each mapped channel's :meth:`readable` and :" "meth:`writable` methods are used to determine whether the channel's socket " @@ -163,49 +165,49 @@ msgid "" "`poll`\\ ed for read and write events." msgstr "" -#: library/asyncore.rst:110 +#: library/asyncore.rst:113 msgid "" "Thus, the set of channel events is larger than the basic socket events. The " "full set of methods that can be overridden in your subclass follows:" msgstr "" -#: library/asyncore.rst:116 +#: library/asyncore.rst:119 msgid "" "Called when the asynchronous loop detects that a :meth:`read` call on the " "channel's socket will succeed." msgstr "" -#: library/asyncore.rst:122 +#: library/asyncore.rst:125 msgid "" "Called when the asynchronous loop detects that a writable socket can be " "written. Often this method will implement the necessary buffering for " "performance. For example::" msgstr "" -#: library/asyncore.rst:133 +#: library/asyncore.rst:136 msgid "" "Called when there is out of band (OOB) data for a socket connection. This " "will almost never happen, as OOB is tenuously supported and rarely used." msgstr "" -#: library/asyncore.rst:139 +#: library/asyncore.rst:142 msgid "" "Called when the active opener's socket actually makes a connection. Might " "send a \"welcome\" banner, or initiate a protocol negotiation with the " "remote endpoint, for example." msgstr "" -#: library/asyncore.rst:146 +#: library/asyncore.rst:149 msgid "Called when the socket is closed." msgstr "Appelé lorsque la socket est fermée." -#: library/asyncore.rst:151 +#: library/asyncore.rst:154 msgid "" "Called when an exception is raised and not otherwise handled. The default " "version prints a condensed traceback." msgstr "" -#: library/asyncore.rst:157 +#: library/asyncore.rst:160 msgid "" "Called on listening channels (passive openers) when a connection can be " "established with a new remote endpoint that has issued a :meth:`connect` " @@ -213,7 +215,7 @@ msgid "" "`handle_accepted` instead." msgstr "" -#: library/asyncore.rst:167 +#: library/asyncore.rst:170 msgid "" "Called on listening channels (passive openers) when a connection has been " "established with a new remote endpoint that has issued a :meth:`connect` " @@ -222,7 +224,7 @@ msgid "" "socket on the other end of the connection." msgstr "" -#: library/asyncore.rst:178 +#: library/asyncore.rst:181 msgid "" "Called each time around the asynchronous loop to determine whether a " "channel's socket should be added to the list on which read events can " @@ -230,7 +232,7 @@ msgid "" "default, all channels will be interested in read events." msgstr "" -#: library/asyncore.rst:186 +#: library/asyncore.rst:189 msgid "" "Called each time around the asynchronous loop to determine whether a " "channel's socket should be added to the list on which write events can " @@ -238,55 +240,55 @@ msgid "" "default, all channels will be interested in write events." msgstr "" -#: library/asyncore.rst:192 +#: library/asyncore.rst:195 msgid "" "In addition, each channel delegates or extends many of the socket methods. " "Most of these are nearly identical to their socket partners." msgstr "" -#: library/asyncore.rst:198 +#: library/asyncore.rst:201 msgid "" "This is identical to the creation of a normal socket, and will use the same " "options for creation. Refer to the :mod:`socket` documentation for " "information on creating sockets." msgstr "" -#: library/asyncore.rst:202 +#: library/asyncore.rst:205 msgid "*family* and *type* arguments can be omitted." msgstr "Les arguments *family* et *type* sont optionnels." -#: library/asyncore.rst:208 +#: library/asyncore.rst:211 msgid "" "As with the normal socket object, *address* is a tuple with the first " "element the host to connect to, and the second the port number." msgstr "" -#: library/asyncore.rst:214 +#: library/asyncore.rst:217 msgid "Send *data* to the remote end-point of the socket." msgstr "Envoie *data* à l'autre bout de la socket." -#: library/asyncore.rst:219 +#: library/asyncore.rst:222 msgid "" "Read at most *buffer_size* bytes from the socket's remote end-point. An " "empty bytes object implies that the channel has been closed from the other " "end." msgstr "" -#: library/asyncore.rst:223 +#: library/asyncore.rst:226 msgid "" "Note that :meth:`recv` may raise :exc:`BlockingIOError` , even though :func:" "`select.select` or :func:`select.poll` has reported the socket ready for " "reading." msgstr "" -#: library/asyncore.rst:230 +#: library/asyncore.rst:233 msgid "" "Listen for connections made to the socket. The *backlog* argument specifies " "the maximum number of queued connections and should be at least 1; the " "maximum value is system-dependent (usually 5)." msgstr "" -#: library/asyncore.rst:237 +#: library/asyncore.rst:240 msgid "" "Bind the socket to *address*. The socket must not already be bound. (The " "format of *address* depends on the address family --- refer to the :mod:" @@ -295,7 +297,7 @@ msgid "" "`dispatcher` object's :meth:`set_reuse_addr` method." msgstr "" -#: library/asyncore.rst:246 +#: library/asyncore.rst:249 msgid "" "Accept a connection. The socket must be bound to an address and listening " "for connections. The return value can be either ``None`` or a pair ``(conn, " @@ -306,21 +308,21 @@ msgid "" "this event and keep listening for further incoming connections." msgstr "" -#: library/asyncore.rst:258 +#: library/asyncore.rst:261 msgid "" "Close the socket. All future operations on the socket object will fail. The " "remote end-point will receive no more data (after queued data is flushed). " "Sockets are automatically closed when they are garbage-collected." msgstr "" -#: library/asyncore.rst:266 +#: library/asyncore.rst:269 msgid "" "A :class:`dispatcher` subclass which adds simple buffered output capability, " "useful for simple clients. For more sophisticated usage use :class:`asynchat." "async_chat`." msgstr "" -#: library/asyncore.rst:272 +#: library/asyncore.rst:275 msgid "" "A file_dispatcher takes a file descriptor or :term:`file object` along with " "an optional map argument and wraps it for use with the :c:func:`poll` or :c:" @@ -329,11 +331,11 @@ msgid "" "`file_wrapper` constructor." msgstr "" -#: library/asyncore.rst:287 +#: library/asyncore.rst:290 msgid ":ref:`Availability `: Unix." msgstr ":ref:`Disponibilité ` : Unix." -#: library/asyncore.rst:282 +#: library/asyncore.rst:285 msgid "" "A file_wrapper takes an integer file descriptor and calls :func:`os.dup` to " "duplicate the handle so that the original handle may be closed independently " @@ -341,22 +343,25 @@ msgid "" "socket for use by the :class:`file_dispatcher` class." msgstr "" -#: library/asyncore.rst:293 +#: library/asyncore.rst:296 msgid "asyncore Example basic HTTP client" msgstr "Exemple de client HTTP basique avec :mod:`asyncore`" -#: library/asyncore.rst:295 +#: library/asyncore.rst:298 msgid "" "Here is a very basic HTTP client that uses the :class:`dispatcher` class to " "implement its socket handling::" msgstr "" -#: library/asyncore.rst:332 +#: library/asyncore.rst:335 msgid "asyncore Example basic echo server" msgstr "Serveur *echo* basique avec :mod:`asyncore`" -#: library/asyncore.rst:334 +#: library/asyncore.rst:337 msgid "" "Here is a basic echo server that uses the :class:`dispatcher` class to " "accept connections and dispatches the incoming connections to a handler::" msgstr "" + +#~ msgid "Please use :mod:`asyncio` instead." +#~ msgstr "Utilisez :mod:`asyncio` à la place." diff --git a/library/atexit.po b/library/atexit.po index 6decdc3083..dbf52ea55d 100644 --- a/library/atexit.po +++ b/library/atexit.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2020-10-15 09:15+0200\n" -"Last-Translator: Julien Palard \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2022-03-23 13:05-0600\n" +"Last-Translator: Yannick Gingras \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.6\n" +"X-Generator: Poedit 3.0\n" #: library/atexit.rst:2 msgid ":mod:`atexit` --- Exit handlers" @@ -86,7 +86,7 @@ msgstr "" msgid "" "If an exception is raised during execution of the exit handlers, a traceback " "is printed (unless :exc:`SystemExit` is raised) and the exception " -"information is saved. After all exit handlers have had a chance to run the " +"information is saved. After all exit handlers have had a chance to run, the " "last exception to be raised is re-raised." msgstr "" "Si une exception est levée durant l'exécution du gestionnaire de fin de " @@ -105,22 +105,26 @@ msgstr "" #: library/atexit.rst:51 msgid "" -"Remove *func* from the list of functions to be run at interpreter shutdown. " -"After calling :func:`unregister`, *func* is guaranteed not to be called when " -"the interpreter shuts down, even if it was registered more than once. :func:" -"`unregister` silently does nothing if *func* was not previously registered." +"Remove *func* from the list of functions to be run at interpreter shutdown. :" +"func:`unregister` silently does nothing if *func* was not previously " +"registered. If *func* has been registered more than once, every occurrence " +"of that function in the :mod:`atexit` call stack will be removed. Equality " +"comparisons (``==``) are used internally during unregistration, so function " +"references do not need to have matching identities." msgstr "" -"Retire *func* de la liste des fonctions à exécuter à l'arrêt de " -"l’interpréteur. Après avoir appelé :func:`unregister`, *func* est garantie " -"de ne pas être appelée à l'arrêt de l’interpréteur, même si elle a été " -"inscrite plus d'une fois. :func:`unregister` ne fait rien et reste muette " -"dans le cas où *func* n'a pas été inscrite précédemment." - -#: library/atexit.rst:61 +"Retire *func* de la liste des fonctions à exécuter au moment de l'arrêt de " +"l'interpréteur. :func:`unregister` ne fait rien et reste silencieux si " +"*func* n'a pas été préalablement inscrite. Si *func* a été inscrite plus " +"d'une fois, toutes les occurrences de cette fonction sont retirées de la " +"pile d'appels de :mod:`atexit`. La comparaison d'égalité (``==``) est " +"utilisée dans l'implémentation interne de la désinscription. Les références " +"des fonctions n'ont donc pas besoin d'avoir la même identité." + +#: library/atexit.rst:62 msgid "Module :mod:`readline`" msgstr "Module :mod:`readline`" -#: library/atexit.rst:61 +#: library/atexit.rst:62 msgid "" "Useful example of :mod:`atexit` to read and write :mod:`readline` history " "files." @@ -128,11 +132,11 @@ msgstr "" "Un exemple utile de l'usage de :mod:`atexit` pour lire et écrire des " "fichiers d'historique :mod:`readline`." -#: library/atexit.rst:68 +#: library/atexit.rst:69 msgid ":mod:`atexit` Example" msgstr "Exemple avec :mod:`atexit`" -#: library/atexit.rst:70 +#: library/atexit.rst:71 msgid "" "The following simple example demonstrates how a module can initialize a " "counter from a file when it is imported and save the counter's updated value " @@ -145,7 +149,7 @@ msgstr "" "besoin que l'application fasse un appel explicite dans ce module au moment " "de l'arrêt de l'interpréteur. ::" -#: library/atexit.rst:92 +#: library/atexit.rst:94 msgid "" "Positional and keyword arguments may also be passed to :func:`register` to " "be passed along to the registered function when it is called::" @@ -153,12 +157,25 @@ msgstr "" "Les arguments positionnels et nommés peuvent aussi être passés à :func:" "`register` afin d'être repassés à la fonction inscrite lors de son appel ::" -#: library/atexit.rst:104 +#: library/atexit.rst:106 msgid "Usage as a :term:`decorator`::" msgstr "Utilisation en tant que :term:`décorateur ` ::" -#: library/atexit.rst:112 +#: library/atexit.rst:114 msgid "This only works with functions that can be called without arguments." msgstr "" "Ceci fonctionne uniquement avec des fonctions qui peuvent être appelées sans " "argument." + +#~ msgid "" +#~ "Remove *func* from the list of functions to be run at interpreter " +#~ "shutdown. After calling :func:`unregister`, *func* is guaranteed not to " +#~ "be called when the interpreter shuts down, even if it was registered more " +#~ "than once. :func:`unregister` silently does nothing if *func* was not " +#~ "previously registered." +#~ msgstr "" +#~ "Retire *func* de la liste des fonctions à exécuter à l'arrêt de " +#~ "l’interpréteur. Après avoir appelé :func:`unregister`, *func* est " +#~ "garantie de ne pas être appelée à l'arrêt de l’interpréteur, même si elle " +#~ "a été inscrite plus d'une fois. :func:`unregister` ne fait rien et reste " +#~ "muette dans le cas où *func* n'a pas été inscrite précédemment." diff --git a/library/audioop.po b/library/audioop.po index 490b93f3c1..7c71cfe7a3 100644 --- a/library/audioop.po +++ b/library/audioop.po @@ -5,20 +5,27 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2021-11-15 19:06-0500\n" +"Last-Translator: Edith Viau \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.3\n" #: library/audioop.rst:2 msgid ":mod:`audioop` --- Manipulate raw audio data" -msgstr ":mod:`audioloop` — Manipulation de données audio brutes" +msgstr ":mod:`audioop` — Manipulation de données audio brutes" -#: library/audioop.rst:9 +#: library/audioop.rst:11 +msgid "" +"The :mod:`audioop` module is deprecated (see :pep:`PEP 594 <594#audioop>` " +"for details)." +msgstr "" + +#: library/audioop.rst:14 msgid "" "The :mod:`audioop` module contains some useful operations on sound " "fragments. It operates on sound fragments consisting of signed integer " @@ -26,84 +33,108 @@ msgid "" "`. All scalar items are integers, unless specified " "otherwise." msgstr "" +"Le module :mod:`audioop` permet d'effectuer des opérations utiles sur des " +"fragments sonores. Ceux-ci sont constitués d'échantillons audio, suite " +"d'entiers signés de taille 8, 16, 24 ou 32 bits. Ils sont sauvegardés dans " +"des :term:`objets octet-compatibles `. Tous les nombres " +"sont des entiers, sauf mention particulière." -#: library/audioop.rst:14 +#: library/audioop.rst:19 msgid "" "Support for 24-bit samples was added. All functions now accept any :term:" "`bytes-like object`. String input now results in an immediate error." msgstr "" +"Ajout de la prise en charge d'échantillons 24 bits. Toutes les fonctions " +"acceptent maintenant les :term:`objets octet-compatibles `. Une chaîne de caractères reçue en entrée lève immédiatement une " +"erreur." -#: library/audioop.rst:25 +#: library/audioop.rst:30 msgid "" "This module provides support for a-LAW, u-LAW and Intel/DVI ADPCM encodings." msgstr "" +"Ce module prend en charge les encodages de la loi A, de la loi u et les " +"encodages Intel/DVI ADPCM." -#: library/audioop.rst:29 +#: library/audioop.rst:34 msgid "" "A few of the more complicated operations only take 16-bit samples, otherwise " "the sample size (in bytes) is always a parameter of the operation." msgstr "" +"Mis à part quelques opérations plus complexes ne prenant que des " +"échantillons de 16 bits, la taille de l'échantillon (en octets) est toujours " +"un paramètre de l'opération." -#: library/audioop.rst:32 +#: library/audioop.rst:37 msgid "The module defines the following variables and functions:" -msgstr "" +msgstr "Le module définit les fonctions et variables suivantes :" -#: library/audioop.rst:37 +#: library/audioop.rst:42 msgid "" "This exception is raised on all errors, such as unknown number of bytes per " "sample, etc." msgstr "" +"Cette exception est levée pour toutes les erreurs, comme un nombre inconnu " +"d'octets par échantillon, etc." -#: library/audioop.rst:43 +#: library/audioop.rst:48 msgid "" "Return a fragment which is the addition of the two samples passed as " "parameters. *width* is the sample width in bytes, either ``1``, ``2``, ``3`` " "or ``4``. Both fragments should have the same length. Samples are " "truncated in case of overflow." msgstr "" +"Renvoie un fragment constitué de l'addition des deux échantillons fournis " +"comme paramètres. *width* est la largeur de l'échantillon en octets, soit " +"``1``, ``2``, ``3`` ou ``4``. Les deux fragments doivent avoir la même " +"longueur. Les échantillons sont tronqués en cas de débordement." -#: library/audioop.rst:50 +#: library/audioop.rst:55 msgid "" "Decode an Intel/DVI ADPCM coded fragment to a linear fragment. See the " "description of :func:`lin2adpcm` for details on ADPCM coding. Return a tuple " "``(sample, newstate)`` where the sample has the width specified in *width*." msgstr "" -#: library/audioop.rst:57 +#: library/audioop.rst:62 msgid "" "Convert sound fragments in a-LAW encoding to linearly encoded sound " "fragments. a-LAW encoding always uses 8 bits samples, so *width* refers only " "to the sample width of the output fragment here." msgstr "" -#: library/audioop.rst:64 +#: library/audioop.rst:69 msgid "Return the average over all samples in the fragment." -msgstr "" +msgstr "Renvoie la moyenne prise sur l'ensemble des échantillons du fragment." -#: library/audioop.rst:69 +#: library/audioop.rst:74 msgid "" "Return the average peak-peak value over all samples in the fragment. No " "filtering is done, so the usefulness of this routine is questionable." msgstr "" -#: library/audioop.rst:75 +#: library/audioop.rst:80 +#, fuzzy msgid "" "Return a fragment that is the original fragment with a bias added to each " "sample. Samples wrap around in case of overflow." msgstr "" +"Renvoie un fragment créé en ajoutant un biais à chaque échantillon du " +"fragment d'origine. Les échantillons s'enroulent autour dans le cas de " +"débordement." -#: library/audioop.rst:81 +#: library/audioop.rst:86 msgid "" "\"Byteswap\" all samples in a fragment and returns the modified fragment. " "Converts big-endian samples to little-endian and vice versa." msgstr "" -#: library/audioop.rst:89 +#: library/audioop.rst:94 msgid "" "Return the number of zero crossings in the fragment passed as an argument." msgstr "" -#: library/audioop.rst:94 +#: library/audioop.rst:99 msgid "" "Return a factor *F* such that ``rms(add(fragment, mul(reference, -F)))`` is " "minimal, i.e., return the factor with which you should multiply *reference* " @@ -111,11 +142,11 @@ msgid "" "both contain 2-byte samples." msgstr "" -#: library/audioop.rst:99 +#: library/audioop.rst:104 msgid "The time taken by this routine is proportional to ``len(fragment)``." -msgstr "" +msgstr "Le temps pris par cette routine est proportionnel à ``len(fragment)``." -#: library/audioop.rst:104 +#: library/audioop.rst:109 msgid "" "Try to match *reference* as well as possible to a portion of *fragment* " "(which should be the longer fragment). This is (conceptually) done by " @@ -126,22 +157,24 @@ msgid "" "*factor* is the (floating-point) factor as per :func:`findfactor`." msgstr "" -#: library/audioop.rst:115 +#: library/audioop.rst:120 msgid "" "Search *fragment* for a slice of length *length* samples (not bytes!) with " -"maximum energy, i.e., return *i* for which ``rms(fragment[i*2:(i" -"+length)*2])`` is maximal. The fragments should both contain 2-byte samples." +"maximum energy, i.e., return *i* for which ``rms(fragment[i*2:" +"(i+length)*2])`` is maximal. The fragments should both contain 2-byte " +"samples." msgstr "" -#: library/audioop.rst:119 +#: library/audioop.rst:124 msgid "The routine takes time proportional to ``len(fragment)``." -msgstr "" +msgstr "La routine s'exécute en un temps proportionnel à ``len(fragment)``." -#: library/audioop.rst:124 +#: library/audioop.rst:129 msgid "Return the value of sample *index* from the fragment." msgstr "" +"Renvoie la valeur de l'échantillon à l'indice *index* dans le fragment." -#: library/audioop.rst:129 +#: library/audioop.rst:134 msgid "" "Convert samples to 4 bit Intel/DVI ADPCM encoding. ADPCM coding is an " "adaptive coding scheme, whereby each 4 bit number is the difference between " @@ -150,7 +183,7 @@ msgid "" "standard." msgstr "" -#: library/audioop.rst:134 +#: library/audioop.rst:139 msgid "" "*state* is a tuple containing the state of the coder. The coder returns a " "tuple ``(adpcmfrag, newstate)``, and the *newstate* should be passed to the " @@ -159,7 +192,7 @@ msgid "" "per byte." msgstr "" -#: library/audioop.rst:142 +#: library/audioop.rst:147 msgid "" "Convert samples in the audio fragment to a-LAW encoding and return this as a " "bytes object. a-LAW is an audio encoding format whereby you get a dynamic " @@ -167,24 +200,26 @@ msgid "" "audio hardware, among others." msgstr "" -#: library/audioop.rst:150 +#: library/audioop.rst:155 msgid "Convert samples between 1-, 2-, 3- and 4-byte formats." -msgstr "" +msgstr "Convertit des échantillons pour les formats à 1, 2, 3, et 4 octets." -#: library/audioop.rst:154 +#: library/audioop.rst:159 msgid "" "In some audio formats, such as .WAV files, 16, 24 and 32 bit samples are " "signed, but 8 bit samples are unsigned. So when converting to 8 bit wide " "samples for these formats, you need to also add 128 to the result::" msgstr "" -#: library/audioop.rst:161 +#: library/audioop.rst:166 msgid "" "The same, in reverse, has to be applied when converting from 8 to 16, 24 or " "32 bit width samples." msgstr "" +"Le même procédé, mais inversé, doit être suivi lorsqu'on exécute une " +"conversion d'échantillons de 8 bits à 16, 24 ou 32 bits." -#: library/audioop.rst:167 +#: library/audioop.rst:172 msgid "" "Convert samples in the audio fragment to u-LAW encoding and return this as a " "bytes object. u-LAW is an audio encoding format whereby you get a dynamic " @@ -192,33 +227,39 @@ msgid "" "audio hardware, among others." msgstr "" -#: library/audioop.rst:175 +#: library/audioop.rst:180 msgid "" "Return the maximum of the *absolute value* of all samples in a fragment." msgstr "" +"Renvoie la *valeur absolue* maximale de tous les échantillons du fragment." -#: library/audioop.rst:180 +#: library/audioop.rst:185 msgid "Return the maximum peak-peak value in the sound fragment." msgstr "" -#: library/audioop.rst:185 +#: library/audioop.rst:190 msgid "" "Return a tuple consisting of the minimum and maximum values of all samples " "in the sound fragment." msgstr "" +"Renvoie un *n*-uplet contenant les valeurs maximale et minimale de tous les " +"échantillons du fragment sonore." -#: library/audioop.rst:191 +#: library/audioop.rst:196 msgid "" "Return a fragment that has all samples in the original fragment multiplied " "by the floating-point value *factor*. Samples are truncated in case of " "overflow." msgstr "" +"Renvoie un fragment contenant tous les échantillons du fragment original " +"multipliés par la valeur à décimale *factor*. Les échantillons sont tronqués " +"en cas de débordement." -#: library/audioop.rst:197 +#: library/audioop.rst:202 msgid "Convert the frame rate of the input fragment." -msgstr "" +msgstr "Transforme la fréquence d'échantillonnage du fragment d'entrée." -#: library/audioop.rst:199 +#: library/audioop.rst:204 msgid "" "*state* is a tuple containing the state of the converter. The converter " "returns a tuple ``(newfragment, newstate)``, and *newstate* should be passed " @@ -226,47 +267,61 @@ msgid "" "as the state." msgstr "" -#: library/audioop.rst:203 +#: library/audioop.rst:208 msgid "" "The *weightA* and *weightB* arguments are parameters for a simple digital " "filter and default to ``1`` and ``0`` respectively." msgstr "" +"Les arguments *weightA* et *weightB* sont les paramètres d'un filtre " +"numérique simple et ont comme valeur par défaut ``1`` et ``0``, " +"respectivement." -#: library/audioop.rst:209 +#: library/audioop.rst:214 msgid "Reverse the samples in a fragment and returns the modified fragment." msgstr "" +"Inverse les échantillons dans un fragment et renvoie le fragment modifié." -#: library/audioop.rst:214 +#: library/audioop.rst:219 msgid "" "Return the root-mean-square of the fragment, i.e. ``sqrt(sum(S_i^2)/n)``." msgstr "" +"Renvoie la moyenne quadratique du fragment, c'est-à-dire ``sqrt(sum(S_i^2)/" +"n)``." -#: library/audioop.rst:216 +#: library/audioop.rst:221 msgid "This is a measure of the power in an audio signal." msgstr "C'est une mesure de la puissance dans un signal audio." -#: library/audioop.rst:221 +#: library/audioop.rst:226 msgid "" "Convert a stereo fragment to a mono fragment. The left channel is " "multiplied by *lfactor* and the right channel by *rfactor* before adding the " "two channels to give a mono signal." msgstr "" +"Transforme un fragment stéréo en fragment mono. Le canal de gauche est " +"multiplié par *lfactor* et le canal de droite par *rfactor* avant " +"d'additionner les deux canaux afin d'obtenir un signal mono." -#: library/audioop.rst:228 +#: library/audioop.rst:233 msgid "" "Generate a stereo fragment from a mono fragment. Each pair of samples in " "the stereo fragment are computed from the mono sample, whereby left channel " "samples are multiplied by *lfactor* and right channel samples by *rfactor*." msgstr "" +"Génère un fragment stéréo à partir d'un fragment mono. Chaque paire " +"d'échantillons dans le fragment stéréo est obtenue à partir de l'échantillon " +"mono de la façon suivante : les échantillons du canal de gauche sont " +"multipliés par *lfactor* et les échantillons du canal de droite, par " +"*rfactor*." -#: library/audioop.rst:235 +#: library/audioop.rst:240 msgid "" "Convert sound fragments in u-LAW encoding to linearly encoded sound " "fragments. u-LAW encoding always uses 8 bits samples, so *width* refers only " "to the sample width of the output fragment here." msgstr "" -#: library/audioop.rst:239 +#: library/audioop.rst:244 msgid "" "Note that operations such as :func:`.mul` or :func:`.max` make no " "distinction between mono and stereo fragments, i.e. all samples are treated " @@ -275,7 +330,7 @@ msgid "" "that::" msgstr "" -#: library/audioop.rst:253 +#: library/audioop.rst:258 msgid "" "If you use the ADPCM coder to build network packets and you want your " "protocol to be stateless (i.e. to be able to tolerate packet loss) you " @@ -287,14 +342,14 @@ msgid "" "index) in 8." msgstr "" -#: library/audioop.rst:261 +#: library/audioop.rst:266 msgid "" "The ADPCM coders have never been tried against other ADPCM coders, only " "against themselves. It could well be that I misinterpreted the standards in " "which case they will not be interoperable with the respective standards." msgstr "" -#: library/audioop.rst:265 +#: library/audioop.rst:270 msgid "" "The :func:`find\\*` routines might look a bit funny at first sight. They are " "primarily meant to do echo cancellation. A reasonably fast way to do this " diff --git a/library/base64.po b/library/base64.po index be41c8a360..2a1cfc7241 100644 --- a/library/base64.po +++ b/library/base64.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2019-08-20 15:51+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2022-10-18 15:43+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -24,10 +24,11 @@ msgid "**Source code:** :source:`Lib/base64.py`" msgstr "**Code source :** :source:`Lib/base64.py`" #: library/base64.rst:16 +#, fuzzy msgid "" "This module provides functions for encoding binary data to printable ASCII " "characters and decoding such encodings back to binary data. It provides " -"encoding and decoding functions for the encodings specified in :rfc:`3548`, " +"encoding and decoding functions for the encodings specified in :rfc:`4648`, " "which defines the Base16, Base32, and Base64 algorithms, and for the de-" "facto standard Ascii85 and Base85 encodings." msgstr "" @@ -39,11 +40,12 @@ msgstr "" "facto* Ascii85 et base85." #: library/base64.rst:22 +#, fuzzy msgid "" -"The :rfc:`3548` encodings are suitable for encoding binary data so that it " -"can safely sent by email, used as parts of URLs, or included as part of an " -"HTTP POST request. The encoding algorithm is not the same as the :program:" -"`uuencode` program." +"The :rfc:`4648` encodings are suitable for encoding binary data so that it " +"can be safely sent by email, used as parts of URLs, or included as part of " +"an HTTP POST request. The encoding algorithm is not the same as the :" +"program:`uuencode` program." msgstr "" "Les encodages définis par la :rfc:`3548` sont adaptés au codage des données " "binaires pour leur transfert par courriel, comme éléments d'une URL ou d'une " @@ -51,12 +53,13 @@ msgstr "" "programme :program:`uuencode`." #: library/base64.rst:27 +#, fuzzy msgid "" "There are two interfaces provided by this module. The modern interface " "supports encoding :term:`bytes-like objects ` to ASCII :" "class:`bytes`, and decoding :term:`bytes-like objects ` " "or strings containing ASCII to :class:`bytes`. Both base-64 alphabets " -"defined in :rfc:`3548` (normal, and URL- and filesystem-safe) are supported." +"defined in :rfc:`4648` (normal, and URL- and filesystem-safe) are supported." msgstr "" "Ce module présente deux interfaces. L'interface moderne gère l'encodage d':" "term:`objets octet-compatibles ` en :class:`bytes` ASCII " @@ -167,7 +170,13 @@ msgstr "" "les caractères hors de l'alphabet de l'entrée produisent une :exc:`binascii." "Error`." -#: library/base64.rst:84 +#: library/base64.rst:81 +msgid "" +"For more information about the strict base64 check, see :func:`binascii." +"a2b_base64`" +msgstr "" + +#: library/base64.rst:86 msgid "" "Encode :term:`bytes-like object` *s* using the standard Base64 alphabet and " "return the encoded :class:`bytes`." @@ -175,7 +184,7 @@ msgstr "" "Encode un :term:`objet octet-compatible ` *s* en " "utilisant l'alphabet standard base64 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:90 +#: library/base64.rst:92 msgid "" "Decode :term:`bytes-like object` or ASCII string *s* using the standard " "Base64 alphabet and return the decoded :class:`bytes`." @@ -184,7 +193,7 @@ msgstr "" "de caractères ASCII *s* utilisant l'alphabet base64 standard et renvoie les :" "class:`bytes` décodés." -#: library/base64.rst:96 +#: library/base64.rst:98 msgid "" "Encode :term:`bytes-like object` *s* using the URL- and filesystem-safe " "alphabet, which substitutes ``-`` instead of ``+`` and ``_`` instead of ``/" @@ -196,7 +205,7 @@ msgstr "" "``_`` à ``+`` et ``/`` dans l'alphabet standard base64 et renvoie les :class:" "`bytes` encodés." -#: library/base64.rst:105 +#: library/base64.rst:107 msgid "" "Decode :term:`bytes-like object` or ASCII string *s* using the URL- and " "filesystem-safe alphabet, which substitutes ``-`` instead of ``+`` and ``_`` " @@ -208,7 +217,7 @@ msgstr "" "de fichiers qui substitue ``-`` et ``_`` à ``+`` et ``/`` dans l'alphabet " "standard base64 et renvoie les :class:`bytes` décodés." -#: library/base64.rst:114 +#: library/base64.rst:116 msgid "" "Encode the :term:`bytes-like object` *s* using Base32 and return the " "encoded :class:`bytes`." @@ -216,7 +225,7 @@ msgstr "" "Encode un :term:`objet byte-compatible ` *s* en utilisant " "l'algorithme base32 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:120 +#: library/base64.rst:122 msgid "" "Decode the Base32 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." @@ -225,7 +234,7 @@ msgstr "" "de caractères ASCII *s* encodé en base32 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:150 +#: library/base64.rst:173 msgid "" "Optional *casefold* is a flag specifying whether a lowercase alphabet is " "acceptable as input. For security purposes, the default is ``False``." @@ -234,9 +243,10 @@ msgstr "" "en minuscules est acceptable comme entrée. Pour des raisons de sécurité, " "cette option est à ``False`` par défaut." -#: library/base64.rst:127 +#: library/base64.rst:129 +#, fuzzy msgid "" -":rfc:`3548` allows for optional mapping of the digit 0 (zero) to the letter " +":rfc:`4648` allows for optional mapping of the digit 0 (zero) to the letter " "O (oh), and for optional mapping of the digit 1 (one) to either the letter I " "(eye) or letter L (el). The optional argument *map01* when not ``None``, " "specifies which letter the digit 1 should be mapped to (when *map01* is not " @@ -252,7 +262,7 @@ msgstr "" "la lettre O). Pour des raisons de sécurité, le défaut est ``None``, de telle " "sorte que 0 et 1 ne sont pas autorisés dans l'entrée." -#: library/base64.rst:154 +#: library/base64.rst:177 msgid "" "A :exc:`binascii.Error` is raised if *s* is incorrectly padded or if there " "are non-alphabet characters present in the input." @@ -260,7 +270,27 @@ msgstr "" "Une exception :exc:`binascii.Error` est levée si *s* n'est pas remplie à une " "longueur attendue ou si elle contient des caractères hors de l'alphabet." -#: library/base64.rst:141 +#: library/base64.rst:143 +msgid "" +"Similar to :func:`b32encode` but uses the Extended Hex Alphabet, as defined " +"in :rfc:`4648`." +msgstr "" + +#: library/base64.rst:151 +msgid "" +"Similar to :func:`b32decode` but uses the Extended Hex Alphabet, as defined " +"in :rfc:`4648`." +msgstr "" + +#: library/base64.rst:154 +msgid "" +"This version does not allow the digit 0 (zero) to the letter O (oh) and " +"digit 1 (one) to either the letter I (eye) or letter L (el) mappings, all " +"these characters are included in the Extended Hex Alphabet and are not " +"interchangeable." +msgstr "" + +#: library/base64.rst:164 msgid "" "Encode the :term:`bytes-like object` *s* using Base16 and return the " "encoded :class:`bytes`." @@ -268,7 +298,7 @@ msgstr "" "Encode un :term:`objet byte-compatible ` *s* en utilisant " "l'algorithme base16 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:147 +#: library/base64.rst:170 msgid "" "Decode the Base16 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." @@ -277,7 +307,7 @@ msgstr "" "de caractères ASCII *s* encodé en base16 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:161 +#: library/base64.rst:184 msgid "" "Encode the :term:`bytes-like object` *b* using Ascii85 and return the " "encoded :class:`bytes`." @@ -285,7 +315,7 @@ msgstr "" "Encode un :term:`objet byte-compatible ` *s* en utilisant " "l'algorithme Ascii85 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:164 +#: library/base64.rst:187 msgid "" "*foldspaces* is an optional flag that uses the special short sequence 'y' " "instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This " @@ -296,7 +326,7 @@ msgstr "" "*btoa*. Cette fonctionnalité n'est pas gérée par l'encodage « standard » " "Ascii85." -#: library/base64.rst:168 +#: library/base64.rst:191 msgid "" "*wrapcol* controls whether the output should have newline (``b'\\n'``) " "characters added to it. If this is non-zero, each output line will be at " @@ -306,7 +336,7 @@ msgstr "" "sortie. Chaque ligne de sortie contient au maximum *wrapcol* caractères si " "cette option diffère de zéro." -#: library/base64.rst:172 +#: library/base64.rst:195 msgid "" "*pad* controls whether the input is padded to a multiple of 4 before " "encoding. Note that the ``btoa`` implementation always pads." @@ -315,7 +345,7 @@ msgstr "" "l'entrée jusqu'à ce que sa longueur soit un multiple de 4 avant encodage. " "Notez que l'implémentation ``btoa`` effectue systématiquement ce remplissage." -#: library/base64.rst:175 +#: library/base64.rst:198 msgid "" "*adobe* controls whether the encoded byte sequence is framed with ``<~`` and " "``~>``, which is used by the Adobe implementation." @@ -323,7 +353,7 @@ msgstr "" "*adobe* contrôle si oui ou non la séquence encodée d'octets est encadrée par " "``<~`` et ``~>`` comme utilisé dans l'implémentation Adobe." -#: library/base64.rst:183 +#: library/base64.rst:206 msgid "" "Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and " "return the decoded :class:`bytes`." @@ -332,18 +362,18 @@ msgstr "" "de caractères ASCII *s* encodé en Ascii85 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:186 +#: library/base64.rst:209 msgid "" "*foldspaces* is a flag that specifies whether the 'y' short sequence should " "be accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature " "is not supported by the \"standard\" Ascii85 encoding." msgstr "" "L'option *foldspaces* permet d'utiliser la séquence spéciale 'y' à la place " -"de quatre espaces consécutives (ASCII `0x20`) comme pris en charge par " +"de quatre espaces consécutives (ASCII ``0x20``) comme pris en charge par " "*btoa*. Cette fonctionnalité n'est pas gérée par l'encodage « standard » " "Ascii85." -#: library/base64.rst:190 +#: library/base64.rst:213 msgid "" "*adobe* controls whether the input sequence is in Adobe Ascii85 format (i.e. " "is framed with <~ and ~>)." @@ -351,7 +381,7 @@ msgstr "" "*adobe* indique si la séquence d'entrée utilise le format Adobe Ascii85 " "(c'est-à-dire utilise l'encadrement par ``<~`` et ``~>``)." -#: library/base64.rst:193 +#: library/base64.rst:216 msgid "" "*ignorechars* should be a :term:`bytes-like object` or ASCII string " "containing characters to ignore from the input. This should only contain " @@ -363,7 +393,7 @@ msgstr "" "des caractères d'espacement et contient par défaut l'ensemble des caractères " "d'espacement de l'alphabet ASCII." -#: library/base64.rst:203 +#: library/base64.rst:226 msgid "" "Encode the :term:`bytes-like object` *b* using base85 (as used in e.g. git-" "style binary diffs) and return the encoded :class:`bytes`." @@ -372,16 +402,16 @@ msgstr "" "l'algorithme base85 (tel qu'utilisé par exemple par le programme *git-diff* " "sur des données binaires) et renvoie les :class:`bytes` encodés." -#: library/base64.rst:206 +#: library/base64.rst:229 msgid "" "If *pad* is true, the input is padded with ``b'\\0'`` so its length is a " "multiple of 4 bytes before encoding." msgstr "" -"Si *pad* est vrai, des caractères de remplissage ``b'``0'`` (*padding* en " +"Si *pad* est vrai, des caractères de remplissage ``b'\\0'`` (*padding* en " "anglais) sont ajoutés à l'entrée jusqu'à ce que sa longueur soit un multiple " "de 4 octets avant encodage." -#: library/base64.rst:214 +#: library/base64.rst:237 msgid "" "Decode the base85-encoded :term:`bytes-like object` or ASCII string *b* and " "return the decoded :class:`bytes`. Padding is implicitly removed, if " @@ -392,11 +422,11 @@ msgstr "" "décodés. Les caractères de remplissage sont implicitement retirés si " "nécessaire." -#: library/base64.rst:221 +#: library/base64.rst:244 msgid "The legacy interface:" msgstr "L'interface historique :" -#: library/base64.rst:225 +#: library/base64.rst:248 msgid "" "Decode the contents of the binary *input* file and write the resulting " "binary data to the *output* file. *input* and *output* must be :term:`file " @@ -408,7 +438,7 @@ msgstr "" "term:`objets fichiers `. *input* est lu jusqu'à ce que ``input." "readline()`` renvoie un objet *bytes* vide." -#: library/base64.rst:233 +#: library/base64.rst:256 msgid "" "Decode the :term:`bytes-like object` *s*, which must contain one or more " "lines of base64 encoded data, and return the decoded :class:`bytes`." @@ -417,7 +447,7 @@ msgstr "" "contenir une ou plusieurs lignes de données encodées en base64 et renvoie " "les :class:`bytes` décodés." -#: library/base64.rst:241 +#: library/base64.rst:264 msgid "" "Encode the contents of the binary *input* file and write the resulting " "base64 encoded data to the *output* file. *input* and *output* must be :term:" @@ -434,7 +464,7 @@ msgstr "" "sortie et assure que celle-ci se termine par une nouvelle ligne, comme " "spécifié par la :rfc:`2045` (MIME)." -#: library/base64.rst:251 +#: library/base64.rst:274 msgid "" "Encode the :term:`bytes-like object` *s*, which can contain arbitrary binary " "data, and return :class:`bytes` containing the base64-encoded data, with " @@ -447,22 +477,33 @@ msgstr "" "(``b'\\n'``) est inséré tous les 76 octets de sortie et celle-ci se termine " "par une nouvelle ligne, comme spécifié par la :rfc:`2045` (MIME)." -#: library/base64.rst:259 +#: library/base64.rst:282 msgid "An example usage of the module:" msgstr "Un exemple d'utilisation du module :" -#: library/base64.rst:273 +#: library/base64.rst:295 +msgid "Security Considerations" +msgstr "" + +#: library/base64.rst:297 +msgid "" +"A new security considerations section was added to :rfc:`4648` (section 12); " +"it's recommended to review the security section for any code deployed to " +"production." +msgstr "" + +#: library/base64.rst:303 msgid "Module :mod:`binascii`" msgstr "Module :mod:`binascii`" -#: library/base64.rst:273 +#: library/base64.rst:303 msgid "" "Support module containing ASCII-to-binary and binary-to-ASCII conversions." msgstr "" "Module secondaire contenant les conversions ASCII vers binaire et binaire " "vers ASCII." -#: library/base64.rst:276 +#: library/base64.rst:306 msgid "" ":rfc:`1521` - MIME (Multipurpose Internet Mail Extensions) Part One: " "Mechanisms for Specifying and Describing the Format of Internet Message " @@ -472,7 +513,7 @@ msgstr "" "Mechanisms for Specifying and Describing the Format of Internet Message " "Bodies*" -#: library/base64.rst:276 +#: library/base64.rst:306 msgid "" "Section 5.2, \"Base64 Content-Transfer-Encoding,\" provides the definition " "of the base64 encoding." diff --git a/library/binascii.po b/library/binascii.po index 49f38738d9..eb4f39d741 100644 --- a/library/binascii.po +++ b/library/binascii.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2020-05-10 13:40+0200\n" "Last-Translator: ZepmanBC \n" "Language-Team: FRENCH \n" @@ -19,14 +19,15 @@ msgstr "" msgid ":mod:`binascii` --- Convert between binary and ASCII" msgstr ":mod:`binascii` --- Conversion entre binaire et ASCII" -#: library/binascii.rst:15 +#: library/binascii.rst:14 +#, fuzzy msgid "" "The :mod:`binascii` module contains a number of methods to convert between " "binary and various ASCII-encoded binary representations. Normally, you will " -"not use these functions directly but use wrapper modules like :mod:`uu`, :" -"mod:`base64`, or :mod:`binhex` instead. The :mod:`binascii` module contains " -"low-level functions written in C for greater speed that are used by the " -"higher-level modules." +"not use these functions directly but use wrapper modules like :mod:`uu` or :" +"mod:`base64` instead. The :mod:`binascii` module contains low-level " +"functions written in C for greater speed that are used by the higher-level " +"modules." msgstr "" "Le module :mod:`binascii` contient des méthodes pour convertir entre binaire " "et diverses représentations binaires encodées en ASCII. Normalement, vous " @@ -35,7 +36,7 @@ msgstr "" "place. Le module :mod:`binascii` contient des fonctions bas-niveau écrites " "en C plus rapides qui sont utilisées par des modules haut-niveau." -#: library/binascii.rst:24 +#: library/binascii.rst:23 msgid "" "``a2b_*`` functions accept Unicode strings containing only ASCII characters. " "Other functions only accept :term:`bytes-like objects ` " @@ -47,17 +48,17 @@ msgstr "" "term:`bytes et similaire ` (tel que :class:`bytes`, :" "class:`bytearray` et autres objets qui supportent le protocole tampon)." -#: library/binascii.rst:29 +#: library/binascii.rst:28 msgid "ASCII-only unicode strings are now accepted by the ``a2b_*`` functions." msgstr "" "Les chaines de caractères *unicode* seulement composées de caractères ASCII " "sont désormais acceptées par les fonctions ``a2b_*``." -#: library/binascii.rst:33 +#: library/binascii.rst:32 msgid "The :mod:`binascii` module defines the following functions:" msgstr "Le module :mod:`binascii` définit les fonctions suivantes :" -#: library/binascii.rst:38 +#: library/binascii.rst:37 msgid "" "Convert a single line of uuencoded data back to binary and return the binary " "data. Lines normally contain 45 (binary) bytes, except for the last line. " @@ -68,7 +69,7 @@ msgstr "" "pour la dernière ligne. Il se peut que la ligne de donnée soit suivie d’un " "espace blanc." -#: library/binascii.rst:45 +#: library/binascii.rst:44 msgid "" "Convert binary data to a line of ASCII characters, the return value is the " "converted line, including a newline char. The length of *data* should be at " @@ -80,11 +81,11 @@ msgstr "" "longueur de *data* doit être au maximum de 45. Si *backtick* est vraie, les " "zéros sont représentés par ``'`'`` plutôt que par des espaces." -#: library/binascii.rst:49 +#: library/binascii.rst:48 msgid "Added the *backtick* parameter." msgstr "Ajout du paramètre *backtick*." -#: library/binascii.rst:55 +#: library/binascii.rst:54 msgid "" "Convert a block of base64 data back to binary and return the binary data. " "More than one line may be passed at a time." @@ -92,7 +93,40 @@ msgstr "" "Convertit un bloc de donnée en *base64* en binaire et renvoie la donnée " "binaire. Plus d’une ligne peut être passé à la fois." +#: library/binascii.rst:57 +msgid "" +"If *strict_mode* is true, only valid base64 data will be converted. Invalid " +"base64 data will raise :exc:`binascii.Error`." +msgstr "" + +#: library/binascii.rst:64 +msgid "Valid base64:" +msgstr "" + #: library/binascii.rst:61 +msgid "Conforms to :rfc:`3548`." +msgstr "" + +#: library/binascii.rst:62 +msgid "Contains only characters from the base64 alphabet." +msgstr "" + +#: library/binascii.rst:63 +msgid "" +"Contains no excess data after padding (including excess padding, newlines, " +"etc.)." +msgstr "" + +#: library/binascii.rst:64 +msgid "Does not start with a padding." +msgstr "" + +#: library/binascii.rst:66 +#, fuzzy +msgid "Added the *strict_mode* parameter." +msgstr "Ajout du paramètre *backtick*." + +#: library/binascii.rst:72 msgid "" "Convert binary data to a line of ASCII characters in base64 coding. The " "return value is the converted line, including a newline char if *newline* is " @@ -103,11 +137,11 @@ msgstr "" "de nouvelle ligne si *newline* est vraie. La sortie de cette fonction se " "conforme à :rfc:`3548`." -#: library/binascii.rst:65 +#: library/binascii.rst:76 msgid "Added the *newline* parameter." msgstr "Ajout du paramètre *newline*." -#: library/binascii.rst:71 +#: library/binascii.rst:82 msgid "" "Convert a block of quoted-printable data back to binary and return the " "binary data. More than one line may be passed at a time. If the optional " @@ -118,7 +152,7 @@ msgstr "" "optionnel *header* est présent et vrai, les traits soulignés seront décodés " "en espaces." -#: library/binascii.rst:78 +#: library/binascii.rst:89 msgid "" "Convert binary data to a line(s) of ASCII characters in quoted-printable " "encoding. The return value is the converted line(s). If the optional " @@ -141,54 +175,7 @@ msgstr "" "caractères de nouvelle ligne seront également encodés ; sinon la conversion " "de saut de ligne pourrait corrompre le flux de données binaire." -#: library/binascii.rst:91 -msgid "" -"Convert binhex4 formatted ASCII data to binary, without doing RLE-" -"decompression. The string should contain a complete number of binary bytes, " -"or (in case of the last portion of the binhex4 data) have the remaining bits " -"zero." -msgstr "" -"Convertit un bloc de donnée ASCII au format *binhex4* en binaire, sans faire " -"de décompression RLE. La chaîne de caractères doit contenir un nombre " -"complet d’octet binaires ou (au cas où la dernière portion de donnée est au " -"format *binhex4*) avoir les bits restants à 0." - -#: library/binascii.rst:100 -msgid "" -"Perform RLE-decompression on the data, as per the binhex4 standard. The " -"algorithm uses ``0x90`` after a byte as a repeat indicator, followed by a " -"count. A count of ``0`` specifies a byte value of ``0x90``. The routine " -"returns the decompressed data, unless data input data ends in an orphaned " -"repeat indicator, in which case the :exc:`Incomplete` exception is raised." -msgstr "" -"Réalise une décompression RLE sur la donnée, d’après la norme *binhex4*. " -"L’algorithme utilise ``0x90`` après un octet comme un indicateur de " -"répétition, suivi d’un décompte. Un décompte de ``0`` définit une valeur " -"d’octet de ``0x90``. La routine renvoie la donnée décompressée, sauf si la " -"donnée entrante se finit sur un indicateur de répétition orphelin. Dans ce " -"cas l’exception :exc:`Incomplete` est levée." - -#: library/binascii.rst:106 -msgid "Accept only bytestring or bytearray objects as input." -msgstr "Accepte seulement des objets *bytestring* ou *bytearray* en entrée." - -#: library/binascii.rst:114 -msgid "Perform binhex4 style RLE-compression on *data* and return the result." -msgstr "" -"Réalise une compression RLE de type *binhex4* sur *data* et renvoie le " -"résultat." - -#: library/binascii.rst:121 -msgid "" -"Perform hexbin4 binary-to-ASCII translation and return the resulting string. " -"The argument should already be RLE-coded, and have a length divisible by 3 " -"(except possibly the last fragment)." -msgstr "" -"Réalise une traduction *hexbin4* de binaire à ASCII et renvoie la chaîne de " -"caractères résultante. L’argument doit être *RLE-coded*, et avoir une " -"longueur divisible par 3 (sauf, éventuellement, le dernier fragment)." - -#: library/binascii.rst:130 +#: library/binascii.rst:102 msgid "" "Compute a 16-bit CRC value of *data*, starting with *value* as the initial " "CRC, and return the result. This uses the CRC-CCITT polynomial *x*:sup:`16` " @@ -200,13 +187,14 @@ msgstr "" "`16` + *x*:sup:`12` + *x*:sup:`5` + 1, souvent représenté comme *0x1021*. Ce " "CRC est utilisé dans le format *binhex4*." -#: library/binascii.rst:138 +#: library/binascii.rst:110 +#, fuzzy msgid "" -"Compute CRC-32, the 32-bit checksum of *data*, starting with an initial CRC " -"of *value*. The default initial CRC is zero. The algorithm is consistent " -"with the ZIP file checksum. Since the algorithm is designed for use as a " -"checksum algorithm, it is not suitable for use as a general hash algorithm. " -"Use as follows::" +"Compute CRC-32, the unsigned 32-bit checksum of *data*, starting with an " +"initial CRC of *value*. The default initial CRC is zero. The algorithm is " +"consistent with the ZIP file checksum. Since the algorithm is designed for " +"use as a checksum algorithm, it is not suitable for use as a general hash " +"algorithm. Use as follows::" msgstr "" "Calcule CRC-32, la somme de contrôle 32-bit de *data*, commençant par un CRC " "initial de *value*. Le CRC initial par défaut est zéro. L’algorithme est " @@ -214,16 +202,11 @@ msgstr "" "conçu pour être utilisé comme un algorithme de somme de contrôle, il ne " "convient pas comme algorithme de hachage général. Utiliser comme suit ::" -#: library/binascii.rst:150 -msgid "" -"The result is always unsigned. To generate the same numeric value across all " -"Python versions and platforms, use ``crc32(data) & 0xffffffff``." +#: library/binascii.rst:122 +msgid "The result is always unsigned." msgstr "" -"Le résultat est toujours non signé. Pour générer la même valeur numérique " -"sur toutes les versions de Python et plateformes, utilisez ``crc32(data) & " -"0xffffffff``." -#: library/binascii.rst:159 +#: library/binascii.rst:128 msgid "" "Return the hexadecimal representation of the binary *data*. Every byte of " "*data* is converted into the corresponding 2-digit hex representation. The " @@ -233,7 +216,7 @@ msgstr "" "*data* est converti en la représentation 2 chiffres correspondante. L’objet " "octets renvoyé est donc deux fois plus long que la longueur de *data*." -#: library/binascii.rst:163 +#: library/binascii.rst:132 msgid "" "Similar functionality (but returning a text string) is also conveniently " "accessible using the :meth:`bytes.hex` method." @@ -241,7 +224,7 @@ msgstr "" "Fonctionnalité similaire est également commodément accessible en utilisant " "la méthode :meth:`bytes.hex`." -#: library/binascii.rst:166 +#: library/binascii.rst:135 msgid "" "If *sep* is specified, it must be a single character str or bytes object. It " "will be inserted in the output after every *bytes_per_sep* input bytes. " @@ -254,11 +237,11 @@ msgstr "" "droite de la sortie. Si vous souhaitez compter à partir de la gauche, " "indiquez une valeur *bytes_per_sep* négative." -#: library/binascii.rst:181 +#: library/binascii.rst:150 msgid "The *sep* and *bytes_per_sep* parameters were added." msgstr "ajout des paramètres *sep* et *bytes_per_sep*." -#: library/binascii.rst:187 +#: library/binascii.rst:156 msgid "" "Return the binary data represented by the hexadecimal string *hexstr*. This " "function is the inverse of :func:`b2a_hex`. *hexstr* must contain an even " @@ -270,7 +253,7 @@ msgstr "" "*hexstr* doit contenir un nombre pair de chiffres hexadécimaux (qui peuvent " "être en majuscule ou minuscule), sinon une exception :exc:`Error` est levée." -#: library/binascii.rst:192 +#: library/binascii.rst:161 msgid "" "Similar functionality (accepting only text string arguments, but more " "liberal towards whitespace) is also accessible using the :meth:`bytes." @@ -280,13 +263,13 @@ msgstr "" "texte, mais plus libérale vis-à-vis des espaces blancs) est également " "accessible en utilisant la méthode de classe :meth:`bytes.fromhex`." -#: library/binascii.rst:198 +#: library/binascii.rst:167 msgid "Exception raised on errors. These are usually programming errors." msgstr "" "Exception levée en cas d'erreurs. Ce sont typiquement des erreurs de " "programmation." -#: library/binascii.rst:203 +#: library/binascii.rst:172 msgid "" "Exception raised on incomplete data. These are usually not programming " "errors, but may be handled by reading a little more data and trying again." @@ -295,38 +278,88 @@ msgstr "" "d’erreurs de programmation, mais elles peuvent être traitées en lisant un " "peu plus de données et en réessayant." -#: library/binascii.rst:211 +#: library/binascii.rst:180 msgid "Module :mod:`base64`" msgstr "Module :mod:`base64`" -#: library/binascii.rst:210 +#: library/binascii.rst:179 msgid "" "Support for RFC compliant base64-style encoding in base 16, 32, 64, and 85." msgstr "" "Support de l’encodage *base64-style* conforme RFC en base 16, 32, 64 et 85." -#: library/binascii.rst:214 -msgid "Module :mod:`binhex`" -msgstr "Module :mod:`binhex`" - -#: library/binascii.rst:214 -msgid "Support for the binhex format used on the Macintosh." -msgstr "Support pour le format *binhex* utilisé sur Macintosh." - -#: library/binascii.rst:217 +#: library/binascii.rst:183 msgid "Module :mod:`uu`" msgstr "Module :mod:`uu`" -#: library/binascii.rst:217 +#: library/binascii.rst:183 msgid "Support for UU encoding used on Unix." msgstr "Gestion de l'encodage UU utilisé sur Unix." -#: library/binascii.rst:219 +#: library/binascii.rst:185 msgid "Module :mod:`quopri`" msgstr "Module :mod:`quopri`" -#: library/binascii.rst:220 +#: library/binascii.rst:186 msgid "Support for quoted-printable encoding used in MIME email messages." msgstr "" "Support de l’encodage *quote-printable* utilisé par les messages *email* " "MIME." + +#, fuzzy +#~ msgid "" +#~ "The result is always unsigned. To generate the same numeric value when " +#~ "using Python 2 or earlier, use ``crc32(data) & 0xffffffff``." +#~ msgstr "" +#~ "Le résultat est toujours non signé. Pour générer la même valeur numérique " +#~ "sur toutes les versions de Python et plateformes, utilisez ``crc32(data) " +#~ "& 0xffffffff``." + +#~ msgid "" +#~ "Convert binhex4 formatted ASCII data to binary, without doing RLE-" +#~ "decompression. The string should contain a complete number of binary " +#~ "bytes, or (in case of the last portion of the binhex4 data) have the " +#~ "remaining bits zero." +#~ msgstr "" +#~ "Convertit un bloc de donnée ASCII au format *binhex4* en binaire, sans " +#~ "faire de décompression RLE. La chaîne de caractères doit contenir un " +#~ "nombre complet d’octet binaires ou (au cas où la dernière portion de " +#~ "donnée est au format *binhex4*) avoir les bits restants à 0." + +#~ msgid "" +#~ "Perform RLE-decompression on the data, as per the binhex4 standard. The " +#~ "algorithm uses ``0x90`` after a byte as a repeat indicator, followed by a " +#~ "count. A count of ``0`` specifies a byte value of ``0x90``. The routine " +#~ "returns the decompressed data, unless data input data ends in an orphaned " +#~ "repeat indicator, in which case the :exc:`Incomplete` exception is raised." +#~ msgstr "" +#~ "Réalise une décompression RLE sur la donnée, d’après la norme *binhex4*. " +#~ "L’algorithme utilise ``0x90`` après un octet comme un indicateur de " +#~ "répétition, suivi d’un décompte. Un décompte de ``0`` définit une valeur " +#~ "d’octet de ``0x90``. La routine renvoie la donnée décompressée, sauf si " +#~ "la donnée entrante se finit sur un indicateur de répétition orphelin. " +#~ "Dans ce cas l’exception :exc:`Incomplete` est levée." + +#~ msgid "Accept only bytestring or bytearray objects as input." +#~ msgstr "Accepte seulement des objets *bytestring* ou *bytearray* en entrée." + +#~ msgid "" +#~ "Perform binhex4 style RLE-compression on *data* and return the result." +#~ msgstr "" +#~ "Réalise une compression RLE de type *binhex4* sur *data* et renvoie le " +#~ "résultat." + +#~ msgid "" +#~ "Perform hexbin4 binary-to-ASCII translation and return the resulting " +#~ "string. The argument should already be RLE-coded, and have a length " +#~ "divisible by 3 (except possibly the last fragment)." +#~ msgstr "" +#~ "Réalise une traduction *hexbin4* de binaire à ASCII et renvoie la chaîne " +#~ "de caractères résultante. L’argument doit être *RLE-coded*, et avoir une " +#~ "longueur divisible par 3 (sauf, éventuellement, le dernier fragment)." + +#~ msgid "Module :mod:`binhex`" +#~ msgstr "Module :mod:`binhex`" + +#~ msgid "Support for the binhex format used on the Macintosh." +#~ msgstr "Support pour le format *binhex* utilisé sur Macintosh." diff --git a/library/binhex.po b/library/binhex.po deleted file mode 100644 index d1aa3d27de..0000000000 --- a/library/binhex.po +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright (C) 2001-2018, Python Software Foundation -# For licence information, see README file. -# -msgid "" -msgstr "" -"Project-Id-Version: Python 3\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2018-07-29 23:42+0200\n" -"Last-Translator: Julien Palard \n" -"Language-Team: FRENCH \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.11\n" - -#: library/binhex.rst:2 -msgid ":mod:`binhex` --- Encode and decode binhex4 files" -msgstr ":mod:`binhex` — Encode et décode les fichiers *binhex4*" - -#: library/binhex.rst:7 -msgid "**Source code:** :source:`Lib/binhex.py`" -msgstr "**Code source :** :source:`Lib/binhex.py`" - -#: library/binhex.rst:13 -msgid "" -"This module encodes and decodes files in binhex4 format, a format allowing " -"representation of Macintosh files in ASCII. Only the data fork is handled." -msgstr "" -"Ce module encode et décode les fichiers au format *binhex4*, un format " -"permettant la représentation de fichier Macintosh au format ASCII. Seulement " -"la fourchette de donnée est supportée." - -#: library/binhex.rst:16 -msgid "The :mod:`binhex` module defines the following functions:" -msgstr "Le module :mod:`binhex` définit les fonctions suivantes :" - -#: library/binhex.rst:21 -msgid "" -"Convert a binary file with filename *input* to binhex file *output*. The " -"*output* parameter can either be a filename or a file-like object (any " -"object supporting a :meth:`write` and :meth:`close` method)." -msgstr "" -"Convertit un fichier binaire avec comme nom *input* en fichier *binhex* " -"*output*. Le paramètre *output* peut être soit un nom de fichier, soit un " -"objet s’apparentant à un fichier (tout objet supportant les méthodes :meth:" -"`write` et :meth:`close`)." - -#: library/binhex.rst:28 -msgid "" -"Decode a binhex file *input*. *input* may be a filename or a file-like " -"object supporting :meth:`read` and :meth:`close` methods. The resulting file " -"is written to a file named *output*, unless the argument is ``None`` in " -"which case the output filename is read from the binhex file." -msgstr "" -"Décode un fichier *binhex* *input*. *input* peut être soit un nom de " -"fichier, soit un objet s’apparentant à un fichier supportant les méthodes :" -"meth:`write` et :meth:`close`. Le résultat est écrit dans un fichier nommé " -"*output*, sauf si l'argument est ``None``, dans ce cas le fichier de sortie " -"est lu depuis le fichier *binhex*." - -#: library/binhex.rst:33 -msgid "The following exception is also defined:" -msgstr "L'exception suivante est aussi définie :" - -#: library/binhex.rst:38 -msgid "" -"Exception raised when something can't be encoded using the binhex format " -"(for example, a filename is too long to fit in the filename field), or when " -"input is not properly encoded binhex data." -msgstr "" -"Exception levée quand quelque chose ne peut être encodé en utilisant le " -"format *binhex* (par exemple, un nom de fichier trop long pour rentrer dans " -"le champ *filename*) ou quand les données d'entrée ne sont pas encodées " -"correctement en *binhex*." - -#: library/binhex.rst:45 -msgid "Module :mod:`binascii`" -msgstr "Module :mod:`binascii`" - -#: library/binhex.rst:46 -msgid "" -"Support module containing ASCII-to-binary and binary-to-ASCII conversions." -msgstr "" -"Module secondaire contenant les conversions ASCII vers binaire et binaire " -"vers ASCII." - -#: library/binhex.rst:52 -msgid "Notes" -msgstr "Notes" - -#: library/binhex.rst:54 -msgid "" -"There is an alternative, more powerful interface to the coder and decoder, " -"see the source for details." -msgstr "" -"Il y a une alternative, une interface plus puissante pour le codeur et " -"décodeur, voir les sources pour les détails." - -#: library/binhex.rst:57 -msgid "" -"If you code or decode textfiles on non-Macintosh platforms they will still " -"use the old Macintosh newline convention (carriage-return as end of line)." -msgstr "" -"Si vous codez ou décodez sur des plateformes autres que Macintosh, elles " -"utiliseront l'ancienne convention Macintosh pour les retours à la ligne " -"(retour-chariot comme fin de ligne)." diff --git a/library/bisect.po b/library/bisect.po index 6592c4a1cb..2595bd04ef 100644 --- a/library/bisect.po +++ b/library/bisect.po @@ -5,14 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2018-07-29 01:03+0200\n" -"Last-Translator: Julien Palard \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2021-10-17 12:13+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0\n" #: library/bisect.rst:2 msgid ":mod:`bisect` --- Array bisection algorithm" @@ -42,7 +43,7 @@ msgstr "" #: library/bisect.rst:21 msgid "The following functions are provided:" -msgstr "Les fonctions suivantes sont fournies :" +msgstr "Les fonctions suivantes sont fournies :" #: library/bisect.rst:26 msgid "" @@ -63,14 +64,36 @@ msgstr "" #: library/bisect.rst:33 msgid "" "The returned insertion point *i* partitions the array *a* into two halves so " -"that ``all(val < x for val in a[lo:i])`` for the left side and ``all(val >= " -"x for val in a[i:hi])`` for the right side." +"that ``all(val < x for val in a[lo : i])`` for the left side and ``all(val " +">= x for val in a[i : hi])`` for the right side." msgstr "" "Le point d'insertion renvoyé, *i*, coupe la liste *a* en deux moitiés telles " -"que, pour la moitié de gauche : ``all(val < x for val in a[lo:i])``, et pour " -"la partie de droite : ``all(val >= x for val in a[i:hi])``." +"que, pour la moitié de gauche : ``all(val < x for val in a[lo : i])``, et " +"pour la partie de droite : ``all(val >= x for val in a[i : hi])``." -#: library/bisect.rst:40 +#: library/bisect.rst:58 +#, fuzzy +msgid "" +"*key* specifies a :term:`key function` of one argument that is used to " +"extract a comparison key from each element in the array. To support " +"searching complex records, the key function is not applied to the *x* value." +msgstr "" +"Le paramètre facultatif *key* est une :term:`fonction clé ` " +"prenant un argument. S'il est fourni, les comparaisons se font sur les " +"valeurs renvoyées par la fonction clé. Par défaut, les éléments sont " +"comparés directement." + +#: library/bisect.rst:62 +msgid "" +"If *key* is ``None``, the elements are compared directly with no intervening " +"function call." +msgstr "" + +#: library/bisect.rst:65 library/bisect.rst:103 +msgid "Added the *key* parameter." +msgstr "ajout du paramètre *key*." + +#: library/bisect.rst:51 msgid "" "Similar to :func:`bisect_left`, but returns an insertion point which comes " "after (to the right of) any existing entries of *x* in *a*." @@ -78,29 +101,46 @@ msgstr "" "Semblable à :func:`bisect_left`, mais renvoie un point d'insertion après (à " "droite) d'une potentielle entrée existante valant *x* dans *a*." -#: library/bisect.rst:43 +#: library/bisect.rst:54 msgid "" "The returned insertion point *i* partitions the array *a* into two halves so " -"that ``all(val <= x for val in a[lo:i])`` for the left side and ``all(val > " -"x for val in a[i:hi])`` for the right side." +"that ``all(val <= x for val in a[lo : i])`` for the left side and ``all(val " +"> x for val in a[i : hi])`` for the right side." msgstr "" "Le point d'insertion renvoyé, *i*, coupe la liste *a* en deux moitiés telles " -"que, pour la moitié de gauche : ``all(val <= x for val in a[lo:i])`` et pour " -"la moitié de droite : ``all(val > x for val in a[i:hi])``." +"que, pour la moitié de gauche : ``all(val <= x for val in a[lo : i])`` et " +"pour la moitié de droite : ``all(val > x for val in a[i : hi])``." -#: library/bisect.rst:49 +#: library/bisect.rst:71 +msgid "Insert *x* in *a* in sorted order." +msgstr "Insère *x* dans *a* en préservant l'ordre." + +#: library/bisect.rst:73 msgid "" -"Insert *x* in *a* in sorted order. This is equivalent to ``a.insert(bisect." -"bisect_left(a, x, lo, hi), x)`` assuming that *a* is already sorted. Keep " -"in mind that the O(log n) search is dominated by the slow O(n) insertion " -"step." +"This function first runs :func:`bisect_left` to locate an insertion point. " +"Next, it runs the :meth:`insert` method on *a* to insert *x* at the " +"appropriate position to maintain sort order." msgstr "" -"Insère *x* dans *a* en conservant le tri. C'est l'équivalent de ``a." -"insert(bisect.bisect_left(a, x, lo, hi), x)``, tant que *a* est déjà triée. " -"Gardez en tête que bien que la recherche ne coûte que O(log n), l'insertion " -"coûte O(n)." +"Cette fonction commence par appliquer :func:`bisect_left` pour déterminer la " +"position de l'insertion, puis appelle la méthode :meth:`insert` de *a* pour " +"ajouter *x* à l'endroit adéquat." -#: library/bisect.rst:57 +#: library/bisect.rst:97 +msgid "" +"To support inserting records in a table, the *key* function (if any) is " +"applied to *x* for the search step but not for the insertion step." +msgstr "" + +#: library/bisect.rst:100 +msgid "" +"Keep in mind that the ``O(log n)`` search is dominated by the slow O(n) " +"insertion step." +msgstr "" +"Gardez à l'esprit que la complexité logarithmique :math:`O(\\ln(n))` de la " +"recherche est dominée par la lenteur de l'insertion, de complexité linéaire :" +"math:`O(n)`." + +#: library/bisect.rst:90 msgid "" "Similar to :func:`insort_left`, but inserting *x* in *a* after any existing " "entries of *x*." @@ -108,13 +148,79 @@ msgstr "" "Similaire à :func:`insort_left`, mais en insérant *x* dans *a* après une " "potentielle entrée existante égale à *x*." -#: library/bisect.rst:62 +#: library/bisect.rst:93 msgid "" -"`SortedCollection recipe `_ that uses bisect to build a full-featured collection " -"class with straight-forward search methods and support for a key-function. " -"The keys are precomputed to save unnecessary calls to the key function " -"during searches." +"This function first runs :func:`bisect_right` to locate an insertion point. " +"Next, it runs the :meth:`insert` method on *a* to insert *x* at the " +"appropriate position to maintain sort order." +msgstr "" +"Le principe est le même que :func:`insort_left`, mais avec :func:" +"`bisect_right`." + +#: library/bisect.rst:108 +msgid "Performance Notes" +msgstr "Notes sur la performance" + +#: library/bisect.rst:110 +msgid "" +"When writing time sensitive code using *bisect()* and *insort()*, keep these " +"thoughts in mind:" +msgstr "" +"Pour écrire du code sensible à la performance utilisant ``bisect()`` et " +"``insort()``, prenez en compte ces quelques considérations :" + +#: library/bisect.rst:113 +msgid "" +"Bisection is effective for searching ranges of values. For locating specific " +"values, dictionaries are more performant." +msgstr "" +"La bissection est une bonne idée pour rechercher une plage de valeurs. Pour " +"une seule valeur, mieux vaut un dictionnaire." + +#: library/bisect.rst:116 +msgid "" +"The *insort()* functions are ``O(n)`` because the logarithmic search step is " +"dominated by the linear time insertion step." +msgstr "" +"Les fonctions d'insertion dans une liste classée ont une complexité linéaire " +"car c'est le coût d'une insertion, même si la recherche est logarithmique." + +#: library/bisect.rst:119 +msgid "" +"The search functions are stateless and discard key function results after " +"they are used. Consequently, if the search functions are used in a loop, " +"the key function may be called again and again on the same array elements. " +"If the key function isn't fast, consider wrapping it with :func:`functools." +"cache` to avoid duplicate computations. Alternatively, consider searching " +"an array of precomputed keys to locate the insertion point (as shown in the " +"examples section below)." +msgstr "" +"Les fonctions de recherche ne maintiennent pas d'état et ne conservent pas " +"le résultat de la fonction clé après utilisation. Par conséquent, si elles " +"sont appelées dans une boucle, la fonction clé peut être appelée de " +"nombreuses fois sur les mêmes entrées. Si cette fonction clé est lente, une " +"possibilité est de l'encapsuler dans :func:`functools.cache` pour éviter de " +"répéter les opérations. Une autre possibilité est d'effectuer la recherche " +"sur un tableau de clés pré-calculées pour trouver le point d'insertion (voir " +"les exemples plus bas)." + +#: library/bisect.rst:129 +msgid "" +"`Sorted Collections `_ is " +"a high performance module that uses *bisect* to managed sorted collections " +"of data." +msgstr "" +"`Sorted Collections `_ " +"est un module de haute performance qui fait appel à *bisect* pour maintenir " +"des données ordonnées." + +#: library/bisect.rst:133 +msgid "" +"The `SortedCollection recipe `_ uses bisect to build a full-featured collection class " +"with straight-forward search methods and support for a key-function. The " +"keys are precomputed to save unnecessary calls to the key function during " +"searches." msgstr "" "`SortedCollection recipe `_ utilise le module *bisect* pour construire une classe " @@ -122,11 +228,11 @@ msgstr "" "fonction clef. Les clefs sont pré-calculées pour économiser des appels " "inutiles à la fonction clef durant les recherches." -#: library/bisect.rst:70 +#: library/bisect.rst:141 msgid "Searching Sorted Lists" msgstr "Chercher dans des listes triées" -#: library/bisect.rst:72 +#: library/bisect.rst:143 msgid "" "The above :func:`bisect` functions are useful for finding insertion points " "but can be tricky or awkward to use for common searching tasks. The " @@ -138,11 +244,11 @@ msgstr "" "rechercher des éléments. Les cinq fonctions suivantes montrent comment les " "transformer en recherche plus classique pour les listes triées ::" -#: library/bisect.rst:114 -msgid "Other Examples" -msgstr "Autres Exemples" +#: library/bisect.rst:185 +msgid "Examples" +msgstr "Exemples" -#: library/bisect.rst:118 +#: library/bisect.rst:189 msgid "" "The :func:`bisect` function can be useful for numeric table lookups. This " "example uses :func:`bisect` to look up a letter grade for an exam score " @@ -151,27 +257,45 @@ msgid "" msgstr "" "La fonction :func:`bisect` peut être utile pour des recherches dans des " "tableaux de nombres. Cet exemple utilise :func:`bisect` pour rechercher la " -"note (sous forme de lettre) correspondant à un note sous forme de points, en " -"se basant sur une échelle prédéfinie : plus de 90 vaut 'A', de 80 à 89 vaut " -"'B', etc… ::" +"note (sous forme de lettre) correspondant à une note sous forme de points, " +"en se basant sur une échelle prédéfinie : plus de 90 vaut 'A', de 80 à 89 " +"vaut 'B', etc. ::" -#: library/bisect.rst:130 +#: library/bisect.rst:201 msgid "" -"Unlike the :func:`sorted` function, it does not make sense for the :func:" -"`bisect` functions to have *key* or *reversed* arguments because that would " -"lead to an inefficient design (successive calls to bisect functions would " -"not \"remember\" all of the previous key lookups)." +"The :func:`bisect` and :func:`insort` functions also work with lists of " +"tuples. The *key* argument can serve to extract the field used for ordering " +"records in a table::" msgstr "" -"Contrairement à la fonction :func:`sorted`, ça n'aurait pas de sens pour la " -"fonction :func:`bisect` d'avoir un paramètre *key* ou *reversed*, qui " -"conduiraient à une utilisation inefficace (des appels successifs à la " -"fonction *bisect* n'auraient aucun moyen de se \"souvenir\" des recherches " -"de clef précédentes)." -#: library/bisect.rst:135 +#: library/bisect.rst:235 +#, fuzzy msgid "" -"Instead, it is better to search a list of precomputed keys to find the index " -"of the record in question::" +"If the key function is expensive, it is possible to avoid repeated function " +"calls by searching a list of precomputed keys to find the index of a record::" msgstr "" -"Il est préférable d'utiliser une liste de clefs pré-calculée pour chercher " -"l'index de l'enregistrement en question ::" +"Une technique consiste à utiliser une liste de clefs pré-calculée pour " +"chercher l'indice de l'enregistrement en question ::" + +#~ msgid "" +#~ "Insert *x* in *a* in sorted order. This is equivalent to ``a." +#~ "insert(bisect.bisect_left(a, x, lo, hi), x)`` assuming that *a* is " +#~ "already sorted. Keep in mind that the O(log n) search is dominated by " +#~ "the slow O(n) insertion step." +#~ msgstr "" +#~ "Insère *x* dans *a* en conservant le tri. C'est l'équivalent de ``a." +#~ "insert(bisect.bisect_left(a, x, lo, hi), x)``, tant que *a* est déjà " +#~ "triée. Gardez en tête que bien que la recherche ne coûte que O(log n), " +#~ "l'insertion coûte O(n)." + +#~ msgid "" +#~ "Unlike the :func:`sorted` function, it does not make sense for the :func:" +#~ "`bisect` functions to have *key* or *reversed* arguments because that " +#~ "would lead to an inefficient design (successive calls to bisect functions " +#~ "would not \"remember\" all of the previous key lookups)." +#~ msgstr "" +#~ "Contrairement à la fonction :func:`sorted`, ça n'aurait pas de sens pour " +#~ "la fonction :func:`bisect` d'avoir un paramètre *key* ou *reversed*, qui " +#~ "conduiraient à une utilisation inefficace (des appels successifs à la " +#~ "fonction *bisect* n'auraient aucun moyen de se \"souvenir\" des " +#~ "recherches de clef précédentes)." diff --git a/library/bz2.po b/library/bz2.po index fc751c235e..00b4d07971 100644 --- a/library/bz2.po +++ b/library/bz2.po @@ -5,14 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" -"PO-Revision-Date: 2020-09-25 16:52-0600\n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 15:44+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.3\n" +"X-Generator: Poedit 3.0\n" #: library/bz2.rst:2 msgid ":mod:`bz2` --- Support for :program:`bzip2` compression" @@ -58,19 +59,11 @@ msgstr "" "Les fonctions :func:`compress` et :func:`decompress` pour la (dé)compression " "en une seule fois." -#: library/bz2.rst:28 -msgid "" -"All of the classes in this module may safely be accessed from multiple " -"threads." -msgstr "" -"Toutes les classes de ce module peuvent en toute sécurité être accédées " -"depuis de multiples fils d'exécution." - -#: library/bz2.rst:32 +#: library/bz2.rst:30 msgid "(De)compression of files" msgstr "(Dé)compression de fichiers" -#: library/bz2.rst:36 +#: library/bz2.rst:34 msgid "" "Open a bzip2-compressed file in binary or text mode, returning a :term:`file " "object`." @@ -78,7 +71,7 @@ msgstr "" "Ouvre un fichier compressé par *bzip2* en mode binaire ou texte, le " "renvoyant en :term:`file object`." -#: library/bz2.rst:39 +#: library/bz2.rst:37 msgid "" "As with the constructor for :class:`BZ2File`, the *filename* argument can be " "an actual filename (a :class:`str` or :class:`bytes` object), or an existing " @@ -88,7 +81,7 @@ msgstr "" "*filename* peut être un nom de fichier réel (un objet :class:`str` ou :class:" "`bytes`), ou un objet fichier existant à lire ou à écrire." -#: library/bz2.rst:43 +#: library/bz2.rst:41 msgid "" "The *mode* argument can be any of ``'r'``, ``'rb'``, ``'w'``, ``'wb'``, " "``'x'``, ``'xb'``, ``'a'`` or ``'ab'`` for binary mode, or ``'rt'``, " @@ -98,7 +91,7 @@ msgstr "" "``'xb'``, ``'a'`` ou ``'ab'`` pour le mode binaire, ou ``'rt'``, ``'wt'``, " "``'xt'`` ou ``'at'`` pour le mode texte. Il vaut par défaut ``'rb'``." -#: library/bz2.rst:47 +#: library/bz2.rst:45 msgid "" "The *compresslevel* argument is an integer from 1 to 9, as for the :class:" "`BZ2File` constructor." @@ -106,7 +99,7 @@ msgstr "" "L'argument *compresslevel* est un entier de 1 à 9, comme pour le " "constructeur :class:`BZ2File`." -#: library/bz2.rst:50 +#: library/bz2.rst:48 msgid "" "For binary mode, this function is equivalent to the :class:`BZ2File` " "constructor: ``BZ2File(filename, mode, compresslevel=compresslevel)``. In " @@ -118,7 +111,7 @@ msgstr "" "ce cas, les arguments *encoding*, *errors* et *newline* arguments ne doivent " "pas être fournis." -#: library/bz2.rst:55 +#: library/bz2.rst:53 msgid "" "For text mode, a :class:`BZ2File` object is created, and wrapped in an :" "class:`io.TextIOWrapper` instance with the specified encoding, error " @@ -128,19 +121,19 @@ msgstr "" "instance :class:`io.TextIOWrapper` avec l'encodage spécifié, le comportement " "de gestion des erreurs et les fins de ligne." -#: library/bz2.rst:126 +#: library/bz2.rst:124 msgid "The ``'x'`` (exclusive creation) mode was added." msgstr "Le mode ``'x'`` (création exclusive) est ajouté." -#: library/bz2.rst:133 +#: library/bz2.rst:131 msgid "Accepts a :term:`path-like object`." msgstr "Accepte un :term:`path-like object`." -#: library/bz2.rst:70 +#: library/bz2.rst:68 msgid "Open a bzip2-compressed file in binary mode." msgstr "Ouvre un fichier *bzip2* en mode binaire." -#: library/bz2.rst:72 +#: library/bz2.rst:70 msgid "" "If *filename* is a :class:`str` or :class:`bytes` object, open the named " "file directly. Otherwise, *filename* should be a :term:`file object`, which " @@ -150,7 +143,7 @@ msgstr "" "fichier directement. Autrement, *filename* doit être un :term:`file object`, " "qui est utilisé pour lire ou écrire les données compressées." -#: library/bz2.rst:76 +#: library/bz2.rst:74 msgid "" "The *mode* argument can be either ``'r'`` for reading (default), ``'w'`` for " "overwriting, ``'x'`` for exclusive creation, or ``'a'`` for appending. These " @@ -162,7 +155,7 @@ msgstr "" "peuvent également être écrits respectivement comme ``'rb'``, ``'wb'``, " "``'xb'`` et ``'ab'``." -#: library/bz2.rst:81 +#: library/bz2.rst:79 msgid "" "If *filename* is a file object (rather than an actual file name), a mode of " "``'w'`` does not truncate the file, and is instead equivalent to ``'a'``." @@ -170,7 +163,7 @@ msgstr "" "Si *filename* est un objet fichier (plutôt que le nom de fichier réel), le " "mode ``'w'`` ne tronque pas le fichier, mais équivaut à ``'a'``." -#: library/bz2.rst:84 +#: library/bz2.rst:82 msgid "" "If *mode* is ``'w'`` or ``'a'``, *compresslevel* can be an integer between " "``1`` and ``9`` specifying the level of compression: ``1`` produces the " @@ -181,7 +174,7 @@ msgstr "" "compression la moins forte, et ``9`` (par défaut) la compression la plus " "forte." -#: library/bz2.rst:88 +#: library/bz2.rst:86 msgid "" "If *mode* is ``'r'``, the input file may be the concatenation of multiple " "compressed streams." @@ -189,7 +182,7 @@ msgstr "" "Si *mode* est ``'r'``, le fichier d'entrée peut être la concaténation de " "plusieurs flux compressés." -#: library/bz2.rst:91 +#: library/bz2.rst:89 msgid "" ":class:`BZ2File` provides all of the members specified by the :class:`io." "BufferedIOBase`, except for :meth:`detach` and :meth:`truncate`. Iteration " @@ -199,11 +192,11 @@ msgstr "" "BufferedIOBase`, excepté les méthodes :meth:`detach` et :meth:`truncate`. " "L'itération et l'instruction :keyword:`with` sont prises en charge." -#: library/bz2.rst:95 +#: library/bz2.rst:93 msgid ":class:`BZ2File` also provides the following method:" msgstr ":class:`BZ2File` fournit aussi la méthode suivante :" -#: library/bz2.rst:99 +#: library/bz2.rst:97 msgid "" "Return buffered data without advancing the file position. At least one byte " "of data will be returned (unless at EOF). The exact number of bytes returned " @@ -213,7 +206,7 @@ msgstr "" "Au moins un octet de donnée (sauf l'EOF) est renvoyé. Le nombre exact " "d'octets renvoyés n'est pas spécifié." -#: library/bz2.rst:103 +#: library/bz2.rst:101 msgid "" "While calling :meth:`peek` does not change the file position of the :class:" "`BZ2File`, it may change the position of the underlying file object (e.g. if " @@ -225,11 +218,11 @@ msgstr "" "l'objet fichier sous-jacent (e.g. si la classe :class:`BZ2File` a été " "construite en passant un objet fichier à *filename*)." -#: library/bz2.rst:111 +#: library/bz2.rst:109 msgid "Support for the :keyword:`with` statement was added." msgstr "La prise en charge de l'instruction :keyword:`with` a été ajoutée." -#: library/bz2.rst:114 +#: library/bz2.rst:112 msgid "" "The :meth:`fileno`, :meth:`readable`, :meth:`seekable`, :meth:`writable`, :" "meth:`read1` and :meth:`readinto` methods were added." @@ -237,7 +230,7 @@ msgstr "" "Les méthodes :meth:`fileno`, :meth:`readable`, :meth:`seekable`, :meth:" "`writable`, :meth:`read1` et :meth:`readinto` ont été ajoutées." -#: library/bz2.rst:118 +#: library/bz2.rst:116 msgid "" "Support was added for *filename* being a :term:`file object` instead of an " "actual filename." @@ -245,7 +238,7 @@ msgstr "" "La gestion de *filename* comme :term:`file object` au lieu d'un nom de " "fichier réel a été ajoutée." -#: library/bz2.rst:122 +#: library/bz2.rst:120 msgid "" "The ``'a'`` (append) mode was added, along with support for reading multi-" "stream files." @@ -253,7 +246,7 @@ msgstr "" "Le mode ``'a'`` (ajout) a été ajouté, avec la prise en charge de la lecture " "des fichiers *multiflux*." -#: library/bz2.rst:129 +#: library/bz2.rst:127 msgid "" "The :meth:`~io.BufferedIOBase.read` method now accepts an argument of " "``None``." @@ -261,7 +254,7 @@ msgstr "" "La méthode :meth:`~io.BufferedIOBase.read` accepte maintenant un argument " "``None``." -#: library/bz2.rst:136 +#: library/bz2.rst:134 msgid "" "The *buffering* parameter has been removed. It was ignored and deprecated " "since Python 3.0. Pass an open file object to control how the file is opened." @@ -270,16 +263,26 @@ msgstr "" "Python 3.0. Passez un objet fichier déjà ouvert si vous voulez contrôler la " "façon dont le fichier est ouvert." -#: library/bz2.rst:141 +#: library/bz2.rst:139 msgid "The *compresslevel* parameter became keyword-only." msgstr "" "Le paramètre *compresslevel* est devenu un paramètre exclusivement nommé." -#: library/bz2.rst:145 +#: library/bz2.rst:141 +msgid "" +"This class is thread unsafe in the face of multiple simultaneous readers or " +"writers, just like its equivalent classes in :mod:`gzip` and :mod:`lzma` " +"have always been." +msgstr "" +"Cette classe n'est plus protégée d'un accès concurrent malheureux par " +"plusieurs lecteurs ou compresseurs. C'était déjà le cas depuis toujours des " +"classes analogues dans les modules :mod:`gzip` et :mod:`lzma`." + +#: library/bz2.rst:148 msgid "Incremental (de)compression" msgstr "(Dé)compression incrémentielle" -#: library/bz2.rst:149 +#: library/bz2.rst:152 msgid "" "Create a new compressor object. This object may be used to compress data " "incrementally. For one-shot compression, use the :func:`compress` function " @@ -289,7 +292,7 @@ msgstr "" "compresser les données de manière incrémentielle. Pour une compression en " "une seule fois, utilisez à la place la fonction :func:`compress`." -#: library/bz2.rst:241 +#: library/bz2.rst:244 msgid "" "*compresslevel*, if given, must be an integer between ``1`` and ``9``. The " "default is ``9``." @@ -297,7 +300,7 @@ msgstr "" "*compresslevel*, s'il est fourni, doit être un entier entre ``1`` et ``9``. " "Sa valeur par défaut est ``9``." -#: library/bz2.rst:158 +#: library/bz2.rst:161 msgid "" "Provide data to the compressor object. Returns a chunk of compressed data if " "possible, or an empty byte string otherwise." @@ -305,7 +308,7 @@ msgstr "" "Fournit la donnée à l'objet compresseur. Renvoie un bloc de données " "compressées si possible, ou autrement une chaîne d'octet vide." -#: library/bz2.rst:161 +#: library/bz2.rst:164 msgid "" "When you have finished providing data to the compressor, call the :meth:" "`flush` method to finish the compression process." @@ -313,7 +316,7 @@ msgstr "" "Quand vous avez fini de fournir des données au compresseur, appelez la " "méthode :meth:`flush` pour finir le processus de compression." -#: library/bz2.rst:167 +#: library/bz2.rst:170 msgid "" "Finish the compression process. Returns the compressed data left in internal " "buffers." @@ -321,14 +324,14 @@ msgstr "" "Finit le processus de compression. Renvoie la donnée compressée restante " "dans les tampons internes." -#: library/bz2.rst:170 +#: library/bz2.rst:173 msgid "" "The compressor object may not be used after this method has been called." msgstr "" "L'objet compresseur ne peut pas être utilisé après que cette méthode a été " "appelée." -#: library/bz2.rst:175 +#: library/bz2.rst:178 msgid "" "Create a new decompressor object. This object may be used to decompress data " "incrementally. For one-shot compression, use the :func:`decompress` function " @@ -338,7 +341,7 @@ msgstr "" "décompresser les données de manière incrémentielle. Pour une compression en " "une seule fois, utilisez à la place la fonction :func:`decompress`." -#: library/bz2.rst:180 +#: library/bz2.rst:183 msgid "" "This class does not transparently handle inputs containing multiple " "compressed streams, unlike :func:`decompress` and :class:`BZ2File`. If you " @@ -351,7 +354,7 @@ msgstr "" "la classe :class:`BZ2Decompressor`, vous devez utiliser un nouveau " "décompresseur pour chaque flux." -#: library/bz2.rst:187 +#: library/bz2.rst:190 msgid "" "Decompress *data* (a :term:`bytes-like object`), returning uncompressed data " "as bytes. Some of *data* may be buffered internally, for use in later calls " @@ -364,7 +367,7 @@ msgstr "" "méthode :meth:`decompress`. La donnée renvoyée doit être concaténée avec la " "sortie des appels précédents à la méthode :meth:`decompress`." -#: library/bz2.rst:193 +#: library/bz2.rst:196 msgid "" "If *max_length* is nonnegative, returns at most *max_length* bytes of " "decompressed data. If this limit is reached and further output can be " @@ -378,7 +381,7 @@ msgstr "" "Dans ce cas, lors de l'appel suivant à la méthode :meth:`~.decompress`, vous " "pouvez fournir ``b''`` dans *data* afin d'obtenir la suite de la sortie." -#: library/bz2.rst:200 +#: library/bz2.rst:203 msgid "" "If all of the input data was decompressed and returned (either because this " "was less than *max_length* bytes, or because *max_length* was negative), " @@ -388,7 +391,7 @@ msgstr "" "qu'il y avait moins de *max_length* octets, ou parce que *max_length* était " "négatif), l'attribut :attr:`~.needs_input` sera configuré sur ``True``." -#: library/bz2.rst:205 +#: library/bz2.rst:208 msgid "" "Attempting to decompress data after the end of stream is reached raises an " "`EOFError`. Any data found after the end of the stream is ignored and saved " @@ -398,19 +401,19 @@ msgstr "" "lève une erreur ``EOFError``. Toute donnée trouvée après la fin du flux est " "ignorée et sauvegardée dans l'attribut :attr:`~.unused_data`." -#: library/bz2.rst:209 +#: library/bz2.rst:212 msgid "Added the *max_length* parameter." msgstr "Ajout du paramètre *max_length*." -#: library/bz2.rst:214 +#: library/bz2.rst:217 msgid "``True`` if the end-of-stream marker has been reached." msgstr "``True`` si le marqueur de fin de flux a été atteint." -#: library/bz2.rst:221 +#: library/bz2.rst:224 msgid "Data found after the end of the compressed stream." msgstr "Donnée trouvée après la fin du flux compressé." -#: library/bz2.rst:223 +#: library/bz2.rst:226 msgid "" "If this attribute is accessed before the end of the stream has been reached, " "its value will be ``b''``." @@ -418,7 +421,7 @@ msgstr "" "Si l'attribut est accédé avant que la fin du flux ait été atteint, sa valeur " "sera ``b''``." -#: library/bz2.rst:228 +#: library/bz2.rst:231 msgid "" "``False`` if the :meth:`.decompress` method can provide more decompressed " "data before requiring new uncompressed input." @@ -426,25 +429,25 @@ msgstr "" "``False`` si la méthode :meth:`.decompress` peut fournir plus de données " "décompressées avant l'acquisition d'une nouvelle entrée non compressée." -#: library/bz2.rst:235 +#: library/bz2.rst:238 msgid "One-shot (de)compression" msgstr "(Dé)compression en une fois" -#: library/bz2.rst:239 +#: library/bz2.rst:242 msgid "Compress *data*, a :term:`bytes-like object `." msgstr "Compresse *data*, un :term:`bytes-like object `." -#: library/bz2.rst:244 +#: library/bz2.rst:247 msgid "For incremental compression, use a :class:`BZ2Compressor` instead." msgstr "" "Pour la compression incrémentielle, utilisez à la place la classe :class:" "`BZ2Compressor`." -#: library/bz2.rst:249 +#: library/bz2.rst:252 msgid "Decompress *data*, a :term:`bytes-like object `." msgstr "Décompresse *data*, un :term:`bytes-like object `." -#: library/bz2.rst:251 +#: library/bz2.rst:254 msgid "" "If *data* is the concatenation of multiple compressed streams, decompress " "all of the streams." @@ -452,27 +455,27 @@ msgstr "" "Si *data* est la concaténation de multiples flux compressés, décompresse " "tous les flux." -#: library/bz2.rst:254 +#: library/bz2.rst:257 msgid "For incremental decompression, use a :class:`BZ2Decompressor` instead." msgstr "" "Pour une décompression incrémentielle, utilisez à la place la classe :class:" "`BZ2Decompressor`." -#: library/bz2.rst:256 +#: library/bz2.rst:259 msgid "Support for multi-stream inputs was added." msgstr "Prise en charge des entrées *multiflux*." -#: library/bz2.rst:262 +#: library/bz2.rst:265 msgid "Examples of usage" msgstr "Exemples d'utilisation" -#: library/bz2.rst:264 +#: library/bz2.rst:267 msgid "Below are some examples of typical usage of the :mod:`bz2` module." msgstr "" "Ci-dessous, nous présentons quelques exemples typiques de l'utilisation du " "module :mod:`bz2`." -#: library/bz2.rst:266 +#: library/bz2.rst:269 msgid "" "Using :func:`compress` and :func:`decompress` to demonstrate round-trip " "compression:" @@ -480,28 +483,35 @@ msgstr "" "Utilise les fonctions :func:`compress` et :func:`decompress` pour démontrer " "une compression aller-retour :" -#: library/bz2.rst:284 +#: library/bz2.rst:287 msgid "Using :class:`BZ2Compressor` for incremental compression:" msgstr "" "Utilise la classe :class:`BZ2Compressor` pour une compression " "incrémentielle :" -#: library/bz2.rst:302 +#: library/bz2.rst:305 msgid "" -"The example above uses a very \"nonrandom\" stream of data (a stream of `b\"z" -"\"` chunks). Random data tends to compress poorly, while ordered, " +"The example above uses a very \"nonrandom\" stream of data (a stream of " +"`b\"z\"` chunks). Random data tends to compress poorly, while ordered, " "repetitive data usually yields a high compression ratio." msgstr "" "L'exemple ci-dessus utilise un flux de données vraiment pas aléatoire (un " -"flux de blocs de `b\"z\"`). Les données aléatoires ont tendance à mal se " +"flux de blocs de ``b\"z\"``). Les données aléatoires ont tendance à mal se " "compresser, alors que les données répétitives ou ordonnées donnent " "généralement un taux de compression élevé." -#: library/bz2.rst:306 +#: library/bz2.rst:309 msgid "Writing and reading a bzip2-compressed file in binary mode:" msgstr "" "Écriture et lecture en mode binaire d'un fichier compressé avec *bzip2* :" +#~ msgid "" +#~ "All of the classes in this module may safely be accessed from multiple " +#~ "threads." +#~ msgstr "" +#~ "Toutes les classes de ce module peuvent en toute sécurité être accédées " +#~ "depuis de multiples fils d'exécution." + #~ msgid "" #~ "The *buffering* argument is ignored. Its use is deprecated since Python " #~ "3.0." diff --git a/library/calendar.po b/library/calendar.po index 5a9cb88bd8..0740b998a5 100644 --- a/library/calendar.po +++ b/library/calendar.po @@ -5,10 +5,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2021-03-20 19:35+0100\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2022-10-18 15:58+0200\n" "Last-Translator: Loc Cosnier \n" -"Language-Team: French \n" +"Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -58,13 +58,15 @@ msgstr "" "proleptique dans le livre de Dershowitz et Reingold « *Calendrical " "Calculations* », œuvre dans lequel il est le calendrier de référence de tous " "les calculs. Les années zéros et les années négatives sont interprétées " -"comme prescrit par la norme ISO 8601. L'année 0 est 1 avant JC, l'année `-1` " -"est 2 avant JC et ainsi de suite." +"comme prescrit par la norme ISO 8601. L'année 0 est 1 avant JC, l'année " +"``-1`` est 2 avant JC et ainsi de suite." #: library/calendar.rst:33 +#, fuzzy msgid "" "Creates a :class:`Calendar` object. *firstweekday* is an integer specifying " -"the first day of the week. ``0`` is Monday (the default), ``6`` is Sunday." +"the first day of the week. :const:`MONDAY` is ``0`` (the default), :const:" +"`SUNDAY` is ``6``." msgstr "" "Crée un objet :class:`Calendar`. *firstweekday* est un entier spécifiant le " "premier jour de la semaine, valant par défaut ``0`` (lundi), pouvant aller " @@ -391,11 +393,10 @@ msgstr "" "Voici un exemple de comment peut être personnalisée :class:`!HTMLCalendar` ::" #: library/calendar.rst:280 +#, fuzzy msgid "" "This subclass of :class:`TextCalendar` can be passed a locale name in the " -"constructor and will return month and weekday names in the specified locale. " -"If this locale includes an encoding all strings containing month and weekday " -"names will be returned as unicode." +"constructor and will return month and weekday names in the specified locale." msgstr "" "Le constructeur de cette sous-classe de :class:`TextCalendar` accepte un " "paramètre régional *locale* : une langue au format ``\"fr_FR.UTF-8\"``, et " @@ -403,12 +404,11 @@ msgstr "" "langue. Si ce lieu possède un encodage, toutes les chaînes contenant des " "noms de mois ou de jours de la semaine seront renvoyées en Unicode." -#: library/calendar.rst:288 +#: library/calendar.rst:286 +#, fuzzy msgid "" "This subclass of :class:`HTMLCalendar` can be passed a locale name in the " -"constructor and will return month and weekday names in the specified locale. " -"If this locale includes an encoding all strings containing month and weekday " -"names will be returned as unicode." +"constructor and will return month and weekday names in the specified locale." msgstr "" "Cette sous-classe de :class:`HTMLCalendar` peut recevoir un nom de lieu dans " "le constructeur et renvoie les noms de mois et de jours de la semaine selon " @@ -416,12 +416,13 @@ msgstr "" "contenant des noms de mois ou de jours de la semaine seront renvoyées en " "Unicode." -#: library/calendar.rst:295 +#: library/calendar.rst:292 +#, fuzzy msgid "" -"The :meth:`formatweekday` and :meth:`formatmonthname` methods of these two " -"classes temporarily change the current locale to the given *locale*. " -"Because the current locale is a process-wide setting, they are not thread-" -"safe." +"The constructor, :meth:`formatweekday` and :meth:`formatmonthname` methods " +"of these two classes temporarily change the ``LC_TIME`` locale to the given " +"*locale*. Because the current locale is a process-wide setting, they are not " +"thread-safe." msgstr "" "Les méthodes :meth:`formatweekday` et :meth:`formatmonthname` de ces deux " "classes changent temporairement le paramètre régional courant pour le " @@ -429,12 +430,12 @@ msgstr "" "l'ensemble du processus, elles ne sont pas utilisables de manière sûre avec " "les programmes à fils d'exécution multiples." -#: library/calendar.rst:300 +#: library/calendar.rst:298 msgid "For simple text calendars this module provides the following functions." msgstr "" "Pour les calendriers texte simples ce module fournit les fonctions suivantes." -#: library/calendar.rst:304 +#: library/calendar.rst:302 msgid "" "Sets the weekday (``0`` is Monday, ``6`` is Sunday) to start each week. The " "values :const:`MONDAY`, :const:`TUESDAY`, :const:`WEDNESDAY`, :const:" @@ -447,20 +448,20 @@ msgstr "" "const:`SUNDAY` sont fournies par commodité. Par exemple, pour fixer le " "premier jour de la semaine à dimanche ::" -#: library/calendar.rst:315 +#: library/calendar.rst:313 msgid "Returns the current setting for the weekday to start each week." msgstr "" "Renvoie le réglage courant pour le jour de la semaine débutant chaque " "semaine." -#: library/calendar.rst:320 +#: library/calendar.rst:318 msgid "" "Returns :const:`True` if *year* is a leap year, otherwise :const:`False`." msgstr "" "Renvoie :const:`True` si *year* est une année bissextile, sinon :const:" "`False`." -#: library/calendar.rst:325 +#: library/calendar.rst:323 msgid "" "Returns the number of leap years in the range from *y1* to *y2* (exclusive), " "where *y1* and *y2* are years." @@ -468,12 +469,12 @@ msgstr "" "Renvoie le nombre d'années bissextiles dans la période de *y1* à *y2* (non " "inclus), où *y1* et *y2* sont des années." -#: library/calendar.rst:328 +#: library/calendar.rst:326 msgid "This function works for ranges spanning a century change." msgstr "" "Cette fonction marche pour les périodes couvrant un changement de siècle." -#: library/calendar.rst:333 +#: library/calendar.rst:331 msgid "" "Returns the day of the week (``0`` is Monday) for *year* (``1970``--...), " "*month* (``1``--``12``), *day* (``1``--``31``)." @@ -481,7 +482,7 @@ msgstr "" "Renvoie le jour de la semaine (``0`` pour lundi) pour *year* (``1970``-- …), " "*month* (``1``--``12``), *day* (``1``--``31``)." -#: library/calendar.rst:339 +#: library/calendar.rst:337 msgid "" "Return a header containing abbreviated weekday names. *n* specifies the " "width in characters for one weekday." @@ -489,7 +490,7 @@ msgstr "" "Renvoie un en-tête contenant les jours de la semaine en abrégé. *n* spécifie " "la largeur en caractères pour un jour de la semaine." -#: library/calendar.rst:345 +#: library/calendar.rst:343 msgid "" "Returns weekday of first day of the month and number of days in month, for " "the specified *year* and *month*." @@ -498,7 +499,7 @@ msgstr "" "nombre de jours dans le mois, pour l'année *year* et le mois *month* " "spécifiés." -#: library/calendar.rst:351 +#: library/calendar.rst:349 msgid "" "Returns a matrix representing a month's calendar. Each row represents a " "week; days outside of the month are represented by zeros. Each week begins " @@ -509,11 +510,11 @@ msgstr "" "des zéros. Chaque semaine débute avec le lundi à moins de l'avoir modifié " "avec :func:`setfirstweekday`." -#: library/calendar.rst:358 +#: library/calendar.rst:356 msgid "Prints a month's calendar as returned by :func:`month`." msgstr "Affiche le calendrier d'un mois tel que renvoyé par :func:`month`." -#: library/calendar.rst:363 +#: library/calendar.rst:361 msgid "" "Returns a month's calendar in a multi-line string using the :meth:" "`formatmonth` of the :class:`TextCalendar` class." @@ -521,14 +522,14 @@ msgstr "" "Renvoie le calendrier d'un mois dans une chaîne multi-lignes en utilisant la " "méthode :meth:`formatmonth` de la classe :class:`TextCalendar`." -#: library/calendar.rst:369 +#: library/calendar.rst:367 msgid "" "Prints the calendar for an entire year as returned by :func:`calendar`." msgstr "" "Affiche le calendrier pour une année entière tel que renvoyé par :func:" "`calendar`." -#: library/calendar.rst:374 +#: library/calendar.rst:372 msgid "" "Returns a 3-column calendar for an entire year as a multi-line string using " "the :meth:`formatyear` of the :class:`TextCalendar` class." @@ -537,7 +538,7 @@ msgstr "" "multi-lignes en utilisant la méthode :meth:`formatyear` de la classe :class:" "`TextCalendar`." -#: library/calendar.rst:380 +#: library/calendar.rst:378 msgid "" "An unrelated but handy function that takes a time tuple such as returned by " "the :func:`~time.gmtime` function in the :mod:`time` module, and returns the " @@ -551,17 +552,17 @@ msgstr "" "correspondante, en supposant une époque de 1970, et l'encodage POSIX. En " "fait, :func:`time.gmtime` et :func:`timegm` sont l'inverse l'un de l'autre." -#: library/calendar.rst:387 +#: library/calendar.rst:385 msgid "The :mod:`calendar` module exports the following data attributes:" msgstr "Le module :mod:`calendar` exporte les attributs suivants :" -#: library/calendar.rst:391 +#: library/calendar.rst:389 msgid "An array that represents the days of the week in the current locale." msgstr "" "Un tableau qui représente les jours de la semaine pour les paramètres " "régionaux actifs." -#: library/calendar.rst:396 +#: library/calendar.rst:394 msgid "" "An array that represents the abbreviated days of the week in the current " "locale." @@ -569,7 +570,7 @@ msgstr "" "Un tableau qui représente les jours de la semaine en abrégé pour les " "paramètres régionaux actifs." -#: library/calendar.rst:401 +#: library/calendar.rst:399 msgid "" "An array that represents the months of the year in the current locale. This " "follows normal convention of January being month number 1, so it has a " @@ -580,7 +581,7 @@ msgstr "" "numéro 1, donc il a une longueur de 13 et ``month_name[0]`` est la chaîne " "vide." -#: library/calendar.rst:408 +#: library/calendar.rst:406 msgid "" "An array that represents the abbreviated months of the year in the current " "locale. This follows normal convention of January being month number 1, so " @@ -591,11 +592,16 @@ msgstr "" "le mois numéro 1, donc il a une longueur de 13 et ``month_name[0]`` est la " "chaîne vide." -#: library/calendar.rst:417 +#: library/calendar.rst:418 +msgid "" +"Aliases for day numbers, where ``MONDAY`` is ``0`` and ``SUNDAY`` is ``6``." +msgstr "" + +#: library/calendar.rst:424 msgid "Module :mod:`datetime`" msgstr "Module :mod:`datetime`" -#: library/calendar.rst:416 +#: library/calendar.rst:423 msgid "" "Object-oriented interface to dates and times with similar functionality to " "the :mod:`time` module." @@ -603,10 +609,10 @@ msgstr "" "Interface orientée objet pour les dates et les heures avec des " "fonctionnalités similaires au module :mod:`time`." -#: library/calendar.rst:419 +#: library/calendar.rst:426 msgid "Module :mod:`time`" msgstr "Module :mod:`time`" -#: library/calendar.rst:420 +#: library/calendar.rst:427 msgid "Low-level time related functions." msgstr "Fonctions bas niveau relatives au temps." diff --git a/library/cgi.po b/library/cgi.po index ac84ad376a..54f053fa58 100644 --- a/library/cgi.po +++ b/library/cgi.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,31 +18,45 @@ msgstr "" msgid ":mod:`cgi` --- Common Gateway Interface support" msgstr "" -#: library/cgi.rst:7 +#: library/cgi.rst:8 msgid "**Source code:** :source:`Lib/cgi.py`" msgstr "**Code source :** :source:`Lib/cgi.py`" -#: library/cgi.rst:19 +#: library/cgi.rst:21 +msgid "" +"The :mod:`cgi` module is deprecated (see :pep:`PEP 594 <594#cgi>` for " +"details and alternatives)." +msgstr "" + +#: library/cgi.rst:24 msgid "Support module for Common Gateway Interface (CGI) scripts." msgstr "" -#: library/cgi.rst:21 +#: library/cgi.rst:26 msgid "" "This module defines a number of utilities for use by CGI scripts written in " "Python." msgstr "" -#: library/cgi.rst:26 +#: library/cgi.rst:29 +msgid "" +"The global variable ``maxlen`` can be set to an integer indicating the " +"maximum size of a POST request. POST requests larger than this size will " +"result in a :exc:`ValueError` being raised during parsing. The default value " +"of this variable is ``0``, meaning the request size is unlimited." +msgstr "" + +#: library/cgi.rst:36 msgid "Introduction" msgstr "Introduction" -#: library/cgi.rst:30 +#: library/cgi.rst:40 msgid "" "A CGI script is invoked by an HTTP server, usually to process user input " "submitted through an HTML ``
`` or ```` element." msgstr "" -#: library/cgi.rst:33 +#: library/cgi.rst:43 msgid "" "Most often, CGI scripts live in the server's special :file:`cgi-bin` " "directory. The HTTP server places all sorts of information about the request " @@ -51,7 +65,7 @@ msgid "" "script, and sends the script's output back to the client." msgstr "" -#: library/cgi.rst:39 +#: library/cgi.rst:49 msgid "" "The script's input is connected to the client too, and sometimes the form " "data is read this way; at other times the form data is passed via the " @@ -62,7 +76,7 @@ msgid "" "supports it)." msgstr "" -#: library/cgi.rst:46 +#: library/cgi.rst:56 msgid "" "The output of a CGI script should consist of two sections, separated by a " "blank line. The first section contains a number of headers, telling the " @@ -70,34 +84,34 @@ msgid "" "header section looks like this::" msgstr "" -#: library/cgi.rst:54 +#: library/cgi.rst:64 msgid "" "The second section is usually HTML, which allows the client software to " "display nicely formatted text with header, in-line images, etc. Here's " "Python code that prints a simple piece of HTML::" msgstr "" -#: library/cgi.rst:66 +#: library/cgi.rst:76 msgid "Using the cgi module" msgstr "" -#: library/cgi.rst:68 +#: library/cgi.rst:78 msgid "Begin by writing ``import cgi``." msgstr "" -#: library/cgi.rst:70 +#: library/cgi.rst:80 msgid "When you write a new script, consider adding these lines::" msgstr "" -#: library/cgi.rst:75 +#: library/cgi.rst:85 msgid "" "This activates a special exception handler that will display detailed " -"reports in the Web browser if any errors occur. If you'd rather not show " +"reports in the web browser if any errors occur. If you'd rather not show " "the guts of your program to users of your script, you can have the reports " "saved to files instead, with code like this::" msgstr "" -#: library/cgi.rst:83 +#: library/cgi.rst:93 msgid "" "It's very helpful to use this feature during script development. The reports " "produced by :mod:`cgitb` provide information that can save you a lot of time " @@ -105,19 +119,19 @@ msgid "" "you have tested your script and are confident that it works correctly." msgstr "" -#: library/cgi.rst:88 +#: library/cgi.rst:98 msgid "" "To get at submitted form data, use the :class:`FieldStorage` class. If the " "form contains non-ASCII characters, use the *encoding* keyword parameter set " "to the value of the encoding defined for the document. It is usually " "contained in the META tag in the HEAD section of the HTML document or by " -"the :mailheader:`Content-Type` header). This reads the form contents from " +"the :mailheader:`Content-Type` header. This reads the form contents from " "the standard input or the environment (depending on the value of various " "environment variables set according to the CGI standard). Since it may " "consume standard input, it should be instantiated only once." msgstr "" -#: library/cgi.rst:97 +#: library/cgi.rst:107 msgid "" "The :class:`FieldStorage` instance can be indexed like a Python dictionary. " "It allows membership testing with the :keyword:`in` operator, and also " @@ -128,14 +142,14 @@ msgid "" "class:`FieldStorage` instance." msgstr "" -#: library/cgi.rst:105 +#: library/cgi.rst:115 msgid "" "For instance, the following code (which assumes that the :mailheader:" "`Content-Type` header and blank line have already been printed) checks that " "the fields ``name`` and ``addr`` are both set to a non-empty string::" msgstr "" -#: library/cgi.rst:119 +#: library/cgi.rst:129 msgid "" "Here the fields, accessed through ``form[key]``, are themselves instances " "of :class:`FieldStorage` (or :class:`MiniFieldStorage`, depending on the " @@ -145,7 +159,7 @@ msgid "" "second argument as a default to return if the requested key is not present." msgstr "" -#: library/cgi.rst:126 +#: library/cgi.rst:136 msgid "" "If the submitted form data contains more than one field with the same name, " "the object retrieved by ``form[key]`` is not a :class:`FieldStorage` or :" @@ -158,7 +172,7 @@ msgid "" "username fields, separated by commas::" msgstr "" -#: library/cgi.rst:139 +#: library/cgi.rst:149 msgid "" "If a field represents an uploaded file, accessing the value via the :attr:" "`~FieldStorage.value` attribute or the :meth:`~FieldStorage.getvalue` method " @@ -171,13 +185,13 @@ msgid "" "IOBase.readline` methods will return bytes)::" msgstr "" -#: library/cgi.rst:159 +#: library/cgi.rst:169 msgid "" ":class:`FieldStorage` objects also support being used in a :keyword:`with` " "statement, which will automatically close them when done." msgstr "" -#: library/cgi.rst:162 +#: library/cgi.rst:172 msgid "" "If an error is encountered when obtaining the contents of an uploaded file " "(for example, when the user interrupts the form submission by clicking on a " @@ -185,7 +199,7 @@ msgid "" "object for the field will be set to the value -1." msgstr "" -#: library/cgi.rst:167 +#: library/cgi.rst:177 msgid "" "The file upload draft standard entertains the possibility of uploading " "multiple files from one field (using a recursive :mimetype:`multipart/\\*` " @@ -196,7 +210,7 @@ msgid "" "be iterated over recursively just like the top-level form object." msgstr "" -#: library/cgi.rst:175 +#: library/cgi.rst:185 msgid "" "When a form is submitted in the \"old\" format (as the query string or as a " "single data part of type :mimetype:`application/x-www-form-urlencoded`), the " @@ -205,29 +219,29 @@ msgid "" "are always ``None``." msgstr "" -#: library/cgi.rst:180 +#: library/cgi.rst:190 msgid "" "A form submitted via POST that also has a query string will contain both :" "class:`FieldStorage` and :class:`MiniFieldStorage` items." msgstr "" -#: library/cgi.rst:183 +#: library/cgi.rst:193 msgid "" "The :attr:`~FieldStorage.file` attribute is automatically closed upon the " "garbage collection of the creating :class:`FieldStorage` instance." msgstr "" -#: library/cgi.rst:187 +#: library/cgi.rst:197 msgid "" "Added support for the context management protocol to the :class:" "`FieldStorage` class." msgstr "" -#: library/cgi.rst:193 +#: library/cgi.rst:203 msgid "Higher Level Interface" msgstr "" -#: library/cgi.rst:195 +#: library/cgi.rst:205 msgid "" "The previous section explains how to read CGI form data using the :class:" "`FieldStorage` class. This section describes a higher level interface which " @@ -237,33 +251,33 @@ msgid "" "efficiently, for example." msgstr "" -#: library/cgi.rst:204 +#: library/cgi.rst:214 msgid "" "The interface consists of two simple methods. Using the methods you can " "process form data in a generic way, without the need to worry whether only " "one or more values were posted under one name." msgstr "" -#: library/cgi.rst:208 +#: library/cgi.rst:218 msgid "" "In the previous section, you learned to write following code anytime you " "expected a user to post more than one value under one name::" msgstr "" -#: library/cgi.rst:217 +#: library/cgi.rst:227 msgid "" "This situation is common for example when a form contains a group of " "multiple checkboxes with the same name::" msgstr "" -#: library/cgi.rst:223 +#: library/cgi.rst:233 msgid "" "In most situations, however, there's only one form control with a particular " "name in a form and then you expect and need only one value associated with " "this name. So you write a script containing for example this code::" msgstr "" -#: library/cgi.rst:229 +#: library/cgi.rst:239 msgid "" "The problem with the code is that you should never expect that a client will " "provide valid input to your scripts. For example, if a curious user appends " @@ -274,21 +288,21 @@ msgid "" "an :exc:`AttributeError` exception." msgstr "" -#: library/cgi.rst:237 +#: library/cgi.rst:247 msgid "" "Therefore, the appropriate way to read form data values was to always use " "the code which checks whether the obtained value is a single value or a list " "of values. That's annoying and leads to less readable scripts." msgstr "" -#: library/cgi.rst:241 +#: library/cgi.rst:251 msgid "" "A more convenient approach is to use the methods :meth:`~FieldStorage." "getfirst` and :meth:`~FieldStorage.getlist` provided by this higher level " "interface." msgstr "" -#: library/cgi.rst:247 +#: library/cgi.rst:257 msgid "" "This method always returns only one value associated with form field *name*. " "The method returns only the first value in case that more values were posted " @@ -299,7 +313,7 @@ msgid "" "defaults to ``None`` if not specified." msgstr "" -#: library/cgi.rst:258 +#: library/cgi.rst:268 msgid "" "This method always returns a list of values associated with form field " "*name*. The method returns an empty list if no such form field or value " @@ -307,28 +321,28 @@ msgid "" "such value exists." msgstr "" -#: library/cgi.rst:262 +#: library/cgi.rst:272 msgid "Using these methods you can write nice compact code::" msgstr "" -#: library/cgi.rst:274 +#: library/cgi.rst:284 msgid "Functions" msgstr "Fonctions" -#: library/cgi.rst:276 +#: library/cgi.rst:286 msgid "" "These are useful if you want more control, or if you want to employ some of " "the algorithms implemented in this module in other circumstances." msgstr "" -#: library/cgi.rst:282 +#: library/cgi.rst:292 msgid "" "Parse a query in the environment or from a file (the file defaults to ``sys." "stdin``). The *keep_blank_values*, *strict_parsing* and *separator* " "parameters are passed to :func:`urllib.parse.parse_qs` unchanged." msgstr "" -#: library/cgi.rst:289 +#: library/cgi.rst:299 msgid "" "Parse input of type :mimetype:`multipart/form-data` (for file uploads). " "Arguments are *fp* for the input file, *pdict* for a dictionary containing " @@ -336,92 +350,92 @@ msgid "" "the request encoding." msgstr "" -#: library/cgi.rst:294 +#: library/cgi.rst:304 msgid "" "Returns a dictionary just like :func:`urllib.parse.parse_qs`: keys are the " "field names, each value is a list of values for that field. For non-file " "fields, the value is a list of strings." msgstr "" -#: library/cgi.rst:298 +#: library/cgi.rst:308 msgid "" "This is easy to use but not much good if you are expecting megabytes to be " "uploaded --- in that case, use the :class:`FieldStorage` class instead which " "is much more flexible." msgstr "" -#: library/cgi.rst:302 +#: library/cgi.rst:312 msgid "" "Added the *encoding* and *errors* parameters. For non-file fields, the " "value is now a list of strings, not bytes." msgstr "" -#: library/cgi.rst:306 +#: library/cgi.rst:316 msgid "Added the *separator* parameter." msgstr "" -#: library/cgi.rst:312 +#: library/cgi.rst:322 msgid "" "Parse a MIME header (such as :mailheader:`Content-Type`) into a main value " "and a dictionary of parameters." msgstr "" -#: library/cgi.rst:318 +#: library/cgi.rst:328 msgid "" "Robust test CGI script, usable as main program. Writes minimal HTTP headers " "and formats all information provided to the script in HTML format." msgstr "" -#: library/cgi.rst:324 +#: library/cgi.rst:334 msgid "Format the shell environment in HTML." msgstr "" -#: library/cgi.rst:329 +#: library/cgi.rst:339 msgid "Format a form in HTML." msgstr "" -#: library/cgi.rst:334 +#: library/cgi.rst:344 msgid "Format the current directory in HTML." msgstr "" -#: library/cgi.rst:339 +#: library/cgi.rst:349 msgid "Print a list of useful (used by CGI) environment variables in HTML." msgstr "" -#: library/cgi.rst:345 +#: library/cgi.rst:355 msgid "Caring about security" msgstr "" -#: library/cgi.rst:349 +#: library/cgi.rst:359 msgid "" "There's one important rule: if you invoke an external program (via :func:`os." "system`, :func:`os.popen` or other functions with similar functionality), " "make very sure you don't pass arbitrary strings received from the client to " "the shell. This is a well-known security hole whereby clever hackers " -"anywhere on the Web can exploit a gullible CGI script to invoke arbitrary " +"anywhere on the web can exploit a gullible CGI script to invoke arbitrary " "shell commands. Even parts of the URL or field names cannot be trusted, " "since the request doesn't have to come from your form!" msgstr "" -#: library/cgi.rst:357 +#: library/cgi.rst:367 msgid "" "To be on the safe side, if you must pass a string gotten from a form to a " "shell command, you should make sure the string contains only alphanumeric " "characters, dashes, underscores, and periods." msgstr "" -#: library/cgi.rst:363 +#: library/cgi.rst:373 msgid "Installing your CGI script on a Unix system" msgstr "" -#: library/cgi.rst:365 +#: library/cgi.rst:375 msgid "" "Read the documentation for your HTTP server and check with your local system " "administrator to find the directory where CGI scripts should be installed; " "usually this is in a directory :file:`cgi-bin` in the server tree." msgstr "" -#: library/cgi.rst:369 +#: library/cgi.rst:379 msgid "" "Make sure that your script is readable and executable by \"others\"; the " "Unix file mode should be ``0o755`` octal (use ``chmod 0755 filename``). " @@ -429,12 +443,12 @@ msgid "" "column 1 followed by the pathname of the Python interpreter, for instance::" msgstr "" -#: library/cgi.rst:376 +#: library/cgi.rst:386 msgid "" "Make sure the Python interpreter exists and is executable by \"others\"." msgstr "" -#: library/cgi.rst:378 +#: library/cgi.rst:388 msgid "" "Make sure that any files your script needs to read or write are readable or " "writable, respectively, by \"others\" --- their mode should be ``0o644`` for " @@ -449,28 +463,28 @@ msgid "" "anything interesting." msgstr "" -#: library/cgi.rst:389 +#: library/cgi.rst:399 msgid "" "If you need to load modules from a directory which is not on Python's " "default module search path, you can change the path in your script, before " "importing other modules. For example::" msgstr "" -#: library/cgi.rst:397 +#: library/cgi.rst:407 msgid "(This way, the directory inserted last will be searched first!)" msgstr "" -#: library/cgi.rst:399 +#: library/cgi.rst:409 msgid "" "Instructions for non-Unix systems will vary; check your HTTP server's " "documentation (it will usually have a section on CGI scripts)." msgstr "" -#: library/cgi.rst:404 +#: library/cgi.rst:414 msgid "Testing your CGI script" msgstr "" -#: library/cgi.rst:406 +#: library/cgi.rst:416 msgid "" "Unfortunately, a CGI script will generally not run when you try it from the " "command line, and a script that works perfectly from the command line may " @@ -480,17 +494,17 @@ msgid "" "will most likely send a cryptic error to the client." msgstr "" -#: library/cgi.rst:413 +#: library/cgi.rst:423 msgid "" "Assuming your script has no syntax errors, yet it does not work, you have no " "choice but to read the next section." msgstr "" -#: library/cgi.rst:418 +#: library/cgi.rst:428 msgid "Debugging CGI scripts" msgstr "" -#: library/cgi.rst:422 +#: library/cgi.rst:432 msgid "" "First of all, check for trivial installation errors --- reading the section " "above on installing your CGI script carefully can save you a lot of time. " @@ -503,7 +517,7 @@ msgid "" "your browser of the form:" msgstr "" -#: library/cgi.rst:435 +#: library/cgi.rst:445 msgid "" "If this gives an error of type 404, the server cannot find the script -- " "perhaps you need to install it in a different directory. If it gives " @@ -515,19 +529,19 @@ msgid "" "same procedure for your own script, you should now be able to debug it." msgstr "" -#: library/cgi.rst:444 +#: library/cgi.rst:454 msgid "" "The next step could be to call the :mod:`cgi` module's :func:`test` function " "from your script: replace its main code with the single statement ::" msgstr "" -#: library/cgi.rst:449 +#: library/cgi.rst:459 msgid "" "This should produce the same results as those gotten from installing the :" "file:`cgi.py` file itself." msgstr "" -#: library/cgi.rst:452 +#: library/cgi.rst:462 msgid "" "When an ordinary Python script raises an unhandled exception (for whatever " "reason: of a typo in a module name, a file that can't be opened, etc.), the " @@ -537,28 +551,28 @@ msgid "" "or be discarded altogether." msgstr "" -#: library/cgi.rst:459 +#: library/cgi.rst:469 msgid "" "Fortunately, once you have managed to get your script to execute *some* " -"code, you can easily send tracebacks to the Web browser using the :mod:" +"code, you can easily send tracebacks to the web browser using the :mod:" "`cgitb` module. If you haven't done so already, just add the lines::" msgstr "" -#: library/cgi.rst:466 +#: library/cgi.rst:476 msgid "" "to the top of your script. Then try running it again; when a problem " "occurs, you should see a detailed report that will likely make apparent the " "cause of the crash." msgstr "" -#: library/cgi.rst:470 +#: library/cgi.rst:480 msgid "" "If you suspect that there may be a problem in importing the :mod:`cgitb` " "module, you can use an even more robust approach (which only uses built-in " "modules)::" msgstr "" -#: library/cgi.rst:479 +#: library/cgi.rst:489 msgid "" "This relies on the Python interpreter to print the traceback. The content " "type of the output is set to plain text, which disables all HTML " @@ -568,47 +582,47 @@ msgid "" "interpretation is going on, the traceback will be readable." msgstr "" -#: library/cgi.rst:488 +#: library/cgi.rst:498 msgid "Common problems and solutions" msgstr "" -#: library/cgi.rst:490 +#: library/cgi.rst:500 msgid "" "Most HTTP servers buffer the output from CGI scripts until the script is " "completed. This means that it is not possible to display a progress report " "on the client's display while the script is running." msgstr "" -#: library/cgi.rst:494 +#: library/cgi.rst:504 msgid "Check the installation instructions above." msgstr "" -#: library/cgi.rst:496 +#: library/cgi.rst:506 msgid "" "Check the HTTP server's log files. (``tail -f logfile`` in a separate " "window may be useful!)" msgstr "" -#: library/cgi.rst:499 +#: library/cgi.rst:509 msgid "" "Always check a script for syntax errors first, by doing something like " "``python script.py``." msgstr "" -#: library/cgi.rst:502 +#: library/cgi.rst:512 msgid "" "If your script does not have any syntax errors, try adding ``import cgitb; " "cgitb.enable()`` to the top of the script." msgstr "" -#: library/cgi.rst:505 +#: library/cgi.rst:515 msgid "" "When invoking external programs, make sure they can be found. Usually, this " "means using absolute path names --- :envvar:`PATH` is usually not set to a " "very useful value in a CGI script." msgstr "" -#: library/cgi.rst:509 +#: library/cgi.rst:519 msgid "" "When reading or writing external files, make sure they can be read or " "written by the userid under which your CGI script will be running: this is " @@ -616,17 +630,17 @@ msgid "" "explicitly specified userid for a web server's ``suexec`` feature." msgstr "" -#: library/cgi.rst:514 +#: library/cgi.rst:524 msgid "" "Don't try to give a CGI script a set-uid mode. This doesn't work on most " "systems, and is a security liability as well." msgstr "" -#: library/cgi.rst:518 +#: library/cgi.rst:528 msgid "Footnotes" msgstr "Notes" -#: library/cgi.rst:519 +#: library/cgi.rst:529 msgid "" "Note that some recent versions of the HTML specification do state what order " "the field values should be supplied in, but knowing whether a request was " diff --git a/library/cgitb.po b/library/cgitb.po index 92ba035e2a..79d7f66ffe 100644 --- a/library/cgitb.po +++ b/library/cgitb.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2018-07-29 18:36+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -19,11 +19,17 @@ msgstr "" msgid ":mod:`cgitb` --- Traceback manager for CGI scripts" msgstr ":mod:`cgitb` — Gestionnaire d'exceptions pour les scripts CGI" -#: library/cgitb.rst:10 +#: library/cgitb.rst:11 msgid "**Source code:** :source:`Lib/cgitb.py`" msgstr "**Code source :** :source:`Lib/cgitb.py`" -#: library/cgitb.rst:20 +#: library/cgitb.rst:22 +msgid "" +"The :mod:`cgitb` module is deprecated (see :pep:`PEP 594 <594#cgitb>` for " +"details)." +msgstr "" + +#: library/cgitb.rst:25 msgid "" "The :mod:`cgitb` module provides a special exception handler for Python " "scripts. (Its name is a bit misleading. It was originally designed to " @@ -47,13 +53,13 @@ msgstr "" "problème. Il est aussi possible de sauvegarder cette information dans un " "fichier plutôt que de l'envoyer dans le navigateur." -#: library/cgitb.rst:30 +#: library/cgitb.rst:35 msgid "To enable this feature, simply add this to the top of your CGI script::" msgstr "" "Pour activer cette fonctionnalité, ajoutez simplement ceci au début de votre " "script CGI ::" -#: library/cgitb.rst:35 +#: library/cgitb.rst:40 msgid "" "The options to the :func:`enable` function control whether the report is " "displayed in the browser and whether the report is logged to a file for " @@ -63,7 +69,7 @@ msgstr "" "choisir si le rapport est envoyé au navigateur ou si le rapport est écrit " "dans un fichier pour analyse ultérieure." -#: library/cgitb.rst:44 +#: library/cgitb.rst:49 msgid "" "This function causes the :mod:`cgitb` module to take over the interpreter's " "default handling for exceptions by setting the value of :attr:`sys." @@ -73,7 +79,7 @@ msgstr "" "l'interpréteur par celui du module :mod:`cgitb`, en configurant :attr:`sys." "excepthook`." -#: library/cgitb.rst:47 +#: library/cgitb.rst:52 msgid "" "The optional argument *display* defaults to ``1`` and can be set to ``0`` to " "suppress sending the traceback to the browser. If the argument *logdir* is " @@ -82,8 +88,8 @@ msgid "" "argument *context* is the number of lines of context to display around the " "current line of source code in the traceback; this defaults to ``5``. If the " "optional argument *format* is ``\"html\"``, the output is formatted as " -"HTML. Any other value forces plain text output. The default value is ``" -"\"html\"``." +"HTML. Any other value forces plain text output. The default value is " +"``\"html\"``." msgstr "" "Le paramètre optionnel *display* vaut ``1`` par défaut, et peut être mis à " "``0`` pour désactiver l'envoi des piles d'appels au navigateur. Si " @@ -95,7 +101,7 @@ msgstr "" "HTML. Le rapport sera écrit en texte brut pour toute autre valeur. La " "valeur par défaut est ``\"html\"``." -#: library/cgitb.rst:59 +#: library/cgitb.rst:64 msgid "" "This function handles the exception described by *info* (a 3-tuple " "containing the result of :func:`sys.exc_info`), formatting its traceback as " @@ -110,7 +116,7 @@ msgstr "" "de la ligne courante du code source dans la pile d’appels ; la valeur par " "défaut est ``5``." -#: library/cgitb.rst:68 +#: library/cgitb.rst:73 msgid "" "This function handles the exception described by *info* (a 3-tuple " "containing the result of :func:`sys.exc_info`), formatting its traceback as " @@ -125,7 +131,7 @@ msgstr "" "de la ligne courante du code source dans la pile d’appels ; la valeur par " "défaut est ``5``." -#: library/cgitb.rst:77 +#: library/cgitb.rst:82 msgid "" "This function handles an exception using the default settings (that is, show " "a report in the browser, but don't log to a file). This can be used when " diff --git a/library/chunk.po b/library/chunk.po index 41ca71bb5b..7b74e7a8d4 100644 --- a/library/chunk.po +++ b/library/chunk.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,12 +18,18 @@ msgstr "" msgid ":mod:`chunk` --- Read IFF chunked data" msgstr "" -#: library/chunk.rst:10 +#: library/chunk.rst:11 #, fuzzy msgid "**Source code:** :source:`Lib/chunk.py`" msgstr "**Code source :** :source:`Lib/uu.py`" -#: library/chunk.rst:21 +#: library/chunk.rst:23 +msgid "" +"The :mod:`chunk` module is deprecated (see :pep:`PEP 594 <594#chunk>` for " +"details)." +msgstr "" + +#: library/chunk.rst:26 msgid "" "This module provides an interface for reading files that use EA IFF 85 " "chunks. [#]_ This format is used in at least the Audio Interchange File " @@ -31,73 +37,73 @@ msgid "" "file format is closely related and can also be read using this module." msgstr "" -#: library/chunk.rst:26 +#: library/chunk.rst:31 msgid "A chunk has the following structure:" msgstr "" -#: library/chunk.rst:29 +#: library/chunk.rst:34 msgid "Offset" msgstr "" -#: library/chunk.rst:29 +#: library/chunk.rst:34 msgid "Length" msgstr "" -#: library/chunk.rst:29 +#: library/chunk.rst:34 msgid "Contents" msgstr "Sommaire" -#: library/chunk.rst:31 +#: library/chunk.rst:36 msgid "0" msgstr "0" -#: library/chunk.rst:33 +#: library/chunk.rst:38 msgid "4" msgstr "4" -#: library/chunk.rst:31 +#: library/chunk.rst:36 msgid "Chunk ID" msgstr "" -#: library/chunk.rst:33 +#: library/chunk.rst:38 msgid "Size of chunk in big-endian byte order, not including the header" msgstr "" -#: library/chunk.rst:37 +#: library/chunk.rst:42 msgid "8" msgstr "8" -#: library/chunk.rst:37 +#: library/chunk.rst:42 msgid "*n*" msgstr "*n*" -#: library/chunk.rst:37 +#: library/chunk.rst:42 msgid "Data bytes, where *n* is the size given in the preceding field" msgstr "" -#: library/chunk.rst:41 +#: library/chunk.rst:46 msgid "8 + *n*" msgstr "8 + *n*" -#: library/chunk.rst:41 +#: library/chunk.rst:46 msgid "0 or 1" msgstr "0 or 1" -#: library/chunk.rst:41 +#: library/chunk.rst:46 msgid "Pad byte needed if *n* is odd and chunk alignment is used" msgstr "" -#: library/chunk.rst:45 +#: library/chunk.rst:50 msgid "The ID is a 4-byte string which identifies the type of chunk." msgstr "" -#: library/chunk.rst:47 +#: library/chunk.rst:52 msgid "" "The size field (a 32-bit value, encoded using big-endian byte order) gives " "the size of the chunk data, not including the 8-byte header." msgstr "" -#: library/chunk.rst:50 +#: library/chunk.rst:55 msgid "" "Usually an IFF-type file consists of one or more chunks. The proposed usage " "of the :class:`Chunk` class defined here is to instantiate an instance at " @@ -106,7 +112,7 @@ msgid "" "creating a new instance will fail with an :exc:`EOFError` exception." msgstr "" -#: library/chunk.rst:59 +#: library/chunk.rst:64 msgid "" "Class which represents a chunk. The *file* argument is expected to be a " "file-like object. An instance of this class is specifically allowed. The " @@ -123,37 +129,37 @@ msgid "" "The default value is false." msgstr "" -#: library/chunk.rst:73 +#: library/chunk.rst:78 msgid "A :class:`Chunk` object supports the following methods:" msgstr "" -#: library/chunk.rst:78 +#: library/chunk.rst:83 msgid "" "Returns the name (ID) of the chunk. This is the first 4 bytes of the chunk." msgstr "" -#: library/chunk.rst:84 +#: library/chunk.rst:89 msgid "Returns the size of the chunk." msgstr "" -#: library/chunk.rst:89 +#: library/chunk.rst:94 msgid "" "Close and skip to the end of the chunk. This does not close the underlying " "file." msgstr "" -#: library/chunk.rst:92 +#: library/chunk.rst:97 msgid "" "The remaining methods will raise :exc:`OSError` if called after the :meth:" "`close` method has been called. Before Python 3.3, they used to raise :exc:" "`IOError`, now an alias of :exc:`OSError`." msgstr "" -#: library/chunk.rst:99 +#: library/chunk.rst:104 msgid "Returns ``False``." msgstr "" -#: library/chunk.rst:104 +#: library/chunk.rst:109 msgid "" "Set the chunk's current position. The *whence* argument is optional and " "defaults to ``0`` (absolute file positioning); other values are ``1`` (seek " @@ -162,11 +168,11 @@ msgid "" "only forward seeks are allowed." msgstr "" -#: library/chunk.rst:113 +#: library/chunk.rst:118 msgid "Return the current position into the chunk." msgstr "" -#: library/chunk.rst:118 +#: library/chunk.rst:123 msgid "" "Read at most *size* bytes from the chunk (less if the read hits the end of " "the chunk before obtaining *size* bytes). If the *size* argument is " @@ -175,7 +181,7 @@ msgid "" "immediately." msgstr "" -#: library/chunk.rst:127 +#: library/chunk.rst:132 msgid "" "Skip to the end of the chunk. All further calls to :meth:`read` for the " "chunk will return ``b''``. If you are not interested in the contents of the " @@ -183,11 +189,11 @@ msgid "" "the next chunk." msgstr "" -#: library/chunk.rst:134 +#: library/chunk.rst:139 msgid "Footnotes" msgstr "Notes" -#: library/chunk.rst:135 +#: library/chunk.rst:140 msgid "" "\"EA IFF 85\" Standard for Interchange Format Files, Jerry Morrison, " "Electronic Arts, January 1985." diff --git a/library/cmd.po b/library/cmd.po index 1514dc8916..9114f98065 100644 --- a/library/cmd.po +++ b/library/cmd.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2018-07-29 23:43+0200\n" -"Last-Translator: Luka Peschke \n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2022-11-04 21:20-0400\n" +"Last-Translator: Edith Viau \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.3\n" +"X-Generator: Poedit 3.0.1\n" #: library/cmd.rst:2 msgid ":mod:`cmd` --- Support for line-oriented command interpreters" @@ -183,8 +183,8 @@ msgid "" "method, called with an argument ``'bar'``, invokes the corresponding method :" "meth:`help_bar`, and if that is not present, prints the docstring of :meth:" "`do_bar`, if available. With no argument, :meth:`do_help` lists all " -"available help topics (that is, all commands with corresponding :meth:`help_" -"\\*` methods or commands that have docstrings), and also lists any " +"available help topics (that is, all commands with corresponding :meth:" +"`help_\\*` methods or commands that have docstrings), and also lists any " "undocumented commands." msgstr "" "Toutes les classes filles de :class:`Cmd` héritent d'une méthode :meth:" @@ -244,6 +244,17 @@ msgstr "" #: library/cmd.rst:126 msgid "" +"Method called to display a list of strings as a compact set of columns. Each " +"column is only as wide as necessary. Columns are separated by two spaces for " +"readability." +msgstr "" +"Méthode appelée pour afficher une liste de chaînes de caractères sous la " +"forme d'un ensemble compact de colonnes. Chaque colonne est de largeur " +"minimale. Les colonnes sont séparées par deux espaces pour faciliter la " +"lecture." + +#: library/cmd.rst:133 +msgid "" "Hook method executed just before the command line *line* is interpreted, but " "after the input prompt is generated and issued. This method is a stub in :" "class:`Cmd`; it exists to be overridden by subclasses. The return value is " @@ -258,7 +269,7 @@ msgstr "" "exécutée par la méthode :meth:`onecmd`. L'implémentation de :meth:`precmd` " "peut réécrire la commande ou simplement renvoyer *line* sans modification." -#: library/cmd.rst:136 +#: library/cmd.rst:143 msgid "" "Hook method executed just after a command dispatch is finished. This method " "is a stub in :class:`Cmd`; it exists to be overridden by subclasses. *line* " @@ -277,7 +288,7 @@ msgstr "" "interne correspondant à *stop*. Renvoyer *False* permettra à " "l'interprétation de continuer." -#: library/cmd.rst:147 +#: library/cmd.rst:154 msgid "" "Hook method executed once when :meth:`cmdloop` is called. This method is a " "stub in :class:`Cmd`; it exists to be overridden by subclasses." @@ -286,7 +297,7 @@ msgstr "" "Cette méthode existe afin d'être surchargée par des classes filles de :class:" "`Cmd`." -#: library/cmd.rst:153 +#: library/cmd.rst:160 msgid "" "Hook method executed once when :meth:`cmdloop` is about to return. This " "method is a stub in :class:`Cmd`; it exists to be overridden by subclasses." @@ -295,26 +306,26 @@ msgstr "" "Cette méthode existe afin d'être surchargée par des classes filles de :class:" "`Cmd`." -#: library/cmd.rst:157 +#: library/cmd.rst:164 msgid "" "Instances of :class:`Cmd` subclasses have some public instance variables:" msgstr "" "Les instances de classes filles de :class:`Cmd` possèdent des variables " "d'instance publiques:" -#: library/cmd.rst:161 +#: library/cmd.rst:168 msgid "The prompt issued to solicit input." msgstr "L'invite de commande affiché pour solliciter une entrée." -#: library/cmd.rst:166 +#: library/cmd.rst:173 msgid "The string of characters accepted for the command prefix." msgstr "La chaîne de caractères acceptée en tant que préfixe de commande." -#: library/cmd.rst:171 +#: library/cmd.rst:178 msgid "The last nonempty command prefix seen." msgstr "Le dernier préfixe de commande non-vide vu." -#: library/cmd.rst:176 +#: library/cmd.rst:183 msgid "" "A list of queued input lines. The cmdqueue list is checked in :meth:" "`cmdloop` when new input is needed; if it is nonempty, its elements will be " @@ -325,7 +336,7 @@ msgstr "" "vide, ses éléments seront traités dans l'ordre, comme si ils avaient entrés " "dans l'invite de commande." -#: library/cmd.rst:183 +#: library/cmd.rst:190 msgid "" "A string to issue as an intro or banner. May be overridden by giving the :" "meth:`cmdloop` method an argument." @@ -333,14 +344,14 @@ msgstr "" "Une chaîne de caractères à afficher en introduction ou bannière. Peut être " "surchargée en passant un argument à la méthode :meth:`cmdloop`." -#: library/cmd.rst:189 +#: library/cmd.rst:196 msgid "" "The header to issue if the help output has a section for documented commands." msgstr "" "L'en-tête à afficher si la sortie de l'aide possède une section pour les " "commandes documentées." -#: library/cmd.rst:194 +#: library/cmd.rst:201 msgid "" "The header to issue if the help output has a section for miscellaneous help " "topics (that is, there are :meth:`help_\\*` methods without corresponding :" @@ -350,17 +361,17 @@ msgstr "" "sujets (c'est-à-dire qu'il existe des méthodes :meth:`help_\\*` sans " "méthodes :meth:`do_\\*` correspondantes)." -#: library/cmd.rst:201 +#: library/cmd.rst:208 msgid "" "The header to issue if the help output has a section for undocumented " "commands (that is, there are :meth:`do_\\*` methods without corresponding :" "meth:`help_\\*` methods)." msgstr "" "L'en-tête à afficher si la sortie de l'aide possède une section pour les " -"commandes non documentées (c'est-à-dire qu'il existe des méthodes :meth:`dop_" -"\\*` sans méthodes :meth:`help_\\*` correspondantes)." +"commandes non documentées (c'est-à-dire qu'il existe des méthodes :meth:" +"`dop_\\*` sans méthodes :meth:`help_\\*` correspondantes)." -#: library/cmd.rst:208 +#: library/cmd.rst:215 msgid "" "The character used to draw separator lines under the help-message headers. " "If empty, no ruler line is drawn. It defaults to ``'='``." @@ -369,7 +380,7 @@ msgstr "" "têtes de messages d'aide. Si il est vide, aucune ligne de séparation n'est " "affichée. Par défaut, ce caractère vaut ``'='``." -#: library/cmd.rst:214 +#: library/cmd.rst:221 msgid "" "A flag, defaulting to true. If true, :meth:`cmdloop` uses :func:`input` to " "display a prompt and read the next command; if false, :meth:`sys.stdout." @@ -386,11 +397,11 @@ msgstr "" "automatiquement supporter une édition de ligne similaire à :program:`Emacs` " "ainsi que des touches d'historique de commande)." -#: library/cmd.rst:224 +#: library/cmd.rst:231 msgid "Cmd Example" msgstr "Exemple" -#: library/cmd.rst:228 +#: library/cmd.rst:235 msgid "" "The :mod:`cmd` module is mainly useful for building custom shells that let a " "user work with a program interactively." @@ -399,7 +410,7 @@ msgstr "" "permettant à l'utilisateur de travailler avec un programme de manière " "interactive." -#: library/cmd.rst:231 +#: library/cmd.rst:238 msgid "" "This section presents a simple example of how to build a shell around a few " "of the commands in the :mod:`turtle` module." @@ -407,7 +418,7 @@ msgstr "" "Cette section présente un exemple simple de comment produire une invite de " "commande autour de quelques commandes du module :mod:`turtle`." -#: library/cmd.rst:234 +#: library/cmd.rst:241 msgid "" "Basic turtle commands such as :meth:`~turtle.forward` are added to a :class:" "`Cmd` subclass with method named :meth:`do_forward`. The argument is " @@ -420,7 +431,7 @@ msgstr "" "*turtle*. La *docstring* est utilisée dans l'utilitaire d'aide fourni par " "l'invite de commande." -#: library/cmd.rst:239 +#: library/cmd.rst:246 msgid "" "The example also includes a basic record and playback facility implemented " "with the :meth:`~Cmd.precmd` method which is responsible for converting the " @@ -434,7 +445,7 @@ msgstr "" "fichier. La méthode :meth:`do_playback` lit le fichier et ajoute les " "commandes enregistrées à :attr:`cmdqueue` pour être rejouées immédiatement ::" -#: library/cmd.rst:320 +#: library/cmd.rst:327 msgid "" "Here is a sample session with the turtle shell showing the help functions, " "using blank lines to repeat commands, and the simple record and playback " diff --git a/library/codecs.po b/library/codecs.po index ea22b15a24..f6c9c2d006 100644 --- a/library/codecs.po +++ b/library/codecs.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" -"PO-Revision-Date: 2020-10-15 09:15+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-10-18 16:08+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -24,15 +24,17 @@ msgid "**Source code:** :source:`Lib/codecs.py`" msgstr "**Code source :** :source:`Lib/codecs.py`" #: library/codecs.rst:23 +#, fuzzy msgid "" "This module defines base classes for standard Python codecs (encoders and " "decoders) and provides access to the internal Python codec registry, which " "manages the codec and error handling lookup process. Most standard codecs " -"are :term:`text encodings `, which encode text to bytes, but " -"there are also codecs provided that encode text to text, and bytes to bytes. " -"Custom codecs may encode and decode between arbitrary types, but some module " -"features are restricted to use specifically with :term:`text encodings `, or with codecs that encode to :class:`bytes`." +"are :term:`text encodings `, which encode text to bytes (and " +"decode bytes to text), but there are also codecs provided that encode text " +"to text, and bytes to bytes. Custom codecs may encode and decode between " +"arbitrary types, but some module features are restricted to be used " +"specifically with :term:`text encodings ` or with codecs that " +"encode to :class:`bytes`." msgstr "" "Ce module définit les classes de base pour les codecs (encodeurs et " "décodeurs) standards Python et fournit l'interface avec le registre des " @@ -270,17 +272,13 @@ msgstr "" msgid "Hyphens and spaces are converted to underscore." msgstr "" -# Pas de majuscule en début car suit un deux-points. -#: library/codecs.rst:172 +#: library/codecs.rst:173 msgid "" -"Search function registration is not currently reversible, which may cause " -"problems in some cases, such as unit testing or module reloading." +"Unregister a codec search function and clear the registry's cache. If the " +"search function is not registered, do nothing." msgstr "" -"l'enregistrement d'une fonction de recherche n'est actuellement pas " -"réversible, ce qui peut entraîner des problèmes dans certains cas, par " -"exemple pour les tests unitaires ou le rechargement de module." -#: library/codecs.rst:176 +#: library/codecs.rst:179 msgid "" "While the builtin :func:`open` and the associated :mod:`io` module are the " "recommended approach for working with encoded text files, this module " @@ -293,7 +291,7 @@ msgstr "" "qui permettent l'utilisation d'une plus large gamme de codecs si vous " "travaillez avec des fichiers binaires :" -#: library/codecs.rst:183 +#: library/codecs.rst:186 msgid "" "Open an encoded file using the given *mode* and return an instance of :class:" "`StreamReaderWriter`, providing transparent encoding/decoding. The default " @@ -305,7 +303,7 @@ msgstr "" "est ouvert en lecture." # Pas de majuscule en début car suit un deux-points. -#: library/codecs.rst:189 +#: library/codecs.rst:192 msgid "" "Underlying encoded files are always opened in binary mode. No automatic " "conversion of ``'\\n'`` is done on reading and writing. The *mode* argument " @@ -318,7 +316,7 @@ msgstr "" "acceptable pour la fonction native :func:`open` ; le ``'b'`` est " "automatiquement ajouté." -#: library/codecs.rst:194 +#: library/codecs.rst:197 msgid "" "*encoding* specifies the encoding which is to be used for the file. Any " "encoding that encodes to and decodes from bytes is allowed, and the data " @@ -329,7 +327,7 @@ msgstr "" "données pris en charge par les méthodes relatives aux fichiers dépendent du " "codec utilisé." -#: library/codecs.rst:198 +#: library/codecs.rst:201 msgid "" "*errors* may be given to define the error handling. It defaults to " "``'strict'`` which causes a :exc:`ValueError` to be raised in case an " @@ -339,16 +337,20 @@ msgstr "" "par défaut est ``'strict'``, ce qui lève une :exc:`ValueError` en cas " "d'erreur lors du codage." -#: library/codecs.rst:201 +#: library/codecs.rst:204 msgid "" "*buffering* has the same meaning as for the built-in :func:`open` function. " "It defaults to -1 which means that the default buffer size will be used." msgstr "" "*buffering* a la même signification que pour la fonction native :func:" -"`open`. Il vaut `-1` par défaut, ce qui signifie que la taille par défaut du " -"tampon est utilisée." +"`open`. Il vaut ``-1`` par défaut, ce qui signifie que la taille par défaut " +"du tampon est utilisée." #: library/codecs.rst:207 +msgid "The ``'U'`` mode has been removed." +msgstr "" + +#: library/codecs.rst:213 msgid "" "Return a :class:`StreamRecoder` instance, a wrapped version of *file* which " "provides transparent transcoding. The original file is closed when the " @@ -358,7 +360,7 @@ msgstr "" "qui fournit un transcodage transparent. Le fichier original est fermé quand " "la version encapsulée est fermée." -#: library/codecs.rst:211 +#: library/codecs.rst:217 msgid "" "Data written to the wrapped file is decoded according to the given " "*data_encoding* and then written to the original file as bytes using " @@ -371,13 +373,13 @@ msgstr "" "original sont décodés conformément à *file_encoding* et le résultat est " "encodé en utilisant *data_encoding*." -#: library/codecs.rst:217 +#: library/codecs.rst:223 msgid "If *file_encoding* is not given, it defaults to *data_encoding*." msgstr "" "Si *file_encoding* n'est pas spécifié, la valeur par défaut est " "*data_encoding*." -#: library/codecs.rst:219 +#: library/codecs.rst:225 msgid "" "*errors* may be given to define the error handling. It defaults to " "``'strict'``, which causes :exc:`ValueError` to be raised in case an " @@ -387,7 +389,7 @@ msgstr "" "par défaut est ``'strict'``, ce qui lève une :exc:`ValueError` en cas " "d'erreur lors du codage." -#: library/codecs.rst:226 +#: library/codecs.rst:232 msgid "" "Uses an incremental encoder to iteratively encode the input provided by " "*iterator*. This function is a :term:`generator`. The *errors* argument (as " @@ -399,7 +401,7 @@ msgstr "" "`. L'argument *errors* (ainsi que tout autre argument passé par " "son nom) est transmis à l'encodeur incrémental." -#: library/codecs.rst:231 +#: library/codecs.rst:237 msgid "" "This function requires that the codec accept text :class:`str` objects to " "encode. Therefore it does not support bytes-to-bytes encoders such as " @@ -409,7 +411,7 @@ msgstr "" "class:`str`) en entrée. Par conséquent, il ne prend pas en charge les " "encodeurs *bytes* vers *bytes* tels que ``base64_codec``." -#: library/codecs.rst:238 +#: library/codecs.rst:244 msgid "" "Uses an incremental decoder to iteratively decode the input provided by " "*iterator*. This function is a :term:`generator`. The *errors* argument (as " @@ -421,7 +423,7 @@ msgstr "" "*errors* (ainsi que tout autre argument passé par son nom) est transmis au " "décodeur incrémental." -#: library/codecs.rst:243 +#: library/codecs.rst:249 msgid "" "This function requires that the codec accept :class:`bytes` objects to " "decode. Therefore it does not support text-to-text encoders such as " @@ -433,7 +435,7 @@ msgstr "" "vers texte tels que ``rot_13``, bien que ``rot_13`` puisse être utilisé de " "manière équivalente avec :func:`iterencode`." -#: library/codecs.rst:249 +#: library/codecs.rst:255 msgid "" "The module also provides the following constants which are useful for " "reading and writing to platform dependent files:" @@ -441,7 +443,7 @@ msgstr "" "Le module fournit également les constantes suivantes qui sont utiles pour " "lire et écrire les fichiers dépendants de la plateforme :" -#: library/codecs.rst:264 +#: library/codecs.rst:270 msgid "" "These constants define various byte sequences, being Unicode byte order " "marks (BOMs) for several encodings. They are used in UTF-16 and UTF-32 data " @@ -462,11 +464,11 @@ msgstr "" "et :const:`BOM_BE` pour :const:`BOM_UTF16_BE`. Les autres sont les marques " "BOM dans les encodages UTF-8 et UTF-32." -#: library/codecs.rst:278 +#: library/codecs.rst:284 msgid "Codec Base Classes" msgstr "Classes de base de codecs" -#: library/codecs.rst:280 +#: library/codecs.rst:286 msgid "" "The :mod:`codecs` module defines a set of base classes which define the " "interfaces for working with codec objects, and can also be used as the basis " @@ -477,7 +479,7 @@ msgstr "" "peuvent également être utilisées comme base pour des implémentations de " "codecs personnalisés." -#: library/codecs.rst:284 +#: library/codecs.rst:290 msgid "" "Each codec has to define four interfaces to make it usable as codec in " "Python: stateless encoder, stateless decoder, stream reader and stream " @@ -492,16 +494,15 @@ msgstr "" "Les auteurs de codecs doivent également définir comment le codec gère les " "erreurs d'encodage et de décodage." -#: library/codecs.rst:295 +#: library/codecs.rst:301 msgid "Error Handlers" msgstr "Gestionnaires d'erreurs" -#: library/codecs.rst:297 +#: library/codecs.rst:303 +#, fuzzy msgid "" "To simplify and standardize error handling, codecs may implement different " -"error handling schemes by accepting the *errors* string argument. The " -"following string values are defined and implemented by all standard Python " -"codecs:" +"error handling schemes by accepting the *errors* string argument:" msgstr "" "Pour simplifier et standardiser la gestion des erreurs, les codecs peuvent " "implémenter différents schémas de gestion des erreurs en acceptant " @@ -509,31 +510,41 @@ msgstr "" "les gestionnaires correspondants implémentés par tous les codecs Python " "standards :" -#: library/codecs.rst:328 library/codecs.rst:361 +#: library/codecs.rst:323 +#, fuzzy +msgid "" +"The following error handlers can be used with all Python :ref:`standard-" +"encodings` codecs:" +msgstr "" +"Les gestionnaires d'erreurs suivants ne s'appliquent que pour les :term:" +"`encodeurs de texte ` :" + +#: library/codecs.rst:371 library/codecs.rst:390 msgid "Value" msgstr "Valeur" -#: library/codecs.rst:328 library/codecs.rst:1273 library/codecs.rst:1395 +#: library/codecs.rst:371 library/codecs.rst:1323 library/codecs.rst:1445 msgid "Meaning" msgstr "Signification" -#: library/codecs.rst:307 +#: library/codecs.rst:331 msgid "``'strict'``" msgstr "``'strict'``" -#: library/codecs.rst:307 +#: library/codecs.rst:331 +#, fuzzy msgid "" -"Raise :exc:`UnicodeError` (or a subclass); this is the default. Implemented " +"Raise :exc:`UnicodeError` (or a subclass), this is the default. Implemented " "in :func:`strict_errors`." msgstr "" "Lève :exc:`UnicodeError` (ou une sous-classe) ; c'est la valeur par défaut. " "Implémenté dans :func:`strict_errors`." -#: library/codecs.rst:311 +#: library/codecs.rst:335 msgid "``'ignore'``" msgstr "``'ignore'``" -#: library/codecs.rst:311 +#: library/codecs.rst:335 msgid "" "Ignore the malformed data and continue without further notice. Implemented " "in :func:`ignore_errors`." @@ -541,137 +552,147 @@ msgstr "" "Ignore les données incorrectement formatées et continue sans rien signaler. " "Implémenté dans :func:`ignore_errors`." -#: library/codecs.rst:316 -msgid "" -"The following error handlers are only applicable to :term:`text encodings " -"`:" -msgstr "" -"Les gestionnaires d'erreurs suivants ne s'appliquent que pour les :term:" -"`encodeurs de texte ` :" - -#: library/codecs.rst:330 +#: library/codecs.rst:339 msgid "``'replace'``" msgstr "``'replace'``" -#: library/codecs.rst:330 +#: library/codecs.rst:339 +#, fuzzy msgid "" -"Replace with a suitable replacement marker; Python will use the official ``U" -"+FFFD`` REPLACEMENT CHARACTER for the built-in codecs on decoding, and '?' " -"on encoding. Implemented in :func:`replace_errors`." +"Replace with a replacement marker. On encoding, use ``?`` (ASCII character). " +"On decoding, use ``�`` (U+FFFD, the official REPLACEMENT CHARACTER). " +"Implemented in :func:`replace_errors`." msgstr "" "Remplace avec une marque de substitution adaptée ; Python utilise le " "caractère de substitution officiel ``U+FFFD`` pour les codecs natifs lors du " "décodage et `'?'` lors de l'encodage. Implémenté dans :func:`replace_errors`." -#: library/codecs.rst:337 -msgid "``'xmlcharrefreplace'``" -msgstr "``'xmlcharrefreplace'``" - -#: library/codecs.rst:337 -msgid "" -"Replace with the appropriate XML character reference (only for encoding). " -"Implemented in :func:`xmlcharrefreplace_errors`." -msgstr "" -"Remplace avec la référence de caractère XML adaptée (uniquement pour " -"l'encodage). Implémenté dans :func:`xmlcharrefreplace_errors`." - -#: library/codecs.rst:341 +#: library/codecs.rst:345 msgid "``'backslashreplace'``" msgstr "``'backslashreplace'``" -#: library/codecs.rst:341 -msgid "" -"Replace with backslashed escape sequences. Implemented in :func:" -"`backslashreplace_errors`." -msgstr "" -"Remplace avec une séquence échappée par des antislashs. Implémenté dans :" -"func:`backslashreplace_errors`." - -#: library/codecs.rst:345 -msgid "``'namereplace'``" -msgstr "``'namereplace'``" - #: library/codecs.rst:345 msgid "" -"Replace with ``\\N{...}`` escape sequences (only for encoding). Implemented " -"in :func:`namereplace_errors`." +"Replace with backslashed escape sequences. On encoding, use hexadecimal form " +"of Unicode code point with formats ``\\xhh`` ``\\uxxxx`` ``\\Uxxxxxxxx``. On " +"decoding, use hexadecimal form of byte value with format ``\\xhh``. " +"Implemented in :func:`backslashreplace_errors`." msgstr "" -"Remplace avec des séquences échappées par ``\\N{...}`` (uniquement pour " -"l'encodage). Implémenté dans :func:`namereplace_errors`." -#: library/codecs.rst:349 +#: library/codecs.rst:353 msgid "``'surrogateescape'``" msgstr "``'surrogateescape'``" -#: library/codecs.rst:349 +#: library/codecs.rst:353 msgid "" -"On decoding, replace byte with individual surrogate code ranging from ``U" -"+DC80`` to ``U+DCFF``. This code will then be turned back into the same byte " -"when the ``'surrogateescape'`` error handler is used when encoding the data. " -"(See :pep:`383` for more.)" +"On decoding, replace byte with individual surrogate code ranging from " +"``U+DC80`` to ``U+DCFF``. This code will then be turned back into the same " +"byte when the ``'surrogateescape'`` error handler is used when encoding the " +"data. (See :pep:`383` for more.)" msgstr "" "Lors du décodage, remplace un octet par un code de substitution individuel " "allant de ``U+DC80`` à ``U+DCFF``. Ce code est reconverti vers l'octet de " "départ quand le gestionnaire d'erreurs ``'surrogateescape'`` est utilisé " "pour l'encodage des données (voir la :pep:`383` pour plus de détails)." -#: library/codecs.rst:358 +#: library/codecs.rst:367 +#, fuzzy +msgid "" +"The following error handlers are only applicable to encoding (within :term:" +"`text encodings `):" +msgstr "" +"Les gestionnaires d'erreurs suivants ne s'appliquent que pour les :term:" +"`encodeurs de texte ` :" + +#: library/codecs.rst:373 +msgid "``'xmlcharrefreplace'``" +msgstr "``'xmlcharrefreplace'``" + +#: library/codecs.rst:373 +#, fuzzy +msgid "" +"Replace with XML/HTML numeric character reference, which is a decimal form " +"of Unicode code point with format ``&#num;`` Implemented in :func:" +"`xmlcharrefreplace_errors`." +msgstr "" +"Remplace avec la référence de caractère XML adaptée (uniquement pour " +"l'encodage). Implémenté dans :func:`xmlcharrefreplace_errors`." + +#: library/codecs.rst:378 +msgid "``'namereplace'``" +msgstr "``'namereplace'``" + +#: library/codecs.rst:378 +#, fuzzy +msgid "" +"Replace with ``\\N{...}`` escape sequences, what appears in the braces is " +"the Name property from Unicode Character Database. Implemented in :func:" +"`namereplace_errors`." +msgstr "" +"Remplace avec des séquences échappées par ``\\N{...}`` (uniquement pour " +"l'encodage). Implémenté dans :func:`namereplace_errors`." + +#: library/codecs.rst:387 msgid "" "In addition, the following error handler is specific to the given codecs:" msgstr "" "En plus, le gestionnaire d'erreurs suivant est spécifique aux codecs " "suivants :" -#: library/codecs.rst:361 +#: library/codecs.rst:390 msgid "Codecs" msgstr "Codecs" -#: library/codecs.rst:363 +#: library/codecs.rst:392 msgid "``'surrogatepass'``" msgstr "``'surrogatepass'``" -#: library/codecs.rst:363 +#: library/codecs.rst:392 msgid "utf-8, utf-16, utf-32, utf-16-be, utf-16-le, utf-32-be, utf-32-le" msgstr "utf-8, utf-16, utf-32, utf-16-be, utf-16-le, utf-32-be, utf-32-le" -#: library/codecs.rst:363 +#: library/codecs.rst:392 +#, fuzzy msgid "" -"Allow encoding and decoding of surrogate codes. These codecs normally treat " -"the presence of surrogates as an error." +"Allow encoding and decoding surrogate code point (``U+D800`` - ``U+DFFF``) " +"as normal code point. Otherwise these codecs treat the presence of surrogate " +"code point in :class:`str` as an error." msgstr "" "Autorise l'encodage et le décodage de codes de substitution. Ces codecs " "traitent normalement la présence d'un code de substitution comme une erreur." # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:368 +#: library/codecs.rst:399 msgid "The ``'surrogateescape'`` and ``'surrogatepass'`` error handlers." msgstr "" "les gestionnaires d'erreurs ``'surrogateescape'`` et ``'surrogatepass'``." # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:371 +#: library/codecs.rst:402 +#, fuzzy msgid "" -"The ``'surrogatepass'`` error handlers now works with utf-16\\* and " -"utf-32\\* codecs." +"The ``'surrogatepass'`` error handler now works with utf-16\\* and utf-32\\* " +"codecs." msgstr "" "le gestionnaire d'erreurs ``'surrogatepass'`` fonctionne maintenant avec les " "codecs utf-16\\* et utf-32\\*." # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:374 +#: library/codecs.rst:406 msgid "The ``'namereplace'`` error handler." msgstr "le gestionnaire d'erreurs ``'namereplace'``." # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:377 +#: library/codecs.rst:409 +#, fuzzy msgid "" -"The ``'backslashreplace'`` error handlers now works with decoding and " +"The ``'backslashreplace'`` error handler now works with decoding and " "translating." msgstr "" "le gestionnaire d'erreurs ``'backslashreplace'`` fonctionne maintenant pour " "le décodage et la traduction." -#: library/codecs.rst:381 +#: library/codecs.rst:413 msgid "" "The set of allowed values can be extended by registering a new named error " "handler:" @@ -679,14 +700,14 @@ msgstr "" "L'ensemble des valeurs autorisées peut être étendu en enregistrant un " "nouveau gestionnaire d'erreurs nommé :" -#: library/codecs.rst:386 +#: library/codecs.rst:418 msgid "" "Register the error handling function *error_handler* under the name *name*. " "The *error_handler* argument will be called during encoding and decoding in " "case of an error, when *name* is specified as the errors parameter." msgstr "" -#: library/codecs.rst:390 +#: library/codecs.rst:422 msgid "" "For encoding, *error_handler* will be called with a :exc:" "`UnicodeEncodeError` instance, which contains information about the location " @@ -701,85 +722,123 @@ msgid "" "position is out of bound an :exc:`IndexError` will be raised." msgstr "" -#: library/codecs.rst:402 +#: library/codecs.rst:434 msgid "" "Decoding and translating works similarly, except :exc:`UnicodeDecodeError` " "or :exc:`UnicodeTranslateError` will be passed to the handler and that the " "replacement from the error handler will be put into the output directly." msgstr "" -#: library/codecs.rst:407 +#: library/codecs.rst:439 msgid "" "Previously registered error handlers (including the standard error handlers) " "can be looked up by name:" msgstr "" -#: library/codecs.rst:412 +#: library/codecs.rst:444 msgid "Return the error handler previously registered under the name *name*." msgstr "" -#: library/codecs.rst:414 +#: library/codecs.rst:446 msgid "Raises a :exc:`LookupError` in case the handler cannot be found." msgstr "" -#: library/codecs.rst:416 +#: library/codecs.rst:448 msgid "" "The following standard error handlers are also made available as module " "level functions:" msgstr "" -#: library/codecs.rst:421 +# pas de majuscule en début de phrase car suit un deux-points. +#: library/codecs.rst:453 +#, fuzzy +msgid "Implements the ``'strict'`` error handling." +msgstr "le gestionnaire d'erreurs ``'namereplace'``." + +#: library/codecs.rst:455 +msgid "Each encoding or decoding error raises a :exc:`UnicodeError`." +msgstr "" + +# pas de majuscule en début de phrase car suit un deux-points. +#: library/codecs.rst:460 +#, fuzzy +msgid "Implements the ``'ignore'`` error handling." +msgstr "le gestionnaire d'erreurs ``'namereplace'``." + +#: library/codecs.rst:462 +msgid "" +"Malformed data is ignored; encoding or decoding is continued without further " +"notice." +msgstr "" + +# pas de majuscule en début de phrase car suit un deux-points. +#: library/codecs.rst:468 +#, fuzzy +msgid "Implements the ``'replace'`` error handling." +msgstr "le gestionnaire d'erreurs ``'namereplace'``." + +#: library/codecs.rst:470 msgid "" -"Implements the ``'strict'`` error handling: each encoding or decoding error " -"raises a :exc:`UnicodeError`." +"Substitutes ``?`` (ASCII character) for encoding errors or ``�`` (U+FFFD, " +"the official REPLACEMENT CHARACTER) for decoding errors." msgstr "" -#: library/codecs.rst:427 +# pas de majuscule en début de phrase car suit un deux-points. +#: library/codecs.rst:476 +#, fuzzy +msgid "Implements the ``'backslashreplace'`` error handling." +msgstr "le gestionnaire d'erreurs ``'namereplace'``." + +#: library/codecs.rst:478 msgid "" -"Implements the ``'replace'`` error handling (for :term:`text encodings ` only): substitutes ``'?'`` for encoding errors (to be encoded by " -"the codec), and ``'\\ufffd'`` (the Unicode replacement character) for " -"decoding errors." +"Malformed data is replaced by a backslashed escape sequence. On encoding, " +"use the hexadecimal form of Unicode code point with formats ``\\xhh`` " +"``\\uxxxx`` ``\\Uxxxxxxxx``. On decoding, use the hexadecimal form of byte " +"value with format ``\\xhh``." msgstr "" -#: library/codecs.rst:435 +#: library/codecs.rst:483 +msgid "Works with decoding and translating." +msgstr "" + +#: library/codecs.rst:489 msgid "" -"Implements the ``'ignore'`` error handling: malformed data is ignored and " -"encoding or decoding is continued without further notice." +"Implements the ``'xmlcharrefreplace'`` error handling (for encoding within :" +"term:`text encoding` only)." msgstr "" -#: library/codecs.rst:441 +#: library/codecs.rst:492 msgid "" -"Implements the ``'xmlcharrefreplace'`` error handling (for encoding with :" -"term:`text encodings ` only): the unencodable character is " -"replaced by an appropriate XML character reference." +"The unencodable character is replaced by an appropriate XML/HTML numeric " +"character reference, which is a decimal form of Unicode code point with " +"format ``&#num;`` ." msgstr "" -#: library/codecs.rst:448 +#: library/codecs.rst:499 msgid "" -"Implements the ``'backslashreplace'`` error handling (for :term:`text " -"encodings ` only): malformed data is replaced by a " -"backslashed escape sequence." +"Implements the ``'namereplace'`` error handling (for encoding within :term:" +"`text encoding` only)." msgstr "" -#: library/codecs.rst:454 +#: library/codecs.rst:502 msgid "" -"Implements the ``'namereplace'`` error handling (for encoding with :term:" -"`text encodings ` only): the unencodable character is " -"replaced by a ``\\N{...}`` escape sequence." +"The unencodable character is replaced by a ``\\N{...}`` escape sequence. The " +"set of characters that appear in the braces is the Name property from " +"Unicode Character Database. For example, the German lowercase letter ``'ß'`` " +"will be converted to byte sequence ``\\N{LATIN SMALL LETTER SHARP S}`` ." msgstr "" -#: library/codecs.rst:464 +#: library/codecs.rst:513 msgid "Stateless Encoding and Decoding" msgstr "" -#: library/codecs.rst:466 +#: library/codecs.rst:515 msgid "" "The base :class:`Codec` class defines these methods which also define the " "function interfaces of the stateless encoder and decoder:" msgstr "" -#: library/codecs.rst:472 +#: library/codecs.rst:521 msgid "" "Encodes the object *input* and returns a tuple (output object, length " "consumed). For instance, :term:`text encoding` converts a string object to a " @@ -787,26 +846,26 @@ msgid "" "``iso-8859-1``)." msgstr "" -#: library/codecs.rst:499 +#: library/codecs.rst:548 msgid "" "The *errors* argument defines the error handling to apply. It defaults to " "``'strict'`` handling." msgstr "" -#: library/codecs.rst:480 +#: library/codecs.rst:529 msgid "" "The method may not store state in the :class:`Codec` instance. Use :class:" "`StreamWriter` for codecs which have to keep state in order to make encoding " "efficient." msgstr "" -#: library/codecs.rst:484 +#: library/codecs.rst:533 msgid "" "The encoder must be able to handle zero length input and return an empty " "object of the output object type in this situation." msgstr "" -#: library/codecs.rst:490 +#: library/codecs.rst:539 msgid "" "Decodes the object *input* and returns a tuple (output object, length " "consumed). For instance, for a :term:`text encoding`, decoding converts a " @@ -814,31 +873,31 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:495 +#: library/codecs.rst:544 msgid "" "For text encodings and bytes-to-bytes codecs, *input* must be a bytes object " "or one which provides the read-only buffer interface -- for example, buffer " "objects and memory mapped files." msgstr "" -#: library/codecs.rst:502 +#: library/codecs.rst:551 msgid "" "The method may not store state in the :class:`Codec` instance. Use :class:" "`StreamReader` for codecs which have to keep state in order to make decoding " "efficient." msgstr "" -#: library/codecs.rst:506 +#: library/codecs.rst:555 msgid "" "The decoder must be able to handle zero length input and return an empty " "object of the output object type in this situation." msgstr "" -#: library/codecs.rst:511 +#: library/codecs.rst:560 msgid "Incremental Encoding and Decoding" msgstr "" -#: library/codecs.rst:513 +#: library/codecs.rst:562 msgid "" "The :class:`IncrementalEncoder` and :class:`IncrementalDecoder` classes " "provide the basic interface for incremental encoding and decoding. Encoding/" @@ -849,7 +908,7 @@ msgid "" "during method calls." msgstr "" -#: library/codecs.rst:521 +#: library/codecs.rst:570 msgid "" "The joined output of calls to the :meth:`~IncrementalEncoder.encode`/:meth:" "`~IncrementalDecoder.decode` method is the same as if all the single inputs " @@ -857,36 +916,36 @@ msgid "" "encoder/decoder." msgstr "" -#: library/codecs.rst:530 +#: library/codecs.rst:579 msgid "IncrementalEncoder Objects" msgstr "" -#: library/codecs.rst:532 +#: library/codecs.rst:581 msgid "" "The :class:`IncrementalEncoder` class is used for encoding an input in " "multiple steps. It defines the following methods which every incremental " "encoder must define in order to be compatible with the Python codec registry." msgstr "" -#: library/codecs.rst:539 +#: library/codecs.rst:588 msgid "Constructor for an :class:`IncrementalEncoder` instance." msgstr "" -#: library/codecs.rst:541 +#: library/codecs.rst:590 msgid "" "All incremental encoders must provide this constructor interface. They are " "free to add additional keyword arguments, but only the ones defined here are " "used by the Python codec registry." msgstr "" -#: library/codecs.rst:545 +#: library/codecs.rst:594 msgid "" "The :class:`IncrementalEncoder` may implement different error handling " "schemes by providing the *errors* keyword argument. See :ref:`error-" "handlers` for possible values." msgstr "" -#: library/codecs.rst:549 +#: library/codecs.rst:598 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -894,21 +953,21 @@ msgid "" "`IncrementalEncoder` object." msgstr "" -#: library/codecs.rst:557 +#: library/codecs.rst:606 msgid "" "Encodes *object* (taking the current state of the encoder into account) and " "returns the resulting encoded object. If this is the last call to :meth:" "`encode` *final* must be true (the default is false)." msgstr "" -#: library/codecs.rst:564 +#: library/codecs.rst:613 msgid "" "Reset the encoder to the initial state. The output is discarded: call ``." "encode(object, final=True)``, passing an empty byte or text string if " "necessary, to reset the encoder and to get the output." msgstr "" -#: library/codecs.rst:571 +#: library/codecs.rst:620 msgid "" "Return the current state of the encoder which must be an integer. The " "implementation should make sure that ``0`` is the most common state. (States " @@ -917,42 +976,42 @@ msgid "" "into an integer.)" msgstr "" -#: library/codecs.rst:580 +#: library/codecs.rst:629 msgid "" "Set the state of the encoder to *state*. *state* must be an encoder state " "returned by :meth:`getstate`." msgstr "" -#: library/codecs.rst:587 +#: library/codecs.rst:636 msgid "IncrementalDecoder Objects" msgstr "" -#: library/codecs.rst:589 +#: library/codecs.rst:638 msgid "" "The :class:`IncrementalDecoder` class is used for decoding an input in " "multiple steps. It defines the following methods which every incremental " "decoder must define in order to be compatible with the Python codec registry." msgstr "" -#: library/codecs.rst:596 +#: library/codecs.rst:645 msgid "Constructor for an :class:`IncrementalDecoder` instance." msgstr "" -#: library/codecs.rst:598 +#: library/codecs.rst:647 msgid "" "All incremental decoders must provide this constructor interface. They are " "free to add additional keyword arguments, but only the ones defined here are " "used by the Python codec registry." msgstr "" -#: library/codecs.rst:602 +#: library/codecs.rst:651 msgid "" "The :class:`IncrementalDecoder` may implement different error handling " "schemes by providing the *errors* keyword argument. See :ref:`error-" "handlers` for possible values." msgstr "" -#: library/codecs.rst:606 +#: library/codecs.rst:655 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -960,7 +1019,7 @@ msgid "" "`IncrementalDecoder` object." msgstr "" -#: library/codecs.rst:614 +#: library/codecs.rst:663 msgid "" "Decodes *object* (taking the current state of the decoder into account) and " "returns the resulting decoded object. If this is the last call to :meth:" @@ -971,11 +1030,11 @@ msgid "" "(which might raise an exception)." msgstr "" -#: library/codecs.rst:625 +#: library/codecs.rst:674 msgid "Reset the decoder to the initial state." msgstr "" -#: library/codecs.rst:630 +#: library/codecs.rst:679 msgid "" "Return the current state of the decoder. This must be a tuple with two " "items, the first must be the buffer containing the still undecoded input. " @@ -990,59 +1049,59 @@ msgid "" "bytes of the resulting string into an integer.)" msgstr "" -#: library/codecs.rst:645 +#: library/codecs.rst:694 msgid "" "Set the state of the decoder to *state*. *state* must be a decoder state " "returned by :meth:`getstate`." msgstr "" -#: library/codecs.rst:650 +#: library/codecs.rst:699 msgid "Stream Encoding and Decoding" msgstr "" -#: library/codecs.rst:653 +#: library/codecs.rst:702 msgid "" "The :class:`StreamWriter` and :class:`StreamReader` classes provide generic " "working interfaces which can be used to implement new encoding submodules " "very easily. See :mod:`encodings.utf_8` for an example of how this is done." msgstr "" -#: library/codecs.rst:661 +#: library/codecs.rst:710 msgid "StreamWriter Objects" msgstr "" -#: library/codecs.rst:663 +#: library/codecs.rst:712 msgid "" "The :class:`StreamWriter` class is a subclass of :class:`Codec` and defines " "the following methods which every stream writer must define in order to be " "compatible with the Python codec registry." msgstr "" -#: library/codecs.rst:670 +#: library/codecs.rst:719 msgid "Constructor for a :class:`StreamWriter` instance." msgstr "" -#: library/codecs.rst:672 +#: library/codecs.rst:721 msgid "" "All stream writers must provide this constructor interface. They are free to " "add additional keyword arguments, but only the ones defined here are used by " "the Python codec registry." msgstr "" -#: library/codecs.rst:676 +#: library/codecs.rst:725 msgid "" "The *stream* argument must be a file-like object open for writing text or " "binary data, as appropriate for the specific codec." msgstr "" -#: library/codecs.rst:679 +#: library/codecs.rst:728 msgid "" "The :class:`StreamWriter` may implement different error handling schemes by " "providing the *errors* keyword argument. See :ref:`error-handlers` for the " "standard error handlers the underlying stream codec may support." msgstr "" -#: library/codecs.rst:683 +#: library/codecs.rst:732 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -1050,70 +1109,70 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:689 +#: library/codecs.rst:738 msgid "Writes the object's contents encoded to the stream." msgstr "" -#: library/codecs.rst:694 +#: library/codecs.rst:743 msgid "" -"Writes the concatenated list of strings to the stream (possibly by reusing " -"the :meth:`write` method). The standard bytes-to-bytes codecs do not support " -"this method." +"Writes the concatenated iterable of strings to the stream (possibly by " +"reusing the :meth:`write` method). Infinite or very large iterables are not " +"supported. The standard bytes-to-bytes codecs do not support this method." msgstr "" -#: library/codecs.rst:796 +#: library/codecs.rst:846 msgid "Resets the codec buffers used for keeping internal state." msgstr "" -#: library/codecs.rst:703 +#: library/codecs.rst:753 msgid "" "Calling this method should ensure that the data on the output is put into a " "clean state that allows appending of new fresh data without having to rescan " "the whole stream to recover state." msgstr "" -#: library/codecs.rst:708 +#: library/codecs.rst:758 msgid "" "In addition to the above methods, the :class:`StreamWriter` must also " "inherit all other methods and attributes from the underlying stream." msgstr "" -#: library/codecs.rst:715 +#: library/codecs.rst:765 msgid "StreamReader Objects" msgstr "" -#: library/codecs.rst:717 +#: library/codecs.rst:767 msgid "" "The :class:`StreamReader` class is a subclass of :class:`Codec` and defines " "the following methods which every stream reader must define in order to be " "compatible with the Python codec registry." msgstr "" -#: library/codecs.rst:724 +#: library/codecs.rst:774 msgid "Constructor for a :class:`StreamReader` instance." msgstr "" -#: library/codecs.rst:726 +#: library/codecs.rst:776 msgid "" "All stream readers must provide this constructor interface. They are free to " "add additional keyword arguments, but only the ones defined here are used by " "the Python codec registry." msgstr "" -#: library/codecs.rst:730 +#: library/codecs.rst:780 msgid "" "The *stream* argument must be a file-like object open for reading text or " "binary data, as appropriate for the specific codec." msgstr "" -#: library/codecs.rst:733 +#: library/codecs.rst:783 msgid "" "The :class:`StreamReader` may implement different error handling schemes by " "providing the *errors* keyword argument. See :ref:`error-handlers` for the " "standard error handlers the underlying stream codec may support." msgstr "" -#: library/codecs.rst:737 +#: library/codecs.rst:787 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -1121,24 +1180,24 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:741 +#: library/codecs.rst:791 msgid "" "The set of allowed values for the *errors* argument can be extended with :" "func:`register_error`." msgstr "" -#: library/codecs.rst:747 +#: library/codecs.rst:797 msgid "Decodes data from the stream and returns the resulting object." msgstr "" -#: library/codecs.rst:749 +#: library/codecs.rst:799 msgid "" "The *chars* argument indicates the number of decoded code points or bytes to " "return. The :func:`read` method will never return more data than requested, " "but it might return less, if there is not enough available." msgstr "" -#: library/codecs.rst:754 +#: library/codecs.rst:804 msgid "" "The *size* argument indicates the approximate maximum number of encoded " "bytes or code points to read for decoding. The decoder can modify this " @@ -1147,13 +1206,13 @@ msgid "" "huge files in one step." msgstr "" -#: library/codecs.rst:761 +#: library/codecs.rst:811 msgid "" "The *firstline* flag indicates that it would be sufficient to only return " "the first line, if there are decoding errors on later lines." msgstr "" -#: library/codecs.rst:765 +#: library/codecs.rst:815 msgid "" "The method should use a greedy read strategy meaning that it should read as " "much data as is allowed within the definition of the encoding and the given " @@ -1161,68 +1220,68 @@ msgid "" "the stream, these should be read too." msgstr "" -#: library/codecs.rst:773 +#: library/codecs.rst:823 msgid "Read one line from the input stream and return the decoded data." msgstr "" -#: library/codecs.rst:775 +#: library/codecs.rst:825 msgid "" "*size*, if given, is passed as size argument to the stream's :meth:`read` " "method." msgstr "" -#: library/codecs.rst:778 +#: library/codecs.rst:828 msgid "" "If *keepends* is false line-endings will be stripped from the lines returned." msgstr "" -#: library/codecs.rst:784 +#: library/codecs.rst:834 msgid "" "Read all lines available on the input stream and return them as a list of " "lines." msgstr "" -#: library/codecs.rst:787 +#: library/codecs.rst:837 msgid "" "Line-endings are implemented using the codec's :meth:`decode` method and are " "included in the list entries if *keepends* is true." msgstr "" -#: library/codecs.rst:790 +#: library/codecs.rst:840 msgid "" "*sizehint*, if given, is passed as the *size* argument to the stream's :meth:" "`read` method." msgstr "" -#: library/codecs.rst:798 +#: library/codecs.rst:848 msgid "" "Note that no stream repositioning should take place. This method is " "primarily intended to be able to recover from decoding errors." msgstr "" -#: library/codecs.rst:802 +#: library/codecs.rst:852 msgid "" "In addition to the above methods, the :class:`StreamReader` must also " "inherit all other methods and attributes from the underlying stream." msgstr "" -#: library/codecs.rst:808 +#: library/codecs.rst:858 msgid "StreamReaderWriter Objects" msgstr "" -#: library/codecs.rst:810 +#: library/codecs.rst:860 msgid "" "The :class:`StreamReaderWriter` is a convenience class that allows wrapping " "streams which work in both read and write modes." msgstr "" -#: library/codecs.rst:837 +#: library/codecs.rst:887 msgid "" "The design is such that one can use the factory functions returned by the :" "func:`lookup` function to construct the instance." msgstr "" -#: library/codecs.rst:819 +#: library/codecs.rst:869 msgid "" "Creates a :class:`StreamReaderWriter` instance. *stream* must be a file-like " "object. *Reader* and *Writer* must be factory functions or classes providing " @@ -1231,24 +1290,24 @@ msgid "" "writers." msgstr "" -#: library/codecs.rst:824 +#: library/codecs.rst:874 msgid "" ":class:`StreamReaderWriter` instances define the combined interfaces of :" "class:`StreamReader` and :class:`StreamWriter` classes. They inherit all " "other methods and attributes from the underlying stream." msgstr "" -#: library/codecs.rst:832 +#: library/codecs.rst:882 msgid "StreamRecoder Objects" msgstr "" -#: library/codecs.rst:834 +#: library/codecs.rst:884 msgid "" "The :class:`StreamRecoder` translates data from one encoding to another, " "which is sometimes useful when dealing with different encoding environments." msgstr "" -#: library/codecs.rst:843 +#: library/codecs.rst:893 msgid "" "Creates a :class:`StreamRecoder` instance which implements a two-way " "conversion: *encode* and *decode* work on the frontend — the data visible to " @@ -1256,17 +1315,17 @@ msgid "" "work on the backend — the data in *stream*." msgstr "" -#: library/codecs.rst:848 +#: library/codecs.rst:898 msgid "" "You can use these objects to do transparent transcodings, e.g., from Latin-1 " "to UTF-8 and back." msgstr "" -#: library/codecs.rst:851 +#: library/codecs.rst:901 msgid "The *stream* argument must be a file-like object." msgstr "" -#: library/codecs.rst:853 +#: library/codecs.rst:903 msgid "" "The *encode* and *decode* arguments must adhere to the :class:`Codec` " "interface. *Reader* and *Writer* must be factory functions or classes " @@ -1274,36 +1333,36 @@ msgid "" "interface respectively." msgstr "" -#: library/codecs.rst:858 +#: library/codecs.rst:908 msgid "" "Error handling is done in the same way as defined for the stream readers and " "writers." msgstr "" -#: library/codecs.rst:862 +#: library/codecs.rst:912 msgid "" ":class:`StreamRecoder` instances define the combined interfaces of :class:" "`StreamReader` and :class:`StreamWriter` classes. They inherit all other " "methods and attributes from the underlying stream." msgstr "" -#: library/codecs.rst:870 +#: library/codecs.rst:920 msgid "Encodings and Unicode" msgstr "" -#: library/codecs.rst:872 +#: library/codecs.rst:922 msgid "" -"Strings are stored internally as sequences of code points in range ``0x0``--" -"``0x10FFFF``. (See :pep:`393` for more details about the implementation.) " -"Once a string object is used outside of CPU and memory, endianness and how " -"these arrays are stored as bytes become an issue. As with other codecs, " -"serialising a string into a sequence of bytes is known as *encoding*, and " -"recreating the string from the sequence of bytes is known as *decoding*. " -"There are a variety of different text serialisation codecs, which are " -"collectivity referred to as :term:`text encodings `." +"Strings are stored internally as sequences of code points in range " +"``U+0000``--``U+10FFFF``. (See :pep:`393` for more details about the " +"implementation.) Once a string object is used outside of CPU and memory, " +"endianness and how these arrays are stored as bytes become an issue. As with " +"other codecs, serialising a string into a sequence of bytes is known as " +"*encoding*, and recreating the string from the sequence of bytes is known as " +"*decoding*. There are a variety of different text serialisation codecs, " +"which are collectivity referred to as :term:`text encodings `." msgstr "" -#: library/codecs.rst:882 +#: library/codecs.rst:932 msgid "" "The simplest text encoding (called ``'latin-1'`` or ``'iso-8859-1'``) maps " "the code points 0--255 to the bytes ``0x0``--``0xff``, which means that a " @@ -1314,7 +1373,7 @@ msgid "" "position 3: ordinal not in range(256)``." msgstr "" -#: library/codecs.rst:890 +#: library/codecs.rst:940 msgid "" "There's another group of encodings (the so called charmap encodings) that " "choose a different subset of all Unicode code points and how these code " @@ -1324,7 +1383,7 @@ msgid "" "that shows you which character is mapped to which byte value." msgstr "" -#: library/codecs.rst:897 +#: library/codecs.rst:947 msgid "" "All of these encodings can only encode 256 of the 1114112 code points " "defined in Unicode. A simple and straightforward way that can store each " @@ -1340,7 +1399,7 @@ msgid "" "Order Mark\"). This is the Unicode character ``U+FEFF``. This character can " "be prepended to every ``UTF-16`` or ``UTF-32`` byte sequence. The byte " "swapped version of this character (``0xFFFE``) is an illegal character that " -"may not appear in a Unicode text. So when the first character in an " +"may not appear in a Unicode text. So when the first character in a " "``UTF-16`` or ``UTF-32`` byte sequence appears to be a ``U+FFFE`` the bytes " "have to be swapped on decoding. Unfortunately the character ``U+FEFF`` had a " "second purpose as a ``ZERO WIDTH NO-BREAK SPACE``: a character that has no " @@ -1354,9 +1413,9 @@ msgid "" "normal character that will be decoded like any other." msgstr "" -#: library/codecs.rst:923 +#: library/codecs.rst:973 msgid "" -"There's another encoding that is able to encoding the full range of Unicode " +"There's another encoding that is able to encode the full range of Unicode " "characters: UTF-8. UTF-8 is an 8-bit encoding, which means there are no " "issues with byte order in UTF-8. Each byte in a UTF-8 byte sequence consists " "of two parts: marker bits (the most significant bits) and payload bits. The " @@ -1365,72 +1424,71 @@ msgid "" "which when concatenated give the Unicode character):" msgstr "" -#: library/codecs.rst:932 +#: library/codecs.rst:982 msgid "Range" msgstr "*Range*" -#: library/codecs.rst:932 +#: library/codecs.rst:982 #, fuzzy msgid "Encoding" msgstr "Encodages" -#: library/codecs.rst:934 +#: library/codecs.rst:984 msgid "``U-00000000`` ... ``U-0000007F``" msgstr "``U-00000000`` ... ``U-0000007F``" -#: library/codecs.rst:934 +#: library/codecs.rst:984 msgid "0xxxxxxx" msgstr "0xxxxxxx" -#: library/codecs.rst:936 +#: library/codecs.rst:986 msgid "``U-00000080`` ... ``U-000007FF``" msgstr "``U-00000080`` ... ``U-000007FF``" -#: library/codecs.rst:936 +#: library/codecs.rst:986 msgid "110xxxxx 10xxxxxx" msgstr "110xxxxx 10xxxxxx" -#: library/codecs.rst:938 +#: library/codecs.rst:988 msgid "``U-00000800`` ... ``U-0000FFFF``" msgstr "``U-00000800`` ... ``U-0000FFFF``" -#: library/codecs.rst:938 +#: library/codecs.rst:988 msgid "1110xxxx 10xxxxxx 10xxxxxx" msgstr "1110xxxx 10xxxxxx 10xxxxxx" -#: library/codecs.rst:940 +#: library/codecs.rst:990 msgid "``U-00010000`` ... ``U-0010FFFF``" msgstr "``U-00010000`` ... ``U-0010FFFF``" -#: library/codecs.rst:940 +#: library/codecs.rst:990 msgid "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" msgstr "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" -#: library/codecs.rst:943 +#: library/codecs.rst:993 msgid "" "The least significant bit of the Unicode character is the rightmost x bit." msgstr "" -#: library/codecs.rst:945 +#: library/codecs.rst:995 msgid "" "As UTF-8 is an 8-bit encoding no BOM is required and any ``U+FEFF`` " "character in the decoded string (even if it's the first character) is " "treated as a ``ZERO WIDTH NO-BREAK SPACE``." msgstr "" -#: library/codecs.rst:949 +#: library/codecs.rst:999 msgid "" "Without external information it's impossible to reliably determine which " "encoding was used for encoding a string. Each charmap encoding can decode " "any random byte sequence. However that's not possible with UTF-8, as UTF-8 " "byte sequences have a structure that doesn't allow arbitrary byte sequences. " "To increase the reliability with which a UTF-8 encoding can be detected, " -"Microsoft invented a variant of UTF-8 (that Python 2.5 calls ``\"utf-8-sig" -"\"``) for its Notepad program: Before any of the Unicode characters is " -"written to the file, a UTF-8 encoded BOM (which looks like this as a byte " -"sequence: ``0xef``, ``0xbb``, ``0xbf``) is written. As it's rather " -"improbable that any charmap encoded file starts with these byte values " -"(which would e.g. map to" +"Microsoft invented a variant of UTF-8 (that Python calls ``\"utf-8-sig\"``) " +"for its Notepad program: Before any of the Unicode characters is written to " +"the file, a UTF-8 encoded BOM (which looks like this as a byte sequence: " +"``0xef``, ``0xbb``, ``0xbf``) is written. As it's rather improbable that any " +"charmap encoded file starts with these byte values (which would e.g. map to" msgstr "" #: library/codecs.rst:0 @@ -1445,7 +1503,7 @@ msgstr "RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK" msgid "INVERTED QUESTION MARK" msgstr "INVERTED QUESTION MARK" -#: library/codecs.rst:965 +#: library/codecs.rst:1015 msgid "" "in iso-8859-1), this increases the probability that a ``utf-8-sig`` encoding " "can be correctly guessed from the byte sequence. So here the BOM is not used " @@ -1457,11 +1515,11 @@ msgid "" "the use of the BOM is discouraged and should generally be avoided." msgstr "" -#: library/codecs.rst:978 +#: library/codecs.rst:1028 msgid "Standard Encodings" msgstr "" -#: library/codecs.rst:980 +#: library/codecs.rst:1030 msgid "" "Python comes with a number of codecs built-in, either implemented as C " "functions or with dictionaries as mapping tables. The following table lists " @@ -1473,7 +1531,7 @@ msgid "" "alias for the ``'utf_8'`` codec." msgstr "" -#: library/codecs.rst:990 +#: library/codecs.rst:1040 msgid "" "Some common encodings can bypass the codecs lookup machinery to improve " "performance. These optimization opportunities are only recognized by CPython " @@ -1483,11 +1541,11 @@ msgid "" "Using alternative aliases for these encodings may result in slower execution." msgstr "" -#: library/codecs.rst:998 +#: library/codecs.rst:1048 msgid "Optimization opportunity recognized for us-ascii." msgstr "" -#: library/codecs.rst:1001 +#: library/codecs.rst:1051 msgid "" "Many of the character sets support the same languages. They vary in " "individual characters (e.g. whether the EURO SIGN is supported or not), and " @@ -1495,485 +1553,485 @@ msgid "" "languages in particular, the following variants typically exist:" msgstr "" -#: library/codecs.rst:1006 +#: library/codecs.rst:1056 msgid "an ISO 8859 codeset" msgstr "" -#: library/codecs.rst:1008 +#: library/codecs.rst:1058 msgid "" "a Microsoft Windows code page, which is typically derived from an 8859 " "codeset, but replaces control characters with additional graphic characters" msgstr "" -#: library/codecs.rst:1011 +#: library/codecs.rst:1061 msgid "an IBM EBCDIC code page" msgstr "" -#: library/codecs.rst:1013 +#: library/codecs.rst:1063 msgid "an IBM PC code page, which is ASCII compatible" msgstr "" -#: library/codecs.rst:1273 library/codecs.rst:1395 +#: library/codecs.rst:1323 library/codecs.rst:1445 msgid "Codec" msgstr "" -#: library/codecs.rst:1273 library/codecs.rst:1395 +#: library/codecs.rst:1323 library/codecs.rst:1445 msgid "Aliases" msgstr "" -#: library/codecs.rst:1018 +#: library/codecs.rst:1068 msgid "Languages" msgstr "" -#: library/codecs.rst:1020 +#: library/codecs.rst:1070 msgid "ascii" msgstr "*ascii*" -#: library/codecs.rst:1020 +#: library/codecs.rst:1070 msgid "646, us-ascii" msgstr "*646*, *us-ascii*" -#: library/codecs.rst:1026 library/codecs.rst:1034 +#: library/codecs.rst:1076 library/codecs.rst:1084 msgid "English" msgstr "Anglais" -#: library/codecs.rst:1022 +#: library/codecs.rst:1072 msgid "big5" msgstr "*big5*" -#: library/codecs.rst:1022 +#: library/codecs.rst:1072 msgid "big5-tw, csbig5" msgstr "*big5-tw*, *csbig5*" -#: library/codecs.rst:1024 library/codecs.rst:1082 +#: library/codecs.rst:1074 library/codecs.rst:1132 msgid "Traditional Chinese" msgstr "Chinois Traditionnel" -#: library/codecs.rst:1024 +#: library/codecs.rst:1074 msgid "big5hkscs" msgstr "*big5hkscs*" -#: library/codecs.rst:1024 +#: library/codecs.rst:1074 msgid "big5-hkscs, hkscs" msgstr "*big5-hkscs*, *hkscs*" -#: library/codecs.rst:1026 +#: library/codecs.rst:1076 msgid "cp037" msgstr "*cp037*" -#: library/codecs.rst:1026 +#: library/codecs.rst:1076 msgid "IBM037, IBM039" msgstr "*IBM037*, *IBM039*" -#: library/codecs.rst:1028 +#: library/codecs.rst:1078 msgid "cp273" msgstr "*cp273*" -#: library/codecs.rst:1028 +#: library/codecs.rst:1078 msgid "273, IBM273, csIBM273" msgstr "*273*, *IBM273*, *csIBM273*" -#: library/codecs.rst:1028 +#: library/codecs.rst:1078 msgid "German" msgstr "Allemand" -#: library/codecs.rst:1032 +#: library/codecs.rst:1082 msgid "cp424" msgstr "*cp424*" -#: library/codecs.rst:1032 +#: library/codecs.rst:1082 msgid "EBCDIC-CP-HE, IBM424" msgstr "*EBCDIC-CP-HE*, *IBM424*" -#: library/codecs.rst:1052 library/codecs.rst:1105 library/codecs.rst:1168 +#: library/codecs.rst:1102 library/codecs.rst:1155 library/codecs.rst:1218 msgid "Hebrew" msgstr "Hébreux" -#: library/codecs.rst:1034 +#: library/codecs.rst:1084 msgid "cp437" msgstr "*cp437*" -#: library/codecs.rst:1034 +#: library/codecs.rst:1084 msgid "437, IBM437" msgstr "*437*, *IBM437*" -#: library/codecs.rst:1036 +#: library/codecs.rst:1086 msgid "cp500" msgstr "*cp500*" -#: library/codecs.rst:1036 +#: library/codecs.rst:1086 msgid "EBCDIC-CP-BE, EBCDIC-CP-CH, IBM500" msgstr "*EBCDIC-CP-BE*, *EBCDIC-CP-CH*, *IBM500*" -#: library/codecs.rst:1045 library/codecs.rst:1092 library/codecs.rst:1152 -#: library/codecs.rst:1208 +#: library/codecs.rst:1095 library/codecs.rst:1142 library/codecs.rst:1202 +#: library/codecs.rst:1258 msgid "Western Europe" msgstr "Europe de l'ouest" -#: library/codecs.rst:1039 +#: library/codecs.rst:1089 msgid "cp720" msgstr "*cp720*" -#: library/codecs.rst:1066 library/codecs.rst:1164 +#: library/codecs.rst:1116 library/codecs.rst:1214 msgid "Arabic" msgstr "Arabe" -#: library/codecs.rst:1041 +#: library/codecs.rst:1091 msgid "cp737" msgstr "*cp737*" -#: library/codecs.rst:1072 library/codecs.rst:1101 library/codecs.rst:1201 +#: library/codecs.rst:1122 library/codecs.rst:1151 library/codecs.rst:1251 msgid "Greek" msgstr "Grec" -#: library/codecs.rst:1043 +#: library/codecs.rst:1093 msgid "cp775" msgstr "*cp775*" -#: library/codecs.rst:1043 +#: library/codecs.rst:1093 msgid "IBM775" msgstr "*IBM775*" -#: library/codecs.rst:1109 library/codecs.rst:1176 +#: library/codecs.rst:1159 library/codecs.rst:1226 msgid "Baltic languages" msgstr "Langues Baltiques" -#: library/codecs.rst:1045 +#: library/codecs.rst:1095 msgid "cp850" msgstr "*cp850*" -#: library/codecs.rst:1045 +#: library/codecs.rst:1095 msgid "850, IBM850" msgstr "*850*, *IBM850*" -#: library/codecs.rst:1047 +#: library/codecs.rst:1097 msgid "cp852" msgstr "*cp852*" -#: library/codecs.rst:1047 +#: library/codecs.rst:1097 msgid "852, IBM852" msgstr "*852*, *IBM852*" -#: library/codecs.rst:1094 library/codecs.rst:1205 +#: library/codecs.rst:1144 library/codecs.rst:1255 msgid "Central and Eastern Europe" msgstr "Europe centrale et Europe de l'Est" -#: library/codecs.rst:1049 +#: library/codecs.rst:1099 msgid "cp855" msgstr "*cp855*" -#: library/codecs.rst:1049 +#: library/codecs.rst:1099 msgid "855, IBM855" msgstr "*855*, *IBM855*" -#: library/codecs.rst:1096 library/codecs.rst:1198 +#: library/codecs.rst:1146 library/codecs.rst:1248 msgid "Bulgarian, Byelorussian, Macedonian, Russian, Serbian" msgstr "Bulgare, Biélorusse, Macédonien, Russe, Serbe" -#: library/codecs.rst:1052 +#: library/codecs.rst:1102 msgid "cp856" msgstr "*cp856*" -#: library/codecs.rst:1054 +#: library/codecs.rst:1104 msgid "cp857" msgstr "*cp857*" -#: library/codecs.rst:1054 +#: library/codecs.rst:1104 msgid "857, IBM857" msgstr "*857*, *IBM857*" -#: library/codecs.rst:1086 library/codecs.rst:1170 library/codecs.rst:1210 +#: library/codecs.rst:1136 library/codecs.rst:1220 library/codecs.rst:1260 msgid "Turkish" msgstr "Turc" -#: library/codecs.rst:1056 +#: library/codecs.rst:1106 msgid "cp858" msgstr "*cp858*" -#: library/codecs.rst:1056 +#: library/codecs.rst:1106 msgid "858, IBM858" msgstr "*858*, *IBM858*" -#: library/codecs.rst:1058 +#: library/codecs.rst:1108 msgid "cp860" msgstr "*cp860*" -#: library/codecs.rst:1058 +#: library/codecs.rst:1108 msgid "860, IBM860" msgstr "*860*, *IBM860*" -#: library/codecs.rst:1058 +#: library/codecs.rst:1108 msgid "Portuguese" msgstr "Portugais" -#: library/codecs.rst:1060 +#: library/codecs.rst:1110 msgid "cp861" msgstr "*cp861*" -#: library/codecs.rst:1060 +#: library/codecs.rst:1110 msgid "861, CP-IS, IBM861" msgstr "*861*, *CP-IS*, *IBM861*" -#: library/codecs.rst:1203 +#: library/codecs.rst:1253 msgid "Icelandic" msgstr "Islandais" -#: library/codecs.rst:1062 +#: library/codecs.rst:1112 msgid "cp862" msgstr "*cp862*" -#: library/codecs.rst:1062 +#: library/codecs.rst:1112 msgid "862, IBM862" msgstr "*862*, *IBM862*" -#: library/codecs.rst:1064 +#: library/codecs.rst:1114 msgid "cp863" msgstr "*cp863*" -#: library/codecs.rst:1064 +#: library/codecs.rst:1114 msgid "863, IBM863" msgstr "*863*, *IBM863*" -#: library/codecs.rst:1064 +#: library/codecs.rst:1114 msgid "Canadian" msgstr "Canadien" -#: library/codecs.rst:1066 +#: library/codecs.rst:1116 msgid "cp864" msgstr "*cp864*" -#: library/codecs.rst:1066 +#: library/codecs.rst:1116 msgid "IBM864" msgstr "*IBM864*" -#: library/codecs.rst:1068 +#: library/codecs.rst:1118 msgid "cp865" msgstr "*cp865*" -#: library/codecs.rst:1068 +#: library/codecs.rst:1118 msgid "865, IBM865" msgstr "*865*, *IBM865*" -#: library/codecs.rst:1068 +#: library/codecs.rst:1118 msgid "Danish, Norwegian" msgstr "" -#: library/codecs.rst:1070 +#: library/codecs.rst:1120 msgid "cp866" msgstr "*cp866*" -#: library/codecs.rst:1070 +#: library/codecs.rst:1120 msgid "866, IBM866" msgstr "*866*, *IBM866*" -#: library/codecs.rst:1186 +#: library/codecs.rst:1236 msgid "Russian" msgstr "Russe" -#: library/codecs.rst:1072 +#: library/codecs.rst:1122 msgid "cp869" msgstr "*cp869*" -#: library/codecs.rst:1072 +#: library/codecs.rst:1122 msgid "869, CP-GR, IBM869" msgstr "*869*, *CP-GR*, *IBM869*" -#: library/codecs.rst:1074 +#: library/codecs.rst:1124 msgid "cp874" msgstr "*cp874*" -#: library/codecs.rst:1074 +#: library/codecs.rst:1124 msgid "Thai" msgstr "" -#: library/codecs.rst:1076 +#: library/codecs.rst:1126 msgid "cp875" msgstr "*cp875*" -#: library/codecs.rst:1078 +#: library/codecs.rst:1128 msgid "cp932" msgstr "*cp932*" -#: library/codecs.rst:1078 +#: library/codecs.rst:1128 msgid "932, ms932, mskanji, ms-kanji" msgstr "*932*, *ms932*, *mskanji*, *ms-kanji*" -#: library/codecs.rst:1113 library/codecs.rst:1117 library/codecs.rst:1137 -#: library/codecs.rst:1145 library/codecs.rst:1215 library/codecs.rst:1221 +#: library/codecs.rst:1163 library/codecs.rst:1167 library/codecs.rst:1187 +#: library/codecs.rst:1195 library/codecs.rst:1265 library/codecs.rst:1271 msgid "Japanese" msgstr "" -#: library/codecs.rst:1080 +#: library/codecs.rst:1130 msgid "cp949" msgstr "*cp949*" -#: library/codecs.rst:1080 +#: library/codecs.rst:1130 msgid "949, ms949, uhc" msgstr "*949*, *ms949*, *uhc*" -#: library/codecs.rst:1119 library/codecs.rst:1184 +#: library/codecs.rst:1169 library/codecs.rst:1234 msgid "Korean" msgstr "" -#: library/codecs.rst:1082 +#: library/codecs.rst:1132 msgid "cp950" msgstr "*cp950*" -#: library/codecs.rst:1082 +#: library/codecs.rst:1132 msgid "950, ms950" msgstr "*950*, *ms950*" -#: library/codecs.rst:1084 +#: library/codecs.rst:1134 msgid "cp1006" msgstr "*cp1006*" -#: library/codecs.rst:1084 +#: library/codecs.rst:1134 msgid "Urdu" msgstr "" -#: library/codecs.rst:1086 +#: library/codecs.rst:1136 msgid "cp1026" msgstr "*cp1026*" -#: library/codecs.rst:1086 +#: library/codecs.rst:1136 msgid "ibm1026" msgstr "*ibm1026*" -#: library/codecs.rst:1088 +#: library/codecs.rst:1138 msgid "cp1125" msgstr "*cp1125*" -#: library/codecs.rst:1088 +#: library/codecs.rst:1138 msgid "1125, ibm1125, cp866u, ruscii" msgstr "*1125*, *ibm1125*, *cp866u*, *ruscii*" -#: library/codecs.rst:1192 +#: library/codecs.rst:1242 msgid "Ukrainian" msgstr "" -#: library/codecs.rst:1092 +#: library/codecs.rst:1142 msgid "cp1140" msgstr "*cp1140*" -#: library/codecs.rst:1092 +#: library/codecs.rst:1142 msgid "ibm1140" msgstr "*ibm1140*" -#: library/codecs.rst:1094 +#: library/codecs.rst:1144 msgid "cp1250" msgstr "*cp1250*" -#: library/codecs.rst:1094 +#: library/codecs.rst:1144 msgid "windows-1250" msgstr "*windows-1250*" -#: library/codecs.rst:1096 +#: library/codecs.rst:1146 msgid "cp1251" msgstr "*cp1251*" -#: library/codecs.rst:1096 +#: library/codecs.rst:1146 msgid "windows-1251" msgstr "*windows-1251*" -#: library/codecs.rst:1099 +#: library/codecs.rst:1149 msgid "cp1252" msgstr "*cp1252*" -#: library/codecs.rst:1099 +#: library/codecs.rst:1149 msgid "windows-1252" msgstr "*windows-1252*" -#: library/codecs.rst:1101 +#: library/codecs.rst:1151 msgid "cp1253" msgstr "*cp1253*" -#: library/codecs.rst:1101 +#: library/codecs.rst:1151 msgid "windows-1253" msgstr "*windows-1253*" -#: library/codecs.rst:1103 +#: library/codecs.rst:1153 msgid "cp1254" msgstr "*cp1254*" -#: library/codecs.rst:1103 +#: library/codecs.rst:1153 msgid "windows-1254" msgstr "*windows-1254*" -#: library/codecs.rst:1105 +#: library/codecs.rst:1155 msgid "cp1255" msgstr "*cp1255*" -#: library/codecs.rst:1105 +#: library/codecs.rst:1155 msgid "windows-1255" msgstr "*windows-1255*" -#: library/codecs.rst:1107 +#: library/codecs.rst:1157 msgid "cp1256" msgstr "*cp1256*" -#: library/codecs.rst:1107 +#: library/codecs.rst:1157 msgid "windows-1256" msgstr "*windows-1256*" -#: library/codecs.rst:1109 +#: library/codecs.rst:1159 msgid "cp1257" msgstr "*cp1257*" -#: library/codecs.rst:1109 +#: library/codecs.rst:1159 msgid "windows-1257" msgstr "*windows-1257*" -#: library/codecs.rst:1111 +#: library/codecs.rst:1161 msgid "cp1258" msgstr "*cp1258*" -#: library/codecs.rst:1111 +#: library/codecs.rst:1161 msgid "windows-1258" msgstr "*windows-1258*" -#: library/codecs.rst:1111 +#: library/codecs.rst:1161 msgid "Vietnamese" msgstr "" -#: library/codecs.rst:1113 +#: library/codecs.rst:1163 msgid "euc_jp" msgstr "*euc_jp*" -#: library/codecs.rst:1113 +#: library/codecs.rst:1163 msgid "eucjp, ujis, u-jis" msgstr "*eucjp*, *ujis*, *u-jis*" -#: library/codecs.rst:1115 +#: library/codecs.rst:1165 msgid "euc_jis_2004" msgstr "*euc_jis_2004*" -#: library/codecs.rst:1115 +#: library/codecs.rst:1165 msgid "jisx0213, eucjis2004" msgstr "*jisx0213*, *eucjis2004*" -#: library/codecs.rst:1117 +#: library/codecs.rst:1167 msgid "euc_jisx0213" msgstr "*euc_jisx0213*" -#: library/codecs.rst:1117 +#: library/codecs.rst:1167 msgid "eucjisx0213" msgstr "*eucjisx0213*" -#: library/codecs.rst:1119 +#: library/codecs.rst:1169 msgid "euc_kr" msgstr "*euc_kr*" -#: library/codecs.rst:1119 +#: library/codecs.rst:1169 msgid "euckr, korean, ksc5601, ks_c-5601, ks_c-5601-1987, ksx1001, ks_x-1001" msgstr "" "*euckr*, *korean*, *ksc5601*, *ks_c-5601*, *ks_c-5601-1987*, *ksx1001*, " "*ks_x-1001*" -#: library/codecs.rst:1123 +#: library/codecs.rst:1173 msgid "gb2312" msgstr "*gb2312*" -#: library/codecs.rst:1123 +#: library/codecs.rst:1173 msgid "" "chinese, csiso58gb231280, euc-cn, euccn, eucgb2312-cn, gb2312-1980, " "gb2312-80, iso-ir-58" @@ -1981,445 +2039,445 @@ msgstr "" "*chinese*, *csiso58gb231280*, *euc-cn*, *euccn*, *eucgb2312-cn*, " "*gb2312-1980*, *gb2312-80*, *iso-ir-58*" -#: library/codecs.rst:1132 +#: library/codecs.rst:1182 msgid "Simplified Chinese" msgstr "" -#: library/codecs.rst:1128 +#: library/codecs.rst:1178 msgid "gbk" msgstr "*gbk*" -#: library/codecs.rst:1128 +#: library/codecs.rst:1178 msgid "936, cp936, ms936" msgstr "*936*, *cp936*, *ms936*" -#: library/codecs.rst:1130 +#: library/codecs.rst:1180 msgid "Unified Chinese" msgstr "" -#: library/codecs.rst:1130 +#: library/codecs.rst:1180 msgid "gb18030" msgstr "*gb18030*" -#: library/codecs.rst:1130 +#: library/codecs.rst:1180 msgid "gb18030-2000" msgstr "*gb18030-2000*" -#: library/codecs.rst:1132 +#: library/codecs.rst:1182 msgid "hz" msgstr "*hz*" -#: library/codecs.rst:1132 +#: library/codecs.rst:1182 msgid "hzgb, hz-gb, hz-gb-2312" msgstr "*hzgb*, *hz-gb*, *hz-gb-2312*" -#: library/codecs.rst:1134 +#: library/codecs.rst:1184 msgid "iso2022_jp" msgstr "*iso2022_jp*" -#: library/codecs.rst:1134 +#: library/codecs.rst:1184 msgid "csiso2022jp, iso2022jp, iso-2022-jp" msgstr "*csiso2022jp*, *iso2022jp*, *iso-2022-jp*" -#: library/codecs.rst:1137 +#: library/codecs.rst:1187 msgid "iso2022_jp_1" msgstr "*iso2022_jp_1*" -#: library/codecs.rst:1137 +#: library/codecs.rst:1187 msgid "iso2022jp-1, iso-2022-jp-1" msgstr "*iso2022jp-1*, *iso-2022-jp-1*" -#: library/codecs.rst:1139 +#: library/codecs.rst:1189 msgid "iso2022_jp_2" msgstr "*iso2022_jp_2*" -#: library/codecs.rst:1139 +#: library/codecs.rst:1189 msgid "iso2022jp-2, iso-2022-jp-2" msgstr "*iso2022jp-2*, *iso-2022-jp-2*" -#: library/codecs.rst:1139 +#: library/codecs.rst:1189 msgid "Japanese, Korean, Simplified Chinese, Western Europe, Greek" msgstr "" -#: library/codecs.rst:1142 +#: library/codecs.rst:1192 msgid "iso2022_jp_2004" msgstr "*iso2022_jp_2004*" -#: library/codecs.rst:1142 +#: library/codecs.rst:1192 msgid "iso2022jp-2004, iso-2022-jp-2004" msgstr "*iso2022jp-2004*, *iso-2022-jp-2004*" -#: library/codecs.rst:1145 +#: library/codecs.rst:1195 msgid "iso2022_jp_3" msgstr "*iso2022_jp_3*" -#: library/codecs.rst:1145 +#: library/codecs.rst:1195 msgid "iso2022jp-3, iso-2022-jp-3" msgstr "*iso2022jp-3*, *iso-2022-jp-3*" -#: library/codecs.rst:1147 +#: library/codecs.rst:1197 msgid "iso2022_jp_ext" msgstr "*iso2022_jp_ext*" -#: library/codecs.rst:1147 +#: library/codecs.rst:1197 msgid "iso2022jp-ext, iso-2022-jp-ext" msgstr "*iso2022jp-ext*, *iso-2022-jp-ext*" -#: library/codecs.rst:1149 +#: library/codecs.rst:1199 msgid "iso2022_kr" msgstr "*iso2022_kr*" -#: library/codecs.rst:1149 +#: library/codecs.rst:1199 msgid "csiso2022kr, iso2022kr, iso-2022-kr" msgstr "*csiso2022kr*, *iso2022kr*, *iso-2022-kr*" -#: library/codecs.rst:1152 +#: library/codecs.rst:1202 msgid "latin_1" msgstr "*latin_1*" -#: library/codecs.rst:1152 +#: library/codecs.rst:1202 msgid "iso-8859-1, iso8859-1, 8859, cp819, latin, latin1, L1" msgstr "*iso-8859-1*, *iso8859-1*, *8859*, *cp819*, *latin*, *latin1*, *L1*" -#: library/codecs.rst:1155 +#: library/codecs.rst:1205 msgid "iso8859_2" msgstr "*iso8859_2*" -#: library/codecs.rst:1155 +#: library/codecs.rst:1205 msgid "iso-8859-2, latin2, L2" msgstr "*iso-8859-2*, *latin2*, *L2*" -#: library/codecs.rst:1157 +#: library/codecs.rst:1207 msgid "iso8859_3" msgstr "*iso8859_3*" -#: library/codecs.rst:1157 +#: library/codecs.rst:1207 msgid "iso-8859-3, latin3, L3" msgstr "*iso-8859-3*, *latin3*, *L3*" -#: library/codecs.rst:1157 +#: library/codecs.rst:1207 msgid "Esperanto, Maltese" msgstr "" -#: library/codecs.rst:1159 +#: library/codecs.rst:1209 msgid "iso8859_4" msgstr "*iso8859_4*" -#: library/codecs.rst:1159 +#: library/codecs.rst:1209 msgid "iso-8859-4, latin4, L4" msgstr "*iso-8859-4*, *latin4*, *L4*" -#: library/codecs.rst:1161 +#: library/codecs.rst:1211 msgid "iso8859_5" msgstr "*iso8859_5*" -#: library/codecs.rst:1161 +#: library/codecs.rst:1211 msgid "iso-8859-5, cyrillic" msgstr "*iso-8859-5*, *cyrillic*" -#: library/codecs.rst:1164 +#: library/codecs.rst:1214 msgid "iso8859_6" msgstr "*iso8859_6*" -#: library/codecs.rst:1164 +#: library/codecs.rst:1214 msgid "iso-8859-6, arabic" msgstr "*iso-8859-6*, *arabic*" -#: library/codecs.rst:1166 +#: library/codecs.rst:1216 msgid "iso8859_7" msgstr "*iso8859_7*" -#: library/codecs.rst:1166 +#: library/codecs.rst:1216 msgid "iso-8859-7, greek, greek8" msgstr "*iso-8859-7*, *greek*, *greek8*" -#: library/codecs.rst:1168 +#: library/codecs.rst:1218 msgid "iso8859_8" msgstr "*iso8859_8*" -#: library/codecs.rst:1168 +#: library/codecs.rst:1218 msgid "iso-8859-8, hebrew" msgstr "*iso-8859-8*, *hebrew*" -#: library/codecs.rst:1170 +#: library/codecs.rst:1220 msgid "iso8859_9" msgstr "*iso8859_9*" -#: library/codecs.rst:1170 +#: library/codecs.rst:1220 msgid "iso-8859-9, latin5, L5" msgstr "*iso-8859-9*, *latin5*, *L5*" -#: library/codecs.rst:1172 +#: library/codecs.rst:1222 msgid "iso8859_10" msgstr "*iso8859_10*" -#: library/codecs.rst:1172 +#: library/codecs.rst:1222 msgid "iso-8859-10, latin6, L6" msgstr "*iso-8859-10*, *latin6*, *L6*" -#: library/codecs.rst:1172 +#: library/codecs.rst:1222 msgid "Nordic languages" msgstr "" -#: library/codecs.rst:1174 +#: library/codecs.rst:1224 msgid "iso8859_11" msgstr "*iso8859_11*" -#: library/codecs.rst:1174 +#: library/codecs.rst:1224 msgid "iso-8859-11, thai" msgstr "*iso-8859-11*, *thai*" -#: library/codecs.rst:1174 +#: library/codecs.rst:1224 msgid "Thai languages" msgstr "" -#: library/codecs.rst:1176 +#: library/codecs.rst:1226 msgid "iso8859_13" msgstr "*iso8859_13*" -#: library/codecs.rst:1176 +#: library/codecs.rst:1226 msgid "iso-8859-13, latin7, L7" msgstr "*iso-8859-13*, *latin7*, *L7*" -#: library/codecs.rst:1178 +#: library/codecs.rst:1228 msgid "iso8859_14" msgstr "*iso8859_14*" -#: library/codecs.rst:1178 +#: library/codecs.rst:1228 msgid "iso-8859-14, latin8, L8" msgstr "*iso-8859-14*, *latin8*, *L8*" -#: library/codecs.rst:1178 +#: library/codecs.rst:1228 msgid "Celtic languages" msgstr "" -#: library/codecs.rst:1180 +#: library/codecs.rst:1230 msgid "iso8859_15" msgstr "*iso8859_15*" -#: library/codecs.rst:1180 +#: library/codecs.rst:1230 msgid "iso-8859-15, latin9, L9" msgstr "*iso-8859-15*, *latin9*, *L9*" -#: library/codecs.rst:1182 +#: library/codecs.rst:1232 msgid "iso8859_16" msgstr "*iso8859_16*" -#: library/codecs.rst:1182 +#: library/codecs.rst:1232 msgid "iso-8859-16, latin10, L10" msgstr "*iso-8859-16*, *latin10*, *L10*" -#: library/codecs.rst:1182 +#: library/codecs.rst:1232 msgid "South-Eastern Europe" msgstr "" -#: library/codecs.rst:1184 +#: library/codecs.rst:1234 msgid "johab" msgstr "*johab*" -#: library/codecs.rst:1184 +#: library/codecs.rst:1234 msgid "cp1361, ms1361" msgstr "*cp1361*, *ms1361*" -#: library/codecs.rst:1186 +#: library/codecs.rst:1236 msgid "koi8_r" msgstr "*koi8_r*" -#: library/codecs.rst:1188 +#: library/codecs.rst:1238 msgid "koi8_t" msgstr "*koi8_t*" -#: library/codecs.rst:1188 +#: library/codecs.rst:1238 msgid "Tajik" msgstr "*Tajik*" -#: library/codecs.rst:1192 +#: library/codecs.rst:1242 msgid "koi8_u" msgstr "*koi8_u*" -#: library/codecs.rst:1194 +#: library/codecs.rst:1244 msgid "kz1048" msgstr "*kz1048*" -#: library/codecs.rst:1194 +#: library/codecs.rst:1244 msgid "kz_1048, strk1048_2002, rk1048" msgstr "*kz_1048*, *strk1048_2002*, *rk1048*" -#: library/codecs.rst:1212 +#: library/codecs.rst:1262 msgid "Kazakh" msgstr "" -#: library/codecs.rst:1198 +#: library/codecs.rst:1248 msgid "mac_cyrillic" msgstr "*mac_cyrillic*" -#: library/codecs.rst:1198 +#: library/codecs.rst:1248 msgid "maccyrillic" msgstr "*maccyrillic*" -#: library/codecs.rst:1201 +#: library/codecs.rst:1251 msgid "mac_greek" msgstr "*mac_greek*" -#: library/codecs.rst:1201 +#: library/codecs.rst:1251 msgid "macgreek" msgstr "*macgreek*" -#: library/codecs.rst:1203 +#: library/codecs.rst:1253 msgid "mac_iceland" msgstr "*mac_iceland*" -#: library/codecs.rst:1203 +#: library/codecs.rst:1253 msgid "maciceland" msgstr "*maciceland*" -#: library/codecs.rst:1205 +#: library/codecs.rst:1255 msgid "mac_latin2" msgstr "*mac_latin2*" -#: library/codecs.rst:1205 +#: library/codecs.rst:1255 #, fuzzy msgid "maclatin2, maccentraleurope, mac_centeuro" msgstr "*maclatin2*, *maccentraleurope*" -#: library/codecs.rst:1208 +#: library/codecs.rst:1258 msgid "mac_roman" msgstr "*mac_roman*" -#: library/codecs.rst:1208 +#: library/codecs.rst:1258 msgid "macroman, macintosh" msgstr "*macroman*, *macintosh*" -#: library/codecs.rst:1210 +#: library/codecs.rst:1260 msgid "mac_turkish" msgstr "*mac_turkish*" -#: library/codecs.rst:1210 +#: library/codecs.rst:1260 msgid "macturkish" msgstr "*macturkish*" -#: library/codecs.rst:1212 +#: library/codecs.rst:1262 msgid "ptcp154" msgstr "*ptcp154*" -#: library/codecs.rst:1212 +#: library/codecs.rst:1262 msgid "csptcp154, pt154, cp154, cyrillic-asian" msgstr "*csptcp154*, *pt154*, *cp154*, *cyrillic-asian*" -#: library/codecs.rst:1215 +#: library/codecs.rst:1265 msgid "shift_jis" msgstr "*shift_jis*" -#: library/codecs.rst:1215 +#: library/codecs.rst:1265 msgid "csshiftjis, shiftjis, sjis, s_jis" msgstr "*csshiftjis*, *shiftjis*, *sjis*, *s_jis*" -#: library/codecs.rst:1218 +#: library/codecs.rst:1268 msgid "shift_jis_2004" msgstr "*shift_jis_2004*" -#: library/codecs.rst:1218 +#: library/codecs.rst:1268 msgid "shiftjis2004, sjis_2004, sjis2004" msgstr "*shiftjis2004*, *sjis_2004*, *sjis2004*" -#: library/codecs.rst:1221 +#: library/codecs.rst:1271 msgid "shift_jisx0213" msgstr "*shift_jisx0213*" -#: library/codecs.rst:1221 +#: library/codecs.rst:1271 msgid "shiftjisx0213, sjisx0213, s_jisx0213" msgstr "*shiftjisx0213*, *sjisx0213*, *s_jisx0213*" -#: library/codecs.rst:1224 +#: library/codecs.rst:1274 msgid "utf_32" msgstr "*utf_32*" -#: library/codecs.rst:1224 +#: library/codecs.rst:1274 msgid "U32, utf32" msgstr "*U32*, *utf32*" -#: library/codecs.rst:1226 library/codecs.rst:1230 library/codecs.rst:1234 -#: library/codecs.rst:1238 library/codecs.rst:1240 +#: library/codecs.rst:1276 library/codecs.rst:1280 library/codecs.rst:1284 +#: library/codecs.rst:1288 library/codecs.rst:1290 msgid "all languages" msgstr "" -#: library/codecs.rst:1226 +#: library/codecs.rst:1276 msgid "utf_32_be" msgstr "*utf_32_be*" -#: library/codecs.rst:1226 +#: library/codecs.rst:1276 msgid "UTF-32BE" msgstr "*UTF-32BE*" -#: library/codecs.rst:1228 +#: library/codecs.rst:1278 msgid "utf_32_le" msgstr "*utf_32_le*" -#: library/codecs.rst:1228 +#: library/codecs.rst:1278 msgid "UTF-32LE" msgstr "*UTF-32LE*" -#: library/codecs.rst:1230 +#: library/codecs.rst:1280 msgid "utf_16" msgstr "*utf_16*" -#: library/codecs.rst:1230 +#: library/codecs.rst:1280 msgid "U16, utf16" msgstr "*U16*, *utf16*" -#: library/codecs.rst:1232 +#: library/codecs.rst:1282 msgid "utf_16_be" msgstr "*utf_16_be*" -#: library/codecs.rst:1232 +#: library/codecs.rst:1282 msgid "UTF-16BE" msgstr "*UTF-16BE*" -#: library/codecs.rst:1234 +#: library/codecs.rst:1284 msgid "utf_16_le" msgstr "*utf_16_le*" -#: library/codecs.rst:1234 +#: library/codecs.rst:1284 msgid "UTF-16LE" msgstr "*UTF-16LE*" -#: library/codecs.rst:1236 +#: library/codecs.rst:1286 msgid "utf_7" msgstr "*utf_7*" -#: library/codecs.rst:1236 +#: library/codecs.rst:1286 msgid "U7, unicode-1-1-utf-7" msgstr "*U7*, *unicode-1-1-utf-7*" -#: library/codecs.rst:1238 +#: library/codecs.rst:1288 msgid "utf_8" msgstr "*utf_8*" -#: library/codecs.rst:1238 +#: library/codecs.rst:1288 #, fuzzy msgid "U8, UTF, utf8, cp65001" msgstr "*U8*, *UTF*, *utf8*" -#: library/codecs.rst:1240 +#: library/codecs.rst:1290 msgid "utf_8_sig" msgstr "*utf_8_sig*" -#: library/codecs.rst:1243 +#: library/codecs.rst:1293 msgid "" "The utf-16\\* and utf-32\\* encoders no longer allow surrogate code points " "(``U+D800``--``U+DFFF``) to be encoded. The utf-32\\* decoders no longer " "decode byte sequences that correspond to surrogate code points." msgstr "" -#: library/codecs.rst:1249 +#: library/codecs.rst:1299 msgid "``cp65001`` is now an alias to ``utf_8``." msgstr "" -#: library/codecs.rst:1254 +#: library/codecs.rst:1304 msgid "Python Specific Encodings" msgstr "" -#: library/codecs.rst:1256 +#: library/codecs.rst:1306 msgid "" "A number of predefined codecs are specific to Python, so their codec names " "have no meaning outside Python. These are listed in the tables below based " @@ -2429,272 +2487,272 @@ msgid "" "asymmetric codecs, the stated meaning describes the encoding direction." msgstr "" -#: library/codecs.rst:1264 +#: library/codecs.rst:1314 msgid "Text Encodings" msgstr "" -#: library/codecs.rst:1266 +#: library/codecs.rst:1316 msgid "" "The following codecs provide :class:`str` to :class:`bytes` encoding and :" "term:`bytes-like object` to :class:`str` decoding, similar to the Unicode " "text encodings." msgstr "" -#: library/codecs.rst:1275 +#: library/codecs.rst:1325 msgid "idna" msgstr "idna" -#: library/codecs.rst:1275 +#: library/codecs.rst:1325 msgid "" "Implement :rfc:`3490`, see also :mod:`encodings.idna`. Only " "``errors='strict'`` is supported." msgstr "" -#: library/codecs.rst:1281 +#: library/codecs.rst:1331 msgid "mbcs" msgstr "mbcs" -#: library/codecs.rst:1281 +#: library/codecs.rst:1331 msgid "ansi, dbcs" msgstr "" -#: library/codecs.rst:1281 +#: library/codecs.rst:1331 msgid "" "Windows only: Encode the operand according to the ANSI codepage (CP_ACP)." msgstr "" -#: library/codecs.rst:1285 +#: library/codecs.rst:1335 msgid "oem" msgstr "" -#: library/codecs.rst:1285 +#: library/codecs.rst:1335 msgid "" "Windows only: Encode the operand according to the OEM codepage (CP_OEMCP)." msgstr "" -#: library/codecs.rst:1291 +#: library/codecs.rst:1341 msgid "palmos" msgstr "palmos" -#: library/codecs.rst:1291 +#: library/codecs.rst:1341 msgid "Encoding of PalmOS 3.5." msgstr "" -#: library/codecs.rst:1293 +#: library/codecs.rst:1343 msgid "punycode" msgstr "punycode" -#: library/codecs.rst:1293 +#: library/codecs.rst:1343 msgid "Implement :rfc:`3492`. Stateful codecs are not supported." msgstr "" -#: library/codecs.rst:1297 +#: library/codecs.rst:1347 msgid "raw_unicode_escape" msgstr "raw_unicode_escape" -#: library/codecs.rst:1297 +#: library/codecs.rst:1347 msgid "" "Latin-1 encoding with ``\\uXXXX`` and ``\\UXXXXXXXX`` for other code points. " "Existing backslashes are not escaped in any way. It is used in the Python " "pickle protocol." msgstr "" -#: library/codecs.rst:1306 +#: library/codecs.rst:1356 msgid "undefined" msgstr "undefined" -#: library/codecs.rst:1306 +#: library/codecs.rst:1356 msgid "" "Raise an exception for all conversions, even empty strings. The error " "handler is ignored." msgstr "" -#: library/codecs.rst:1311 +#: library/codecs.rst:1361 msgid "unicode_escape" msgstr "unicode_escape" -#: library/codecs.rst:1311 +#: library/codecs.rst:1361 msgid "" "Encoding suitable as the contents of a Unicode literal in ASCII-encoded " "Python source code, except that quotes are not escaped. Decode from Latin-1 " "source code. Beware that Python source code actually uses UTF-8 by default." msgstr "" -#: library/codecs.rst:1323 +#: library/codecs.rst:1373 msgid "\"unicode_internal\" codec is removed." msgstr "" -#: library/codecs.rst:1330 +#: library/codecs.rst:1380 msgid "Binary Transforms" msgstr "" -#: library/codecs.rst:1332 +#: library/codecs.rst:1382 msgid "" "The following codecs provide binary transforms: :term:`bytes-like object` " "to :class:`bytes` mappings. They are not supported by :meth:`bytes.decode` " "(which only produces :class:`str` output)." msgstr "" -#: library/codecs.rst:1340 +#: library/codecs.rst:1390 msgid "Encoder / decoder" msgstr "" -#: library/codecs.rst:1342 +#: library/codecs.rst:1392 msgid "base64_codec [#b64]_" msgstr "base64_codec [#b64]_" -#: library/codecs.rst:1342 +#: library/codecs.rst:1392 msgid "base64, base_64" msgstr "base64, base_64" -#: library/codecs.rst:1342 +#: library/codecs.rst:1392 msgid "" "Convert the operand to multiline MIME base64 (the result always includes a " "trailing ``'\\n'``)." msgstr "" -#: library/codecs.rst:1347 +#: library/codecs.rst:1397 msgid "" "accepts any :term:`bytes-like object` as input for encoding and decoding" msgstr "" -#: library/codecs.rst:1342 +#: library/codecs.rst:1392 msgid ":meth:`base64.encodebytes` / :meth:`base64.decodebytes`" msgstr "" -#: library/codecs.rst:1353 +#: library/codecs.rst:1403 msgid "bz2_codec" msgstr "bz2_codec" -#: library/codecs.rst:1353 +#: library/codecs.rst:1403 msgid "bz2" msgstr "bz2" -#: library/codecs.rst:1353 +#: library/codecs.rst:1403 msgid "Compress the operand using bz2." msgstr "" -#: library/codecs.rst:1353 +#: library/codecs.rst:1403 msgid ":meth:`bz2.compress` / :meth:`bz2.decompress`" msgstr "" -#: library/codecs.rst:1356 +#: library/codecs.rst:1406 msgid "hex_codec" msgstr "hex_codec" -#: library/codecs.rst:1356 +#: library/codecs.rst:1406 msgid "hex" msgstr "hex" -#: library/codecs.rst:1356 +#: library/codecs.rst:1406 msgid "" "Convert the operand to hexadecimal representation, with two digits per byte." msgstr "" -#: library/codecs.rst:1356 +#: library/codecs.rst:1406 msgid ":meth:`binascii.b2a_hex` / :meth:`binascii.a2b_hex`" msgstr "" -#: library/codecs.rst:1361 +#: library/codecs.rst:1411 msgid "quopri_codec" msgstr "quopri_codec" -#: library/codecs.rst:1361 +#: library/codecs.rst:1411 msgid "quopri, quotedprintable, quoted_printable" msgstr "" -#: library/codecs.rst:1361 +#: library/codecs.rst:1411 msgid "Convert the operand to MIME quoted printable." msgstr "" -#: library/codecs.rst:1361 +#: library/codecs.rst:1411 msgid ":meth:`quopri.encode` with ``quotetabs=True`` / :meth:`quopri.decode`" msgstr "" -#: library/codecs.rst:1365 +#: library/codecs.rst:1415 msgid "uu_codec" msgstr "uu_codec" -#: library/codecs.rst:1365 +#: library/codecs.rst:1415 msgid "uu" msgstr "uu" -#: library/codecs.rst:1365 +#: library/codecs.rst:1415 msgid "Convert the operand using uuencode." msgstr "" -#: library/codecs.rst:1365 +#: library/codecs.rst:1415 msgid ":meth:`uu.encode` / :meth:`uu.decode`" msgstr "" -#: library/codecs.rst:1368 +#: library/codecs.rst:1418 msgid "zlib_codec" msgstr "zlib_codec" -#: library/codecs.rst:1368 +#: library/codecs.rst:1418 msgid "zip, zlib" msgstr "zip, zlib" -#: library/codecs.rst:1368 +#: library/codecs.rst:1418 msgid "Compress the operand using gzip." msgstr "" -#: library/codecs.rst:1368 +#: library/codecs.rst:1418 msgid ":meth:`zlib.compress` / :meth:`zlib.decompress`" msgstr ":meth:`zlib.compress` / :meth:`zlib.decompress`" -#: library/codecs.rst:1372 +#: library/codecs.rst:1422 msgid "" "In addition to :term:`bytes-like objects `, " "``'base64_codec'`` also accepts ASCII-only instances of :class:`str` for " "decoding" msgstr "" -#: library/codecs.rst:1376 +#: library/codecs.rst:1426 msgid "Restoration of the binary transforms." msgstr "" -#: library/codecs.rst:1379 +#: library/codecs.rst:1429 msgid "Restoration of the aliases for the binary transforms." msgstr "" -#: library/codecs.rst:1386 +#: library/codecs.rst:1436 msgid "Text Transforms" msgstr "" -#: library/codecs.rst:1388 +#: library/codecs.rst:1438 msgid "" "The following codec provides a text transform: a :class:`str` to :class:" "`str` mapping. It is not supported by :meth:`str.encode` (which only " "produces :class:`bytes` output)." msgstr "" -#: library/codecs.rst:1397 +#: library/codecs.rst:1447 msgid "rot_13" msgstr "rot_13" -#: library/codecs.rst:1397 +#: library/codecs.rst:1447 msgid "rot13" msgstr "rot13" -#: library/codecs.rst:1397 +#: library/codecs.rst:1447 msgid "Return the Caesar-cypher encryption of the operand." msgstr "" -#: library/codecs.rst:1402 +#: library/codecs.rst:1452 msgid "Restoration of the ``rot_13`` text transform." msgstr "" -#: library/codecs.rst:1405 +#: library/codecs.rst:1455 msgid "Restoration of the ``rot13`` alias." msgstr "" -#: library/codecs.rst:1410 +#: library/codecs.rst:1460 msgid "" ":mod:`encodings.idna` --- Internationalized Domain Names in Applications" msgstr "" -#: library/codecs.rst:1416 +#: library/codecs.rst:1466 msgid "" "This module implements :rfc:`3490` (Internationalized Domain Names in " "Applications) and :rfc:`3492` (Nameprep: A Stringprep Profile for " @@ -2702,13 +2760,13 @@ msgid "" "encoding and :mod:`stringprep`." msgstr "" -#: library/codecs.rst:1421 +#: library/codecs.rst:1471 msgid "" "If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the " -"third-party `idna module _`." +"third-party `idna module `_." msgstr "" -#: library/codecs.rst:1424 +#: library/codecs.rst:1474 msgid "" "These RFCs together define a protocol to support non-ASCII characters in " "domain names. A domain name containing non-ASCII characters (such as ``www." @@ -2722,7 +2780,7 @@ msgid "" "presenting them to the user." msgstr "" -#: library/codecs.rst:1435 +#: library/codecs.rst:1485 msgid "" "Python supports this conversion in several ways: the ``idna`` codec " "performs conversion between Unicode and ACE, separating an input string into " @@ -2739,14 +2797,14 @@ msgid "" "sends that field at all)." msgstr "" -#: library/codecs.rst:1448 +#: library/codecs.rst:1498 msgid "" "When receiving host names from the wire (such as in reverse name lookup), no " "automatic conversion to Unicode is performed: applications wishing to " "present such host names to the user should decode them to Unicode." msgstr "" -#: library/codecs.rst:1452 +#: library/codecs.rst:1502 msgid "" "The module :mod:`encodings.idna` also implements the nameprep procedure, " "which performs certain normalizations on host names, to achieve case-" @@ -2754,49 +2812,49 @@ msgid "" "characters. The nameprep functions can be used directly if desired." msgstr "" -#: library/codecs.rst:1460 +#: library/codecs.rst:1510 msgid "" "Return the nameprepped version of *label*. The implementation currently " "assumes query strings, so ``AllowUnassigned`` is true." msgstr "" -#: library/codecs.rst:1466 +#: library/codecs.rst:1516 msgid "" "Convert a label to ASCII, as specified in :rfc:`3490`. ``UseSTD3ASCIIRules`` " "is assumed to be false." msgstr "" -#: library/codecs.rst:1472 +#: library/codecs.rst:1522 msgid "Convert a label to Unicode, as specified in :rfc:`3490`." msgstr "" -#: library/codecs.rst:1476 +#: library/codecs.rst:1526 msgid ":mod:`encodings.mbcs` --- Windows ANSI codepage" msgstr "" -#: library/codecs.rst:1481 +#: library/codecs.rst:1531 msgid "This module implements the ANSI codepage (CP_ACP)." msgstr "" -#: library/codecs.rst:1484 +#: library/codecs.rst:1534 msgid ":ref:`Availability `: Windows only." msgstr ":ref:`Disponibilité ` : Windows uniquement." -#: library/codecs.rst:1485 +#: library/codecs.rst:1535 msgid "Support any error handler." msgstr "" -#: library/codecs.rst:1488 +#: library/codecs.rst:1538 msgid "" "Before 3.2, the *errors* argument was ignored; ``'replace'`` was always used " "to encode, and ``'ignore'`` to decode." msgstr "" -#: library/codecs.rst:1494 +#: library/codecs.rst:1544 msgid ":mod:`encodings.utf_8_sig` --- UTF-8 codec with BOM signature" msgstr "" -#: library/codecs.rst:1500 +#: library/codecs.rst:1550 msgid "" "This module implements a variant of the UTF-8 codec. On encoding, a UTF-8 " "encoded BOM will be prepended to the UTF-8 encoded bytes. For the stateful " @@ -2804,3 +2862,19 @@ msgid "" "decoding, an optional UTF-8 encoded BOM at the start of the data will be " "skipped." msgstr "" + +#~ msgid "" +#~ "Replace with backslashed escape sequences. Implemented in :func:" +#~ "`backslashreplace_errors`." +#~ msgstr "" +#~ "Remplace avec une séquence échappée par des antislashs. Implémenté dans :" +#~ "func:`backslashreplace_errors`." + +# Pas de majuscule en début car suit un deux-points. +#~ msgid "" +#~ "Search function registration is not currently reversible, which may cause " +#~ "problems in some cases, such as unit testing or module reloading." +#~ msgstr "" +#~ "l'enregistrement d'une fonction de recherche n'est actuellement pas " +#~ "réversible, ce qui peut entraîner des problèmes dans certains cas, par " +#~ "exemple pour les tests unitaires ou le rechargement de module." diff --git a/library/codeop.po b/library/codeop.po index 3b3d75d733..1d77275eae 100644 --- a/library/codeop.po +++ b/library/codeop.po @@ -5,14 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2021-11-27 10:27+0100\n" +"PO-Revision-Date: 2021-11-06 20:25+0100\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0\n" #: library/codeop.rst:2 msgid ":mod:`codeop` --- Compile Python code" @@ -94,7 +95,6 @@ msgstr "" "ou :exc:`ValueError` si un littéral invalide est rencontré." #: library/codeop.rst:45 -#, fuzzy msgid "" "The *symbol* argument determines whether *source* is compiled as a statement " "(``'single'``, the default), as a sequence of statements (``'exec'``) or as " @@ -102,8 +102,9 @@ msgid "" "`ValueError` to be raised." msgstr "" "L'argument *symbol* détermine si *source* est compilée comme une instruction " -"(``'single'``, par défaut) ou comme une :term:`expression` (``'eval'``). " -"Toute autre valeur lèvera :exc:`ValueError`." +"(``'single'``, par défaut), comme une suite d'instructions (``'exec'``), ou " +"comme une :term:`expression` (``'eval'``). Toute autre valeur lèvera :exc:" +"`ValueError`." #: library/codeop.rst:52 msgid "" diff --git a/library/collections.abc.po b/library/collections.abc.po index d5c81f4f7e..768cc31da2 100644 --- a/library/collections.abc.po +++ b/library/collections.abc.po @@ -5,10 +5,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: 2021-03-21 16:06+0100\n" "Last-Translator: Loc Cosnier \n" -"Language-Team: French \n" +"Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -40,11 +40,66 @@ msgstr "" "interface particulière (par exemple, savoir s'il s'agit d'un hachable ou " "d'une table de correspondance)." -#: library/collections.abc.rst:31 +#: library/collections.abc.rst:27 +msgid "" +"An :func:`issubclass` or :func:`isinstance` test for an interface works in " +"one of three ways." +msgstr "" + +#: library/collections.abc.rst:30 +msgid "" +"1) A newly written class can inherit directly from one of the abstract base " +"classes. The class must supply the required abstract methods. The " +"remaining mixin methods come from inheritance and can be overridden if " +"desired. Other methods may be added as needed:" +msgstr "" + +#: library/collections.abc.rst:50 +msgid "" +"2) Existing classes and built-in classes can be registered as \"virtual " +"subclasses\" of the ABCs. Those classes should define the full API " +"including all of the abstract methods and all of the mixin methods. This " +"lets users rely on :func:`issubclass` or :func:`isinstance` tests to " +"determine whether the full interface is supported. The exception to this " +"rule is for methods that are automatically inferred from the rest of the API:" +msgstr "" + +#: library/collections.abc.rst:76 +msgid "" +"In this example, class :class:`D` does not need to define ``__contains__``, " +"``__iter__``, and ``__reversed__`` because the :ref:`in-operator " +"`, the :term:`iteration ` logic, and the :func:" +"`reversed` function automatically fall back to using ``__getitem__`` and " +"``__len__``." +msgstr "" + +#: library/collections.abc.rst:82 +msgid "" +"3) Some simple interfaces are directly recognizable by the presence of the " +"required methods (unless those methods have been set to :const:`None`):" +msgstr "" + +#: library/collections.abc.rst:99 +msgid "" +"Complex interfaces do not support this last technique because an interface " +"is more than just the presence of method names. Interfaces specify " +"semantics and relationships between methods that cannot be inferred solely " +"from the presence of specific method names. For example, knowing that a " +"class supplies ``__getitem__``, ``__len__``, and ``__iter__`` is " +"insufficient for distinguishing a :class:`Sequence` from a :class:`Mapping`." +msgstr "" + +#: library/collections.abc.rst:107 +msgid "" +"These abstract classes now support ``[]``. See :ref:`types-genericalias` " +"and :pep:`585`." +msgstr "" + +#: library/collections.abc.rst:114 msgid "Collections Abstract Base Classes" msgstr "Classes de base abstraites de collections" -#: library/collections.abc.rst:33 +#: library/collections.abc.rst:116 msgid "" "The collections module offers the following :term:`ABCs `:" @@ -52,131 +107,149 @@ msgstr "" "Le module collections apporte les :term:`ABC ` " "suivantes :" -#: library/collections.abc.rst:38 +#: library/collections.abc.rst:121 msgid "ABC" msgstr "ABC" -#: library/collections.abc.rst:38 +#: library/collections.abc.rst:121 msgid "Inherits from" msgstr "Hérite de" -#: library/collections.abc.rst:38 +#: library/collections.abc.rst:121 msgid "Abstract Methods" msgstr "Méthodes abstraites" -#: library/collections.abc.rst:38 +#: library/collections.abc.rst:121 msgid "Mixin Methods" msgstr "Méthodes *mixin*" -#: library/collections.abc.rst:40 -msgid ":class:`Container`" +#: library/collections.abc.rst:123 +#, fuzzy +msgid ":class:`Container` [1]_" msgstr ":class:`Container`" -#: library/collections.abc.rst:40 +#: library/collections.abc.rst:123 msgid "``__contains__``" msgstr "``__contains__``" -#: library/collections.abc.rst:41 -msgid ":class:`Hashable`" +#: library/collections.abc.rst:124 +#, fuzzy +msgid ":class:`Hashable` [1]_" msgstr ":class:`Hashable`" -#: library/collections.abc.rst:41 +#: library/collections.abc.rst:124 msgid "``__hash__``" msgstr "``__hash__``" -#: library/collections.abc.rst:43 library/collections.abc.rst:44 -msgid ":class:`Iterable`" +#: library/collections.abc.rst:125 +#, fuzzy +msgid ":class:`Iterable` [1]_ [2]_" msgstr ":class:`Iterable`" -#: library/collections.abc.rst:43 +#: library/collections.abc.rst:125 library/collections.abc.rst:126 msgid "``__iter__``" msgstr "``__iter__``" -#: library/collections.abc.rst:45 -msgid ":class:`Iterator`" +#: library/collections.abc.rst:126 +#, fuzzy +msgid ":class:`Iterator` [1]_" msgstr ":class:`Iterator`" -#: library/collections.abc.rst:43 +#: library/collections.abc.rst:126 library/collections.abc.rst:127 +msgid ":class:`Iterable`" +msgstr ":class:`Iterable`" + +#: library/collections.abc.rst:126 msgid "``__next__``" msgstr "``__next__``" -#: library/collections.abc.rst:44 -msgid ":class:`Reversible`" +#: library/collections.abc.rst:127 +#, fuzzy +msgid ":class:`Reversible` [1]_" msgstr ":class:`Reversible`" -#: library/collections.abc.rst:44 +#: library/collections.abc.rst:127 msgid "``__reversed__``" msgstr "``__reversed__``" -#: library/collections.abc.rst:45 -msgid ":class:`Generator`" +#: library/collections.abc.rst:128 +#, fuzzy +msgid ":class:`Generator` [1]_" msgstr ":class:`Generator`" -#: library/collections.abc.rst:93 +#: library/collections.abc.rst:128 +msgid ":class:`Iterator`" +msgstr ":class:`Iterator`" + +#: library/collections.abc.rst:128 library/collections.abc.rst:176 msgid "``send``, ``throw``" msgstr "``send``, ``throw``" -#: library/collections.abc.rst:45 +#: library/collections.abc.rst:128 msgid "``close``, ``__iter__``, ``__next__``" msgstr "``close``, ``__iter__``, ``__next__``" -#: library/collections.abc.rst:85 -msgid ":class:`Sized`" +#: library/collections.abc.rst:129 +#, fuzzy +msgid ":class:`Sized` [1]_" msgstr ":class:`Sized`" -#: library/collections.abc.rst:85 +#: library/collections.abc.rst:129 library/collections.abc.rst:168 msgid "``__len__``" msgstr "``__len__``" -#: library/collections.abc.rst:47 -msgid ":class:`Callable`" +#: library/collections.abc.rst:130 +#, fuzzy +msgid ":class:`Callable` [1]_" msgstr ":class:`Callable`" -#: library/collections.abc.rst:47 +#: library/collections.abc.rst:130 msgid "``__call__``" msgstr "``__call__``" -#: library/collections.abc.rst:64 library/collections.abc.rst:74 -msgid ":class:`Collection`" +#: library/collections.abc.rst:131 +#, fuzzy +msgid ":class:`Collection` [1]_" msgstr ":class:`Collection`" -#: library/collections.abc.rst:48 +#: library/collections.abc.rst:131 msgid ":class:`Sized`, :class:`Iterable`, :class:`Container`" msgstr ":class:`Sized`, :class:`Iterable`, :class:`Container`" -#: library/collections.abc.rst:64 +#: library/collections.abc.rst:131 library/collections.abc.rst:147 msgid "``__contains__``, ``__iter__``, ``__len__``" msgstr "``__contains__``, ``__iter__``, ``__len__``" -#: library/collections.abc.rst:55 library/collections.abc.rst:61 +#: library/collections.abc.rst:135 library/collections.abc.rst:138 +#: library/collections.abc.rst:144 msgid ":class:`Sequence`" msgstr ":class:`Sequence`" -#: library/collections.abc.rst:52 +#: library/collections.abc.rst:135 msgid ":class:`Reversible`, :class:`Collection`" msgstr ":class:`Reversible`, :class:`Collection`" -#: library/collections.abc.rst:61 +#: library/collections.abc.rst:135 library/collections.abc.rst:144 msgid "``__getitem__``, ``__len__``" msgstr "``__getitem__``, ``__len__``" -#: library/collections.abc.rst:52 +#: library/collections.abc.rst:135 msgid "" "``__contains__``, ``__iter__``, ``__reversed__``, ``index``, and ``count``" msgstr "" "``__contains__``, ``__iter__``, ``__reversed__``, ``index`` et ``count``" -#: library/collections.abc.rst:55 +#: library/collections.abc.rst:138 msgid ":class:`MutableSequence`" msgstr ":class:`MutableSequence`" -#: library/collections.abc.rst:55 +#: library/collections.abc.rst:138 msgid "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__len__``, ``insert``" msgstr "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__len__``, ``insert``" -#: library/collections.abc.rst:55 +#: library/collections.abc.rst:138 msgid "" "Inherited :class:`Sequence` methods and ``append``, ``reverse``, ``extend``, " "``pop``, ``remove``, and ``__iadd__``" @@ -184,19 +257,23 @@ msgstr "" "Méthodes héritées de :class:`Sequence`, et ``append``, ``reverse``, " "``extend``, ``pop``, ``remove`` et ``__iadd__``" -#: library/collections.abc.rst:61 +#: library/collections.abc.rst:144 msgid ":class:`ByteString`" msgstr ":class:`ByteString`" -#: library/collections.abc.rst:61 +#: library/collections.abc.rst:144 msgid "Inherited :class:`Sequence` methods" msgstr "Méthodes héritées de :class:`Sequence`" -#: library/collections.abc.rst:68 +#: library/collections.abc.rst:147 library/collections.abc.rst:151 msgid ":class:`Set`" msgstr ":class:`Set`" -#: library/collections.abc.rst:64 +#: library/collections.abc.rst:147 library/collections.abc.rst:157 +msgid ":class:`Collection`" +msgstr ":class:`Collection`" + +#: library/collections.abc.rst:147 msgid "" "``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__gt__``, ``__ge__``, " "``__and__``, ``__or__``, ``__sub__``, ``__xor__``, and ``isdisjoint``" @@ -204,15 +281,15 @@ msgstr "" "``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__gt__``, ``__ge__``, " "``__and__``, ``__or__``, ``__sub__``, ``__xor__`` et ``isdisjoint``" -#: library/collections.abc.rst:68 +#: library/collections.abc.rst:151 msgid ":class:`MutableSet`" msgstr ":class:`MutableSet`" -#: library/collections.abc.rst:68 +#: library/collections.abc.rst:151 msgid "``__contains__``, ``__iter__``, ``__len__``, ``add``, ``discard``" msgstr "``__contains__``, ``__iter__``, ``__len__``, ``add``, ``discard``" -#: library/collections.abc.rst:68 +#: library/collections.abc.rst:151 msgid "" "Inherited :class:`Set` methods and ``clear``, ``pop``, ``remove``, " "``__ior__``, ``__iand__``, ``__ixor__``, and ``__isub__``" @@ -220,15 +297,15 @@ msgstr "" "Méthodes héritées de :class:`Set`, et ``clear``, ``pop``, ``remove``, " "``__ior__``, ``__iand__``, ``__ixor__`` et ``__isub__``" -#: library/collections.abc.rst:78 +#: library/collections.abc.rst:157 library/collections.abc.rst:161 msgid ":class:`Mapping`" msgstr ":class:`Mapping`" -#: library/collections.abc.rst:74 +#: library/collections.abc.rst:157 msgid "``__getitem__``, ``__iter__``, ``__len__``" msgstr "``__getitem__``, ``__iter__``, ``__len__``" -#: library/collections.abc.rst:74 +#: library/collections.abc.rst:157 msgid "" "``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__``, and " "``__ne__``" @@ -236,17 +313,17 @@ msgstr "" "``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__`` et " "``__ne__``" -#: library/collections.abc.rst:78 +#: library/collections.abc.rst:161 msgid ":class:`MutableMapping`" msgstr ":class:`MutableMapping`" -#: library/collections.abc.rst:78 +#: library/collections.abc.rst:161 msgid "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__iter__``, ``__len__``" msgstr "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__iter__``, ``__len__``" -#: library/collections.abc.rst:78 +#: library/collections.abc.rst:161 msgid "" "Inherited :class:`Mapping` methods and ``pop``, ``popitem``, ``clear``, " "``update``, and ``setdefault``" @@ -254,99 +331,153 @@ msgstr "" "Méthodes héritées de :class:`Mapping`, et ``pop``, ``popitem``, ``clear``, " "``update`` et ``setdefault``" -#: library/collections.abc.rst:85 +#: library/collections.abc.rst:168 msgid ":class:`MappingView`" msgstr ":class:`MappingView`" -#: library/collections.abc.rst:86 +#: library/collections.abc.rst:168 +msgid ":class:`Sized`" +msgstr ":class:`Sized`" + +#: library/collections.abc.rst:169 msgid ":class:`ItemsView`" msgstr ":class:`ItemsView`" -#: library/collections.abc.rst:88 +#: library/collections.abc.rst:169 library/collections.abc.rst:171 msgid ":class:`MappingView`, :class:`Set`" msgstr ":class:`MappingView`, :class:`Set`" -#: library/collections.abc.rst:88 library/collections.abc.rst:90 +#: library/collections.abc.rst:169 library/collections.abc.rst:171 +#: library/collections.abc.rst:173 msgid "``__contains__``, ``__iter__``" msgstr "``__contains__``, ``__iter__``" -#: library/collections.abc.rst:88 +#: library/collections.abc.rst:171 msgid ":class:`KeysView`" msgstr ":class:`KeysView`" -#: library/collections.abc.rst:90 +#: library/collections.abc.rst:173 msgid ":class:`ValuesView`" msgstr ":class:`ValuesView`" -#: library/collections.abc.rst:90 +#: library/collections.abc.rst:173 msgid ":class:`MappingView`, :class:`Collection`" msgstr ":class:`MappingView`, :class:`Collection`" -#: library/collections.abc.rst:93 -msgid ":class:`Awaitable`" +#: library/collections.abc.rst:175 +#, fuzzy +msgid ":class:`Awaitable` [1]_" msgstr ":class:`Awaitable`" -#: library/collections.abc.rst:92 +#: library/collections.abc.rst:175 msgid "``__await__``" msgstr "``__await__``" -#: library/collections.abc.rst:93 -msgid ":class:`Coroutine`" +#: library/collections.abc.rst:176 +#, fuzzy +msgid ":class:`Coroutine` [1]_" msgstr ":class:`Coroutine`" -#: library/collections.abc.rst:93 +#: library/collections.abc.rst:176 +msgid ":class:`Awaitable`" +msgstr ":class:`Awaitable`" + +#: library/collections.abc.rst:176 msgid "``close``" msgstr "``close``" -#: library/collections.abc.rst:95 -msgid ":class:`AsyncIterable`" +#: library/collections.abc.rst:177 +#, fuzzy +msgid ":class:`AsyncIterable` [1]_" msgstr ":class:`AsyncIterable`" -#: library/collections.abc.rst:95 +#: library/collections.abc.rst:177 library/collections.abc.rst:178 msgid "``__aiter__``" msgstr "``__aiter__``" -#: library/collections.abc.rst:96 -msgid ":class:`AsyncIterator`" +#: library/collections.abc.rst:178 +#, fuzzy +msgid ":class:`AsyncIterator` [1]_" msgstr ":class:`AsyncIterator`" -#: library/collections.abc.rst:95 +#: library/collections.abc.rst:178 +msgid ":class:`AsyncIterable`" +msgstr ":class:`AsyncIterable`" + +#: library/collections.abc.rst:178 msgid "``__anext__``" msgstr "``__anext__``" -#: library/collections.abc.rst:96 -msgid ":class:`AsyncGenerator`" +#: library/collections.abc.rst:179 +#, fuzzy +msgid ":class:`AsyncGenerator` [1]_" msgstr ":class:`AsyncGenerator`" -#: library/collections.abc.rst:96 +#: library/collections.abc.rst:179 +msgid ":class:`AsyncIterator`" +msgstr ":class:`AsyncIterator`" + +#: library/collections.abc.rst:179 msgid "``asend``, ``athrow``" msgstr "``asend``, ``athrow``" -#: library/collections.abc.rst:96 +#: library/collections.abc.rst:179 msgid "``aclose``, ``__aiter__``, ``__anext__``" msgstr "``aclose``, ``__aiter__``, ``__anext__``" -#: library/collections.abc.rst:102 +#: library/collections.abc.rst:184 +msgid "Footnotes" +msgstr "" + +#: library/collections.abc.rst:185 +msgid "" +"These ABCs override :meth:`object.__subclasshook__` to support testing an " +"interface by verifying the required methods are present and have not been " +"set to :const:`None`. This only works for simple interfaces. More complex " +"interfaces require registration or direct subclassing." +msgstr "" + +#: library/collections.abc.rst:191 +#, fuzzy +msgid "" +"Checking ``isinstance(obj, Iterable)`` detects classes that are registered " +"as :class:`Iterable` or that have an :meth:`__iter__` method, but it does " +"not detect classes that iterate with the :meth:`__getitem__` method. The " +"only reliable way to determine whether an object is :term:`iterable` is to " +"call ``iter(obj)``." +msgstr "" +"Évaluer ``isinstance(obj, Iterable)`` détecte les classes qui sont " +"enregistrées comme :class:`Iterable` ou qui possèdent une méthode :meth:" +"`__iter__`, mais ne détecte pas les classes qui itèrent avec la méthode :" +"meth:`__getitem__`. Le seul moyen fiable de déterminer si un objet est :term:" +"`itérable ` est d'appeler ``iter(obj)``." + +#: library/collections.abc.rst:199 +#, fuzzy +msgid "Collections Abstract Base Classes -- Detailed Descriptions" +msgstr "Classes de base abstraites de collections" + +#: library/collections.abc.rst:204 msgid "ABC for classes that provide the :meth:`__contains__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__contains__`." -#: library/collections.abc.rst:106 +#: library/collections.abc.rst:208 msgid "ABC for classes that provide the :meth:`__hash__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__hash__`." -#: library/collections.abc.rst:110 +#: library/collections.abc.rst:212 msgid "ABC for classes that provide the :meth:`__len__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__len__`." -#: library/collections.abc.rst:114 +#: library/collections.abc.rst:216 msgid "ABC for classes that provide the :meth:`__call__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__call__`." -#: library/collections.abc.rst:118 +#: library/collections.abc.rst:220 msgid "ABC for classes that provide the :meth:`__iter__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__iter__`." -#: library/collections.abc.rst:120 +#: library/collections.abc.rst:222 msgid "" "Checking ``isinstance(obj, Iterable)`` detects classes that are registered " "as :class:`Iterable` or that have an :meth:`__iter__` method, but it does " @@ -360,11 +491,11 @@ msgstr "" "meth:`__getitem__`. Le seul moyen fiable de déterminer si un objet est :term:" "`itérable ` est d'appeler ``iter(obj)``." -#: library/collections.abc.rst:128 +#: library/collections.abc.rst:230 msgid "ABC for sized iterable container classes." msgstr "ABC pour les classes de conteneurs itérables et *sized*." -#: library/collections.abc.rst:134 +#: library/collections.abc.rst:236 msgid "" "ABC for classes that provide the :meth:`~iterator.__iter__` and :meth:" "`~iterator.__next__` methods. See also the definition of :term:`iterator`." @@ -373,14 +504,14 @@ msgstr "" "et :meth:`~iterator.__next__`. Voir aussi la définition d':term:`itérateur " "`." -#: library/collections.abc.rst:140 +#: library/collections.abc.rst:242 msgid "" "ABC for iterable classes that also provide the :meth:`__reversed__` method." msgstr "" "ABC pour les classes d'itérables qui implémentent également la méthode :meth:" "`__reversed__`." -#: library/collections.abc.rst:147 +#: library/collections.abc.rst:249 msgid "" "ABC for generator classes that implement the protocol defined in :pep:`342` " "that extends iterators with the :meth:`~generator.send`, :meth:`~generator." @@ -392,11 +523,11 @@ msgstr "" "`~generator.send`, :meth:`~generator.throw` et :meth:`~generator.close`. " "Voir aussi la définition de :term:`générateur `." -#: library/collections.abc.rst:158 +#: library/collections.abc.rst:260 msgid "ABCs for read-only and mutable :term:`sequences `." msgstr "ABC pour les :term:`séquences ` immuables et muables." -#: library/collections.abc.rst:160 +#: library/collections.abc.rst:262 msgid "" "Implementation note: Some of the mixin methods, such as :meth:`__iter__`, :" "meth:`__reversed__` and :meth:`index`, make repeated calls to the " @@ -414,29 +545,29 @@ msgstr "" "*mixin* auront une performance quadratique, il serait alors judicieux de les " "surcharger." -#: library/collections.abc.rst:169 +#: library/collections.abc.rst:271 msgid "The index() method added support for *stop* and *start* arguments." msgstr "" "La méthode index() a ajouté le support des arguments *start* et *stop*." -#: library/collections.abc.rst:176 +#: library/collections.abc.rst:278 msgid "ABCs for read-only and mutable sets." msgstr "ABC pour les ensembles immuables et muables." -#: library/collections.abc.rst:181 +#: library/collections.abc.rst:283 msgid "ABCs for read-only and mutable :term:`mappings `." msgstr "" "ABC pour les :term:`tables de correspondances ` immuables et " "muables." -#: library/collections.abc.rst:188 +#: library/collections.abc.rst:290 msgid "" "ABCs for mapping, items, keys, and values :term:`views `." msgstr "" "ABC pour les :term:`vues` de *mappings* (tableaux de " "correspondances), d'éléments, de clés et de valeurs." -#: library/collections.abc.rst:192 +#: library/collections.abc.rst:294 msgid "" "ABC for :term:`awaitable` objects, which can be used in :keyword:`await` " "expressions. Custom implementations must provide the :meth:`__await__` " @@ -446,7 +577,7 @@ msgstr "" "utilisés dans les expressions :keyword:`await`. Les implémentations " "personnalisées doivent définir la méthode :meth:`__await__`." -#: library/collections.abc.rst:196 +#: library/collections.abc.rst:298 msgid "" ":term:`Coroutine ` objects and instances of the :class:" "`~collections.abc.Coroutine` ABC are all instances of this ABC." @@ -454,13 +585,13 @@ msgstr "" "Les objets :term:`coroutines ` et les instances de l'ABC :class:" "`~collections.abc.Coroutine` sont tous des instances de cette ABC." -#: library/collections.abc.rst:200 +#: library/collections.abc.rst:302 +#, fuzzy msgid "" "In CPython, generator-based coroutines (generators decorated with :func:" -"`types.coroutine` or :func:`asyncio.coroutine`) are *awaitables*, even " -"though they do not have an :meth:`__await__` method. Using " -"``isinstance(gencoro, Awaitable)`` for them will return ``False``. Use :func:" -"`inspect.isawaitable` to detect them." +"`types.coroutine`) are *awaitables*, even though they do not have an :meth:" +"`__await__` method. Using ``isinstance(gencoro, Awaitable)`` for them will " +"return ``False``. Use :func:`inspect.isawaitable` to detect them." msgstr "" "En CPython, les coroutines basées sur les générateurs (les générateurs " "décorés avec :func:`types.coroutine` ou :func:`asyncio.coroutine`) sont " @@ -469,7 +600,7 @@ msgstr "" "décoré va renvoyer ``False``. Utilisez :func:`inspect.isawaitable` pour les " "détecter." -#: library/collections.abc.rst:210 +#: library/collections.abc.rst:312 msgid "" "ABC for coroutine compatible classes. These implement the following " "methods, defined in :ref:`coroutine-objects`: :meth:`~coroutine.send`, :meth:" @@ -485,13 +616,13 @@ msgstr "" "Toutes les instances de :class:`Coroutine` sont également des instances de :" "class:`Awaitable`. Voir aussi la définition de :term:`coroutine`." -#: library/collections.abc.rst:218 +#: library/collections.abc.rst:320 +#, fuzzy msgid "" "In CPython, generator-based coroutines (generators decorated with :func:" -"`types.coroutine` or :func:`asyncio.coroutine`) are *awaitables*, even " -"though they do not have an :meth:`__await__` method. Using " -"``isinstance(gencoro, Coroutine)`` for them will return ``False``. Use :func:" -"`inspect.isawaitable` to detect them." +"`types.coroutine`) are *awaitables*, even though they do not have an :meth:" +"`__await__` method. Using ``isinstance(gencoro, Coroutine)`` for them will " +"return ``False``. Use :func:`inspect.isawaitable` to detect them." msgstr "" "En CPython, les coroutines basées sur les générateurs (les générateurs " "décorés avec :func:`types.coroutine` ou :func:`asyncio.coroutine`) sont " @@ -500,7 +631,7 @@ msgstr "" "décoré va renvoyer ``False``. Utilisez :func:`inspect.isawaitable` pour les " "détecter." -#: library/collections.abc.rst:228 +#: library/collections.abc.rst:330 msgid "" "ABC for classes that provide ``__aiter__`` method. See also the definition " "of :term:`asynchronous iterable`." @@ -508,7 +639,7 @@ msgstr "" "ABC pour les classes qui définissent la méthode ``__aiter__``. Voir aussi la " "définition d':term:`itérable asynchrone `." -#: library/collections.abc.rst:235 +#: library/collections.abc.rst:337 msgid "" "ABC for classes that provide ``__aiter__`` and ``__anext__`` methods. See " "also the definition of :term:`asynchronous iterator`." @@ -517,7 +648,7 @@ msgstr "" "``__anext__``. Voir aussi la définition d':term:`itérateur asynchrone " "`." -#: library/collections.abc.rst:242 +#: library/collections.abc.rst:344 msgid "" "ABC for asynchronous generator classes that implement the protocol defined " "in :pep:`525` and :pep:`492`." @@ -525,15 +656,20 @@ msgstr "" "ABC pour les classes de générateurs asynchrones qui implémentent le " "protocole défini dans la :pep:`525` et dans la :pep:`492`." -#: library/collections.abc.rst:248 +#: library/collections.abc.rst:350 +msgid "Examples and Recipes" +msgstr "" + +#: library/collections.abc.rst:352 +#, fuzzy msgid "" -"These ABCs allow us to ask classes or instances if they provide particular " +"ABCs allow us to ask classes or instances if they provide particular " "functionality, for example::" msgstr "" "Ces ABC permettent de demander à des classes ou à des instances si elles " "fournissent des fonctionnalités particulières, par exemple ::" -#: library/collections.abc.rst:255 +#: library/collections.abc.rst:359 msgid "" "Several of the ABCs are also useful as mixins that make it easier to develop " "classes supporting container APIs. For example, to write a class supporting " @@ -550,13 +686,13 @@ msgstr "" "apporte les méthodes restantes, comme :meth:`__and__` et :meth:" "`isdisjoint` ::" -#: library/collections.abc.rst:284 +#: library/collections.abc.rst:388 msgid "Notes on using :class:`Set` and :class:`MutableSet` as a mixin:" msgstr "" "Notes à propos de l'utilisation de :class:`Set` et :class:`MutableSet` comme " "*mixin* :" -#: library/collections.abc.rst:287 +#: library/collections.abc.rst:391 msgid "" "Since some set operations create new sets, the default mixin methods need a " "way to create new instances from an iterable. The class constructor is " @@ -579,7 +715,7 @@ msgstr "" "`_from_iterable` avec une méthode de classe ou une méthode ordinaire qui " "peut construire de nouvelles instances à partir d'un argument itérable." -#: library/collections.abc.rst:298 +#: library/collections.abc.rst:402 msgid "" "To override the comparisons (presumably for speed, as the semantics are " "fixed), redefine :meth:`__le__` and :meth:`__ge__`, then the other " @@ -589,7 +725,7 @@ msgstr "" "sémantique est fixe), il faut redéfinir :meth:`__le__` et :meth:`__ge__`, " "puis les autres opérations seront automatiquement adaptées." -#: library/collections.abc.rst:303 +#: library/collections.abc.rst:407 msgid "" "The :class:`Set` mixin provides a :meth:`_hash` method to compute a hash " "value for the set; however, :meth:`__hash__` is not defined because not all " @@ -603,7 +739,7 @@ msgstr "" "Pour rendre un ensemble hachable en utilisant les *mixins*, héritez de :meth:" "`Set` et de :meth:`Hashable`, puis définissez ``__hash__ = Set._hash``." -#: library/collections.abc.rst:311 +#: library/collections.abc.rst:415 msgid "" "`OrderedSet recipe `_ for an " "example built on :class:`MutableSet`." @@ -611,7 +747,7 @@ msgstr "" "`OrderedSet recipe `_ pour un " "exemple construit sur :class:`MutableSet`." -#: library/collections.abc.rst:314 +#: library/collections.abc.rst:418 msgid "For more about ABCs, see the :mod:`abc` module and :pep:`3119`." msgstr "" "Pour plus d'informations à propos des ABC, voir le module :mod:`abc` et la :" diff --git a/library/collections.po b/library/collections.po index 8b254bdcf9..343b6529d7 100644 --- a/library/collections.po +++ b/library/collections.po @@ -5,16 +5,16 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" -"PO-Revision-Date: 2021-03-20 19:28+0100\n" -"Last-Translator: Loc Cosnier \n" -"Language-Team: French \n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2021-11-06 20:46+0100\n" +"Last-Translator: Jean Abou Samra \n" +"Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1)\n" -"X-Generator: Gtranslator 3.38.0\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.0\n" #: library/collections.rst:2 msgid ":mod:`collections` --- Container datatypes" @@ -121,21 +121,11 @@ msgstr "" "surcouche autour des objets chaînes de caractères pour faciliter l'héritage " "de ``str``" -#: library/collections.rst:41 -msgid "" -"Moved :ref:`collections-abstract-base-classes` to the :mod:`collections.abc` " -"module. For backwards compatibility, they continue to be visible in this " -"module through Python 3.9." -msgstr "" -"Les :ref:`collections-abstract-base-classes` ont été déplacées vers le " -"module :mod:`collections.abc`. Pour assurer la rétrocompatibilité, elles " -"sont toujours disponibles dans ce module dans Python 3.9." - -#: library/collections.rst:43 +#: library/collections.rst:38 msgid ":class:`ChainMap` objects" msgstr "Objets :class:`ChainMap`" -#: library/collections.rst:47 +#: library/collections.rst:42 msgid "" "A :class:`ChainMap` class is provided for quickly linking a number of " "mappings so they can be treated as a single unit. It is often much faster " @@ -147,14 +137,14 @@ msgstr "" "que de créer un nouveau dictionnaire et d'effectuer plusieurs appels de :" "meth:`~dict.update`." -#: library/collections.rst:51 +#: library/collections.rst:46 msgid "" "The class can be used to simulate nested scopes and is useful in templating." msgstr "" "Cette classe peut être utilisée pour simuler des portées imbriquées, elle " "est aussi utile pour le *templating*." -#: library/collections.rst:55 +#: library/collections.rst:50 msgid "" "A :class:`ChainMap` groups multiple dicts or other mappings together to " "create a single, updateable view. If no *maps* are specified, a single " @@ -166,7 +156,7 @@ msgstr "" "paramètre *maps* est vide, un dictionnaire vide est fourni de telle manière " "qu'une nouvelle chaîne possède toujours au moins un dictionnaire." -#: library/collections.rst:59 +#: library/collections.rst:54 msgid "" "The underlying mappings are stored in a list. That list is public and can " "be accessed or updated using the *maps* attribute. There is no other state." @@ -175,7 +165,7 @@ msgstr "" "publique et peut être consultée ou mise à jour via l'attribut *maps*. Il n'y " "a pas d'autre état." -#: library/collections.rst:62 +#: library/collections.rst:57 msgid "" "Lookups search the underlying mappings successively until a key is found. " "In contrast, writes, updates, and deletions only operate on the first " @@ -185,7 +175,7 @@ msgstr "" "la première clé correspondante. En revanche, les écritures, mises à jour et " "suppressions n'affectent que le premier dictionnaire." -#: library/collections.rst:65 +#: library/collections.rst:60 msgid "" "A :class:`ChainMap` incorporates the underlying mappings by reference. So, " "if one of the underlying mappings gets updated, those changes will be " @@ -195,7 +185,7 @@ msgstr "" "référence. Ainsi, si l'un d'eux est modifié, les changements affectent " "également la :class:`ChainMap`." -#: library/collections.rst:69 +#: library/collections.rst:64 msgid "" "All of the usual dictionary methods are supported. In addition, there is a " "*maps* attribute, a method for creating new subcontexts, and a property for " @@ -206,7 +196,7 @@ msgstr "" "contextes et une propriété pour accéder à tous les dictionnaires sous-" "jacents excepté le premier :" -#: library/collections.rst:75 +#: library/collections.rst:70 msgid "" "A user updateable list of mappings. The list is ordered from first-searched " "to last-searched. It is the only stored state and can be modified to change " @@ -218,28 +208,35 @@ msgstr "" "pour changer l'ordre de recherche. La liste doit toujours contenir au moins " "un dictionnaire." -#: library/collections.rst:82 +#: library/collections.rst:77 msgid "" "Returns a new :class:`ChainMap` containing a new map followed by all of the " "maps in the current instance. If ``m`` is specified, it becomes the new map " "at the front of the list of mappings; if not specified, an empty dict is " "used, so that a call to ``d.new_child()`` is equivalent to: ``ChainMap({}, " -"*d.maps)``. This method is used for creating subcontexts that can be " +"*d.maps)``. If any keyword arguments are specified, they update passed map " +"or new empty dict. This method is used for creating subcontexts that can be " "updated without altering values in any of the parent mappings." msgstr "" "Renvoie un nouvel objet :class:`ChainMap` contenant un nouveau dictionnaire " "suivi par tous les autres de l'instance actuelle. Si ``m`` est spécifié, il " "devient le nouveau dictionnaire au début de la liste ; sinon, un " "dictionnaire vide est utilisé, de telle manière qu'appeler ``d.new_child()`` " -"équivaut à appeler ``ChainMap({}, *d.maps)``. Cette méthode est utile pour " -"créer des sous-contextes qui peuvent être mis à jour sans altérer les " -"valeurs dans les dictionnaires parents." +"équivaut à appeler ``ChainMap({}, *d.maps)``. Si des arguments sont passés " +"par mot-clé, ils sont insérés comme de nouvelles entrées du dictionnaire " +"ajouté. Cette méthode est utile pour créer des sous-contextes qui peuvent " +"être mis à jour sans altérer les valeurs dans les dictionnaires parents." -#: library/collections.rst:90 +# Pas de majuscule car suit deux points. +#: library/collections.rst:86 msgid "The optional ``m`` parameter was added." -msgstr "Ajout du paramètre optionnel ``m``." +msgstr "ajout du paramètre optionnel ``m``." + +#: library/collections.rst:89 +msgid "Keyword arguments support was added." +msgstr "prise en charge des arguments par mot-clé." -#: library/collections.rst:95 +#: library/collections.rst:94 msgid "" "Property returning a new :class:`ChainMap` containing all of the maps in the " "current instance except the first one. This is useful for skipping the " @@ -256,7 +253,7 @@ msgstr "" "`super`. Une référence à ``d.parents`` est équivalente à : ``ChainMap(*d." "maps[1:])``." -#: library/collections.rst:103 +#: library/collections.rst:102 msgid "" "Note, the iteration order of a :class:`ChainMap()` is determined by scanning " "the mappings last to first::" @@ -264,7 +261,7 @@ msgstr "" "Notez que l'itération de :class:`ChainMap()` se fait en parcourant les " "tableaux de correspondances du dernier jusqu'au premier ::" -#: library/collections.rst:111 +#: library/collections.rst:110 msgid "" "This gives the same ordering as a series of :meth:`dict.update` calls " "starting with the last mapping::" @@ -272,13 +269,13 @@ msgstr "" "Cela produit le même ordre qu'une suite d'appels à :meth:`dict.update` en " "commençant par le dernier tableau de correspondances ::" -#: library/collections.rst:119 +#: library/collections.rst:118 msgid "Added support for ``|`` and ``|=`` operators, specified in :pep:`584`." msgstr "" "Ajout de la gestion des opérateurs ``|`` et ``|=`` tels que définis dans :" "pep:`584`." -#: library/collections.rst:124 +#: library/collections.rst:123 msgid "" "The `MultiContext class `_ in the Enthought `CodeTools package " @@ -290,7 +287,7 @@ msgstr "" "github.com/enthought/codetools>`_ d'Enthought possède des options pour gérer " "l'écriture dans n'importe quel dictionnaire de la chaîne." -#: library/collections.rst:130 +#: library/collections.rst:129 msgid "" "Django's `Context class `_ for templating is a read-only chain of mappings. It " @@ -305,7 +302,7 @@ msgstr "" "`~collections.ChainMap.new_child` et à la propriété :attr:`~collections." "ChainMap.parents`." -#: library/collections.rst:137 +#: library/collections.rst:136 msgid "" "The `Nested Contexts recipe `_ " "has options to control whether writes and other mutations apply only to the " @@ -316,7 +313,7 @@ msgstr "" "mutations ne s'appliquent qu'au premier ou à un autre dictionnaire de la " "chaîne." -#: library/collections.rst:142 +#: library/collections.rst:141 msgid "" "A `greatly simplified read-only version of Chainmap `_." @@ -324,21 +321,21 @@ msgstr "" "Une `version grandement simplifiée de Chainmap en lecture seule `_." -#: library/collections.rst:147 +#: library/collections.rst:146 msgid ":class:`ChainMap` Examples and Recipes" msgstr "Exemples et cas pratiques utilisant :class:`ChainMap`" -#: library/collections.rst:149 +#: library/collections.rst:148 msgid "This section shows various approaches to working with chained maps." msgstr "" "Cette partie montre diverses approches afin de travailler avec les " "dictionnaires chaînés." -#: library/collections.rst:152 +#: library/collections.rst:151 msgid "Example of simulating Python's internal lookup chain::" msgstr "Exemple 1 : simulation de la chaîne de recherche interne de Python ::" -#: library/collections.rst:157 +#: library/collections.rst:156 msgid "" "Example of letting user specified command-line arguments take precedence " "over environment variables which in turn take precedence over default " @@ -347,7 +344,7 @@ msgstr "" "Exemple 2 : spécification d'une hiérarchie pour les options : ligne de " "commande, variable d'environnement, valeurs par défaut ::" -#: library/collections.rst:174 +#: library/collections.rst:173 msgid "" "Example patterns for using the :class:`ChainMap` class to simulate nested " "contexts::" @@ -355,7 +352,7 @@ msgstr "" "Exemple 3 : modèles pour simuler des contextes imbriqués avec la classe :" "class:`ChainMap` ::" -#: library/collections.rst:193 +#: library/collections.rst:192 msgid "" "The :class:`ChainMap` class only makes updates (writes and deletions) to the " "first mapping in the chain while lookups will search the full chain. " @@ -368,11 +365,11 @@ msgstr "" "profondeur, on peut facilement faire une sous-classe qui met à jour les clés " "trouvées de la chaîne en profondeur ::" -#: library/collections.rst:224 +#: library/collections.rst:223 msgid ":class:`Counter` objects" msgstr "Objets :class:`Counter`" -#: library/collections.rst:226 +#: library/collections.rst:225 msgid "" "A counter tool is provided to support convenient and rapid tallies. For " "example::" @@ -380,7 +377,7 @@ msgstr "" "Ce module fournit un outil pour effectuer rapidement et facilement des " "dénombrements. Par exemple ::" -#: library/collections.rst:245 +#: library/collections.rst:244 msgid "" "A :class:`Counter` is a :class:`dict` subclass for counting hashable " "objects. It is a collection where elements are stored as dictionary keys and " @@ -395,7 +392,7 @@ msgstr "" "entiers relatifs (positifs, négatifs ou nuls). La classe :class:`Counter` " "est similaire aux sacs ou aux multiensembles dans d'autres langages." -#: library/collections.rst:251 +#: library/collections.rst:250 msgid "" "Elements are counted from an *iterable* or initialized from another " "*mapping* (or counter):" @@ -403,7 +400,7 @@ msgstr "" "Les éléments sont comptés à partir d'un itérable ou initialisés à partir " "d'un autre dictionnaire (ou compteur) :" -#: library/collections.rst:259 +#: library/collections.rst:258 msgid "" "Counter objects have a dictionary interface except that they return a zero " "count for missing items instead of raising a :exc:`KeyError`:" @@ -412,7 +409,7 @@ msgstr "" "qu'ils renvoient zéro au lieu de lever une exception :exc:`KeyError` pour " "des éléments manquants :" -#: library/collections.rst:266 +#: library/collections.rst:265 msgid "" "Setting a count to zero does not remove an element from a counter. Use " "``del`` to remove it entirely:" @@ -420,9 +417,10 @@ msgstr "" "Mettre un comptage à zéro pour un élément ne le retire pas de l'objet " "Counter. Il faut utiliser ``del`` pour le supprimer complètement :" -#: library/collections.rst:274 +#: library/collections.rst:273 +#, fuzzy msgid "" -"As a :class:`dict` subclass, :class:`Counter` Inherited the capability to " +"As a :class:`dict` subclass, :class:`Counter` inherited the capability to " "remember insertion order. Math operations on *Counter* objects also " "preserve order. Results are ordered according to when an element is first " "encountered in the left operand and then by the order encountered in the " @@ -434,15 +432,16 @@ msgstr "" "ordonnés d'abord en fonction de la recherche d'apparition pour l'opérande de " "gauche, puis dans l'ordre d'apparition de l'opérande de droite." -#: library/collections.rst:280 +#: library/collections.rst:279 +#, fuzzy msgid "" -"Counter objects support three methods beyond those available for all " +"Counter objects support additional methods beyond those available for all " "dictionaries:" msgstr "" "En plus des méthodes disponibles pour tous les dictionnaires, les objets " "compteurs gèrent trois méthodes supplémentaires :" -#: library/collections.rst:285 +#: library/collections.rst:284 msgid "" "Return an iterator over elements repeating each as many times as its count. " "Elements are returned in the order first encountered. If an element's count " @@ -453,7 +452,7 @@ msgstr "" "lequel ils sont rencontrés pour la première fois. Si le comptage d'un " "élément est strictement inférieur à 1, alors :meth:`elements` l'ignore." -#: library/collections.rst:295 +#: library/collections.rst:294 msgid "" "Return a list of the *n* most common elements and their counts from the most " "common to the least. If *n* is omitted or ``None``, :meth:`most_common` " @@ -466,7 +465,7 @@ msgstr "" "éléments qui ont le même nombre d'occurrences sont ordonnés par l'ordre " "selon lequel ils ont été rencontrés pour la première fois :" -#: library/collections.rst:305 +#: library/collections.rst:304 msgid "" "Elements are subtracted from an *iterable* or from another *mapping* (or " "counter). Like :meth:`dict.update` but subtracts counts instead of " @@ -477,7 +476,11 @@ msgstr "" "update` mais soustrait les nombres d'occurrences au lieu de les remplacer. " "Les entrées et sorties peuvent être négatives ou nulles." -#: library/collections.rst:317 +#: library/collections.rst:318 +msgid "Compute the sum of the counts." +msgstr "Calcule la somme totale des nombres d'occurrences." + +#: library/collections.rst:326 msgid "" "The usual dictionary methods are available for :class:`Counter` objects " "except for two which work differently for counters." @@ -486,13 +489,13 @@ msgstr "" "class:`Counter` à l'exception de deux méthodes qui fonctionnent différemment " "pour les compteurs." -#: library/collections.rst:322 +#: library/collections.rst:331 msgid "This class method is not implemented for :class:`Counter` objects." msgstr "" "Cette méthode de classe n'est pas implémentée pour les objets :class:" "`Counter`." -#: library/collections.rst:326 +#: library/collections.rst:335 msgid "" "Elements are counted from an *iterable* or added-in from another *mapping* " "(or counter). Like :meth:`dict.update` but adds counts instead of replacing " @@ -505,19 +508,47 @@ msgstr "" "De plus, l'itérable doit être une séquence d'éléments et non une séquence de " "paires ``(clé, valeur)``." -#: library/collections.rst:331 +#: library/collections.rst:340 +msgid "" +"Counters support rich comparison operators for equality, subset, and " +"superset relationships: ``==``, ``!=``, ``<``, ``<=``, ``>``, ``>=``. All of " +"those tests treat missing elements as having zero counts so that " +"``Counter(a=1) == Counter(a=1, b=0)`` returns true." +msgstr "" +"Les compteurs prennent en charge les comparaisons riches pour les tests " +"d'égalité ainsi que d'inclusion du membre gauche dans le membre droite et " +"réciproquement, avec les opérateurs ``==``, ``!=``, ``<``, ``<=``, ``>`` et " +"``>=``. Les éléments dont le nombre d'occurrences est à zéro sont ignorés. " +"Par exemple, on a ``Counter(a=1) == Counter(a=1, b=0)``." + +#: library/collections.rst:345 +msgid "Rich comparison operations were added." +msgstr "ajout des comparaisons riches." + +#: library/collections.rst:348 +msgid "" +"In equality tests, missing elements are treated as having zero counts. " +"Formerly, ``Counter(a=3)`` and ``Counter(a=3, b=0)`` were considered " +"distinct." +msgstr "" +"les éléments dont le nombre d'occurrences est à zéro sont désormais ignorés " +"dans les tests d'égalité. On avait auparavant ``Counter(a=3) != Counter(a=3, " +"b=0)``." + +#: library/collections.rst:353 msgid "Common patterns for working with :class:`Counter` objects::" msgstr "Opérations usuelles sur les objets :class:`Counter` ::" -#: library/collections.rst:343 +#: library/collections.rst:365 +#, fuzzy msgid "" "Several mathematical operations are provided for combining :class:`Counter` " "objects to produce multisets (counters that have counts greater than zero). " "Addition and subtraction combine counters by adding or subtracting the " "counts of corresponding elements. Intersection and union return the minimum " -"and maximum of corresponding counts. Each operation can accept inputs with " -"signed counts, but the output will exclude results with counts of zero or " -"less." +"and maximum of corresponding counts. Equality and inclusion compare " +"corresponding counts. Each operation can accept inputs with signed counts, " +"but the output will exclude results with counts of zero or less." msgstr "" "Quelques opérations mathématiques sont fournies pour combiner des objets :" "class:`Counter` afin de créer des multiensembles (des compteurs dont les " @@ -529,7 +560,7 @@ msgstr "" "comptages relatifs, mais la sortie exclut les résultats avec des comptages " "négatifs ou nuls." -#: library/collections.rst:361 +#: library/collections.rst:390 msgid "" "Unary addition and subtraction are shortcuts for adding an empty counter or " "subtracting from an empty counter." @@ -538,14 +569,14 @@ msgstr "" "raccourcis pour respectivement additionner un compteur avec un compteur vide " "ou et pour retrancher un compteur d'un compteur vide." -#: library/collections.rst:370 +#: library/collections.rst:399 msgid "" "Added support for unary plus, unary minus, and in-place multiset operations." msgstr "" "Ajout de la gestion des additions et soustractions unaires, et des " "remplacements dans les multiensembles." -#: library/collections.rst:375 +#: library/collections.rst:404 msgid "" "Counters were primarily designed to work with positive integers to represent " "running counts; however, care was taken to not unnecessarily preclude use " @@ -558,7 +589,7 @@ msgstr "" "n'ont pas été écartés. Pour vous aider dans ces cas particuliers, cette " "section documente la plage minimale et les restrictions de type." -#: library/collections.rst:380 +#: library/collections.rst:409 msgid "" "The :class:`Counter` class itself is a dictionary subclass with no " "restrictions on its keys and values. The values are intended to be numbers " @@ -569,7 +600,7 @@ msgstr "" "vocation à être des nombres représentants des comptages, mais il est " "*possible* de stocker n'importe quel type de valeur." -#: library/collections.rst:384 +#: library/collections.rst:413 msgid "" "The :meth:`~Counter.most_common` method requires only that the values be " "orderable." @@ -577,7 +608,7 @@ msgstr "" "La méthode :meth:`~Counter.most_common` exige uniquement que les valeurs " "soient ordonnables." -#: library/collections.rst:386 +#: library/collections.rst:415 msgid "" "For in-place operations such as ``c[key] += 1``, the value type need only " "support addition and subtraction. So fractions, floats, and decimals would " @@ -591,7 +622,7 @@ msgstr "" "même pour :meth:`~Counter.update` et :meth:`~Cointer.substract` qui " "acceptent des valeurs négatives ou nulles dans les entrées et sorties." -#: library/collections.rst:392 +#: library/collections.rst:421 msgid "" "The multiset methods are designed only for use cases with positive values. " "The inputs may be negative or zero, but only outputs with positive values " @@ -604,7 +635,7 @@ msgstr "" "positives sont créées. Il n'y a pas de restriction de type, mais les types " "des valeurs doivent gérer l'addition, la soustraction et la comparaison." -#: library/collections.rst:397 +#: library/collections.rst:426 msgid "" "The :meth:`~Counter.elements` method requires integer counts. It ignores " "zero and negative counts." @@ -612,7 +643,7 @@ msgstr "" "La méthode :meth:`~Counter.elements` exige des valeurs entières et ignore " "les valeurs négatives ou nulles." -#: library/collections.rst:402 +#: library/collections.rst:431 msgid "" "`Bag class `_ in Smalltalk." @@ -620,7 +651,7 @@ msgstr "" "`Bag class `_ dans Smalltalk." -#: library/collections.rst:405 +#: library/collections.rst:434 msgid "" "Wikipedia entry for `Multisets `_." msgstr "" @@ -628,7 +659,7 @@ msgstr "" "Multiensemble>`_ sur Wikipédia (ou `l'article en anglais `_)." -#: library/collections.rst:407 +#: library/collections.rst:436 msgid "" "`C++ multisets `_ tutorial with examples." @@ -636,7 +667,7 @@ msgstr "" "Des guides et exemples à propos des `multiensembles en C++ `_." -#: library/collections.rst:410 +#: library/collections.rst:439 msgid "" "For mathematical operations on multisets and their use cases, see *Knuth, " "Donald. The Art of Computer Programming Volume II, Section 4.6.3, Exercise " @@ -646,7 +677,7 @@ msgstr "" "applications, voir *Knuth, Donald. The Art of Computer Programming Volume " "II, Section 4.6.3, Exercise 19*." -#: library/collections.rst:414 +#: library/collections.rst:443 msgid "" "To enumerate all distinct multisets of a given size over a given set of " "elements, see :func:`itertools.combinations_with_replacement`::" @@ -655,11 +686,11 @@ msgstr "" "ensemble donné d'éléments, voir :func:`itertools." "combinations_with_replacement` ::" -#: library/collections.rst:421 +#: library/collections.rst:450 msgid ":class:`deque` objects" msgstr "Objets :class:`deque`" -#: library/collections.rst:425 +#: library/collections.rst:454 msgid "" "Returns a new deque object initialized left-to-right (using :meth:`append`) " "with data from *iterable*. If *iterable* is not specified, the new deque is " @@ -669,7 +700,7 @@ msgstr "" "meth:`append`) avec les données d'*iterable*. Si *iterable* n'est pas " "spécifié, alors la nouvelle *deque* est vide." -#: library/collections.rst:428 +#: library/collections.rst:457 msgid "" "Deques are a generalization of stacks and queues (the name is pronounced " "\"deck\" and is short for \"double-ended queue\"). Deques support thread-" @@ -684,7 +715,7 @@ msgstr "" "vue de la mémoire des deux côtés de la *deque*, avec approximativement la " "même performance en *O(1)* dans les deux sens." -#: library/collections.rst:433 +#: library/collections.rst:462 msgid "" "Though :class:`list` objects support similar operations, they are optimized " "for fast fixed-length operations and incur O(n) memory movement costs for " @@ -697,7 +728,7 @@ msgstr "" "position de la représentation des données sous-jacentes entraînent des coûts " "de déplacement de mémoire en *O(n)*." -#: library/collections.rst:439 +#: library/collections.rst:468 msgid "" "If *maxlen* is not specified or is ``None``, deques may grow to an arbitrary " "length. Otherwise, the deque is bounded to the specified maximum length. " @@ -716,32 +747,32 @@ msgstr "" "Elles sont aussi utiles pour le suivi de transactions et autres lots de " "données où seule l'activité récente est intéressante." -#: library/collections.rst:448 +#: library/collections.rst:477 msgid "Deque objects support the following methods:" msgstr "Les objets *deques* gèrent les méthodes suivantes :" -#: library/collections.rst:452 +#: library/collections.rst:481 msgid "Add *x* to the right side of the deque." msgstr "Ajoute *x* à l'extrémité droite de la *deque*." -#: library/collections.rst:457 +#: library/collections.rst:486 msgid "Add *x* to the left side of the deque." msgstr "Ajoute *x* à l'extrémité gauche de la *deque*." -#: library/collections.rst:462 +#: library/collections.rst:491 msgid "Remove all elements from the deque leaving it with length 0." msgstr "" "Supprime tous les éléments de la *deque* et la laisse avec une longueur de 0." -#: library/collections.rst:467 +#: library/collections.rst:496 msgid "Create a shallow copy of the deque." msgstr "Crée une copie superficielle de la *deque*." -#: library/collections.rst:474 +#: library/collections.rst:503 msgid "Count the number of deque elements equal to *x*." msgstr "Compte le nombre d'éléments de la *deque* égaux à *x*." -#: library/collections.rst:481 +#: library/collections.rst:510 msgid "" "Extend the right side of the deque by appending elements from the iterable " "argument." @@ -749,7 +780,7 @@ msgstr "" "Étend la *deque* en ajoutant les éléments de l'itérable en argument à son " "extrémité droite." -#: library/collections.rst:487 +#: library/collections.rst:516 msgid "" "Extend the left side of the deque by appending elements from *iterable*. " "Note, the series of left appends results in reversing the order of elements " @@ -759,7 +790,7 @@ msgstr "" "gauche. Dans ce cas, notez que la série d'ajouts inverse l'ordre des " "éléments de l'argument itérable." -#: library/collections.rst:494 +#: library/collections.rst:523 msgid "" "Return the position of *x* in the deque (at or after index *start* and " "before index *stop*). Returns the first match or raises :exc:`ValueError` " @@ -769,11 +800,11 @@ msgstr "" "jusqu'à *stop* exclus). Renvoie la première correspondance ou lève :exc:" "`ValueError` si aucune n'est trouvée." -#: library/collections.rst:503 +#: library/collections.rst:532 msgid "Insert *x* into the deque at position *i*." msgstr "Insère *x* dans la *deque* à la position *i*." -#: library/collections.rst:505 +#: library/collections.rst:534 msgid "" "If the insertion would cause a bounded deque to grow beyond *maxlen*, an :" "exc:`IndexError` is raised." @@ -781,7 +812,7 @@ msgstr "" "Si une insertion provoque un dépassement de la taille limitée d'une *deque*, " "alors elle lève une exception :exc:`IndexError`." -#: library/collections.rst:513 +#: library/collections.rst:542 msgid "" "Remove and return an element from the right side of the deque. If no " "elements are present, raises an :exc:`IndexError`." @@ -789,7 +820,7 @@ msgstr "" "Retire et renvoie un élément de l'extrémité droite de la *deque*. S'il n'y a " "aucun élément, lève une exception :exc:`IndexError`." -#: library/collections.rst:519 +#: library/collections.rst:548 msgid "" "Remove and return an element from the left side of the deque. If no elements " "are present, raises an :exc:`IndexError`." @@ -797,7 +828,7 @@ msgstr "" "Retire et renvoie un élément de l'extrémité gauche de la *deque*. S'il n'y a " "aucun élément, lève une exception :exc:`IndexError`." -#: library/collections.rst:525 +#: library/collections.rst:554 msgid "" "Remove the first occurrence of *value*. If not found, raises a :exc:" "`ValueError`." @@ -805,13 +836,13 @@ msgstr "" "Supprime la première occurrence de *value*. Si aucune occurrence n'est " "trouvée, lève une exception :exc:`ValueError`." -#: library/collections.rst:531 +#: library/collections.rst:560 msgid "Reverse the elements of the deque in-place and then return ``None``." msgstr "" "Inverse le sens des éléments de la *deque* sans créer de copie et renvoie " "``None``." -#: library/collections.rst:538 +#: library/collections.rst:567 msgid "" "Rotate the deque *n* steps to the right. If *n* is negative, rotate to the " "left." @@ -819,7 +850,7 @@ msgstr "" "Décale les éléments de la *deque* de *n* places vers la droite (le dernier " "élément revient au début). Si *n* est négatif, décale vers la gauche." -#: library/collections.rst:541 +#: library/collections.rst:570 msgid "" "When the deque is not empty, rotating one step to the right is equivalent to " "``d.appendleft(d.pop())``, and rotating one step to the left is equivalent " @@ -829,16 +860,16 @@ msgstr "" "équivaut à ``d.appendleft(d.pop())`` et un décalage d'une place vers la " "gauche est équivalent à ``d.append(d.popleft())``." -#: library/collections.rst:546 +#: library/collections.rst:575 msgid "Deque objects also provide one read-only attribute:" msgstr "" "Les objets *deques* fournissent également un attribut en lecture seule :" -#: library/collections.rst:550 +#: library/collections.rst:579 msgid "Maximum size of a deque or ``None`` if unbounded." msgstr "La taille maximale d'une *deque*, ou ``None`` si illimitée." -#: library/collections.rst:555 +#: library/collections.rst:584 msgid "" "In addition to the above, deques support iteration, pickling, ``len(d)``, " "``reversed(d)``, ``copy.copy(d)``, ``copy.deepcopy(d)``, membership testing " @@ -853,7 +884,7 @@ msgstr "" "L'accès par indice est en *O(1)* aux extrémités mais en *O(n)* au milieu. " "Pour des accès aléatoires rapides, il est préférable d'utiliser des listes." -#: library/collections.rst:561 +#: library/collections.rst:590 msgid "" "Starting in version 3.5, deques support ``__add__()``, ``__mul__()``, and " "``__imul__()``." @@ -861,20 +892,20 @@ msgstr "" "Depuis la version 3.5, les *deques* gèrent ``__add__()``, ``__mul__()`` et " "``__imul__()``." -#: library/collections.rst:564 +#: library/collections.rst:593 msgid "Example:" msgstr "Exemple :" -#: library/collections.rst:621 +#: library/collections.rst:650 msgid ":class:`deque` Recipes" msgstr "Cas pratiques utilisant :class:`deque`" -#: library/collections.rst:623 +#: library/collections.rst:652 msgid "This section shows various approaches to working with deques." msgstr "" "Cette partie montre diverses approches afin de travailler avec les *deques*." -#: library/collections.rst:625 +#: library/collections.rst:654 msgid "" "Bounded length deques provide functionality similar to the ``tail`` filter " "in Unix::" @@ -882,7 +913,7 @@ msgstr "" "Les *deques* à taille limitée apportent une fonctionnalité similaire au " "filtre ``tail`` d'Unix ::" -#: library/collections.rst:633 +#: library/collections.rst:662 msgid "" "Another approach to using deques is to maintain a sequence of recently added " "elements by appending to the right and popping to the left::" @@ -891,7 +922,7 @@ msgstr "" "d'éléments récemment ajoutés en les ajoutant à droite et en retirant les " "anciens par la gauche ::" -#: library/collections.rst:648 +#: library/collections.rst:677 msgid "" "A `round-robin scheduler `_ can be implemented with input iterators stored in a :" @@ -907,7 +938,7 @@ msgstr "" "avec la méthode :meth:`~deque.popleft` ; ou bien il peut être remis à la fin " "avec la méthode :meth:`~ deque.rotate` ::" -#: library/collections.rst:667 +#: library/collections.rst:696 msgid "" "The :meth:`~deque.rotate` method provides a way to implement :class:`deque` " "slicing and deletion. For example, a pure Python implementation of ``del " @@ -919,7 +950,7 @@ msgstr "" "utilise la méthode ``rotate()`` pour mettre en position les éléments à " "éjecter ::" -#: library/collections.rst:676 +#: library/collections.rst:705 msgid "" "To implement :class:`deque` slicing, use a similar approach applying :meth:" "`~deque.rotate` to bring a target element to the left side of the deque. " @@ -936,13 +967,13 @@ msgstr "" "aisé d'implémenter les manipulations des piles inspirées du Forth telles que " "``dup``, ``drop``, ``swap``, ``over``, ``pick``, ``rot`` et ``roll``." -#: library/collections.rst:686 +#: library/collections.rst:715 msgid ":class:`defaultdict` objects" msgstr "Objets :class:`defaultdict`" -#: library/collections.rst:690 +#: library/collections.rst:719 msgid "" -"Returns a new dictionary-like object. :class:`defaultdict` is a subclass of " +"Return a new dictionary-like object. :class:`defaultdict` is a subclass of " "the built-in :class:`dict` class. It overrides one method and adds one " "writable instance variable. The remaining functionality is the same as for " "the :class:`dict` class and is not documented here." @@ -953,7 +984,7 @@ msgstr "" "autres fonctionnalités sont les mêmes que celles des objets :class:`dict` et " "ne sont pas documentées ici." -#: library/collections.rst:695 +#: library/collections.rst:724 msgid "" "The first argument provides the initial value for the :attr:" "`default_factory` attribute; it defaults to ``None``. All remaining " @@ -966,7 +997,7 @@ msgstr "" "si on les passait au constructeur de :class:`dict`, y compris les arguments " "nommés." -#: library/collections.rst:701 +#: library/collections.rst:730 msgid "" ":class:`defaultdict` objects support the following method in addition to the " "standard :class:`dict` operations:" @@ -974,7 +1005,7 @@ msgstr "" "En plus des opérations usuelles de :class:`dict`, les objets :class:" "`defaultdict` gèrent les méthodes supplémentaires suivantes :" -#: library/collections.rst:706 +#: library/collections.rst:735 msgid "" "If the :attr:`default_factory` attribute is ``None``, this raises a :exc:" "`KeyError` exception with the *key* as argument." @@ -982,7 +1013,7 @@ msgstr "" "Si l'attribut :attr:`default_factory` est ``None``, lève une exception :exc:" "`KeyError` avec *key* comme argument." -#: library/collections.rst:709 +#: library/collections.rst:738 msgid "" "If :attr:`default_factory` is not ``None``, it is called without arguments " "to provide a default value for the given *key*, this value is inserted in " @@ -992,7 +1023,7 @@ msgstr "" "argument pour fournir une valeur par défaut pour la *key* demandée. Cette " "valeur est insérée dans le dictionnaire avec pour clé *key* et est renvoyée." -#: library/collections.rst:713 +#: library/collections.rst:742 msgid "" "If calling :attr:`default_factory` raises an exception this exception is " "propagated unchanged." @@ -1000,7 +1031,7 @@ msgstr "" "Si appeler :attr:`default_factory` lève une exception, celle-ci est " "transmise inchangée." -#: library/collections.rst:716 +#: library/collections.rst:745 msgid "" "This method is called by the :meth:`__getitem__` method of the :class:`dict` " "class when the requested key is not found; whatever it returns or raises is " @@ -1010,7 +1041,7 @@ msgstr "" "class:`dict` lorsque la clé demandée n'est pas trouvée. Ce qu'elle renvoie " "ou lève est alors renvoyé ou levé par :meth:`__getitem__`." -#: library/collections.rst:720 +#: library/collections.rst:749 msgid "" "Note that :meth:`__missing__` is *not* called for any operations besides :" "meth:`__getitem__`. This means that :meth:`get` will, like normal " @@ -1022,11 +1053,11 @@ msgstr "" "``None`` comme les dictionnaires natifs dans les cas triviaux et n'utilise " "pas :attr:`default_factory`." -#: library/collections.rst:726 +#: library/collections.rst:755 msgid ":class:`defaultdict` objects support the following instance variable:" msgstr "Les objets :class:`defaultdict` gèrent la variable d'instance :" -#: library/collections.rst:731 +#: library/collections.rst:760 msgid "" "This attribute is used by the :meth:`__missing__` method; it is initialized " "from the first argument to the constructor, if present, or to ``None``, if " @@ -1036,18 +1067,18 @@ msgstr "" "initialisé par le premier argument passé au constructeur, s'il est spécifié, " "sinon par ``None``." -#: library/collections.rst:1132 +#: library/collections.rst:1180 msgid "" "Added merge (``|``) and update (``|=``) operators, specified in :pep:`584`." msgstr "" "ajout des opérateurs fusion (``|``) et mise-à-jour (``|=``) tels que définis " "dans :pep:`584`." -#: library/collections.rst:741 +#: library/collections.rst:770 msgid ":class:`defaultdict` Examples" msgstr "Exemples utilisant :class:`defaultdict`" -#: library/collections.rst:743 +#: library/collections.rst:772 msgid "" "Using :class:`list` as the :attr:`~defaultdict.default_factory`, it is easy " "to group a sequence of key-value pairs into a dictionary of lists:" @@ -1056,7 +1087,7 @@ msgstr "" "le regroupement d'une séquence de paires clé-valeur en un dictionnaire de " "listes :" -#: library/collections.rst:754 +#: library/collections.rst:783 msgid "" "When each key is encountered for the first time, it is not already in the " "mapping; so an entry is automatically created using the :attr:`~defaultdict." @@ -1077,7 +1108,7 @@ msgstr "" "technique est plus simple et plus rapide qu'une technique équivalente " "utilisant :meth:`dict.setdefault` :" -#: library/collections.rst:769 +#: library/collections.rst:798 msgid "" "Setting the :attr:`~defaultdict.default_factory` to :class:`int` makes the :" "class:`defaultdict` useful for counting (like a bag or multiset in other " @@ -1087,7 +1118,7 @@ msgstr "" "classe :class:`defaultdict` pratique pour le comptage (comme un sac ou multi-" "ensemble dans d'autres langages) :" -#: library/collections.rst:781 +#: library/collections.rst:810 msgid "" "When a letter is first encountered, it is missing from the mapping, so the :" "attr:`~defaultdict.default_factory` function calls :func:`int` to supply a " @@ -1099,7 +1130,7 @@ msgstr "" "appelle :func:`int` pour mettre un nouveau compteur à zéro. L'incrémentation " "augmente ensuite le comptage pour chaque lettre." -#: library/collections.rst:785 +#: library/collections.rst:814 msgid "" "The function :func:`int` which always returns zero is just a special case of " "constant functions. A faster and more flexible way to create constant " @@ -1111,7 +1142,7 @@ msgstr "" "une fonction constante est d'utiliser une fonction lambda qui peut fournir " "n'importe quelle valeur constante (pas seulement zéro) :" -#: library/collections.rst:797 +#: library/collections.rst:826 msgid "" "Setting the :attr:`~defaultdict.default_factory` to :class:`set` makes the :" "class:`defaultdict` useful for building a dictionary of sets:" @@ -1119,13 +1150,13 @@ msgstr "" "Utiliser :class:`set` comme :attr:`~defaultdict.default_factory` rend la " "classe :class:`defaultdict` pratique pour créer un dictionnaire d'ensembles :" -#: library/collections.rst:810 +#: library/collections.rst:839 msgid ":func:`namedtuple` Factory Function for Tuples with Named Fields" msgstr "" ":func:`namedtuple` : fonction de construction pour *n*-uplets avec des " "champs nommés" -#: library/collections.rst:812 +#: library/collections.rst:841 msgid "" "Named tuples assign meaning to each position in a tuple and allow for more " "readable, self-documenting code. They can be used wherever regular tuples " @@ -1138,7 +1169,7 @@ msgstr "" "possibilité d'accéder à leurs champs grâce à leur nom au lieu de leur index " "de position." -#: library/collections.rst:818 +#: library/collections.rst:847 msgid "" "Returns a new tuple subclass named *typename*. The new subclass is used to " "create tuple-like objects that have fields accessible by attribute lookup as " @@ -1154,7 +1185,7 @@ msgstr "" "méthode :meth:`__repr__` pratique qui liste le contenu du *n*-uplet au " "format ``nom=valeur``." -#: library/collections.rst:824 +#: library/collections.rst:853 msgid "" "The *field_names* are a sequence of strings such as ``['x', 'y']``. " "Alternatively, *field_names* can be a single string with each fieldname " @@ -1165,7 +1196,7 @@ msgstr "" "sont séparés par un espace et/ou une virgule, par exemple ``'x y'`` ou ``'x, " "y'``." -#: library/collections.rst:828 +#: library/collections.rst:857 msgid "" "Any valid Python identifier may be used for a fieldname except for names " "starting with an underscore. Valid identifiers consist of letters, digits, " @@ -1179,7 +1210,7 @@ msgstr "" "`keyword` tel que ``class``, ``for``, ``return``, ``global``, ``pass`` ou " "``raise``." -#: library/collections.rst:834 +#: library/collections.rst:863 msgid "" "If *rename* is true, invalid fieldnames are automatically replaced with " "positional names. For example, ``['abc', 'def', 'ghi', 'abc']`` is " @@ -1191,7 +1222,7 @@ msgstr "" "'ghi', 'abc']`` est converti en ``['abc, '_1', 'ghi', '_3']`` afin " "d'éliminer le mot-clé ``def`` et le doublon de ``abc``." -#: library/collections.rst:839 +#: library/collections.rst:868 msgid "" "*defaults* can be ``None`` or an :term:`iterable` of default values. Since " "fields with a default value must come after any fields without a default, " @@ -1207,7 +1238,7 @@ msgstr "" "'z']`` et les valeurs par défaut ``(1, 2)``, alors ``x`` est un argument " "obligatoire tandis que ``y`` et ``y`` valent par défaut ``1`` et ``2``." -#: library/collections.rst:846 +#: library/collections.rst:875 msgid "" "If *module* is defined, the ``__module__`` attribute of the named tuple is " "set to that value." @@ -1215,7 +1246,7 @@ msgstr "" "Si *module* est spécifié, alors il est assigné à l'attribut ``__module__`` " "du *n*-uplet nommé." -#: library/collections.rst:849 +#: library/collections.rst:878 msgid "" "Named tuple instances do not have per-instance dictionaries, so they are " "lightweight and require no more memory than regular tuples." @@ -1224,7 +1255,7 @@ msgstr "" "sont donc légères et ne requièrent pas plus de mémoire que les *n*-uplets " "natifs." -#: library/collections.rst:852 +#: library/collections.rst:881 msgid "" "To support pickling, the named tuple class should be assigned to a variable " "that matches *typename*." @@ -1232,11 +1263,11 @@ msgstr "" "Pour permettre la sérialisation, la classe de *n*-uplet nommée doit être " "assignée à une variable qui correspond à *typename*." -#: library/collections.rst:855 +#: library/collections.rst:884 msgid "Added support for *rename*." msgstr "Gestion de *rename*." -#: library/collections.rst:858 +#: library/collections.rst:887 msgid "" "The *verbose* and *rename* parameters became :ref:`keyword-only arguments " "`." @@ -1244,21 +1275,21 @@ msgstr "" "Les paramètres *verbose* et *rename* deviennent des :ref:`arguments " "obligatoirement nommés `." -#: library/collections.rst:862 +#: library/collections.rst:891 msgid "Added the *module* parameter." msgstr "Ajout du paramètre *module*." -#: library/collections.rst:865 +#: library/collections.rst:894 msgid "Removed the *verbose* parameter and the :attr:`_source` attribute." msgstr "Suppression du paramètre *verbose* et de l'attribut :attr:`_source`." -#: library/collections.rst:868 +#: library/collections.rst:897 msgid "" "Added the *defaults* parameter and the :attr:`_field_defaults` attribute." msgstr "" "Ajout du paramètre *defaults* et de l'attribut :attr:`_field_defaults`." -#: library/collections.rst:888 +#: library/collections.rst:917 msgid "" "Named tuples are especially useful for assigning field names to result " "tuples returned by the :mod:`csv` or :mod:`sqlite3` modules::" @@ -1267,7 +1298,7 @@ msgstr "" "champs à des *n*-uplets renvoyés par les modules :mod:`csv` ou :mod:" "`sqlite3` ::" -#: library/collections.rst:904 +#: library/collections.rst:933 msgid "" "In addition to the methods inherited from tuples, named tuples support three " "additional methods and two attributes. To prevent conflicts with field " @@ -1277,14 +1308,14 @@ msgstr "" "implémentent trois méthodes et deux attributs supplémentaires. Pour éviter " "les conflits avec noms de champs, leurs noms commencent par un tiret bas." -#: library/collections.rst:910 +#: library/collections.rst:939 msgid "" "Class method that makes a new instance from an existing sequence or iterable." msgstr "" "Méthode de classe qui construit une nouvelle instance à partir d'une " "séquence ou d'un itérable existant." -#: library/collections.rst:920 +#: library/collections.rst:949 msgid "" "Return a new :class:`dict` which maps field names to their corresponding " "values:" @@ -1292,11 +1323,11 @@ msgstr "" "Renvoie un nouveau :class:`dict` qui associe chaque nom de champ à sa valeur " "correspondante :" -#: library/collections.rst:929 +#: library/collections.rst:958 msgid "Returns an :class:`OrderedDict` instead of a regular :class:`dict`." msgstr "Renvoie un :class:`OrderedDict` au lieu d'un :class:`dict` natif." -#: library/collections.rst:932 +#: library/collections.rst:961 msgid "" "Returns a regular :class:`dict` instead of an :class:`OrderedDict`. As of " "Python 3.7, regular dicts are guaranteed to be ordered. If the extra " @@ -1309,7 +1340,7 @@ msgstr "" "nécessaires, la solution préconisée est de convertir le résultat vers le " "type souhaité : ``OrderedDict(nt._asdict())``." -#: library/collections.rst:941 +#: library/collections.rst:970 msgid "" "Return a new instance of the named tuple replacing specified fields with new " "values::" @@ -1317,7 +1348,7 @@ msgstr "" "Renvoie une nouvelle instance du *n*-uplet nommé en remplaçant les champs " "spécifiés par leurs nouvelles valeurs ::" -#: library/collections.rst:953 +#: library/collections.rst:982 msgid "" "Tuple of strings listing the field names. Useful for introspection and for " "creating new named tuple types from existing named tuples." @@ -1326,11 +1357,11 @@ msgstr "" "l'introspection et pour créer de nouveaux types de *n*-uplets nommés à " "partir d'existants." -#: library/collections.rst:968 +#: library/collections.rst:997 msgid "Dictionary mapping field names to default values." msgstr "Dictionnaire qui assigne les valeurs par défaut aux noms des champs." -#: library/collections.rst:978 +#: library/collections.rst:1007 msgid "" "To retrieve a field whose name is stored in a string, use the :func:" "`getattr` function:" @@ -1338,7 +1369,7 @@ msgstr "" "Pour récupérer un champ dont le nom est une chaîne de caractères, utilisez " "la fonction :func:`getattr` :" -#: library/collections.rst:984 +#: library/collections.rst:1013 msgid "" "To convert a dictionary to a named tuple, use the double-star-operator (as " "described in :ref:`tut-unpacking-arguments`):" @@ -1346,7 +1377,7 @@ msgstr "" "Pour convertir un dictionnaire en *n*-uplet nommé, utilisez l'opérateur " "double-étoile (comme expliqué dans :ref:`tut-unpacking-arguments`) :" -#: library/collections.rst:991 +#: library/collections.rst:1020 msgid "" "Since a named tuple is a regular Python class, it is easy to add or change " "functionality with a subclass. Here is how to add a calculated field and a " @@ -1356,7 +1387,7 @@ msgstr "" "nommés grâce à l'héritage puisqu'il s'agit de simples classes. Voici comment " "ajouter un champ calculé avec une longueur fixe d'affichage :" -#: library/collections.rst:1010 +#: library/collections.rst:1039 msgid "" "The subclass shown above sets ``__slots__`` to an empty tuple. This helps " "keep memory requirements low by preventing the creation of instance " @@ -1366,7 +1397,7 @@ msgstr "" "permet de garder une emprunte mémoire faible en empêchant la création de " "dictionnaire d'instance." -#: library/collections.rst:1013 +#: library/collections.rst:1042 msgid "" "Subclassing is not useful for adding new, stored fields. Instead, simply " "create a new named tuple type from the :attr:`~somenamedtuple._fields` " @@ -1376,7 +1407,7 @@ msgstr "" "préférable de simplement créer un nouveau type de *n*-uplet nommé avec " "l'attribut :attr:`~somenamedtuple._fields` :" -#: library/collections.rst:1018 +#: library/collections.rst:1047 msgid "" "Docstrings can be customized by making direct assignments to the ``__doc__`` " "fields:" @@ -1384,11 +1415,11 @@ msgstr "" "Les *docstrings* peuvent être personnalisées en modifiant directement " "l'attribut ``__doc__`` :" -#: library/collections.rst:1027 +#: library/collections.rst:1056 msgid "Property docstrings became writeable." msgstr "La propriété devient éditable." -#: library/collections.rst:1032 +#: library/collections.rst:1061 msgid "" "See :class:`typing.NamedTuple` for a way to add type hints for named " "tuples. It also provides an elegant notation using the :keyword:`class` " @@ -1398,7 +1429,7 @@ msgstr "" "type pour les *n*-uplets nommés. Cela propose aussi une notation élégante " "utilisant le mot-clé :keyword:`class` ::" -#: library/collections.rst:1041 +#: library/collections.rst:1070 msgid "" "See :meth:`types.SimpleNamespace` for a mutable namespace based on an " "underlying dictionary instead of a tuple." @@ -1406,7 +1437,7 @@ msgstr "" "Voir :meth:`types.SimpleNamespace` pour un espace de nommage muable basé sur " "un dictionnaire sous-jacent à la place d'un *n*-uplet." -#: library/collections.rst:1044 +#: library/collections.rst:1073 msgid "" "The :mod:`dataclasses` module provides a decorator and functions for " "automatically adding generated special methods to user-defined classes." @@ -1415,11 +1446,11 @@ msgstr "" "ajouter automatiquement des méthodes spéciales générées aux classes définies " "par l’utilisateur." -#: library/collections.rst:1049 +#: library/collections.rst:1078 msgid ":class:`OrderedDict` objects" msgstr "Objets :class:`OrderedDict`" -#: library/collections.rst:1051 +#: library/collections.rst:1080 msgid "" "Ordered dictionaries are just like regular dictionaries but have some extra " "capabilities relating to ordering operations. They have become less " @@ -1431,11 +1462,11 @@ msgstr "" "moins importants puisque la classe native :class:`dict` sait se souvenir de " "l'ordre d'insertion (cette fonctionnalité a été garantie par Python 3.7)." -#: library/collections.rst:1057 +#: library/collections.rst:1086 msgid "Some differences from :class:`dict` still remain:" msgstr "Quelques différences persistent vis-à-vis de :class:`dict` :" -#: library/collections.rst:1059 +#: library/collections.rst:1088 msgid "" "The regular :class:`dict` was designed to be very good at mapping " "operations. Tracking insertion order was secondary." @@ -1444,7 +1475,7 @@ msgstr "" "opérations de correspondance. Garder une trace de l'ordre d'insertion était " "secondaire." -#: library/collections.rst:1062 +#: library/collections.rst:1091 msgid "" "The :class:`OrderedDict` was designed to be good at reordering operations. " "Space efficiency, iteration speed, and the performance of update operations " @@ -1454,12 +1485,12 @@ msgstr "" "opérations de ré-arrangement. L'occupation mémoire, la vitesse de parcours " "et les performances de mise à jour étaient secondaires." -#: library/collections.rst:1066 +#: library/collections.rst:1095 +#, fuzzy msgid "" -"Algorithmically, :class:`OrderedDict` can handle frequent reordering " -"operations better than :class:`dict`. This makes it suitable for tracking " -"recent accesses (for example in an `LRU cache `_)." +"The :class:`OrderedDict` algorithm can handle frequent reordering operations " +"better than :class:`dict`. As shown in the recipes below, this makes it " +"suitable for implementing various kinds of LRU caches." msgstr "" "Algorithmiquement, :class:`OrderedDict` gère mieux les ré-arrangements " "fréquents que :class:`dict`. Ceci la rend adaptée pour suivre les accès les " @@ -1467,13 +1498,19 @@ msgstr "" "com/@krishankantsinghal/my-first-blog-on-medium-583159139237>`_ pour *Least " "Recently Used* en anglais)." -#: library/collections.rst:1071 +#: library/collections.rst:1099 msgid "" "The equality operation for :class:`OrderedDict` checks for matching order." msgstr "" "Le test d'égalité de :class:`OrderedDict` vérifie si l'ordre correspond." -#: library/collections.rst:1073 +#: library/collections.rst:1101 +msgid "" +"A regular :class:`dict` can emulate the order sensitive equality test with " +"``p == q and all(k1 == k2 for k1, k2 in zip(p, q))``." +msgstr "" + +#: library/collections.rst:1104 msgid "" "The :meth:`popitem` method of :class:`OrderedDict` has a different " "signature. It accepts an optional argument to specify which item is popped." @@ -1482,7 +1519,20 @@ msgstr "" "différente. Elle accepte un argument optionnel pour spécifier quel élément " "doit être enlevé." -#: library/collections.rst:1076 +#: library/collections.rst:1107 +msgid "" +"A regular :class:`dict` can emulate OrderedDict's ``od.popitem(last=True)`` " +"with ``d.popitem()`` which is guaranteed to pop the rightmost (last) item." +msgstr "" + +#: library/collections.rst:1110 +msgid "" +"A regular :class:`dict` can emulate OrderedDict's ``od.popitem(last=False)`` " +"with ``(k := next(iter(d)), d.pop(k))`` which will return and remove the " +"leftmost (first) item if it exists." +msgstr "" + +#: library/collections.rst:1114 msgid "" ":class:`OrderedDict` has a :meth:`move_to_end` method to efficiently " "reposition an element to an endpoint." @@ -1490,12 +1540,26 @@ msgstr "" ":class:`OrderedDict` possède une méthode :meth:`move_to_end` pour déplacer " "efficacement un élément à la fin." -#: library/collections.rst:1079 +#: library/collections.rst:1117 +msgid "" +"A regular :class:`dict` can emulate OrderedDict's ``od.move_to_end(k, " +"last=True)`` with ``d[k] = d.pop(k)`` which will move the key and its " +"associated value to the rightmost (last) position." +msgstr "" + +#: library/collections.rst:1121 +msgid "" +"A regular :class:`dict` does not have an efficient equivalent for " +"OrderedDict's ``od.move_to_end(k, last=False)`` which moves the key and its " +"associated value to the leftmost (first) position." +msgstr "" + +#: library/collections.rst:1125 msgid "Until Python 3.8, :class:`dict` lacked a :meth:`__reversed__` method." msgstr "" "Avant Python 3.8, :class:`dict` n'a pas de méthode :meth:`__reversed__`." -#: library/collections.rst:1084 +#: library/collections.rst:1130 msgid "" "Return an instance of a :class:`dict` subclass that has methods specialized " "for rearranging dictionary order." @@ -1503,7 +1567,7 @@ msgstr "" "Renvoie une instance d'une sous-classe de :class:`dict` qui possède des " "méthodes spécialisées pour redéfinir l'ordre du dictionnaire." -#: library/collections.rst:1091 +#: library/collections.rst:1137 msgid "" "The :meth:`popitem` method for ordered dictionaries returns and removes a " "(key, value) pair. The pairs are returned in :abbr:`LIFO (last-in, first-" @@ -1517,18 +1581,19 @@ msgstr "" "paires sont renvoyées comme pour une file, c'est-à-dire premier entré, " "premier sorti (en anglais :abbr:`FIFO (first-in, first-out)`)." -#: library/collections.rst:1098 +#: library/collections.rst:1144 +#, fuzzy msgid "" "Move an existing *key* to either end of an ordered dictionary. The item is " "moved to the right end if *last* is true (the default) or to the beginning " -"if *last* is false. Raises :exc:`KeyError` if the *key* does not exist::" +"if *last* is false. Raises :exc:`KeyError` if the *key* does not exist:" msgstr "" "Déplace une clé *key* existante à l'une des deux extrémités du " "dictionnaire : à droite si *last* vaut ``True`` (comportement par défaut) ou " "à gauche sinon. Lève une exception :exc:`KeyError` si la clé *key* n'est pas " "trouvée ::" -#: library/collections.rst:1113 +#: library/collections.rst:1161 msgid "" "In addition to the usual mapping methods, ordered dictionaries also support " "reverse iteration using :func:`reversed`." @@ -1536,7 +1601,7 @@ msgstr "" "En plus des méthodes usuelles des dictionnaires, les dictionnaires ordonnés " "gèrent l'itération en sens inverse grâce à :func:`reversed`." -#: library/collections.rst:1116 +#: library/collections.rst:1164 msgid "" "Equality tests between :class:`OrderedDict` objects are order-sensitive and " "are implemented as ``list(od1.items())==list(od2.items())``. Equality tests " @@ -1552,7 +1617,7 @@ msgstr "" "(comme les dictionnaires natifs). Cela permet substituer des objets :class:" "`OrderedDict` partout où les dictionnaires natifs sont utilisés." -#: library/collections.rst:1123 +#: library/collections.rst:1171 msgid "" "The items, keys, and values :term:`views ` of :class:" "`OrderedDict` now support reverse iteration using :func:`reversed`." @@ -1561,7 +1626,7 @@ msgstr "" "class:`OrderedDict` gèrent maintenant l'itération en sens inverse en " "utilisant :func:`reversed`." -#: library/collections.rst:1127 +#: library/collections.rst:1175 msgid "" "With the acceptance of :pep:`468`, order is retained for keyword arguments " "passed to the :class:`OrderedDict` constructor and its :meth:`update` method." @@ -1570,11 +1635,11 @@ msgstr "" "au constructeur et à la méthode :meth:`update` de :class:`OrderedDict` est " "conservé." -#: library/collections.rst:1137 +#: library/collections.rst:1185 msgid ":class:`OrderedDict` Examples and Recipes" msgstr "Exemples et cas pratiques utilisant :class:`OrderDict`" -#: library/collections.rst:1139 +#: library/collections.rst:1187 msgid "" "It is straightforward to create an ordered dictionary variant that remembers " "the order the keys were *last* inserted. If a new entry overwrites an " @@ -1586,19 +1651,19 @@ msgstr "" "entrée écrase une existante, la position d'insertion d'origine est modifiée " "et déplacée à la fin ::" -#: library/collections.rst:1151 +#: library/collections.rst:1199 msgid "" "An :class:`OrderedDict` would also be useful for implementing variants of :" -"func:`functools.lru_cache`::" +"func:`functools.lru_cache`:" msgstr "" "Un :class:`OrderedDict` peut aussi être utile pour implémenter des variantes " -"de :func:`functools.lru_cache` ::" +"de :func:`functools.lru_cache` :" -#: library/collections.rst:1176 +#: library/collections.rst:1297 msgid ":class:`UserDict` objects" msgstr "Objets :class:`UserDict`" -#: library/collections.rst:1178 +#: library/collections.rst:1299 msgid "" "The class, :class:`UserDict` acts as a wrapper around dictionary objects. " "The need for this class has been partially supplanted by the ability to " @@ -1611,13 +1676,13 @@ msgstr "" "travailler avec celle-ci, car le dictionnaire sous-jacent est accessible " "comme attribut." -#: library/collections.rst:1186 +#: library/collections.rst:1307 msgid "" "Class that simulates a dictionary. The instance's contents are kept in a " "regular dictionary, which is accessible via the :attr:`data` attribute of :" "class:`UserDict` instances. If *initialdata* is provided, :attr:`data` is " "initialized with its contents; note that a reference to *initialdata* will " -"not be kept, allowing it be used for other purposes." +"not be kept, allowing it to be used for other purposes." msgstr "" "Classe simulant un dictionnaire. Les instances de :class:`UserDict` " "possèdent un attribut :attr:`data` où est stocké leur contenu sous forme de " @@ -1625,7 +1690,7 @@ msgstr "" "initialisé avec son contenu. Remarquez qu'une référence vers *initialdata* " "n'est pas conservée, ce qui permet de l'utiliser pour d'autres tâches." -#: library/collections.rst:1192 +#: library/collections.rst:1313 msgid "" "In addition to supporting the methods and operations of mappings, :class:" "`UserDict` instances provide the following attribute:" @@ -1633,18 +1698,18 @@ msgstr "" "En plus de gérer les méthodes et opérations des dictionnaires, les instances " "de :class:`UserDict` fournissent l'attribut suivant :" -#: library/collections.rst:1197 +#: library/collections.rst:1318 msgid "" "A real dictionary used to store the contents of the :class:`UserDict` class." msgstr "" "Un dictionnaire natif où est stocké le contenu de la classe :class:" "`UserDict`." -#: library/collections.rst:1203 +#: library/collections.rst:1324 msgid ":class:`UserList` objects" msgstr "Objets :class:`UserList`" -#: library/collections.rst:1205 +#: library/collections.rst:1326 msgid "" "This class acts as a wrapper around list objects. It is a useful base class " "for your own list-like classes which can inherit from them and override " @@ -1656,7 +1721,7 @@ msgstr "" "et surcharger les méthodes existantes ou en ajouter de nouvelles. Ainsi, on " "peut ajouter de nouveaux comportements aux listes." -#: library/collections.rst:1210 +#: library/collections.rst:1331 msgid "" "The need for this class has been partially supplanted by the ability to " "subclass directly from :class:`list`; however, this class can be easier to " @@ -1667,7 +1732,7 @@ msgstr "" "de travailler avec cette classe, car la liste sous-jacente est accessible " "via un attribut." -#: library/collections.rst:1216 +#: library/collections.rst:1337 msgid "" "Class that simulates a list. The instance's contents are kept in a regular " "list, which is accessible via the :attr:`data` attribute of :class:" @@ -1681,7 +1746,7 @@ msgstr "" "*list* peut être un itérable, par exemple une liste native ou un objet :" "class:`UserList`." -#: library/collections.rst:1222 +#: library/collections.rst:1343 msgid "" "In addition to supporting the methods and operations of mutable sequences, :" "class:`UserList` instances provide the following attribute:" @@ -1689,7 +1754,7 @@ msgstr "" "En plus de gérer les méthodes et opérations des séquences muables, les " "instances de :class:`UserList` possèdent l'attribut suivant :" -#: library/collections.rst:1227 +#: library/collections.rst:1348 msgid "" "A real :class:`list` object used to store the contents of the :class:" "`UserList` class." @@ -1697,7 +1762,7 @@ msgstr "" "Un objet :class:`list` natif utilisé pour stocker le contenu de la classe :" "class:`UserList`." -#: library/collections.rst:1230 +#: library/collections.rst:1351 msgid "" "**Subclassing requirements:** Subclasses of :class:`UserList` are expected " "to offer a constructor which can be called with either no arguments or one " @@ -1713,7 +1778,7 @@ msgstr "" "constructeur doit pouvoir être appelé avec un unique paramètre, un objet " "séquence utilisé comme source de données." -#: library/collections.rst:1237 +#: library/collections.rst:1358 msgid "" "If a derived class does not wish to comply with this requirement, all of the " "special methods supported by this class will need to be overridden; please " @@ -1725,11 +1790,11 @@ msgstr "" "de consulter les sources pour obtenir des informations sur les méthodes qui " "doivent être fournies dans ce cas." -#: library/collections.rst:1243 +#: library/collections.rst:1364 msgid ":class:`UserString` objects" msgstr "Objets :class:`UserString`" -#: library/collections.rst:1245 +#: library/collections.rst:1366 msgid "" "The class, :class:`UserString` acts as a wrapper around string objects. The " "need for this class has been partially supplanted by the ability to subclass " @@ -1742,7 +1807,7 @@ msgstr "" "plus facile de travailler avec cette classe, car la chaîne de caractère sous-" "jacente est accessible via un attribut." -#: library/collections.rst:1253 +#: library/collections.rst:1374 msgid "" "Class that simulates a string object. The instance's content is kept in a " "regular string object, which is accessible via the :attr:`data` attribute " @@ -1756,7 +1821,7 @@ msgstr "" "initialement une copie de *seq*, qui peut être n'importe quel objet " "convertible en chaîne de caractère avec la fonction native :func:`str`." -#: library/collections.rst:1260 +#: library/collections.rst:1381 msgid "" "In addition to supporting the methods and operations of strings, :class:" "`UserString` instances provide the following attribute:" @@ -1764,7 +1829,7 @@ msgstr "" "En plus de gérer les méthodes et opérations sur les chaînes de caractères, " "les instances de :class:`UserString` possèdent l'attribut suivant :" -#: library/collections.rst:1265 +#: library/collections.rst:1386 msgid "" "A real :class:`str` object used to store the contents of the :class:" "`UserString` class." @@ -1772,10 +1837,19 @@ msgstr "" "Un objet :class:`str` natif utilisé pour stocker le contenu de la classe :" "class:`UserString`." -#: library/collections.rst:1268 +#: library/collections.rst:1389 msgid "" "New methods ``__getnewargs__``, ``__rmod__``, ``casefold``, ``format_map``, " "``isprintable``, and ``maketrans``." msgstr "" "Nouvelles méthodes ``__getnewargs__``, ``__rmod__``, ``casefold``, " "``format_map``, ``isprintable`` et ``maketrans``." + +#~ msgid "" +#~ "Moved :ref:`collections-abstract-base-classes` to the :mod:`collections." +#~ "abc` module. For backwards compatibility, they continue to be visible in " +#~ "this module through Python 3.9." +#~ msgstr "" +#~ "Les :ref:`collections-abstract-base-classes` ont été déplacées vers le " +#~ "module :mod:`collections.abc`. Pour assurer la rétrocompatibilité, elles " +#~ "sont toujours disponibles dans ce module dans Python 3.9." diff --git a/library/compileall.po b/library/compileall.po index 16cde84039..43e6639f28 100644 --- a/library/compileall.po +++ b/library/compileall.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" -"PO-Revision-Date: 2021-05-04 21:26+0200\n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2022-10-18 16:06+0200\n" "Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.1\n" +"X-Generator: Poedit 3.0\n" #: library/compileall.rst:2 msgid ":mod:`compileall` --- Byte-compile Python libraries" @@ -61,8 +61,8 @@ msgstr "" "Les arguments positionnels sont les fichiers à compiler. Ils peuvent aussi " "être des dossiers, qui sont alors parcourus récursivement pour compiler tous " "les fichiers de code :file:`.py` qu'ils contiennent. Lorsque le script ne " -"reçoit aucun argument, il fait comme s'il avait été appelé avec `-l `." +"reçoit aucun argument, il fait comme s'il avait été appelé avec ``-l ``." #: library/compileall.rst:35 msgid "" @@ -303,7 +303,6 @@ msgstr "" "sont à jour." #: library/compileall.rst:169 -#, fuzzy msgid "" "If *rx* is given, its ``search`` method is called on the complete path to " "each file considered for compilation, and if it returns a true value, the " @@ -312,8 +311,8 @@ msgid "" msgstr "" "Si *rx* est donné, sa méthode ``search`` est appelée sur le chemin complet " "de chaque fichier source, et si elle renvoie une valeur vraie, le fichier " -"est sauté. *rx* sera habituellement une expression régulière (objet ``re." -"Pattern``)." +"est sauté. *rx* sera habituellement une expression régulière (objet :ref:`re." +"Pattern `)." #: library/compileall.rst:251 msgid "" @@ -471,7 +470,6 @@ msgstr "" "le fichier source n'existe pas au moment de l'exécution." #: library/compileall.rst:246 -#, fuzzy msgid "" "If *rx* is given, its ``search`` method is passed the full path name to the " "file being compiled, and if it returns a true value, the file is not " @@ -481,8 +479,8 @@ msgid "" msgstr "" "Si *rx* est donné, sa méthode ``search`` est appelée sur le chemin complet " "de chaque fichier source, et si elle renvoie une valeur vraie, le fichier " -"est sauté. *rx* sera habituellement une expression régulière (objet ``re." -"Pattern``)." +"est sauté. *rx* sera habituellement une expression régulière (objet :ref:`re." +"Pattern `)." #: library/compileall.rst:291 msgid "" diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po index 0103e62859..6ada0020bf 100644 --- a/library/concurrent.futures.po +++ b/library/concurrent.futures.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -51,7 +51,7 @@ msgstr "" #: library/concurrent.futures.rst:33 msgid "" -"Schedules the callable, *fn*, to be executed as ``fn(*args **kwargs)`` and " +"Schedules the callable, *fn*, to be executed as ``fn(*args, **kwargs)`` and " "returns a :class:`Future` object representing the execution of the " "callable. ::" msgstr "" @@ -72,11 +72,11 @@ msgstr "" #: library/concurrent.futures.rst:50 msgid "" -"The returned iterator raises a :exc:`concurrent.futures.TimeoutError` if :" -"meth:`~iterator.__next__` is called and the result isn't available after " -"*timeout* seconds from the original call to :meth:`Executor.map`. *timeout* " -"can be an int or a float. If *timeout* is not specified or ``None``, there " -"is no limit to the wait time." +"The returned iterator raises a :exc:`TimeoutError` if :meth:`~iterator." +"__next__` is called and the result isn't available after *timeout* seconds " +"from the original call to :meth:`Executor.map`. *timeout* can be an int or a " +"float. If *timeout* is not specified or ``None``, there is no limit to the " +"wait time." msgstr "" #: library/concurrent.futures.rst:56 @@ -194,7 +194,7 @@ msgid "" "easier debugging." msgstr "" -#: library/concurrent.futures.rst:171 library/concurrent.futures.rst:265 +#: library/concurrent.futures.rst:171 library/concurrent.futures.rst:273 msgid "Added the *initializer* and *initargs* arguments." msgstr "" @@ -268,40 +268,57 @@ msgstr "" #: library/concurrent.futures.rst:255 msgid "" +"*max_tasks_per_child* is an optional argument that specifies the maximum " +"number of tasks a single process can execute before it will exit and be " +"replaced with a fresh worker process. By default *max_tasks_per_child* is " +"``None`` which means worker processes will live as long as the pool. When a " +"max is specified, the \"spawn\" multiprocessing start method will be used by " +"default in absense of a *mp_context* parameter. This feature is incompatible " +"with the \"fork\" start method." +msgstr "" + +#: library/concurrent.futures.rst:263 +msgid "" "When one of the worker processes terminates abruptly, a :exc:" "`BrokenProcessPool` error is now raised. Previously, behaviour was " "undefined but operations on the executor or its futures would often freeze " "or deadlock." msgstr "" -#: library/concurrent.futures.rst:261 +#: library/concurrent.futures.rst:269 msgid "" "The *mp_context* argument was added to allow users to control the " "start_method for worker processes created by the pool." msgstr "" -#: library/concurrent.futures.rst:271 +#: library/concurrent.futures.rst:275 +msgid "" +"The *max_tasks_per_child* argument was added to allow users to control the " +"lifetime of workers in the pool." +msgstr "" + +#: library/concurrent.futures.rst:283 msgid "ProcessPoolExecutor Example" msgstr "" -#: library/concurrent.futures.rst:309 +#: library/concurrent.futures.rst:321 msgid "Future Objects" msgstr "" -#: library/concurrent.futures.rst:311 +#: library/concurrent.futures.rst:323 msgid "" "The :class:`Future` class encapsulates the asynchronous execution of a " "callable. :class:`Future` instances are created by :meth:`Executor.submit`." msgstr "" -#: library/concurrent.futures.rst:316 +#: library/concurrent.futures.rst:328 msgid "" "Encapsulates the asynchronous execution of a callable. :class:`Future` " "instances are created by :meth:`Executor.submit` and should not be created " "directly except for testing." msgstr "" -#: library/concurrent.futures.rst:322 +#: library/concurrent.futures.rst:334 msgid "" "Attempt to cancel the call. If the call is currently being executed or " "finished running and cannot be cancelled then the method will return " @@ -309,61 +326,62 @@ msgid "" "``True``." msgstr "" -#: library/concurrent.futures.rst:329 +#: library/concurrent.futures.rst:341 msgid "Return ``True`` if the call was successfully cancelled." msgstr "" -#: library/concurrent.futures.rst:333 +#: library/concurrent.futures.rst:345 msgid "" "Return ``True`` if the call is currently being executed and cannot be " "cancelled." msgstr "" -#: library/concurrent.futures.rst:338 +#: library/concurrent.futures.rst:350 msgid "" "Return ``True`` if the call was successfully cancelled or finished running." msgstr "" -#: library/concurrent.futures.rst:343 +#: library/concurrent.futures.rst:355 msgid "" "Return the value returned by the call. If the call hasn't yet completed then " "this method will wait up to *timeout* seconds. If the call hasn't completed " -"in *timeout* seconds, then a :exc:`concurrent.futures.TimeoutError` will be " -"raised. *timeout* can be an int or float. If *timeout* is not specified or " -"``None``, there is no limit to the wait time." +"in *timeout* seconds, then a :exc:`TimeoutError` will be raised. *timeout* " +"can be an int or float. If *timeout* is not specified or ``None``, there is " +"no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:350 library/concurrent.futures.rst:364 +#: library/concurrent.futures.rst:362 library/concurrent.futures.rst:376 msgid "" "If the future is cancelled before completing then :exc:`.CancelledError` " "will be raised." msgstr "" -#: library/concurrent.futures.rst:353 -msgid "If the call raised, this method will raise the same exception." +#: library/concurrent.futures.rst:365 +msgid "" +"If the call raised an exception, this method will raise the same exception." msgstr "" -#: library/concurrent.futures.rst:357 +#: library/concurrent.futures.rst:369 msgid "" "Return the exception raised by the call. If the call hasn't yet completed " "then this method will wait up to *timeout* seconds. If the call hasn't " -"completed in *timeout* seconds, then a :exc:`concurrent.futures." -"TimeoutError` will be raised. *timeout* can be an int or float. If " -"*timeout* is not specified or ``None``, there is no limit to the wait time." +"completed in *timeout* seconds, then a :exc:`TimeoutError` will be raised. " +"*timeout* can be an int or float. If *timeout* is not specified or " +"``None``, there is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:367 +#: library/concurrent.futures.rst:379 msgid "If the call completed without raising, ``None`` is returned." msgstr "" -#: library/concurrent.futures.rst:371 +#: library/concurrent.futures.rst:383 msgid "" "Attaches the callable *fn* to the future. *fn* will be called, with the " "future as its only argument, when the future is cancelled or finishes " "running." msgstr "" -#: library/concurrent.futures.rst:375 +#: library/concurrent.futures.rst:387 msgid "" "Added callables are called in the order that they were added and are always " "called in a thread belonging to the process that added them. If the " @@ -372,26 +390,26 @@ msgid "" "behavior is undefined." msgstr "" -#: library/concurrent.futures.rst:381 +#: library/concurrent.futures.rst:393 msgid "" "If the future has already completed or been cancelled, *fn* will be called " "immediately." msgstr "" -#: library/concurrent.futures.rst:384 +#: library/concurrent.futures.rst:396 msgid "" "The following :class:`Future` methods are meant for use in unit tests and :" "class:`Executor` implementations." msgstr "" -#: library/concurrent.futures.rst:389 +#: library/concurrent.futures.rst:401 msgid "" "This method should only be called by :class:`Executor` implementations " "before executing the work associated with the :class:`Future` and by unit " "tests." msgstr "" -#: library/concurrent.futures.rst:393 +#: library/concurrent.futures.rst:405 msgid "" "If the method returns ``False`` then the :class:`Future` was cancelled, i." "e. :meth:`Future.cancel` was called and returned `True`. Any threads " @@ -399,64 +417,65 @@ msgid "" "or :func:`wait`) will be woken up." msgstr "" -#: library/concurrent.futures.rst:398 +#: library/concurrent.futures.rst:410 msgid "" "If the method returns ``True`` then the :class:`Future` was not cancelled " "and has been put in the running state, i.e. calls to :meth:`Future.running` " "will return `True`." msgstr "" -#: library/concurrent.futures.rst:402 +#: library/concurrent.futures.rst:414 msgid "" "This method can only be called once and cannot be called after :meth:`Future." "set_result` or :meth:`Future.set_exception` have been called." msgstr "" -#: library/concurrent.futures.rst:408 +#: library/concurrent.futures.rst:420 msgid "" "Sets the result of the work associated with the :class:`Future` to *result*." msgstr "" -#: library/concurrent.futures.rst:411 library/concurrent.futures.rst:424 +#: library/concurrent.futures.rst:423 library/concurrent.futures.rst:436 msgid "" "This method should only be used by :class:`Executor` implementations and " "unit tests." msgstr "" -#: library/concurrent.futures.rst:414 library/concurrent.futures.rst:427 +#: library/concurrent.futures.rst:426 library/concurrent.futures.rst:439 msgid "" "This method raises :exc:`concurrent.futures.InvalidStateError` if the :class:" "`Future` is already done." msgstr "" -#: library/concurrent.futures.rst:421 +#: library/concurrent.futures.rst:433 msgid "" "Sets the result of the work associated with the :class:`Future` to the :" "class:`Exception` *exception*." msgstr "" -#: library/concurrent.futures.rst:433 +#: library/concurrent.futures.rst:445 msgid "Module Functions" msgstr "" -#: library/concurrent.futures.rst:437 +#: library/concurrent.futures.rst:449 msgid "" "Wait for the :class:`Future` instances (possibly created by different :class:" -"`Executor` instances) given by *fs* to complete. Returns a named 2-tuple of " +"`Executor` instances) given by *fs* to complete. Duplicate futures given to " +"*fs* are removed and will be returned only once. Returns a named 2-tuple of " "sets. The first set, named ``done``, contains the futures that completed " "(finished or cancelled futures) before the wait completed. The second set, " "named ``not_done``, contains the futures that did not complete (pending or " "running futures)." msgstr "" -#: library/concurrent.futures.rst:444 +#: library/concurrent.futures.rst:457 msgid "" "*timeout* can be used to control the maximum number of seconds to wait " "before returning. *timeout* can be an int or float. If *timeout* is not " "specified or ``None``, there is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:448 +#: library/concurrent.futures.rst:461 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" @@ -464,28 +483,28 @@ msgstr "" "*return_when* indique quand la fonction doit se terminer. Il peut prendre " "les valeurs suivantes :" -#: library/concurrent.futures.rst:454 +#: library/concurrent.futures.rst:467 msgid "Constant" msgstr "Constante" -#: library/concurrent.futures.rst:454 +#: library/concurrent.futures.rst:467 msgid "Description" msgstr "Description" -#: library/concurrent.futures.rst:456 +#: library/concurrent.futures.rst:469 msgid ":const:`FIRST_COMPLETED`" msgstr ":const:`FIRST_COMPLETED`" -#: library/concurrent.futures.rst:456 +#: library/concurrent.futures.rst:469 msgid "The function will return when any future finishes or is cancelled." msgstr "" "La fonction se termine lorsque n'importe quel futur se termine ou est annulé." -#: library/concurrent.futures.rst:459 +#: library/concurrent.futures.rst:472 msgid ":const:`FIRST_EXCEPTION`" msgstr ":const:`FIRST_EXCEPTION`" -#: library/concurrent.futures.rst:459 +#: library/concurrent.futures.rst:472 msgid "" "The function will return when any future finishes by raising an exception. " "If no future raises an exception then it is equivalent to :const:" @@ -495,72 +514,77 @@ msgstr "" "exception. Si aucun *futur* ne lève d'exception, équivaut à :const:" "`ALL_COMPLETED`." -#: library/concurrent.futures.rst:465 +#: library/concurrent.futures.rst:478 msgid ":const:`ALL_COMPLETED`" msgstr ":const:`ALL_COMPLETED`" -#: library/concurrent.futures.rst:465 +#: library/concurrent.futures.rst:478 msgid "The function will return when all futures finish or are cancelled." msgstr "" "La fonction se termine lorsque les *futurs* sont tous finis ou annulés." -#: library/concurrent.futures.rst:471 +#: library/concurrent.futures.rst:484 msgid "" "Returns an iterator over the :class:`Future` instances (possibly created by " "different :class:`Executor` instances) given by *fs* that yields futures as " "they complete (finished or cancelled futures). Any futures given by *fs* " "that are duplicated will be returned once. Any futures that completed " "before :func:`as_completed` is called will be yielded first. The returned " -"iterator raises a :exc:`concurrent.futures.TimeoutError` if :meth:`~iterator." -"__next__` is called and the result isn't available after *timeout* seconds " -"from the original call to :func:`as_completed`. *timeout* can be an int or " -"float. If *timeout* is not specified or ``None``, there is no limit to the " -"wait time." +"iterator raises a :exc:`TimeoutError` if :meth:`~iterator.__next__` is " +"called and the result isn't available after *timeout* seconds from the " +"original call to :func:`as_completed`. *timeout* can be an int or float. If " +"*timeout* is not specified or ``None``, there is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:485 +#: library/concurrent.futures.rst:498 msgid ":pep:`3148` -- futures - execute computations asynchronously" msgstr "" -#: library/concurrent.futures.rst:485 +#: library/concurrent.futures.rst:498 msgid "" "The proposal which described this feature for inclusion in the Python " "standard library." msgstr "" -#: library/concurrent.futures.rst:490 +#: library/concurrent.futures.rst:503 msgid "Exception classes" msgstr "" -#: library/concurrent.futures.rst:496 +#: library/concurrent.futures.rst:509 msgid "Raised when a future is cancelled." msgstr "" -#: library/concurrent.futures.rst:500 -msgid "Raised when a future operation exceeds the given timeout." +#: library/concurrent.futures.rst:513 +msgid "" +"A deprecated alias of :exc:`TimeoutError`, raised when a future operation " +"exceeds the given timeout." +msgstr "" + +#: library/concurrent.futures.rst:518 +msgid "This class was made an alias of :exc:`TimeoutError`." msgstr "" -#: library/concurrent.futures.rst:504 +#: library/concurrent.futures.rst:523 msgid "" "Derived from :exc:`RuntimeError`, this exception class is raised when an " "executor is broken for some reason, and cannot be used to submit or execute " "new tasks." msgstr "" -#: library/concurrent.futures.rst:512 +#: library/concurrent.futures.rst:531 msgid "" "Raised when an operation is performed on a future that is not allowed in the " "current state." msgstr "" -#: library/concurrent.futures.rst:521 +#: library/concurrent.futures.rst:540 msgid "" "Derived from :exc:`~concurrent.futures.BrokenExecutor`, this exception class " "is raised when one of the workers of a :class:`ThreadPoolExecutor` has " "failed initializing." msgstr "" -#: library/concurrent.futures.rst:531 +#: library/concurrent.futures.rst:550 msgid "" "Derived from :exc:`~concurrent.futures.BrokenExecutor` (formerly :exc:" "`RuntimeError`), this exception class is raised when one of the workers of " diff --git a/library/configparser.po b/library/configparser.po index ad008a0b6e..073bce87fb 100644 --- a/library/configparser.po +++ b/library/configparser.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-29 16:33+0200\n" -"PO-Revision-Date: 2021-05-17 13:06+0200\n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2022-10-18 12:35+0200\n" "Last-Translator: Dimitri Merejkowsky \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -70,17 +70,17 @@ msgstr "" "Le module *json* implémente un sous-ensemble de la syntaxe JavaScript, qui " "peut aussi être utilisée à cet effet." -#: library/configparser.rst:51 +#: library/configparser.rst:56 msgid "Quick Start" msgstr "Premiers pas" -#: library/configparser.rst:53 +#: library/configparser.rst:58 msgid "Let's take a very basic configuration file that looks like this:" msgstr "" "Prenons pour exemple un fichier de configuration très simple ressemblant à " "ceci :" -#: library/configparser.rst:70 +#: library/configparser.rst:75 msgid "" "The structure of INI files is described `in the following section " "<#supported-ini-file-structure>`_. Essentially, the file consists of " @@ -94,7 +94,7 @@ msgstr "" "Les classes du module :mod:`configparser` peuvent écrire et lire de tels " "fichiers. Commençons par le code qui permet de générer le fichier ci-dessus." -#: library/configparser.rst:94 +#: library/configparser.rst:99 msgid "" "As you can see, we can treat a config parser much like a dictionary. There " "are differences, `outlined later <#mapping-protocol-access>`_, but the " @@ -106,7 +106,7 @@ msgstr "" "protocol-access>`_, mais le comportement de l'instance est très proche de ce " "que vous pourriez attendre d'un dictionnaire." -#: library/configparser.rst:98 +#: library/configparser.rst:103 msgid "" "Now that we have created and saved a configuration file, let's read it back " "and explore the data it holds." @@ -115,7 +115,7 @@ msgstr "" "maintenant comment nous pouvons le lire et accéder aux données qu'il " "contient." -#: library/configparser.rst:133 +#: library/configparser.rst:138 msgid "" "As we can see above, the API is pretty straightforward. The only bit of " "magic involves the ``DEFAULT`` section which provides default values for all " @@ -128,11 +128,25 @@ msgstr "" "l’intérieur des sections ne sont pas sensibles à la casse et qu'elles sont " "stockées en minuscules. [1]_." -#: library/configparser.rst:140 +#: library/configparser.rst:143 +msgid "" +"It is possible to read several configurations into a single :class:" +"`ConfigParser`, where the most recently added configuration has the highest " +"priority. Any conflicting keys are taken from the more recent configuration " +"while the previously existing keys are retained." +msgstr "" + +#: library/configparser.rst:164 +msgid "" +"This behaviour is equivalent to a :meth:`ConfigParser.read` call with " +"several files passed to the *filenames* parameter." +msgstr "" + +#: library/configparser.rst:169 msgid "Supported Datatypes" msgstr "Types de données prises en charge" -#: library/configparser.rst:142 +#: library/configparser.rst:171 msgid "" "Config parsers do not guess datatypes of values in configuration files, " "always storing them internally as strings. This means that if you need " @@ -143,7 +157,7 @@ msgstr "" "stockées en tant que chaînes de caractères. Ainsi, si vous avez besoin d'un " "type différent, vous devez effectuer la conversion vous-même :" -#: library/configparser.rst:153 +#: library/configparser.rst:182 msgid "" "Since this task is so common, config parsers provide a range of handy getter " "methods to handle integers, floats and booleans. The last one is the most " @@ -164,7 +178,7 @@ msgstr "" "chaînes de caractères comme ``'yes'``-``'no'``, ``'on'``-``'off'``, " "``'true'``-``'false'`` et ``'1'``-``'0'`` [1]_. Par exemple :" -#: library/configparser.rst:170 +#: library/configparser.rst:199 msgid "" "Apart from :meth:`~ConfigParser.getboolean`, config parsers also provide " "equivalent :meth:`~ConfigParser.getint` and :meth:`~ConfigParser.getfloat` " @@ -176,11 +190,11 @@ msgstr "" "getint` et :meth:`~ConfigParser.getfloat`. Vous pouvez enregistrer vos " "propres convertisseurs et personnaliser ceux déjà fournis. [1]_" -#: library/configparser.rst:176 +#: library/configparser.rst:205 msgid "Fallback Values" msgstr "Valeurs de substitution" -#: library/configparser.rst:178 +#: library/configparser.rst:207 msgid "" "As with a dictionary, you can use a section's :meth:`get` method to provide " "fallback values:" @@ -188,7 +202,7 @@ msgstr "" "Comme pour un dictionnaire, vous pouvez utiliser la méthode :meth:`get` " "d'une section en spécifiant une valeur de substitution :" -#: library/configparser.rst:191 +#: library/configparser.rst:220 msgid "" "Please note that default values have precedence over fallback values. For " "instance, in our example the ``'CompressionLevel'`` key was specified only " @@ -202,7 +216,7 @@ msgstr "" "la récupérer depuis la section ``'topsecret.server.com'``, nous obtenons la " "valeur par défaut, même en ayant spécifié une valeur de substitution :" -#: library/configparser.rst:202 +#: library/configparser.rst:231 msgid "" "One more thing to be aware of is that the parser-level :meth:`get` method " "provides a custom, more complex interface, maintained for backwards " @@ -214,7 +228,7 @@ msgstr "" "maintenue pour des raisons de rétrocompatibilité. Vous pouvez fournir une " "valeur de substitution via l'argument obligatoirement nommé ``fallback`` :" -#: library/configparser.rst:213 +#: library/configparser.rst:242 msgid "" "The same ``fallback`` argument can be used with the :meth:`~ConfigParser." "getint`, :meth:`~ConfigParser.getfloat` and :meth:`~ConfigParser.getboolean` " @@ -224,20 +238,22 @@ msgstr "" "méthodes :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat` et :" "meth:`~ConfigParser.getboolean`. Par exemple :" -#: library/configparser.rst:229 +#: library/configparser.rst:258 msgid "Supported INI File Structure" msgstr "Structure des fichiers *INI* prise en change" -#: library/configparser.rst:231 +#: library/configparser.rst:260 +#, fuzzy msgid "" "A configuration file consists of sections, each led by a ``[section]`` " "header, followed by key/value entries separated by a specific string (``=`` " "or ``:`` by default [1]_). By default, section names are case sensitive but " "keys are not [1]_. Leading and trailing whitespace is removed from keys and " -"values. Values can be omitted, in which case the key/value delimiter may " -"also be left out. Values can also span multiple lines, as long as they are " -"indented deeper than the first line of the value. Depending on the parser's " -"mode, blank lines may be treated as parts of multiline values or ignored." +"values. Values can be omitted if the parser is configured to allow it [1]_, " +"in which case the key/value delimiter may also be left out. Values can also " +"span multiple lines, as long as they are indented deeper than the first line " +"of the value. Depending on the parser's mode, blank lines may be treated as " +"parts of multiline values or ignored." msgstr "" "Un fichier de configuration est constitué de sections. Chacune des sections " "commence par un en-tête ``[section]``, suivi d'une liste de définitions clés-" @@ -251,7 +267,13 @@ msgstr "" "vides peuvent être considérées comme faisant partie des valeurs multi " "lignes, en fonction de la configuration de l'analyseur." -#: library/configparser.rst:240 +#: library/configparser.rst:270 +msgid "" +"By default, a valid section name can be any string that does not contain '\\" +"\\n' or ']'. To change this, see :attr:`ConfigParser.SECTCRE`." +msgstr "" + +#: library/configparser.rst:273 msgid "" "Configuration files may include comments, prefixed by specific characters " "(``#`` and ``;`` by default [1]_). Comments may appear on their own on an " @@ -262,15 +284,15 @@ msgstr "" "commentaires peuvent apparaître à l'emplacement d'une ligne vide, et peuvent " "aussi être indentés. [1]_" -#: library/configparser.rst:307 +#: library/configparser.rst:340 msgid "For example:" msgstr "Par exemple :" -#: library/configparser.rst:292 +#: library/configparser.rst:325 msgid "Interpolation of values" msgstr "Interpolation des valeurs" -#: library/configparser.rst:294 +#: library/configparser.rst:327 msgid "" "On top of the core functionality, :class:`ConfigParser` supports " "interpolation. This means values can be preprocessed before returning them " @@ -280,7 +302,7 @@ msgstr "" "fonctionnalités de base. Cela signifie que les valeurs peuvent être traitées " "avant d'être renvoyées par les appels aux méthodes ``get()``." -#: library/configparser.rst:302 +#: library/configparser.rst:335 msgid "" "The default implementation used by :class:`ConfigParser`. It enables values " "to contain format strings which refer to other values in the same section, " @@ -293,7 +315,7 @@ msgstr "" "section spéciale par défaut [1]_. D'autres valeurs par défaut peuvent être " "fournies au moment de l'initialisation de cette classe." -#: library/configparser.rst:319 +#: library/configparser.rst:353 msgid "" "In the example above, :class:`ConfigParser` with *interpolation* set to " "``BasicInterpolation()`` would resolve ``%(home_dir)s`` to the value of " @@ -310,17 +332,17 @@ msgstr "" "utilisées comme référence à l’intérieur des chaînes de formatage peuvent " "être définies dans le fichier de configuration dans n'importe quel ordre." -#: library/configparser.rst:326 +#: library/configparser.rst:360 msgid "" -"With ``interpolation`` set to ``None``, the parser would simply return ``" -"%(my_dir)s/Pictures`` as the value of ``my_pictures`` and ``%(home_dir)s/" +"With ``interpolation`` set to ``None``, the parser would simply return " +"``%(my_dir)s/Pictures`` as the value of ``my_pictures`` and ``%(home_dir)s/" "lumberjack`` as the value of ``my_dir``." msgstr "" -"Si l'attribut ``interpolation`` vaut ``None``, le lecteur renvoie ``" -"%(my_dir)s/Pictures`` comme valeur pour ``my_pictures`` et ``%(home_dir)s/" +"Si l'attribut ``interpolation`` vaut ``None``, le lecteur renvoie " +"``%(my_dir)s/Pictures`` comme valeur pour ``my_pictures`` et ``%(home_dir)s/" "lumberjack`` comme valeur pour ``my_dir``." -#: library/configparser.rst:334 +#: library/configparser.rst:368 msgid "" "An alternative handler for interpolation which implements a more advanced " "syntax, used for instance in ``zc.buildout``. Extended interpolation is " @@ -337,7 +359,7 @@ msgstr "" "l'interpolation utilise la section courante par défaut (et, le cas échéant, " "les valeurs de la section par défaut spéciale)." -#: library/configparser.rst:341 +#: library/configparser.rst:375 msgid "" "For example, the configuration specified above with basic interpolation, " "would look like this with extended interpolation:" @@ -345,29 +367,29 @@ msgstr "" "Voici comment transformer la configuration ci-dessus avec la syntaxe " "d'interpolation étendue :" -#: library/configparser.rst:354 +#: library/configparser.rst:389 msgid "Values from other sections can be fetched as well:" msgstr "" "Vous pouvez également récupérer des valeurs appartenant aux autres sections :" -#: library/configparser.rst:376 +#: library/configparser.rst:411 msgid "Mapping Protocol Access" msgstr "Protocole d'accès associatif" -#: library/configparser.rst:380 +#: library/configparser.rst:415 msgid "" "Mapping protocol access is a generic name for functionality that enables " "using custom objects as if they were dictionaries. In case of :mod:" "`configparser`, the mapping interface implementation is using the " "``parser['section']['option']`` notation." msgstr "" -"Le terme « protocole d'accès associatif » est utilisé pour décrire la " +"Le terme « protocole d'accès associatif » est utilisé pour décrire la " "fonctionnalité qui permet d'utiliser des objets personnalisés comme s'il " "s'agissait de dictionnaires. Dans le cas du module :mod:`configparser`, " "l’implémentation du protocole utilise la notation ``parser['section']" "['option']``." -#: library/configparser.rst:385 +#: library/configparser.rst:420 msgid "" "``parser['section']`` in particular returns a proxy for the section's data " "in the parser. This means that the values are not copied but they are taken " @@ -382,7 +404,7 @@ msgstr "" "mandataire pour une section, elles sont en réalité changées dans l'analyseur " "initial." -#: library/configparser.rst:391 +#: library/configparser.rst:426 msgid "" ":mod:`configparser` objects behave as close to actual dictionaries as " "possible. The mapping interface is complete and adheres to the :class:" @@ -395,7 +417,7 @@ msgstr "" "MutableMapping`. Cependant, il faut prendre en compte un certain nombre de " "différences :" -#: library/configparser.rst:396 +#: library/configparser.rst:431 msgid "" "By default, all keys in sections are accessible in a case-insensitive manner " "[1]_. E.g. ``for option in parser[\"section\"]`` yields only " @@ -409,7 +431,7 @@ msgstr "" "c'est-à-dire des clés transformées en minuscules. De même, pour une section " "contenant la clé ``a``, les deux expressions suivantes renvoient ``True`` ::" -#: library/configparser.rst:404 +#: library/configparser.rst:439 msgid "" "All sections include ``DEFAULTSECT`` values as well which means that ``." "clear()`` on a section may not leave the section visibly empty. This is " @@ -427,25 +449,25 @@ msgstr "" "visible. Essayer de détruire une valeur par défaut lève l'exception :exc:" "`KeyError`." -#: library/configparser.rst:411 +#: library/configparser.rst:446 msgid "``DEFAULTSECT`` cannot be removed from the parser:" msgstr "La section ``DEFAULTSECT`` ne peut pas être supprimée ::" # fausse alerte dans poedit - garder le point-virgule -#: library/configparser.rst:413 +#: library/configparser.rst:448 msgid "trying to delete it raises :exc:`ValueError`," msgstr "l'exception :exc:`ValueError` est levée si on essaye de la supprimer ;" # fausse alerte dans poedit - garder le point-virgule -#: library/configparser.rst:415 +#: library/configparser.rst:450 msgid "``parser.clear()`` leaves it intact," msgstr "appeler ``parser.clear()`` la laisse intacte ;" -#: library/configparser.rst:417 +#: library/configparser.rst:452 msgid "``parser.popitem()`` never returns it." -msgstr "appeler ```parser.popitem()`` ne la renvoie jamais." +msgstr "appeler ``parser.popitem()`` ne la renvoie jamais." -#: library/configparser.rst:419 +#: library/configparser.rst:454 msgid "" "``parser.get(section, option, **kwargs)`` - the second argument is **not** a " "fallback value. Note however that the section-level ``get()`` methods are " @@ -456,7 +478,7 @@ msgstr "" "``get()`` fournies par les sections sont compatibles à la fois avec le " "protocole associatif et avec l'API classique de *configparser*." -#: library/configparser.rst:423 +#: library/configparser.rst:458 msgid "" "``parser.items()`` is compatible with the mapping protocol (returns a list " "of *section_name*, *section_proxy* pairs including the DEFAULTSECT). " @@ -473,7 +495,7 @@ msgstr "" "section spécifiée, en interprétant les interpolations (à moins d'utiliser " "``raw=True``)." -#: library/configparser.rst:430 +#: library/configparser.rst:465 msgid "" "The mapping protocol is implemented on top of the existing legacy API so " "that subclasses overriding the original interface still should have mappings " @@ -483,11 +505,11 @@ msgstr "" "sous-classes qui écrasent des méthodes de l'interface originale se " "comportent correctement du point de vue du protocole d'accès." -#: library/configparser.rst:436 +#: library/configparser.rst:471 msgid "Customizing Parser Behaviour" msgstr "Personnalisation du comportement de l'analyseur" -#: library/configparser.rst:438 +#: library/configparser.rst:473 msgid "" "There are nearly as many INI format variants as there are applications using " "it. :mod:`configparser` goes a long way to provide support for the largest " @@ -502,7 +524,7 @@ msgstr "" "raisons historiques. De ce fait, il est très probable qu'il soit nécessaire " "de personnaliser certaines des fonctionnalités de ce module." -#: library/configparser.rst:444 +#: library/configparser.rst:479 msgid "" "The most common way to change the way a specific config parser works is to " "use the :meth:`__init__` options:" @@ -511,11 +533,11 @@ msgstr "" "comporte un analyseur est d’utiliser les options de la méthode :meth:" "`__init__` :" -#: library/configparser.rst:447 +#: library/configparser.rst:482 msgid "*defaults*, default value: ``None``" msgstr "*defaults*, valeur par défaut : ``None``" -#: library/configparser.rst:449 +#: library/configparser.rst:484 msgid "" "This option accepts a dictionary of key-value pairs which will be initially " "put in the ``DEFAULT`` section. This makes for an elegant way to support " @@ -528,7 +550,7 @@ msgstr "" "besoin de spécifier de valeurs lorsque celles-ci sont identiques aux valeurs " "par défaut documentées." -#: library/configparser.rst:454 +#: library/configparser.rst:489 msgid "" "Hint: if you want to specify default values for a specific section, use :" "meth:`read_dict` before you read the actual file." @@ -537,11 +559,11 @@ msgstr "" "configuration si vous voulez spécifier des valeurs par défaut pour une " "section spécifique." -#: library/configparser.rst:457 +#: library/configparser.rst:492 msgid "*dict_type*, default value: :class:`dict`" msgstr "*dict_type*, valeur par défaut : :class:`dict`" -#: library/configparser.rst:459 +#: library/configparser.rst:494 msgid "" "This option has a major impact on how the mapping protocol will behave and " "how the written configuration files look. With the standard dictionary, " @@ -554,7 +576,7 @@ msgstr "" "sont stockées dans l'ordre où elles ont été ajoutées à l'analyseur. Ceci est " "également vrai pour les options à l'intérieur des sections." -#: library/configparser.rst:464 +#: library/configparser.rst:499 msgid "" "An alternative dictionary type can be used for example to sort sections and " "options on write-back." @@ -562,7 +584,7 @@ msgstr "" "Si vous souhaitez classer les sections et les options lors de l'écriture par " "exemple, vous pouvez utiliser un type de dictionnaire différent." -#: library/configparser.rst:467 +#: library/configparser.rst:502 msgid "" "Please note: there are ways to add a set of key-value pairs in a single " "operation. When you use a regular dictionary in those operations, the order " @@ -572,11 +594,11 @@ msgstr "" "une seule opération. L'ordre des clés est préservé si vous utilisez un " "dictionnaire standard pour cela. Par exemple :" -#: library/configparser.rst:489 +#: library/configparser.rst:524 msgid "*allow_no_value*, default value: ``False``" msgstr "*allow_no_value*, valeur par défaut : ``False``" -#: library/configparser.rst:491 +#: library/configparser.rst:526 msgid "" "Some configuration files are known to include settings without values, but " "which otherwise conform to the syntax supported by :mod:`configparser`. The " @@ -589,11 +611,11 @@ msgstr "" "valeurs sont acceptables, utilisez le paramètre *allow_no_value* lors de la " "construction de l'instance :" -#: library/configparser.rst:526 +#: library/configparser.rst:561 msgid "*delimiters*, default value: ``('=', ':')``" msgstr "*delimiters*, valeur par défaut : ``('=', ':')``" -#: library/configparser.rst:528 +#: library/configparser.rst:563 msgid "" "Delimiters are substrings that delimit keys from values within a section. " "The first occurrence of a delimiting substring on a line is considered a " @@ -604,7 +626,7 @@ msgstr "" "est considérée comme un délimiteur. Cela signifie que les valeurs peuvent " "contenir certains des délimiteurs (mais pas les clés)." -#: library/configparser.rst:532 +#: library/configparser.rst:567 msgid "" "See also the *space_around_delimiters* argument to :meth:`ConfigParser." "write`." @@ -612,19 +634,19 @@ msgstr "" "Voir aussi l'argument *space_around_delimiters* de la méthode :meth:" "`ConfigParser.write`." -#: library/configparser.rst:535 +#: library/configparser.rst:570 msgid "*comment_prefixes*, default value: ``('#', ';')``" msgstr "" "*comment_prefixes* (préfixes de commentaire) — valeur par défaut : ``('#', " "';')``" -#: library/configparser.rst:537 +#: library/configparser.rst:572 msgid "*inline_comment_prefixes*, default value: ``None``" msgstr "" "*inline_comment_prefixes* (préfixes de commentaire en ligne) — valeur par " "défaut : ``('#', ';')``" -#: library/configparser.rst:539 +#: library/configparser.rst:574 msgid "" "Comment prefixes are strings that indicate the start of a valid comment " "within a config file. *comment_prefixes* are used only on otherwise empty " @@ -640,9 +662,9 @@ msgstr "" "quelle valeur valide (comme les noms des sections, les options et les lignes " "vides). Par défaut, les commentaires en ligne sont désactivés et les " "préfixes utilisés pour les commentaires à l'emplacement d'une ligne vide " -"sont `'#'`` et ``';'``." +"sont ``'#'`` et ``';'``." -#: library/configparser.rst:546 +#: library/configparser.rst:581 msgid "" "In previous versions of :mod:`configparser` behaviour matched " "``comment_prefixes=('#',';')`` and ``inline_comment_prefixes=(';',)``." @@ -651,7 +673,7 @@ msgstr "" "en utilisant ``comment_prefixes=('#',';')`` et " "``inline_comment_prefixes=(';',)``." -#: library/configparser.rst:550 +#: library/configparser.rst:585 msgid "" "Please note that config parsers don't support escaping of comment prefixes " "so using *inline_comment_prefixes* may prevent users from specifying option " @@ -668,11 +690,11 @@ msgstr "" "la seule façon de stocker des préfixes de commentaires au début d'une valeur " "multi lignes est d'interpoler ceux-ci, par exemple ::" -#: library/configparser.rst:596 +#: library/configparser.rst:631 msgid "*strict*, default value: ``True``" msgstr "*scrict*, valeur par défaut : ``True``" -#: library/configparser.rst:598 +#: library/configparser.rst:633 msgid "" "When set to ``True``, the parser will not allow for any section or option " "duplicates while reading from a single source (using :meth:`read_file`, :" @@ -685,7 +707,7 @@ msgstr "" "est recommandé d'utiliser un mode de fonctionnement strict pour les " "analyseurs employés par de nouvelles applications." -#: library/configparser.rst:603 +#: library/configparser.rst:638 msgid "" "In previous versions of :mod:`configparser` behaviour matched " "``strict=False``." @@ -693,11 +715,11 @@ msgstr "" "Les versions précédentes du module :mod:`configparser` se comportent comme " "en utilisant ``strict=False``." -#: library/configparser.rst:607 +#: library/configparser.rst:642 msgid "*empty_lines_in_values*, default value: ``True``" msgstr "*empty_lines_in_values*, valeur par défaut : ``True``" -#: library/configparser.rst:609 +#: library/configparser.rst:644 msgid "" "In config parsers, values can span multiple lines as long as they are " "indented more than the key that holds them. By default parsers also let " @@ -714,7 +736,7 @@ msgstr "" "est probable que l'utilisateur perde de vue la structure du fichier lorsque " "celui-ci devient long et complexe. Prenez par exemple :" -#: library/configparser.rst:624 +#: library/configparser.rst:659 msgid "" "This can be especially problematic for the user to see if she's using a " "proportional font to edit the file. That is why when your application does " @@ -729,33 +751,33 @@ msgstr "" "sont toujours interprétées comme séparant des clés. Dans l'exemple ci-" "dessus, cela produit deux clés : ``key`` et ``this``." -#: library/configparser.rst:630 +#: library/configparser.rst:665 msgid "" -"*default_section*, default value: ``configparser.DEFAULTSECT`` (that is: ``" -"\"DEFAULT\"``)" +"*default_section*, default value: ``configparser.DEFAULTSECT`` (that is: " +"``\"DEFAULT\"``)" msgstr "" "*default_section*, valeur par défaut : ``configparser.DEFAULTSECT`` " "(autrement dit : ``\"DEFAULT\"``)" -#: library/configparser.rst:633 +#: library/configparser.rst:668 msgid "" "The convention of allowing a special section of default values for other " "sections or interpolation purposes is a powerful concept of this library, " "letting users create complex declarative configurations. This section is " "normally called ``\"DEFAULT\"`` but this can be customized to point to any " -"other valid section name. Some typical values include: ``\"general\"`` or ``" -"\"common\"``. The name provided is used for recognizing default sections " +"other valid section name. Some typical values include: ``\"general\"`` or " +"``\"common\"``. The name provided is used for recognizing default sections " "when reading from any source and is used when writing configuration back to " "a file. Its current value can be retrieved using the ``parser_instance." "default_section`` attribute and may be modified at runtime (i.e. to convert " "files from one format to another)." msgstr "" -#: library/configparser.rst:644 +#: library/configparser.rst:679 msgid "*interpolation*, default value: ``configparser.BasicInterpolation``" msgstr "" -#: library/configparser.rst:646 +#: library/configparser.rst:681 msgid "" "Interpolation behaviour may be customized by providing a custom handler " "through the *interpolation* argument. ``None`` can be used to turn off " @@ -765,11 +787,11 @@ msgid "" "`RawConfigParser` has a default value of ``None``." msgstr "" -#: library/configparser.rst:653 +#: library/configparser.rst:688 msgid "*converters*, default value: not set" msgstr "" -#: library/configparser.rst:655 +#: library/configparser.rst:690 msgid "" "Config parsers provide option value getters that perform type conversion. " "By default :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat`, " @@ -783,7 +805,7 @@ msgid "" "``parser_instance['section'].getdecimal('key', 0)``." msgstr "" -#: library/configparser.rst:666 +#: library/configparser.rst:701 msgid "" "If the converter needs to access the state of the parser, it can be " "implemented as a method on a config parser subclass. If the name of this " @@ -791,14 +813,14 @@ msgid "" "the dict-compatible form (see the ``getdecimal()`` example above)." msgstr "" -#: library/configparser.rst:671 +#: library/configparser.rst:706 msgid "" "More advanced customization may be achieved by overriding default values of " "these parser attributes. The defaults are defined on the classes, so they " "may be overridden by subclasses or by attribute assignment." msgstr "" -#: library/configparser.rst:677 +#: library/configparser.rst:712 msgid "" "By default when using :meth:`~ConfigParser.getboolean`, config parsers " "consider the following values ``True``: ``'1'``, ``'yes'``, ``'true'``, " @@ -807,19 +829,19 @@ msgid "" "strings and their Boolean outcomes. For example:" msgstr "" "Par défaut, la méthode :meth:`~ConfigParser.getboolean` considère les " -"valeurs suivantes comme vraies : `'1'``, ``'yes'``, ``'true'``, ``'on'``, et " -"les valeurs suivantes comme fausses : ``'0'``, ``'no'``, ``'false'``, " +"valeurs suivantes comme vraies : ``'1'``, ``'yes'``, ``'true'``, ``'on'``, " +"et les valeurs suivantes comme fausses : ``'0'``, ``'no'``, ``'false'``, " "``'off'``. Vous pouvez changer ce comportement en spécifiant votre propre " "dictionnaire associant des chaînes de caractères à des valeurs booléennes. " "Par exemple :" -#: library/configparser.rst:695 +#: library/configparser.rst:730 msgid "" "Other typical Boolean pairs include ``accept``/``reject`` or ``enabled``/" "``disabled``." msgstr "" -#: library/configparser.rst:701 +#: library/configparser.rst:736 msgid "" "This method transforms option names on every read, get, or set operation. " "The default converts the name to lowercase. This also means that when a " @@ -827,14 +849,14 @@ msgid "" "method if that's unsuitable. For example:" msgstr "" -#: library/configparser.rst:731 +#: library/configparser.rst:766 msgid "" "The optionxform function transforms option names to a canonical form. This " "should be an idempotent function: if the name is already in canonical form, " "it should be returned unchanged." msgstr "" -#: library/configparser.rst:738 +#: library/configparser.rst:773 msgid "" "A compiled regular expression used to parse section headers. The default " "matches ``[section]`` to the name ``\"section\"``. Whitespace is considered " @@ -843,18 +865,18 @@ msgid "" "example:" msgstr "" -#: library/configparser.rst:766 +#: library/configparser.rst:801 msgid "" "While ConfigParser objects also use an ``OPTCRE`` attribute for recognizing " "option lines, it's not recommended to override it because that would " "interfere with constructor options *allow_no_value* and *delimiters*." msgstr "" -#: library/configparser.rst:772 +#: library/configparser.rst:807 msgid "Legacy API Examples" msgstr "" -#: library/configparser.rst:774 +#: library/configparser.rst:809 msgid "" "Mainly because of backwards compatibility concerns, :mod:`configparser` " "provides also a legacy API with explicit ``get``/``set`` methods. While " @@ -863,29 +885,29 @@ msgid "" "advanced, low-level and downright counterintuitive." msgstr "" -#: library/configparser.rst:780 +#: library/configparser.rst:815 msgid "An example of writing to a configuration file::" msgstr "" -#: library/configparser.rst:803 +#: library/configparser.rst:838 msgid "An example of reading the configuration file again::" msgstr "" -#: library/configparser.rst:821 +#: library/configparser.rst:856 msgid "To get interpolation, use :class:`ConfigParser`::" msgstr "" -#: library/configparser.rst:854 +#: library/configparser.rst:889 msgid "" "Default values are available in both types of ConfigParsers. They are used " "in interpolation if an option used is not defined elsewhere. ::" msgstr "" -#: library/configparser.rst:872 +#: library/configparser.rst:907 msgid "ConfigParser Objects" msgstr "" -#: library/configparser.rst:876 +#: library/configparser.rst:911 msgid "" "The main configuration parser. When *defaults* is given, it is initialized " "into the dictionary of intrinsic defaults. When *dict_type* is given, it " @@ -893,7 +915,7 @@ msgid "" "the options within a section, and for the default values." msgstr "" -#: library/configparser.rst:881 +#: library/configparser.rst:916 msgid "" "When *delimiters* is given, it is used as the set of substrings that divide " "keys from values. When *comment_prefixes* is given, it will be used as the " @@ -902,7 +924,7 @@ msgid "" "as the set of substrings that prefix comments in non-empty lines." msgstr "" -#: library/configparser.rst:887 +#: library/configparser.rst:922 msgid "" "When *strict* is ``True`` (the default), the parser won't allow for any " "section or option duplicates while reading from a single source (file, " @@ -915,7 +937,7 @@ msgid "" "without the trailing delimiter." msgstr "" -#: library/configparser.rst:897 +#: library/configparser.rst:932 msgid "" "When *default_section* is given, it specifies the name for the special " "section holding default values for other sections and interpolation purposes " @@ -923,7 +945,7 @@ msgid "" "on runtime using the ``default_section`` instance attribute." msgstr "" -#: library/configparser.rst:902 +#: library/configparser.rst:937 msgid "" "Interpolation behaviour may be customized by providing a custom handler " "through the *interpolation* argument. ``None`` can be used to turn off " @@ -932,7 +954,7 @@ msgid "" "`dedicated documentation section <#interpolation-of-values>`_." msgstr "" -#: library/configparser.rst:908 +#: library/configparser.rst:943 msgid "" "All option names used in interpolation will be passed through the :meth:" "`optionxform` method just like any other option name reference. For " @@ -941,7 +963,7 @@ msgid "" "%(BAR)s`` are equivalent." msgstr "" -#: library/configparser.rst:914 +#: library/configparser.rst:949 msgid "" "When *converters* is given, it should be a dictionary where each key " "represents the name of a type converter and each value is a callable " @@ -950,44 +972,44 @@ msgid "" "object and section proxies." msgstr "" -#: library/configparser.rst:920 +#: library/configparser.rst:955 msgid "The default *dict_type* is :class:`collections.OrderedDict`." msgstr "" -#: library/configparser.rst:923 +#: library/configparser.rst:958 msgid "" "*allow_no_value*, *delimiters*, *comment_prefixes*, *strict*, " "*empty_lines_in_values*, *default_section* and *interpolation* were added." msgstr "" -#: library/configparser.rst:928 +#: library/configparser.rst:963 msgid "The *converters* argument was added." msgstr "" -#: library/configparser.rst:931 +#: library/configparser.rst:966 msgid "" "The *defaults* argument is read with :meth:`read_dict()`, providing " "consistent behavior across the parser: non-string keys and values are " "implicitly converted to strings." msgstr "" -#: library/configparser.rst:1221 +#: library/configparser.rst:1256 msgid "" "The default *dict_type* is :class:`dict`, since it now preserves insertion " "order." msgstr "" -#: library/configparser.rst:942 +#: library/configparser.rst:977 msgid "Return a dictionary containing the instance-wide defaults." msgstr "" -#: library/configparser.rst:947 +#: library/configparser.rst:982 msgid "" "Return a list of the sections available; the *default section* is not " "included in the list." msgstr "" -#: library/configparser.rst:953 +#: library/configparser.rst:988 msgid "" "Add a section named *section* to the instance. If a section by the given " "name already exists, :exc:`DuplicateSectionError` is raised. If the " @@ -995,34 +1017,34 @@ msgid "" "the section must be a string; if not, :exc:`TypeError` is raised." msgstr "" -#: library/configparser.rst:958 +#: library/configparser.rst:993 msgid "Non-string section names raise :exc:`TypeError`." msgstr "" -#: library/configparser.rst:964 +#: library/configparser.rst:999 msgid "" "Indicates whether the named *section* is present in the configuration. The " "*default section* is not acknowledged." msgstr "" -#: library/configparser.rst:970 +#: library/configparser.rst:1005 msgid "Return a list of options available in the specified *section*." msgstr "" -#: library/configparser.rst:975 +#: library/configparser.rst:1010 msgid "" "If the given *section* exists, and contains the given *option*, return :" "const:`True`; otherwise return :const:`False`. If the specified *section* " "is :const:`None` or an empty string, DEFAULT is assumed." msgstr "" -#: library/configparser.rst:982 +#: library/configparser.rst:1017 msgid "" "Attempt to read and parse an iterable of filenames, returning a list of " "filenames which were successfully parsed." msgstr "" -#: library/configparser.rst:985 +#: library/configparser.rst:1020 msgid "" "If *filenames* is a string, a :class:`bytes` object or a :term:`path-like " "object`, it is treated as a single filename. If a file named in *filenames* " @@ -1033,7 +1055,7 @@ msgid "" "be read." msgstr "" -#: library/configparser.rst:994 +#: library/configparser.rst:1029 msgid "" "If none of the named files exist, the :class:`ConfigParser` instance will " "contain an empty dataset. An application which requires initial values to " @@ -1041,52 +1063,52 @@ msgid "" "`read_file` before calling :meth:`read` for any optional files::" msgstr "" -#: library/configparser.rst:1007 +#: library/configparser.rst:1042 msgid "" "The *encoding* parameter. Previously, all files were read using the default " "encoding for :func:`open`." msgstr "" -#: library/configparser.rst:1011 +#: library/configparser.rst:1046 #, fuzzy msgid "The *filenames* parameter accepts a :term:`path-like object`." msgstr "" "Le paramètre *filename* accepte un objet chemin-compatible :term:`path-like " "object`." -#: library/configparser.rst:1014 +#: library/configparser.rst:1049 msgid "The *filenames* parameter accepts a :class:`bytes` object." msgstr "" -#: library/configparser.rst:1020 +#: library/configparser.rst:1055 msgid "" "Read and parse configuration data from *f* which must be an iterable " "yielding Unicode strings (for example files opened in text mode)." msgstr "" -#: library/configparser.rst:1023 +#: library/configparser.rst:1058 msgid "" "Optional argument *source* specifies the name of the file being read. If " "not given and *f* has a :attr:`name` attribute, that is used for *source*; " "the default is ``''``." msgstr "" -#: library/configparser.rst:1027 +#: library/configparser.rst:1062 msgid "Replaces :meth:`readfp`." msgstr "" -#: library/configparser.rst:1032 +#: library/configparser.rst:1067 msgid "Parse configuration data from a string." msgstr "" -#: library/configparser.rst:1034 +#: library/configparser.rst:1069 msgid "" "Optional argument *source* specifies a context-specific name of the string " "passed. If not given, ``''`` is used. This should commonly be a " "filesystem path or a URL." msgstr "" -#: library/configparser.rst:1043 +#: library/configparser.rst:1078 msgid "" "Load configuration from any object that provides a dict-like ``items()`` " "method. Keys are section names, values are dictionaries with keys and " @@ -1095,17 +1117,17 @@ msgid "" "automatically converted to strings." msgstr "" -#: library/configparser.rst:1049 +#: library/configparser.rst:1084 msgid "" "Optional argument *source* specifies a context-specific name of the " "dictionary passed. If not given, ```` is used." msgstr "" -#: library/configparser.rst:1052 +#: library/configparser.rst:1087 msgid "This method can be used to copy state between parsers." msgstr "" -#: library/configparser.rst:1059 +#: library/configparser.rst:1094 msgid "" "Get an *option* value for the named *section*. If *vars* is provided, it " "must be a dictionary. The *option* is looked up in *vars* (if provided), " @@ -1114,35 +1136,35 @@ msgid "" "provided as a *fallback* value." msgstr "" -#: library/configparser.rst:1065 +#: library/configparser.rst:1100 msgid "" "All the ``'%'`` interpolations are expanded in the return values, unless the " "*raw* argument is true. Values for interpolation keys are looked up in the " "same manner as the option." msgstr "" -#: library/configparser.rst:1069 +#: library/configparser.rst:1104 msgid "" "Arguments *raw*, *vars* and *fallback* are keyword only to protect users " "from trying to use the third argument as the *fallback* fallback (especially " "when using the mapping protocol)." msgstr "" -#: library/configparser.rst:1077 +#: library/configparser.rst:1112 msgid "" "A convenience method which coerces the *option* in the specified *section* " "to an integer. See :meth:`get` for explanation of *raw*, *vars* and " "*fallback*." msgstr "" -#: library/configparser.rst:1084 +#: library/configparser.rst:1119 msgid "" "A convenience method which coerces the *option* in the specified *section* " "to a floating point number. See :meth:`get` for explanation of *raw*, " "*vars* and *fallback*." msgstr "" -#: library/configparser.rst:1091 +#: library/configparser.rst:1126 msgid "" "A convenience method which coerces the *option* in the specified *section* " "to a Boolean value. Note that the accepted values for the option are " @@ -1154,34 +1176,34 @@ msgid "" "*fallback*." msgstr "" -#: library/configparser.rst:1104 +#: library/configparser.rst:1139 msgid "" "When *section* is not given, return a list of *section_name*, " "*section_proxy* pairs, including DEFAULTSECT." msgstr "" -#: library/configparser.rst:1107 +#: library/configparser.rst:1142 msgid "" "Otherwise, return a list of *name*, *value* pairs for the options in the " "given *section*. Optional arguments have the same meaning as for the :meth:" "`get` method." msgstr "" -#: library/configparser.rst:1111 +#: library/configparser.rst:1146 msgid "" "Items present in *vars* no longer appear in the result. The previous " "behaviour mixed actual parser options with variables provided for " "interpolation." msgstr "" -#: library/configparser.rst:1119 +#: library/configparser.rst:1154 msgid "" "If the given section exists, set the given option to the specified value; " "otherwise raise :exc:`NoSectionError`. *option* and *value* must be " "strings; if not, :exc:`TypeError` is raised." msgstr "" -#: library/configparser.rst:1126 +#: library/configparser.rst:1161 msgid "" "Write a representation of the configuration to the specified :term:`file " "object`, which must be opened in text mode (accepting strings). This " @@ -1190,27 +1212,27 @@ msgid "" "surrounded by spaces." msgstr "" -#: library/configparser.rst:1134 +#: library/configparser.rst:1169 msgid "" "Comments in the original configuration file are not preserved when writing " "the configuration back. What is considered a comment, depends on the given " "values for *comment_prefix* and *inline_comment_prefix*." msgstr "" -#: library/configparser.rst:1142 +#: library/configparser.rst:1177 msgid "" "Remove the specified *option* from the specified *section*. If the section " "does not exist, raise :exc:`NoSectionError`. If the option existed to be " "removed, return :const:`True`; otherwise return :const:`False`." msgstr "" -#: library/configparser.rst:1150 +#: library/configparser.rst:1185 msgid "" "Remove the specified *section* from the configuration. If the section in " "fact existed, return ``True``. Otherwise return ``False``." msgstr "" -#: library/configparser.rst:1156 +#: library/configparser.rst:1191 msgid "" "Transforms the option name *option* as found in an input file or as passed " "in by client code to the form that should be used in the internal " @@ -1219,7 +1241,7 @@ msgid "" "of this name on instances to affect this behavior." msgstr "" -#: library/configparser.rst:1162 +#: library/configparser.rst:1197 msgid "" "You don't need to subclass the parser to use this method, you can also set " "it on an instance, to a function that takes a string argument and returns a " @@ -1227,46 +1249,46 @@ msgid "" "sensitive::" msgstr "" -#: library/configparser.rst:1170 +#: library/configparser.rst:1205 msgid "" "Note that when reading configuration files, whitespace around the option " "names is stripped before :meth:`optionxform` is called." msgstr "" -#: library/configparser.rst:1176 +#: library/configparser.rst:1211 msgid "Use :meth:`read_file` instead." msgstr "" -#: library/configparser.rst:1179 +#: library/configparser.rst:1214 msgid "" ":meth:`readfp` now iterates on *fp* instead of calling ``fp.readline()``." msgstr "" -#: library/configparser.rst:1182 +#: library/configparser.rst:1217 msgid "" "For existing code calling :meth:`readfp` with arguments which don't support " "iteration, the following generator may be used as a wrapper around the file-" "like object::" msgstr "" -#: library/configparser.rst:1192 +#: library/configparser.rst:1227 msgid "" "Instead of ``parser.readfp(fp)`` use ``parser." "read_file(readline_generator(fp))``." msgstr "" -#: library/configparser.rst:1198 +#: library/configparser.rst:1233 msgid "" "The maximum depth for recursive interpolation for :meth:`get` when the *raw* " "parameter is false. This is relevant only when the default *interpolation* " "is used." msgstr "" -#: library/configparser.rst:1206 +#: library/configparser.rst:1241 msgid "RawConfigParser Objects" msgstr "" -#: library/configparser.rst:1216 +#: library/configparser.rst:1251 msgid "" "Legacy variant of the :class:`ConfigParser`. It has interpolation disabled " "by default and allows for non-string section names, option names, and values " @@ -1274,27 +1296,27 @@ msgid "" "``defaults=`` keyword argument handling." msgstr "" -#: library/configparser.rst:1226 +#: library/configparser.rst:1261 msgid "" "Consider using :class:`ConfigParser` instead which checks types of the " "values to be stored internally. If you don't want interpolation, you can " "use ``ConfigParser(interpolation=None)``." msgstr "" -#: library/configparser.rst:1233 +#: library/configparser.rst:1268 msgid "" "Add a section named *section* to the instance. If a section by the given " "name already exists, :exc:`DuplicateSectionError` is raised. If the " "*default section* name is passed, :exc:`ValueError` is raised." msgstr "" -#: library/configparser.rst:1237 +#: library/configparser.rst:1272 msgid "" "Type of *section* is not checked which lets users create non-string named " "sections. This behaviour is unsupported and may cause internal errors." msgstr "" -#: library/configparser.rst:1243 +#: library/configparser.rst:1278 msgid "" "If the given section exists, set the given option to the specified value; " "otherwise raise :exc:`NoSectionError`. While it is possible to use :class:" @@ -1304,7 +1326,7 @@ msgid "" "string values." msgstr "" -#: library/configparser.rst:1250 +#: library/configparser.rst:1285 msgid "" "This method lets users assign non-string values to keys internally. This " "behaviour is unsupported and will cause errors when attempting to write to a " @@ -1312,32 +1334,32 @@ msgid "" "not allow such assignments to take place." msgstr "" -#: library/configparser.rst:1257 +#: library/configparser.rst:1292 msgid "Exceptions" msgstr "Exceptions" -#: library/configparser.rst:1261 +#: library/configparser.rst:1296 msgid "Base class for all other :mod:`configparser` exceptions." msgstr "" -#: library/configparser.rst:1266 +#: library/configparser.rst:1301 msgid "Exception raised when a specified section is not found." msgstr "" -#: library/configparser.rst:1271 +#: library/configparser.rst:1306 msgid "" "Exception raised if :meth:`add_section` is called with the name of a section " "that is already present or in strict parsers when a section if found more " "than once in a single input file, string or dictionary." msgstr "" -#: library/configparser.rst:1275 +#: library/configparser.rst:1310 msgid "" "Optional ``source`` and ``lineno`` attributes and arguments to :meth:" "`__init__` were added." msgstr "" -#: library/configparser.rst:1282 +#: library/configparser.rst:1317 msgid "" "Exception raised by strict parsers if a single option appears twice during " "reading from a single file, string or dictionary. This catches misspellings " @@ -1345,58 +1367,58 @@ msgid "" "representing the same case-insensitive configuration key." msgstr "" -#: library/configparser.rst:1290 +#: library/configparser.rst:1325 msgid "" "Exception raised when a specified option is not found in the specified " "section." msgstr "" -#: library/configparser.rst:1296 +#: library/configparser.rst:1331 msgid "" "Base class for exceptions raised when problems occur performing string " "interpolation." msgstr "" -#: library/configparser.rst:1302 +#: library/configparser.rst:1337 msgid "" "Exception raised when string interpolation cannot be completed because the " "number of iterations exceeds :const:`MAX_INTERPOLATION_DEPTH`. Subclass of :" "exc:`InterpolationError`." msgstr "" -#: library/configparser.rst:1309 +#: library/configparser.rst:1344 msgid "" "Exception raised when an option referenced from a value does not exist. " "Subclass of :exc:`InterpolationError`." msgstr "" -#: library/configparser.rst:1315 +#: library/configparser.rst:1350 msgid "" "Exception raised when the source text into which substitutions are made does " "not conform to the required syntax. Subclass of :exc:`InterpolationError`." msgstr "" -#: library/configparser.rst:1321 +#: library/configparser.rst:1356 msgid "" "Exception raised when attempting to parse a file which has no section " "headers." msgstr "" -#: library/configparser.rst:1327 +#: library/configparser.rst:1362 msgid "Exception raised when errors occur attempting to parse a file." msgstr "" -#: library/configparser.rst:1329 +#: library/configparser.rst:1364 msgid "" "The ``filename`` attribute and :meth:`__init__` argument were renamed to " "``source`` for consistency." msgstr "" -#: library/configparser.rst:1335 +#: library/configparser.rst:1370 msgid "Footnotes" msgstr "Notes" -#: library/configparser.rst:1336 +#: library/configparser.rst:1371 msgid "" "Config parsers allow for heavy customization. If you are interested in " "changing the behaviour outlined by the footnote reference, consult the " diff --git a/library/constants.po b/library/constants.po index f78760ceae..88d9662653 100644 --- a/library/constants.po +++ b/library/constants.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2019-02-21 17:13+0100\n" -"Last-Translator: Julien Palard \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-11-06 21:25+0100\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.2\n" +"X-Generator: Poedit 3.0\n" #: library/constants.rst:4 msgid "Built-in Constants" @@ -43,34 +43,35 @@ msgstr "" #: library/constants.rst:22 msgid "" -"The sole value of the type ``NoneType``. ``None`` is frequently used to " -"represent the absence of a value, as when default arguments are not passed " -"to a function. Assignments to ``None`` are illegal and raise a :exc:" -"`SyntaxError`." -msgstr "" -"``None`` est l'unique valeur du type ``NoneType``. Elle est utilisée " -"fréquemment pour représenter l'absence de valeur, comme lorsque des " -"arguments par défaut ne sont pas passés à une fonction. Les assignations à " -"``None`` ne sont pas autorisées et lèvent une :exc:`SyntaxError`." - -#: library/constants.rst:29 -#, fuzzy +"An object frequently used to represent the absence of a value, as when " +"default arguments are not passed to a function. Assignments to ``None`` are " +"illegal and raise a :exc:`SyntaxError`. ``None`` is the sole instance of " +"the :data:`NoneType` type." +msgstr "" +"Objet utilisé fréquemment pour représenter l'absence de valeur, comme " +"lorsque des arguments par défaut ne sont pas passés à une fonction. Les " +"assignations à ``None`` ne sont pas autorisées et lèvent une :exc:" +"`SyntaxError`. ``None`` est la seule instance du type :data:`NoneType`." + +#: library/constants.rst:30 msgid "" -"Special value which should be returned by the binary special methods (e.g. :" -"meth:`__eq__`, :meth:`__lt__`, :meth:`__add__`, :meth:`__rsub__`, etc.) to " -"indicate that the operation is not implemented with respect to the other " +"A special value which should be returned by the binary special methods (e." +"g. :meth:`__eq__`, :meth:`__lt__`, :meth:`__add__`, :meth:`__rsub__`, etc.) " +"to indicate that the operation is not implemented with respect to the other " "type; may be returned by the in-place binary special methods (e.g. :meth:" "`__imul__`, :meth:`__iand__`, etc.) for the same purpose. It should not be " -"evaluated in a boolean context." +"evaluated in a boolean context. ``NotImplemented`` is the sole instance of " +"the :data:`types.NotImplementedType` type." msgstr "" "Valeur spéciale qui devrait être renvoyée par les méthodes magiques à deux " -"opérandes (e.g. :meth:`__eq__`, :meth:`__lt__`, :meth:`__add__`, :meth:" +"opérandes (comme :meth:`__eq__`, :meth:`__lt__`, :meth:`__add__`, :meth:" "`__rsub__`, etc.) pour indiquer que l'opération n'est pas implémentée pour " -"l'autre type ; peut être renvoyé par les méthodes magiques augmentées à deux " -"opérandes (e.g. :meth:`__imul__`, :meth:`__iand__`, etc.) avec le même " -"objectif. Sa valeur booléenne est ``True``." +"l'autre type ; peut être renvoyée par les méthodes magiques augmentées à " +"deux opérandes (comme :meth:`__imul__`, :meth:`__iand__`, etc.) avec le même " +"objectif. Elle ne doit pas être évaluée comme booléen. ``NotImplemented`` " +"est la seule instance de :data:`types.NotImplementedType`." -#: library/constants.rst:38 +#: library/constants.rst:40 msgid "" "When a binary (or in-place) method returns ``NotImplemented`` the " "interpreter will try the reflected operation on the other type (or some " @@ -87,11 +88,11 @@ msgstr "" "message d'erreur peu clair ou au renvoi de la valeur ``NotImplemented`` pour " "le code Python." -#: library/constants.rst:45 +#: library/constants.rst:47 msgid "See :ref:`implementing-the-arithmetic-operations` for examples." msgstr "Voir :ref:`implementing-the-arithmetic-operations` pour des exemples." -#: library/constants.rst:49 +#: library/constants.rst:51 msgid "" "``NotImplementedError`` and ``NotImplemented`` are not interchangeable, even " "though they have similar names and purposes. See :exc:`NotImplementedError` " @@ -101,7 +102,7 @@ msgstr "" "même s'ils ont un nom et un objectif similaire. Voir :exc:" "`NotImplementedError` pour savoir quand l'utiliser." -#: library/constants.rst:53 +#: library/constants.rst:55 msgid "" "Evaluating ``NotImplemented`` in a boolean context is deprecated. While it " "currently evaluates as true, it will emit a :exc:`DeprecationWarning`. It " @@ -111,17 +112,19 @@ msgstr "" "l'évalue aujourd'hui à ``True`` mais émet un :exc:`DeprecationWarning`. Il " "lèvera une :exc:`TypeError` dans une version ultérieure de Python." -#: library/constants.rst:62 +#: library/constants.rst:64 msgid "" -"The same as the ellipsis literal \"``...``\". Special value used mostly in " +"The same as the ellipsis literal \"``...``\". Special value used mostly in " "conjunction with extended slicing syntax for user-defined container data " -"types." +"types. ``Ellipsis`` is the sole instance of the :data:`types.EllipsisType` " +"type." msgstr "" "Identique au littéral *points de suspension* (\"``...``\"). Valeur spéciale " "utilisée principalement de manière conjointe avec la syntaxe de découpage " -"(*slicing*) étendu pour les conteneurs personnalisés." +"(*slicing*) étendu pour les conteneurs personnalisés. ``Ellipsis`` est la " +"seule instance de :data:`types.EllipsisType`." -#: library/constants.rst:68 +#: library/constants.rst:71 msgid "" "This constant is true if Python was not started with an :option:`-O` option. " "See also the :keyword:`assert` statement." @@ -129,7 +132,7 @@ msgstr "" "Cette constante est vraie si Python n'a pas été démarré avec une option :" "option:`-O`. Voir aussi l'expression :keyword:`assert`." -#: library/constants.rst:74 +#: library/constants.rst:77 msgid "" "The names :data:`None`, :data:`False`, :data:`True` and :data:`__debug__` " "cannot be reassigned (assignments to them, even as an attribute name, raise :" @@ -140,11 +143,11 @@ msgstr "" "leurs attributs, lèvent une :exc:`SyntaxError`), donc ils peuvent être " "considérés comme des \"vraies\" constantes." -#: library/constants.rst:80 +#: library/constants.rst:83 msgid "Constants added by the :mod:`site` module" msgstr "Constantes ajoutées par le module :mod:`site`" -#: library/constants.rst:82 +#: library/constants.rst:85 msgid "" "The :mod:`site` module (which is imported automatically during startup, " "except if the :option:`-S` command-line option is given) adds several " @@ -157,7 +160,7 @@ msgstr "" "l'interpréteur interactif et ne devraient pas être utilisées par des " "programmes." -#: library/constants.rst:90 +#: library/constants.rst:93 msgid "" "Objects that when printed, print a message like \"Use quit() or Ctrl-D (i.e. " "EOF) to exit\", and when called, raise :exc:`SystemExit` with the specified " @@ -167,7 +170,7 @@ msgstr "" "quit() or Ctrl-D (i.e. EOF) to exit\"*, et lorsqu'ils sont appelés, lèvent " "un :exc:`SystemExit` avec le code de retour spécifié." -#: library/constants.rst:97 +#: library/constants.rst:100 msgid "" "Objects that when printed or called, print the text of copyright or credits, " "respectively." @@ -175,7 +178,7 @@ msgstr "" "Objets qui, lorsqu'ils sont affichés ou appelés, affichent le copyright ou " "les crédits, respectivement." -#: library/constants.rst:102 +#: library/constants.rst:105 msgid "" "Object that when printed, prints the message \"Type license() to see the " "full license text\", and when called, displays the full license text in a " diff --git a/library/contextlib.po b/library/contextlib.po index 530dd16417..d8585f9484 100644 --- a/library/contextlib.po +++ b/library/contextlib.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-29 16:33+0200\n" -"PO-Revision-Date: 2021-05-23 14:41-0400\n" -"Last-Translator: \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2021-11-06 21:37+0100\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.3\n" +"X-Generator: Poedit 3.0\n" #: library/contextlib.rst:2 msgid "" @@ -194,7 +194,33 @@ msgstr "" msgid "A simple example::" msgstr "Un exemple simple ::" -#: library/contextlib.rst:132 +#: library/contextlib.rst:129 +msgid "" +"Context managers defined with :func:`asynccontextmanager` can be used either " +"as decorators or with :keyword:`async with` statements::" +msgstr "" +"Les gestionnaires de contexte définis avec :func:`asynccontextmanager` " +"peuvent s'utiliser comme décorateurs ou dans les instructions :keyword:" +"`async with` :" + +#: library/contextlib.rst:147 +msgid "" +"When used as a decorator, a new generator instance is implicitly created on " +"each function call. This allows the otherwise \"one-shot\" context managers " +"created by :func:`asynccontextmanager` to meet the requirement that context " +"managers support multiple invocations in order to be used as decorators." +msgstr "" + +#: library/contextlib.rst:152 +#, fuzzy +msgid "" +"Async context managers created with :func:`asynccontextmanager` can be used " +"as decorators." +msgstr "" +"Une classe mère qui permet à un gestionnaire de contexte d'être aussi " +"utilisé comme décorateur." + +#: library/contextlib.rst:159 msgid "" "Return a context manager that closes *thing* upon completion of the block. " "This is basically equivalent to::" @@ -202,11 +228,11 @@ msgstr "" "Renvoie un gestionnaire de contexte qui ferme *thing* à la fin du bloc. " "C'est essentiellement équivalent à ::" -#: library/contextlib.rst:144 +#: library/contextlib.rst:171 msgid "And lets you write code like this::" msgstr "Et cela vous permet d'écrire du code tel que ::" -#: library/contextlib.rst:153 +#: library/contextlib.rst:180 msgid "" "without needing to explicitly close ``page``. Even if an error occurs, " "``page.close()`` will be called when the :keyword:`with` block is exited." @@ -214,7 +240,31 @@ msgstr "" "sans besoin de fermer explicitement ``page``. Même si une erreur survient, " "``page.close()`` est appelée à la fermeture du bloc :keyword:`with`." -#: library/contextlib.rst:161 +#: library/contextlib.rst:186 +#, fuzzy +msgid "" +"Return an async context manager that calls the ``aclose()`` method of " +"*thing* upon completion of the block. This is basically equivalent to::" +msgstr "" +"Renvoie un gestionnaire de contexte qui ferme *thing* à la fin du bloc. " +"C'est essentiellement équivalent à ::" + +#: library/contextlib.rst:198 +msgid "" +"Significantly, ``aclosing()`` supports deterministic cleanup of async " +"generators when they happen to exit early by :keyword:`break` or an " +"exception. For example::" +msgstr "" + +#: library/contextlib.rst:209 +msgid "" +"This pattern ensures that the generator's async exit code is executed in the " +"same context as its iterations (so that exceptions and context variables " +"work as expected, and the exit code isn't run after the lifetime of some " +"task it depends on)." +msgstr "" + +#: library/contextlib.rst:221 msgid "" "Return a context manager that returns *enter_result* from ``__enter__``, but " "otherwise does nothing. It is intended to be used as a stand-in for an " @@ -224,21 +274,36 @@ msgstr "" "*enter_result*, mais ne fait rien d'autre. L'idée est de l'utiliser comme " "remplaçant pour un gestionnaire de contexte optionnel, par exemple ::" -#: library/contextlib.rst:175 +#: library/contextlib.rst:235 msgid "An example using *enter_result*::" msgstr "Un exemple utilisant *enter_result* ::" -#: library/contextlib.rst:193 +#: library/contextlib.rst:248 +#, fuzzy +msgid "" +"It can also be used as a stand-in for :ref:`asynchronous context managers " +"`::" +msgstr "" +"Similaire à :func:`~contextlib.contextmanager`, mais crée un :ref:" +"`gestionnaire de contexte asynchrone `." + +#: library/contextlib.rst:264 +msgid ":term:`asynchronous context manager` support was added." +msgstr "" + +#: library/contextlib.rst:271 +#, fuzzy msgid "" "Return a context manager that suppresses any of the specified exceptions if " -"they occur in the body of a with statement and then resumes execution with " -"the first statement following the end of the with statement." +"they occur in the body of a :keyword:`!with` statement and then resumes " +"execution with the first statement following the end of the :keyword:`!with` " +"statement." msgstr "" "Renvoie un gestionnaire de contexte qui supprime toutes les exceptions " "spécifiées si elles surviennent dans le corps du bloc *with*, et reprend " "l'exécution sur la première instruction qui suit la fin du bloc *with*." -#: library/contextlib.rst:197 +#: library/contextlib.rst:276 msgid "" "As with any other mechanism that completely suppresses exceptions, this " "context manager should be used only to cover very specific errors where " @@ -250,19 +315,19 @@ msgstr "" "très spécifiques d'erreurs où il est certain que continuer silencieusement " "l'exécution du programme est la bonne chose à faire." -#: library/contextlib.rst:202 +#: library/contextlib.rst:281 msgid "For example::" msgstr "Par exemple ::" -#: library/contextlib.rst:212 +#: library/contextlib.rst:291 msgid "This code is equivalent to::" msgstr "Ce code est équivalent à ::" -#: library/contextlib.rst:264 library/contextlib.rst:274 +#: library/contextlib.rst:343 library/contextlib.rst:370 msgid "This context manager is :ref:`reentrant `." msgstr "Ce gestionnaire de contexte est :ref:`réentrant `." -#: library/contextlib.rst:231 +#: library/contextlib.rst:310 msgid "" "Context manager for temporarily redirecting :data:`sys.stdout` to another " "file or file-like object." @@ -270,7 +335,7 @@ msgstr "" "Gestionnaire de contexte servant à rediriger temporairement :data:`sys." "stdout` vers un autre fichier ou objet fichier-compatible." -#: library/contextlib.rst:234 +#: library/contextlib.rst:313 msgid "" "This tool adds flexibility to existing functions or classes whose output is " "hardwired to stdout." @@ -278,7 +343,7 @@ msgstr "" "Cet outil ajoute une certaine flexibilité aux fonctions ou classes " "existantes dont la sortie est envoyée vers la sortie standard." -#: library/contextlib.rst:237 +#: library/contextlib.rst:316 #, fuzzy msgid "" "For example, the output of :func:`help` normally is sent to *sys.stdout*. " @@ -291,7 +356,7 @@ msgstr "" "stdout*. Vous pouvez capturer cette sortie dans une chaîne de caractères en " "la redirigeant vers un objet :class:`io.StringIO` ::" -#: library/contextlib.rst:247 +#: library/contextlib.rst:326 msgid "" "To send the output of :func:`help` to a file on disk, redirect the output to " "a regular file::" @@ -299,11 +364,11 @@ msgstr "" "Pour envoyer la sortie de :func:`help` vers un fichier sur le disque, " "redirigez-la sur un fichier normal ::" -#: library/contextlib.rst:254 +#: library/contextlib.rst:333 msgid "To send the output of :func:`help` to *sys.stderr*::" msgstr "Pour envoyer la sortie de :func:`help` sur *sys.stderr* ::" -#: library/contextlib.rst:259 +#: library/contextlib.rst:338 msgid "" "Note that the global side effect on :data:`sys.stdout` means that this " "context manager is not suitable for use in library code and most threaded " @@ -317,7 +382,7 @@ msgstr "" "Cependant, cela reste une approche utile pour beaucoup de scripts " "utilitaires." -#: library/contextlib.rst:271 +#: library/contextlib.rst:350 msgid "" "Similar to :func:`~contextlib.redirect_stdout` but redirecting :data:`sys." "stderr` to another file or file-like object." @@ -325,14 +390,30 @@ msgstr "" "Similaire à :func:`~contextlib.redirect_stdout` mais redirige :data:`sys." "stderr` vers un autre fichier ou objet fichier-compatible." -#: library/contextlib.rst:281 +#: library/contextlib.rst:360 +msgid "" +"Non parallel-safe context manager to change the current working directory. " +"As this changes a global state, the working directory, it is not suitable " +"for use in most threaded or async contexts. It is also not suitable for most " +"non-linear code execution, like generators, where the program execution is " +"temporarily relinquished -- unless explicitely desired, you should not yield " +"when this context manager is active." +msgstr "" + +#: library/contextlib.rst:367 +msgid "" +"This is a simple wrapper around :func:`~os.chdir`, it changes the current " +"working directory upon entering and restores the old one on exit." +msgstr "" + +#: library/contextlib.rst:377 msgid "" "A base class that enables a context manager to also be used as a decorator." msgstr "" "Une classe mère qui permet à un gestionnaire de contexte d'être aussi " "utilisé comme décorateur." -#: library/contextlib.rst:283 +#: library/contextlib.rst:379 msgid "" "Context managers inheriting from ``ContextDecorator`` have to implement " "``__enter__`` and ``__exit__`` as normal. ``__exit__`` retains its optional " @@ -343,7 +424,7 @@ msgstr "" "conserve sa gestion optionnelle des exceptions même lors de l'utilisation en " "décorateur." -#: library/contextlib.rst:287 +#: library/contextlib.rst:383 msgid "" "``ContextDecorator`` is used by :func:`contextmanager`, so you get this " "functionality automatically." @@ -351,22 +432,22 @@ msgstr "" "``ContextDecorator`` est utilisé par :func:`contextmanager`, donc vous " "bénéficiez automatiquement de cette fonctionnalité." -#: library/contextlib.rst:290 +#: library/contextlib.rst:386 msgid "Example of ``ContextDecorator``::" msgstr "Exemple de ``ContextDecorator`` ::" -#: library/contextlib.rst:319 +#: library/contextlib.rst:415 msgid "" "This change is just syntactic sugar for any construct of the following form::" msgstr "" "Ce changement est simplement un sucre syntaxique pour les constructions de " "la forme suivante ::" -#: library/contextlib.rst:325 +#: library/contextlib.rst:421 msgid "``ContextDecorator`` lets you instead write::" msgstr "``ContextDecorator`` vous permet d'écrire à la place ::" -#: library/contextlib.rst:331 +#: library/contextlib.rst:427 msgid "" "It makes it clear that the ``cm`` applies to the whole function, rather than " "just a piece of it (and saving an indentation level is nice, too)." @@ -375,7 +456,7 @@ msgstr "" "seulement à un morceau en particulier (et gagner un niveau d'indentation est " "toujours appréciable)." -#: library/contextlib.rst:334 +#: library/contextlib.rst:430 msgid "" "Existing context managers that already have a base class can be extended by " "using ``ContextDecorator`` as a mixin class::" @@ -383,7 +464,7 @@ msgstr "" "Les gestionnaires de contexte existants qui ont déjà une classe mère peuvent " "être étendus en utilisant ``ContextDecorator`` comme une *mixin* ::" -#: library/contextlib.rst:347 +#: library/contextlib.rst:443 msgid "" "As the decorated function must be able to be called multiple times, the " "underlying context manager must support use in multiple :keyword:`with` " @@ -396,7 +477,20 @@ msgstr "" "construction d'origine avec de multiples instructions :keyword:`!with` au " "sein de la fonction doit être utilisée." -#: library/contextlib.rst:357 +#: library/contextlib.rst:453 +#, fuzzy +msgid "" +"Similar to :class:`ContextDecorator` but only for asynchronous functions." +msgstr "" +"Similaire à :meth:`enter_context` mais attend un gestionnaire de contexte " +"asynchrone." + +#: library/contextlib.rst:455 +#, fuzzy +msgid "Example of ``AsyncContextDecorator``::" +msgstr "Exemple de ``ContextDecorator`` ::" + +#: library/contextlib.rst:492 msgid "" "A context manager that is designed to make it easy to programmatically " "combine other context managers and cleanup functions, especially those that " @@ -407,7 +501,7 @@ msgstr "" "nettoyage, spécifiquement ceux qui sont optionnels ou pilotés par des " "données d'entrée." -#: library/contextlib.rst:361 +#: library/contextlib.rst:496 msgid "" "For example, a set of files may easily be handled in a single with statement " "as follows::" @@ -415,7 +509,13 @@ msgstr "" "Par exemple, un ensemble de fichiers peut facilement être géré dans une " "unique instruction *with* comme suit ::" -#: library/contextlib.rst:370 +#: library/contextlib.rst:505 +msgid "" +"The :meth:`__enter__` method returns the :class:`ExitStack` instance, and " +"performs no additional operations." +msgstr "" + +#: library/contextlib.rst:508 msgid "" "Each instance maintains a stack of registered callbacks that are called in " "reverse order when the instance is closed (either explicitly or implicitly " @@ -428,7 +528,7 @@ msgstr "" "que ces fonctions ne sont *pas* invoquées implicitement quand l'instance de " "la pile de contextes est collectée par le ramasse-miettes." -#: library/contextlib.rst:375 +#: library/contextlib.rst:513 msgid "" "This stack model is used so that context managers that acquire their " "resources in their ``__init__`` method (such as file objects) can be handled " @@ -438,7 +538,7 @@ msgstr "" "acquièrent leurs ressources dans leur méthode ``__init__`` (tels que les " "objets-fichiers) puissent être gérés correctement." -#: library/contextlib.rst:379 +#: library/contextlib.rst:517 msgid "" "Since registered callbacks are invoked in the reverse order of registration, " "this ends up behaving as if multiple nested :keyword:`with` statements had " @@ -454,7 +554,7 @@ msgstr "" "de rappel intérieure supprime ou remplace une exception, alors les fonctions " "extérieures reçoivent des arguments basés sur ce nouvel état." -#: library/contextlib.rst:386 +#: library/contextlib.rst:524 msgid "" "This is a relatively low level API that takes care of the details of " "correctly unwinding the stack of exit callbacks. It provides a suitable " @@ -466,7 +566,7 @@ msgstr "" "pour des gestionnaires de contexte de plus haut niveau qui manipulent la " "pile de sortie de manière spécifique à l'application." -#: library/contextlib.rst:395 +#: library/contextlib.rst:533 msgid "" "Enters a new context manager and adds its :meth:`__exit__` method to the " "callback stack. The return value is the result of the context manager's own :" @@ -476,7 +576,7 @@ msgstr "" "`__exit__` à la pile d'appels. La valeur de retour est le résultat de la " "méthode :meth:`__enter__` du gestionnaire de contexte donné." -#: library/contextlib.rst:399 +#: library/contextlib.rst:537 msgid "" "These context managers may suppress exceptions just as they normally would " "if used directly as part of a :keyword:`with` statement." @@ -485,13 +585,19 @@ msgstr "" "feraient normalement s'ils étaient utilisés directement derrière une " "instruction :keyword:`with`." -#: library/contextlib.rst:404 +#: library/contextlib.rst:540 +msgid "" +"Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm* is not a " +"context manager." +msgstr "" + +#: library/contextlib.rst:546 msgid "Adds a context manager's :meth:`__exit__` method to the callback stack." msgstr "" "Ajoute la méthode :meth:`__exit__` d'un gestionnaire de contexte à la pile " "d'appels." -#: library/contextlib.rst:406 +#: library/contextlib.rst:548 msgid "" "As ``__enter__`` is *not* invoked, this method can be used to cover part of " "an :meth:`__enter__` implementation with a context manager's own :meth:" @@ -501,7 +607,7 @@ msgstr "" "pour couvrir une partie de l'implémentation de :meth:`__enter__` avec la " "propre méthode :meth:`__exit__` d'un gestionnaire de contexte." -#: library/contextlib.rst:410 +#: library/contextlib.rst:552 msgid "" "If passed an object that is not a context manager, this method assumes it is " "a callback with the same signature as a context manager's :meth:`__exit__` " @@ -512,7 +618,7 @@ msgstr "" "meth:`__exit__` des gestionnaires de contexte pour l'ajouter directement à " "la pile d'appels." -#: library/contextlib.rst:414 +#: library/contextlib.rst:556 msgid "" "By returning true values, these callbacks can suppress exceptions the same " "way context manager :meth:`__exit__` methods can." @@ -521,7 +627,7 @@ msgstr "" "exceptions de la même manière que le peuvent les méthodes :meth:`__exit__` " "des gestionnaires de contexte." -#: library/contextlib.rst:417 +#: library/contextlib.rst:559 msgid "" "The passed in object is returned from the function, allowing this method to " "be used as a function decorator." @@ -529,7 +635,7 @@ msgstr "" "L'objet passé en paramètre est renvoyé par la fonction, ce qui permet à la " "méthode d'être utilisée comme décorateur de fonction." -#: library/contextlib.rst:422 +#: library/contextlib.rst:564 msgid "" "Accepts an arbitrary callback function and arguments and adds it to the " "callback stack." @@ -537,7 +643,7 @@ msgstr "" "Accepte une fonction arbitraire et ses arguments et les ajoute à la pile des " "fonctions de rappel." -#: library/contextlib.rst:425 +#: library/contextlib.rst:567 msgid "" "Unlike the other methods, callbacks added this way cannot suppress " "exceptions (as they are never passed the exception details)." @@ -546,7 +652,7 @@ msgstr "" "cette manière ne peuvent pas supprimer les exceptions (puisqu'elles ne " "reçoivent jamais les détails de l'exception)." -#: library/contextlib.rst:428 +#: library/contextlib.rst:570 msgid "" "The passed in callback is returned from the function, allowing this method " "to be used as a function decorator." @@ -554,7 +660,7 @@ msgstr "" "La fonction passée en paramètre est renvoyée par la méthode, ce qui permet à " "la méthode d'être utilisée comme décorateur de fonction." -#: library/contextlib.rst:433 +#: library/contextlib.rst:575 msgid "" "Transfers the callback stack to a fresh :class:`ExitStack` instance and " "returns it. No callbacks are invoked by this operation - instead, they will " @@ -566,7 +672,7 @@ msgstr "" "la place, elles sont dorénavant invoquées quand la nouvelle pile sera close " "(soit explicitement soit implicitement à la fin d'un bloc :keyword:`with`)." -#: library/contextlib.rst:438 +#: library/contextlib.rst:580 msgid "" "For example, a group of files can be opened as an \"all or nothing\" " "operation as follows::" @@ -574,7 +680,7 @@ msgstr "" "Par exemple, un groupe de fichiers peut être ouvert comme une opération " "« tout ou rien » comme suit ::" -#: library/contextlib.rst:452 +#: library/contextlib.rst:594 msgid "" "Immediately unwinds the callback stack, invoking callbacks in the reverse " "order of registration. For any context managers and exit callbacks " @@ -585,7 +691,7 @@ msgstr "" "et fonction de sortie enregistré, les arguments passés indiqueront qu'aucune " "exception n'est survenue." -#: library/contextlib.rst:459 +#: library/contextlib.rst:601 msgid "" "An :ref:`asynchronous context manager `, similar to :" "class:`ExitStack`, that supports combining both synchronous and asynchronous " @@ -596,7 +702,7 @@ msgstr "" "de contexte synchrones et asynchrones, ainsi que la gestion de coroutines " "pour la logique de nettoyage." -#: library/contextlib.rst:464 +#: library/contextlib.rst:606 msgid "" "The :meth:`close` method is not implemented, :meth:`aclose` must be used " "instead." @@ -604,14 +710,20 @@ msgstr "" "La méthode :meth:`close` n'est pas implémentée, :meth:`aclose` doit plutôt " "être utilisée." -#: library/contextlib.rst:469 +#: library/contextlib.rst:611 msgid "" "Similar to :meth:`enter_context` but expects an asynchronous context manager." msgstr "" "Similaire à :meth:`enter_context` mais attend un gestionnaire de contexte " "asynchrone." -#: library/contextlib.rst:474 +#: library/contextlib.rst:614 +msgid "" +"Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm* is not an " +"asynchronous context manager." +msgstr "" + +#: library/contextlib.rst:620 msgid "" "Similar to :meth:`push` but expects either an asynchronous context manager " "or a coroutine function." @@ -619,24 +731,24 @@ msgstr "" "Similaire à :meth:`push` mais attend soit un gestionnaire de contexte " "asynchrone soit une fonction coroutine." -#: library/contextlib.rst:479 +#: library/contextlib.rst:625 msgid "Similar to :meth:`callback` but expects a coroutine function." msgstr "Similaire à :meth:`callback` mais attend une fonction coroutine." -#: library/contextlib.rst:483 +#: library/contextlib.rst:629 msgid "Similar to :meth:`close` but properly handles awaitables." msgstr "" "Similaire à :meth:`close` mais gère correctement les tâches asynchrones." -#: library/contextlib.rst:485 +#: library/contextlib.rst:631 msgid "Continuing the example for :func:`asynccontextmanager`::" msgstr "En continuité de l'exemple de :func:`asynccontextmanager` ::" -#: library/contextlib.rst:497 +#: library/contextlib.rst:643 msgid "Examples and Recipes" msgstr "Exemples et Recettes" -#: library/contextlib.rst:499 +#: library/contextlib.rst:645 msgid "" "This section describes some examples and recipes for making effective use of " "the tools provided by :mod:`contextlib`." @@ -644,11 +756,11 @@ msgstr "" "Cette section décrit quelques exemples et recettes pour décrire une " "utilisation réelle des outils fournis par :mod:`contextlib`." -#: library/contextlib.rst:504 +#: library/contextlib.rst:650 msgid "Supporting a variable number of context managers" msgstr "Gérer un nombre variable de gestionnaires de contexte" -#: library/contextlib.rst:506 +#: library/contextlib.rst:652 msgid "" "The primary use case for :class:`ExitStack` is the one given in the class " "documentation: supporting a variable number of context managers and other " @@ -665,7 +777,7 @@ msgstr "" "collection spécifique de fichiers de l'utilisateur), ou de certains " "gestionnaires de contexte qui peuvent être optionnels ::" -#: library/contextlib.rst:521 +#: library/contextlib.rst:667 msgid "" "As shown, :class:`ExitStack` also makes it quite easy to use :keyword:`with` " "statements to manage arbitrary resources that don't natively support the " @@ -675,11 +787,11 @@ msgstr "" "instructions :keyword:`with` pour gérer des ressources arbitraires qui ne " "gèrent pas nativement le protocole des gestionnaires de contexte." -#: library/contextlib.rst:527 +#: library/contextlib.rst:673 msgid "Catching exceptions from ``__enter__`` methods" msgstr "Attraper des exceptions depuis les méthodes ``__enter__``" -#: library/contextlib.rst:529 +#: library/contextlib.rst:675 msgid "" "It is occasionally desirable to catch exceptions from an ``__enter__`` " "method implementation, *without* inadvertently catching exceptions from the :" @@ -694,7 +806,7 @@ msgstr "" "`ExitStack`, les étapes du protocole des gestionnaires de contexte peuvent " "être légèrement séparées pour permettre le code suivant ::" -#: library/contextlib.rst:544 +#: library/contextlib.rst:690 msgid "" "Actually needing to do this is likely to indicate that the underlying API " "should be providing a direct resource management interface for use with :" @@ -713,11 +825,11 @@ msgstr "" "gestion de plusieurs situations qui ne peuvent pas être traitées directement " "dans une instruction :keyword:`with`." -#: library/contextlib.rst:554 +#: library/contextlib.rst:700 msgid "Cleaning up in an ``__enter__`` implementation" msgstr "Nettoyer dans une méthode ``__enter__``" -#: library/contextlib.rst:556 +#: library/contextlib.rst:702 msgid "" "As noted in the documentation of :meth:`ExitStack.push`, this method can be " "useful in cleaning up an already allocated resource if later steps in the :" @@ -727,7 +839,7 @@ msgstr "" "peut être utile pour nettoyer une ressource déjà allouée si les dernières " "étapes de l'implémentation de :meth:`__enter__` échouent." -#: library/contextlib.rst:560 +#: library/contextlib.rst:706 msgid "" "Here's an example of doing this for a context manager that accepts resource " "acquisition and release functions, along with an optional validation " @@ -737,11 +849,11 @@ msgstr "" "d'acquisition de ressources et de libération, avec une méthode de validation " "optionnelle, et qui les adapte au protocole des gestionnaires de contexte ::" -#: library/contextlib.rst:600 +#: library/contextlib.rst:746 msgid "Replacing any use of ``try-finally`` and flag variables" msgstr "Remplacer un ``try-finally`` avec une option variable" -#: library/contextlib.rst:602 +#: library/contextlib.rst:748 msgid "" "A pattern you will sometimes see is a ``try-finally`` statement with a flag " "variable to indicate whether or not the body of the ``finally`` clause " @@ -753,7 +865,7 @@ msgstr "" "ou non. Dans sa forme la plus simple (qui ne peut pas déjà être gérée avec " "juste une clause ``except``), cela ressemble à ::" -#: library/contextlib.rst:616 +#: library/contextlib.rst:762 msgid "" "As with any ``try`` statement based code, this can cause problems for " "development and review, because the setup code and the cleanup code can end " @@ -764,7 +876,7 @@ msgstr "" "codes d'installation et de nettoyage peuvent finir par être séparés par des " "sections de code arbitrairement longues." -#: library/contextlib.rst:620 +#: library/contextlib.rst:766 msgid "" ":class:`ExitStack` makes it possible to instead register a callback for " "execution at the end of a ``with`` statement, and then later decide to skip " @@ -774,7 +886,7 @@ msgstr "" "rappel pour être exécutée à la fin d'une instruction ``with``, et décider " "ensuite de passer l'exécution de cet appel ::" -#: library/contextlib.rst:632 +#: library/contextlib.rst:778 msgid "" "This allows the intended cleanup up behaviour to be made explicit up front, " "rather than requiring a separate flag variable." @@ -782,7 +894,7 @@ msgstr "" "Cela permet de rendre explicite dès le départ le comportement de nettoyage " "attendu, plutôt que de nécessiter une option séparée." -#: library/contextlib.rst:635 +#: library/contextlib.rst:781 msgid "" "If a particular application uses this pattern a lot, it can be simplified " "even further by means of a small helper class::" @@ -790,7 +902,7 @@ msgstr "" "Si une application particulière utilise beaucoup ce modèle, cela peut-être " "simplifié encore plus au moyen d'une petite classe d'aide ::" -#: library/contextlib.rst:653 +#: library/contextlib.rst:799 msgid "" "If the resource cleanup isn't already neatly bundled into a standalone " "function, then it is still possible to use the decorator form of :meth:" @@ -801,7 +913,7 @@ msgstr "" "`ExitStack.callback` pour déclarer la fonction de nettoyage de ressource en " "avance ::" -#: library/contextlib.rst:668 +#: library/contextlib.rst:814 msgid "" "Due to the way the decorator protocol works, a callback function declared " "this way cannot take any parameters. Instead, any resources to be released " @@ -812,12 +924,12 @@ msgstr "" "doivent être récupérées depuis l'extérieur comme des variables de fermeture " "(*closure*)." -#: library/contextlib.rst:674 +#: library/contextlib.rst:820 msgid "Using a context manager as a function decorator" msgstr "" "Utiliser un gestionnaire de contexte en tant que décorateur de fonction" -#: library/contextlib.rst:676 +#: library/contextlib.rst:822 msgid "" ":class:`ContextDecorator` makes it possible to use a context manager in both " "an ordinary ``with`` statement and also as a function decorator." @@ -826,7 +938,7 @@ msgstr "" "contexte à la fois ordinairement avec une instruction ``with`` ou comme un " "décorateur de fonction." -#: library/contextlib.rst:679 +#: library/contextlib.rst:825 msgid "" "For example, it is sometimes useful to wrap functions or groups of " "statements with a logger that can track the time of entry and time of exit. " @@ -841,17 +953,17 @@ msgstr "" "`ContextDecorator` fournit les deux fonctionnalités en une seule " "définition ::" -#: library/contextlib.rst:700 +#: library/contextlib.rst:846 msgid "Instances of this class can be used as both a context manager::" msgstr "" "Les instances de cette classe peuvent être utilisées comme gestionnaires de " "contexte ::" -#: library/contextlib.rst:706 +#: library/contextlib.rst:852 msgid "And also as a function decorator::" msgstr "Et comme décorateurs de fonctions ::" -#: library/contextlib.rst:713 +#: library/contextlib.rst:859 msgid "" "Note that there is one additional limitation when using context managers as " "function decorators: there's no way to access the return value of :meth:" @@ -863,11 +975,11 @@ msgstr "" "de retour de :meth:`__enter__`. Si cette valeur est nécessaire, il faut " "utiliser explicitement une instruction ``with``." -#: library/contextlib.rst:721 +#: library/contextlib.rst:867 msgid ":pep:`343` - The \"with\" statement" msgstr ":pep:`343` - The \"with\" statement" -#: library/contextlib.rst:721 +#: library/contextlib.rst:867 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." @@ -875,11 +987,11 @@ msgstr "" "La spécification, les motivations et des exemples de l'instruction :keyword:" "`with` en Python." -#: library/contextlib.rst:727 +#: library/contextlib.rst:873 msgid "Single use, reusable and reentrant context managers" msgstr "Gestionnaires de contexte à usage unique, réutilisables et réentrants" -#: library/contextlib.rst:729 +#: library/contextlib.rst:875 msgid "" "Most context managers are written in a way that means they can only be used " "effectively in a :keyword:`with` statement once. These single use context " @@ -892,7 +1004,7 @@ msgstr "" "chaque fois qu'ils sont utilisés — tenter de les utiliser une seconde fois " "lève une exception ou ne fonctionne pas correctement." -#: library/contextlib.rst:735 +#: library/contextlib.rst:881 msgid "" "This common limitation means that it is generally advisable to create " "context managers directly in the header of the :keyword:`with` statement " @@ -903,7 +1015,7 @@ msgstr "" "`with` où ils sont utilisés (comme montré dans tous les exemples " "d'utilisation au-dessus)." -#: library/contextlib.rst:739 +#: library/contextlib.rst:885 msgid "" "Files are an example of effectively single use context managers, since the " "first :keyword:`with` statement will close the file, preventing any further " @@ -914,7 +1026,7 @@ msgstr "" "`with` ferme le fichier, empêchant d'autres opérations d'entrée/sortie " "d'être exécutées sur ce fichier." -#: library/contextlib.rst:743 +#: library/contextlib.rst:889 msgid "" "Context managers created using :func:`contextmanager` are also single use " "context managers, and will complain about the underlying generator failing " @@ -924,11 +1036,11 @@ msgstr "" "usage unique, et se plaindront du fait que le générateur sous-jacent ne " "produise plus de valeur si vous essayez de les utiliser une seconde fois ::" -#: library/contextlib.rst:771 +#: library/contextlib.rst:917 msgid "Reentrant context managers" msgstr "Gestionnaires de contexte réentrants" -#: library/contextlib.rst:773 +#: library/contextlib.rst:919 msgid "" "More sophisticated context managers may be \"reentrant\". These context " "managers can not only be used in multiple :keyword:`with` statements, but " @@ -941,17 +1053,18 @@ msgstr "" "l'intérieur* d'une instruction :keyword:`!with` qui utilise déjà ce même " "gestionnaire de contexte." -#: library/contextlib.rst:778 +#: library/contextlib.rst:924 +#, fuzzy msgid "" ":class:`threading.RLock` is an example of a reentrant context manager, as " -"are :func:`suppress` and :func:`redirect_stdout`. Here's a very simple " -"example of reentrant use::" +"are :func:`suppress`, :func:`redirect_stdout`, and :func:`chdir`. Here's a " +"very simple example of reentrant use::" msgstr "" ":class:`threading.RLock` est un exemple de gestionnaire de contexte " "réentrant, comme le sont aussi :func:`suppress` et :func:`redirect_stdout`. " "Voici un très simple exemple d'utilisation réentrante ::" -#: library/contextlib.rst:797 +#: library/contextlib.rst:943 msgid "" "Real world examples of reentrancy are more likely to involve multiple " "functions calling each other and hence be far more complicated than this " @@ -961,7 +1074,7 @@ msgstr "" "fonctions s'entre-appelant, et donc être bien plus compliqués que cet " "exemple." -#: library/contextlib.rst:801 +#: library/contextlib.rst:947 msgid "" "Note also that being reentrant is *not* the same thing as being thread " "safe. :func:`redirect_stdout`, for example, is definitely not thread safe, " @@ -973,18 +1086,18 @@ msgstr "" "puisqu'il effectue des changements globaux sur l'état du système en " "branchant :data:`sys.stdout` sur différents flux." -#: library/contextlib.rst:810 +#: library/contextlib.rst:956 msgid "Reusable context managers" msgstr "Gestionnaires de contexte réutilisables" -#: library/contextlib.rst:812 +#: library/contextlib.rst:958 msgid "" -"Distinct from both single use and reentrant context managers are \"reusable" -"\" context managers (or, to be completely explicit, \"reusable, but not " -"reentrant\" context managers, since reentrant context managers are also " -"reusable). These context managers support being used multiple times, but " -"will fail (or otherwise not work correctly) if the specific context manager " -"instance has already been used in a containing with statement." +"Distinct from both single use and reentrant context managers are " +"\"reusable\" context managers (or, to be completely explicit, \"reusable, " +"but not reentrant\" context managers, since reentrant context managers are " +"also reusable). These context managers support being used multiple times, " +"but will fail (or otherwise not work correctly) if the specific context " +"manager instance has already been used in a containing with statement." msgstr "" "D'autres gestionnaires de contexte que ceux à usage unique et les réentrants " "sont les gestionnaires de contexte « réutilisables » (ou, pour être plus " @@ -995,7 +1108,7 @@ msgstr "" "contexte référencée a déjà été utilisée dans une instruction *with* " "englobante." -#: library/contextlib.rst:819 +#: library/contextlib.rst:965 msgid "" ":class:`threading.Lock` is an example of a reusable, but not reentrant, " "context manager (for a reentrant lock, it is necessary to use :class:" @@ -1005,7 +1118,7 @@ msgstr "" "réutilisable mais pas réentrant (pour un verrou réentrant, il faut à la " "place utiliser :class:`threading.RLock`)." -#: library/contextlib.rst:823 +#: library/contextlib.rst:969 msgid "" "Another example of a reusable, but not reentrant, context manager is :class:" "`ExitStack`, as it invokes *all* currently registered callbacks when leaving " @@ -1016,7 +1129,7 @@ msgstr "" "actuellement enregistrées en quittant l'instruction *with*, sans regarder où " "ces fonctions ont été ajoutées ::" -#: library/contextlib.rst:854 +#: library/contextlib.rst:1000 msgid "" "As the output from the example shows, reusing a single stack object across " "multiple with statements works correctly, but attempting to nest them will " @@ -1028,7 +1141,7 @@ msgstr "" "imbriquer fait que la pile est vidée à la fin du *with* le plus imbriqué, ce " "qui n'est probablement pas le comportement voulu." -#: library/contextlib.rst:859 +#: library/contextlib.rst:1005 msgid "" "Using separate :class:`ExitStack` instances instead of reusing a single " "instance avoids that problem::" diff --git a/library/copy.po b/library/copy.po index e5dfb381ff..1647e32a8f 100644 --- a/library/copy.po +++ b/library/copy.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2021-11-27 10:27+0100\n" "PO-Revision-Date: 2019-02-21 17:18+0100\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -127,9 +127,10 @@ msgstr "" "ou l'ensemble de composants copiés." #: library/copy.rst:62 +#, fuzzy msgid "" "This module does not copy types like module, method, stack trace, stack " -"frame, file, socket, window, array, or any similar types. It does \"copy\" " +"frame, file, socket, window, or any similar types. It does \"copy\" " "functions and classes (shallow and deeply), by returning the original object " "unchanged; this is compatible with the way these are treated by the :mod:" "`pickle` module." @@ -164,6 +165,7 @@ msgstr "" "`copyreg`." #: library/copy.rst:82 +#, fuzzy msgid "" "In order for a class to define its own copy implementation, it can define " "special methods :meth:`__copy__` and :meth:`__deepcopy__`. The former is " @@ -172,7 +174,8 @@ msgid "" "passed one argument, the ``memo`` dictionary. If the :meth:`__deepcopy__` " "implementation needs to make a deep copy of a component, it should call the :" "func:`deepcopy` function with the component as first argument and the memo " -"dictionary as second argument." +"dictionary as second argument. The memo dictionary should be treated as an " +"opaque object." msgstr "" "Afin qu'une classe définisse sa propre implémentation de copie, elle peut " "définir les méthodes spéciales :meth:`__copy__` et :meth:`__deepcopy__`. La " @@ -184,11 +187,11 @@ msgstr "" "func:`deepcopy` avec le composant comme premier argument et le dictionnaire " "*memo* comme second argument." -#: library/copy.rst:94 +#: library/copy.rst:95 msgid "Module :mod:`pickle`" msgstr "Module :mod:`pickle`" -#: library/copy.rst:94 +#: library/copy.rst:95 msgid "" "Discussion of the special methods used to support object state retrieval and " "restoration." diff --git a/library/copyreg.po b/library/copyreg.po index cd5968bde1..7ab783a353 100644 --- a/library/copyreg.po +++ b/library/copyreg.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: 2018-11-23 15:14+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -60,11 +60,12 @@ msgstr "" "éléments." #: library/copyreg.rst:34 +#, fuzzy msgid "" "The optional *constructor* parameter, if provided, is a callable object " "which can be used to reconstruct the object when called with the tuple of " -"arguments returned by *function* at pickling time. :exc:`TypeError` will be " -"raised if *object* is a class or *constructor* is not callable." +"arguments returned by *function* at pickling time. A :exc:`TypeError` is " +"raised if the *constructor* is not callable." msgstr "" "Le paramètre optionnel *contructor*, s'il est donné, est un objet appelable " "qui peux être utilisé pour reconstruire l’objet lorsqu'il est appelé avec un " diff --git a/library/crypt.po b/library/crypt.po index 1afd6f7e19..925f289619 100644 --- a/library/crypt.po +++ b/library/crypt.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,12 +18,19 @@ msgstr "" msgid ":mod:`crypt` --- Function to check Unix passwords" msgstr "" -#: library/crypt.rst:12 +#: library/crypt.rst:13 #, fuzzy msgid "**Source code:** :source:`Lib/crypt.py`" msgstr "**Code source :** :source:`Lib/pty.py`" -#: library/crypt.rst:20 +#: library/crypt.rst:23 +msgid "" +"The :mod:`crypt` module is deprecated (see :pep:`PEP 594 <594#crypt>` for " +"details and alternatives). The :mod:`hashlib` module is a potential " +"replacement for certain use cases." +msgstr "" + +#: library/crypt.rst:26 msgid "" "This module implements an interface to the :manpage:`crypt(3)` routine, " "which is a one-way hash function based upon a modified DES algorithm; see " @@ -32,7 +39,7 @@ msgid "" "attempting to crack Unix passwords with a dictionary." msgstr "" -#: library/crypt.rst:28 +#: library/crypt.rst:34 msgid "" "Notice that the behavior of this module depends on the actual " "implementation of the :manpage:`crypt(3)` routine in the running system. " @@ -40,125 +47,125 @@ msgid "" "be available on this module." msgstr "" -#: library/crypt.rst:34 +#: library/crypt.rst:40 msgid ":ref:`Availability `: Unix. Not available on VxWorks." msgstr "" -#: library/crypt.rst:36 +#: library/crypt.rst:42 msgid "Hashing Methods" msgstr "" -#: library/crypt.rst:40 +#: library/crypt.rst:46 msgid "" "The :mod:`crypt` module defines the list of hashing methods (not all methods " "are available on all platforms):" msgstr "" -#: library/crypt.rst:45 +#: library/crypt.rst:51 msgid "" "A Modular Crypt Format method with 16 character salt and 86 character hash " "based on the SHA-512 hash function. This is the strongest method." msgstr "" -#: library/crypt.rst:50 +#: library/crypt.rst:56 msgid "" "Another Modular Crypt Format method with 16 character salt and 43 character " "hash based on the SHA-256 hash function." msgstr "" -#: library/crypt.rst:55 +#: library/crypt.rst:61 msgid "" "Another Modular Crypt Format method with 22 character salt and 31 character " "hash based on the Blowfish cipher." msgstr "" -#: library/crypt.rst:62 +#: library/crypt.rst:68 msgid "" "Another Modular Crypt Format method with 8 character salt and 22 character " "hash based on the MD5 hash function." msgstr "" -#: library/crypt.rst:67 +#: library/crypt.rst:73 msgid "" "The traditional method with a 2 character salt and 13 characters of hash. " "This is the weakest method." msgstr "" -#: library/crypt.rst:72 +#: library/crypt.rst:78 msgid "Module Attributes" msgstr "" -#: library/crypt.rst:78 +#: library/crypt.rst:84 msgid "" "A list of available password hashing algorithms, as ``crypt.METHOD_*`` " "objects. This list is sorted from strongest to weakest." msgstr "" -#: library/crypt.rst:84 +#: library/crypt.rst:90 msgid "Module Functions" msgstr "" -#: library/crypt.rst:86 +#: library/crypt.rst:92 #, fuzzy msgid "The :mod:`crypt` module defines the following functions:" msgstr "Le module :mod:`pty` expose les fonctions suivantes :" -#: library/crypt.rst:90 +#: library/crypt.rst:96 msgid "" "*word* will usually be a user's password as typed at a prompt or in a " "graphical interface. The optional *salt* is either a string as returned " "from :func:`mksalt`, one of the ``crypt.METHOD_*`` values (though not all " "may be available on all platforms), or a full encrypted password including " "salt, as returned by this function. If *salt* is not provided, the " -"strongest method will be used (as returned by :func:`methods`)." +"strongest method available in :attr:`methods` will be used." msgstr "" -#: library/crypt.rst:98 +#: library/crypt.rst:103 msgid "" "Checking a password is usually done by passing the plain-text password as " "*word* and the full results of a previous :func:`crypt` call, which should " "be the same as the results of this call." msgstr "" -#: library/crypt.rst:102 +#: library/crypt.rst:107 msgid "" -"*salt* (either a random 2 or 16 character string, possibly prefixed with ``" -"$digit$`` to indicate the method) which will be used to perturb the " +"*salt* (either a random 2 or 16 character string, possibly prefixed with " +"``$digit$`` to indicate the method) which will be used to perturb the " "encryption algorithm. The characters in *salt* must be in the set ``[./a-zA-" -"Z0-9]``, with the exception of Modular Crypt Format which prefixes a ``$digit" -"$``." +"Z0-9]``, with the exception of Modular Crypt Format which prefixes a " +"``$digit$``." msgstr "" -#: library/crypt.rst:108 +#: library/crypt.rst:113 msgid "" "Returns the hashed password as a string, which will be composed of " "characters from the same alphabet as the salt." msgstr "" -#: library/crypt.rst:113 +#: library/crypt.rst:118 msgid "" "Since a few :manpage:`crypt(3)` extensions allow different values, with " "different sizes in the *salt*, it is recommended to use the full crypted " "password as salt when checking for a password." msgstr "" -#: library/crypt.rst:117 +#: library/crypt.rst:122 msgid "Accept ``crypt.METHOD_*`` values in addition to strings for *salt*." msgstr "" -#: library/crypt.rst:123 +#: library/crypt.rst:128 msgid "" "Return a randomly generated salt of the specified method. If no *method* is " -"given, the strongest method available as returned by :func:`methods` is used." +"given, the strongest method available in :attr:`methods` is used." msgstr "" -#: library/crypt.rst:127 +#: library/crypt.rst:132 msgid "" "The return value is a string suitable for passing as the *salt* argument to :" "func:`crypt`." msgstr "" -#: library/crypt.rst:130 +#: library/crypt.rst:135 msgid "" "*rounds* specifies the number of rounds for ``METHOD_SHA256``, " "``METHOD_SHA512`` and ``METHOD_BLOWFISH``. For ``METHOD_SHA256`` and " @@ -168,23 +175,27 @@ msgid "" "sup:`31`), the default is ``4096`` (2\\ :sup:`12`)." msgstr "" -#: library/crypt.rst:140 +#: library/crypt.rst:145 msgid "Added the *rounds* parameter." msgstr "" -#: library/crypt.rst:145 +#: library/crypt.rst:150 msgid "Examples" msgstr "Exemples" -#: library/crypt.rst:147 +#: library/crypt.rst:152 msgid "" "A simple example illustrating typical use (a constant-time comparison " "operation is needed to limit exposure to timing attacks. :func:`hmac." "compare_digest` is suitable for this purpose)::" msgstr "" -#: library/crypt.rst:167 +#: library/crypt.rst:172 msgid "" "To generate a hash of a password using the strongest available method and " "check it against the original::" msgstr "" + +#, fuzzy +#~ msgid "The :mod:`crypt` module is deprecated (see :pep:`594` for details)." +#~ msgstr "Le module :mod:`pty` expose les fonctions suivantes :" diff --git a/library/csv.po b/library/csv.po index 9124f52f32..6637fe2d8a 100644 --- a/library/csv.po +++ b/library/csv.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2021-01-27 19:45+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-05-20 10:21+0200\n" "Last-Translator: Mathieu Dupuy \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.3\n" +"X-Generator: Poedit 3.0.1\n" #: library/csv.rst:2 msgid ":mod:`csv` --- CSV File Reading and Writing" @@ -61,7 +61,7 @@ msgstr "" "tabulaires au format CSV. Il vous permet de dire « écris ces données dans " "le format préféré par Excel » ou « lis les données de ce fichier généré par " "Excel », sans connaître les détails précis du format CSV utilisé par Excel. " -"Vous pouvez aussi décrire les formats CSV utilisés par d'autres application " +"Vous pouvez aussi décrire les formats CSV utilisés par d'autres applications " "ou définir vos propres spécialisations." #: library/csv.rst:35 @@ -119,7 +119,7 @@ msgstr "" "sous-classe de :class:`Dialect` ou de l'une des chaînes renvoyées par la " "fonction :func:`list_dialects`. Les autres arguments nommés optionnels " "(*fmtparams*) peuvent être spécifiés pour redéfinir des paramètres de " -"formatage particuliers dans le dialecte courant. Pour des détails complets " +"formatage particuliers dans le dialecte utilisé. Pour des détails complets " "sur les dialectes et paramètres de formatage, voir la section :ref:`csv-fmt-" "params`." @@ -151,47 +151,47 @@ msgid "" "`Dialect` class or one of the strings returned by the :func:`list_dialects` " "function. The other optional *fmtparams* keyword arguments can be given to " "override individual formatting parameters in the current dialect. For full " -"details about the dialect and formatting parameters, see section :ref:`csv-" -"fmt-params`. To make it as easy as possible to interface with modules which " -"implement the DB API, the value :const:`None` is written as the empty " +"details about dialects and formatting parameters, see the :ref:`csv-fmt-" +"params` section. To make it as easy as possible to interface with modules " +"which implement the DB API, the value :const:`None` is written as the empty " "string. While this isn't a reversible transformation, it makes it easier to " "dump SQL NULL data values to CSV files without preprocessing the data " "returned from a ``cursor.fetch*`` call. All other non-string data are " "stringified with :func:`str` before being written." msgstr "" -"Renvoie un objet transcripteur responsable de convertir les données de " -"l'utilisateur en chaînes délimitées sur l'objet fichier-compatible donné. " -"*csvfile* peut être n'importe quel objet avec une méthode :func:`write`. Si " -"*csvfile* est un fichier, il doit être ouvert avec ``newline=''``. [1]_ Un " -"paramètre *dialect* optionnel peut être fourni pour définir un ensemble de " -"paramètres spécifiques à un dialecte CSV particulier. Il peut s'agir d'une " -"instance de sous-classe de :class:`Dialect` ou de l'une des chaînes " -"renvoyées par la fonction :func:`list_dialects`. Les autres arguments " -"nommés optionnels (*fmtparams*) peuvent être spécifiés pour redéfinir des " -"paramètres de formatage particuliers dans le dialecte courant. Pour des " -"détails complets sur les dialectes et paramètres de formatage, voir la " -"section :ref:`csv-fmt-params`. Pour faciliter au mieux l'interfaçage avec " -"d'autres modules implémentant l'interface *DB*, la valeur :const:`None` est " -"écrite comme une chaîne vide. Bien que ce ne soit pas une transformation " -"réversible, cela simplifie l'exportation de données SQL *NULL* vers des " -"fichiers CSV sans pré-traiter les données renvoyées par un appel à ``cursor." -"fetch*``. Toutes les autres données qui ne sont pas des chaînes de " -"caractères sont transformées en chaînes par un appel à :func:`str` avant " -"d'être écrites." +"Renvoie un transcripteur (objet *writer*) responsable de convertir les " +"données de l'utilisateur en chaînes délimitées sur l'objet fichier-" +"compatible donné. *csvfile* peut être n'importe quel objet avec une " +"méthode :func:`write`. Si *csvfile* est un objet fichier, il doit être " +"ouvert avec ``newline=''``. [1]_ Un paramètre *dialect* optionnel peut être " +"fourni pour définir un ensemble de paramètres spécifiques à un dialecte CSV " +"particulier. Il peut s'agir d'une instance d’une sous-classe de :class:" +"`Dialect` ou de l'une des chaînes renvoyées par la fonction :func:" +"`list_dialects`. Les autres arguments nommés optionnels (*fmtparams*) " +"peuvent être spécifiés pour redéfinir des paramètres de formatage " +"particuliers dans le dialecte utilisé. Pour tous les détails sur les " +"dialectes et paramètres de formatage, voir la section :ref:`csv-fmt-params`. " +"Pour faciliter au mieux l'interfaçage avec d'autres modules implémentant " +"l'interface *DB*, la valeur :const:`None` est convertie en une chaîne vide. " +"Bien que ce ne soit pas une transformation réversible, cela simplifie " +"l'exportation de données SQL *NULL* vers des fichiers CSV sans pré-traiter " +"les données renvoyées par un appel à ``cursor.fetch*``. Toutes les autres " +"données qui ne sont pas des chaînes de caractères sont transformées en " +"chaînes par un appel à :func:`str` avant d'être écrites." #: library/csv.rst:117 msgid "" "Associate *dialect* with *name*. *name* must be a string. The dialect can " "be specified either by passing a sub-class of :class:`Dialect`, or by " "*fmtparams* keyword arguments, or both, with keyword arguments overriding " -"parameters of the dialect. For full details about the dialect and formatting " +"parameters of the dialect. For full details about dialects and formatting " "parameters, see section :ref:`csv-fmt-params`." msgstr "" "Associe *dialect* avec *name*. *name* doit être une chaîne de caractères. " "Le dialecte peut être spécifié en passant une instance d'une sous-classe de :" "class:`Dialect`, des arguments nommés *fmtparams*, ou les deux, avec les " -"arguments nommés redéfinissant les paramètres du dialecte. Pour des détails " -"complets sur les dialectes et paramètres de formatage, voir la section :ref:" +"arguments nommés redéfinissant les paramètres du dialecte. Pour tous les " +"détails sur les dialectes et paramètres de formatage, voir la section :ref:" "`csv-fmt-params`." #: library/csv.rst:126 @@ -221,7 +221,7 @@ msgid "" "Returns the current maximum field size allowed by the parser. If *new_limit* " "is given, this becomes the new limit." msgstr "" -"Renvoie la taille de champ maximale courante autorisée par l'analyseur. Si " +"Renvoie la taille de champ maximale actuelle autorisée par l'analyseur. Si " "*new_limit* est donnée, elle devient la nouvelle limite." #: library/csv.rst:147 @@ -304,7 +304,7 @@ msgstr "" "dictionnaire. Si le dictionnaire passé à :meth:`writerow` possède une clé " "non présente dans *fieldnames*, le paramètre optionnel *extrasaction* " "indique quelle action réaliser. S'il vaut ``'raise'``, sa valeur par défaut, " -"une :exc:`ValueError` est levée. S'il faut ``'ignore'``, les valeurs " +"une :exc:`ValueError` est levée. S'il vaut ``'ignore'``, les valeurs " "excédentaires du dictionnaire sont ignorées. Les autres arguments optionnels " "ou nommés sont passés à l'instance :class:`writer` sous-jacente." @@ -318,15 +318,31 @@ msgstr "" #: library/csv.rst:228 msgid "" -"The :class:`Dialect` class is a container class relied on primarily for its " -"attributes, which are used to define the parameters for a specific :class:" -"`reader` or :class:`writer` instance." +"The :class:`Dialect` class is a container class whose attributes contain " +"information for how to handle doublequotes, whitespace, delimiters, etc. Due " +"to the lack of a strict CSV specification, different applications produce " +"subtly different CSV data. :class:`Dialect` instances define how :class:" +"`reader` and :class:`writer` instances behave." msgstr "" -"La classe :class:`Dialect` est une classe de conteneurs utilisée " -"principalement pour ses attributs, qui servent à définir des paramètres pour " -"des instances spécifiques de :class:`reader` ou :class:`writer`." +"La classe :class:`Dialect` est une classe dont les attributs " +"contiennent des informations sur la façon de gérer les guillemets, les " +"espaces, les délimiteurs, etc. En raison de l’absence d’une spécification " +"CSV stricte, différentes applications produisent des données CSV subtilement " +"différentes. Les instances :class:`Dialect` définissent le comportement des " +"instances :class:`reader` et :class:`writer`." -#: library/csv.rst:235 +#: library/csv.rst:234 +msgid "" +"All available :class:`Dialect` names are returned by :func:`list_dialects`, " +"and they can be registered with specific :class:`reader` and :class:`writer` " +"classes through their initializer (``__init__``) functions like this::" +msgstr "" +"Tous les noms disponibles de :class:`Dialect` sont renvoyés par :func:" +"`list_dialects`, et ils peuvent être enregistrés avec des classes :class:" +"`reader` et :class:`writer` spécifiques en passant par leur fonction " +"d’initialisation (``__init__``) comme ici :" + +#: library/csv.rst:247 msgid "" "The :class:`excel` class defines the usual properties of an Excel-generated " "CSV file. It is registered with the dialect name ``'excel'``." @@ -334,7 +350,7 @@ msgstr "" "La classe :class:`excel` définit les propriétés usuelles d'un fichier CSV " "généré par Excel. Elle est enregistrée avec le nom de dialecte ``'excel'``." -#: library/csv.rst:241 +#: library/csv.rst:253 msgid "" "The :class:`excel_tab` class defines the usual properties of an Excel-" "generated TAB-delimited file. It is registered with the dialect name " @@ -344,7 +360,7 @@ msgstr "" "CSV généré par Excel avec des tabulations comme séparateurs. Elle est " "enregistrée avec le nom de dialecte ``'excel-tab'``." -#: library/csv.rst:247 +#: library/csv.rst:259 msgid "" "The :class:`unix_dialect` class defines the usual properties of a CSV file " "generated on UNIX systems, i.e. using ``'\\n'`` as line terminator and " @@ -355,17 +371,17 @@ msgstr "" "marqueur de fin de ligne et délimitant tous les champs par des guillemets. " "Elle est enregistrée avec le nom de dialecte ``'unix'``." -#: library/csv.rst:256 +#: library/csv.rst:268 msgid "The :class:`Sniffer` class is used to deduce the format of a CSV file." msgstr "" "La classe :class:`Sniffer` est utilisée pour déduire le format d'un fichier " "CSV." -#: library/csv.rst:258 +#: library/csv.rst:270 msgid "The :class:`Sniffer` class provides two methods:" msgstr "La classe :class:`Sniffer` fournit deux méthodes :" -#: library/csv.rst:262 +#: library/csv.rst:274 msgid "" "Analyze the given *sample* and return a :class:`Dialect` subclass reflecting " "the parameters found. If the optional *delimiters* parameter is given, it " @@ -376,29 +392,62 @@ msgstr "" "*delimiters* est donné, il est interprété comme une chaîne contenant tous " "les caractères valides de séparation possibles." -#: library/csv.rst:270 +#: library/csv.rst:282 msgid "" "Analyze the sample text (presumed to be in CSV format) and return :const:" -"`True` if the first row appears to be a series of column headers." +"`True` if the first row appears to be a series of column headers. Inspecting " +"each column, one of two key criteria will be considered to estimate if the " +"sample contains a header:" msgstr "" "Analyse l'extrait de texte (présumé être au format CSV) et renvoie :const:" -"`True` si la première ligne semble être une série d'en-têtes de colonnes." +"`True` si la première ligne semble être une série d'en-têtes de colonnes. En " +"inspectant chaque colonne, l’un des deux critères clés sera pris en compte " +"pour estimer si l’échantillon contient un en-tête :" + +#: library/csv.rst:287 +msgid "the second through n-th rows contain numeric values" +msgstr "les deuxième à n-ième lignes contiennent des valeurs numériques" + +#: library/csv.rst:288 +msgid "" +"the second through n-th rows contain strings where at least one value's " +"length differs from that of the putative header of that column." +msgstr "" +"les deuxième à n-ième lignes contiennent des chaînes dont la longueur d’au " +"moins une valeur diffère de celle de l’en-tête putatif de cette colonne." + +#: library/csv.rst:291 +msgid "" +"Twenty rows after the first row are sampled; if more than half of columns + " +"rows meet the criteria, :const:`True` is returned." +msgstr "" +"L'échantillon est composé des vingt lignes après la première ligne ; si plus " +"de la moitié des colonnes + lignes répondent aux critères, :const:`True` est " +"renvoyé." -#: library/csv.rst:273 +#: library/csv.rst:296 +msgid "" +"This method is a rough heuristic and may produce both false positives and " +"negatives." +msgstr "" +"Cette méthode est une heuristique discutable et peut produire tant des faux-" +"positifs que des faux-négatifs." + +#: library/csv.rst:299 msgid "An example for :class:`Sniffer` use::" msgstr "Un exemple d'utilisation de :class:`Sniffer` ::" -#: library/csv.rst:282 +#: library/csv.rst:308 msgid "The :mod:`csv` module defines the following constants:" msgstr "Le module :mod:`csv` définit les constantes suivantes :" -#: library/csv.rst:286 +#: library/csv.rst:312 msgid "Instructs :class:`writer` objects to quote all fields." msgstr "" "Indique aux objets :class:`writer` de délimiter tous les champs par des " "guillemets." -#: library/csv.rst:291 +#: library/csv.rst:317 msgid "" "Instructs :class:`writer` objects to only quote those fields which contain " "special characters such as *delimiter*, *quotechar* or any of the characters " @@ -408,19 +457,19 @@ msgstr "" "contenant un caractère spécial comme *delimiter*, *quotechar* ou n'importe " "quel caractère de *lineterminator*." -#: library/csv.rst:298 +#: library/csv.rst:324 msgid "Instructs :class:`writer` objects to quote all non-numeric fields." msgstr "" "Indique aux objets :class:`writer` de délimiter ainsi tous les champs non-" "numériques." -#: library/csv.rst:300 +#: library/csv.rst:326 msgid "Instructs the reader to convert all non-quoted fields to type *float*." msgstr "" "Indique au lecteur de convertir tous les champs non délimités par des " "guillemets vers des *float*." -#: library/csv.rst:305 +#: library/csv.rst:331 msgid "" "Instructs :class:`writer` objects to never quote fields. When the current " "*delimiter* occurs in output data it is preceded by the current *escapechar* " @@ -428,12 +477,12 @@ msgid "" "if any characters that require escaping are encountered." msgstr "" "Indique aux objets :class:`writer` de ne jamais délimiter les champs par des " -"guillemets. Quand le *delimiter* courant apparaît dans les données, il est " +"guillemets. Quand le *delimiter* utilisé apparaît dans les données, il est " "précédé sur la sortie par un caractère *escapechar*. Si *escapechar* n'est " "pas précisé, le transcripteur lèvera une :exc:`Error` si un caractère " "nécessitant un échappement est rencontré." -#: library/csv.rst:310 +#: library/csv.rst:336 msgid "" "Instructs :class:`reader` to perform no special processing of quote " "characters." @@ -441,19 +490,19 @@ msgstr "" "Indique au :class:`reader` de ne pas opérer de traitement spécial sur les " "guillemets." -#: library/csv.rst:312 +#: library/csv.rst:338 msgid "The :mod:`csv` module defines the following exception:" msgstr "Le module :mod:`csv` définit les exceptions suivantes :" -#: library/csv.rst:317 +#: library/csv.rst:343 msgid "Raised by any of the functions when an error is detected." msgstr "Levée par les fonctions du module quand une erreur détectée." -#: library/csv.rst:322 +#: library/csv.rst:348 msgid "Dialects and Formatting Parameters" msgstr "Dialectes et paramètres de formatage" -#: library/csv.rst:324 +#: library/csv.rst:350 msgid "" "To make it easier to specify the format of input and output records, " "specific formatting parameters are grouped together into dialects. A " @@ -475,18 +524,18 @@ msgstr "" "paramètres de formatage individuels, qui ont les mêmes noms que les " "attributs de :class:`Dialect` définis ci-dessous." -#: library/csv.rst:334 +#: library/csv.rst:360 msgid "Dialects support the following attributes:" msgstr "Les dialectes supportent les attributs suivants :" -#: library/csv.rst:339 +#: library/csv.rst:365 msgid "" "A one-character string used to separate fields. It defaults to ``','``." msgstr "" "Une chaîne d'un seul caractère utilisée pour séparer les champs. Elle vaut " "``','`` par défaut." -#: library/csv.rst:344 +#: library/csv.rst:370 msgid "" "Controls how instances of *quotechar* appearing inside a field should " "themselves be quoted. When :const:`True`, the character is doubled. When :" @@ -498,7 +547,7 @@ msgstr "" "doublé. Quand il vaut :const:`False`, le caractère *escapechar* est utilisé " "comme préfixe à *quotechar*. Il vaut :const:`True` par défaut." -#: library/csv.rst:349 +#: library/csv.rst:375 msgid "" "On output, if *doublequote* is :const:`False` and no *escapechar* is set, :" "exc:`Error` is raised if a *quotechar* is found in a field." @@ -507,7 +556,7 @@ msgstr "" "n'est précisé, une :exc:`Error` est levée si un *quotechar* est trouvé dans " "le champ." -#: library/csv.rst:355 +#: library/csv.rst:381 msgid "" "A one-character string used by the writer to escape the *delimiter* if " "*quoting* is set to :const:`QUOTE_NONE` and the *quotechar* if *doublequote* " @@ -521,7 +570,11 @@ msgstr "" "retire toute signification spéciale au caractère qui le suit. Elle vaut par " "défaut :const:`None`, ce qui désactive l'échappement." -#: library/csv.rst:363 +#: library/csv.rst:386 +msgid "An empty *escapechar* is not allowed." +msgstr "" + +#: library/csv.rst:391 msgid "" "The string used to terminate lines produced by the :class:`writer`. It " "defaults to ``'\\r\\n'``." @@ -529,7 +582,7 @@ msgstr "" "La chaîne utilisée pour terminer les lignes produites par un :class:" "`writer`. Elle vaut par défaut ``'\\r\\n'``." -#: library/csv.rst:368 +#: library/csv.rst:396 msgid "" "The :class:`reader` is hard-coded to recognise either ``'\\r'`` or ``'\\n'`` " "as end-of-line, and ignores *lineterminator*. This behavior may change in " @@ -539,7 +592,7 @@ msgstr "" "``'\\n'`` comme marqueurs de fin de ligne, et ignorer *lineterminator*. Ce " "comportement pourrait changer dans le futur." -#: library/csv.rst:375 +#: library/csv.rst:403 msgid "" "A one-character string used to quote fields containing special characters, " "such as the *delimiter* or *quotechar*, or which contain new-line " @@ -549,7 +602,11 @@ msgstr "" "des caractères spéciaux, comme *delimiter* ou *quotechar*, ou contenant un " "caractère de fin de ligne. Elle vaut ``'\"'`` par défaut." -#: library/csv.rst:382 +#: library/csv.rst:407 +msgid "An empty *quotechar* is not allowed." +msgstr "" + +#: library/csv.rst:412 msgid "" "Controls when quotes should be generated by the writer and recognised by the " "reader. It can take on any of the :const:`QUOTE_\\*` constants (see " @@ -560,7 +617,7 @@ msgstr "" "const:`QUOTE_\\*` (voir la section :ref:`csv-contents`) et vaut par défaut :" "const:`QUOTE_MINIMAL`." -#: library/csv.rst:389 +#: library/csv.rst:419 msgid "" "When :const:`True`, whitespace immediately following the *delimiter* is " "ignored. The default is :const:`False`." @@ -568,7 +625,7 @@ msgstr "" "Quand il vaut :const:`True`, les espaces suivant directement *delimiter* " "sont ignorés. Il vaut :const:`False` par défaut." -#: library/csv.rst:395 +#: library/csv.rst:425 msgid "" "When ``True``, raise exception :exc:`Error` on bad CSV input. The default is " "``False``." @@ -576,11 +633,11 @@ msgstr "" "Quand il vaut ``True``, une exception :exc:`Error` est levée lors de " "mauvaises entrées CSV. Il vaut ``False`` par défaut." -#: library/csv.rst:399 +#: library/csv.rst:429 msgid "Reader Objects" msgstr "Objets lecteurs" -#: library/csv.rst:401 +#: library/csv.rst:431 msgid "" "Reader objects (:class:`DictReader` instances and objects returned by the :" "func:`reader` function) have the following public methods:" @@ -588,27 +645,28 @@ msgstr "" "Les objets lecteurs (instances de :class:`DictReader` ou objets renvoyés par " "la fonction :func:`reader`) ont les méthodes publiques suivantes :" -#: library/csv.rst:406 +#: library/csv.rst:436 msgid "" "Return the next row of the reader's iterable object as a list (if the object " "was returned from :func:`reader`) or a dict (if it is a :class:`DictReader` " -"instance), parsed according to the current dialect. Usually you should call " -"this as ``next(reader)``." +"instance), parsed according to the current :class:`Dialect`. Usually you " +"should call this as ``next(reader)``." msgstr "" "Renvoie la ligne suivante de l'objet itérable du lecteur en tant que liste " "(si l'objet est renvoyé depuis :func:`reader`) ou dictionnaire (si l'objet " -"est un :class:`DictReader`), analysé suivant le dialecte courant. " -"Généralement, vous devez appeler la méthode à l'aide de ``next(reader)``." +"est un :class:`DictReader`), analysé suivant la classe :class:`Dialect` " +"utilisée. Généralement, vous devez appeler la méthode à l'aide de " +"``next(reader)``." -#: library/csv.rst:412 +#: library/csv.rst:442 msgid "Reader objects have the following public attributes:" msgstr "Les objets lecteurs ont les attributs publics suivants :" -#: library/csv.rst:416 +#: library/csv.rst:446 msgid "A read-only description of the dialect in use by the parser." msgstr "Une description en lecture seule du dialecte utilisé par l'analyseur." -#: library/csv.rst:421 +#: library/csv.rst:451 msgid "" "The number of lines read from the source iterator. This is not the same as " "the number of records returned, as records can span multiple lines." @@ -617,11 +675,11 @@ msgstr "" "au nombre d'enregistrements renvoyés, puisque certains enregistrements " "peuvent s'étendre sur plusieurs lignes." -#: library/csv.rst:425 +#: library/csv.rst:455 msgid "DictReader objects have the following public attribute:" msgstr "Les objets *DictReader* ont les attributs publics suivants :" -#: library/csv.rst:429 +#: library/csv.rst:459 msgid "" "If not passed as a parameter when creating the object, this attribute is " "initialized upon first access or when the first record is read from the file." @@ -630,11 +688,11 @@ msgstr "" "est initialisé lors du premier accès ou quand le premier enregistrement est " "lu depuis le fichier." -#: library/csv.rst:436 +#: library/csv.rst:466 msgid "Writer Objects" msgstr "Objets transcripteurs" -#: library/csv.rst:438 +#: library/csv.rst:468 msgid "" ":class:`Writer` objects (:class:`DictWriter` instances and objects returned " "by the :func:`writer` function) have the following public methods. A *row* " @@ -655,21 +713,21 @@ msgstr "" "quelques problèmes pour d'autres programmes qui liraient ces fichiers CSV " "(en supposant qu'ils supportent les nombres complexes)." -#: library/csv.rst:449 +#: library/csv.rst:479 msgid "" "Write the *row* parameter to the writer's file object, formatted according " -"to the current dialect. Return the return value of the call to the *write* " -"method of the underlying file object." +"to the current :class:`Dialect`. Return the return value of the call to the " +"*write* method of the underlying file object." msgstr "" -"Écrit le paramètre *row* vers le fichier associé au transcripteur, formaté " -"selon le dialecte courant. Renvoie la valeur de retour de l'appel à la " -"méthode *write* de l'objet fichier sous-jacent." +"Écrit le paramètre *row* vers l’objet fichier du transcripteur, formaté " +"selon la classe :class:`Dialect` utilisée. Renvoie la valeur de retour de " +"l'appel à la méthode *write* de l'objet fichier sous-jacent." -#: library/csv.rst:453 +#: library/csv.rst:483 msgid "Added support of arbitrary iterables." msgstr "Ajout du support d'itérables arbitraires." -#: library/csv.rst:458 +#: library/csv.rst:488 msgid "" "Write all elements in *rows* (an iterable of *row* objects as described " "above) to the writer's file object, formatted according to the current " @@ -677,22 +735,22 @@ msgid "" msgstr "" "Écrit tous les éléments de *rows* (itérable d'objets *row* comme décrits " "précédemment) vers le fichier associé au transcripteur, formatés selon le " -"dialecte courant." +"dialecte utilisé." -#: library/csv.rst:462 +#: library/csv.rst:492 msgid "Writer objects have the following public attribute:" -msgstr "Les objets transcripteurs ont les attributs publics suivants :" +msgstr "Les objets transcripteurs ont l’attribut public suivant :" -#: library/csv.rst:467 +#: library/csv.rst:497 msgid "A read-only description of the dialect in use by the writer." msgstr "" "Une description en lecture seule du dialecte utilisé par le transcripteur." -#: library/csv.rst:470 +#: library/csv.rst:500 msgid "DictWriter objects have the following public method:" -msgstr "Les objets *DictWriter* ont les attributs publics suivants :" +msgstr "Les objets *DictWriter* ont la méthode publique suivante :" -#: library/csv.rst:475 +#: library/csv.rst:505 msgid "" "Write a row with the field names (as specified in the constructor) to the " "writer's file object, formatted according to the current dialect. Return the " @@ -700,10 +758,10 @@ msgid "" msgstr "" "Écrit une ligne avec le nom des en-têtes (comme définies dans le " "constructeur) dans l'objet fichier associé au transcripteur, formatée selon " -"le dialecte courant. Renvoie la valeur de retour de l'appel :meth:`csvwriter." +"le dialecte utilisé. Renvoie la valeur de retour de l'appel :meth:`csvwriter." "writerow` utilisé en interne." -#: library/csv.rst:480 +#: library/csv.rst:510 msgid "" ":meth:`writeheader` now also returns the value returned by the :meth:" "`csvwriter.writerow` method it uses internally." @@ -711,28 +769,29 @@ msgstr "" ":meth:`writeheader` renvoie maintenant aussi la valeur renvoyée par la " "méthode :meth:`csvwriter.writerow` qu'il utilise en interne." -#: library/csv.rst:488 +#: library/csv.rst:518 msgid "Examples" msgstr "Exemples" -#: library/csv.rst:490 +#: library/csv.rst:520 msgid "The simplest example of reading a CSV file::" msgstr "Le plus simple exemple de lecture d'un fichier CSV ::" -#: library/csv.rst:498 +#: library/csv.rst:528 msgid "Reading a file with an alternate format::" msgstr "Lire un fichier avec un format alternatif ::" -#: library/csv.rst:506 +#: library/csv.rst:536 msgid "The corresponding simplest possible writing example is::" msgstr "Le plus simple exemple d'écriture correspondant est ::" -#: library/csv.rst:513 +#: library/csv.rst:543 +#, fuzzy msgid "" "Since :func:`open` is used to open a CSV file for reading, the file will by " "default be decoded into unicode using the system default encoding (see :func:" -"`locale.getpreferredencoding`). To decode a file using a different " -"encoding, use the ``encoding`` argument of open::" +"`locale.getencoding`). To decode a file using a different encoding, use the " +"``encoding`` argument of open::" msgstr "" "Puisque :func:`open` est utilisée pour ouvrir un fichier CSV en lecture, le " "fichier sera par défaut décodé vers Unicode en utilisant l'encodage par " @@ -740,20 +799,20 @@ msgstr "" "utilisant un encodage différent, utilisez l'argument ``encoding`` de " "*open* ::" -#: library/csv.rst:524 +#: library/csv.rst:554 msgid "" "The same applies to writing in something other than the system default " "encoding: specify the encoding argument when opening the output file." msgstr "" -"La même chose s'applique lors de l'écriture dans un autre encodage que celui " -"par défaut du système : spécifiez l'encodage en argument lors de l'ouverture " -"du fichier de sortie." +"Cela s’applique également lors de l'écriture dans un autre encodage que " +"celui par défaut du système : spécifiez l'encodage en argument lors de " +"l'ouverture du fichier de sortie." -#: library/csv.rst:527 +#: library/csv.rst:557 msgid "Registering a new dialect::" msgstr "Enregistrer un nouveau dialecte ::" -#: library/csv.rst:534 +#: library/csv.rst:564 msgid "" "A slightly more advanced use of the reader --- catching and reporting " "errors::" @@ -761,7 +820,7 @@ msgstr "" "Un exemple d'utilisation un peu plus avancé du lecteur --- attrapant et " "notifiant les erreurs ::" -#: library/csv.rst:546 +#: library/csv.rst:576 msgid "" "And while the module doesn't directly support parsing strings, it can easily " "be done::" @@ -769,11 +828,11 @@ msgstr "" "Et bien que le module ne permette pas d'analyser directement des chaînes, " "cela peut être fait facilement ::" -#: library/csv.rst:555 +#: library/csv.rst:585 msgid "Footnotes" msgstr "Notes" -#: library/csv.rst:556 +#: library/csv.rst:586 msgid "" "If ``newline=''`` is not specified, newlines embedded inside quoted fields " "will not be interpreted correctly, and on platforms that use ``\\r\\n`` " @@ -781,9 +840,18 @@ msgid "" "safe to specify ``newline=''``, since the csv module does its own (:term:" "`universal `) newline handling." msgstr "" -"Si ``newline=''`` n'est pas spécifié, les caractères de fin de ligne " +"Si ``newline=''`` n'est pas précisé, les caractères de fin de ligne " "embarqués dans des champs délimités par des guillemets ne seront pas " "interprétés correctement, et sur les plateformes qui utilisent ``\\r\\n`` " -"comme marqueur de fin de ligne, un ``\\r`` sera ajouté. Vous devriez " -"toujours spécifier sans crainte ``newline=''``, puisque le module *csv* gère " -"lui-même les fins de lignes (:term:`universelles `)." +"comme marqueur de fin de ligne, un ``\\r`` sera ajouté. Il devrait toujours " +"être sûr de préciser ``newline=''``, puisque le module *csv* gère lui-même " +"les fins de lignes (:term:`universelles `)." + +#~ msgid "" +#~ "The :class:`Dialect` class is a container class relied on primarily for " +#~ "its attributes, which are used to define the parameters for a specific :" +#~ "class:`reader` or :class:`writer` instance." +#~ msgstr "" +#~ "La classe :class:`Dialect` est une classe de conteneurs utilisée " +#~ "principalement pour ses attributs, qui servent à définir des paramètres " +#~ "pour des instances spécifiques de :class:`reader` ou :class:`writer`." diff --git a/library/ctypes.po b/library/ctypes.po index 374a340155..8a911f9923 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" -"PO-Revision-Date: 2020-08-17 23:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2021-11-09 08:06+0100\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -39,11 +39,11 @@ msgstr "Didacticiel de *ctypes*" msgid "" "Note: The code samples in this tutorial use :mod:`doctest` to make sure that " "they actually work. Since some code samples behave differently under Linux, " -"Windows, or Mac OS X, they contain doctest directives in comments." +"Windows, or macOS, they contain doctest directives in comments." msgstr "" -"Remarque : Les exemples de code de ce didacticiel utilisent :mod:`doctest` " +"Remarque : les exemples de code de ce didacticiel utilisent :mod:`doctest` " "pour s'assurer de leur propre bon fonctionnement. Vu que certains de ces " -"exemples ont un comportement différent en Linux, Windows ou Mac OS X, ils " +"exemples ont un comportement différent en Linux, Windows ou macOS, ils " "contiennent des directives *doctest* dans les commentaires." #: library/ctypes.rst:25 @@ -53,7 +53,7 @@ msgid "" "`c_long`. So, you should not be confused if :class:`c_long` is printed if " "you would expect :class:`c_int` --- they are actually the same type." msgstr "" -"Remarque : Le type :class:`c_int` du module apparaît dans certains de ces " +"Remarque : le type :class:`c_int` du module apparaît dans certains de ces " "exemples. Sur les plates-formes où ``sizeof(long) == sizeof(int)``, ce type " "est un alias de :class:`c_long`. Ne soyez donc pas surpris si :class:" "`c_long` s'affiche là où vous vous attendiez à :class:`c_int` — il s'agit " @@ -289,7 +289,7 @@ msgstr "" "paramètres, apprenons-en un peu plus sur les types de données de :mod:" "`ctypes`." -#: library/ctypes.rst:2143 +#: library/ctypes.rst:2137 msgid "Fundamental data types" msgstr "Types de données de base" @@ -556,12 +556,12 @@ msgstr "" "permet d'y accéder comme à une chaîne de caractères terminée par NUL ::" #: library/ctypes.rst:333 +#, fuzzy msgid "" -"The :func:`create_string_buffer` function replaces the :func:`c_buffer` " -"function (which is still available as an alias), as well as the :func:" -"`c_string` function from earlier ctypes releases. To create a mutable " -"memory block containing unicode characters of the C type :c:type:`wchar_t` " -"use the :func:`create_unicode_buffer` function." +"The :func:`create_string_buffer` function replaces the old :func:`c_buffer` " +"function (which is still available as an alias). To create a mutable memory " +"block containing unicode characters of the C type :c:type:`wchar_t`, use " +"the :func:`create_unicode_buffer` function." msgstr "" "La fonction :func:`create_string_buffer` remplace les fonctions :func:" "`c_buffer` (qui en reste un alias) et :func:`c_string` des versions " @@ -569,11 +569,11 @@ msgstr "" "bloc mémoire modifiable contenant des caractères Unicode du type C :c:type:" "`wchar_t`." -#: library/ctypes.rst:343 +#: library/ctypes.rst:342 msgid "Calling functions, continued" msgstr "Appel de fonctions, suite" -#: library/ctypes.rst:345 +#: library/ctypes.rst:344 msgid "" "Note that printf prints to the real standard output channel, *not* to :data:" "`sys.stdout`, so these examples will only work at the console prompt, not " @@ -583,7 +583,7 @@ msgstr "" "exemples suivants ne fonctionnent donc que dans une invite de commande et " "non depuis *IDLE* or *PythonWin* ::" -#: library/ctypes.rst:365 +#: library/ctypes.rst:364 msgid "" "As has been mentioned before, all Python types except integers, strings, and " "bytes objects have to be wrapped in their corresponding :mod:`ctypes` type, " @@ -594,11 +594,11 @@ msgstr "" "leur type :mod:`ctypes` correspondant pour pouvoir être convertis dans le " "type C requis ::" -#: library/ctypes.rst:378 +#: library/ctypes.rst:377 msgid "Calling functions with your own custom data types" msgstr "Appel de fonctions avec des types de données personnalisés" -#: library/ctypes.rst:380 +#: library/ctypes.rst:379 msgid "" "You can also customize :mod:`ctypes` argument conversion to allow instances " "of your own classes be used as function arguments. :mod:`ctypes` looks for " @@ -611,7 +611,7 @@ msgstr "" "et le prend comme argument à la fonction. Bien entendu, cet attribut doit " "être un entier, une chaîne de caractères ou des octets ::" -#: library/ctypes.rst:395 +#: library/ctypes.rst:394 msgid "" "If you don't want to store the instance's data in the :attr:`_as_parameter_` " "instance variable, you could define a :class:`property` which makes the " @@ -621,11 +621,11 @@ msgstr "" "attr:`_as_parameter_` de l'instance, vous pouvez toujours définir une :class:" "`propriété ` qui rend cet attribut disponible sur demande." -#: library/ctypes.rst:403 +#: library/ctypes.rst:402 msgid "Specifying the required argument types (function prototypes)" msgstr "Définition du type des arguments nécessaires (prototypes de fonction)" -#: library/ctypes.rst:405 +#: library/ctypes.rst:404 msgid "" "It is possible to specify the required argument types of functions exported " "from DLLs by setting the :attr:`argtypes` attribute." @@ -633,7 +633,7 @@ msgstr "" "Il est possible de définir le type des arguments demandés par une fonction " "exportée depuis une DLL en définissant son attribut :attr:`argtypes`." -#: library/ctypes.rst:408 +#: library/ctypes.rst:407 msgid "" ":attr:`argtypes` must be a sequence of C data types (the ``printf`` function " "is probably not a good example here, because it takes a variable number and " @@ -646,7 +646,7 @@ msgstr "" "selon la chaîne de formatage ; cela dit, elle se révèle pratique pour tester " "cette fonctionnalité) ::" -#: library/ctypes.rst:419 +#: library/ctypes.rst:418 msgid "" "Specifying a format protects against incompatible argument types (just as a " "prototype for a C function), and tries to convert the arguments to valid " @@ -656,7 +656,7 @@ msgstr "" "(comme le fait le prototype d'une fonction C) et tente de convertir les " "arguments en des types valides ::" -#: library/ctypes.rst:431 +#: library/ctypes.rst:430 msgid "" "If you have defined your own classes which you pass to function calls, you " "have to implement a :meth:`from_param` class method for them to be able to " @@ -678,11 +678,11 @@ msgstr "" "convient que le résultat soit un entier, une chaîne, des octets, une " "instance :mod:`ctypes` ou un objet avec un attribut :attr:`_as_parameter_`." -#: library/ctypes.rst:445 +#: library/ctypes.rst:444 msgid "Return types" msgstr "Types de sortie" -#: library/ctypes.rst:447 +#: library/ctypes.rst:446 msgid "" "By default functions are assumed to return the C :c:type:`int` type. Other " "return types can be specified by setting the :attr:`restype` attribute of " @@ -692,7 +692,7 @@ msgstr "" "`int` C. Pour préciser un autre type de sortie, il faut définir l'attribut :" "attr:`restype` de l'objet encapsulant la fonction." -#: library/ctypes.rst:451 +#: library/ctypes.rst:450 msgid "" "Here is a more advanced example, it uses the ``strchr`` function, which " "expects a string pointer and a char, and returns a pointer to a string::" @@ -701,7 +701,7 @@ msgstr "" "prend en paramètres un pointeur vers une chaîne et un caractère. Elle " "renvoie un pointeur sur une chaîne de caractères ::" -#: library/ctypes.rst:464 +#: library/ctypes.rst:463 msgid "" "If you want to avoid the ``ord(\"x\")`` calls above, you can set the :attr:" "`argtypes` attribute, and the second argument will be converted from a " @@ -711,7 +711,7 @@ msgstr "" "l'attribut :attr:`argtypes` ; le second argument, un objet octet à un seul " "caractère, sera automatiquement converti en un caractère C ::" -#: library/ctypes.rst:482 +#: library/ctypes.rst:481 msgid "" "You can also use a callable Python object (a function or a class for " "example) as the :attr:`restype` attribute, if the foreign function returns " @@ -727,7 +727,7 @@ msgstr "" "pratique pour vérifier les codes d'erreurs des valeurs de retour et lever " "automatiquement des exceptions ::" -#: library/ctypes.rst:505 +#: library/ctypes.rst:504 msgid "" "``WinError`` is a function which will call Windows ``FormatMessage()`` api " "to get the string representation of an error code, and *returns* an " @@ -740,7 +740,7 @@ msgstr "" "code d'erreur. Si celui-ci n'est pas passé, elle appelle :func:" "`GetLastError` pour le récupérer." -#: library/ctypes.rst:510 +#: library/ctypes.rst:509 msgid "" "Please note that a much more powerful error checking mechanism is available " "through the :attr:`errcheck` attribute; see the reference manual for details." @@ -749,11 +749,11 @@ msgstr "" "efficacement les erreurs ; référez-vous au manuel de référence pour plus de " "précisions." -#: library/ctypes.rst:517 +#: library/ctypes.rst:516 msgid "Passing pointers (or: passing parameters by reference)" msgstr "Passage de pointeurs (passage de paramètres par référence)" -#: library/ctypes.rst:519 +#: library/ctypes.rst:518 msgid "" "Sometimes a C api function expects a *pointer* to a data type as parameter, " "probably to write into the corresponding location, or if the data is too " @@ -765,7 +765,7 @@ msgstr "" "correspondant ou si la donnée est trop grande pour pouvoir être passée par " "valeur. Ce mécanisme est appelé *passage de paramètres par référence*." -#: library/ctypes.rst:523 +#: library/ctypes.rst:522 msgid "" ":mod:`ctypes` exports the :func:`byref` function which is used to pass " "parameters by reference. The same effect can be achieved with the :func:" @@ -779,11 +779,11 @@ msgstr "" "pointeur. Ainsi, si vous n'avez pas besoin de cet objet dans votre code " "Python, utiliser :func:`byref` est plus performant ::" -#: library/ctypes.rst:545 +#: library/ctypes.rst:544 msgid "Structures and unions" msgstr "Structures et unions" -#: library/ctypes.rst:547 +#: library/ctypes.rst:546 msgid "" "Structures and unions must derive from the :class:`Structure` and :class:" "`Union` base classes which are defined in the :mod:`ctypes` module. Each " @@ -796,7 +796,7 @@ msgstr "" "être une liste de *paires*, contenant un *nom de champ* et un *type de " "champ*." -#: library/ctypes.rst:552 +#: library/ctypes.rst:551 msgid "" "The field type must be a :mod:`ctypes` type like :class:`c_int`, or any " "other derived :mod:`ctypes` type: structure, union, array, pointer." @@ -804,7 +804,7 @@ msgstr "" "Le type de champ doit être un type :mod:`ctypes` comme :class:`c_int` ou un " "type :mod:`ctypes` dérivé : structure, union, tableau ou pointeur." -#: library/ctypes.rst:555 +#: library/ctypes.rst:554 msgid "" "Here is a simple example of a POINT structure, which contains two integers " "named *x* and *y*, and also shows how to initialize a structure in the " @@ -814,7 +814,7 @@ msgstr "" "et *y* et qui montre également comment instancier une structure avec le " "constructeur ::" -#: library/ctypes.rst:575 +#: library/ctypes.rst:574 msgid "" "You can, however, build much more complicated structures. A structure can " "itself contain other structures by using a structure as a field type." @@ -823,7 +823,7 @@ msgstr "" "structure peut elle-même contenir d'autres structures en prenant une " "structure comme type de champ." -#: library/ctypes.rst:578 +#: library/ctypes.rst:577 msgid "" "Here is a RECT structure which contains two POINTs named *upperleft* and " "*lowerright*::" @@ -831,7 +831,7 @@ msgstr "" "Voici une structure RECT qui contient deux POINTs *upperleft* et " "*lowerright* ::" -#: library/ctypes.rst:592 +#: library/ctypes.rst:591 msgid "" "Nested structures can also be initialized in the constructor in several " "ways::" @@ -839,7 +839,7 @@ msgstr "" "Une structure encapsulée peut être instanciée par un constructeur de " "plusieurs façons ::" -#: library/ctypes.rst:597 +#: library/ctypes.rst:596 msgid "" "Field :term:`descriptor`\\s can be retrieved from the *class*, they are " "useful for debugging because they can provide useful information::" @@ -848,7 +848,7 @@ msgstr "" "champs depuis la *classe*. Ils sont importants pour déboguer car ils " "contiennent des informations utiles ::" -#: library/ctypes.rst:611 +#: library/ctypes.rst:610 msgid "" ":mod:`ctypes` does not support passing unions or structures with bit-fields " "to functions by value. While this may work on 32-bit x86, it's not " @@ -861,12 +861,11 @@ msgstr "" "par la bibliothèque en général. Les unions et les structures avec des champs " "de bits doivent toujours être passées par pointeur." -#: library/ctypes.rst:617 +#: library/ctypes.rst:616 msgid "Structure/union alignment and byte order" msgstr "Alignement et boutisme des structures et des unions" -#: library/ctypes.rst:619 -#, fuzzy +#: library/ctypes.rst:618 msgid "" "By default, Structure and Union fields are aligned in the same way the C " "compiler does it. It is possible to override this behavior by specifying a :" @@ -880,7 +879,7 @@ msgstr "" "sous-classe. Ce champ doit être un entier positif et vaut l'alignement " "maximal des champs. C'est ce que fait ``#pragma pack(n)`` pour MSVC." -#: library/ctypes.rst:625 +#: library/ctypes.rst:624 msgid "" ":mod:`ctypes` uses the native byte order for Structures and Unions. To " "build structures with non-native byte order, you can use one of the :class:" @@ -894,11 +893,11 @@ msgstr "" "`LittleEndianStructure`, :class:`BigEndianUnion` ou :class:" "`LittleEndianUnion`. Ces classes ne peuvent pas avoir de champ pointeur." -#: library/ctypes.rst:635 +#: library/ctypes.rst:634 msgid "Bit fields in structures and unions" msgstr "Champs de bits dans les structures et les unions" -#: library/ctypes.rst:637 +#: library/ctypes.rst:636 msgid "" "It is possible to create structures and unions containing bit fields. Bit " "fields are only possible for integer fields, the bit width is specified as " @@ -908,11 +907,11 @@ msgstr "" "de bits. Seuls les entiers peuvent être des champs de bits, le nombre de " "bits est défini dans le troisième champ du *n*-uplet :attr:`_fields_` ::" -#: library/ctypes.rst:655 +#: library/ctypes.rst:654 msgid "Arrays" msgstr "Tableaux" -#: library/ctypes.rst:657 +#: library/ctypes.rst:656 msgid "" "Arrays are sequences, containing a fixed number of instances of the same " "type." @@ -920,7 +919,7 @@ msgstr "" "Les tableaux sont des séquences qui contiennent un nombre fixe d'instances " "du même type." -#: library/ctypes.rst:659 +#: library/ctypes.rst:658 msgid "" "The recommended way to create array types is by multiplying a data type with " "a positive integer::" @@ -928,7 +927,7 @@ msgstr "" "La meilleure façon de créer des tableaux consiste à multiplier le type de " "donnée par un entier positif ::" -#: library/ctypes.rst:664 +#: library/ctypes.rst:663 msgid "" "Here is an example of a somewhat artificial data type, a structure " "containing 4 POINTs among other stuff::" @@ -936,11 +935,11 @@ msgstr "" "Voici un exemple — un peu artificiel — d'une structure contenant, entre " "autres, 4 POINTs ::" -#: library/ctypes.rst:680 +#: library/ctypes.rst:679 msgid "Instances are created in the usual way, by calling the class::" msgstr "Comme d'habitude, on crée les instances en appelant la classe ::" -#: library/ctypes.rst:686 +#: library/ctypes.rst:685 msgid "" "The above code print a series of ``0 0`` lines, because the array contents " "is initialized to zeros." @@ -948,15 +947,15 @@ msgstr "" "Le code précédent affiche une suite de ``0 0`` car le contenu du tableau est " "initialisé avec des zéros." -#: library/ctypes.rst:689 +#: library/ctypes.rst:688 msgid "Initializers of the correct type can also be specified::" msgstr "Des valeurs d'initialisation du bon type peuvent être passées ::" -#: library/ctypes.rst:705 +#: library/ctypes.rst:704 msgid "Pointers" msgstr "Pointeurs" -#: library/ctypes.rst:707 +#: library/ctypes.rst:706 msgid "" "Pointer instances are created by calling the :func:`pointer` function on a :" "mod:`ctypes` type::" @@ -964,7 +963,7 @@ msgstr "" "On crée une instance de pointeur en appelant la fonction :func:`pointer` sur " "un type :mod:`ctypes` ::" -#: library/ctypes.rst:715 +#: library/ctypes.rst:714 msgid "" "Pointer instances have a :attr:`~_Pointer.contents` attribute which returns " "the object to which the pointer points, the ``i`` object above::" @@ -972,7 +971,7 @@ msgstr "" "Les instances de pointeurs ont un attribut :attr:`~_Pointer.contents` qui " "renvoie l'objet pointé (l'objet ``i`` ci-dessus) ::" -#: library/ctypes.rst:722 +#: library/ctypes.rst:721 msgid "" "Note that :mod:`ctypes` does not have OOR (original object return), it " "constructs a new, equivalent object each time you retrieve an attribute::" @@ -980,7 +979,7 @@ msgstr "" "Attention, :mod:`ctypes` ne fait pas de ROI (retour de l'objet initial). Il " "crée un nouvel objet à chaque fois qu'on accède à un attribut ::" -#: library/ctypes.rst:731 +#: library/ctypes.rst:730 msgid "" "Assigning another :class:`c_int` instance to the pointer's contents " "attribute would cause the pointer to point to the memory location where this " @@ -990,15 +989,15 @@ msgstr "" "pointeur fait pointer le pointeur vers l'adresse mémoire de cette nouvelle " "instance ::" -#: library/ctypes.rst:743 +#: library/ctypes.rst:742 msgid "Pointer instances can also be indexed with integers::" msgstr "Il est possible d'indexer les pointeurs par des entiers ::" -#: library/ctypes.rst:749 +#: library/ctypes.rst:748 msgid "Assigning to an integer index changes the pointed to value::" msgstr "Affecter à travers un indice change la valeur pointée ::" -#: library/ctypes.rst:758 +#: library/ctypes.rst:757 msgid "" "It is also possible to use indexes different from 0, but you must know what " "you're doing, just as in C: You can access or change arbitrary memory " @@ -1012,7 +1011,7 @@ msgstr "" "renvoyé par une fonction C, pointeur que vous *savez* pointer vers un " "tableau et non sur un seul élément." -#: library/ctypes.rst:764 +#: library/ctypes.rst:763 msgid "" "Behind the scenes, the :func:`pointer` function does more than simply create " "pointer instances, it has to create pointer *types* first. This is done with " @@ -1024,7 +1023,7 @@ msgstr "" "sur… ». Cela s'effectue avec la fonction :func:`POINTER`, qui prend en " "paramètre n'importe quel type :mod:`ctypes` et renvoie un nouveau type ::" -#: library/ctypes.rst:780 +#: library/ctypes.rst:779 msgid "" "Calling the pointer type without an argument creates a ``NULL`` pointer. " "``NULL`` pointers have a ``False`` boolean value::" @@ -1032,7 +1031,7 @@ msgstr "" "Appeler le pointeur sur type sans arguments crée un pointeur ``NULL``. Les " "pointeurs ``NULL`` s'évaluent à ``False`` ::" -#: library/ctypes.rst:788 +#: library/ctypes.rst:787 msgid "" ":mod:`ctypes` checks for ``NULL`` when dereferencing pointers (but " "dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::" @@ -1041,11 +1040,11 @@ msgstr "" "déréférence un (mais déréférencer des pointeurs non ``NULL`` invalides fait " "planter Python) ::" -#: library/ctypes.rst:807 +#: library/ctypes.rst:806 msgid "Type conversions" msgstr "Conversions de type" -#: library/ctypes.rst:809 +#: library/ctypes.rst:808 msgid "" "Usually, ctypes does strict type checking. This means, if you have " "``POINTER(c_int)`` in the :attr:`argtypes` list of a function or as the type " @@ -1064,7 +1063,7 @@ msgstr "" "place de pointeurs, s'ils sont compatibles. Dans le cas de " "``POINTER(c_int)``, *ctypes* accepte des tableaux de *c_int* ::" -#: library/ctypes.rst:830 +#: library/ctypes.rst:829 msgid "" "In addition, if a function argument is explicitly declared to be a pointer " "type (such as ``POINTER(c_int)``) in :attr:`argtypes`, an object of the " @@ -1077,13 +1076,13 @@ msgstr "" "*ctypes* appelle alors automatiquement la fonction de conversion :func:" "`byref`." -#: library/ctypes.rst:835 +#: library/ctypes.rst:834 msgid "To set a POINTER type field to ``NULL``, you can assign ``None``::" msgstr "" "Pour mettre un champ de type *POINTER* à ``NULL``, il faut lui affecter " "``None`` ::" -#: library/ctypes.rst:842 +#: library/ctypes.rst:841 msgid "" "Sometimes you have instances of incompatible types. In C, you can cast one " "type into another type. :mod:`ctypes` provides a :func:`cast` function " @@ -1098,11 +1097,11 @@ msgstr "" "`c_int` comme valeur pour le champ ``values``, mais pas des instances " "d'autres types ::" -#: library/ctypes.rst:854 +#: library/ctypes.rst:853 msgid "For these cases, the :func:`cast` function is handy." msgstr "C'est là que la fonction :func:`cast` intervient." -#: library/ctypes.rst:856 +#: library/ctypes.rst:855 msgid "" "The :func:`cast` function can be used to cast a ctypes instance into a " "pointer to a different ctypes data type. :func:`cast` takes two parameters, " @@ -1117,7 +1116,7 @@ msgstr "" "du second argument, qui pointe sur le même bloc mémoire que le premier " "argument ::" -#: library/ctypes.rst:867 +#: library/ctypes.rst:866 msgid "" "So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` " "the structure::" @@ -1125,11 +1124,11 @@ msgstr "" "Ainsi, la fonction :func:`cast` permet de remplir le champ ``values`` de la " "structure ``Bar`` ::" -#: library/ctypes.rst:880 +#: library/ctypes.rst:879 msgid "Incomplete Types" msgstr "Types incomplets" -#: library/ctypes.rst:882 +#: library/ctypes.rst:881 msgid "" "*Incomplete Types* are structures, unions or arrays whose members are not " "yet specified. In C, they are specified by forward declarations, which are " @@ -1139,14 +1138,14 @@ msgstr "" "membres ne sont pas encore définis. C'est l'équivalent d'une déclaration " "avancée en C, où la définition est fournie plus tard ::" -#: library/ctypes.rst:893 +#: library/ctypes.rst:892 msgid "" "The straightforward translation into ctypes code would be this, but it does " "not work::" msgstr "" "Une traduction naïve, mais invalide, en code *ctypes* ressemblerait à ça ::" -#: library/ctypes.rst:906 +#: library/ctypes.rst:905 msgid "" "because the new ``class cell`` is not available in the class statement " "itself. In :mod:`ctypes`, we can define the ``cell`` class and set the :attr:" @@ -1157,8 +1156,7 @@ msgstr "" "`ctypes`, on définit la classe ``cell`` et on définira les :attr:`_fields_` " "plus tard, après avoir défini la classe ::" -#: library/ctypes.rst:918 -#, fuzzy +#: library/ctypes.rst:917 msgid "" "Let's try it. We create two instances of ``cell``, and let them point to " "each other, and finally follow the pointer chain a few times::" @@ -1167,11 +1165,11 @@ msgstr "" "sur l'autre et enfin nous suivons quelques maillons de la chaîne de " "pointeurs ::" -#: library/ctypes.rst:939 +#: library/ctypes.rst:938 msgid "Callback functions" msgstr "Fonctions de rappel" -#: library/ctypes.rst:941 +#: library/ctypes.rst:940 msgid "" ":mod:`ctypes` allows creating C callable function pointers from Python " "callables. These are sometimes called *callback functions*." @@ -1179,7 +1177,7 @@ msgstr "" ":mod:`ctypes` permet de créer des pointeurs de fonctions appelables par des " "appelables Python. On les appelle parfois *fonctions de rappel*." -#: library/ctypes.rst:944 +#: library/ctypes.rst:943 msgid "" "First, you must create a class for the callback function. The class knows " "the calling convention, the return type, and the number and types of " @@ -1189,7 +1187,7 @@ msgstr "" "connaît la convention d'appel, le type de retour ainsi que le nombre et le " "type de paramètres que la fonction accepte." -#: library/ctypes.rst:948 +#: library/ctypes.rst:947 msgid "" "The :func:`CFUNCTYPE` factory function creates types for callback functions " "using the ``cdecl`` calling convention. On Windows, the :func:`WINFUNCTYPE` " @@ -1201,7 +1199,7 @@ msgstr "" "`WINFUNCTYPE` qui crée un type pour les fonctions de rappel qui suivent la " "convention d'appel ``stdcall``." -#: library/ctypes.rst:953 +#: library/ctypes.rst:952 msgid "" "Both of these factory functions are called with the result type as first " "argument, and the callback functions expected argument types as the " @@ -1210,7 +1208,7 @@ msgstr "" "Le premier paramètre de ces deux fonctions est le type de retour, et les " "suivants sont les types des arguments qu'attend la fonction de rappel." -#: library/ctypes.rst:957 +#: library/ctypes.rst:956 msgid "" "I will present an example here which uses the standard C library's :c:func:" "`qsort` function, that is used to sort items with the help of a callback " @@ -1221,7 +1219,7 @@ msgstr "" "l'emploi d'une fonction de rappel. Nous allons utiliser :c:func:`qsort` pour " "ordonner un tableau d'entiers ::" -#: library/ctypes.rst:967 +#: library/ctypes.rst:966 msgid "" ":func:`qsort` must be called with a pointer to the data to sort, the number " "of items in the data array, the size of one item, and a pointer to the " @@ -1237,7 +1235,7 @@ msgstr "" "négatif si le premier élément est plus petit que le second, zéro s'ils sont " "égaux et un entier positif sinon." -#: library/ctypes.rst:973 +#: library/ctypes.rst:972 msgid "" "So our callback function receives pointers to integers, and must return an " "integer. First we create the ``type`` for the callback function::" @@ -1245,7 +1243,7 @@ msgstr "" "Ainsi notre fonction de rappel reçoit des pointeurs vers des entiers et doit " "renvoyer un entier. Créons d'abord le ``type`` pour la fonction de rappel ::" -#: library/ctypes.rst:979 +#: library/ctypes.rst:978 msgid "" "To get started, here is a simple callback that shows the values it gets " "passed::" @@ -1253,22 +1251,22 @@ msgstr "" "Pour commencer, voici une fonction de rappel simple qui affiche les valeurs " "qu'on lui passe ::" -#: library/ctypes.rst:989 +#: library/ctypes.rst:988 msgid "The result::" msgstr "Résultat ::" -#: library/ctypes.rst:999 +#: library/ctypes.rst:998 msgid "Now we can actually compare the two items and return a useful result::" msgstr "" "À présent, comparons pour de vrai les deux entiers et renvoyons un résultat " "utile ::" -#: library/ctypes.rst:1014 +#: library/ctypes.rst:1013 msgid "As we can easily check, our array is sorted now::" msgstr "" "Et comme il est facile de le voir, notre tableau est désormais classé ::" -#: library/ctypes.rst:1021 +#: library/ctypes.rst:1020 msgid "" "The function factories can be used as decorator factories, so we may as well " "write::" @@ -1276,7 +1274,7 @@ msgstr "" "Ces fonctions peuvent aussi être utilisées comme des décorateurs ; il est " "donc possible d'écrire ::" -#: library/ctypes.rst:1039 +#: library/ctypes.rst:1038 msgid "" "Make sure you keep references to :func:`CFUNCTYPE` objects as long as they " "are used from C code. :mod:`ctypes` doesn't, and if you don't, they may be " @@ -1287,7 +1285,7 @@ msgstr "" "tout seul et, si vous ne le faites pas, le ramasse-miette pourrait les " "libérer, ce qui fera planter votre programme quand un appel sera fait." -#: library/ctypes.rst:1043 +#: library/ctypes.rst:1042 msgid "" "Also, note that if the callback function is called in a thread created " "outside of Python's control (e.g. by the foreign code that calls the " @@ -1304,11 +1302,11 @@ msgstr "" "*pas* persistantes d'un appel à l'autre, même si les appels proviennent du " "même fil d'exécution C." -#: library/ctypes.rst:1053 +#: library/ctypes.rst:1052 msgid "Accessing values exported from dlls" msgstr "Accès aux variables exportées depuis une DLL" -#: library/ctypes.rst:1055 +#: library/ctypes.rst:1054 msgid "" "Some shared libraries not only export functions, they also export variables. " "An example in the Python library itself is the :c:data:`Py_OptimizeFlag`, an " @@ -1320,7 +1318,7 @@ msgstr "" "c:data:`Py_OptimizeFlag`, un entier valant 0, 1, ou 2 selon que l'option :" "option:`-O` ou :option:`-OO` soit donnée au démarrage." -#: library/ctypes.rst:1060 +#: library/ctypes.rst:1059 msgid "" ":mod:`ctypes` can access values like this with the :meth:`in_dll` class " "methods of the type. *pythonapi* is a predefined symbol giving access to " @@ -1330,7 +1328,7 @@ msgstr "" "meth:`in_dll` du type considéré. *pythonapi* est un symbole prédéfini qui " "donne accès à l'API C Python ::" -#: library/ctypes.rst:1069 +#: library/ctypes.rst:1068 msgid "" "If the interpreter would have been started with :option:`-O`, the sample " "would have printed ``c_long(1)``, or ``c_long(2)`` if :option:`-OO` would " @@ -1339,7 +1337,7 @@ msgstr "" "Si l'interpréteur est lancé avec :option:`-O`, l'exemple affiche " "``c_long(1)`` et ``c_long(2)`` avec :option:`-OO`." -#: library/ctypes.rst:1073 +#: library/ctypes.rst:1072 msgid "" "An extended example which also demonstrates the use of pointers accesses " "the :c:data:`PyImport_FrozenModules` pointer exported by Python." @@ -1347,11 +1345,11 @@ msgstr "" "Le pointeur :c:data:`PyImport_FrozenModules` exposé par Python est un autre " "exemple complet de l'utilisation de pointeurs." -#: library/ctypes.rst:1076 +#: library/ctypes.rst:1075 msgid "Quoting the docs for that value:" msgstr "Citons la documentation :" -#: library/ctypes.rst:1078 +#: library/ctypes.rst:1077 msgid "" "This pointer is initialized to point to an array of :c:type:`struct _frozen` " "records, terminated by one whose members are all ``NULL`` or zero. When a " @@ -1365,7 +1363,7 @@ msgstr "" "tableau. Du code tiers peut jouer avec pour construire dynamiquement une " "collection de module figés." -#: library/ctypes.rst:1083 +#: library/ctypes.rst:1082 msgid "" "So manipulating this pointer could even prove useful. To restrict the " "example size, we show only how this table can be read with :mod:`ctypes`::" @@ -1374,7 +1372,7 @@ msgstr "" "taille de l'exemple, nous nous bornons à montrer comment lire ce tableau " "avec :mod:`ctypes` ::" -#: library/ctypes.rst:1095 +#: library/ctypes.rst:1096 msgid "" "We have defined the :c:type:`struct _frozen` data type, so we can get the " "pointer to the table::" @@ -1382,7 +1380,7 @@ msgstr "" "Le type de donnée :c:type:`struct _frozen` ayant été défini, nous pouvons " "récupérer le pointeur vers le tableau ::" -#: library/ctypes.rst:1102 +#: library/ctypes.rst:1103 msgid "" "Since ``table`` is a ``pointer`` to the array of ``struct_frozen`` records, " "we can iterate over it, but we just have to make sure that our loop " @@ -1396,7 +1394,7 @@ msgstr "" "ou tard, il planterait probablement avec une erreur de segmentation ou " "autre, donc mieux vaut sortir de la boucle quand on lit l'entrée ``NULL`` ::" -#: library/ctypes.rst:1120 +#: library/ctypes.rst:1119 msgid "" "The fact that standard Python has a frozen module and a frozen package " "(indicated by the negative ``size`` member) is not well known, it is only " @@ -1406,11 +1404,11 @@ msgstr "" "(indiqués par la valeur négative du membre *size*) est peu connu, cela ne " "sert qu'aux tests. Essayez avec ``import __hello__`` par exemple." -#: library/ctypes.rst:1128 +#: library/ctypes.rst:1127 msgid "Surprises" msgstr "Pièges" -#: library/ctypes.rst:1130 +#: library/ctypes.rst:1129 msgid "" "There are some edges in :mod:`ctypes` where you might expect something other " "than what actually happens." @@ -1418,11 +1416,11 @@ msgstr "" "Il y a quelques cas tordus dans :mod:`ctypes` où on peut s'attendre à un " "résultat différent de la réalité." -#: library/ctypes.rst:1133 +#: library/ctypes.rst:1132 msgid "Consider the following example::" msgstr "Examinons l'exemple suivant ::" -#: library/ctypes.rst:1153 +#: library/ctypes.rst:1152 msgid "" "Hm. We certainly expected the last statement to print ``3 4 1 2``. What " "happened? Here are the steps of the ``rc.a, rc.b = rc.b, rc.a`` line above::" @@ -1431,7 +1429,7 @@ msgstr "" "``3 4 1 2``. Que s'est-il passé ? Les étapes de la ligne ``rc.a, rc.b = rc." "b, rc.a`` ci-dessus sont les suivantes ::" -#: library/ctypes.rst:1161 +#: library/ctypes.rst:1160 msgid "" "Note that ``temp0`` and ``temp1`` are objects still using the internal " "buffer of the ``rc`` object above. So executing ``rc.a = temp0`` copies the " @@ -1445,7 +1443,7 @@ msgstr "" "contenu de ``temp1``. Et donc, la dernière affectation, ``rc.b = temp1``, " "n'a pas l'effet escompté." -#: library/ctypes.rst:1167 +#: library/ctypes.rst:1166 msgid "" "Keep in mind that retrieving sub-objects from Structure, Unions, and Arrays " "doesn't *copy* the sub-object, instead it retrieves a wrapper object " @@ -1455,14 +1453,14 @@ msgstr "" "ou un *Array* ne copie *pas* le sous-objet, mais crée un objet interface qui " "accède au tampon sous-jacent de l'objet initial." -#: library/ctypes.rst:1171 +#: library/ctypes.rst:1170 msgid "" "Another example that may behave differently from what one would expect is " "this::" msgstr "" "Un autre exemple de comportement *a priori* inattendu est le suivant ::" -#: library/ctypes.rst:1183 +#: library/ctypes.rst:1182 msgid "" "Objects instantiated from :class:`c_char_p` can only have their value set to " "bytes or integers." @@ -1470,7 +1468,7 @@ msgstr "" "La valeur d'une instance de :class:`c_char_p` ne peut être initialisée " "qu'avec un octet ou un entier." -#: library/ctypes.rst:1186 +#: library/ctypes.rst:1185 msgid "" "Why is it printing ``False``? ctypes instances are objects containing a " "memory block plus some :term:`descriptor`\\s accessing the contents of the " @@ -1484,18 +1482,18 @@ msgstr "" "stocke pas l'objet même ; seuls ses ``contents`` le sont. Accéder au " "``contents`` crée un nouvel objet Python à chaque fois !" -#: library/ctypes.rst:1196 +#: library/ctypes.rst:1195 msgid "Variable-sized data types" msgstr "Types de données à taille flottante" -#: library/ctypes.rst:1198 +#: library/ctypes.rst:1197 msgid "" ":mod:`ctypes` provides some support for variable-sized arrays and structures." msgstr "" ":mod:`ctypes` assure la prise en charge des tableaux et des structures à " "taille flottante." -#: library/ctypes.rst:1200 +#: library/ctypes.rst:1199 msgid "" "The :func:`resize` function can be used to resize the memory buffer of an " "existing ctypes object. The function takes the object as first argument, " @@ -1510,7 +1508,7 @@ msgstr "" "unitaire du type considéré. Une :exc:`ValueError` est levée si c'est le " "cas ::" -#: library/ctypes.rst:1220 +#: library/ctypes.rst:1219 msgid "" "This is nice and fine, but how would one access the additional elements " "contained in this array? Since the type still only knows about 4 elements, " @@ -1520,7 +1518,7 @@ msgstr "" "tableau ? Vu que le type ne connaît que 4 éléments, on obtient une erreur si " "l'on accède aux suivants ::" -#: library/ctypes.rst:1232 +#: library/ctypes.rst:1231 msgid "" "Another way to use variable-sized data types with :mod:`ctypes` is to use " "the dynamic nature of Python, and (re-)define the data type after the " @@ -1531,15 +1529,15 @@ msgstr "" "dynamique de Python et de (re)définir le type de donnée une fois que la " "taille demandée est connue, au cas-par-cas." -#: library/ctypes.rst:1240 +#: library/ctypes.rst:1239 msgid "ctypes reference" msgstr "Référence du module" -#: library/ctypes.rst:1246 +#: library/ctypes.rst:1245 msgid "Finding shared libraries" msgstr "Recherche de bibliothèques partagées" -#: library/ctypes.rst:1248 +#: library/ctypes.rst:1247 msgid "" "When programming in a compiled language, shared libraries are accessed when " "compiling/linking a program, and when the program is run." @@ -1548,7 +1546,7 @@ msgstr "" "moment de la compilation, de l'édition de liens et pendant l'exécution du " "programme." -#: library/ctypes.rst:1251 +#: library/ctypes.rst:1250 msgid "" "The purpose of the :func:`find_library` function is to locate a library in a " "way similar to what the compiler or runtime loader does (on platforms with " @@ -1563,7 +1561,7 @@ msgstr "" "de la même façon qu'un programme qui s'exécute, et appellent directement le " "chargeur." -#: library/ctypes.rst:1257 +#: library/ctypes.rst:1256 msgid "" "The :mod:`ctypes.util` module provides a function which can help to " "determine the library to load." @@ -1571,7 +1569,7 @@ msgstr "" "Le module :mod:`ctypes.util` fournit une fonction pour déterminer quelle " "bibliothèque charger." -#: library/ctypes.rst:1265 +#: library/ctypes.rst:1264 msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like *lib*, suffix like ``.so``, ``.dylib`` or version " @@ -1584,11 +1582,11 @@ msgstr "" "de l'éditeur de lien :option:`!-l`). Si la fonction ne parvient pas à " "trouver de bibliothèque, elle renvoie ``None``." -#: library/ctypes.rst:1918 +#: library/ctypes.rst:1912 msgid "The exact functionality is system dependent." msgstr "Le mode opératoire exact dépend du système." -#: library/ctypes.rst:1272 +#: library/ctypes.rst:1271 msgid "" "On Linux, :func:`find_library` tries to run external programs (``/sbin/" "ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library file. It " @@ -1598,7 +1596,7 @@ msgstr "" "(``/sbin/ldconfig``, ``gcc``, ``objdump`` et ``ld``) pour trouver la " "bibliothèque. Elle renvoie le nom de la bibliothèque sur le disque." -#: library/ctypes.rst:1276 +#: library/ctypes.rst:1275 msgid "" "On Linux, the value of the environment variable ``LD_LIBRARY_PATH`` is used " "when searching for libraries, if a library cannot be found by any other " @@ -1607,20 +1605,20 @@ msgstr "" "Sous Linux, si les autres moyens échouent, la fonction utilise la variable " "d'environnement ``LD_LIBRARY_PATH`` pour trouver la bibliothèque." -#: library/ctypes.rst:1280 +#: library/ctypes.rst:1279 msgid "Here are some examples::" msgstr "Voici quelques exemples :" -#: library/ctypes.rst:1291 +#: library/ctypes.rst:1290 msgid "" -"On OS X, :func:`find_library` tries several predefined naming schemes and " +"On macOS, :func:`find_library` tries several predefined naming schemes and " "paths to locate the library, and returns a full pathname if successful::" msgstr "" -"Sous OS X, :func:`find_library` regarde dans des chemins et conventions de " +"Sous macOS, :func:`find_library` regarde dans des chemins et conventions de " "chemins prédéfinies pour trouver la bibliothèque et en renvoie le chemin " "complet si elle la trouve :" -#: library/ctypes.rst:1305 +#: library/ctypes.rst:1304 msgid "" "On Windows, :func:`find_library` searches along the system search path, and " "returns the full pathname, but since there is no predefined naming scheme a " @@ -1631,7 +1629,7 @@ msgstr "" "de convention de nommage, des appels comme ``find_library(\"c\")`` échouent " "et renvoient ``None``." -#: library/ctypes.rst:1309 +#: library/ctypes.rst:1308 msgid "" "If wrapping a shared library with :mod:`ctypes`, it *may* be better to " "determine the shared library name at development time, and hardcode that " @@ -1644,11 +1642,11 @@ msgstr "" "plutôt que d'utiliser :func:`find_library` pour la trouver lors de " "l'exécution." -#: library/ctypes.rst:1317 +#: library/ctypes.rst:1316 msgid "Loading shared libraries" msgstr "Chargement des bibliothèques partagées" -#: library/ctypes.rst:1319 +#: library/ctypes.rst:1318 msgid "" "There are several ways to load shared libraries into the Python process. " "One way is to instantiate one of the following classes:" @@ -1657,7 +1655,7 @@ msgstr "" "processus Python. L'un d'entre eux consiste à instancier une des classes " "suivantes :" -#: library/ctypes.rst:1325 +#: library/ctypes.rst:1324 msgid "" "Instances of this class represent loaded shared libraries. Functions in " "these libraries use the standard C calling convention, and are assumed to " @@ -1667,7 +1665,7 @@ msgstr "" "chargée. Les fonctions de cette bibliothèque utilisent la convention d'appel " "C standard et doivent renvoyer un :c:type:`int`." -#: library/ctypes.rst:1329 +#: library/ctypes.rst:1328 msgid "" "On Windows creating a :class:`CDLL` instance may fail even if the DLL name " "exists. When a dependent DLL of the loaded DLL is not found, a :exc:" @@ -1678,14 +1676,24 @@ msgid "" "which DLL is not found, you need to find the list of dependent DLLs and " "determine which one is not found using Windows debugging and tracing tools." msgstr "" +"En Windows, créer une instance de :class:`CDLL` peut échouer, même si une " +"DLL du bon nom existe. Quand une des dépendances de la DLL à charger ne peut " +"pas être trouvée, une :exc:`OSError` est levée avec le message *\"[WinError " +"126] The specified module could not be found\".* Ce message d'erreur ne " +"contient pas le nom de la DLL manquante car l'API Windows ne fournit pas " +"cette information. Cela rend l'erreur délicate à analyser ; pour la " +"résoudre, il faut lister toutes les dépendances de la DLL et trouver celle " +"qui manque en utilisant des outils de débogage et de traçage Windows." -#: library/ctypes.rst:1341 +#: library/ctypes.rst:1340 msgid "" "`Microsoft DUMPBIN tool `_ -- A tool to find DLL dependents." msgstr "" +"`DUMPBIN `_ — un " +"utilitaire Microsoft pour lister les dépendances d'une DLL." -#: library/ctypes.rst:1347 +#: library/ctypes.rst:1346 msgid "" "Windows only: Instances of this class represent loaded shared libraries, " "functions in these libraries use the ``stdcall`` calling convention, and are " @@ -1702,11 +1710,11 @@ msgstr "" "s'il a réussi, ainsi qu'un code d'erreur supplémentaire. Si la valeur de " "retour signale un échec, une :class:`OSError` est levée automatiquement." -#: library/ctypes.rst:1354 +#: library/ctypes.rst:1353 msgid ":exc:`WindowsError` used to be raised." msgstr ":exc:`WindowsError` était levée auparavant." -#: library/ctypes.rst:1360 +#: library/ctypes.rst:1359 msgid "" "Windows only: Instances of this class represent loaded shared libraries, " "functions in these libraries use the ``stdcall`` calling convention, and are " @@ -1717,17 +1725,7 @@ msgstr "" "utilisent la convention d'appel *stdcall* et doivent renvoyer par défaut un :" "c:type:`int`." -#: library/ctypes.rst:1364 -msgid "" -"On Windows CE only the standard calling convention is used, for convenience " -"the :class:`WinDLL` and :class:`OleDLL` use the standard calling convention " -"on this platform." -msgstr "" -"Sous Windows CE, seule la convention d'appel standard est utilisée. Pour des " -"raisons pratiques, :class:`WinDLL` et :class:`OleDLL` utilisent la " -"convention d'appel standard sur cette plate-forme." - -#: library/ctypes.rst:1368 +#: library/ctypes.rst:1363 msgid "" "The Python :term:`global interpreter lock` is released before calling any " "function exported by these libraries, and reacquired afterwards." @@ -1736,7 +1734,7 @@ msgstr "" "est relâché avant chaque appel d'une fonction exposée par ces bibliothèques " "et ré-activé après." -#: library/ctypes.rst:1374 +#: library/ctypes.rst:1369 msgid "" "Instances of this class behave like :class:`CDLL` instances, except that the " "Python GIL is *not* released during the function call, and after the " @@ -1748,12 +1746,12 @@ msgstr "" "drapeau d'erreur Python est vérifié. Si celui-ci est activé, une exception " "Python est levée." -#: library/ctypes.rst:1379 +#: library/ctypes.rst:1374 msgid "Thus, this is only useful to call Python C api functions directly." msgstr "" "Donc, cette classe ne sert qu'à appeler les fonctions de l'API C de Python." -#: library/ctypes.rst:1381 +#: library/ctypes.rst:1376 msgid "" "All these classes can be instantiated by calling them with at least one " "argument, the pathname of the shared library. If you have an existing " @@ -1769,7 +1767,7 @@ msgstr "" "forme sous-jacente permettent de charger la bibliothèque dans le processus, " "et d'en obtenir un lien." -#: library/ctypes.rst:1388 +#: library/ctypes.rst:1383 msgid "" "The *mode* parameter can be used to specify how the library is loaded. For " "details, consult the :manpage:`dlopen(3)` manpage. On Windows, *mode* is " @@ -1781,7 +1779,7 @@ msgstr "" "manuel. En Windows, *mode* est ignoré. Sur les systèmes POSIX, RTLD_NOW y " "est toujours ajouté. Ceci n'est pas configurable." -#: library/ctypes.rst:1393 +#: library/ctypes.rst:1388 msgid "" "The *use_errno* parameter, when set to true, enables a ctypes mechanism that " "allows accessing the system :data:`errno` error number in a safe way. :mod:" @@ -1798,7 +1796,7 @@ msgstr "" "la fonction est échangée avec la copie privée de *ctypes*. La même chose se " "produit juste après l'appel de la fonction." -#: library/ctypes.rst:1400 +#: library/ctypes.rst:1395 msgid "" "The function :func:`ctypes.get_errno` returns the value of the ctypes " "private copy, and the function :func:`ctypes.set_errno` changes the ctypes " @@ -1808,7 +1806,7 @@ msgstr "" "*ctypes*. La fonction :func:`ctypes.set_errno` affecte une nouvelle valeur à " "la copie privée et renvoie l'ancienne valeur." -#: library/ctypes.rst:1404 +#: library/ctypes.rst:1399 msgid "" "The *use_last_error* parameter, when set to true, enables the same mechanism " "for the Windows error code which is managed by the :func:`GetLastError` and :" @@ -1822,7 +1820,7 @@ msgstr "" "get_last_error` et :func:`ctypes.set_last_error` servent à obtenir et " "modifier la copie privée *ctypes* de ce code d'erreur." -#: library/ctypes.rst:1410 +#: library/ctypes.rst:1405 msgid "" "The *winmode* parameter is used on Windows to specify how the library is " "loaded (since *mode* is ignored). It takes any value that is valid for the " @@ -1839,11 +1837,11 @@ msgstr "" "le chemin complet à la DLL reste le moyen le plus sûr de s'assurer que la " "bonne bibliothèque et les bonnes dépendances sont chargées." -#: library/ctypes.rst:1417 +#: library/ctypes.rst:1412 msgid "Added *winmode* parameter." msgstr "Ajout du paramètre *winmode*." -#: library/ctypes.rst:1424 +#: library/ctypes.rst:1419 msgid "" "Flag to use as *mode* parameter. On platforms where this flag is not " "available, it is defined as the integer zero." @@ -1851,7 +1849,7 @@ msgstr "" "Valeur possible pour le paramètre *mode*. Vaut zéro sur les plates-formes où " "ce drapeau n'est pas disponible." -#: library/ctypes.rst:1431 +#: library/ctypes.rst:1426 msgid "" "Flag to use as *mode* parameter. On platforms where this is not available, " "it is the same as *RTLD_GLOBAL*." @@ -1859,7 +1857,7 @@ msgstr "" "Valeur possible pour le paramètre *mode*. Vaut *RTLD_GLOBAL* sur les plates-" "formes où ce drapeau n'est pas disponible." -#: library/ctypes.rst:1438 +#: library/ctypes.rst:1433 msgid "" "The default mode which is used to load shared libraries. On OSX 10.3, this " "is *RTLD_GLOBAL*, otherwise it is the same as *RTLD_LOCAL*." @@ -1868,7 +1866,7 @@ msgstr "" "*RTLD_GLOBAL* sur OSX 10.3 et *RTLD_LOCAL* sur les autres systèmes " "d'exploitation." -#: library/ctypes.rst:1441 +#: library/ctypes.rst:1436 msgid "" "Instances of these classes have no public methods. Functions exported by " "the shared library can be accessed as attributes or by index. Please note " @@ -1882,7 +1880,7 @@ msgstr "" "accès consécutifs renvoient à chaque fois le même objet. Accéder à une " "fonction par indice renvoie cependant chaque fois un nouvel objet :" -#: library/ctypes.rst:1454 +#: library/ctypes.rst:1449 msgid "" "The following public attributes are available, their name starts with an " "underscore to not clash with exported function names:" @@ -1890,15 +1888,15 @@ msgstr "" "Les attributs publics suivants sont disponibles, leur nom commence par un " "tiret bas pour éviter les conflits avec les noms des fonctions exportées :" -#: library/ctypes.rst:1460 +#: library/ctypes.rst:1455 msgid "The system handle used to access the library." -msgstr "" +msgstr "Le lien système d'accès à la bibliothèque." -#: library/ctypes.rst:1465 +#: library/ctypes.rst:1460 msgid "The name of the library passed in the constructor." msgstr "Nom de la bibliothèque donné au constructeur." -#: library/ctypes.rst:1467 +#: library/ctypes.rst:1462 msgid "" "Shared libraries can also be loaded by using one of the prefabricated " "objects, which are instances of the :class:`LibraryLoader` class, either by " @@ -1910,7 +1908,7 @@ msgstr "" "meth:`LoadLibrary`, soit en récupérant la bibliothèque comme attribut de " "l'instance du chargeur." -#: library/ctypes.rst:1475 +#: library/ctypes.rst:1470 msgid "" "Class which loads shared libraries. *dlltype* should be one of the :class:" "`CDLL`, :class:`PyDLL`, :class:`WinDLL`, or :class:`OleDLL` types." @@ -1918,7 +1916,7 @@ msgstr "" "Classe pour charger une bibliothèque partagée. *dlltype* doit être de type :" "class:`CDLL`, :class:`PyDLL`, :class:`WinDLL` ou :class:`OleDLL`." -#: library/ctypes.rst:1478 +#: library/ctypes.rst:1473 msgid "" ":meth:`__getattr__` has special behavior: It allows loading a shared library " "by accessing it as attribute of a library loader instance. The result is " @@ -1929,7 +1927,7 @@ msgstr "" "en cache, donc des accès consécutifs renvoient la même bibliothèque à chaque " "fois." -#: library/ctypes.rst:1484 +#: library/ctypes.rst:1479 msgid "" "Load a shared library into the process and return it. This method always " "returns a new instance of the library." @@ -1937,33 +1935,33 @@ msgstr "" "Charge une bibliothèque partagée dans le processus et la renvoie. Cette " "méthode renvoie toujours une nouvelle instance de la bibliothèque." -#: library/ctypes.rst:1488 +#: library/ctypes.rst:1483 msgid "These prefabricated library loaders are available:" msgstr "Plusieurs chargeurs sont fournis :" -#: library/ctypes.rst:1493 +#: library/ctypes.rst:1488 msgid "Creates :class:`CDLL` instances." msgstr "Pour créer des instances de :class:`CDLL`." -#: library/ctypes.rst:1499 +#: library/ctypes.rst:1494 msgid "Windows only: Creates :class:`WinDLL` instances." msgstr "Pour créer des instances de :class:`WinDLL` (uniquement en Windows)." -#: library/ctypes.rst:1505 +#: library/ctypes.rst:1500 msgid "Windows only: Creates :class:`OleDLL` instances." msgstr "Pour créer des instances de :class:`OleDLL` (uniquement en Windows)." -#: library/ctypes.rst:1511 +#: library/ctypes.rst:1506 msgid "Creates :class:`PyDLL` instances." msgstr "Pour créer des instances de :class:`PyDLL`." -#: library/ctypes.rst:1514 +#: library/ctypes.rst:1509 msgid "" "For accessing the C Python api directly, a ready-to-use Python shared " "library object is available:" msgstr "Il existe un moyen rapide d'accéder directement à l'API C Python :" -#: library/ctypes.rst:1520 +#: library/ctypes.rst:1515 msgid "" "An instance of :class:`PyDLL` that exposes Python C API functions as " "attributes. Note that all these functions are assumed to return C :c:type:" @@ -1976,17 +1974,15 @@ msgstr "" "donc définir vous-même le bon attribut :attr:`restype` pour pouvoir les " "utiliser." -#: library/ctypes.rst:1525 -#, fuzzy +#: library/ctypes.rst:1520 msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlopen`` with argument " "``name``." msgstr "" -"Charger une bibliothèque à l'aide d'un de ces objets avec en argument " -"``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" -"`évènement d'audit ` ``ctypes.dlopen``." +"Lève un :ref:`évènement d'audit ` ``ctypes.dlopen``, avec en " +"argument ``name``." -#: library/ctypes.rst:1527 +#: library/ctypes.rst:1522 msgid "" "Loading a library through any of these objects raises an :ref:`auditing " "event ` ``ctypes.dlopen`` with string argument ``name``, the name " @@ -1996,7 +1992,7 @@ msgstr "" "``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" "`évènement d'audit ` ``ctypes.dlopen``." -#: library/ctypes.rst:1531 +#: library/ctypes.rst:1526 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym`` with arguments " @@ -2006,7 +2002,7 @@ msgstr "" "``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" "`évènement d'audit ` ``ctypes.dlopen``." -#: library/ctypes.rst:1533 +#: library/ctypes.rst:1528 msgid "" "Accessing a function on a loaded library raises an auditing event ``ctypes." "dlsym`` with arguments ``library`` (the library object) and ``name`` (the " @@ -2016,7 +2012,7 @@ msgstr "" "dlsym`` avec ``library`` (l'objet bibliothèque) et ``name`` (le nom du " "symbole — une chaîne de caractères ou un entier) comme arguments." -#: library/ctypes.rst:1537 +#: library/ctypes.rst:1532 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym/handle`` with " @@ -2026,7 +2022,7 @@ msgstr "" "``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" "`évènement d'audit ` ``ctypes.dlopen``." -#: library/ctypes.rst:1539 +#: library/ctypes.rst:1534 msgid "" "In cases when only the library handle is available rather than the object, " "accessing a function raises an auditing event ``ctypes.dlsym/handle`` with " @@ -2036,11 +2032,11 @@ msgstr "" "à une fonction lève l'évènement d'audit ``ctypes.dlsym/handle`` avec " "``handle`` (le lien vers la bibliothèque) et ``name`` comme arguments." -#: library/ctypes.rst:1546 +#: library/ctypes.rst:1541 msgid "Foreign functions" msgstr "Fonctions externes" -#: library/ctypes.rst:1548 +#: library/ctypes.rst:1543 msgid "" "As explained in the previous section, foreign functions can be accessed as " "attributes of loaded shared libraries. The function objects created in this " @@ -2055,11 +2051,11 @@ msgstr "" "renvoie le type par défaut du chargeur de la bibliothèque. Ce sont des " "instances de la classe privée :" -#: library/ctypes.rst:1557 +#: library/ctypes.rst:1552 msgid "Base class for C callable foreign functions." msgstr "Classe de base pour les fonctions externes C." -#: library/ctypes.rst:1559 +#: library/ctypes.rst:1554 msgid "" "Instances of foreign functions are also C compatible data types; they " "represent C function pointers." @@ -2067,7 +2063,7 @@ msgstr "" "Une instance de fonction externe est également un type de donnée compatible " "avec le C ; elle représente un pointeur vers une fonction." -#: library/ctypes.rst:1562 +#: library/ctypes.rst:1557 msgid "" "This behavior can be customized by assigning to special attributes of the " "foreign function object." @@ -2075,7 +2071,7 @@ msgstr "" "Son comportement peut-être personnalisé en réaffectant les attributs " "spécifiques de l'objet représentant la fonction externe." -#: library/ctypes.rst:1567 +#: library/ctypes.rst:1562 msgid "" "Assign a ctypes type to specify the result type of the foreign function. Use " "``None`` for :c:type:`void`, a function not returning anything." @@ -2084,7 +2080,7 @@ msgstr "" "*ctypes*. Dans le cas où la fonction ne renvoie rien (:c:type:`void`), " "utilisez ``None``." -#: library/ctypes.rst:1570 +#: library/ctypes.rst:1565 msgid "" "It is possible to assign a callable Python object that is not a ctypes type, " "in this case the function is assumed to return a C :c:type:`int`, and the " @@ -2102,7 +2098,7 @@ msgstr "" "affecter un type *ctypes* à :attr:`restype` et à affecter un appelable à " "l'attribut :attr:`errcheck`." -#: library/ctypes.rst:1579 +#: library/ctypes.rst:1574 msgid "" "Assign a tuple of ctypes types to specify the argument types that the " "function accepts. Functions using the ``stdcall`` calling convention can " @@ -2116,7 +2112,7 @@ msgstr "" "la taille du *n*-uplet mais les fonctions qui utilisent la convention " "d'appel C acceptent aussi des arguments additionnels non-définis." -#: library/ctypes.rst:1585 +#: library/ctypes.rst:1580 msgid "" "When a foreign function is called, each actual argument is passed to the :" "meth:`from_param` class method of the items in the :attr:`argtypes` tuple, " @@ -2133,7 +2129,7 @@ msgstr "" "passée en argument en un objet chaîne d'octets selon les règles de " "conversion *ctypes*." -#: library/ctypes.rst:1592 +#: library/ctypes.rst:1587 msgid "" "New: It is now possible to put items in argtypes which are not ctypes types, " "but each item must have a :meth:`from_param` method which returns a value " @@ -2147,7 +2143,7 @@ msgstr "" "de créer des adaptateurs qui convertissent des objets arbitraires en des " "paramètres de fonction." -#: library/ctypes.rst:1599 +#: library/ctypes.rst:1594 msgid "" "Assign a Python function or another callable to this attribute. The callable " "will be called with three or more arguments:" @@ -2155,7 +2151,7 @@ msgstr "" "Définit une fonction Python ou tout autre appelable qui sera appelé avec " "trois arguments ou plus :" -#: library/ctypes.rst:1606 +#: library/ctypes.rst:1601 msgid "" "*result* is what the foreign function returns, as specified by the :attr:" "`restype` attribute." @@ -2163,7 +2159,7 @@ msgstr "" "*result* est la valeur de retour de la fonction externe, comme défini par " "l'attribut :attr:`restype`." -#: library/ctypes.rst:1609 +#: library/ctypes.rst:1604 msgid "" "*func* is the foreign function object itself, this allows reusing the same " "callable object to check or post process the results of several functions." @@ -2173,7 +2169,7 @@ msgstr "" "plusieurs fonctions ou de faire des actions supplémentaires après leur " "exécution." -#: library/ctypes.rst:1613 +#: library/ctypes.rst:1608 msgid "" "*arguments* is a tuple containing the parameters originally passed to the " "function call, this allows specializing the behavior on the arguments used." @@ -2182,7 +2178,7 @@ msgstr "" "la fonction, ceci permet de spécialiser le comportement des arguments " "utilisés." -#: library/ctypes.rst:1617 +#: library/ctypes.rst:1612 msgid "" "The object that this function returns will be returned from the foreign " "function call, but it can also check the result value and raise an exception " @@ -2192,7 +2188,7 @@ msgstr "" "fonction externe, mais il peut aussi vérifier la valeur du résultat et lever " "une exception si l'appel a échoué." -#: library/ctypes.rst:1624 +#: library/ctypes.rst:1619 msgid "" "This exception is raised when a foreign function call cannot convert one of " "the passed arguments." @@ -2200,13 +2196,13 @@ msgstr "" "Exception levée quand un appel à la fonction externe ne peut pas convertir " "un des arguments qu'elle a reçus." -#: library/ctypes.rst:1628 +#: library/ctypes.rst:1623 msgid "" "Raises an :ref:`auditing event ` ``ctypes.seh_exception`` with " "argument ``code``." msgstr "" -#: library/ctypes.rst:1630 +#: library/ctypes.rst:1625 msgid "" "On Windows, when a foreign function call raises a system exception (for " "example, due to an access violation), it will be captured and replaced with " @@ -2221,7 +2217,7 @@ msgstr "" "permet à un point d'entrée (*hook* en anglais) d'audit de remplacer " "l'exception par une des siennes." -#: library/ctypes.rst:1636 +#: library/ctypes.rst:1631 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.call_function`` with " @@ -2231,7 +2227,7 @@ msgstr "" "évènements d'audit ``ctypes.call_function`` avec ``function pointer`` et " "``arguments`` comme arguments." -#: library/ctypes.rst:1638 +#: library/ctypes.rst:1633 msgid "" "Some ways to invoke foreign function calls may raise an auditing event " "``ctypes.call_function`` with arguments ``function pointer`` and " @@ -2241,11 +2237,11 @@ msgstr "" "évènements d'audit ``ctypes.call_function`` avec ``function pointer`` et " "``arguments`` comme arguments." -#: library/ctypes.rst:1644 +#: library/ctypes.rst:1639 msgid "Function prototypes" msgstr "Prototypes de fonction" -#: library/ctypes.rst:1646 +#: library/ctypes.rst:1641 msgid "" "Foreign functions can also be created by instantiating function prototypes. " "Function prototypes are similar to function prototypes in C; they describe a " @@ -2255,8 +2251,17 @@ msgid "" "decorator factories, and as such, be applied to functions through the " "``@wrapper`` syntax. See :ref:`ctypes-callback-functions` for examples." msgstr "" +"Il est aussi possible de créer des fonctions externes en instanciant des " +"prototypes de fonction. Les prototypes de fonction ressemblent beaucoup aux " +"prototypes de fonctions en C ; ils décrivent une fonction (type de retour, " +"type des arguments, convention d'appel) sans préciser son implémentation. " +"Les fabriques de fonctions prennent en entrée le type de retour et le type " +"des arguments de la fonction, et peuvent être utilisées comme des " +"décorateurs-fabrique et ainsi s'appliquer à des fonctions avec la syntaxe " +"``@décorateur``. Ceci est illustré dans la section :ref:`ctypes-callback-" +"functions`." -#: library/ctypes.rst:1657 +#: library/ctypes.rst:1652 msgid "" "The returned function prototype creates functions that use the standard C " "calling convention. The function will release the GIL during the call. If " @@ -2264,150 +2269,206 @@ msgid "" "`errno` variable is exchanged with the real :data:`errno` value before and " "after the call; *use_last_error* does the same for the Windows error code." msgstr "" +"Renvoie un prototype de fonction qui crée des fonctions qui suivent la " +"convention d'appel standard C. Les fonctions libèreront le GIL lors de leur " +"exécution. Si *use_errno* est vrai, la copie privée *ctypes* de la variable " +"système :data:`errno` est échangée avec la vraie valeur de :data:`errno` " +"avant et après l'appel ; *use_last_error* a le même effet sous Windows." -#: library/ctypes.rst:1667 +#: library/ctypes.rst:1662 +#, fuzzy msgid "" "Windows only: The returned function prototype creates functions that use the " -"``stdcall`` calling convention, except on Windows CE where :func:" -"`WINFUNCTYPE` is the same as :func:`CFUNCTYPE`. The function will release " -"the GIL during the call. *use_errno* and *use_last_error* have the same " -"meaning as above." +"``stdcall`` calling convention. The function will release the GIL during " +"the call. *use_errno* and *use_last_error* have the same meaning as above." msgstr "" +"En Windows seulement : renvoie un prototype de fonction qui crée des " +"fonctions qui suivent la convention d'appel standard ``stdcall``, sauf sous " +"Windows CE où :func:`WINFUNCTYPE` équivaut à :func:`CFUNCTYPE`. Les " +"fonctions libèreront le GIL lors de leur exécution. *use_errno* et " +"*use_last_error* ont la même signification que ci-dessus." -#: library/ctypes.rst:1676 +#: library/ctypes.rst:1670 msgid "" "The returned function prototype creates functions that use the Python " "calling convention. The function will *not* release the GIL during the call." msgstr "" +"Renvoie un prototype de fonction qui crée des fonctions qui suivent la " +"convention d'appel Python. Les fonctions ne libèreront *pas* le GIL lors de " +"leur exécution." -#: library/ctypes.rst:1679 +#: library/ctypes.rst:1673 msgid "" "Function prototypes created by these factory functions can be instantiated " "in different ways, depending on the type and number of the parameters in the " "call:" msgstr "" +"Il y a plusieurs façons d'instancier les prototypes de fonction créés par " +"ces fabriques, selon le type et le nombre de paramètres de l'appel :" -#: library/ctypes.rst:1687 +#: library/ctypes.rst:1681 msgid "" "Returns a foreign function at the specified address which must be an integer." msgstr "" +"Renvoie une fonction externe sur l'adresse donnée sous la forme d'un entier." -#: library/ctypes.rst:1694 +#: library/ctypes.rst:1688 msgid "" "Create a C callable function (a callback function) from a Python *callable*." msgstr "" +"Crée une fonction appelable depuis du code C (une fonction de rappel) d'un " +"appelable Python donné en paramètre." -#: library/ctypes.rst:1701 +#: library/ctypes.rst:1695 msgid "" "Returns a foreign function exported by a shared library. *func_spec* must be " "a 2-tuple ``(name_or_ordinal, library)``. The first item is the name of the " "exported function as string, or the ordinal of the exported function as " "small integer. The second item is the shared library instance." msgstr "" +"Renvoie une fonction externe exposée par une bibliothèque partagée. " +"*func_spec* est un couple ``(nom_ou_indice, bibliothèque)``. Le premier " +"élément est le nom de la fonction à passer comme une chaîne ou bien son " +"indice (dans la table des symboles) à passer comme un entier. Le second " +"élément est l'instance de la bibliothèque partagée." -#: library/ctypes.rst:1711 +#: library/ctypes.rst:1705 msgid "" "Returns a foreign function that will call a COM method. *vtbl_index* is the " "index into the virtual function table, a small non-negative integer. *name* " "is name of the COM method. *iid* is an optional pointer to the interface " "identifier which is used in extended error reporting." msgstr "" +"Renvoie une fonction qui appelle une méthode COM. *vtbl_index* est l'indice " +"de la fonction dans la table virtuelle, un petit entier positif. *name* est " +"le nom de la méthode COM. *iid* est un pointeur optionnel vers " +"l'identificateur de plateforme, qui est utilisé dans la remontée d'erreurs " +"étendue." -#: library/ctypes.rst:1716 +#: library/ctypes.rst:1710 msgid "" "COM methods use a special calling convention: They require a pointer to the " "COM interface as first argument, in addition to those parameters that are " "specified in the :attr:`argtypes` tuple." msgstr "" +"Les méthodes COM ont une convention d'appel particulière : elles requièrent " +"de passer un pointeur vers l'interface COM en premier argument, en sus des " +"arguments passés dans le *n*-uplet :attr:`argtypes`." -#: library/ctypes.rst:1720 +#: library/ctypes.rst:1714 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." msgstr "" +"Le paramètre optionnel *paramflags* crée une fabrique de fonction externes " +"avec des fonctionnalités supplémentaires par rapport à celles décrites ci-" +"dessus." -#: library/ctypes.rst:1723 +#: library/ctypes.rst:1717 msgid "*paramflags* must be a tuple of the same length as :attr:`argtypes`." -msgstr "" +msgstr "*paramflags* est un *n*-uplet de la même taille que :attr:`argtypes`." -#: library/ctypes.rst:1725 +#: library/ctypes.rst:1719 msgid "" "Each item in this tuple contains further information about a parameter, it " "must be a tuple containing one, two, or three items." msgstr "" +"Chaque élément de ce *n*-uplet contient des informations supplémentaires sur " +"le paramètre correspondant. Ce doit être aussi un *n*-uplet, avec un, deux " +"ou trois éléments." -#: library/ctypes.rst:1728 +#: library/ctypes.rst:1722 msgid "" "The first item is an integer containing a combination of direction flags for " "the parameter:" msgstr "" +"Le premier élément est un entier qui contient une combinaison de drapeaux " +"qui précisent le sens des paramètres (entrée ou sortie) :" -#: library/ctypes.rst:1732 +#: library/ctypes.rst:1726 msgid "1" msgstr "1" -#: library/ctypes.rst:1732 +#: library/ctypes.rst:1726 msgid "Specifies an input parameter to the function." -msgstr "" +msgstr "Paramètre d'entrée." -#: library/ctypes.rst:1735 +#: library/ctypes.rst:1729 msgid "2" msgstr "2" -#: library/ctypes.rst:1735 +#: library/ctypes.rst:1729 msgid "Output parameter. The foreign function fills in a value." -msgstr "" +msgstr "Paramètre de sortie. La fonction externe va modifier cette valeur." -#: library/ctypes.rst:1738 +#: library/ctypes.rst:1732 msgid "4" msgstr "4" -#: library/ctypes.rst:1738 +#: library/ctypes.rst:1732 msgid "Input parameter which defaults to the integer zero." -msgstr "" +msgstr "Paramètre d'entrée, valant 0 par défaut." -#: library/ctypes.rst:1740 +#: library/ctypes.rst:1734 msgid "" "The optional second item is the parameter name as string. If this is " "specified, the foreign function can be called with named parameters." msgstr "" +"Le deuxième élément (optionnel) est une chaîne de caractères représentant le " +"nom du paramètre. Si cet élément est donné, la fonction externe pourra être " +"appelée avec des paramètres nommés." -#: library/ctypes.rst:1743 +#: library/ctypes.rst:1737 msgid "The optional third item is the default value for this parameter." msgstr "" +"Le troisième élément (optionnel) est la valeur par défaut du paramètre." -#: library/ctypes.rst:1745 +#: library/ctypes.rst:1739 msgid "" "This example demonstrates how to wrap the Windows ``MessageBoxW`` function " "so that it supports default parameters and named arguments. The C " "declaration from the windows header file is this::" msgstr "" +"L'exemple suivant montre comment encapsuler la fonction Windows " +"``MessageBoxW`` afin que celle-ci prenne en charge des paramètres par défaut " +"et des arguments nommés. Sa déclaration C dans le fichier d'en-tête des " +"fenêtres est ::" -#: library/ctypes.rst:1779 +#: library/ctypes.rst:1773 msgid "Here is the wrapping with :mod:`ctypes`::" -msgstr "" +msgstr "L'encapsulation :mod:`ctypes` correspondante est alors ::" -#: library/ctypes.rst:1764 +#: library/ctypes.rst:1758 msgid "The ``MessageBox`` foreign function can now be called in these ways::" msgstr "" +"La fonction ``MessageBox`` peut désormais être appelée des manières " +"suivantes ::" -#: library/ctypes.rst:1770 +#: library/ctypes.rst:1764 msgid "" "A second example demonstrates output parameters. The win32 " "``GetWindowRect`` function retrieves the dimensions of a specified window by " "copying them into ``RECT`` structure that the caller has to supply. Here is " "the C declaration::" msgstr "" +"L'exemple qui suit traite des paramètres en sortie. La fonction win32 " +"``GetWindowRect`` donne les dimensions d'une fenêtre en les copiant dans une " +"structure ``RECT`` que l'appelant doit fournir. Sa déclaration en C est ::" -#: library/ctypes.rst:1788 +#: library/ctypes.rst:1782 msgid "" "Functions with output parameters will automatically return the output " "parameter value if there is a single one, or a tuple containing the output " "parameter values when there are more than one, so the GetWindowRect function " "now returns a RECT instance, when called." msgstr "" +"Les fonctions avec des paramètres en sortie renvoient automatiquement la " +"valeur du paramètre de sortie s'il n'y en a qu'un seul, ou un *n*-uplet avec " +"les valeurs de sortie de chaque paramètre s'il y en a plusieurs. Ici, la " +"fonction *GetWindowRect* renvoie donc une instance de *RECT* quand elle est " +"appelée." -#: library/ctypes.rst:1793 +#: library/ctypes.rst:1787 msgid "" "Output parameters can be combined with the :attr:`errcheck` protocol to do " "further output processing and error checking. The win32 ``GetWindowRect`` " @@ -2415,8 +2476,13 @@ msgid "" "function could do the error checking, and raises an exception when the api " "call failed::" msgstr "" +"Il est possible de combiner des paramètres en sortie avec le protocole :attr:" +"`errcheck` pour post-traiter les sorties et faire de la vérification " +"d'erreur. La fonction de l'API win32 ``GetWindowRect`` renvoie un ``BOOL`` " +"pour indiquer le succès ou l'échec de l'exécution, donc cette fonction peut " +"vérifier le résultat et lever une exception quand l'appel à l'API a échoué ::" -#: library/ctypes.rst:1806 +#: library/ctypes.rst:1800 msgid "" "If the :attr:`errcheck` function returns the argument tuple it receives " "unchanged, :mod:`ctypes` continues the normal processing it does on the " @@ -2424,47 +2490,53 @@ msgid "" "instead of a ``RECT`` instance, you can retrieve the fields in the function " "and return them instead, the normal processing will no longer take place::" msgstr "" +"Si la fonction :attr:`errcheck` renvoie le *n*-uplet passé en paramètre sans " +"rien y changer, :mod:`ctypes` continue l'exécution habituelle des paramètres " +"en sortie. Si on préfère renvoyer un *n*-uplet de coordonnées au lieu de " +"renvoyer une instance de ``RECT``, il faut récupérer les champs " +"correspondants et les renvoyer en retour. Dans ce cas, l'exécution " +"habituelle n'a plus lieu ::" -#: library/ctypes.rst:1825 +#: library/ctypes.rst:1819 msgid "Utility functions" msgstr "Fonctions utilitaires" -#: library/ctypes.rst:1829 +#: library/ctypes.rst:1823 msgid "" "Returns the address of the memory buffer as integer. *obj* must be an " "instance of a ctypes type." msgstr "" -#: library/ctypes.rst:1832 +#: library/ctypes.rst:1826 msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." msgstr "" -#: library/ctypes.rst:1837 +#: library/ctypes.rst:1831 msgid "" "Returns the alignment requirements of a ctypes type. *obj_or_type* must be a " "ctypes type or instance." msgstr "" -#: library/ctypes.rst:1843 +#: library/ctypes.rst:1837 msgid "" "Returns a light-weight pointer to *obj*, which must be an instance of a " "ctypes type. *offset* defaults to zero, and must be an integer that will be " "added to the internal pointer value." msgstr "" -#: library/ctypes.rst:1847 +#: library/ctypes.rst:1841 msgid "``byref(obj, offset)`` corresponds to this C code::" msgstr "" -#: library/ctypes.rst:1851 +#: library/ctypes.rst:1845 msgid "" "The returned object can only be used as a foreign function call parameter. " "It behaves similar to ``pointer(obj)``, but the construction is a lot faster." msgstr "" -#: library/ctypes.rst:1857 +#: library/ctypes.rst:1851 msgid "" "This function is similar to the cast operator in C. It returns a new " "instance of *type* which points to the same memory block as *obj*. *type* " @@ -2472,19 +2544,19 @@ msgid "" "as a pointer." msgstr "" -#: library/ctypes.rst:1865 +#: library/ctypes.rst:1859 msgid "" "This function creates a mutable character buffer. The returned object is a " "ctypes array of :class:`c_char`." msgstr "" -#: library/ctypes.rst:1868 +#: library/ctypes.rst:1862 msgid "" "*init_or_size* must be an integer which specifies the size of the array, or " "a bytes object which will be used to initialize the array items." msgstr "" -#: library/ctypes.rst:1871 +#: library/ctypes.rst:1865 msgid "" "If a bytes object is specified as first argument, the buffer is made one " "item larger than its length so that the last element in the array is a NUL " @@ -2493,25 +2565,25 @@ msgid "" "not be used." msgstr "" -#: library/ctypes.rst:1876 +#: library/ctypes.rst:1870 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: library/ctypes.rst:1881 +#: library/ctypes.rst:1875 msgid "" "This function creates a mutable unicode character buffer. The returned " "object is a ctypes array of :class:`c_wchar`." msgstr "" -#: library/ctypes.rst:1884 +#: library/ctypes.rst:1878 msgid "" "*init_or_size* must be an integer which specifies the size of the array, or " "a string which will be used to initialize the array items." msgstr "" -#: library/ctypes.rst:1887 +#: library/ctypes.rst:1881 msgid "" "If a string is specified as first argument, the buffer is made one item " "larger than the length of the string so that the last element in the array " @@ -2520,27 +2592,27 @@ msgid "" "should not be used." msgstr "" -#: library/ctypes.rst:1893 +#: library/ctypes.rst:1887 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: library/ctypes.rst:1898 +#: library/ctypes.rst:1892 msgid "" "Windows only: This function is a hook which allows implementing in-process " "COM servers with ctypes. It is called from the DllCanUnloadNow function " "that the _ctypes extension dll exports." msgstr "" -#: library/ctypes.rst:1905 +#: library/ctypes.rst:1899 msgid "" "Windows only: This function is a hook which allows implementing in-process " "COM servers with ctypes. It is called from the DllGetClassObject function " "that the ``_ctypes`` extension dll exports." msgstr "" -#: library/ctypes.rst:1913 +#: library/ctypes.rst:1907 msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like ``lib``, suffix like ``.so``, ``.dylib`` or version " @@ -2548,92 +2620,92 @@ msgid "" "If no library can be found, returns ``None``." msgstr "" -#: library/ctypes.rst:1924 +#: library/ctypes.rst:1918 msgid "" "Windows only: return the filename of the VC runtime library used by Python, " "and by the extension modules. If the name of the library cannot be " "determined, ``None`` is returned." msgstr "" -#: library/ctypes.rst:1928 +#: library/ctypes.rst:1922 msgid "" "If you need to free memory, for example, allocated by an extension module " "with a call to the ``free(void *)``, it is important that you use the " "function in the same library that allocated the memory." msgstr "" -#: library/ctypes.rst:1935 +#: library/ctypes.rst:1929 msgid "" "Windows only: Returns a textual description of the error code *code*. If no " "error code is specified, the last error code is used by calling the Windows " "api function GetLastError." msgstr "" -#: library/ctypes.rst:1942 +#: library/ctypes.rst:1936 msgid "" "Windows only: Returns the last error code set by Windows in the calling " "thread. This function calls the Windows `GetLastError()` function directly, " "it does not return the ctypes-private copy of the error code." msgstr "" -#: library/ctypes.rst:1948 +#: library/ctypes.rst:1942 msgid "" "Returns the current value of the ctypes-private copy of the system :data:" "`errno` variable in the calling thread." msgstr "" -#: library/ctypes.rst:1951 +#: library/ctypes.rst:1945 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " "arguments." msgstr "" -#: library/ctypes.rst:1955 +#: library/ctypes.rst:1949 msgid "" "Windows only: returns the current value of the ctypes-private copy of the " "system :data:`LastError` variable in the calling thread." msgstr "" -#: library/ctypes.rst:1958 +#: library/ctypes.rst:1952 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " "arguments." msgstr "" -#: library/ctypes.rst:1962 +#: library/ctypes.rst:1956 msgid "" "Same as the standard C memmove library function: copies *count* bytes from " "*src* to *dst*. *dst* and *src* must be integers or ctypes instances that " "can be converted to pointers." msgstr "" -#: library/ctypes.rst:1969 +#: library/ctypes.rst:1963 msgid "" "Same as the standard C memset library function: fills the memory block at " "address *dst* with *count* bytes of value *c*. *dst* must be an integer " "specifying an address, or a ctypes instance." msgstr "" -#: library/ctypes.rst:1976 +#: library/ctypes.rst:1970 msgid "" "This factory function creates and returns a new ctypes pointer type. Pointer " "types are cached and reused internally, so calling this function repeatedly " "is cheap. *type* must be a ctypes type." msgstr "" -#: library/ctypes.rst:1983 +#: library/ctypes.rst:1977 msgid "" "This function creates a new pointer instance, pointing to *obj*. The " "returned object is of the type ``POINTER(type(obj))``." msgstr "" -#: library/ctypes.rst:1986 +#: library/ctypes.rst:1980 msgid "" "Note: If you just want to pass a pointer to an object to a foreign function " "call, you should use ``byref(obj)`` which is much faster." msgstr "" -#: library/ctypes.rst:1992 +#: library/ctypes.rst:1986 msgid "" "This function resizes the internal memory buffer of *obj*, which must be an " "instance of a ctypes type. It is not possible to make the buffer smaller " @@ -2641,51 +2713,51 @@ msgid "" "but it is possible to enlarge the buffer." msgstr "" -#: library/ctypes.rst:2000 +#: library/ctypes.rst:1994 msgid "" "Set the current value of the ctypes-private copy of the system :data:`errno` " "variable in the calling thread to *value* and return the previous value." msgstr "" -#: library/ctypes.rst:2003 +#: library/ctypes.rst:1997 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." msgstr "" -#: library/ctypes.rst:2008 +#: library/ctypes.rst:2002 msgid "" "Windows only: set the current value of the ctypes-private copy of the " "system :data:`LastError` variable in the calling thread to *value* and " "return the previous value." msgstr "" -#: library/ctypes.rst:2012 +#: library/ctypes.rst:2006 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " "argument ``error``." msgstr "" -#: library/ctypes.rst:2017 +#: library/ctypes.rst:2011 msgid "" "Returns the size in bytes of a ctypes type or instance memory buffer. Does " "the same as the C ``sizeof`` operator." msgstr "" -#: library/ctypes.rst:2023 +#: library/ctypes.rst:2017 msgid "" "This function returns the C string starting at memory address *address* as a " "bytes object. If size is specified, it is used as size, otherwise the string " "is assumed to be zero-terminated." msgstr "" -#: library/ctypes.rst:2027 +#: library/ctypes.rst:2021 msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " "arguments ``address``, ``size``." msgstr "" -#: library/ctypes.rst:2032 +#: library/ctypes.rst:2026 msgid "" "Windows only: this function is probably the worst-named thing in ctypes. It " "creates an instance of OSError. If *code* is not specified, " @@ -2694,11 +2766,11 @@ msgid "" "error." msgstr "" -#: library/ctypes.rst:2038 +#: library/ctypes.rst:2032 msgid "An instance of :exc:`WindowsError` used to be created." msgstr "" -#: library/ctypes.rst:2044 +#: library/ctypes.rst:2038 msgid "" "This function returns the wide character string starting at memory address " "*address* as a string. If *size* is specified, it is used as the number of " @@ -2706,17 +2778,17 @@ msgid "" "terminated." msgstr "" -#: library/ctypes.rst:2049 +#: library/ctypes.rst:2043 msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " "arguments ``address``, ``size``." msgstr "" -#: library/ctypes.rst:2055 +#: library/ctypes.rst:2049 msgid "Data types" msgstr "Types de données" -#: library/ctypes.rst:2060 +#: library/ctypes.rst:2054 msgid "" "This non-public class is the common base class of all ctypes data types. " "Among other things, all ctypes type instances contain a memory block that " @@ -2726,13 +2798,13 @@ msgid "" "alive in case the memory block contains pointers." msgstr "" -#: library/ctypes.rst:2067 +#: library/ctypes.rst:2061 msgid "" "Common methods of ctypes data types, these are all class methods (to be " "exact, they are methods of the :term:`metaclass`):" msgstr "" -#: library/ctypes.rst:2072 +#: library/ctypes.rst:2066 msgid "" "This method returns a ctypes instance that shares the buffer of the *source* " "object. The *source* object must support the writeable buffer interface. " @@ -2741,13 +2813,13 @@ msgid "" "exc:`ValueError` is raised." msgstr "" -#: library/ctypes.rst:2088 +#: library/ctypes.rst:2082 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " "arguments ``pointer``, ``size``, ``offset``." msgstr "" -#: library/ctypes.rst:2082 +#: library/ctypes.rst:2076 msgid "" "This method creates a ctypes instance, copying the buffer from the *source* " "object buffer which must be readable. The optional *offset* parameter " @@ -2755,25 +2827,25 @@ msgid "" "If the source buffer is not large enough a :exc:`ValueError` is raised." msgstr "" -#: library/ctypes.rst:2092 +#: library/ctypes.rst:2086 msgid "" "This method returns a ctypes type instance using the memory specified by " "*address* which must be an integer." msgstr "" -#: library/ctypes.rst:2095 +#: library/ctypes.rst:2089 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata`` with argument " "``address``." msgstr "" -#: library/ctypes.rst:2097 +#: library/ctypes.rst:2091 msgid "" "This method, and others that indirectly call this method, raises an :ref:" "`auditing event ` ``ctypes.cdata`` with argument ``address``." msgstr "" -#: library/ctypes.rst:2103 +#: library/ctypes.rst:2097 msgid "" "This method adapts *obj* to a ctypes type. It is called with the actual " "object used in a foreign function call when the type is present in the " @@ -2781,25 +2853,25 @@ msgid "" "be used as a function call parameter." msgstr "" -#: library/ctypes.rst:2108 +#: library/ctypes.rst:2102 msgid "" "All ctypes data types have a default implementation of this classmethod that " "normally returns *obj* if that is an instance of the type. Some types " "accept other objects as well." msgstr "" -#: library/ctypes.rst:2114 +#: library/ctypes.rst:2108 msgid "" "This method returns a ctypes type instance exported by a shared library. " "*name* is the name of the symbol that exports the data, *library* is the " "loaded shared library." msgstr "" -#: library/ctypes.rst:2118 +#: library/ctypes.rst:2112 msgid "Common instance variables of ctypes data types:" msgstr "" -#: library/ctypes.rst:2122 +#: library/ctypes.rst:2116 msgid "" "Sometimes ctypes data instances do not own the memory block they contain, " "instead they share part of the memory block of a base object. The :attr:" @@ -2807,13 +2879,13 @@ msgid "" "block." msgstr "" -#: library/ctypes.rst:2129 +#: library/ctypes.rst:2123 msgid "" "This read-only variable is true when the ctypes data instance has allocated " "the memory block itself, false otherwise." msgstr "" -#: library/ctypes.rst:2134 +#: library/ctypes.rst:2128 msgid "" "This member is either ``None`` or a dictionary containing Python objects " "that need to be kept alive so that the memory block contents is kept valid. " @@ -2821,7 +2893,7 @@ msgid "" "dictionary." msgstr "" -#: library/ctypes.rst:2147 +#: library/ctypes.rst:2141 msgid "" "This non-public class is the base class of all fundamental ctypes data " "types. It is mentioned here because it contains the common attributes of the " @@ -2830,11 +2902,11 @@ msgid "" "types that are not and do not contain pointers can now be pickled." msgstr "" -#: library/ctypes.rst:2153 +#: library/ctypes.rst:2147 msgid "Instances have a single attribute:" msgstr "" -#: library/ctypes.rst:2157 +#: library/ctypes.rst:2151 msgid "" "This attribute contains the actual value of the instance. For integer and " "pointer types, it is an integer, for character types, it is a single " @@ -2842,7 +2914,7 @@ msgid "" "bytes object or string." msgstr "" -#: library/ctypes.rst:2162 +#: library/ctypes.rst:2156 msgid "" "When the ``value`` attribute is retrieved from a ctypes instance, usually a " "new object is returned each time. :mod:`ctypes` does *not* implement " @@ -2850,7 +2922,7 @@ msgid "" "true for all other ctypes object instances." msgstr "" -#: library/ctypes.rst:2168 +#: library/ctypes.rst:2162 msgid "" "Fundamental data types, when returned as foreign function call results, or, " "for example, by retrieving structure field members or array items, are " @@ -2859,7 +2931,7 @@ msgid "" "receive a Python bytes object, *not* a :class:`c_char_p` instance." msgstr "" -#: library/ctypes.rst:2176 +#: library/ctypes.rst:2170 msgid "" "Subclasses of fundamental data types do *not* inherit this behavior. So, if " "a foreign functions :attr:`restype` is a subclass of :class:`c_void_p`, you " @@ -2867,25 +2939,25 @@ msgid "" "you can get the value of the pointer by accessing the ``value`` attribute." msgstr "" -#: library/ctypes.rst:2181 +#: library/ctypes.rst:2175 msgid "These are the fundamental ctypes data types:" msgstr "" -#: library/ctypes.rst:2185 +#: library/ctypes.rst:2179 msgid "" "Represents the C :c:type:`signed char` datatype, and interprets the value as " "small integer. The constructor accepts an optional integer initializer; no " "overflow checking is done." msgstr "" -#: library/ctypes.rst:2192 +#: library/ctypes.rst:2186 msgid "" "Represents the C :c:type:`char` datatype, and interprets the value as a " "single character. The constructor accepts an optional string initializer, " "the length of the string must be exactly one character." msgstr "" -#: library/ctypes.rst:2199 +#: library/ctypes.rst:2193 msgid "" "Represents the C :c:type:`char *` datatype when it points to a zero-" "terminated string. For a general character pointer that may also point to " @@ -2893,178 +2965,178 @@ msgid "" "integer address, or a bytes object." msgstr "" -#: library/ctypes.rst:2207 +#: library/ctypes.rst:2201 msgid "" "Represents the C :c:type:`double` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: library/ctypes.rst:2213 +#: library/ctypes.rst:2207 msgid "" "Represents the C :c:type:`long double` datatype. The constructor accepts an " "optional float initializer. On platforms where ``sizeof(long double) == " "sizeof(double)`` it is an alias to :class:`c_double`." msgstr "" -#: library/ctypes.rst:2219 +#: library/ctypes.rst:2213 msgid "" "Represents the C :c:type:`float` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: library/ctypes.rst:2225 +#: library/ctypes.rst:2219 msgid "" "Represents the C :c:type:`signed int` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias to :class:`c_long`." msgstr "" -#: library/ctypes.rst:2232 +#: library/ctypes.rst:2226 msgid "" "Represents the C 8-bit :c:type:`signed int` datatype. Usually an alias for :" "class:`c_byte`." msgstr "" -#: library/ctypes.rst:2238 +#: library/ctypes.rst:2232 msgid "" "Represents the C 16-bit :c:type:`signed int` datatype. Usually an alias " "for :class:`c_short`." msgstr "" -#: library/ctypes.rst:2244 +#: library/ctypes.rst:2238 msgid "" "Represents the C 32-bit :c:type:`signed int` datatype. Usually an alias " "for :class:`c_int`." msgstr "" -#: library/ctypes.rst:2250 +#: library/ctypes.rst:2244 msgid "" "Represents the C 64-bit :c:type:`signed int` datatype. Usually an alias " "for :class:`c_longlong`." msgstr "" -#: library/ctypes.rst:2256 +#: library/ctypes.rst:2250 msgid "" "Represents the C :c:type:`signed long` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2262 +#: library/ctypes.rst:2256 msgid "" "Represents the C :c:type:`signed long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2268 +#: library/ctypes.rst:2262 msgid "" "Represents the C :c:type:`signed short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2274 +#: library/ctypes.rst:2268 msgid "Represents the C :c:type:`size_t` datatype." msgstr "" -#: library/ctypes.rst:2279 +#: library/ctypes.rst:2273 msgid "Represents the C :c:type:`ssize_t` datatype." msgstr "" -#: library/ctypes.rst:2286 +#: library/ctypes.rst:2280 msgid "" "Represents the C :c:type:`unsigned char` datatype, it interprets the value " "as small integer. The constructor accepts an optional integer initializer; " "no overflow checking is done." msgstr "" -#: library/ctypes.rst:2293 +#: library/ctypes.rst:2287 msgid "" "Represents the C :c:type:`unsigned int` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias for :class:`c_ulong`." msgstr "" -#: library/ctypes.rst:2300 +#: library/ctypes.rst:2294 msgid "" "Represents the C 8-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ubyte`." msgstr "" -#: library/ctypes.rst:2306 +#: library/ctypes.rst:2300 msgid "" "Represents the C 16-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ushort`." msgstr "" -#: library/ctypes.rst:2312 +#: library/ctypes.rst:2306 msgid "" "Represents the C 32-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_uint`." msgstr "" -#: library/ctypes.rst:2318 +#: library/ctypes.rst:2312 msgid "" "Represents the C 64-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ulonglong`." msgstr "" -#: library/ctypes.rst:2324 +#: library/ctypes.rst:2318 msgid "" "Represents the C :c:type:`unsigned long` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2330 +#: library/ctypes.rst:2324 msgid "" "Represents the C :c:type:`unsigned long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2336 +#: library/ctypes.rst:2330 msgid "" "Represents the C :c:type:`unsigned short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2342 +#: library/ctypes.rst:2336 msgid "" "Represents the C :c:type:`void *` type. The value is represented as " "integer. The constructor accepts an optional integer initializer." msgstr "" -#: library/ctypes.rst:2348 +#: library/ctypes.rst:2342 msgid "" "Represents the C :c:type:`wchar_t` datatype, and interprets the value as a " "single character unicode string. The constructor accepts an optional string " "initializer, the length of the string must be exactly one character." msgstr "" -#: library/ctypes.rst:2355 +#: library/ctypes.rst:2349 msgid "" "Represents the C :c:type:`wchar_t *` datatype, which must be a pointer to a " "zero-terminated wide character string. The constructor accepts an integer " "address, or a string." msgstr "" -#: library/ctypes.rst:2362 +#: library/ctypes.rst:2356 msgid "" "Represent the C :c:type:`bool` datatype (more accurately, :c:type:`_Bool` " "from C99). Its value can be ``True`` or ``False``, and the constructor " "accepts any object that has a truth value." msgstr "" -#: library/ctypes.rst:2369 +#: library/ctypes.rst:2363 msgid "" "Windows only: Represents a :c:type:`HRESULT` value, which contains success " "or error information for a function or method call." msgstr "" -#: library/ctypes.rst:2375 +#: library/ctypes.rst:2369 msgid "" "Represents the C :c:type:`PyObject *` datatype. Calling this without an " "argument creates a ``NULL`` :c:type:`PyObject *` pointer." msgstr "" -#: library/ctypes.rst:2378 +#: library/ctypes.rst:2372 msgid "" "The :mod:`ctypes.wintypes` module provides quite some other Windows specific " "data types, for example :c:type:`HWND`, :c:type:`WPARAM`, or :c:type:" @@ -3072,33 +3144,43 @@ msgid "" "also defined." msgstr "" -#: library/ctypes.rst:2386 +#: library/ctypes.rst:2380 msgid "Structured data types" msgstr "Types de données dérivés de Structure" -#: library/ctypes.rst:2391 +#: library/ctypes.rst:2385 msgid "Abstract base class for unions in native byte order." msgstr "" +#: library/ctypes.rst:2390 +#, fuzzy +msgid "Abstract base class for unions in *big endian* byte order." +msgstr "Classe de base abstraite pour les *arrays*." + #: library/ctypes.rst:2396 +#, fuzzy +msgid "Abstract base class for unions in *little endian* byte order." +msgstr "Classe de base abstraite pour les *arrays*." + +#: library/ctypes.rst:2402 msgid "Abstract base class for structures in *big endian* byte order." msgstr "" -#: library/ctypes.rst:2401 +#: library/ctypes.rst:2407 msgid "Abstract base class for structures in *little endian* byte order." msgstr "" -#: library/ctypes.rst:2403 +#: library/ctypes.rst:2409 msgid "" -"Structures with non-native byte order cannot contain pointer type fields, or " -"any other data types containing pointer type fields." +"Structures and unions with non-native byte order cannot contain pointer type " +"fields, or any other data types containing pointer type fields." msgstr "" -#: library/ctypes.rst:2409 +#: library/ctypes.rst:2415 msgid "Abstract base class for structures in *native* byte order." msgstr "" -#: library/ctypes.rst:2411 +#: library/ctypes.rst:2417 msgid "" "Concrete structure and union types must be created by subclassing one of " "these types, and at least define a :attr:`_fields_` class variable. :mod:" @@ -3106,34 +3188,34 @@ msgid "" "the fields by direct attribute accesses. These are the" msgstr "" -#: library/ctypes.rst:2419 +#: library/ctypes.rst:2425 msgid "" "A sequence defining the structure fields. The items must be 2-tuples or 3-" "tuples. The first item is the name of the field, the second item specifies " "the type of the field; it can be any ctypes data type." msgstr "" -#: library/ctypes.rst:2423 +#: library/ctypes.rst:2429 msgid "" "For integer type fields like :class:`c_int`, a third optional item can be " "given. It must be a small positive integer defining the bit width of the " "field." msgstr "" -#: library/ctypes.rst:2427 +#: library/ctypes.rst:2433 msgid "" "Field names must be unique within one structure or union. This is not " "checked, only one field can be accessed when names are repeated." msgstr "" -#: library/ctypes.rst:2430 +#: library/ctypes.rst:2436 msgid "" "It is possible to define the :attr:`_fields_` class variable *after* the " "class statement that defines the Structure subclass, this allows creating " "data types that directly or indirectly reference themselves::" msgstr "" -#: library/ctypes.rst:2440 +#: library/ctypes.rst:2446 msgid "" "The :attr:`_fields_` class variable must, however, be defined before the " "type is first used (an instance is created, :func:`sizeof` is called on it, " @@ -3141,28 +3223,28 @@ msgid "" "raise an AttributeError." msgstr "" -#: library/ctypes.rst:2445 +#: library/ctypes.rst:2451 msgid "" "It is possible to define sub-subclasses of structure types, they inherit the " "fields of the base class plus the :attr:`_fields_` defined in the sub-" "subclass, if any." msgstr "" -#: library/ctypes.rst:2452 +#: library/ctypes.rst:2458 msgid "" "An optional small integer that allows overriding the alignment of structure " "fields in the instance. :attr:`_pack_` must already be defined when :attr:" "`_fields_` is assigned, otherwise it will have no effect." msgstr "" -#: library/ctypes.rst:2459 +#: library/ctypes.rst:2465 msgid "" "An optional sequence that lists the names of unnamed (anonymous) fields. :" "attr:`_anonymous_` must be already defined when :attr:`_fields_` is " "assigned, otherwise it will have no effect." msgstr "" -#: library/ctypes.rst:2463 +#: library/ctypes.rst:2469 msgid "" "The fields listed in this variable must be structure or union type fields. :" "mod:`ctypes` will create descriptors in the structure type that allows " @@ -3170,11 +3252,11 @@ msgid "" "structure or union field." msgstr "" -#: library/ctypes.rst:2468 +#: library/ctypes.rst:2474 msgid "Here is an example type (Windows)::" msgstr "" -#: library/ctypes.rst:2481 +#: library/ctypes.rst:2487 msgid "" "The ``TYPEDESC`` structure describes a COM data type, the ``vt`` field " "specifies which one of the union fields is valid. Since the ``u`` field is " @@ -3184,7 +3266,7 @@ msgid "" "temporary union instance::" msgstr "" -#: library/ctypes.rst:2493 +#: library/ctypes.rst:2499 msgid "" "It is possible to define sub-subclasses of structures, they inherit the " "fields of the base class. If the subclass definition has a separate :attr:" @@ -3192,7 +3274,7 @@ msgid "" "of the base class." msgstr "" -#: library/ctypes.rst:2498 +#: library/ctypes.rst:2504 msgid "" "Structure and union constructors accept both positional and keyword " "arguments. Positional arguments are used to initialize member fields in the " @@ -3202,52 +3284,52 @@ msgid "" "names not present in :attr:`_fields_`." msgstr "" -#: library/ctypes.rst:2509 +#: library/ctypes.rst:2515 msgid "Arrays and pointers" msgstr "Tableaux et pointeurs" -#: library/ctypes.rst:2513 +#: library/ctypes.rst:2519 msgid "Abstract base class for arrays." msgstr "Classe de base abstraite pour les *arrays*." -#: library/ctypes.rst:2515 +#: library/ctypes.rst:2521 msgid "" "The recommended way to create concrete array types is by multiplying any :" -"mod:`ctypes` data type with a positive integer. Alternatively, you can " +"mod:`ctypes` data type with a non-negative integer. Alternatively, you can " "subclass this type and define :attr:`_length_` and :attr:`_type_` class " "variables. Array elements can be read and written using standard subscript " "and slice accesses; for slice reads, the resulting object is *not* itself " "an :class:`Array`." msgstr "" -#: library/ctypes.rst:2525 +#: library/ctypes.rst:2531 msgid "" "A positive integer specifying the number of elements in the array. Out-of-" "range subscripts result in an :exc:`IndexError`. Will be returned by :func:" "`len`." msgstr "" -#: library/ctypes.rst:2532 +#: library/ctypes.rst:2538 msgid "Specifies the type of each element in the array." msgstr "Spécifie le type de chaque élément de l'*array*." -#: library/ctypes.rst:2535 +#: library/ctypes.rst:2541 msgid "" "Array subclass constructors accept positional arguments, used to initialize " "the elements in order." msgstr "" -#: library/ctypes.rst:2541 +#: library/ctypes.rst:2547 msgid "Private, abstract base class for pointers." msgstr "" -#: library/ctypes.rst:2543 +#: library/ctypes.rst:2549 msgid "" "Concrete pointer types are created by calling :func:`POINTER` with the type " "that will be pointed to; this is done automatically by :func:`pointer`." msgstr "" -#: library/ctypes.rst:2547 +#: library/ctypes.rst:2553 msgid "" "If a pointer points to an array, its elements can be read and written using " "standard subscript and slice accesses. Pointer objects have no size, so :" @@ -3256,12 +3338,21 @@ msgid "" "probably crash with an access violation (if you're lucky)." msgstr "" -#: library/ctypes.rst:2557 +#: library/ctypes.rst:2563 msgid "Specifies the type pointed to." msgstr "" -#: library/ctypes.rst:2561 +#: library/ctypes.rst:2567 msgid "" "Returns the object to which to pointer points. Assigning to this attribute " "changes the pointer to point to the assigned object." msgstr "" + +#~ msgid "" +#~ "On Windows CE only the standard calling convention is used, for " +#~ "convenience the :class:`WinDLL` and :class:`OleDLL` use the standard " +#~ "calling convention on this platform." +#~ msgstr "" +#~ "Sous Windows CE, seule la convention d'appel standard est utilisée. Pour " +#~ "des raisons pratiques, :class:`WinDLL` et :class:`OleDLL` utilisent la " +#~ "convention d'appel standard sur cette plate-forme." diff --git a/library/curses.po b/library/curses.po index bc3605e1fb..e1566aa53d 100644 --- a/library/curses.po +++ b/library/curses.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2018-07-04 11:32+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -45,88 +45,75 @@ msgid "" "as a Unicode string or a byte string." msgstr "" -#: library/curses.rst:32 -msgid "" -"Since version 5.4, the ncurses library decides how to interpret non-ASCII " -"data using the ``nl_langinfo`` function. That means that you have to call :" -"func:`locale.setlocale` in the application and encode Unicode strings using " -"one of the system's available encodings. This example uses the system's " -"default encoding::" -msgstr "" - -#: library/curses.rst:42 -msgid "Then use *code* as the encoding for :meth:`str.encode` calls." -msgstr "" - -#: library/curses.rst:47 +#: library/curses.rst:33 msgid "Module :mod:`curses.ascii`" msgstr "Module :mod:`curses.ascii`" -#: library/curses.rst:47 +#: library/curses.rst:33 msgid "" "Utilities for working with ASCII characters, regardless of your locale " "settings." msgstr "" -#: library/curses.rst:50 +#: library/curses.rst:36 msgid "Module :mod:`curses.panel`" msgstr "Module :mod:`curses.panel`" -#: library/curses.rst:50 +#: library/curses.rst:36 msgid "A panel stack extension that adds depth to curses windows." msgstr "" -#: library/curses.rst:53 +#: library/curses.rst:39 msgid "Module :mod:`curses.textpad`" msgstr "Module :mod:`curses.textpad`" -#: library/curses.rst:53 +#: library/curses.rst:39 msgid "" "Editable text widget for curses supporting :program:`Emacs`\\ -like " "bindings." msgstr "" -#: library/curses.rst:57 +#: library/curses.rst:43 msgid ":ref:`curses-howto`" msgstr ":ref:`curses-howto`" -#: library/curses.rst:56 +#: library/curses.rst:42 msgid "" "Tutorial material on using curses with Python, by Andrew Kuchling and Eric " "Raymond." msgstr "" -#: library/curses.rst:59 +#: library/curses.rst:45 msgid "" "The :source:`Tools/demo/` directory in the Python source distribution " "contains some example programs using the curses bindings provided by this " "module." msgstr "" -#: library/curses.rst:66 +#: library/curses.rst:52 msgid "Functions" msgstr "Fonctions" -#: library/curses.rst:68 +#: library/curses.rst:54 msgid "The module :mod:`curses` defines the following exception:" msgstr "" -#: library/curses.rst:73 +#: library/curses.rst:59 msgid "Exception raised when a curses library function returns an error." msgstr "" -#: library/curses.rst:77 +#: library/curses.rst:63 msgid "" "Whenever *x* or *y* arguments to a function or a method are optional, they " "default to the current cursor location. Whenever *attr* is optional, it " "defaults to :const:`A_NORMAL`." msgstr "" -#: library/curses.rst:81 +#: library/curses.rst:67 msgid "The module :mod:`curses` defines the following functions:" msgstr "" -#: library/curses.rst:86 +#: library/curses.rst:72 msgid "" "Return the output speed of the terminal in bits per second. On software " "terminal emulators it will have a fixed high value. Included for historical " @@ -134,17 +121,17 @@ msgid "" "and occasionally to change interfaces depending on the line speed." msgstr "" -#: library/curses.rst:94 +#: library/curses.rst:80 msgid "Emit a short attention sound." msgstr "" -#: library/curses.rst:99 +#: library/curses.rst:85 msgid "" "Return ``True`` or ``False``, depending on whether the programmer can change " "the colors displayed by the terminal." msgstr "" -#: library/curses.rst:105 +#: library/curses.rst:91 msgid "" "Enter cbreak mode. In cbreak mode (sometimes called \"rare\" mode) normal " "tty line buffering is turned off and characters are available to be read one " @@ -154,7 +141,7 @@ msgid "" "terminal in cbreak mode." msgstr "" -#: library/curses.rst:114 +#: library/curses.rst:100 msgid "" "Return the intensity of the red, green, and blue (RGB) components in the " "color *color_number*, which must be between ``0`` and ``COLORS - 1``. " @@ -163,7 +150,7 @@ msgid "" "component)." msgstr "" -#: library/curses.rst:122 +#: library/curses.rst:108 msgid "" "Return the attribute value for displaying text in the specified color pair. " "Only the first 256 color pairs are supported. This attribute value can be " @@ -171,7 +158,7 @@ msgid "" "`A_\\*` attributes. :func:`pair_number` is the counterpart to this function." msgstr "" -#: library/curses.rst:131 +#: library/curses.rst:117 msgid "" "Set the cursor state. *visibility* can be set to ``0``, ``1``, or ``2``, " "for invisible, normal, or very visible. If the terminal supports the " @@ -180,7 +167,7 @@ msgid "" "and the \"very visible\" mode is a block cursor." msgstr "" -#: library/curses.rst:140 +#: library/curses.rst:126 msgid "" "Save the current terminal mode as the \"program\" mode, the mode when the " "running program is using curses. (Its counterpart is the \"shell\" mode, " @@ -188,7 +175,7 @@ msgid "" "`reset_prog_mode` will restore this mode." msgstr "" -#: library/curses.rst:148 +#: library/curses.rst:134 msgid "" "Save the current terminal mode as the \"shell\" mode, the mode when the " "running program is not using curses. (Its counterpart is the \"program\" " @@ -196,11 +183,11 @@ msgid "" "func:`reset_shell_mode` will restore this mode." msgstr "" -#: library/curses.rst:156 +#: library/curses.rst:142 msgid "Insert an *ms* millisecond pause in output." msgstr "" -#: library/curses.rst:161 +#: library/curses.rst:147 msgid "" "Update the physical screen. The curses library keeps two data structures, " "one representing the current physical screen contents and a virtual screen " @@ -208,7 +195,7 @@ msgid "" "the physical screen to match the virtual screen." msgstr "" -#: library/curses.rst:166 +#: library/curses.rst:152 msgid "" "The virtual screen may be updated by a :meth:`~window.noutrefresh` call " "after write operations such as :meth:`~window.addstr` have been performed on " @@ -219,24 +206,24 @@ msgid "" "func:`!doupdate`." msgstr "" -#: library/curses.rst:176 +#: library/curses.rst:162 msgid "" "Enter echo mode. In echo mode, each character input is echoed to the screen " "as it is entered." msgstr "" -#: library/curses.rst:182 +#: library/curses.rst:168 msgid "De-initialize the library, and return terminal to normal status." msgstr "" -#: library/curses.rst:187 +#: library/curses.rst:173 msgid "" "Return the user's current erase character as a one-byte bytes object. Under " "Unix operating systems this is a property of the controlling tty of the " "curses program, and is not set by the curses library itself." msgstr "" -#: library/curses.rst:194 +#: library/curses.rst:180 msgid "" "The :func:`.filter` routine, if used, must be called before :func:`initscr` " "is called. The effect is that, during those calls, :envvar:`LINES` is set " @@ -247,20 +234,20 @@ msgid "" "time line editing without touching the rest of the screen." msgstr "" -#: library/curses.rst:204 +#: library/curses.rst:190 msgid "" "Flash the screen. That is, change it to reverse-video and then change it " "back in a short interval. Some people prefer such as 'visible bell' to the " "audible attention signal produced by :func:`beep`." msgstr "" -#: library/curses.rst:211 +#: library/curses.rst:197 msgid "" "Flush all input buffers. This throws away any typeahead that has been " "typed by the user and has not yet been processed by the program." msgstr "" -#: library/curses.rst:217 +#: library/curses.rst:203 msgid "" "After :meth:`~window.getch` returns :const:`KEY_MOUSE` to signal a mouse " "event, this method should be called to retrieve the queued mouse event, " @@ -269,40 +256,57 @@ msgid "" "coordinates. (*z* is currently unused.) *bstate* is an integer value whose " "bits will be set to indicate the type of event, and will be the bitwise OR " "of one or more of the following constants, where *n* is the button number " -"from 1 to 4: :const:`BUTTONn_PRESSED`, :const:`BUTTONn_RELEASED`, :const:" +"from 1 to 5: :const:`BUTTONn_PRESSED`, :const:`BUTTONn_RELEASED`, :const:" "`BUTTONn_CLICKED`, :const:`BUTTONn_DOUBLE_CLICKED`, :const:" "`BUTTONn_TRIPLE_CLICKED`, :const:`BUTTON_SHIFT`, :const:`BUTTON_CTRL`, :" "const:`BUTTON_ALT`." msgstr "" -#: library/curses.rst:231 +#: library/curses.rst:214 +msgid "" +"The ``BUTTON5_*`` constants are now exposed if they are provided by the " +"underlying curses library." +msgstr "" + +#: library/curses.rst:221 msgid "" "Return the current coordinates of the virtual screen cursor as a tuple ``(y, " "x)``. If :meth:`leaveok ` is currently ``True``, then " "return ``(-1, -1)``." msgstr "" -#: library/curses.rst:237 +#: library/curses.rst:227 msgid "" "Read window related data stored in the file by an earlier :func:`putwin` " "call. The routine then creates and initializes a new window using that data, " "returning the new window object." msgstr "" -#: library/curses.rst:244 +#: library/curses.rst:234 msgid "" "Return ``True`` if the terminal can display colors; otherwise, return " "``False``." msgstr "" -#: library/curses.rst:249 +#: library/curses.rst:238 +msgid "" +"Return ``True`` if the module supports extended colors; otherwise, return " +"``False``. Extended color support allows more than 256 color pairs for " +"terminals that support more than 16 colors (e.g. xterm-256color)." +msgstr "" + +#: library/curses.rst:242 +msgid "Extended color support requires ncurses version 6.1 or later." +msgstr "" + +#: library/curses.rst:248 msgid "" "Return ``True`` if the terminal has insert- and delete-character " "capabilities. This function is included for historical reasons only, as all " "modern software terminal emulators have such capabilities." msgstr "" -#: library/curses.rst:256 +#: library/curses.rst:255 msgid "" "Return ``True`` if the terminal has insert- and delete-line capabilities, or " "can simulate them using scrolling regions. This function is included for " @@ -310,13 +314,13 @@ msgid "" "capabilities." msgstr "" -#: library/curses.rst:264 +#: library/curses.rst:263 msgid "" "Take a key value *ch*, and return ``True`` if the current terminal type " "recognizes a key with that value." msgstr "" -#: library/curses.rst:270 +#: library/curses.rst:269 msgid "" "Used for half-delay mode, which is similar to cbreak mode in that characters " "typed by the user are immediately available to the program. However, after " @@ -325,7 +329,7 @@ msgid "" "``255``. Use :func:`nocbreak` to leave half-delay mode." msgstr "" -#: library/curses.rst:279 +#: library/curses.rst:278 msgid "" "Change the definition of a color, taking the number of the color to be " "changed followed by three RGB values (for the amounts of red, green, and " @@ -337,7 +341,7 @@ msgid "" "``True``." msgstr "" -#: library/curses.rst:290 +#: library/curses.rst:289 msgid "" "Change the definition of a color-pair. It takes three arguments: the number " "of the color-pair to be changed, the foreground color number, and the " @@ -350,31 +354,31 @@ msgid "" "definition." msgstr "" -#: library/curses.rst:303 +#: library/curses.rst:302 msgid "" "Initialize the library. Return a :ref:`window ` " "object which represents the whole screen." msgstr "" -#: library/curses.rst:308 +#: library/curses.rst:307 msgid "" "If there is an error opening the terminal, the underlying curses library may " "cause the interpreter to exit." msgstr "" -#: library/curses.rst:314 +#: library/curses.rst:313 msgid "" "Return ``True`` if :func:`resize_term` would modify the window structure, " "``False`` otherwise." msgstr "" -#: library/curses.rst:320 +#: library/curses.rst:319 msgid "" "Return ``True`` if :func:`endwin` has been called (that is, the curses " "library has been deinitialized)." msgstr "" -#: library/curses.rst:326 +#: library/curses.rst:325 msgid "" "Return the name of the key numbered *k* as a bytes object. The name of a " "key generating printable ASCII character is the key's character. The name " @@ -385,35 +389,35 @@ msgid "" "character." msgstr "" -#: library/curses.rst:336 +#: library/curses.rst:335 msgid "" "Return the user's current line kill character as a one-byte bytes object. " "Under Unix operating systems this is a property of the controlling tty of " "the curses program, and is not set by the curses library itself." msgstr "" -#: library/curses.rst:343 +#: library/curses.rst:342 msgid "" "Return a bytes object containing the terminfo long name field describing the " "current terminal. The maximum length of a verbose description is 128 " "characters. It is defined only after the call to :func:`initscr`." msgstr "" -#: library/curses.rst:350 +#: library/curses.rst:349 msgid "" "If *flag* is ``True``, allow 8-bit characters to be input. If *flag* is " "``False``, allow only 7-bit chars." msgstr "" -#: library/curses.rst:356 +#: library/curses.rst:355 msgid "" "Set the maximum time in milliseconds that can elapse between press and " "release events in order for them to be recognized as a click, and return the " -"previous interval value. The default value is 200 msec, or one fifth of a " -"second." +"previous interval value. The default value is 200 milliseconds, or one " +"fifth of a second." msgstr "" -#: library/curses.rst:363 +#: library/curses.rst:362 msgid "" "Set the mouse events to be reported, and return a tuple ``(availmask, " "oldmask)``. *availmask* indicates which of the specified mouse events can " @@ -422,17 +426,17 @@ msgid "" "never called, no mouse events are ever reported." msgstr "" -#: library/curses.rst:372 +#: library/curses.rst:371 msgid "Sleep for *ms* milliseconds." msgstr "" -#: library/curses.rst:377 +#: library/curses.rst:376 msgid "" "Create and return a pointer to a new pad data structure with the given " "number of lines and columns. Return a pad as a window object." msgstr "" -#: library/curses.rst:380 +#: library/curses.rst:379 msgid "" "A pad is like a window, except that it is not restricted by the screen size, " "and is not necessarily associated with a particular part of the screen. " @@ -448,35 +452,35 @@ msgid "" "to be displayed." msgstr "" -#: library/curses.rst:396 +#: library/curses.rst:395 msgid "" "Return a new :ref:`window `, whose left-upper corner " "is at ``(begin_y, begin_x)``, and whose height/width is *nlines*/*ncols*." msgstr "" -#: library/curses.rst:399 +#: library/curses.rst:398 msgid "" "By default, the window will extend from the specified position to the lower " "right corner of the screen." msgstr "" -#: library/curses.rst:405 +#: library/curses.rst:404 msgid "" "Enter newline mode. This mode translates the return key into newline on " "input, and translates newline into return and line-feed on output. Newline " "mode is initially on." msgstr "" -#: library/curses.rst:412 +#: library/curses.rst:411 msgid "" "Leave cbreak mode. Return to normal \"cooked\" mode with line buffering." msgstr "" -#: library/curses.rst:417 +#: library/curses.rst:416 msgid "Leave echo mode. Echoing of input characters is turned off." msgstr "" -#: library/curses.rst:422 +#: library/curses.rst:421 msgid "" "Leave newline mode. Disable translation of return into newline on input, " "and disable low-level translation of newline into newline/return on output " @@ -486,7 +490,7 @@ msgid "" "also, it will be able to detect the return key on input." msgstr "" -#: library/curses.rst:432 +#: library/curses.rst:431 msgid "" "When the :func:`!noqiflush` routine is used, normal flush of input and " "output queues associated with the ``INTR``, ``QUIT`` and ``SUSP`` characters " @@ -495,63 +499,63 @@ msgid "" "occurred, after the handler exits." msgstr "" -#: library/curses.rst:440 +#: library/curses.rst:439 msgid "Leave raw mode. Return to normal \"cooked\" mode with line buffering." msgstr "" -#: library/curses.rst:445 +#: library/curses.rst:444 msgid "" "Return a tuple ``(fg, bg)`` containing the colors for the requested color " "pair. The value of *pair_number* must be between ``0`` and ``COLOR_PAIRS - " "1``." msgstr "" -#: library/curses.rst:451 +#: library/curses.rst:450 msgid "" "Return the number of the color-pair set by the attribute value *attr*. :func:" "`color_pair` is the counterpart to this function." msgstr "" -#: library/curses.rst:457 +#: library/curses.rst:456 msgid "" "Equivalent to ``tputs(str, 1, putchar)``; emit the value of a specified " "terminfo capability for the current terminal. Note that the output of :func:" "`putp` always goes to standard output." msgstr "" -#: library/curses.rst:464 +#: library/curses.rst:463 msgid "" "If *flag* is ``False``, the effect is the same as calling :func:`noqiflush`. " "If *flag* is ``True``, or no argument is provided, the queues will be " "flushed when these control characters are read." msgstr "" -#: library/curses.rst:471 +#: library/curses.rst:470 msgid "" "Enter raw mode. In raw mode, normal line buffering and processing of " "interrupt, quit, suspend, and flow control keys are turned off; characters " "are presented to curses input functions one by one." msgstr "" -#: library/curses.rst:478 +#: library/curses.rst:477 msgid "" "Restore the terminal to \"program\" mode, as previously saved by :func:" "`def_prog_mode`." msgstr "" -#: library/curses.rst:484 +#: library/curses.rst:483 msgid "" "Restore the terminal to \"shell\" mode, as previously saved by :func:" "`def_shell_mode`." msgstr "" -#: library/curses.rst:490 +#: library/curses.rst:489 msgid "" "Restore the state of the terminal modes to what it was at the last call to :" "func:`savetty`." msgstr "" -#: library/curses.rst:496 +#: library/curses.rst:495 msgid "" "Backend function used by :func:`resizeterm`, performing most of the work; " "when resizing the windows, :func:`resize_term` blank-fills the areas that " @@ -561,47 +565,47 @@ msgid "" "to resize these without additional interaction with the application." msgstr "" -#: library/curses.rst:506 +#: library/curses.rst:505 msgid "" "Resize the standard and current windows to the specified dimensions, and " "adjusts other bookkeeping data used by the curses library that record the " "window dimensions (in particular the SIGWINCH handler)." msgstr "" -#: library/curses.rst:513 +#: library/curses.rst:512 msgid "" "Save the current state of the terminal modes in a buffer, usable by :func:" "`resetty`." msgstr "" -#: library/curses.rst:518 +#: library/curses.rst:517 msgid "Retrieves the value set by :func:`set_escdelay`." msgstr "" -#: library/curses.rst:524 +#: library/curses.rst:523 msgid "" "Sets the number of milliseconds to wait after reading an escape character, " "to distinguish between an individual escape character entered on the " "keyboard from escape sequences sent by cursor and function keys." msgstr "" -#: library/curses.rst:532 +#: library/curses.rst:531 msgid "Retrieves the value set by :func:`set_tabsize`." msgstr "" -#: library/curses.rst:538 +#: library/curses.rst:537 msgid "" "Sets the number of columns used by the curses library when converting a tab " "character to spaces as it adds the tab to a window." msgstr "" -#: library/curses.rst:545 +#: library/curses.rst:544 msgid "" "Set the virtual screen cursor to *y*, *x*. If *y* and *x* are both ``-1``, " "then :meth:`leaveok ` is set ``True``." msgstr "" -#: library/curses.rst:551 +#: library/curses.rst:550 msgid "" "Initialize the terminal. *term* is a string giving the terminal name, or " "``None``; if omitted or ``None``, the value of the :envvar:`TERM` " @@ -610,14 +614,14 @@ msgid "" "descriptor for ``sys.stdout`` will be used." msgstr "" -#: library/curses.rst:560 +#: library/curses.rst:559 msgid "" "Must be called if the programmer wants to use colors, and before any other " "color manipulation routine is called. It is good practice to call this " "routine right after :func:`initscr`." msgstr "" -#: library/curses.rst:564 +#: library/curses.rst:563 msgid "" ":func:`start_color` initializes eight basic colors (black, red, green, " "yellow, blue, magenta, cyan, and white), and two global variables in the :" @@ -627,20 +631,20 @@ msgid "" "terminal was just turned on." msgstr "" -#: library/curses.rst:573 +#: library/curses.rst:572 msgid "" "Return a logical OR of all video attributes supported by the terminal. This " "information is useful when a curses program needs complete control over the " "appearance of the screen." msgstr "" -#: library/curses.rst:580 +#: library/curses.rst:579 msgid "" "Return the value of the environment variable :envvar:`TERM`, as a bytes " "object, truncated to 14 characters." msgstr "" -#: library/curses.rst:586 +#: library/curses.rst:585 msgid "" "Return the value of the Boolean capability corresponding to the terminfo " "capability name *capname* as an integer. Return the value ``-1`` if " @@ -648,7 +652,7 @@ msgid "" "from the terminal description." msgstr "" -#: library/curses.rst:594 +#: library/curses.rst:593 msgid "" "Return the value of the numeric capability corresponding to the terminfo " "capability name *capname* as an integer. Return the value ``-2`` if " @@ -656,7 +660,7 @@ msgid "" "from the terminal description." msgstr "" -#: library/curses.rst:602 +#: library/curses.rst:601 msgid "" "Return the value of the string capability corresponding to the terminfo " "capability name *capname* as a bytes object. Return ``None`` if *capname* " @@ -664,7 +668,7 @@ msgid "" "terminal description." msgstr "" -#: library/curses.rst:610 +#: library/curses.rst:609 msgid "" "Instantiate the bytes object *str* with the supplied parameters, where *str* " "should be a parameterized string obtained from the terminfo database. E.g. " @@ -672,13 +676,13 @@ msgid "" "exact result depending on terminal type." msgstr "" -#: library/curses.rst:618 +#: library/curses.rst:617 msgid "" "Specify that the file descriptor *fd* be used for typeahead checking. If " "*fd* is ``-1``, then no typeahead checking is done." msgstr "" -#: library/curses.rst:621 +#: library/curses.rst:620 msgid "" "The curses library does \"line-breakout optimization\" by looking for " "typeahead periodically while updating the screen. If input is found, and it " @@ -688,7 +692,7 @@ msgid "" "typeahead checking." msgstr "" -#: library/curses.rst:630 +#: library/curses.rst:629 msgid "" "Return a bytes object which is a printable representation of the character " "*ch*. Control characters are represented as a caret followed by the " @@ -696,35 +700,35 @@ msgid "" "are." msgstr "" -#: library/curses.rst:637 +#: library/curses.rst:636 msgid "Push *ch* so the next :meth:`~window.getch` will return it." msgstr "" -#: library/curses.rst:641 +#: library/curses.rst:640 msgid "Only one *ch* can be pushed before :meth:`!getch` is called." msgstr "" -#: library/curses.rst:646 +#: library/curses.rst:645 msgid "" "Update :envvar:`LINES` and :envvar:`COLS`. Useful for detecting manual " "screen resize." msgstr "" -#: library/curses.rst:653 +#: library/curses.rst:652 msgid "Push *ch* so the next :meth:`~window.get_wch` will return it." msgstr "" -#: library/curses.rst:657 +#: library/curses.rst:656 msgid "Only one *ch* can be pushed before :meth:`!get_wch` is called." msgstr "" -#: library/curses.rst:664 +#: library/curses.rst:663 msgid "" "Push a :const:`KEY_MOUSE` event onto the input queue, associating the given " "state data with it." msgstr "" -#: library/curses.rst:670 +#: library/curses.rst:669 msgid "" "If used, this function should be called before :func:`initscr` or newterm " "are called. When *flag* is ``False``, the values of lines and columns " @@ -734,7 +738,7 @@ msgid "" "to use the window size if :envvar:`LINES` and :envvar:`COLUMNS` are not set)." msgstr "" -#: library/curses.rst:680 +#: library/curses.rst:679 msgid "" "Allow use of default values for colors on terminals supporting this feature. " "Use this to support transparency in your application. The default color is " @@ -743,7 +747,7 @@ msgid "" "*x* to a red foreground color on the default background." msgstr "" -#: library/curses.rst:689 +#: library/curses.rst:688 msgid "" "Initialize curses and call another callable object, *func*, which should be " "the rest of your curses-using application. If the application raises an " @@ -757,50 +761,50 @@ msgid "" "echo, and disables the terminal keypad." msgstr "" -#: library/curses.rst:703 +#: library/curses.rst:702 msgid "Window Objects" msgstr "" -#: library/curses.rst:705 +#: library/curses.rst:704 msgid "" "Window objects, as returned by :func:`initscr` and :func:`newwin` above, " "have the following methods and attributes:" msgstr "" -#: library/curses.rst:712 +#: library/curses.rst:711 msgid "" "Paint character *ch* at ``(y, x)`` with attributes *attr*, overwriting any " "character previously painted at that location. By default, the character " "position and attributes are the current settings for the window object." msgstr "" -#: library/curses.rst:718 +#: library/curses.rst:717 msgid "" "Writing outside the window, subwindow, or pad raises a :exc:`curses.error`. " "Attempting to write to the lower right corner of a window, subwindow, or pad " "will cause an exception to be raised after the character is printed." msgstr "" -#: library/curses.rst:726 +#: library/curses.rst:725 msgid "" "Paint at most *n* characters of the character string *str* at ``(y, x)`` " "with attributes *attr*, overwriting anything previously on the display." msgstr "" -#: library/curses.rst:734 +#: library/curses.rst:733 msgid "" "Paint the character string *str* at ``(y, x)`` with attributes *attr*, " "overwriting anything previously on the display." msgstr "" -#: library/curses.rst:739 +#: library/curses.rst:738 msgid "" "Writing outside the window, subwindow, or pad raises :exc:`curses.error`. " "Attempting to write to the lower right corner of a window, subwindow, or pad " "will cause an exception to be raised after the string is printed." msgstr "" -#: library/curses.rst:743 +#: library/curses.rst:742 msgid "" "A `bug in ncurses `_, the backend for " "this Python module, can cause SegFaults when resizing windows. This is fixed " @@ -810,44 +814,44 @@ msgid "" "line." msgstr "" -#: library/curses.rst:753 +#: library/curses.rst:752 msgid "" "Remove attribute *attr* from the \"background\" set applied to all writes to " "the current window." msgstr "" -#: library/curses.rst:759 +#: library/curses.rst:758 msgid "" "Add attribute *attr* from the \"background\" set applied to all writes to " "the current window." msgstr "" -#: library/curses.rst:765 +#: library/curses.rst:764 msgid "" "Set the \"background\" set of attributes to *attr*. This set is initially " "``0`` (no attributes)." msgstr "" -#: library/curses.rst:771 +#: library/curses.rst:770 msgid "" "Set the background property of the window to the character *ch*, with " "attributes *attr*. The change is then applied to every character position " "in that window:" msgstr "" -#: library/curses.rst:775 +#: library/curses.rst:774 msgid "" "The attribute of every character in the window is changed to the new " "background attribute." msgstr "" -#: library/curses.rst:778 +#: library/curses.rst:777 msgid "" "Wherever the former background character appears, it is changed to the new " "background character." msgstr "" -#: library/curses.rst:784 +#: library/curses.rst:783 msgid "" "Set the window's background. A window's background consists of a character " "and any combination of attributes. The attribute part of the background is " @@ -858,128 +862,128 @@ msgid "" "delete line/character operations." msgstr "" -#: library/curses.rst:794 +#: library/curses.rst:793 msgid "" "Draw a border around the edges of the window. Each parameter specifies the " "character to use for a specific part of the border; see the table below for " "more details." msgstr "" -#: library/curses.rst:800 +#: library/curses.rst:799 msgid "" "A ``0`` value for any parameter will cause the default character to be used " "for that parameter. Keyword parameters can *not* be used. The defaults are " "listed in this table:" msgstr "" -#: library/curses.rst:805 +#: library/curses.rst:804 msgid "Parameter" msgstr "Paramètre" -#: library/curses.rst:805 +#: library/curses.rst:804 msgid "Description" msgstr "Description" -#: library/curses.rst:805 +#: library/curses.rst:804 msgid "Default value" msgstr "Valeur par défaut" -#: library/curses.rst:807 +#: library/curses.rst:806 msgid "*ls*" msgstr "*ls*" -#: library/curses.rst:807 +#: library/curses.rst:806 msgid "Left side" msgstr "" -#: library/curses.rst:809 +#: library/curses.rst:808 msgid ":const:`ACS_VLINE`" msgstr ":const:`ACS_VLINE`" -#: library/curses.rst:809 +#: library/curses.rst:808 msgid "*rs*" msgstr "*rs*" -#: library/curses.rst:809 +#: library/curses.rst:808 msgid "Right side" msgstr "" -#: library/curses.rst:811 +#: library/curses.rst:810 msgid "*ts*" msgstr "*ts*" -#: library/curses.rst:811 +#: library/curses.rst:810 msgid "Top" msgstr "" -#: library/curses.rst:813 +#: library/curses.rst:812 msgid ":const:`ACS_HLINE`" msgstr ":const:`ACS_HLINE`" -#: library/curses.rst:813 +#: library/curses.rst:812 msgid "*bs*" msgstr "*bs*" -#: library/curses.rst:813 +#: library/curses.rst:812 msgid "Bottom" msgstr "" -#: library/curses.rst:815 +#: library/curses.rst:814 msgid "*tl*" msgstr "*tl*" -#: library/curses.rst:815 +#: library/curses.rst:814 msgid "Upper-left corner" msgstr "" -#: library/curses.rst:815 +#: library/curses.rst:814 msgid ":const:`ACS_ULCORNER`" msgstr ":const:`ACS_ULCORNER`" -#: library/curses.rst:817 +#: library/curses.rst:816 msgid "*tr*" msgstr "" -#: library/curses.rst:817 +#: library/curses.rst:816 msgid "Upper-right corner" msgstr "" -#: library/curses.rst:817 +#: library/curses.rst:816 msgid ":const:`ACS_URCORNER`" msgstr ":const:`ACS_URCORNER`" -#: library/curses.rst:819 +#: library/curses.rst:818 msgid "*bl*" msgstr "" -#: library/curses.rst:819 +#: library/curses.rst:818 msgid "Bottom-left corner" msgstr "" -#: library/curses.rst:819 +#: library/curses.rst:818 msgid ":const:`ACS_LLCORNER`" msgstr ":const:`ACS_LLCORNER`" -#: library/curses.rst:821 +#: library/curses.rst:820 msgid "*br*" msgstr "" -#: library/curses.rst:821 +#: library/curses.rst:820 msgid "Bottom-right corner" msgstr "" -#: library/curses.rst:821 +#: library/curses.rst:820 msgid ":const:`ACS_LRCORNER`" msgstr ":const:`ACS_LRCORNER`" -#: library/curses.rst:827 +#: library/curses.rst:826 msgid "" "Similar to :meth:`border`, but both *ls* and *rs* are *vertch* and both *ts* " "and *bs* are *horch*. The default corner characters are always used by this " "function." msgstr "" -#: library/curses.rst:836 +#: library/curses.rst:835 msgid "" "Set the attributes of *num* characters at the current cursor position, or at " "position ``(y, x)`` if supplied. If *num* is not given or is ``-1``, the " @@ -989,45 +993,45 @@ msgid "" "be redisplayed by the next window refresh." msgstr "" -#: library/curses.rst:846 +#: library/curses.rst:845 msgid "" "Like :meth:`erase`, but also cause the whole window to be repainted upon " "next call to :meth:`refresh`." msgstr "" -#: library/curses.rst:852 +#: library/curses.rst:851 msgid "" "If *flag* is ``True``, the next call to :meth:`refresh` will clear the " "window completely." msgstr "" -#: library/curses.rst:858 +#: library/curses.rst:857 msgid "" "Erase from cursor to the end of the window: all lines below the cursor are " "deleted, and then the equivalent of :meth:`clrtoeol` is performed." msgstr "" -#: library/curses.rst:864 +#: library/curses.rst:863 msgid "Erase from cursor to the end of the line." msgstr "" -#: library/curses.rst:869 +#: library/curses.rst:868 msgid "" "Update the current cursor position of all the ancestors of the window to " "reflect the current cursor position of the window." msgstr "" -#: library/curses.rst:875 +#: library/curses.rst:874 msgid "Delete any character at ``(y, x)``." msgstr "" -#: library/curses.rst:880 +#: library/curses.rst:879 msgid "" "Delete the line under the cursor. All following lines are moved up by one " "line." msgstr "" -#: library/curses.rst:886 +#: library/curses.rst:885 msgid "" "An abbreviation for \"derive window\", :meth:`derwin` is the same as " "calling :meth:`subwin`, except that *begin_y* and *begin_x* are relative to " @@ -1035,13 +1039,13 @@ msgid "" "a window object for the derived window." msgstr "" -#: library/curses.rst:894 +#: library/curses.rst:893 msgid "" "Add character *ch* with attribute *attr*, and immediately call :meth:" "`refresh` on the window." msgstr "" -#: library/curses.rst:900 +#: library/curses.rst:899 msgid "" "Test whether the given pair of screen-relative character-cell coordinates " "are enclosed by the given window, returning ``True`` or ``False``. It is " @@ -1049,27 +1053,31 @@ msgid "" "location of a mouse event." msgstr "" -#: library/curses.rst:908 +#: library/curses.rst:904 +msgid "Previously it returned ``1`` or ``0`` instead of ``True`` or ``False``." +msgstr "" + +#: library/curses.rst:910 msgid "" "Encoding used to encode method arguments (Unicode strings and characters). " "The encoding attribute is inherited from the parent window when a subwindow " -"is created, for example with :meth:`window.subwin`. By default, the locale " -"encoding is used (see :func:`locale.getpreferredencoding`)." +"is created, for example with :meth:`window.subwin`. By default, current " +"locale encoding is used (see :func:`locale.getencoding`)." msgstr "" -#: library/curses.rst:918 +#: library/curses.rst:920 msgid "Clear the window." msgstr "" -#: library/curses.rst:923 +#: library/curses.rst:925 msgid "Return a tuple ``(y, x)`` of co-ordinates of upper-left corner." msgstr "" -#: library/curses.rst:928 +#: library/curses.rst:930 msgid "Return the given window's current background character/attribute pair." msgstr "" -#: library/curses.rst:933 +#: library/curses.rst:935 msgid "" "Get a character. Note that the integer returned does *not* have to be in " "ASCII range: function keys, keypad keys and so on are represented by numbers " @@ -1077,14 +1085,14 @@ msgid "" "otherwise wait until a key is pressed." msgstr "" -#: library/curses.rst:941 +#: library/curses.rst:943 msgid "" "Get a wide character. Return a character for most keys, or an integer for " "function keys, keypad keys, and other special keys. In no-delay mode, raise " "an exception if there is no input." msgstr "" -#: library/curses.rst:950 +#: library/curses.rst:952 msgid "" "Get a character, returning a string instead of an integer, as :meth:`getch` " "does. Function keys, keypad keys and other special keys return a multibyte " @@ -1092,35 +1100,35 @@ msgid "" "there is no input." msgstr "" -#: library/curses.rst:958 +#: library/curses.rst:960 msgid "Return a tuple ``(y, x)`` of the height and width of the window." msgstr "" -#: library/curses.rst:963 +#: library/curses.rst:965 msgid "" "Return the beginning coordinates of this window relative to its parent " "window as a tuple ``(y, x)``. Return ``(-1, -1)`` if this window has no " "parent." msgstr "" -#: library/curses.rst:973 +#: library/curses.rst:975 msgid "" "Read a bytes object from the user, with primitive line editing capacity." msgstr "" -#: library/curses.rst:978 +#: library/curses.rst:980 msgid "" "Return a tuple ``(y, x)`` of current cursor position relative to the " "window's upper-left corner." msgstr "" -#: library/curses.rst:985 +#: library/curses.rst:987 msgid "" "Display a horizontal line starting at ``(y, x)`` with length *n* consisting " "of the character *ch*." msgstr "" -#: library/curses.rst:991 +#: library/curses.rst:993 msgid "" "If *flag* is ``False``, curses no longer considers using the hardware insert/" "delete character feature of the terminal; if *flag* is ``True``, use of " @@ -1128,13 +1136,13 @@ msgid "" "initialized, use of character insert/delete is enabled by default." msgstr "" -#: library/curses.rst:999 +#: library/curses.rst:1001 msgid "" "If *flag* is ``True``, :mod:`curses` will try and use hardware line editing " "facilities. Otherwise, line insertion/deletion are disabled." msgstr "" -#: library/curses.rst:1005 +#: library/curses.rst:1007 msgid "" "If *flag* is ``True``, any change in the window image automatically causes " "the window to be refreshed; you no longer have to call :meth:`refresh` " @@ -1142,19 +1150,19 @@ msgid "" "calls to wrefresh. This option is disabled by default." msgstr "" -#: library/curses.rst:1013 +#: library/curses.rst:1015 msgid "" "Return the character at the given position in the window. The bottom 8 bits " "are the character proper, and upper bits are the attributes." msgstr "" -#: library/curses.rst:1020 +#: library/curses.rst:1022 msgid "" "Paint character *ch* at ``(y, x)`` with attributes *attr*, moving the line " "from position *x* right by one character." msgstr "" -#: library/curses.rst:1026 +#: library/curses.rst:1028 msgid "" "Insert *nlines* lines into the specified window above the current line. The " "*nlines* bottom lines are lost. For negative *nlines*, delete *nlines* " @@ -1163,13 +1171,13 @@ msgid "" "remains the same." msgstr "" -#: library/curses.rst:1035 +#: library/curses.rst:1037 msgid "" "Insert a blank line under the cursor. All following lines are moved down by " "one line." msgstr "" -#: library/curses.rst:1042 +#: library/curses.rst:1044 msgid "" "Insert a character string (as many characters as will fit on the line) " "before the character under the cursor, up to *n* characters. If *n* is " @@ -1179,7 +1187,7 @@ msgid "" "if specified)." msgstr "" -#: library/curses.rst:1052 +#: library/curses.rst:1054 msgid "" "Insert a character string (as many characters as will fit on the line) " "before the character under the cursor. All characters to the right of the " @@ -1188,7 +1196,7 @@ msgid "" "specified)." msgstr "" -#: library/curses.rst:1061 +#: library/curses.rst:1063 msgid "" "Return a bytes object of characters, extracted from the window starting at " "the current cursor position, or at *y*, *x* if specified. Attributes are " @@ -1196,76 +1204,76 @@ msgid "" "string at most *n* characters long (exclusive of the trailing NUL)." msgstr "" -#: library/curses.rst:1069 +#: library/curses.rst:1071 msgid "" "Return ``True`` if the specified line was modified since the last call to :" "meth:`refresh`; otherwise return ``False``. Raise a :exc:`curses.error` " "exception if *line* is not valid for the given window." msgstr "" -#: library/curses.rst:1076 +#: library/curses.rst:1078 msgid "" "Return ``True`` if the specified window was modified since the last call to :" "meth:`refresh`; otherwise return ``False``." msgstr "" -#: library/curses.rst:1082 +#: library/curses.rst:1084 msgid "" "If *flag* is ``True``, escape sequences generated by some keys (keypad, " "function keys) will be interpreted by :mod:`curses`. If *flag* is ``False``, " "escape sequences will be left as is in the input stream." msgstr "" -#: library/curses.rst:1089 +#: library/curses.rst:1091 msgid "" "If *flag* is ``True``, cursor is left where it is on update, instead of " "being at \"cursor position.\" This reduces cursor movement where possible. " "If possible the cursor will be made invisible." msgstr "" -#: library/curses.rst:1093 +#: library/curses.rst:1095 msgid "" "If *flag* is ``False``, cursor will always be at \"cursor position\" after " "an update." msgstr "" -#: library/curses.rst:1098 +#: library/curses.rst:1100 msgid "Move cursor to ``(new_y, new_x)``." msgstr "" -#: library/curses.rst:1103 +#: library/curses.rst:1105 msgid "" "Move the window inside its parent window. The screen-relative parameters of " "the window are not changed. This routine is used to display different parts " "of the parent window at the same physical position on the screen." msgstr "" -#: library/curses.rst:1110 +#: library/curses.rst:1112 msgid "Move the window so its upper-left corner is at ``(new_y, new_x)``." msgstr "" -#: library/curses.rst:1115 +#: library/curses.rst:1117 msgid "If *flag* is ``True``, :meth:`getch` will be non-blocking." msgstr "" -#: library/curses.rst:1120 +#: library/curses.rst:1122 msgid "If *flag* is ``True``, escape sequences will not be timed out." msgstr "" -#: library/curses.rst:1122 +#: library/curses.rst:1124 msgid "" "If *flag* is ``False``, after a few milliseconds, an escape sequence will " "not be interpreted, and will be left in the input stream as is." msgstr "" -#: library/curses.rst:1128 +#: library/curses.rst:1130 msgid "" "Mark for refresh but wait. This function updates the data structure " "representing the desired state of the window, but does not force an update " "of the physical screen. To accomplish that, call :func:`doupdate`." msgstr "" -#: library/curses.rst:1135 +#: library/curses.rst:1137 msgid "" "Overlay the window on top of *destwin*. The windows need not be the same " "size, only the overlapping region is copied. This copy is non-destructive, " @@ -1273,7 +1281,7 @@ msgid "" "contents of *destwin*." msgstr "" -#: library/curses.rst:1140 +#: library/curses.rst:1142 msgid "" "To get fine-grained control over the copied region, the second form of :meth:" "`overlay` can be used. *sminrow* and *smincol* are the upper-left " @@ -1281,7 +1289,7 @@ msgid "" "in the destination window." msgstr "" -#: library/curses.rst:1148 +#: library/curses.rst:1150 msgid "" "Overwrite the window on top of *destwin*. The windows need not be the same " "size, in which case only the overlapping region is copied. This copy is " @@ -1289,7 +1297,7 @@ msgid "" "the old contents of *destwin*." msgstr "" -#: library/curses.rst:1153 +#: library/curses.rst:1155 msgid "" "To get fine-grained control over the copied region, the second form of :meth:" "`overwrite` can be used. *sminrow* and *smincol* are the upper-left " @@ -1297,31 +1305,31 @@ msgid "" "the destination window." msgstr "" -#: library/curses.rst:1161 +#: library/curses.rst:1163 msgid "" "Write all data associated with the window into the provided file object. " "This information can be later retrieved using the :func:`getwin` function." msgstr "" -#: library/curses.rst:1167 +#: library/curses.rst:1169 msgid "" "Indicate that the *num* screen lines, starting at line *beg*, are corrupted " "and should be completely redrawn on the next :meth:`refresh` call." msgstr "" -#: library/curses.rst:1173 +#: library/curses.rst:1175 msgid "" "Touch the entire window, causing it to be completely redrawn on the next :" "meth:`refresh` call." msgstr "" -#: library/curses.rst:1179 +#: library/curses.rst:1181 msgid "" "Update the display immediately (sync actual screen with previous drawing/" "deleting methods)." msgstr "" -#: library/curses.rst:1182 +#: library/curses.rst:1184 msgid "" "The 6 optional arguments can only be specified when the window is a pad " "created with :func:`newpad`. The additional parameters are needed to " @@ -1336,7 +1344,7 @@ msgid "" "*smincol* are treated as if they were zero." msgstr "" -#: library/curses.rst:1196 +#: library/curses.rst:1198 msgid "" "Reallocate storage for a curses window to adjust its dimensions to the " "specified values. If either dimension is larger than the current values, " @@ -1344,11 +1352,11 @@ msgid "" "rendition (as set by :meth:`bkgdset`) merged into them." msgstr "" -#: library/curses.rst:1204 +#: library/curses.rst:1206 msgid "Scroll the screen or scrolling region upward by *lines* lines." msgstr "" -#: library/curses.rst:1209 +#: library/curses.rst:1211 msgid "" "Control what happens when the cursor of a window is moved off the edge of " "the window or scrolling region, either as a result of a newline action on " @@ -1358,54 +1366,54 @@ msgid "" "scrolling effect on the terminal, it is also necessary to call :meth:`idlok`." msgstr "" -#: library/curses.rst:1219 +#: library/curses.rst:1221 msgid "" "Set the scrolling region from line *top* to line *bottom*. All scrolling " "actions will take place in this region." msgstr "" -#: library/curses.rst:1225 +#: library/curses.rst:1227 msgid "" "Turn off the standout attribute. On some terminals this has the side effect " "of turning off all attributes." msgstr "" -#: library/curses.rst:1231 +#: library/curses.rst:1233 msgid "Turn on attribute *A_STANDOUT*." msgstr "" -#: library/curses.rst:1244 +#: library/curses.rst:1246 msgid "" "Return a sub-window, whose upper-left corner is at ``(begin_y, begin_x)``, " "and whose width/height is *ncols*/*nlines*." msgstr "" -#: library/curses.rst:1247 +#: library/curses.rst:1249 msgid "" "By default, the sub-window will extend from the specified position to the " "lower right corner of the window." msgstr "" -#: library/curses.rst:1253 +#: library/curses.rst:1255 msgid "" "Touch each location in the window that has been touched in any of its " "ancestor windows. This routine is called by :meth:`refresh`, so it should " "almost never be necessary to call it manually." msgstr "" -#: library/curses.rst:1260 +#: library/curses.rst:1262 msgid "" "If *flag* is ``True``, then :meth:`syncup` is called automatically whenever " "there is a change in the window." msgstr "" -#: library/curses.rst:1266 +#: library/curses.rst:1268 msgid "" "Touch all locations in ancestors of the window that have been changed in " "the window." msgstr "" -#: library/curses.rst:1272 +#: library/curses.rst:1274 msgid "" "Set blocking or non-blocking read behavior for the window. If *delay* is " "negative, blocking read is used (which will wait indefinitely for input). " @@ -1415,7 +1423,7 @@ msgid "" "still no input at the end of that time." msgstr "" -#: library/curses.rst:1282 +#: library/curses.rst:1284 msgid "" "Pretend *count* lines have been changed, starting with line *start*. If " "*changed* is supplied, it specifies whether the affected lines are marked as " @@ -1423,51 +1431,51 @@ msgid "" "``=False``)." msgstr "" -#: library/curses.rst:1289 +#: library/curses.rst:1291 msgid "" "Pretend the whole window has been changed, for purposes of drawing " "optimizations." msgstr "" -#: library/curses.rst:1295 +#: library/curses.rst:1297 msgid "" "Mark all lines in the window as unchanged since the last call to :meth:" "`refresh`." msgstr "" -#: library/curses.rst:1302 +#: library/curses.rst:1304 msgid "" "Display a vertical line starting at ``(y, x)`` with length *n* consisting of " "the character *ch*." msgstr "" -#: library/curses.rst:1307 +#: library/curses.rst:1309 msgid "Constants" msgstr "Constantes" -#: library/curses.rst:1309 +#: library/curses.rst:1311 msgid "The :mod:`curses` module defines the following data members:" msgstr "" -#: library/curses.rst:1314 +#: library/curses.rst:1316 msgid "" "Some curses routines that return an integer, such as :meth:`~window." "getch`, return :const:`ERR` upon failure." msgstr "" -#: library/curses.rst:1320 +#: library/curses.rst:1322 msgid "" "Some curses routines that return an integer, such as :func:`napms`, " "return :const:`OK` upon success." msgstr "" -#: library/curses.rst:1326 +#: library/curses.rst:1328 msgid "" "A bytes object representing the current version of the module. Also " "available as :const:`__version__`." msgstr "" -#: library/curses.rst:1332 +#: library/curses.rst:1334 msgid "" "A named tuple containing the three components of the ncurses library " "version: *major*, *minor*, and *patch*. All values are integers. The " @@ -1475,965 +1483,965 @@ msgid "" "is equivalent to ``curses.ncurses_version.major`` and so on." msgstr "" -#: library/curses.rst:1337 +#: library/curses.rst:1339 msgid "Availability: if the ncurses library is used." msgstr "" -#: library/curses.rst:1342 +#: library/curses.rst:1344 msgid "" "Some constants are available to specify character cell attributes. The exact " "constants available are system dependent." msgstr "" -#: library/curses.rst:1346 +#: library/curses.rst:1348 msgid "Attribute" msgstr "Attribut" -#: library/curses.rst:1394 library/curses.rst:1638 +#: library/curses.rst:1396 library/curses.rst:1640 msgid "Meaning" msgstr "Signification" -#: library/curses.rst:1348 +#: library/curses.rst:1350 msgid "``A_ALTCHARSET``" msgstr "``A_ALTCHARSET``" -#: library/curses.rst:1348 +#: library/curses.rst:1350 msgid "Alternate character set mode" msgstr "" -#: library/curses.rst:1350 +#: library/curses.rst:1352 msgid "``A_BLINK``" msgstr "``A_BLINK``" -#: library/curses.rst:1350 +#: library/curses.rst:1352 msgid "Blink mode" msgstr "" -#: library/curses.rst:1352 +#: library/curses.rst:1354 msgid "``A_BOLD``" msgstr "``A_BOLD``" -#: library/curses.rst:1352 +#: library/curses.rst:1354 msgid "Bold mode" msgstr "" -#: library/curses.rst:1354 +#: library/curses.rst:1356 msgid "``A_DIM``" msgstr "``A_DIM``" -#: library/curses.rst:1354 +#: library/curses.rst:1356 msgid "Dim mode" msgstr "" -#: library/curses.rst:1356 +#: library/curses.rst:1358 msgid "``A_INVIS``" msgstr "``A_INVIS``" -#: library/curses.rst:1356 +#: library/curses.rst:1358 msgid "Invisible or blank mode" msgstr "" -#: library/curses.rst:1358 +#: library/curses.rst:1360 msgid "``A_ITALIC``" msgstr "``A_ITALIC``" -#: library/curses.rst:1358 +#: library/curses.rst:1360 msgid "Italic mode" msgstr "" -#: library/curses.rst:1360 +#: library/curses.rst:1362 msgid "``A_NORMAL``" msgstr "``A_NORMAL``" -#: library/curses.rst:1360 +#: library/curses.rst:1362 msgid "Normal attribute" msgstr "Attribut normal" -#: library/curses.rst:1362 +#: library/curses.rst:1364 msgid "``A_PROTECT``" msgstr "``A_PROTECT``" -#: library/curses.rst:1362 +#: library/curses.rst:1364 msgid "Protected mode" msgstr "" -#: library/curses.rst:1364 +#: library/curses.rst:1366 msgid "``A_REVERSE``" msgstr "``A_REVERSE``" -#: library/curses.rst:1364 +#: library/curses.rst:1366 msgid "Reverse background and foreground colors" msgstr "" -#: library/curses.rst:1367 +#: library/curses.rst:1369 msgid "``A_STANDOUT``" msgstr "``A_STANDOUT``" -#: library/curses.rst:1367 +#: library/curses.rst:1369 msgid "Standout mode" msgstr "" -#: library/curses.rst:1369 +#: library/curses.rst:1371 msgid "``A_UNDERLINE``" msgstr "``A_UNDERLINE``" -#: library/curses.rst:1369 +#: library/curses.rst:1371 msgid "Underline mode" msgstr "" -#: library/curses.rst:1371 +#: library/curses.rst:1373 msgid "``A_HORIZONTAL``" msgstr "``A_HORIZONTAL``" -#: library/curses.rst:1371 +#: library/curses.rst:1373 msgid "Horizontal highlight" msgstr "" -#: library/curses.rst:1373 +#: library/curses.rst:1375 msgid "``A_LEFT``" msgstr "``A_LEFT``" -#: library/curses.rst:1373 +#: library/curses.rst:1375 msgid "Left highlight" msgstr "" -#: library/curses.rst:1375 +#: library/curses.rst:1377 msgid "``A_LOW``" msgstr "``A_LOW``" -#: library/curses.rst:1375 +#: library/curses.rst:1377 msgid "Low highlight" msgstr "" -#: library/curses.rst:1377 +#: library/curses.rst:1379 msgid "``A_RIGHT``" msgstr "``A_RIGHT``" -#: library/curses.rst:1377 +#: library/curses.rst:1379 msgid "Right highlight" msgstr "" -#: library/curses.rst:1379 +#: library/curses.rst:1381 msgid "``A_TOP``" msgstr "``A_TOP``" -#: library/curses.rst:1379 +#: library/curses.rst:1381 msgid "Top highlight" msgstr "" -#: library/curses.rst:1381 +#: library/curses.rst:1383 msgid "``A_VERTICAL``" msgstr "``A_VERTICAL``" -#: library/curses.rst:1381 +#: library/curses.rst:1383 msgid "Vertical highlight" msgstr "" -#: library/curses.rst:1399 +#: library/curses.rst:1401 msgid "``A_CHARTEXT``" msgstr "``A_CHARTEXT``" -#: library/curses.rst:1399 +#: library/curses.rst:1401 msgid "Bit-mask to extract a character" msgstr "" -#: library/curses.rst:1387 +#: library/curses.rst:1389 msgid "``A_ITALIC`` was added." msgstr "" -#: library/curses.rst:1390 +#: library/curses.rst:1392 msgid "" "Several constants are available to extract corresponding attributes returned " "by some methods." msgstr "" -#: library/curses.rst:1394 +#: library/curses.rst:1396 msgid "Bit-mask" msgstr "" -#: library/curses.rst:1396 +#: library/curses.rst:1398 msgid "``A_ATTRIBUTES``" msgstr "``A_ATTRIBUTES``" -#: library/curses.rst:1396 +#: library/curses.rst:1398 msgid "Bit-mask to extract attributes" msgstr "" -#: library/curses.rst:1402 +#: library/curses.rst:1404 msgid "``A_COLOR``" msgstr "``A_COLOR``" -#: library/curses.rst:1402 +#: library/curses.rst:1404 msgid "Bit-mask to extract color-pair field information" msgstr "" -#: library/curses.rst:1406 +#: library/curses.rst:1408 msgid "" "Keys are referred to by integer constants with names starting with " "``KEY_``. The exact keycaps available are system dependent." msgstr "" -#: library/curses.rst:1412 +#: library/curses.rst:1414 msgid "Key constant" msgstr "" -#: library/curses.rst:1412 +#: library/curses.rst:1414 msgid "Key" msgstr "Clé" -#: library/curses.rst:1414 +#: library/curses.rst:1416 msgid "``KEY_MIN``" msgstr "``KEY_MIN``" -#: library/curses.rst:1414 +#: library/curses.rst:1416 msgid "Minimum key value" msgstr "" -#: library/curses.rst:1416 +#: library/curses.rst:1418 msgid "``KEY_BREAK``" msgstr "``KEY_BREAK``" -#: library/curses.rst:1416 +#: library/curses.rst:1418 msgid "Break key (unreliable)" msgstr "" -#: library/curses.rst:1418 +#: library/curses.rst:1420 msgid "``KEY_DOWN``" msgstr "``KEY_DOWN``" -#: library/curses.rst:1418 +#: library/curses.rst:1420 msgid "Down-arrow" msgstr "" -#: library/curses.rst:1420 +#: library/curses.rst:1422 msgid "``KEY_UP``" msgstr "``KEY_UP``" -#: library/curses.rst:1420 +#: library/curses.rst:1422 msgid "Up-arrow" msgstr "" -#: library/curses.rst:1422 +#: library/curses.rst:1424 msgid "``KEY_LEFT``" msgstr "``KEY_LEFT``" -#: library/curses.rst:1422 +#: library/curses.rst:1424 msgid "Left-arrow" msgstr "" -#: library/curses.rst:1424 +#: library/curses.rst:1426 msgid "``KEY_RIGHT``" msgstr "``KEY_RIGHT``" -#: library/curses.rst:1424 +#: library/curses.rst:1426 msgid "Right-arrow" msgstr "" -#: library/curses.rst:1426 +#: library/curses.rst:1428 msgid "``KEY_HOME``" msgstr "``KEY_HOME``" -#: library/curses.rst:1426 +#: library/curses.rst:1428 msgid "Home key (upward+left arrow)" msgstr "" -#: library/curses.rst:1428 +#: library/curses.rst:1430 msgid "``KEY_BACKSPACE``" msgstr "``KEY_BACKSPACE``" -#: library/curses.rst:1428 +#: library/curses.rst:1430 msgid "Backspace (unreliable)" msgstr "" -#: library/curses.rst:1430 +#: library/curses.rst:1432 msgid "``KEY_F0``" msgstr "``KEY_F0``" -#: library/curses.rst:1430 +#: library/curses.rst:1432 msgid "Function keys. Up to 64 function keys are supported." msgstr "" -#: library/curses.rst:1433 +#: library/curses.rst:1435 msgid "``KEY_Fn``" msgstr "``KEY_Fn``" -#: library/curses.rst:1433 +#: library/curses.rst:1435 msgid "Value of function key *n*" msgstr "" -#: library/curses.rst:1435 +#: library/curses.rst:1437 msgid "``KEY_DL``" msgstr "``KEY_DL``" -#: library/curses.rst:1435 +#: library/curses.rst:1437 msgid "Delete line" msgstr "" -#: library/curses.rst:1437 +#: library/curses.rst:1439 msgid "``KEY_IL``" msgstr "``KEY_IL``" -#: library/curses.rst:1437 +#: library/curses.rst:1439 msgid "Insert line" msgstr "" -#: library/curses.rst:1439 +#: library/curses.rst:1441 msgid "``KEY_DC``" msgstr "``KEY_DC``" -#: library/curses.rst:1439 +#: library/curses.rst:1441 msgid "Delete character" msgstr "" -#: library/curses.rst:1441 +#: library/curses.rst:1443 msgid "``KEY_IC``" msgstr "``KEY_IC``" -#: library/curses.rst:1441 +#: library/curses.rst:1443 msgid "Insert char or enter insert mode" msgstr "" -#: library/curses.rst:1443 +#: library/curses.rst:1445 msgid "``KEY_EIC``" msgstr "``KEY_EIC``" -#: library/curses.rst:1443 +#: library/curses.rst:1445 msgid "Exit insert char mode" msgstr "" -#: library/curses.rst:1445 +#: library/curses.rst:1447 msgid "``KEY_CLEAR``" msgstr "``KEY_CLEAR``" -#: library/curses.rst:1445 +#: library/curses.rst:1447 msgid "Clear screen" msgstr "" -#: library/curses.rst:1447 +#: library/curses.rst:1449 msgid "``KEY_EOS``" msgstr "``KEY_EOS``" -#: library/curses.rst:1447 +#: library/curses.rst:1449 msgid "Clear to end of screen" msgstr "" -#: library/curses.rst:1449 +#: library/curses.rst:1451 msgid "``KEY_EOL``" msgstr "``KEY_EOL``" -#: library/curses.rst:1449 +#: library/curses.rst:1451 msgid "Clear to end of line" msgstr "" -#: library/curses.rst:1451 +#: library/curses.rst:1453 msgid "``KEY_SF``" msgstr "``KEY_SF``" -#: library/curses.rst:1451 +#: library/curses.rst:1453 msgid "Scroll 1 line forward" msgstr "" -#: library/curses.rst:1453 +#: library/curses.rst:1455 msgid "``KEY_SR``" msgstr "``KEY_SR``" -#: library/curses.rst:1453 +#: library/curses.rst:1455 msgid "Scroll 1 line backward (reverse)" msgstr "" -#: library/curses.rst:1455 +#: library/curses.rst:1457 msgid "``KEY_NPAGE``" msgstr "``KEY_NPAGE``" -#: library/curses.rst:1455 +#: library/curses.rst:1457 msgid "Next page" msgstr "" -#: library/curses.rst:1457 +#: library/curses.rst:1459 msgid "``KEY_PPAGE``" msgstr "``KEY_PPAGE``" -#: library/curses.rst:1457 +#: library/curses.rst:1459 msgid "Previous page" msgstr "" -#: library/curses.rst:1459 +#: library/curses.rst:1461 msgid "``KEY_STAB``" msgstr "``KEY_STAB``" -#: library/curses.rst:1459 +#: library/curses.rst:1461 msgid "Set tab" msgstr "" -#: library/curses.rst:1461 +#: library/curses.rst:1463 msgid "``KEY_CTAB``" msgstr "``KEY_CTAB``" -#: library/curses.rst:1461 +#: library/curses.rst:1463 msgid "Clear tab" msgstr "" -#: library/curses.rst:1463 +#: library/curses.rst:1465 msgid "``KEY_CATAB``" msgstr "``KEY_CATAB``" -#: library/curses.rst:1463 +#: library/curses.rst:1465 msgid "Clear all tabs" msgstr "" -#: library/curses.rst:1465 +#: library/curses.rst:1467 msgid "``KEY_ENTER``" msgstr "``KEY_ENTER``" -#: library/curses.rst:1465 +#: library/curses.rst:1467 msgid "Enter or send (unreliable)" msgstr "" -#: library/curses.rst:1467 +#: library/curses.rst:1469 msgid "``KEY_SRESET``" msgstr "``KEY_SRESET``" -#: library/curses.rst:1467 +#: library/curses.rst:1469 msgid "Soft (partial) reset (unreliable)" msgstr "" -#: library/curses.rst:1469 +#: library/curses.rst:1471 msgid "``KEY_RESET``" msgstr "``KEY_RESET``" -#: library/curses.rst:1469 +#: library/curses.rst:1471 msgid "Reset or hard reset (unreliable)" msgstr "" -#: library/curses.rst:1471 +#: library/curses.rst:1473 msgid "``KEY_PRINT``" msgstr "``KEY_PRINT``" -#: library/curses.rst:1471 +#: library/curses.rst:1473 msgid "Print" msgstr "" -#: library/curses.rst:1473 +#: library/curses.rst:1475 msgid "``KEY_LL``" msgstr "``KEY_LL``" -#: library/curses.rst:1473 +#: library/curses.rst:1475 msgid "Home down or bottom (lower left)" msgstr "" -#: library/curses.rst:1475 +#: library/curses.rst:1477 msgid "``KEY_A1``" msgstr "``KEY_A1``" -#: library/curses.rst:1475 +#: library/curses.rst:1477 msgid "Upper left of keypad" msgstr "" -#: library/curses.rst:1477 +#: library/curses.rst:1479 msgid "``KEY_A3``" msgstr "``KEY_A3``" -#: library/curses.rst:1477 +#: library/curses.rst:1479 msgid "Upper right of keypad" msgstr "" -#: library/curses.rst:1479 +#: library/curses.rst:1481 msgid "``KEY_B2``" msgstr "``KEY_B2``" -#: library/curses.rst:1479 +#: library/curses.rst:1481 msgid "Center of keypad" msgstr "" -#: library/curses.rst:1481 +#: library/curses.rst:1483 msgid "``KEY_C1``" msgstr "``KEY_C1``" -#: library/curses.rst:1481 +#: library/curses.rst:1483 msgid "Lower left of keypad" msgstr "" -#: library/curses.rst:1483 +#: library/curses.rst:1485 msgid "``KEY_C3``" msgstr "``KEY_C3``" -#: library/curses.rst:1483 +#: library/curses.rst:1485 msgid "Lower right of keypad" msgstr "" -#: library/curses.rst:1485 +#: library/curses.rst:1487 msgid "``KEY_BTAB``" msgstr "``KEY_BTAB``" -#: library/curses.rst:1485 +#: library/curses.rst:1487 msgid "Back tab" msgstr "" -#: library/curses.rst:1487 +#: library/curses.rst:1489 msgid "``KEY_BEG``" msgstr "``KEY_BEG``" -#: library/curses.rst:1487 +#: library/curses.rst:1489 msgid "Beg (beginning)" msgstr "" -#: library/curses.rst:1489 +#: library/curses.rst:1491 msgid "``KEY_CANCEL``" msgstr "``KEY_CANCEL``" -#: library/curses.rst:1489 +#: library/curses.rst:1491 msgid "Cancel" msgstr "" -#: library/curses.rst:1491 +#: library/curses.rst:1493 msgid "``KEY_CLOSE``" msgstr "``KEY_CLOSE``" -#: library/curses.rst:1491 +#: library/curses.rst:1493 msgid "Close" msgstr "*Close*" -#: library/curses.rst:1493 +#: library/curses.rst:1495 msgid "``KEY_COMMAND``" msgstr "``KEY_COMMAND``" -#: library/curses.rst:1493 +#: library/curses.rst:1495 msgid "Cmd (command)" msgstr "" -#: library/curses.rst:1495 +#: library/curses.rst:1497 msgid "``KEY_COPY``" msgstr "``KEY_COPY``" -#: library/curses.rst:1495 +#: library/curses.rst:1497 msgid "Copy" msgstr "*Copy*" -#: library/curses.rst:1497 +#: library/curses.rst:1499 msgid "``KEY_CREATE``" msgstr "``KEY_CREATE``" -#: library/curses.rst:1497 +#: library/curses.rst:1499 msgid "Create" msgstr "" -#: library/curses.rst:1499 +#: library/curses.rst:1501 msgid "``KEY_END``" msgstr "``KEY_END``" -#: library/curses.rst:1499 +#: library/curses.rst:1501 msgid "End" msgstr "" -#: library/curses.rst:1501 +#: library/curses.rst:1503 msgid "``KEY_EXIT``" msgstr "``KEY_EXIT``" -#: library/curses.rst:1501 +#: library/curses.rst:1503 msgid "Exit" msgstr "*Exit*" -#: library/curses.rst:1503 +#: library/curses.rst:1505 msgid "``KEY_FIND``" msgstr "``KEY_FIND``" -#: library/curses.rst:1503 +#: library/curses.rst:1505 msgid "Find" msgstr "" -#: library/curses.rst:1505 +#: library/curses.rst:1507 msgid "``KEY_HELP``" msgstr "``KEY_HELP``" -#: library/curses.rst:1505 +#: library/curses.rst:1507 msgid "Help" msgstr "" -#: library/curses.rst:1507 +#: library/curses.rst:1509 msgid "``KEY_MARK``" msgstr "``KEY_MARK``" -#: library/curses.rst:1507 +#: library/curses.rst:1509 msgid "Mark" msgstr "" -#: library/curses.rst:1509 +#: library/curses.rst:1511 msgid "``KEY_MESSAGE``" msgstr "``KEY_MESSAGE``" -#: library/curses.rst:1509 +#: library/curses.rst:1511 msgid "Message" msgstr "" -#: library/curses.rst:1511 +#: library/curses.rst:1513 msgid "``KEY_MOVE``" msgstr "``KEY_MOVE``" -#: library/curses.rst:1511 +#: library/curses.rst:1513 msgid "Move" msgstr "" -#: library/curses.rst:1513 +#: library/curses.rst:1515 msgid "``KEY_NEXT``" msgstr "``KEY_NEXT``" -#: library/curses.rst:1513 +#: library/curses.rst:1515 msgid "Next" msgstr "" -#: library/curses.rst:1515 +#: library/curses.rst:1517 msgid "``KEY_OPEN``" msgstr "``KEY_OPEN``" -#: library/curses.rst:1515 +#: library/curses.rst:1517 msgid "Open" msgstr "" -#: library/curses.rst:1517 +#: library/curses.rst:1519 msgid "``KEY_OPTIONS``" msgstr "``KEY_OPTIONS``" -#: library/curses.rst:1517 +#: library/curses.rst:1519 msgid "Options" msgstr "Options" -#: library/curses.rst:1519 +#: library/curses.rst:1521 msgid "``KEY_PREVIOUS``" msgstr "``KEY_PREVIOUS``" -#: library/curses.rst:1519 +#: library/curses.rst:1521 msgid "Prev (previous)" msgstr "" -#: library/curses.rst:1521 +#: library/curses.rst:1523 msgid "``KEY_REDO``" msgstr "``KEY_REDO``" -#: library/curses.rst:1521 +#: library/curses.rst:1523 msgid "Redo" msgstr "*Redo*" -#: library/curses.rst:1523 +#: library/curses.rst:1525 msgid "``KEY_REFERENCE``" msgstr "``KEY_REFERENCE``" -#: library/curses.rst:1523 +#: library/curses.rst:1525 msgid "Ref (reference)" msgstr "" -#: library/curses.rst:1525 +#: library/curses.rst:1527 msgid "``KEY_REFRESH``" msgstr "``KEY_REFRESH``" -#: library/curses.rst:1525 +#: library/curses.rst:1527 msgid "Refresh" msgstr "" -#: library/curses.rst:1527 +#: library/curses.rst:1529 msgid "``KEY_REPLACE``" msgstr "``KEY_REPLACE``" -#: library/curses.rst:1527 +#: library/curses.rst:1529 msgid "Replace" msgstr "" -#: library/curses.rst:1529 +#: library/curses.rst:1531 msgid "``KEY_RESTART``" msgstr "``KEY_RESTART``" -#: library/curses.rst:1529 +#: library/curses.rst:1531 msgid "Restart" msgstr "" -#: library/curses.rst:1531 +#: library/curses.rst:1533 msgid "``KEY_RESUME``" msgstr "``KEY_RESUME``" -#: library/curses.rst:1531 +#: library/curses.rst:1533 msgid "Resume" msgstr "" -#: library/curses.rst:1533 +#: library/curses.rst:1535 msgid "``KEY_SAVE``" msgstr "``KEY_SAVE``" -#: library/curses.rst:1533 +#: library/curses.rst:1535 msgid "Save" msgstr "*Save*" -#: library/curses.rst:1535 +#: library/curses.rst:1537 msgid "``KEY_SBEG``" msgstr "``KEY_SBEG``" -#: library/curses.rst:1535 +#: library/curses.rst:1537 msgid "Shifted Beg (beginning)" msgstr "" -#: library/curses.rst:1537 +#: library/curses.rst:1539 msgid "``KEY_SCANCEL``" msgstr "``KEY_SCANCEL``" -#: library/curses.rst:1537 +#: library/curses.rst:1539 msgid "Shifted Cancel" msgstr "" -#: library/curses.rst:1539 +#: library/curses.rst:1541 msgid "``KEY_SCOMMAND``" msgstr "``KEY_SCOMMAND``" -#: library/curses.rst:1539 +#: library/curses.rst:1541 msgid "Shifted Command" msgstr "" -#: library/curses.rst:1541 +#: library/curses.rst:1543 msgid "``KEY_SCOPY``" msgstr "``KEY_SCOPY``" -#: library/curses.rst:1541 +#: library/curses.rst:1543 msgid "Shifted Copy" msgstr "" -#: library/curses.rst:1543 +#: library/curses.rst:1545 msgid "``KEY_SCREATE``" msgstr "``KEY_SCREATE``" -#: library/curses.rst:1543 +#: library/curses.rst:1545 msgid "Shifted Create" msgstr "" -#: library/curses.rst:1545 +#: library/curses.rst:1547 msgid "``KEY_SDC``" msgstr "``KEY_SDC``" -#: library/curses.rst:1545 +#: library/curses.rst:1547 msgid "Shifted Delete char" msgstr "" -#: library/curses.rst:1547 +#: library/curses.rst:1549 msgid "``KEY_SDL``" msgstr "``KEY_SDL``" -#: library/curses.rst:1547 +#: library/curses.rst:1549 msgid "Shifted Delete line" msgstr "" -#: library/curses.rst:1549 +#: library/curses.rst:1551 msgid "``KEY_SELECT``" msgstr "``KEY_SELECT``" -#: library/curses.rst:1549 +#: library/curses.rst:1551 msgid "Select" msgstr "" -#: library/curses.rst:1551 +#: library/curses.rst:1553 msgid "``KEY_SEND``" msgstr "``KEY_SEND``" -#: library/curses.rst:1551 +#: library/curses.rst:1553 msgid "Shifted End" msgstr "" -#: library/curses.rst:1553 +#: library/curses.rst:1555 msgid "``KEY_SEOL``" msgstr "``KEY_SEOL``" -#: library/curses.rst:1553 +#: library/curses.rst:1555 msgid "Shifted Clear line" msgstr "" -#: library/curses.rst:1555 +#: library/curses.rst:1557 msgid "``KEY_SEXIT``" msgstr "``KEY_SEXIT``" -#: library/curses.rst:1555 +#: library/curses.rst:1557 msgid "Shifted Exit" msgstr "" -#: library/curses.rst:1557 +#: library/curses.rst:1559 msgid "``KEY_SFIND``" msgstr "``KEY_SFIND``" -#: library/curses.rst:1557 +#: library/curses.rst:1559 msgid "Shifted Find" msgstr "" -#: library/curses.rst:1559 +#: library/curses.rst:1561 msgid "``KEY_SHELP``" msgstr "``KEY_SHELP``" -#: library/curses.rst:1559 +#: library/curses.rst:1561 msgid "Shifted Help" msgstr "" -#: library/curses.rst:1561 +#: library/curses.rst:1563 msgid "``KEY_SHOME``" msgstr "``KEY_SHOME``" -#: library/curses.rst:1561 +#: library/curses.rst:1563 msgid "Shifted Home" msgstr "" -#: library/curses.rst:1563 +#: library/curses.rst:1565 msgid "``KEY_SIC``" msgstr "``KEY_SIC``" -#: library/curses.rst:1563 +#: library/curses.rst:1565 msgid "Shifted Input" msgstr "" -#: library/curses.rst:1565 +#: library/curses.rst:1567 msgid "``KEY_SLEFT``" msgstr "``KEY_SLEFT``" -#: library/curses.rst:1565 +#: library/curses.rst:1567 msgid "Shifted Left arrow" msgstr "" -#: library/curses.rst:1567 +#: library/curses.rst:1569 msgid "``KEY_SMESSAGE``" msgstr "``KEY_SMESSAGE``" -#: library/curses.rst:1567 +#: library/curses.rst:1569 msgid "Shifted Message" msgstr "" -#: library/curses.rst:1569 +#: library/curses.rst:1571 msgid "``KEY_SMOVE``" msgstr "``KEY_SMOVE``" -#: library/curses.rst:1569 +#: library/curses.rst:1571 msgid "Shifted Move" msgstr "" -#: library/curses.rst:1571 +#: library/curses.rst:1573 msgid "``KEY_SNEXT``" msgstr "``KEY_SNEXT``" -#: library/curses.rst:1571 +#: library/curses.rst:1573 msgid "Shifted Next" msgstr "" -#: library/curses.rst:1573 +#: library/curses.rst:1575 msgid "``KEY_SOPTIONS``" msgstr "``KEY_SOPTIONS``" -#: library/curses.rst:1573 +#: library/curses.rst:1575 msgid "Shifted Options" msgstr "" -#: library/curses.rst:1575 +#: library/curses.rst:1577 msgid "``KEY_SPREVIOUS``" msgstr "``KEY_SPREVIOUS``" -#: library/curses.rst:1575 +#: library/curses.rst:1577 msgid "Shifted Prev" msgstr "" -#: library/curses.rst:1577 +#: library/curses.rst:1579 msgid "``KEY_SPRINT``" msgstr "``KEY_SPRINT``" -#: library/curses.rst:1577 +#: library/curses.rst:1579 msgid "Shifted Print" msgstr "" -#: library/curses.rst:1579 +#: library/curses.rst:1581 msgid "``KEY_SREDO``" msgstr "``KEY_SREDO``" -#: library/curses.rst:1579 +#: library/curses.rst:1581 msgid "Shifted Redo" msgstr "" -#: library/curses.rst:1581 +#: library/curses.rst:1583 msgid "``KEY_SREPLACE``" msgstr "``KEY_SREPLACE``" -#: library/curses.rst:1581 +#: library/curses.rst:1583 msgid "Shifted Replace" msgstr "" -#: library/curses.rst:1583 +#: library/curses.rst:1585 msgid "``KEY_SRIGHT``" msgstr "``KEY_SRIGHT``" -#: library/curses.rst:1583 +#: library/curses.rst:1585 msgid "Shifted Right arrow" msgstr "" -#: library/curses.rst:1585 +#: library/curses.rst:1587 msgid "``KEY_SRSUME``" msgstr "``KEY_SRSUME``" -#: library/curses.rst:1585 +#: library/curses.rst:1587 msgid "Shifted Resume" msgstr "" -#: library/curses.rst:1587 +#: library/curses.rst:1589 msgid "``KEY_SSAVE``" msgstr "``KEY_SSAVE``" -#: library/curses.rst:1587 +#: library/curses.rst:1589 msgid "Shifted Save" msgstr "" -#: library/curses.rst:1589 +#: library/curses.rst:1591 msgid "``KEY_SSUSPEND``" msgstr "``KEY_SSUSPEND``" -#: library/curses.rst:1589 +#: library/curses.rst:1591 msgid "Shifted Suspend" msgstr "" -#: library/curses.rst:1591 +#: library/curses.rst:1593 msgid "``KEY_SUNDO``" msgstr "``KEY_SUNDO``" -#: library/curses.rst:1591 +#: library/curses.rst:1593 msgid "Shifted Undo" msgstr "" -#: library/curses.rst:1593 +#: library/curses.rst:1595 msgid "``KEY_SUSPEND``" msgstr "``KEY_SUSPEND``" -#: library/curses.rst:1593 +#: library/curses.rst:1595 msgid "Suspend" msgstr "" -#: library/curses.rst:1595 +#: library/curses.rst:1597 msgid "``KEY_UNDO``" msgstr "``KEY_UNDO``" -#: library/curses.rst:1595 +#: library/curses.rst:1597 msgid "Undo" msgstr "*Undo*" -#: library/curses.rst:1597 +#: library/curses.rst:1599 msgid "``KEY_MOUSE``" msgstr "``KEY_MOUSE``" -#: library/curses.rst:1597 +#: library/curses.rst:1599 msgid "Mouse event has occurred" msgstr "" -#: library/curses.rst:1599 +#: library/curses.rst:1601 msgid "``KEY_RESIZE``" msgstr "``KEY_RESIZE``" -#: library/curses.rst:1599 +#: library/curses.rst:1601 msgid "Terminal resize event" msgstr "" -#: library/curses.rst:1601 +#: library/curses.rst:1603 msgid "``KEY_MAX``" msgstr "``KEY_MAX``" -#: library/curses.rst:1601 +#: library/curses.rst:1603 msgid "Maximum key value" msgstr "" -#: library/curses.rst:1604 +#: library/curses.rst:1606 msgid "" "On VT100s and their software emulations, such as X terminal emulators, there " "are normally at least four function keys (:const:`KEY_F1`, :const:`KEY_F2`, :" @@ -2444,63 +2452,63 @@ msgid "" "function keys); also, the following keypad mappings are standard:" msgstr "" -#: library/curses.rst:1613 +#: library/curses.rst:1615 msgid "Keycap" msgstr "" -#: library/curses.rst:1730 library/curses.rst:1854 +#: library/curses.rst:1732 library/curses.rst:1856 msgid "Constant" msgstr "Constante" -#: library/curses.rst:1615 +#: library/curses.rst:1617 msgid ":kbd:`Insert`" msgstr ":kbd:`Insert`" -#: library/curses.rst:1615 +#: library/curses.rst:1617 msgid "KEY_IC" msgstr "" -#: library/curses.rst:1617 +#: library/curses.rst:1619 msgid ":kbd:`Delete`" msgstr ":kbd:`Delete`" -#: library/curses.rst:1617 +#: library/curses.rst:1619 msgid "KEY_DC" msgstr "" -#: library/curses.rst:1619 +#: library/curses.rst:1621 msgid ":kbd:`Home`" msgstr ":kbd:`Home`" -#: library/curses.rst:1619 +#: library/curses.rst:1621 msgid "KEY_HOME" msgstr "KEY_HOME" -#: library/curses.rst:1621 +#: library/curses.rst:1623 msgid ":kbd:`End`" msgstr ":kbd:`End`" -#: library/curses.rst:1621 +#: library/curses.rst:1623 msgid "KEY_END" msgstr "KEY_END" -#: library/curses.rst:1623 +#: library/curses.rst:1625 msgid ":kbd:`Page Up`" msgstr ":kbd:`Page Up`" -#: library/curses.rst:1623 +#: library/curses.rst:1625 msgid "KEY_PPAGE" msgstr "KEY_PPAGE" -#: library/curses.rst:1625 +#: library/curses.rst:1627 msgid ":kbd:`Page Down`" msgstr ":kbd:`Page Down`" -#: library/curses.rst:1625 +#: library/curses.rst:1627 msgid "KEY_NPAGE" msgstr "KEY_NPAGE" -#: library/curses.rst:1628 +#: library/curses.rst:1630 msgid "" "The following table lists characters from the alternate character set. These " "are inherited from the VT100 terminal, and will generally be available on " @@ -2508,435 +2516,435 @@ msgid "" "available, curses falls back on a crude printable ASCII approximation." msgstr "" -#: library/curses.rst:1635 +#: library/curses.rst:1637 msgid "These are available only after :func:`initscr` has been called." msgstr "" -#: library/curses.rst:1638 +#: library/curses.rst:1640 msgid "ACS code" msgstr "" -#: library/curses.rst:1640 +#: library/curses.rst:1642 msgid "``ACS_BBSS``" msgstr "``ACS_BBSS``" -#: library/curses.rst:1640 +#: library/curses.rst:1642 msgid "alternate name for upper right corner" msgstr "" -#: library/curses.rst:1642 +#: library/curses.rst:1644 msgid "``ACS_BLOCK``" msgstr "``ACS_BLOCK``" -#: library/curses.rst:1642 +#: library/curses.rst:1644 msgid "solid square block" msgstr "" -#: library/curses.rst:1644 +#: library/curses.rst:1646 msgid "``ACS_BOARD``" msgstr "``ACS_BOARD``" -#: library/curses.rst:1644 +#: library/curses.rst:1646 msgid "board of squares" msgstr "" -#: library/curses.rst:1646 +#: library/curses.rst:1648 msgid "``ACS_BSBS``" msgstr "``ACS_BSBS``" -#: library/curses.rst:1646 +#: library/curses.rst:1648 msgid "alternate name for horizontal line" msgstr "" -#: library/curses.rst:1648 +#: library/curses.rst:1650 msgid "``ACS_BSSB``" msgstr "``ACS_BSSB``" -#: library/curses.rst:1648 +#: library/curses.rst:1650 msgid "alternate name for upper left corner" msgstr "" -#: library/curses.rst:1650 +#: library/curses.rst:1652 msgid "``ACS_BSSS``" msgstr "``ACS_BSSS``" -#: library/curses.rst:1650 +#: library/curses.rst:1652 msgid "alternate name for top tee" msgstr "" -#: library/curses.rst:1652 +#: library/curses.rst:1654 msgid "``ACS_BTEE``" msgstr "``ACS_BTEE``" -#: library/curses.rst:1652 +#: library/curses.rst:1654 msgid "bottom tee" msgstr "" -#: library/curses.rst:1654 +#: library/curses.rst:1656 msgid "``ACS_BULLET``" msgstr "``ACS_BULLET``" -#: library/curses.rst:1654 +#: library/curses.rst:1656 msgid "bullet" msgstr "" -#: library/curses.rst:1656 +#: library/curses.rst:1658 msgid "``ACS_CKBOARD``" msgstr "``ACS_CKBOARD``" -#: library/curses.rst:1656 +#: library/curses.rst:1658 msgid "checker board (stipple)" msgstr "" -#: library/curses.rst:1658 +#: library/curses.rst:1660 msgid "``ACS_DARROW``" msgstr "``ACS_DARROW``" -#: library/curses.rst:1658 +#: library/curses.rst:1660 msgid "arrow pointing down" msgstr "" -#: library/curses.rst:1660 +#: library/curses.rst:1662 msgid "``ACS_DEGREE``" msgstr "``ACS_DEGREE``" -#: library/curses.rst:1660 +#: library/curses.rst:1662 msgid "degree symbol" msgstr "" -#: library/curses.rst:1662 +#: library/curses.rst:1664 msgid "``ACS_DIAMOND``" msgstr "``ACS_DIAMOND``" -#: library/curses.rst:1662 +#: library/curses.rst:1664 msgid "diamond" msgstr "" -#: library/curses.rst:1664 +#: library/curses.rst:1666 msgid "``ACS_GEQUAL``" msgstr "``ACS_GEQUAL``" -#: library/curses.rst:1664 +#: library/curses.rst:1666 msgid "greater-than-or-equal-to" msgstr "" -#: library/curses.rst:1666 +#: library/curses.rst:1668 msgid "``ACS_HLINE``" msgstr "``ACS_HLINE``" -#: library/curses.rst:1666 +#: library/curses.rst:1668 msgid "horizontal line" msgstr "" -#: library/curses.rst:1668 +#: library/curses.rst:1670 msgid "``ACS_LANTERN``" msgstr "``ACS_LANTERN``" -#: library/curses.rst:1668 +#: library/curses.rst:1670 msgid "lantern symbol" msgstr "" -#: library/curses.rst:1670 +#: library/curses.rst:1672 msgid "``ACS_LARROW``" msgstr "``ACS_LARROW``" -#: library/curses.rst:1670 +#: library/curses.rst:1672 msgid "left arrow" msgstr "" -#: library/curses.rst:1672 +#: library/curses.rst:1674 msgid "``ACS_LEQUAL``" msgstr "``ACS_LEQUAL``" -#: library/curses.rst:1672 +#: library/curses.rst:1674 msgid "less-than-or-equal-to" msgstr "" -#: library/curses.rst:1674 +#: library/curses.rst:1676 msgid "``ACS_LLCORNER``" msgstr "``ACS_LLCORNER``" -#: library/curses.rst:1674 +#: library/curses.rst:1676 msgid "lower left-hand corner" msgstr "" -#: library/curses.rst:1676 +#: library/curses.rst:1678 msgid "``ACS_LRCORNER``" msgstr "``ACS_LRCORNER``" -#: library/curses.rst:1676 +#: library/curses.rst:1678 msgid "lower right-hand corner" msgstr "" -#: library/curses.rst:1678 +#: library/curses.rst:1680 msgid "``ACS_LTEE``" msgstr "``ACS_LTEE``" -#: library/curses.rst:1678 +#: library/curses.rst:1680 msgid "left tee" msgstr "" -#: library/curses.rst:1680 +#: library/curses.rst:1682 msgid "``ACS_NEQUAL``" msgstr "``ACS_NEQUAL``" -#: library/curses.rst:1680 +#: library/curses.rst:1682 msgid "not-equal sign" msgstr "" -#: library/curses.rst:1682 +#: library/curses.rst:1684 msgid "``ACS_PI``" msgstr "``ACS_PI``" -#: library/curses.rst:1682 +#: library/curses.rst:1684 msgid "letter pi" msgstr "" -#: library/curses.rst:1684 +#: library/curses.rst:1686 msgid "``ACS_PLMINUS``" msgstr "``ACS_PLMINUS``" -#: library/curses.rst:1684 +#: library/curses.rst:1686 msgid "plus-or-minus sign" msgstr "" -#: library/curses.rst:1686 +#: library/curses.rst:1688 msgid "``ACS_PLUS``" msgstr "``ACS_PLUS``" -#: library/curses.rst:1686 +#: library/curses.rst:1688 msgid "big plus sign" msgstr "" -#: library/curses.rst:1688 +#: library/curses.rst:1690 msgid "``ACS_RARROW``" msgstr "``ACS_RARROW``" -#: library/curses.rst:1688 +#: library/curses.rst:1690 msgid "right arrow" msgstr "" -#: library/curses.rst:1690 +#: library/curses.rst:1692 msgid "``ACS_RTEE``" msgstr "``ACS_RTEE``" -#: library/curses.rst:1690 +#: library/curses.rst:1692 msgid "right tee" msgstr "" -#: library/curses.rst:1692 +#: library/curses.rst:1694 msgid "``ACS_S1``" msgstr "``ACS_S1``" -#: library/curses.rst:1692 +#: library/curses.rst:1694 msgid "scan line 1" msgstr "" -#: library/curses.rst:1694 +#: library/curses.rst:1696 msgid "``ACS_S3``" msgstr "``ACS_S3``" -#: library/curses.rst:1694 +#: library/curses.rst:1696 msgid "scan line 3" msgstr "" -#: library/curses.rst:1696 +#: library/curses.rst:1698 msgid "``ACS_S7``" msgstr "``ACS_S7``" -#: library/curses.rst:1696 +#: library/curses.rst:1698 msgid "scan line 7" msgstr "" -#: library/curses.rst:1698 +#: library/curses.rst:1700 msgid "``ACS_S9``" msgstr "``ACS_S9``" -#: library/curses.rst:1698 +#: library/curses.rst:1700 msgid "scan line 9" msgstr "" -#: library/curses.rst:1700 +#: library/curses.rst:1702 msgid "``ACS_SBBS``" msgstr "``ACS_SBBS``" -#: library/curses.rst:1700 +#: library/curses.rst:1702 msgid "alternate name for lower right corner" msgstr "" -#: library/curses.rst:1702 +#: library/curses.rst:1704 msgid "``ACS_SBSB``" msgstr "``ACS_SBSB``" -#: library/curses.rst:1702 +#: library/curses.rst:1704 msgid "alternate name for vertical line" msgstr "" -#: library/curses.rst:1704 +#: library/curses.rst:1706 msgid "``ACS_SBSS``" msgstr "``ACS_SBSS``" -#: library/curses.rst:1704 +#: library/curses.rst:1706 msgid "alternate name for right tee" msgstr "" -#: library/curses.rst:1706 +#: library/curses.rst:1708 msgid "``ACS_SSBB``" msgstr "``ACS_SSBB``" -#: library/curses.rst:1706 +#: library/curses.rst:1708 msgid "alternate name for lower left corner" msgstr "" -#: library/curses.rst:1708 +#: library/curses.rst:1710 msgid "``ACS_SSBS``" msgstr "``ACS_SSBS``" -#: library/curses.rst:1708 +#: library/curses.rst:1710 msgid "alternate name for bottom tee" msgstr "" -#: library/curses.rst:1710 +#: library/curses.rst:1712 msgid "``ACS_SSSB``" msgstr "``ACS_SSSB``" -#: library/curses.rst:1710 +#: library/curses.rst:1712 msgid "alternate name for left tee" msgstr "" -#: library/curses.rst:1712 +#: library/curses.rst:1714 msgid "``ACS_SSSS``" msgstr "``ACS_SSSS``" -#: library/curses.rst:1712 +#: library/curses.rst:1714 msgid "alternate name for crossover or big plus" msgstr "" -#: library/curses.rst:1714 +#: library/curses.rst:1716 msgid "``ACS_STERLING``" msgstr "``ACS_STERLING``" -#: library/curses.rst:1714 +#: library/curses.rst:1716 msgid "pound sterling" msgstr "" -#: library/curses.rst:1716 +#: library/curses.rst:1718 msgid "``ACS_TTEE``" msgstr "``ACS_TTEE``" -#: library/curses.rst:1716 +#: library/curses.rst:1718 msgid "top tee" msgstr "" -#: library/curses.rst:1718 +#: library/curses.rst:1720 msgid "``ACS_UARROW``" msgstr "``ACS_UARROW``" -#: library/curses.rst:1718 +#: library/curses.rst:1720 msgid "up arrow" msgstr "" -#: library/curses.rst:1720 +#: library/curses.rst:1722 msgid "``ACS_ULCORNER``" msgstr "``ACS_ULCORNER``" -#: library/curses.rst:1720 +#: library/curses.rst:1722 msgid "upper left corner" msgstr "" -#: library/curses.rst:1722 +#: library/curses.rst:1724 msgid "``ACS_URCORNER``" msgstr "``ACS_URCORNER``" -#: library/curses.rst:1722 +#: library/curses.rst:1724 msgid "upper right corner" msgstr "" -#: library/curses.rst:1724 +#: library/curses.rst:1726 msgid "``ACS_VLINE``" msgstr "``ACS_VLINE``" -#: library/curses.rst:1724 +#: library/curses.rst:1726 msgid "vertical line" msgstr "" -#: library/curses.rst:1727 +#: library/curses.rst:1729 msgid "The following table lists the predefined colors:" msgstr "" -#: library/curses.rst:1730 +#: library/curses.rst:1732 msgid "Color" msgstr "" -#: library/curses.rst:1732 +#: library/curses.rst:1734 msgid "``COLOR_BLACK``" msgstr "``COLOR_BLACK``" -#: library/curses.rst:1732 +#: library/curses.rst:1734 msgid "Black" msgstr "" -#: library/curses.rst:1734 +#: library/curses.rst:1736 msgid "``COLOR_BLUE``" msgstr "``COLOR_BLUE``" -#: library/curses.rst:1734 +#: library/curses.rst:1736 msgid "Blue" msgstr "" -#: library/curses.rst:1736 +#: library/curses.rst:1738 msgid "``COLOR_CYAN``" msgstr "``COLOR_CYAN``" -#: library/curses.rst:1736 +#: library/curses.rst:1738 msgid "Cyan (light greenish blue)" msgstr "" -#: library/curses.rst:1738 +#: library/curses.rst:1740 msgid "``COLOR_GREEN``" msgstr "``COLOR_GREEN``" -#: library/curses.rst:1738 +#: library/curses.rst:1740 msgid "Green" msgstr "" -#: library/curses.rst:1740 +#: library/curses.rst:1742 msgid "``COLOR_MAGENTA``" msgstr "``COLOR_MAGENTA``" -#: library/curses.rst:1740 +#: library/curses.rst:1742 msgid "Magenta (purplish red)" msgstr "" -#: library/curses.rst:1742 +#: library/curses.rst:1744 msgid "``COLOR_RED``" msgstr "``COLOR_RED``" -#: library/curses.rst:1742 +#: library/curses.rst:1744 msgid "Red" msgstr "" -#: library/curses.rst:1744 +#: library/curses.rst:1746 msgid "``COLOR_WHITE``" msgstr "``COLOR_WHITE``" -#: library/curses.rst:1744 +#: library/curses.rst:1746 msgid "White" msgstr "" -#: library/curses.rst:1746 +#: library/curses.rst:1748 msgid "``COLOR_YELLOW``" msgstr "``COLOR_YELLOW``" -#: library/curses.rst:1746 +#: library/curses.rst:1748 msgid "Yellow" msgstr "" -#: library/curses.rst:1751 +#: library/curses.rst:1753 msgid ":mod:`curses.textpad` --- Text input widget for curses programs" msgstr "" -#: library/curses.rst:1759 +#: library/curses.rst:1761 msgid "" "The :mod:`curses.textpad` module provides a :class:`Textbox` class that " "handles elementary text editing in a curses window, supporting a set of " @@ -2946,11 +2954,11 @@ msgid "" "purposes." msgstr "" -#: library/curses.rst:1765 +#: library/curses.rst:1767 msgid "The module :mod:`curses.textpad` defines the following function:" msgstr "" -#: library/curses.rst:1770 +#: library/curses.rst:1772 msgid "" "Draw a rectangle. The first argument must be a window object; the remaining " "arguments are coordinates relative to that window. The second and third " @@ -2962,15 +2970,15 @@ msgid "" "will be drawn with ASCII dashes, vertical bars, and plus signs." msgstr "" -#: library/curses.rst:1783 +#: library/curses.rst:1785 msgid "Textbox objects" msgstr "" -#: library/curses.rst:1785 +#: library/curses.rst:1787 msgid "You can instantiate a :class:`Textbox` object as follows:" msgstr "" -#: library/curses.rst:1790 +#: library/curses.rst:1792 msgid "" "Return a textbox widget object. The *win* argument should be a curses :ref:" "`window ` object in which the textbox is to be " @@ -2979,13 +2987,13 @@ msgid "" "instance's :attr:`stripspaces` flag is initially on." msgstr "" -#: library/curses.rst:1796 +#: library/curses.rst:1798 #, fuzzy msgid ":class:`Textbox` objects have the following methods:" msgstr "" "Les objets de la classe :class:`TestLoader` ont les attributs suivants :" -#: library/curses.rst:1801 +#: library/curses.rst:1803 msgid "" "This is the entry point you will normally use. It accepts editing " "keystrokes until one of the termination keystrokes is entered. If " @@ -2996,167 +3004,167 @@ msgid "" "`stripspaces` attribute." msgstr "" -#: library/curses.rst:1812 +#: library/curses.rst:1814 msgid "" "Process a single command keystroke. Here are the supported special " "keystrokes:" msgstr "" -#: library/curses.rst:1854 +#: library/curses.rst:1856 msgid "Keystroke" msgstr "" -#: library/curses.rst:1816 +#: library/curses.rst:1818 msgid "Action" msgstr "Action" -#: library/curses.rst:1818 +#: library/curses.rst:1820 msgid ":kbd:`Control-A`" msgstr ":kbd:`Control-A`" -#: library/curses.rst:1818 +#: library/curses.rst:1820 msgid "Go to left edge of window." msgstr "" -#: library/curses.rst:1856 +#: library/curses.rst:1858 msgid ":kbd:`Control-B`" msgstr ":kbd:`Control-B`" -#: library/curses.rst:1820 +#: library/curses.rst:1822 msgid "Cursor left, wrapping to previous line if appropriate." msgstr "" -#: library/curses.rst:1823 +#: library/curses.rst:1825 msgid ":kbd:`Control-D`" msgstr ":kbd:`Control-D`" -#: library/curses.rst:1823 +#: library/curses.rst:1825 msgid "Delete character under cursor." msgstr "" -#: library/curses.rst:1825 +#: library/curses.rst:1827 msgid ":kbd:`Control-E`" msgstr ":kbd:`Control-E`" -#: library/curses.rst:1825 +#: library/curses.rst:1827 msgid "Go to right edge (stripspaces off) or end of line (stripspaces on)." msgstr "" -#: library/curses.rst:1858 +#: library/curses.rst:1860 msgid ":kbd:`Control-F`" msgstr ":kbd:`Control-F`" -#: library/curses.rst:1828 +#: library/curses.rst:1830 msgid "Cursor right, wrapping to next line when appropriate." msgstr "" -#: library/curses.rst:1831 +#: library/curses.rst:1833 msgid ":kbd:`Control-G`" msgstr ":kbd:`Control-G`" -#: library/curses.rst:1831 +#: library/curses.rst:1833 msgid "Terminate, returning the window contents." msgstr "" -#: library/curses.rst:1833 +#: library/curses.rst:1835 msgid ":kbd:`Control-H`" msgstr ":kbd:`Control-H`" -#: library/curses.rst:1833 +#: library/curses.rst:1835 msgid "Delete character backward." msgstr "" -#: library/curses.rst:1835 +#: library/curses.rst:1837 msgid ":kbd:`Control-J`" msgstr ":kbd:`Control-J`" -#: library/curses.rst:1835 +#: library/curses.rst:1837 msgid "Terminate if the window is 1 line, otherwise insert newline." msgstr "" -#: library/curses.rst:1838 +#: library/curses.rst:1840 msgid ":kbd:`Control-K`" msgstr ":kbd:`Control-K`" -#: library/curses.rst:1838 +#: library/curses.rst:1840 msgid "If line is blank, delete it, otherwise clear to end of line." msgstr "" -#: library/curses.rst:1841 +#: library/curses.rst:1843 msgid ":kbd:`Control-L`" msgstr ":kbd:`Control-L`" -#: library/curses.rst:1841 +#: library/curses.rst:1843 msgid "Refresh screen." msgstr "" -#: library/curses.rst:1862 +#: library/curses.rst:1864 msgid ":kbd:`Control-N`" msgstr ":kbd:`Control-N`" -#: library/curses.rst:1843 +#: library/curses.rst:1845 msgid "Cursor down; move down one line." msgstr "" -#: library/curses.rst:1845 +#: library/curses.rst:1847 msgid ":kbd:`Control-O`" msgstr ":kbd:`Control-O`" -#: library/curses.rst:1845 +#: library/curses.rst:1847 msgid "Insert a blank line at cursor location." msgstr "" -#: library/curses.rst:1860 +#: library/curses.rst:1862 msgid ":kbd:`Control-P`" msgstr ":kbd:`Control-P`" -#: library/curses.rst:1847 +#: library/curses.rst:1849 msgid "Cursor up; move up one line." msgstr "" -#: library/curses.rst:1850 +#: library/curses.rst:1852 msgid "" "Move operations do nothing if the cursor is at an edge where the movement is " "not possible. The following synonyms are supported where possible:" msgstr "" -#: library/curses.rst:1856 +#: library/curses.rst:1858 msgid ":const:`KEY_LEFT`" msgstr ":const:`KEY_LEFT`" -#: library/curses.rst:1858 +#: library/curses.rst:1860 msgid ":const:`KEY_RIGHT`" msgstr ":const:`KEY_RIGHT`" -#: library/curses.rst:1860 +#: library/curses.rst:1862 msgid ":const:`KEY_UP`" msgstr ":const:`KEY_UP`" -#: library/curses.rst:1862 +#: library/curses.rst:1864 msgid ":const:`KEY_DOWN`" msgstr ":const:`KEY_DOWN`" -#: library/curses.rst:1864 +#: library/curses.rst:1866 msgid ":const:`KEY_BACKSPACE`" msgstr ":const:`KEY_BACKSPACE`" -#: library/curses.rst:1864 +#: library/curses.rst:1866 msgid ":kbd:`Control-h`" msgstr ":kbd:`Control-h`" -#: library/curses.rst:1867 +#: library/curses.rst:1869 msgid "" "All other keystrokes are treated as a command to insert the given character " "and move right (with line wrapping)." msgstr "" -#: library/curses.rst:1873 +#: library/curses.rst:1875 msgid "" "Return the window contents as a string; whether blanks in the window are " "included is affected by the :attr:`stripspaces` member." msgstr "" -#: library/curses.rst:1879 +#: library/curses.rst:1881 msgid "" "This attribute is a flag which controls the interpretation of blanks in the " "window. When it is on, trailing blanks on each line are ignored; any cursor " diff --git a/library/dataclasses.po b/library/dataclasses.po index 174c818a0d..27921c68ec 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -5,15 +5,15 @@ 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-12-24 14:53+0100\n" -"Last-Translator: Julien Palard \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2021-10-28 11:44+0200\n" +"Last-Translator: David GIRAUD \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.1.1\n" +"X-Generator: Poedit 3.0\n" #: library/dataclasses.rst:2 msgid ":mod:`dataclasses` --- Data Classes" @@ -36,19 +36,18 @@ msgstr "" "l’utilisateur. Ces classes ont été décrites dans la :pep:`557`." #: library/dataclasses.rst:19 -#, fuzzy msgid "" "The member variables to use in these generated methods are defined using :" "pep:`526` type annotations. For example, this code::" msgstr "" "Les variables membres à utiliser dans ces méthodes générées sont définies en " -"utilisant les annotations de type :pep:`526`. Par exemple, ce code ::" +"utilisant les annotations de type :pep:`526`. Par exemple ::" #: library/dataclasses.rst:34 -#, fuzzy msgid "will add, among other things, a :meth:`__init__` that looks like::" msgstr "" -"Ajoute, entre autres choses, une méthode :meth:`__init__` qui ressemble à ::" +"ce code ajoute à la classe, entre autres choses, une méthode :meth:" +"`__init__` qui ressemble à ::" #: library/dataclasses.rst:41 msgid "" @@ -56,35 +55,33 @@ msgid "" "directly specified in the ``InventoryItem`` definition shown above." msgstr "" "Il est important de noter que cette méthode est ajoutée automatiquement dans " -"la classe : elle n’est pas à écrire dans la définition de ``InventoryItem`` " -"ci-dessus." +"la classe. Elle n’est jamais écrite dans la définition de ``InventoryItem``." #: library/dataclasses.rst:47 -msgid "Module-level decorators, classes, and functions" -msgstr "Décorateurs, classes et fonctions au niveau du module" +msgid "Module contents" +msgstr "Classe de données" #: library/dataclasses.rst:51 msgid "" "This function is a :term:`decorator` that is used to add generated :term:" "`special method`\\s to classes, as described below." msgstr "" -"Cette fonction est un :term:`décorateur` qui est utilisé pour ajouter les :" -"term:`méthodes spéciales ` générées aux classes, comme " -"décrit ci-dessous." +"Cette fonction est un :term:`décorateur ` qui ajoute aux classes " +"des :term:`méthodes spéciales ` générées automatiquement. " +"Voici une description plus détaillée." #: library/dataclasses.rst:54 -#, fuzzy msgid "" "The :func:`dataclass` decorator examines the class to find ``field``\\s. A " "``field`` is defined as a class variable that has a :term:`type annotation " "`. With two exceptions described below, nothing in :" "func:`dataclass` examines the type specified in the variable annotation." msgstr "" -"Le décorateur :func:`dataclass` examine la classe pour trouver des ``champs``" -"\\s. Un ``champ`` est défini comme une variable de classe qui possède une :" -"term:`annotation de type `. À deux exceptions près " -"décrites plus bas, il n’y a rien dans :func:`dataclass` qui examine le type " -"spécifié dans l’annotation de variable." +"Le décorateur :func:`dataclass` examine la classe pour trouver des champs. " +"Un champ est défini comme une variable de classe qui possède une :term:" +"`annotation de type `. À deux exceptions près décrites " +"plus bas, :func:`dataclass` ne prend pas en considération le type donné dans " +"l'annotation." #: library/dataclasses.rst:60 msgid "" @@ -95,7 +92,6 @@ msgstr "" "champs dans la définition de la classe." #: library/dataclasses.rst:63 -#, fuzzy msgid "" "The :func:`dataclass` decorator will add various \"dunder\" methods to the " "class, described below. If any of the added methods already exist in the " @@ -103,11 +99,10 @@ msgid "" "decorator returns the same class that it is called on; no new class is " "created." msgstr "" -"Le décorateur :func:`dataclass` ajoute diverses méthodes « spéciales » à la " +"Le décorateur :func:`dataclass` ajoute diverses méthodes spéciales à la " "classe, décrites ci-après. Si l’une des méthodes ajoutées existe déjà dans " -"la classe, le comportement dépend des paramètres, comme documenté ci-" -"dessous. Le décorateur renvoie la classe sur laquelle il est appelé ; il n’y " -"a pas de nouvelle classe créée." +"la classe, le comportement dépend des paramètres. Le décorateur renvoie la " +"classe sur laquelle il est appelé ; aucune nouvelle classe n'est créée." #: library/dataclasses.rst:69 msgid "" @@ -115,20 +110,20 @@ msgid "" "it acts as if it has the default values documented in this signature. That " "is, these three uses of :func:`dataclass` are equivalent::" msgstr "" -"Si :func:`dataclass` est utilisé comme simple décorateur sans paramètres, il " -"se comporte comme si on l’avait appelé avec les valeurs par défaut présentes " -"en signature. Ainsi, les trois usages suivants de :func:`dataclass` sont " +"Si :func:`dataclass` est utilisé directement, il se comporte comme si on " +"l’avait appelé sans argument (c.-à-d. en laissant les valeurs par défaut de " +"sa signature). Ainsi, les trois usages suivants de :func:`dataclass` sont " "équivalents ::" #: library/dataclasses.rst:86 msgid "The parameters to :func:`dataclass` are:" -msgstr "Les paramètres de :func:`dataclass` sont :" +msgstr "Les paramètres de :func:`dataclass` sont les suivants :" #: library/dataclasses.rst:88 msgid "" "``init``: If true (the default), a :meth:`__init__` method will be generated." msgstr "" -"``init``: Si vrai (par défaut), une méthode :meth:`__init__` est générée." +"*init* : si vrai (par défaut), une méthode :meth:`__init__` est générée." #: library/dataclasses.rst:91 msgid "" @@ -146,12 +141,12 @@ msgid "" "example: ``InventoryItem(name='widget', unit_price=3.0, " "quantity_on_hand=10)``." msgstr "" -"``repr``: Si vrai (par défaut), une méthode :meth:`__repr__` sera générée. " -"La chaîne de représentation comportera le nom de la classe et le nom ainsi " -"que la représentation de chaque champ, suivant leur ordre de définition. " -"Les champs marqués comme exclus (voir ``Field`` ci-dessous) de la " -"représentation ne sont pas inclus. Par exemple : " -"``InventoryItem(name='widget', unit_price=3.0, quantity_on_hand=10)``." +"*repr* : si vrai (par défaut), une méthode :meth:`__repr__` est générée. La " +"chaîne de représentation comporte le nom de la classe et le nom ainsi que la " +"représentation de chaque champ, suivant leur ordre de définition. Les " +"champs marqués comme exclus de la représentation (voir ``Field`` ci-dessous) " +"sont ignorés. Par exemple : ``InventoryItem(name='widget', unit_price=3.0, " +"quantity_on_hand=10)``." #: library/dataclasses.rst:101 msgid "" @@ -166,9 +161,9 @@ msgid "" "This method compares the class as if it were a tuple of its fields, in " "order. Both instances in the comparison must be of the identical type." msgstr "" -"``eq``: Si vrai (par défaut), une méthode :meth:`__eq__` est générée. Cette " -"méthode permet de comparer les instances de la classe comme s’il s’agissait " -"d’un *n*-uplet de ses champs, dans l’ordre. Les deux instances dans la " +"*eq* : si vrai (par défaut), une méthode :meth:`__eq__` est générée. Cette " +"méthode permet de comparer les instances de la classe comme si elles étaient " +"des *n*-uplet de leurs champs, pris dans l’ordre. Les deux instances dans la " "comparaison doivent être de même type." #: library/dataclasses.rst:109 @@ -185,15 +180,14 @@ msgid "" "instances in the comparison must be of the identical type. If ``order`` is " "true and ``eq`` is false, a :exc:`ValueError` is raised." msgstr "" -"``order``: Si vrai (``False`` par défaut), les méthodes :meth:`__lt__`, :" -"meth:`__le__`, :meth:`__gt__`, et :meth:`__ge__` sont générées. Elles " -"permettent de comparer les instances de la classe en les considérant comme " -"des *n*-uplets, dans l’ordre de définition des champs. Chaque instance dans " -"la comparaison doit être de même type. Si ``order`` est vrai mais que " +"*order* : si vrai (``False`` par défaut), les méthodes :meth:`__lt__`, :meth:" +"`__le__`, :meth:`__gt__`, et :meth:`__ge__` sont générées. Elles permettent " +"de comparer les instances de la classe en les considérant comme des *n*-" +"uplets, dans l’ordre de définition des champs. Toutes les instances dans la " +"comparaison doivent être de même type. Si ``order`` est vrai mais que " "``eq`` est faux, une :exc:`ValueError` est levée." #: library/dataclasses.rst:119 -#, fuzzy msgid "" "If the class already defines any of :meth:`__lt__`, :meth:`__le__`, :meth:" "`__gt__`, or :meth:`__ge__`, then :exc:`TypeError` is raised." @@ -207,8 +201,8 @@ msgid "" "``unsafe_hash``: If ``False`` (the default), a :meth:`__hash__` method is " "generated according to how ``eq`` and ``frozen`` are set." msgstr "" -"``unsafe_hash``: Si ``False`` (par défaut), une méthode :meth:`__hash__` est " -"générée et son comportement dépend des valeurs de ``eq`` et ``frozen``." +"*unsafe_hash* : si ``False`` (par défaut), une méthode :meth:`__hash__` est " +"générée et son comportement dépend des valeurs de *eq* et *frozen*." #: library/dataclasses.rst:126 msgid "" @@ -223,9 +217,9 @@ msgstr "" "que lorsqu’un objet est inséré dans une collection utilisant du hachage, tel " "qu’un dictionnaire ou un ensemble. Avoir une méthode :meth:`__hash__` " "implique que les instances de la classe sont immuables. La muabilité est une " -"propriété complexe qui dépends des intentions du programmeur, de l’existence " +"propriété complexe qui dépend des intentions du programmeur, de l’existence " "et du comportement de la méthode :meth:`__eq__`, et des valeurs des options " -"``eq`` et ``frozen`` dans l’appel au décorateur :func:`dataclass`." +"*eq* et *frozen* dans l’appel au décorateur :func:`dataclass`." #: library/dataclasses.rst:133 msgid "" @@ -237,13 +231,12 @@ msgid "" msgstr "" "Par défaut, :func:`dataclass` n’ajoute pas de méthode implicite :meth:" "`__hash__`, sauf s’il n’existe aucun risque sous-jacent. Il n’ajoute ou ne " -"modifie pas non plus la méthode :meth:`__hash__` si elle a est définie " +"modifie pas non plus la méthode :meth:`__hash__` si elle a été définie " "explicitement. Définir l’attribut de classe ``__hash__ = None`` a une " -"signification particulière en Python, comme précisé dans la documentation " -"de :meth:`__hash__`." +"signification particulière, comme précisé dans la documentation de :meth:" +"`__hash__`." #: library/dataclasses.rst:139 -#, fuzzy msgid "" "If :meth:`__hash__` is not explicitly defined, or if it is set to ``None``, " "then :func:`dataclass` *may* add an implicit :meth:`__hash__` method. " @@ -254,11 +247,12 @@ msgid "" msgstr "" "Si :meth:`__hash__` n’est pas défini explicitement, ou s’il a pour valeur " "``None``, alors :func:`dataclass` *peut* ajouter une méthode :meth:" -"`__hash__` implicite. Bien que ce ne soit pas recommandé,, vous pouvez " +"`__hash__` implicite. Bien que ce ne soit pas recommandé, vous pouvez " "forcer :func:`dataclass` à créer une méthode :meth:`__hash__` en utilisant " "``unsafe_hash=True``. Cela pourrait être nécessaire si votre classe est " -"logiquement immuable mais qu’une mutation est tout de même possible. C’est " -"un cas très particulier qui doit être considéré avec la plus grande prudence." +"logiquement immuable mais qu’une mutation est tout de même possible. Il " +"s'agit là d'un cas particulier qui doit être considéré avec la plus grande " +"prudence." #: library/dataclasses.rst:146 msgid "" @@ -267,10 +261,10 @@ msgid "" "in your dataclass and set ``unsafe_hash=True``; this will result in a :exc:" "`TypeError`." msgstr "" -"Ce sont les règles autour de la création implicite de la méthode :meth:" +"Voici les règles autour de la création implicite de la méthode :meth:" "`__hash__`. Il faut noter que vous ne pouvez pas avoir à la fois une " -"méthode :meth:`__hash__` explicite dans votre *dataclass* et définir " -"``unsafe_hash=True``; cela lèvera une :exc:`TypeError`." +"méthode :meth:`__hash__` explicite dans votre classe de données et définir " +"``unsafe_hash=True`` ; cela lèvera une :exc:`TypeError`." #: library/dataclasses.rst:151 msgid "" @@ -282,24 +276,23 @@ msgid "" "superclass will be used (if the superclass is :class:`object`, this means it " "will fall back to id-based hashing)." msgstr "" -"Si ``eq`` et ``frozen`` sont tous deux vrais, :func:`dataclass` génère par " -"défaut une méthode :meth:`__hash__` pour vous. Si ``eq`` est vrai mais que " -"``frozen`` est faux, :meth:`__hash__` prend la valeur ``None``, marquant la " -"classe comme non-hachable (et c’est le cas, puisqu’elle est modifiable). Si " -"``eq`` est faux, la méthode :meth:`__hash__` est laissée intacte, ce qui " -"veut dire que la méthode :meth:`__hash__` de la classe parente sera utilisée " -"(si la classe parente est :class:`object`, le comportement est un hachage " -"basé sur les id)." +"Si *eq* et *frozen* sont tous deux vrais, :func:`dataclass` génère par " +"défaut une méthode :meth:`__hash__` pour vous. Si *eq* est vrai mais que " +"*frozen* est faux, :meth:`__hash__` prend la valeur ``None``, marquant la " +"classe comme non-hachable (et c’est le cas, puisque les instances sont " +"mutables). Si ``eq`` est faux, la méthode :meth:`__hash__` est laissée " +"intacte, ce qui veut dire que la méthode :meth:`__hash__` de la classe " +"parente sera utilisée (si la classe parente est :class:`object`, le " +"comportement est un hachage basé sur les id)." #: library/dataclasses.rst:159 -#, fuzzy msgid "" "``frozen``: If true (the default is ``False``), assigning to fields will " "generate an exception. This emulates read-only frozen instances. If :meth:" "`__setattr__` or :meth:`__delattr__` is defined in the class, then :exc:" "`TypeError` is raised. See the discussion below." msgstr "" -"``frozen``: Si vrai (faux par défaut), assigner une valeur à un champ lèvera " +"*frozen* : si vrai (faux par défaut), assigner une valeur à un champ lève " "une exception. Cela simule le comportement des instances figées en lecture " "seule. Si la méthode :meth:`__setattr__` ou :meth:`__delattr__` est définie " "sur la classe, alors une :exc:`TypeError` est levée. Voir la discussion ci-" @@ -307,13 +300,77 @@ msgstr "" #: library/dataclasses.rst:164 msgid "" +"``match_args``: If true (the default is ``True``), the ``__match_args__`` " +"tuple will be created from the list of parameters to the generated :meth:" +"`__init__` method (even if :meth:`__init__` is not generated, see above). " +"If false, or if ``__match_args__`` is already defined in the class, then " +"``__match_args__`` will not be generated." +msgstr "" +"*match_args* : si vrai (``True`` est la valeur par défaut), le *n*-uplet " +"``__match_args__`` est créé automatiquement depuis la liste des paramètres " +"de la méthode :meth:`__init__` générée (même si :meth:`__init__` n'est pas " +"générée, voir ci-dessus). Si faux ou si ``__match_args__`` est déjà défini " +"dans la classe alors ``__match_args__`` n'est pas créé." + +#: library/dataclasses.rst:173 +#, fuzzy +msgid "" +"``kw_only``: If true (the default value is ``False``), then all fields will " +"be marked as keyword-only. If a field is marked as keyword-only, then the " +"only effect is that the :meth:`__init__` parameter generated from a keyword-" +"only field must be specified with a keyword when :meth:`__init__` is " +"called. There is no effect on any other aspect of dataclasses. See the :" +"term:`parameter` glossary entry for details. Also see the :const:`KW_ONLY` " +"section." +msgstr "" +"*kw_only* : si vrai (``False`` est la valeur par défaut) alors tous les " +"champs sont marqués comme exclusivement nommés. Si un champ est marqué comme " +"exclusivement nommé, le seul impact est que le champ de la méthode :meth:" +"`__init__` générée devra être explicitement nommé lors de l'appel de la " +"méthode :meth:`__init__`. Il n'y a aucun autre effet dans les autres aspects " +"des classes de données. Voir l'entrée :term:`paramètre ` du " +"glossaire pour plus d'informations. Voir également la section :const:" +"`KW_ONLY`." + +#: library/dataclasses.rst:184 +msgid "" +"``slots``: If true (the default is ``False``), :attr:`__slots__` attribute " +"will be generated and new class will be returned instead of the original " +"one. If :attr:`__slots__` is already defined in the class, then :exc:" +"`TypeError` is raised." +msgstr "" +"*slot* : si vrai (``False`` est la valeur par défaut), l'attribut :attr:" +"`__slots__` est généré et une nouvelle classe est renvoyée à la place de " +"celle d'origine. Si :attr:`__slots__` est déjà défini dans la classe alors " +"une :exc:`TypeError` est levée." + +#: library/dataclasses.rst:191 +msgid "" +"If a field name is already included in the ``__slots__`` of a base class, it " +"will not be included in the generated ``__slots__`` to prevent `overriding " +"them `_. Therefore, do not use ``__slots__`` to retrieve the field names of " +"a dataclass. Use :func:`fields` instead. To be able to determine inherited " +"slots, base class ``__slots__`` may be any iterable, but *not* an iterator." +msgstr "" + +#: library/dataclasses.rst:201 +msgid "" +"``weakref_slot``: If true (the default is ``False``), add a slot named " +"\"__weakref__\", which is required to make an instance weakref-able. It is " +"an error to specify ``weakref_slot=True`` without also specifying " +"``slots=True``." +msgstr "" + +#: library/dataclasses.rst:208 +msgid "" "``field``\\s may optionally specify a default value, using normal Python " "syntax::" msgstr "" -"Les ``field``\\s peuvent éventuellement spécifier une valeur par défaut, en " +"Les champs peuvent éventuellement préciser une valeur par défaut, en " "utilisant la syntaxe Python normale ::" -#: library/dataclasses.rst:172 +#: library/dataclasses.rst:216 msgid "" "In this example, both ``a`` and ``b`` will be included in the added :meth:" "`__init__` method, which will be defined as::" @@ -321,8 +378,7 @@ msgstr "" "Dans cet exemple, ``a`` et ``b`` sont tous deux inclus dans la signature de " "la méthode générée :meth:`__init__`, qui est définie comme suit ::" -#: library/dataclasses.rst:177 -#, fuzzy +#: library/dataclasses.rst:221 msgid "" ":exc:`TypeError` will be raised if a field without a default value follows a " "field with a default value. This is true whether this occurs in a single " @@ -330,10 +386,9 @@ msgid "" msgstr "" "Une :exc:`TypeError` est levée si un champ sans valeur par défaut est défini " "après un champ avec une valeur par défaut. C’est le cas que ce soit dans " -"une seule classe, mais également si c’est le résultat d’un héritage de " -"classes." +"une seule classe ou si c’est le résultat d’un héritage de classes." -#: library/dataclasses.rst:183 +#: library/dataclasses.rst:227 msgid "" "For common and simple use cases, no other functionality is required. There " "are, however, some dataclass features that require additional per-field " @@ -341,27 +396,41 @@ msgid "" "replace the default field value with a call to the provided :func:`field` " "function. For example::" msgstr "" +"Dans les cas les plus simples et courants, ce qui a été décrit jusqu'ici " +"suffit. Cependant, les classes de données possèdent des fonctionnalités " +"supplémentaires fondées sur des métadonnées propres à chaque champ. Pour " +"remplir ces métadonnées, il suffit de mettre un appel à la fonction :func:" +"`field` à la place de la valeur par défaut, comme dans cet exemple :" -#: library/dataclasses.rst:196 +#: library/dataclasses.rst:240 msgid "" -"As shown above, the ``MISSING`` value is a sentinel object used to detect if " -"the ``default`` and ``default_factory`` parameters are provided. This " -"sentinel is used because ``None`` is a valid value for ``default``. No code " -"should directly use the ``MISSING`` value." +"As shown above, the :const:`MISSING` value is a sentinel object used to " +"detect if some parameters are provided by the user. This sentinel is used " +"because ``None`` is a valid value for some parameters with a distinct " +"meaning. No code should directly use the :const:`MISSING` value." msgstr "" +"Comme le montre la signature, la constante :const:`MISSING` est une valeur " +"sentinelle pour déterminer si des paramètres ont été fournis par " +"l'utilisateur. ``None`` ne conviendrait pas puisque c'est une valeur avec un " +"sens qui peut être différent pour certains paramètres. La sentinelle :const:" +"`MISSING` est interne au module et ne doit pas être utilisée dans vos " +"programmes." -#: library/dataclasses.rst:202 +#: library/dataclasses.rst:245 msgid "The parameters to :func:`field` are:" -msgstr "" +msgstr "Les paramètres de :func:`field` sont :" -#: library/dataclasses.rst:204 +#: library/dataclasses.rst:247 msgid "" "``default``: If provided, this will be the default value for this field. " "This is needed because the :meth:`field` call itself replaces the normal " "position of the default value." msgstr "" +"*default* : s'il est fourni, il devient la valeur par défaut du champ. " +"L'appel à :meth:`field` est mis à la place normale de la valeur par défaut, " +"d'où la nécessité de ce paramètre." -#: library/dataclasses.rst:208 +#: library/dataclasses.rst:251 msgid "" "``default_factory``: If provided, it must be a zero-argument callable that " "will be called when a default value is needed for this field. Among other " @@ -369,26 +438,29 @@ msgid "" "discussed below. It is an error to specify both ``default`` and " "``default_factory``." msgstr "" +"*default_factory* : s'il est fourni, ce doit être un objet appelable sans " +"argument. Il est alors appelé à chaque fois qu'il faut une valeur par défaut " +"pour le champ. Ceci permet, entre autres choses, de définir des champs dont " +"les valeurs par défaut sont muables. Une erreur se produit si *default* et " +"*default_factory* sont donnés tous les deux." -#: library/dataclasses.rst:214 +#: library/dataclasses.rst:257 msgid "" "``init``: If true (the default), this field is included as a parameter to " "the generated :meth:`__init__` method." msgstr "" +"*init* : si vrai (par défaut), la méthode :meth:`__init__` générée possède " +"un paramètre correspondant à ce champ." -#: library/dataclasses.rst:217 +#: library/dataclasses.rst:260 msgid "" "``repr``: If true (the default), this field is included in the string " "returned by the generated :meth:`__repr__` method." msgstr "" +"*repr* : si vrai (par défaut), le champ est inclus dans les chaînes " +"construites par la méthode :meth:`__repr__` générée." -#: library/dataclasses.rst:220 -msgid "" -"``compare``: If true (the default), this field is included in the generated " -"equality and comparison methods (:meth:`__eq__`, :meth:`__gt__`, et al.)." -msgstr "" - -#: library/dataclasses.rst:224 +#: library/dataclasses.rst:263 msgid "" "``hash``: This can be a bool or ``None``. If true, this field is included " "in the generated :meth:`__hash__` method. If ``None`` (the default), use " @@ -396,8 +468,14 @@ msgid "" "field should be considered in the hash if it's used for comparisons. " "Setting this value to anything other than ``None`` is discouraged." msgstr "" +"*hash* : ce paramètre est un booléen ou ``None``. La valeur ``False`` force " +"la prise en compte du champ dans la méthode :meth:`__hash__` générée, alors " +"que ``False`` force son exclusion. ``None`` revient à mettre la même valeur " +"que *compare*, ce qui est en général correct : il faut inclure dans le " +"hachage les champs employés pour les comparaisons. Il est déconseillé de " +"mettre ce paramètre à autre chose que ``None``." -#: library/dataclasses.rst:231 +#: library/dataclasses.rst:270 msgid "" "One possible reason to set ``hash=False`` but ``compare=True`` would be if a " "field is expensive to compute a hash value for, that field is needed for " @@ -405,8 +483,23 @@ msgid "" "hash value. Even if a field is excluded from the hash, it will still be " "used for comparisons." msgstr "" +"Cependant, une raison légitime de mettre *hash* à ``False`` alors que " +"*compare* est à ``True`` est la concourance de trois facteurs : le champ est " +"coûteux à hacher ; il est nécessaire pour les comparaisons d'égalité ; et il " +"y a déjà d'autres champs qui participent au hachage des instances. À ce " +"moment, on peut alors se passer du champ dans le hachage tout en le faisant " +"participer aux comparaisons." + +#: library/dataclasses.rst:276 +msgid "" +"``compare``: If true (the default), this field is included in the generated " +"equality and comparison methods (:meth:`__eq__`, :meth:`__gt__`, et al.)." +msgstr "" +"*compare* : si vrai (par défaut), le champ est considéré dans les " +"comparaisons d'égalité et d'inégalité dans les méthodes générées :meth:" +"`__eq__`, :meth:`__gt__`, etc." -#: library/dataclasses.rst:237 +#: library/dataclasses.rst:280 msgid "" "``metadata``: This can be a mapping or None. None is treated as an empty " "dict. This value is wrapped in :func:`~types.MappingProxyType` to make it " @@ -415,8 +508,21 @@ msgid "" "Multiple third-parties can each have their own key, to use as a namespace in " "the metadata." msgstr "" +"*metadata* : ce paramètre est un tableau associatif (*mapping* en anglais). " +"La valeur par défaut de ``None`` est prise comme un dictionnaire vide. Le " +"tableau associatif devient accessible sur l'objet :class:`Field`, sous la " +"forme d'un :func:`~types.MappingProxyType` afin qu'il soit en lecture seule." -#: library/dataclasses.rst:245 +#: library/dataclasses.rst:288 +msgid "" +"``kw_only``: If true, this field will be marked as keyword-only. This is " +"used when the generated :meth:`__init__` method's parameters are computed." +msgstr "" +"``kw_only`` : Si vrai ce champ est marqué comme exclusivement nommé. Cela " +"est utilisé lors du traitement des paramètres de la méthode :meth:`__init__` " +"générée." + +#: library/dataclasses.rst:294 msgid "" "If the default value of a field is specified by a call to :func:`field()`, " "then the class attribute for this field will be replaced by the specified " @@ -426,74 +532,135 @@ msgid "" "fields, just as if the default value itself were specified. For example, " "after::" msgstr "" +"Si la valeur par défaut d'un champ est donnée dans un appel à :func:`field` " +"(et pas directement), l'attribut correspondant de la classe est remplacé par " +"cette valeur. Si le paramètre *default* n'est pas passé, l'attribut est " +"simplement supprimé. De cette manière, après le passage du décorateur :func:" +"`dataclass`, les attributs de la classe contiennent les valeurs par défaut " +"des champs exactement comme si elles avaient été définies directement. Par " +"exemple :" -#: library/dataclasses.rst:261 +#: library/dataclasses.rst:310 msgid "" "The class attribute ``C.z`` will be ``10``, the class attribute ``C.t`` will " "be ``20``, and the class attributes ``C.x`` and ``C.y`` will not be set." msgstr "" +"Après l'exécution de ce code, l'attribut de classe ``C.z`` vaut ``10`` et " +"l'attribut ``C.t`` vaut ``20``, alors que les attributs ``C.x`` et ``C.y`` " +"n'existent pas." -#: library/dataclasses.rst:267 +#: library/dataclasses.rst:316 msgid "" ":class:`Field` objects describe each defined field. These objects are " "created internally, and are returned by the :func:`fields` module-level " "method (see below). Users should never instantiate a :class:`Field` object " "directly. Its documented attributes are:" msgstr "" +"Les objets :class:`Field` contiennent des informations sur les champs. Ils " +"sont créés en interne, et on y accède à l'aide de la méthode au niveau du " +"module :func:`fields` (voir plus bas). Les utilisateurs ne doivent jamais " +"instancier un objet :class:`Field` eux-mêmes. Les attributs documentés sont " +"les suivants :" -#: library/dataclasses.rst:272 +#: library/dataclasses.rst:321 msgid "``name``: The name of the field." -msgstr "" +msgstr "*name* : le nom du champ ;" -#: library/dataclasses.rst:274 +#: library/dataclasses.rst:323 msgid "``type``: The type of the field." -msgstr "" +msgstr "*type* : le type associé au champ par l'annotation ;" -#: library/dataclasses.rst:276 +#: library/dataclasses.rst:325 msgid "" "``default``, ``default_factory``, ``init``, ``repr``, ``hash``, ``compare``, " -"and ``metadata`` have the identical meaning and values as they do in the :" -"func:`field` declaration." +"``metadata``, and ``kw_only`` have the identical meaning and values as they " +"do in the :func:`field` function." msgstr "" +"*default*, *default_factory*, *init*, *repr*, *hash*, *compare*, *metadata* " +"et *kw_only* qui correspondent aux paramètres de :func:`field` et en " +"prennent les valeurs." -#: library/dataclasses.rst:280 +#: library/dataclasses.rst:329 msgid "" "Other attributes may exist, but they are private and must not be inspected " "or relied on." msgstr "" +"D'autres attributs peuvent exister, mais ils sont privés et ne sont pas " +"censés être inspectés. Le code ne doit jamais reposer sur eux." -#: library/dataclasses.rst:285 +#: library/dataclasses.rst:334 msgid "" "Returns a tuple of :class:`Field` objects that define the fields for this " "dataclass. Accepts either a dataclass, or an instance of a dataclass. " "Raises :exc:`TypeError` if not passed a dataclass or instance of one. Does " "not return pseudo-fields which are ``ClassVar`` or ``InitVar``." msgstr "" +"Renvoie un *n*-uplet d'objets :class:`Field` correspondant aux champs de " +"l'argument, à l'exclusion des pseudo-champs ``ClassVar`` ou ``InitVar``. " +"L'argument peut être soit une classe de données, soit une instance d'une " +"telle classe ; si ce n'est pas le cas, une exception :exc:`TypeError` est " +"levée." -#: library/dataclasses.rst:292 +#: library/dataclasses.rst:341 +#, fuzzy msgid "" -"Converts the dataclass ``instance`` to a dict (by using the factory function " +"Converts the dataclass ``obj`` to a dict (by using the factory function " "``dict_factory``). Each dataclass is converted to a dict of its fields, as " "``name: value`` pairs. dataclasses, dicts, lists, and tuples are recursed " -"into. For example::" +"into. Other objects are copied with :func:`copy.deepcopy`." msgstr "" +"Convertit *instance*, une instance d'une classe de données, en un " +"dictionnaire. Le résultat est construit par la fonction *dict_factory*. Les " +"clés et valeurs proviennent directement des champs. Les dictionnaires, " +"listes, *n*-uplets et instances de classes de données sont traversés pour " +"convertir récursivement toutes les instances de classes de données qu'ils " +"contiennent. Voici un exemple :" -#: library/dataclasses.rst:326 -msgid "Raises :exc:`TypeError` if ``instance`` is not a dataclass instance." +#: library/dataclasses.rst:347 +msgid "Example of using :func:`asdict` on nested dataclasses::" msgstr "" -#: library/dataclasses.rst:316 +#: library/dataclasses.rst:384 +msgid "To create a shallow copy, the following workaround may be used::" +msgstr "" + +#: library/dataclasses.rst:368 +#, fuzzy msgid "" -"Converts the dataclass ``instance`` to a tuple (by using the factory " -"function ``tuple_factory``). Each dataclass is converted to a tuple of its " -"field values. dataclasses, dicts, lists, and tuples are recursed into." +":func:`asdict` raises :exc:`TypeError` if ``obj`` is not a dataclass " +"instance." msgstr "" +"Lève :exc:`TypeError` si *instance* n'est pas une instance d'une classe de " +"données." -#: library/dataclasses.rst:321 +#: library/dataclasses.rst:373 +#, fuzzy +msgid "" +"Converts the dataclass ``obj`` to a tuple (by using the factory function " +"``tuple_factory``). Each dataclass is converted to a tuple of its field " +"values. dataclasses, dicts, lists, and tuples are recursed into. Other " +"objects are copied with :func:`copy.deepcopy`." +msgstr "" +"Convertit l'instance d'une classe de données *instance* en un *n*-uplet des " +"valeurs de ses champs. Le résultat est construit par la fonction " +"*tuple_factory*. Cette fonction agit récursivement sur les dictionnaires, " +"listes, *n*-uplets et instances de classes de données." + +#: library/dataclasses.rst:379 msgid "Continuing from the previous example::" +msgstr "Pour continuer l'exemple précédent :" + +#: library/dataclasses.rst:388 +#, fuzzy +msgid "" +":func:`astuple` raises :exc:`TypeError` if ``obj`` is not a dataclass " +"instance." msgstr "" +"Lève :exc:`TypeError` si *instance* n'est pas une instance d'une classe de " +"données." -#: library/dataclasses.rst:330 +#: library/dataclasses.rst:393 +#, fuzzy msgid "" "Creates a new dataclass with name ``cls_name``, fields as defined in " "``fields``, base classes as given in ``bases``, and initialized with a " @@ -501,51 +668,78 @@ msgid "" "elements are each either ``name``, ``(name, type)``, or ``(name, type, " "Field)``. If just ``name`` is supplied, ``typing.Any`` is used for " "``type``. The values of ``init``, ``repr``, ``eq``, ``order``, " -"``unsafe_hash``, and ``frozen`` have the same meaning as they do in :func:" +"``unsafe_hash``, ``frozen``, ``match_args``, ``kw_only``, ``slots``, and " +"``weakref_slot`` have the same meaning as they do in :func:`dataclass`." +msgstr "" +"Crée une nouvelle classe de données avec le nom *cls_name*. Les champs " +"proviennent de l'objet itérable *fields*. Les classes mères sont lues dans " +"*bases*. L'espace de nommage de la classe est initialisé par *namespace*. La " +"forme la plus générale d'un élément de *fields* est un triplet ``(nom, type, " +"objet_Field)``. Le troisième élément peut être omis. On peut aussi passer un " +"simple nom, auquel cas le type sera ``typing.Any``. Les paramètres restants, " +"à savoir *init*, *repr*, *eq*, *order*, *unsafe_hash*, *frozen*, " +"*march_args*, *kw_only* et *slots*, sont les mêmes que dans :func:" "`dataclass`." -msgstr "" -#: library/dataclasses.rst:339 +#: library/dataclasses.rst:403 msgid "" "This function is not strictly required, because any Python mechanism for " "creating a new class with ``__annotations__`` can then apply the :func:" "`dataclass` function to convert that class to a dataclass. This function is " "provided as a convenience. For example::" msgstr "" +"Cette fonction est pratique mais pas absolument nécessaire, puisqu'il suffit " +"de créer par un moyen quelconque une classe avec l'attribut " +"``__annotation__`` et de lui appliquer la fonction :func:`dataclass`, qui la " +"convertit en une classe de données. Par exemple, ceci :" -#: library/dataclasses.rst:351 +#: library/dataclasses.rst:415 msgid "Is equivalent to::" -msgstr "" +msgstr "est équivalent à ::" -#: library/dataclasses.rst:364 +#: library/dataclasses.rst:428 +#, fuzzy msgid "" -"Creates a new object of the same type as ``instance``, replacing fields with " -"values from ``changes``. If ``instance`` is not a Data Class, raises :exc:" +"Creates a new object of the same type as ``obj``, replacing fields with " +"values from ``changes``. If ``obj`` is not a Data Class, raises :exc:" "`TypeError`. If values in ``changes`` do not specify fields, raises :exc:" "`TypeError`." msgstr "" +"Crée un nouvel objet du même type que *instance* en effectuant les " +"remplacements donnés par *changes* dans ses champs. L'argument *instance* " +"doit être une instance d'une classe de données, sans quoi :exc:`TypeError` " +"est levée. De même, si une clé dans *changes* ne correspond à aucun champ de " +"l'instance, :exc:`TypeError` est levée." -#: library/dataclasses.rst:369 +#: library/dataclasses.rst:433 msgid "" "The newly returned object is created by calling the :meth:`__init__` method " "of the dataclass. This ensures that :meth:`__post_init__`, if present, is " "also called." msgstr "" +"L'objet renvoyé est créé à l'aide de la méthode :meth:`__init__` de la " +"classe de données, ce qui garantit que :meth:`__post_init__` est appelée (si " +"elle existe)." -#: library/dataclasses.rst:373 +#: library/dataclasses.rst:437 msgid "" "Init-only variables without default values, if any exist, must be specified " "on the call to :func:`replace` so that they can be passed to :meth:" "`__init__` and :meth:`__post_init__`." msgstr "" +"Si un champ d'initialisation (voir plus bas) n'a pas de valeur par défaut, " +"il faut l'inclure dans l'appel à :func:`replace` afin qu'il soit passé à :" +"meth:`__init__` et :meth:`__post_init__`." -#: library/dataclasses.rst:377 +#: library/dataclasses.rst:441 msgid "" "It is an error for ``changes`` to contain any fields that are defined as " "having ``init=False``. A :exc:`ValueError` will be raised in this case." msgstr "" +"Si une clé de *changes* correspond à un champ défini avec ``init=False``, :" +"exc:`ValueError` est levée." -#: library/dataclasses.rst:381 +#: library/dataclasses.rst:445 msgid "" "Be forewarned about how ``init=False`` fields work during a call to :func:" "`replace`. They are not copied from the source object, but rather are " @@ -555,25 +749,87 @@ msgid "" "perhaps a custom ``replace()`` (or similarly named) method which handles " "instance copying." msgstr "" +"Prenez garde aux champs définis avec ``init=False`` dans un appel à :func:" +"`replace`. Ils ne sont pas copiés automatiquement de l'instance source. " +"C'est le rôle de :meth:`__post_init__` de les initialiser — ou pas. Les " +"champs avec ``init=False`` doivent rarement être utilisés et seulement à bon " +"escient. Si vous en avez, il peut être sage de traiter la copie des " +"instances par des constructeurs de classe alternatifs, ou bien une méthode " +"personnalisée ``replace()`` (ou un nom similaire)." -#: library/dataclasses.rst:392 +#: library/dataclasses.rst:456 msgid "" "Return ``True`` if its parameter is a dataclass or an instance of one, " "otherwise return ``False``." msgstr "" +"Renvoie ``True`` si l'argument est soit une classe de données, soit une " +"instance d'une telle classe. Sinon, renvoie ``False``." -#: library/dataclasses.rst:395 +#: library/dataclasses.rst:459 msgid "" "If you need to know if a class is an instance of a dataclass (and not a " "dataclass itself), then add a further check for ``not isinstance(obj, " "type)``::" msgstr "" +"Pour vérifier qu'un objet *obj* est une instance d'une classe de données, et " +"non pas lui-même une classe de données, ajoutez le test ``not " +"isinstance(obj, type)`` ::" -#: library/dataclasses.rst:403 -msgid "Post-init processing" +#: library/dataclasses.rst:468 +msgid "A sentinel value signifying a missing default or default_factory." +msgstr "" +"Une valeur sentinelle pour dénoter l'absence de *default* ou " +"*default_factory*." + +#: library/dataclasses.rst:472 +msgid "" +"A sentinel value used as a type annotation. Any fields after a pseudo-field " +"with the type of :const:`KW_ONLY` are marked as keyword-only fields. Note " +"that a pseudo-field of type :const:`KW_ONLY` is otherwise completely " +"ignored. This includes the name of such a field. By convention, a name of " +"``_`` is used for a :const:`KW_ONLY` field. Keyword-only fields signify :" +"meth:`__init__` parameters that must be specified as keywords when the class " +"is instantiated." msgstr "" +"Une valeur sentinelle utilisée en tant qu'annotation de type. Chaque " +"attribut situé après un pseudo-champ ayant pour type la constante :const:" +"`KW_ONLY` est marqué comme champ exclusivement nommé. Notez que le pseudo-" +"champ ayant pour type la constante :const:`KW_ONLY` est par ailleurs " +"complètement ignoré. Par convention le nom ``_`` est utilisé pour " +"l'attribut :const:`KW_ONLY`. Les paramètres de la méthode :meth:`__init__` " +"exclusivement nommés doivent être spécifiés par leur nom lors de " +"l'instanciation de la classe." -#: library/dataclasses.rst:405 +#: library/dataclasses.rst:481 +msgid "" +"In this example, the fields ``y`` and ``z`` will be marked as keyword-only " +"fields::" +msgstr "" +"Dans cette exemple ``y`` et ``z`` sont marqués comme exclusivement nommés ::" + +#: library/dataclasses.rst:492 +msgid "" +"In a single dataclass, it is an error to specify more than one field whose " +"type is :const:`KW_ONLY`." +msgstr "" +"Une erreur est levée s'il y a plus d'un champ de type :const:`KW_ONLY` dans " +"une unique classe de données." + +#: library/dataclasses.rst:499 +msgid "" +"Raised when an implicitly defined :meth:`__setattr__` or :meth:`__delattr__` " +"is called on a dataclass which was defined with ``frozen=True``. It is a " +"subclass of :exc:`AttributeError`." +msgstr "" +"Sous-classe de :exc:`AttributeError`, levée lorsqu'une méthode :meth:" +"`__setattr__` ou :meth:`__delattr__` définie implicitement est appelée dans " +"une classe de données définie avec ``frozen=True``." + +#: library/dataclasses.rst:504 +msgid "Post-init processing" +msgstr "Post-initialisation" + +#: library/dataclasses.rst:506 msgid "" "The generated :meth:`__init__` code will call a method named :meth:" "`__post_init__`, if :meth:`__post_init__` is defined on the class. It will " @@ -582,40 +838,61 @@ msgid "" "order they were defined in the class. If no :meth:`__init__` method is " "generated, then :meth:`__post_init__` will not automatically be called." msgstr "" +"Après avoir initialisé l'objet, la méthode :meth:`__init__` générée appelle " +"la méthode :meth:`__post_init__`, si elle est définie. :meth:`__post_init__` " +"est habituellement appelée avec un simple ``self.__post_init__()``. " +"Cependant, si la classe comporte des champs d'initialisation (voir plus " +"bas), leurs valeurs sont aussi passées à :meth:`__post_init__` telles " +"qu'elles ont été fournies à :meth:`__init__`. Si la classe est créée avec " +"``init=False``, :meth:`__post_init__` n'est jamais appelée automatiquement." -#: library/dataclasses.rst:413 +#: library/dataclasses.rst:514 msgid "" "Among other uses, this allows for initializing field values that depend on " "one or more other fields. For example::" msgstr "" +"Cette méthode permet, entre autres, d'initialiser des champs qui dépendent " +"d'autres champs. Par exemple :" -#: library/dataclasses.rst:425 +#: library/dataclasses.rst:526 msgid "" "The :meth:`__init__` method generated by :func:`dataclass` does not call " "base class :meth:`__init__` methods. If the base class has an :meth:" "`__init__` method that has to be called, it is common to call this method in " "a :meth:`__post_init__` method::" msgstr "" +"Les méthodes :meth:`__init__` des classes mères ne sont pas appelées " +"automatiquement par la méthode :meth:`__init__` que génère :func:" +"`dataclass`. S'il faut appeler ces méthodes :meth:`__init__`, il est courant " +"de le faire dans :meth:`__post_init__` :" -#: library/dataclasses.rst:442 +#: library/dataclasses.rst:543 msgid "" "Note, however, that in general the dataclass-generated :meth:`__init__` " "methods don't need to be called, since the derived dataclass will take care " "of initializing all fields of any base class that is a dataclass itself." msgstr "" +"Notez toutefois qu'il n'est généralement pas nécessaire d'appeler une " +"méthode :meth:`__init__` si elle a été générée automatiquement dans une " +"classe de données, car la classe fille initialise elle-même les champs " +"apportés par toute classe mère qui est aussi une classe de données." -#: library/dataclasses.rst:446 +#: library/dataclasses.rst:547 msgid "" "See the section below on init-only variables for ways to pass parameters to :" "meth:`__post_init__`. Also see the warning about how :func:`replace` " "handles ``init=False`` fields." msgstr "" +"Voir la section plus bas à propos des variables d'initialisation pour les " +"moyens de passer des paramètres à :meth:`__post_init__`. Voir également " +"l'avertissement sur le traitement par :func:`replace` des champs définis " +"avec ``init=False``." -#: library/dataclasses.rst:451 +#: library/dataclasses.rst:552 msgid "Class variables" -msgstr "" +msgstr "Variables de classe" -#: library/dataclasses.rst:453 +#: library/dataclasses.rst:554 msgid "" "One of two places where :func:`dataclass` actually inspects the type of a " "field is to determine if a field is a class variable as defined in :pep:" @@ -624,12 +901,18 @@ msgid "" "as a field and is ignored by the dataclass mechanisms. Such ``ClassVar`` " "pseudo-fields are not returned by the module-level :func:`fields` function." msgstr "" +"Voici le premier des deux cas où le type fourni dans l'annotation d'un champ " +"est pris en compte par :func:`dataclass` au moment de l'exécution. Si ce " +"type est ``typing.ClassVar``, le champ est considéré comme une variable de " +"classe, notion définie dans la :pep:`526`. Les champs de ce genre sont " +"complètement ignorés du point de vue des classes de données. Ils " +"n'apparaissent pas dans le résultat de :func:`fields`." -#: library/dataclasses.rst:462 +#: library/dataclasses.rst:563 msgid "Init-only variables" -msgstr "" +msgstr "Variables d'initialisation" -#: library/dataclasses.rst:464 +#: library/dataclasses.rst:565 msgid "" "The other place where :func:`dataclass` inspects a type annotation is to " "determine if a field is an init-only variable. It does this by seeing if " @@ -640,24 +923,35 @@ msgid "" "generated :meth:`__init__` method, and are passed to the optional :meth:" "`__post_init__` method. They are not otherwise used by dataclasses." msgstr "" +"L'autre cas où l'annotation de type influence :func:`dataclass` est le " +"suivant : si le type est ``dataclasses.InitVar``, le nom devient un « champ " +"d'initialisation ». Puisque ce n'est pas un vrai champ, il n'est pas inclus " +"dans le *n*-uplet que renvoie :func:`fields`. Les champs d'initialisation " +"sont ajoutés en tant que paramètres à la méthode :meth:`__init__` générée. " +"Leurs valeurs sont passées à :meth:`__post_init__`, si cette méthode existe. " +"C'est la seule manière dont elles sont utilisées." -#: library/dataclasses.rst:474 +#: library/dataclasses.rst:575 msgid "" "For example, suppose a field will be initialized from a database, if a value " "is not provided when creating the class::" msgstr "" +"On peut par exemple imaginer un champ initialisé à partir d'une base de " +"données s'il n'a pas reçu de valeur explicite :" -#: library/dataclasses.rst:489 +#: library/dataclasses.rst:590 msgid "" "In this case, :func:`fields` will return :class:`Field` objects for ``i`` " "and ``j``, but not for ``database``." msgstr "" +"Ici, :func:`fields` renvoie des objets :class:`Field` correspondant à ``i`` " +"et à ``j``, mais pas à ``database``." -#: library/dataclasses.rst:493 +#: library/dataclasses.rst:594 msgid "Frozen instances" -msgstr "" +msgstr "Instances figées" -#: library/dataclasses.rst:495 +#: library/dataclasses.rst:596 msgid "" "It is not possible to create truly immutable Python objects. However, by " "passing ``frozen=True`` to the :meth:`dataclass` decorator you can emulate " @@ -665,19 +959,27 @@ msgid "" "meth:`__delattr__` methods to the class. These methods will raise a :exc:" "`FrozenInstanceError` when invoked." msgstr "" +"Bien qu'il ne soit pas possible de créer des objets Python strictement " +"immuables, on peut rendre les instances d'une classe de données quasi " +"immuables en passant ``frozen=True`` au décorateur :meth:`dataclass`, ce qui " +"lui fait générer des méthodes :meth:`__setattr__` et :meth:`__delattr__`. " +"Celles-ci lèvent systématiquement l'exception :exc:`FrozenInstanceError`." -#: library/dataclasses.rst:501 +#: library/dataclasses.rst:602 msgid "" "There is a tiny performance penalty when using ``frozen=True``: :meth:" "`__init__` cannot use simple assignment to initialize fields, and must use :" "meth:`object.__setattr__`." msgstr "" +"Les performances sont légèrement moins bonnes avec ``frozen=True`` car :meth:" +"`__init__` doit passer par :meth:`object.__setattr__` au lieu de simples " +"affectations pour initialiser les champs." -#: library/dataclasses.rst:506 +#: library/dataclasses.rst:607 msgid "Inheritance" msgstr "Héritage" -#: library/dataclasses.rst:508 +#: library/dataclasses.rst:609 msgid "" "When the dataclass is being created by the :meth:`dataclass` decorator, it " "looks through all of the class's base classes in reverse MRO (that is, " @@ -688,85 +990,170 @@ msgid "" "ordered mapping of fields. Because the fields are in insertion order, " "derived classes override base classes. An example::" msgstr "" +"Au moment de la création d'une classe de données, le décorateur :meth:" +"`dataclass` parcourt toutes les classes mères dans l'ordre inverse de " +"résolution des méthodes (donc en commençant par :class:`object`). À chaque " +"fois qu'une classe de données est rencontrée, ses champs sont insérés dans " +"un tableau associatif ordonné. Pour finir, les champs de la classe elle-même " +"sont rajoutés. Toutes les méthodes générées utilisent en interne ce même " +"tableau associatif. Puisqu'il est ordonné, les champs des classes filles " +"écrasent ceux des classes mères. Voici un exemple :" -#: library/dataclasses.rst:528 +#: library/dataclasses.rst:629 msgid "" "The final list of fields is, in order, ``x``, ``y``, ``z``. The final type " "of ``x`` is ``int``, as specified in class ``C``." msgstr "" +"La liste finale des champs contient, dans l'ordre, ``x``, ``y``, ``z``. Le " +"type de ``x`` est ``int``, comme déclaré dans ``C``." -#: library/dataclasses.rst:531 +#: library/dataclasses.rst:632 msgid "The generated :meth:`__init__` method for ``C`` will look like::" +msgstr "La méthode :meth:`__init__` générée pour ``C`` ressemble à :" + +#: library/dataclasses.rst:637 +msgid "Re-ordering of keyword-only parameters in :meth:`__init__`" msgstr "" +"Réarrangement des paramètres exclusivement nommés dans :meth:`__init__`" -#: library/dataclasses.rst:536 -msgid "Default factory functions" +#: library/dataclasses.rst:639 +msgid "" +"After the parameters needed for :meth:`__init__` are computed, any keyword-" +"only parameters are moved to come after all regular (non-keyword-only) " +"parameters. This is a requirement of how keyword-only parameters are " +"implemented in Python: they must come after non-keyword-only parameters." +msgstr "" +"Lorsque les paramètres requis pour :meth:`__init__` sont préparés, tout ceux " +"marqués comme exclusivement nommé sont déplacés pour être positionnés après " +"tous ceux non exclusivement nommés. Ceci est un prérequis de la façon dont " +"les paramètres exclusivement nommés sont implémentés en Python : ils sont " +"après les paramètres non exclusivement nommés." + +#: library/dataclasses.rst:645 +msgid "" +"In this example, ``Base.y``, ``Base.w``, and ``D.t`` are keyword-only " +"fields, and ``Base.x`` and ``D.z`` are regular fields::" +msgstr "" +"Dans cet exemple, ``Base.y``, ``Base.w``, et ``D.t`` sont des champs " +"exclusivement nommés alors que ``Base.x`` et ``D.z`` sont des champs " +"normaux ::" + +#: library/dataclasses.rst:660 +msgid "The generated :meth:`__init__` method for ``D`` will look like::" +msgstr "La méthode :meth:`__init__` générée pour ``D`` ressemble à ::" + +#: library/dataclasses.rst:664 +msgid "" +"Note that the parameters have been re-ordered from how they appear in the " +"list of fields: parameters derived from regular fields are followed by " +"parameters derived from keyword-only fields." msgstr "" +"Les paramètres ont été réarrangés par rapport à leur ordre d'apparition dans " +"la liste des champs : les paramètres provenant des attributs normaux sont " +"suivis par les paramètres qui proviennent des attributs exclusivement nommés." -#: library/dataclasses.rst:538 +#: library/dataclasses.rst:668 +msgid "" +"The relative ordering of keyword-only parameters is maintained in the re-" +"ordered :meth:`__init__` parameter list." +msgstr "" +"L'ordre relatif des paramètres exclusivement nommés est conservé par le " +"réarrangement des paramètres d'\\ :meth:`__init__`." + +#: library/dataclasses.rst:673 +msgid "Default factory functions" +msgstr "Fabriques de valeurs par défaut" + +#: library/dataclasses.rst:675 msgid "" "If a :func:`field` specifies a ``default_factory``, it is called with zero " "arguments when a default value for the field is needed. For example, to " "create a new instance of a list, use::" msgstr "" +"Le paramètre facultatif *default_factory* de :func:`field` est une fonction " +"qui est appelée sans argument pour fournir des valeurs par défaut. Par " +"exemple, voici comment donner la valeur par défaut d'une liste vide :" -#: library/dataclasses.rst:544 +#: library/dataclasses.rst:681 msgid "" "If a field is excluded from :meth:`__init__` (using ``init=False``) and the " "field also specifies ``default_factory``, then the default factory function " "will always be called from the generated :meth:`__init__` function. This " "happens because there is no other way to give the field an initial value." msgstr "" +"Si un champ avec fabrique est exclu de :meth:`__init__` (par " +"``init=False``), alors la fabrique est appelée par :meth:`__init__` pour " +"chaque nouvelle instance, puisque c'est le seul moyen d'obtenir une valeur à " +"laquelle initialiser le champ." -#: library/dataclasses.rst:551 +#: library/dataclasses.rst:688 msgid "Mutable default values" -msgstr "" +msgstr "Valeurs par défaut muables" -#: library/dataclasses.rst:553 +#: library/dataclasses.rst:690 msgid "" "Python stores default member variable values in class attributes. Consider " "this example, not using dataclasses::" msgstr "" +"En Python, les valeurs par défaut des attributs sont stockées dans des " +"attributs de la classe. Observez cet exemple, sans classe de données :" -#: library/dataclasses.rst:568 +#: library/dataclasses.rst:705 msgid "" "Note that the two instances of class ``C`` share the same class variable " "``x``, as expected." msgstr "" +"Comme attendu, les deux instances de ``C`` partagent le même objet pour " +"l'attribut ``x``." -#: library/dataclasses.rst:571 +#: library/dataclasses.rst:708 msgid "Using dataclasses, *if* this code was valid::" -msgstr "" +msgstr "Avec les classes de données, si ce code était valide :" -#: library/dataclasses.rst:579 +#: library/dataclasses.rst:716 msgid "it would generate code similar to::" -msgstr "" +msgstr "il générerait un code équivalent à :" -#: library/dataclasses.rst:590 +#: library/dataclasses.rst:727 +#, fuzzy msgid "" "This has the same issue as the original example using class ``C``. That is, " "two instances of class ``D`` that do not specify a value for ``x`` when " "creating a class instance will share the same copy of ``x``. Because " "dataclasses just use normal Python class creation they also share this " "behavior. There is no general way for Data Classes to detect this " -"condition. Instead, dataclasses will raise a :exc:`TypeError` if it detects " -"a default parameter of type ``list``, ``dict``, or ``set``. This is a " -"partial solution, but it does protect against many common errors." -msgstr "" - -#: library/dataclasses.rst:600 +"condition. Instead, the :func:`dataclass` decorator will raise a :exc:" +"`TypeError` if it detects an unhashable default parameter. The assumption " +"is that if a value is unhashable, it is mutable. This is a partial " +"solution, but it does protect against many common errors." +msgstr "" +"On se retrouve avec le même problème qu'au premier exemple avec la classe " +"``C``. Les classes de données étant créées comme toutes les autres classes " +"Python, leur comportement est identique. Ainsi, deux instances distinctes de " +"``D`` où l'attribut ``x`` a été laissé à sa valeur par défaut partagent la " +"même copie de l'objet ``x``. Il n'y a aucun moyen commun de détecter cette " +"situation. C'est pourquoi le décorateur :func:`dataclass` lève :exc:" +"`TypeError` si une valeur par défaut est de type ``list``, ``dict`` ou " +"``set`` est détectée. Cette solution n'est pas parfaite, mais permet " +"d'éviter la majorité des erreurs." + +#: library/dataclasses.rst:738 msgid "" "Using default factory functions is a way to create new instances of mutable " "types as default values for fields::" msgstr "" +"Pour qu'un champ d'un type muable soit par défaut initialisé à un nouvel " +"objet pour chaque instance, utilisez une fonction de fabrique :" -#: library/dataclasses.rst:610 -msgid "Exceptions" -msgstr "Exceptions" - -#: library/dataclasses.rst:614 +#: library/dataclasses.rst:747 msgid "" -"Raised when an implicitly defined :meth:`__setattr__` or :meth:`__delattr__` " -"is called on a dataclass which was defined with ``frozen=True``. It is a " -"subclass of :exc:`AttributeError`." +"Instead of looking for and disallowing objects of type ``list``, ``dict``, " +"or ``set``, unhashable objects are now not allowed as default values. " +"Unhashability is used to approximate mutability." msgstr "" + +#~ msgid "Module-level decorators, classes, and functions" +#~ msgstr "Décorateurs, classes et fonctions du module" + +#~ msgid "Exceptions" +#~ msgstr "Exceptions" diff --git a/library/datetime.po b/library/datetime.po index c6157edc41..ccbe55f2cf 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -5,16 +5,16 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2021-03-20 17:48+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-05-18 17:37+0200\n" "Last-Translator: Loc Cosnier \n" -"Language-Team: French \n" +"Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1)\n" -"X-Generator: Gtranslator 3.38.0\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.0.1\n" #: library/datetime.rst:2 msgid ":mod:`datetime` --- Basic date and time types" @@ -57,21 +57,30 @@ msgstr "Module :mod:`time`" msgid "Time access and conversions." msgstr "Accès aux données d'horaires et aux conversions associées." -#: library/datetime.rst:30 +#: library/datetime.rst:31 +#, fuzzy +msgid "Module :mod:`zoneinfo`" +msgstr "Module :mod:`time`" + +#: library/datetime.rst:31 +msgid "Concrete time zones representing the IANA time zone database." +msgstr "" + +#: library/datetime.rst:33 msgid "Package `dateutil `_" msgstr "Paquet `dateutil `_" -#: library/datetime.rst:31 +#: library/datetime.rst:34 msgid "Third-party library with expanded time zone and parsing support." msgstr "" "Bibliothèque tierce avec prise en charge complète du fuseau horaire et de " "l'analyse de dates sous forme textuelle." -#: library/datetime.rst:36 +#: library/datetime.rst:39 msgid "Aware and Naive Objects" msgstr "Objets avisés et naïfs" -#: library/datetime.rst:38 +#: library/datetime.rst:41 msgid "" "Date and time objects may be categorized as \"aware\" or \"naive\" depending " "on whether or not they include timezone information." @@ -80,7 +89,7 @@ msgstr "" "« naïfs » selon qu'ils contiennent ou non des informations sur le fuseau " "horaire." -#: library/datetime.rst:41 +#: library/datetime.rst:44 msgid "" "With sufficient knowledge of applicable algorithmic and political time " "adjustments, such as time zone and daylight saving time information, an " @@ -94,7 +103,7 @@ msgstr "" "par rapport à d'autres objets avisés. Un objet avisé est utilisé pour " "représenter un instant précis qui n'est pas ouvert à l'interprétation [#]_." -#: library/datetime.rst:47 +#: library/datetime.rst:50 msgid "" "A **naive** object does not contain enough information to unambiguously " "locate itself relative to other date/time objects. Whether a naive object " @@ -112,7 +121,7 @@ msgstr "" "le programme. Les objets naïfs sont simples à comprendre et il est aisé de " "travailler avec, au prix de négliger certains aspects de la réalité." -#: library/datetime.rst:54 +#: library/datetime.rst:57 msgid "" "For applications requiring aware objects, :class:`.datetime` and :class:`." "time` objects have an optional time zone information attribute, :attr:`!" @@ -128,7 +137,7 @@ msgstr "" "informations sur le décalage par rapport à l'heure UTC, le nom du fuseau " "horaire, et si l'heure d'été est en vigueur." -#: library/datetime.rst:60 +#: library/datetime.rst:63 msgid "" "Only one concrete :class:`tzinfo` class, the :class:`timezone` class, is " "supplied by the :mod:`datetime` module. The :class:`timezone` class can " @@ -147,15 +156,15 @@ msgstr "" "sont plus politiques que rationnelles, changent fréquemment, et il n'y a pas " "de standard qui vaille pour toute application, en dehors d'UTC." -#: library/datetime.rst:69 +#: library/datetime.rst:72 msgid "Constants" msgstr "Constantes" -#: library/datetime.rst:71 +#: library/datetime.rst:74 msgid "The :mod:`datetime` module exports the following constants:" msgstr "Le module :mod:`datetime` exporte les constantes suivantes :" -#: library/datetime.rst:75 +#: library/datetime.rst:78 msgid "" "The smallest year number allowed in a :class:`date` or :class:`.datetime` " "object. :const:`MINYEAR` is ``1``." @@ -163,7 +172,7 @@ msgstr "" "Le numéro d'année le plus petit autorisé dans un objet :class:`date` ou :" "class:`datetime`. :const:`MINYEAR` vaut ``1``." -#: library/datetime.rst:81 +#: library/datetime.rst:84 msgid "" "The largest year number allowed in a :class:`date` or :class:`.datetime` " "object. :const:`MAXYEAR` is ``9999``." @@ -171,11 +180,15 @@ msgstr "" "Le numéro d'année le plus grand autorisé dans un objet :class:`date` ou :" "class:`datetime`. :const:`MAXYEAR` vaut ``9999``." -#: library/datetime.rst:85 +#: library/datetime.rst:89 +msgid "Alias for the UTC timezone singleton :attr:`datetime.timezone.utc`." +msgstr "" + +#: library/datetime.rst:94 msgid "Available Types" msgstr "Types disponibles" -#: library/datetime.rst:90 +#: library/datetime.rst:99 msgid "" "An idealized naive date, assuming the current Gregorian calendar always was, " "and always will be, in effect. Attributes: :attr:`year`, :attr:`month`, and :" @@ -185,19 +198,19 @@ msgstr "" "toujours existé et qu'il existera toujours. Attributs : :attr:`year`, :attr:" "`month` et :attr:`day`." -#: library/datetime.rst:98 +#: library/datetime.rst:107 msgid "" "An idealized time, independent of any particular day, assuming that every " -"day has exactly 24\\*60\\*60 seconds. (There is no notion of \"leap seconds" -"\" here.) Attributes: :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:" -"`microsecond`, and :attr:`.tzinfo`." +"day has exactly 24\\*60\\*60 seconds. (There is no notion of \"leap " +"seconds\" here.) Attributes: :attr:`hour`, :attr:`minute`, :attr:`second`, :" +"attr:`microsecond`, and :attr:`.tzinfo`." msgstr "" "Un temps idéalisé, indépendant d'une date particulière, en supposant qu'une " "journée est composée d'exactement 24\\*60\\*60 secondes (il n'y a pas ici de " "notion de « seconde intercalaire »). Attributs : :attr:`hour`, :attr:" "`minute`, :attr:`second`, :attr:`microsecond` et :attr:`tzinfo`." -#: library/datetime.rst:107 +#: library/datetime.rst:116 msgid "" "A combination of a date and a time. Attributes: :attr:`year`, :attr:" "`month`, :attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:" @@ -207,7 +220,7 @@ msgstr "" "`month`, :attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:" "`microsecond`, et :attr:`tzinfo`." -#: library/datetime.rst:115 +#: library/datetime.rst:124 msgid "" "A duration expressing the difference between two :class:`date`, :class:`." "time`, or :class:`.datetime` instances to microsecond resolution." @@ -215,7 +228,7 @@ msgstr "" "Une durée qui exprime la différence entre deux instances de :class:`date`, :" "class:`time` ou :class:`datetime` en microsecondes." -#: library/datetime.rst:122 +#: library/datetime.rst:131 msgid "" "An abstract base class for time zone information objects. These are used by " "the :class:`.datetime` and :class:`.time` classes to provide a customizable " @@ -228,7 +241,7 @@ msgstr "" "d'ajustement d'horaire (par exemple la prise en compte d'un fuseau horaire " "et/ou de l'heure d'été)." -#: library/datetime.rst:130 +#: library/datetime.rst:139 msgid "" "A class that implements the :class:`tzinfo` abstract base class as a fixed " "offset from the UTC." @@ -236,19 +249,19 @@ msgstr "" "Une classe qui implémente la classe de base abstraite :class:`tzinfo` en " "tant qu'offset fixe par rapport au temps UTC." -#: library/datetime.rst:153 +#: library/datetime.rst:162 msgid "Objects of these types are immutable." msgstr "Les objets issus de ces types sont immuables." -#: library/datetime.rst:137 +#: library/datetime.rst:146 msgid "Subclass relationships::" msgstr "Relations entre les sous-classes ::" -#: library/datetime.rst:148 +#: library/datetime.rst:157 msgid "Common Properties" msgstr "Propriétés communes" -#: library/datetime.rst:150 +#: library/datetime.rst:159 msgid "" "The :class:`date`, :class:`.datetime`, :class:`.time`, and :class:`timezone` " "types share these common features:" @@ -256,7 +269,7 @@ msgstr "" "Les types :class:`date`, :class:`.datetime`, :class:`.time`, et :class:" "`timezone` partagent les caractéristiques suivantes :" -#: library/datetime.rst:154 +#: library/datetime.rst:163 msgid "" "Objects of these types are hashable, meaning that they can be used as " "dictionary keys." @@ -264,7 +277,7 @@ msgstr "" "Les objets de ces types sont hachables, ce qui signifie qu'ils peuvent être " "utilisés comme clés de dictionnaire." -#: library/datetime.rst:156 +#: library/datetime.rst:165 msgid "" "Objects of these types support efficient pickling via the :mod:`pickle` " "module." @@ -272,58 +285,58 @@ msgstr "" "Les objets de ces types peuvent être sérialisés efficacement par le module :" "mod:`pickle`." -#: library/datetime.rst:159 +#: library/datetime.rst:168 msgid "Determining if an Object is Aware or Naive" msgstr "Catégorisation d'un objet en « avisé » ou « naïf »" -#: library/datetime.rst:161 +#: library/datetime.rst:170 msgid "Objects of the :class:`date` type are always naive." msgstr "Les objets de type :class:`date` sont toujours naïfs." -#: library/datetime.rst:163 +#: library/datetime.rst:172 msgid "" "An object of type :class:`.time` or :class:`.datetime` may be aware or naive." msgstr "" "Un objet du type :class:`.time` ou :class:`.datetime` peut être avisé ou " "naïf." -#: library/datetime.rst:165 +#: library/datetime.rst:174 msgid "A :class:`.datetime` object *d* is aware if both of the following hold:" msgstr "" "Un objet :class:`.datetime` *d* est avisé si les deux conditions suivantes " "vérifient :" -#: library/datetime.rst:167 +#: library/datetime.rst:176 msgid "``d.tzinfo`` is not ``None``" msgstr "``d.tzinfo`` ne vaut pas ``None``" -#: library/datetime.rst:168 +#: library/datetime.rst:177 msgid "``d.tzinfo.utcoffset(d)`` does not return ``None``" msgstr "``d.tzinfo.utcoffset(d)`` ne renvoie pas ``None``" -#: library/datetime.rst:170 +#: library/datetime.rst:179 msgid "Otherwise, *d* is naive." msgstr "Autrement, *d* est naïf." -#: library/datetime.rst:172 +#: library/datetime.rst:181 msgid "A :class:`.time` object *t* is aware if both of the following hold:" msgstr "" "Un objet :class:`.time` *t* est avisé si les deux conditions suivantes " "vérifient :" -#: library/datetime.rst:174 +#: library/datetime.rst:183 msgid "``t.tzinfo`` is not ``None``" msgstr "``t.tzinfo`` ne vaut pas ``None``" -#: library/datetime.rst:175 +#: library/datetime.rst:184 msgid "``t.tzinfo.utcoffset(None)`` does not return ``None``." msgstr "``t.tzinfo.utcoffset(None)`` ne renvoie pas ``None``." -#: library/datetime.rst:177 +#: library/datetime.rst:186 msgid "Otherwise, *t* is naive." msgstr "Autrement, *t* est naïf." -#: library/datetime.rst:179 +#: library/datetime.rst:188 msgid "" "The distinction between aware and naive doesn't apply to :class:`timedelta` " "objects." @@ -331,11 +344,11 @@ msgstr "" "La distinction entre avisé et naïf ne s'applique pas aux objets de type :" "class:`timedelta`." -#: library/datetime.rst:185 +#: library/datetime.rst:194 msgid ":class:`timedelta` Objects" msgstr "Objets :class:`timedelta`" -#: library/datetime.rst:187 +#: library/datetime.rst:196 msgid "" "A :class:`timedelta` object represents a duration, the difference between " "two dates or times." @@ -343,7 +356,7 @@ msgstr "" "Un objet :class:`timedelta` représente une durée, c'est-à-dire la différence " "entre deux dates ou heures." -#: library/datetime.rst:192 +#: library/datetime.rst:201 msgid "" "All arguments are optional and default to ``0``. Arguments may be integers " "or floats, and may be positive or negative." @@ -352,7 +365,7 @@ msgstr "" "Les paramètres peuvent être des entiers ou des flottants et ils peuvent être " "positifs ou négatifs." -#: library/datetime.rst:195 +#: library/datetime.rst:204 msgid "" "Only *days*, *seconds* and *microseconds* are stored internally. Arguments " "are converted to those units:" @@ -360,23 +373,23 @@ msgstr "" "Seuls les *jours*, les *secondes* et les *microsecondes* sont stockés en " "interne. Tous les paramètres sont convertis dans ces unités :" -#: library/datetime.rst:198 +#: library/datetime.rst:207 msgid "A millisecond is converted to 1000 microseconds." msgstr "Une milliseconde est convertie en 1000 microsecondes." -#: library/datetime.rst:199 +#: library/datetime.rst:208 msgid "A minute is converted to 60 seconds." msgstr "Une minute est convertie en 60 secondes." -#: library/datetime.rst:200 +#: library/datetime.rst:209 msgid "An hour is converted to 3600 seconds." msgstr "Une heure est convertie en 3600 secondes." -#: library/datetime.rst:201 +#: library/datetime.rst:210 msgid "A week is converted to 7 days." msgstr "Une semaine est convertie en 7 jours." -#: library/datetime.rst:203 +#: library/datetime.rst:212 msgid "" "and days, seconds and microseconds are then normalized so that the " "representation is unique, with" @@ -384,19 +397,19 @@ msgstr "" "et ensuite les jours, secondes et microsecondes sont normalisés pour que la " "représentation soit unique avec" -#: library/datetime.rst:206 +#: library/datetime.rst:215 msgid "``0 <= microseconds < 1000000``" msgstr "``0 <= microseconds < 1000000``" -#: library/datetime.rst:207 +#: library/datetime.rst:216 msgid "``0 <= seconds < 3600*24`` (the number of seconds in one day)" msgstr "``0 <= secondes < 3600*24`` (le nombre de secondes dans une journée)" -#: library/datetime.rst:208 +#: library/datetime.rst:217 msgid "``-999999999 <= days <= 999999999``" msgstr "``-999999999 <= days <= 999999999``" -#: library/datetime.rst:210 +#: library/datetime.rst:219 msgid "" "The following example illustrates how any arguments besides *days*, " "*seconds* and *microseconds* are \"merged\" and normalized into those three " @@ -406,7 +419,7 @@ msgstr "" "*seconds* et *microseconds* sont « fusionnés » et normalisés dans ces trois " "attributs résultants ::" -#: library/datetime.rst:228 +#: library/datetime.rst:237 msgid "" "If any argument is a float and there are fractional microseconds, the " "fractional microseconds left over from all arguments are combined and their " @@ -421,7 +434,7 @@ msgstr "" "flottant, les processus de conversion et de normalisation seront exacts (pas " "d'informations perdues)." -#: library/datetime.rst:235 +#: library/datetime.rst:244 msgid "" "If the normalized value of days lies outside the indicated range, :exc:" "`OverflowError` is raised." @@ -429,7 +442,7 @@ msgstr "" "Si la valeur normalisée des jours déborde de l'intervalle indiqué, une :exc:" "`OverflowError` est levée." -#: library/datetime.rst:238 +#: library/datetime.rst:247 msgid "" "Note that normalization of negative values may be surprising at first. For " "example::" @@ -437,15 +450,15 @@ msgstr "" "Notez que la normalisation de valeurs négatives peut être surprenante au " "premier abord. Par exemple ::" -#: library/datetime.rst:541 library/datetime.rst:1666 library/datetime.rst:2260 +#: library/datetime.rst:552 library/datetime.rst:1677 library/datetime.rst:2281 msgid "Class attributes:" msgstr "Attributs de la classe :" -#: library/datetime.rst:251 +#: library/datetime.rst:260 msgid "The most negative :class:`timedelta` object, ``timedelta(-999999999)``." msgstr "L'objet :class:`timedelta` le plus négatif, ``timedelta(-999999999)``." -#: library/datetime.rst:256 +#: library/datetime.rst:265 msgid "" "The most positive :class:`timedelta` object, ``timedelta(days=999999999, " "hours=23, minutes=59, seconds=59, microseconds=999999)``." @@ -453,7 +466,7 @@ msgstr "" "L'objet :class:`timedelta` le plus positif, ``timedelta(days=999999999, " "hours=23, minutes=59, seconds=59, microseconds=999999)``." -#: library/datetime.rst:262 +#: library/datetime.rst:271 msgid "" "The smallest possible difference between non-equal :class:`timedelta` " "objects, ``timedelta(microseconds=1)``." @@ -461,7 +474,7 @@ msgstr "" "La plus petite différence entre des objets :class:`timedelta` non égaux, " "``timedelta(microseconds=1)``." -#: library/datetime.rst:265 +#: library/datetime.rst:274 msgid "" "Note that, because of normalization, ``timedelta.max`` > ``-timedelta.min``. " "``-timedelta.max`` is not representable as a :class:`timedelta` object." @@ -470,59 +483,59 @@ msgstr "" "timedelta.min``. ``-timedelta.max`` n'est pas représentable sous la forme " "d'un objet :class:`timedelta`." -#: library/datetime.rst:559 library/datetime.rst:1686 +#: library/datetime.rst:570 library/datetime.rst:1697 msgid "Instance attributes (read-only):" msgstr "Attributs de l'instance (en lecture seule) :" -#: library/datetime.rst:271 +#: library/datetime.rst:280 msgid "Attribute" msgstr "Attribut" -#: library/datetime.rst:271 +#: library/datetime.rst:280 msgid "Value" msgstr "Valeur" -#: library/datetime.rst:273 +#: library/datetime.rst:282 msgid "``days``" msgstr "``days``" -#: library/datetime.rst:273 +#: library/datetime.rst:282 msgid "Between -999999999 and 999999999 inclusive" msgstr "Entre ``-999999999`` et ``999999999`` inclus" -#: library/datetime.rst:275 +#: library/datetime.rst:284 msgid "``seconds``" msgstr "``seconds``" -#: library/datetime.rst:275 +#: library/datetime.rst:284 msgid "Between 0 and 86399 inclusive" msgstr "Entre 0 et 86399 inclus" -#: library/datetime.rst:277 +#: library/datetime.rst:286 msgid "``microseconds``" msgstr "``microseconds``" -#: library/datetime.rst:277 +#: library/datetime.rst:286 msgid "Between 0 and 999999 inclusive" msgstr "Entre 0 et 999999 inclus" -#: library/datetime.rst:576 library/datetime.rst:1121 +#: library/datetime.rst:587 library/datetime.rst:1132 msgid "Supported operations:" msgstr "Opérations gérées :" -#: library/datetime.rst:579 library/datetime.rst:1124 +#: library/datetime.rst:590 library/datetime.rst:1135 msgid "Operation" msgstr "Opération" -#: library/datetime.rst:579 library/datetime.rst:1124 +#: library/datetime.rst:590 library/datetime.rst:1135 msgid "Result" msgstr "Résultat" -#: library/datetime.rst:287 +#: library/datetime.rst:296 msgid "``t1 = t2 + t3``" msgstr "``t1 = t2 + t3``" -#: library/datetime.rst:287 +#: library/datetime.rst:296 msgid "" "Sum of *t2* and *t3*. Afterwards *t1*-*t2* == *t3* and *t1*-*t3* == *t2* are " "true. (1)" @@ -530,11 +543,11 @@ msgstr "" "Somme de *t2* et *t3*. Ensuite ``t1 - t2 == t3`` et ``t1 - t3 == t2`` sont " "des expressions vraies. (1)" -#: library/datetime.rst:290 +#: library/datetime.rst:299 msgid "``t1 = t2 - t3``" msgstr "``t1 = t2 - t3``" -#: library/datetime.rst:290 +#: library/datetime.rst:299 msgid "" "Difference of *t2* and *t3*. Afterwards *t1* == *t2* - *t3* and *t2* == *t1* " "+ *t3* are true. (1)(6)" @@ -542,11 +555,11 @@ msgstr "" "Différence entre *t2* et *t3*. Ensuite ``t1 == t2 - t3`` et ``t2 == t1 + " "t3`` sont des expressions vraies. (1)(6)" -#: library/datetime.rst:294 +#: library/datetime.rst:303 msgid "``t1 = t2 * i or t1 = i * t2``" msgstr "``t1 = t2 * i or t1 = i * t2``" -#: library/datetime.rst:294 +#: library/datetime.rst:303 msgid "" "Delta multiplied by an integer. Afterwards *t1* // i == *t2* is true, " "provided ``i != 0``." @@ -554,15 +567,15 @@ msgstr "" "Delta multiplié par un entier. Ensuite *t1* // i == *t2* est vrai, en " "admettant que ``i != 0``." -#: library/datetime.rst:298 +#: library/datetime.rst:307 msgid "In general, *t1* \\* i == *t1* \\* (i-1) + *t1* is true. (1)" msgstr "De manière générale, *t1* \\* i == *t1* \\* (i-1) + *t1* est vrai. (1)" -#: library/datetime.rst:301 +#: library/datetime.rst:310 msgid "``t1 = t2 * f or t1 = f * t2``" msgstr "``t1 = t2 * f or t1 = f * t2``" -#: library/datetime.rst:301 +#: library/datetime.rst:310 msgid "" "Delta multiplied by a float. The result is rounded to the nearest multiple " "of timedelta.resolution using round-half-to-even." @@ -571,11 +584,11 @@ msgstr "" "proche de ``timedelta.resolution`` en utilisant la règle de l'arrondi au " "pair le plus proche." -#: library/datetime.rst:305 +#: library/datetime.rst:314 msgid "``f = t2 / t3``" msgstr "``f = t2 / t3``" -#: library/datetime.rst:305 +#: library/datetime.rst:314 msgid "" "Division (3) of overall duration *t2* by interval unit *t3*. Returns a :" "class:`float` object." @@ -583,11 +596,11 @@ msgstr "" "Division (3) de la durée totale *t2* par l'unité d'intervalle *t3*. Renvoie " "un objet :class:`float`." -#: library/datetime.rst:309 +#: library/datetime.rst:318 msgid "``t1 = t2 / f or t1 = t2 / i``" msgstr "``t1 = t2 / f or t1 = t2 / i``" -#: library/datetime.rst:309 +#: library/datetime.rst:318 msgid "" "Delta divided by a float or an int. The result is rounded to the nearest " "multiple of timedelta.resolution using round-half-to-even." @@ -596,11 +609,11 @@ msgstr "" "multiple le plus proche de ``timedelta.resolution`` en utilisant la règle de " "l'arrondi au pair le plus proche." -#: library/datetime.rst:313 +#: library/datetime.rst:322 msgid "``t1 = t2 // i`` or ``t1 = t2 // t3``" msgstr "``t1 = t2 // i`` or ``t1 = t2 // t3``" -#: library/datetime.rst:313 +#: library/datetime.rst:322 msgid "" "The floor is computed and the remainder (if any) is thrown away. In the " "second case, an integer is returned. (3)" @@ -608,19 +621,19 @@ msgstr "" "Le quotient est calculé et le reste (s'il y en a un) est ignoré. Dans le " "second cas, un entier est renvoyé. (3)" -#: library/datetime.rst:317 +#: library/datetime.rst:326 msgid "``t1 = t2 % t3``" msgstr "``t1 = t2 % t3``" -#: library/datetime.rst:317 +#: library/datetime.rst:326 msgid "The remainder is computed as a :class:`timedelta` object. (3)" msgstr "Le reste est calculé comme un objet de type :class:`timedelta`. (3)" -#: library/datetime.rst:320 +#: library/datetime.rst:329 msgid "``q, r = divmod(t1, t2)``" msgstr "``q, r = divmod(t1, t2)``" -#: library/datetime.rst:320 +#: library/datetime.rst:329 msgid "" "Computes the quotient and the remainder: ``q = t1 // t2`` (3) and ``r = t1 % " "t2``. q is an integer and r is a :class:`timedelta` object." @@ -628,19 +641,19 @@ msgstr "" "Calcule le quotient et le reste : ``q = t1 // t2`` (3) et ``r = t1 % t2``. q " "est un entier et r est un objet :class:`timedelta`." -#: library/datetime.rst:325 +#: library/datetime.rst:334 msgid "``+t1``" msgstr "``+t1``" -#: library/datetime.rst:325 +#: library/datetime.rst:334 msgid "Returns a :class:`timedelta` object with the same value. (2)" msgstr "Renvoie un objet :class:`timedelta` avec la même valeur. (2)" -#: library/datetime.rst:328 +#: library/datetime.rst:337 msgid "``-t1``" msgstr "``-t1``" -#: library/datetime.rst:328 +#: library/datetime.rst:337 msgid "" "equivalent to :class:`timedelta`\\ (-*t1.days*, -*t1.seconds*, -*t1." "microseconds*), and to *t1*\\* -1. (1)(4)" @@ -648,11 +661,11 @@ msgstr "" "équivalent à :class:`timedelta`\\ (*-t1.days*, *-t1.seconds*, *-t1." "microseconds*), et à ``t1 * -1``. (1)(4)" -#: library/datetime.rst:333 +#: library/datetime.rst:342 msgid "``abs(t)``" msgstr "``abs(t)``" -#: library/datetime.rst:333 +#: library/datetime.rst:342 msgid "" "equivalent to +\\ *t* when ``t.days >= 0``, and to -*t* when ``t.days < 0``. " "(2)" @@ -660,11 +673,11 @@ msgstr "" "équivalent à ``+t`` quand ``t.days >= 0``, et à ``-t`` quand ``t.days < 0``. " "(2)" -#: library/datetime.rst:336 +#: library/datetime.rst:345 msgid "``str(t)``" msgstr "``str(t)``" -#: library/datetime.rst:336 +#: library/datetime.rst:345 msgid "" "Returns a string in the form ``[D day[s], ][H]H:MM:SS[.UUUUUU]``, where D is " "negative for negative ``t``. (5)" @@ -672,11 +685,11 @@ msgstr "" "Renvoie une chaîne de la forme ``[D day[s], ][H]H:MM:SS[.UUUUUU]``, où D est " "négatif pour ``t`` négatif. (5)" -#: library/datetime.rst:340 +#: library/datetime.rst:349 msgid "``repr(t)``" msgstr "``repr(t)``" -#: library/datetime.rst:340 +#: library/datetime.rst:349 msgid "" "Returns a string representation of the :class:`timedelta` object as a " "constructor call with canonical attribute values." @@ -684,28 +697,28 @@ msgstr "" "Renvoie une chaîne de la forme objet :class:`timedelta` comme un appel " "construit avec des valeurs d'attributs canoniques." -#: library/datetime.rst:593 library/datetime.rst:2472 +#: library/datetime.rst:604 library/datetime.rst:2494 msgid "Notes:" msgstr "Notes :" -#: library/datetime.rst:349 +#: library/datetime.rst:358 msgid "This is exact but may overflow." msgstr "Ceci est exact, mais peut provoquer un débordement." -#: library/datetime.rst:352 +#: library/datetime.rst:361 msgid "This is exact and cannot overflow." msgstr "Ceci est exact, et ne peut pas provoquer un débordement." -#: library/datetime.rst:355 +#: library/datetime.rst:364 msgid "Division by 0 raises :exc:`ZeroDivisionError`." msgstr "Une division par 0 provoque :exc:`ZeroDivisionError`." -#: library/datetime.rst:358 +#: library/datetime.rst:367 msgid "-*timedelta.max* is not representable as a :class:`timedelta` object." msgstr "" "*-timedelta.max* n'est pas représentable avec un objet :class:`timedelta`." -#: library/datetime.rst:361 +#: library/datetime.rst:370 msgid "" "String representations of :class:`timedelta` objects are normalized " "similarly to their internal representation. This leads to somewhat unusual " @@ -715,7 +728,7 @@ msgstr "" "normalisée similairement à leur représentation interne. Cela amène à des " "résultats inhabituels pour des *timedeltas* négatifs. Par exemple ::" -#: library/datetime.rst:371 +#: library/datetime.rst:380 msgid "" "The expression ``t2 - t3`` will always be equal to the expression ``t2 + (-" "t3)`` except when t3 is equal to ``timedelta.max``; in that case the former " @@ -725,7 +738,7 @@ msgstr "" "sauf si *t3* vaut ``timedelta.max`` ; dans ce cas, la première expression " "produit une valeur alors que la seconde lève une ``OverflowError``." -#: library/datetime.rst:375 +#: library/datetime.rst:384 msgid "" "In addition to the operations listed above, :class:`timedelta` objects " "support certain additions and subtractions with :class:`date` and :class:`." @@ -735,7 +748,7 @@ msgstr "" "implémentent certaines additions et soustractions avec des objets :class:" "`date` et :class:`datetime` (voir ci-dessous)." -#: library/datetime.rst:379 +#: library/datetime.rst:388 msgid "" "Floor division and true division of a :class:`timedelta` object by another :" "class:`timedelta` object are now supported, as are remainder operations and " @@ -748,14 +761,14 @@ msgstr "" "division et la multiplication d'un objet :class:`timedelta` par un :class:" "`float` sont maintenant implémentées." -#: library/datetime.rst:386 +#: library/datetime.rst:395 msgid "" "Comparisons of :class:`timedelta` objects are supported, with some caveats." msgstr "" "Les comparaisons des objets :class:`timedelta` sont gérées, avec quelques " "réserves." -#: library/datetime.rst:388 +#: library/datetime.rst:397 msgid "" "The comparisons ``==`` or ``!=`` *always* return a :class:`bool`, no matter " "the type of the compared object::" @@ -763,7 +776,7 @@ msgstr "" "Les comparaisons ``==`` ou ``!=`` renvoient *toujours* un :class:`bool`, " "quel que soit le type de l'objet comparé ::" -#: library/datetime.rst:399 +#: library/datetime.rst:408 msgid "" "For all other comparisons (such as ``<`` and ``>``), when a :class:" "`timedelta` object is compared to an object of a different type, :exc:" @@ -773,7 +786,7 @@ msgstr "" "objet :class:`timedelta` est comparé à un objet d'un type différent, :exc:" "`TypeError` est levée ::" -#: library/datetime.rst:410 +#: library/datetime.rst:419 msgid "" "In Boolean contexts, a :class:`timedelta` object is considered to be true if " "and only if it isn't equal to ``timedelta(0)``." @@ -781,11 +794,11 @@ msgstr "" "Dans les contextes booléens, un objet :class:`timedelta` est considéré comme " "vrai si et seulement s'il n'est pas égal à ``timedelta(0)``." -#: library/datetime.rst:622 library/datetime.rst:1783 +#: library/datetime.rst:633 library/datetime.rst:1805 msgid "Instance methods:" msgstr "Méthodes de l'instance :" -#: library/datetime.rst:417 +#: library/datetime.rst:426 msgid "" "Return the total number of seconds contained in the duration. Equivalent to " "``td / timedelta(seconds=1)``. For interval units other than seconds, use " @@ -796,7 +809,7 @@ msgstr "" "seconde, utilisez directement la division (par exemple, ``td / " "timedelta(microseconds=1)``)." -#: library/datetime.rst:421 +#: library/datetime.rst:430 msgid "" "Note that for very large time intervals (greater than 270 years on most " "platforms) this method will lose microsecond accuracy." @@ -805,23 +818,23 @@ msgstr "" "sur la plupart des plateformes), cette méthode perdra la précision des " "microsecondes." -#: library/datetime.rst:427 +#: library/datetime.rst:436 msgid "Examples of usage: :class:`timedelta`" msgstr "Exemples d'utilisation de la classe :class:`timedelta` :" -#: library/datetime.rst:429 +#: library/datetime.rst:438 msgid "An additional example of normalization::" msgstr "Un exemple supplémentaire de normalisation ::" -#: library/datetime.rst:441 +#: library/datetime.rst:450 msgid "Examples of :class:`timedelta` arithmetic::" msgstr "Exemples d'arithmétique avec la classe :class:`timedelta` ::" -#: library/datetime.rst:460 +#: library/datetime.rst:469 msgid ":class:`date` Objects" msgstr "Objets :class:`date`" -#: library/datetime.rst:462 +#: library/datetime.rst:471 msgid "" "A :class:`date` object represents a date (year, month and day) in an " "idealized calendar, the current Gregorian calendar indefinitely extended in " @@ -831,15 +844,15 @@ msgstr "" "calendrier idéal, le calendrier grégorien actuel étant indéfiniment étendu " "dans les deux sens." -#: library/datetime.rst:466 +#: library/datetime.rst:475 msgid "" "January 1 of year 1 is called day number 1, January 2 of year 1 is called " "day number 2, and so on. [#]_" msgstr "" -"Le 1\\ :sup:`er` janvier de l'année 1 est appelé jour numéro 1, le 2 janvier " +"Le 1 :sup:`er` janvier de l'année 1 est appelé jour numéro 1, le 2 janvier " "de l'année 1 est appelé jour numéro 2, et ainsi de suite. [#]_" -#: library/datetime.rst:471 +#: library/datetime.rst:480 msgid "" "All arguments are required. Arguments must be integers, in the following " "ranges:" @@ -847,38 +860,38 @@ msgstr "" "Tous les arguments sont requis. Les arguments peuvent être des entiers, dans " "les intervalles suivants :" -#: library/datetime.rst:474 +#: library/datetime.rst:483 msgid "``MINYEAR <= year <= MAXYEAR``" msgstr "``MINYEAR <= year <= MAXYEAR``" -#: library/datetime.rst:475 +#: library/datetime.rst:484 msgid "``1 <= month <= 12``" msgstr "``1 <= month <= 12``" -#: library/datetime.rst:476 +#: library/datetime.rst:485 msgid "``1 <= day <= number of days in the given month and year``" msgstr "``1 <= day <= nombre de jours dans le mois et l'année donnés``" -#: library/datetime.rst:840 +#: library/datetime.rst:849 msgid "" "If an argument outside those ranges is given, :exc:`ValueError` is raised." msgstr "" "Si un argument est donné en dehors de ces intervalles, une :exc:`valueError` " "est levée." -#: library/datetime.rst:845 +#: library/datetime.rst:854 msgid "Other constructors, all class methods:" msgstr "Autres constructeurs, méthodes de classe :" -#: library/datetime.rst:485 +#: library/datetime.rst:494 msgid "Return the current local date." msgstr "Renvoie la date locale courante." -#: library/datetime.rst:487 +#: library/datetime.rst:496 msgid "This is equivalent to ``date.fromtimestamp(time.time())``." msgstr "Cela est équivalent à ``date.fromtimestamp(time.time())``." -#: library/datetime.rst:491 +#: library/datetime.rst:500 msgid "" "Return the local date corresponding to the POSIX timestamp, such as is " "returned by :func:`time.time`." @@ -886,7 +899,7 @@ msgstr "" "Renvoie la date locale correspondant à l'horodatage POSIX, telle que " "renvoyée par :func:`time.time`." -#: library/datetime.rst:494 +#: library/datetime.rst:503 msgid "" "This may raise :exc:`OverflowError`, if the timestamp is out of the range of " "values supported by the platform C :c:func:`localtime` function, and :exc:" @@ -902,7 +915,7 @@ msgstr "" "non *POSIX* qui incluent les secondes intercalaires dans leur notion " "d'horodatage, ces secondes sont ignorées par :meth:`fromtimestamp`." -#: library/datetime.rst:501 +#: library/datetime.rst:510 msgid "" "Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is " "out of the range of values supported by the platform C :c:func:`localtime` " @@ -914,7 +927,7 @@ msgstr "" "fonction C :c:func:`localtime` de la plateforme. Lève une :exc:`OSError` " "plutôt qu'une :exc:`ValueError` en cas d'échec de :c:func:`localtime`." -#: library/datetime.rst:510 +#: library/datetime.rst:519 msgid "" "Return the date corresponding to the proleptic Gregorian ordinal, where " "January 1 of year 1 has ordinal 1." @@ -922,7 +935,7 @@ msgstr "" "Renvoie la date correspondant à l'ordinal grégorien proleptique, où le 1er " "janvier de l'an 1 a l'ordinal 1." -#: library/datetime.rst:513 +#: library/datetime.rst:522 msgid "" ":exc:`ValueError` is raised unless ``1 <= ordinal <= date.max.toordinal()``. " "For any date *d*, ``date.fromordinal(d.toordinal()) == d``." @@ -930,23 +943,23 @@ msgstr "" ":exc:`ValueError` est levée à moins que ``1 <= ordinal <= date.max." "toordinal()``. Pour toute date *d*, ``date.fromordinal(d.toordinal()) == d``." -#: library/datetime.rst:520 +#: library/datetime.rst:529 +#, fuzzy msgid "" -"Return a :class:`date` corresponding to a *date_string* given in the format " -"``YYYY-MM-DD``::" +"Return a :class:`date` corresponding to a *date_string* given in any valid " +"ISO 8601 format, except ordinal dates (e.g. ``YYYY-DDD``)::" msgstr "" "Renvoie une :class:`date` correspondant à *date_string* dans le format " "``YYYY-MM-DD`` ::" -#: library/datetime.rst:527 -msgid "" -"This is the inverse of :meth:`date.isoformat`. It only supports the format " -"``YYYY-MM-DD``." +#: library/datetime.rst:541 +#, fuzzy +msgid "Previously, this method only supported the format ``YYYY-MM-DD``." msgstr "" "C'est la réciproque de :meth:`date.isoformat`. Elle ne prend en charge que " "le format ``YYYY-MM-DD``." -#: library/datetime.rst:535 +#: library/datetime.rst:546 msgid "" "Return a :class:`date` corresponding to the ISO calendar date specified by " "year, week and day. This is the inverse of the function :meth:`date." @@ -956,15 +969,15 @@ msgstr "" "par l'année, la semaine et le jour. C'est la réciproque de la fonction :meth:" "`date.isocalendar`." -#: library/datetime.rst:545 +#: library/datetime.rst:556 msgid "The earliest representable date, ``date(MINYEAR, 1, 1)``." msgstr "La plus vieille date représentable, ``date(MINYEAR, 1, 1)``." -#: library/datetime.rst:550 +#: library/datetime.rst:561 msgid "The latest representable date, ``date(MAXYEAR, 12, 31)``." msgstr "La dernière date représentable, ``date(MAXYEAR, 12, 31)``." -#: library/datetime.rst:555 +#: library/datetime.rst:566 msgid "" "The smallest possible difference between non-equal date objects, " "``timedelta(days=1)``." @@ -972,48 +985,48 @@ msgstr "" "La plus petite différence possible entre deux objets dates non-égaux, " "``timedelta(days=1)``." -#: library/datetime.rst:1072 +#: library/datetime.rst:1083 msgid "Between :const:`MINYEAR` and :const:`MAXYEAR` inclusive." msgstr "Entre :const:`MINYEAR` et :const:`MAXYEAR` inclus." -#: library/datetime.rst:1077 +#: library/datetime.rst:1088 msgid "Between 1 and 12 inclusive." msgstr "Entre 1 et 12 inclus." -#: library/datetime.rst:1082 +#: library/datetime.rst:1093 msgid "Between 1 and the number of days in the given month of the given year." msgstr "Entre 1 et le nombre de jours du mois donné de l'année donnée." -#: library/datetime.rst:581 +#: library/datetime.rst:592 msgid "``date2 = date1 + timedelta``" msgstr "``date2 = date1 + timedelta``" -#: library/datetime.rst:581 +#: library/datetime.rst:592 msgid "*date2* is ``timedelta.days`` days removed from *date1*. (1)" msgstr "" "*date2* est décalée de ``timedelta.days`` jours par rapport à *date1*. (1)" -#: library/datetime.rst:584 +#: library/datetime.rst:595 msgid "``date2 = date1 - timedelta``" msgstr "``date2 = date1 - timedelta``" -#: library/datetime.rst:584 +#: library/datetime.rst:595 msgid "Computes *date2* such that ``date2 + timedelta == date1``. (2)" msgstr "Calcule *date2* de façon à avoir ``date2 + timedelta == date1``. (2)" -#: library/datetime.rst:587 +#: library/datetime.rst:598 msgid "``timedelta = date1 - date2``" msgstr "``timedelta = date1 - date2``" -#: library/datetime.rst:1130 +#: library/datetime.rst:1141 msgid "\\(3)" msgstr "\\(3)" -#: library/datetime.rst:589 +#: library/datetime.rst:600 msgid "``date1 < date2``" msgstr "``date1 < date2``" -#: library/datetime.rst:589 +#: library/datetime.rst:600 msgid "" "*date1* is considered less than *date2* when *date1* precedes *date2* in " "time. (4)" @@ -1021,7 +1034,7 @@ msgstr "" "*date1* est considérée comme inférieure à *date2* quand *date1* précède " "*date2* dans le temps. (4)" -#: library/datetime.rst:596 +#: library/datetime.rst:607 msgid "" "*date2* is moved forward in time if ``timedelta.days > 0``, or backward if " "``timedelta.days < 0``. Afterward ``date2 - date1 == timedelta.days``. " @@ -1035,11 +1048,11 @@ msgstr "" "Une :exc:`OverflowError` est levée si ``date2.year`` devait être inférieure " "à :const:`MINYEAR` ou supérieure à :const:`MAXYEAR`." -#: library/datetime.rst:603 +#: library/datetime.rst:614 msgid "``timedelta.seconds`` and ``timedelta.microseconds`` are ignored." msgstr "``timedelta.seconds`` et ``timedelta.microseconds`` sont ignorés." -#: library/datetime.rst:606 +#: library/datetime.rst:617 msgid "" "This is exact, and cannot overflow. timedelta.seconds and timedelta." "microseconds are 0, and date2 + timedelta == date1 after." @@ -1048,7 +1061,7 @@ msgstr "" "seconds`` et ``timedelta.microseconds`` valent ``0``, et ``date2 + timedelta " "== date1`` après cela." -#: library/datetime.rst:610 +#: library/datetime.rst:621 msgid "" "In other words, ``date1 < date2`` if and only if ``date1.toordinal() < date2." "toordinal()``. Date comparison raises :exc:`TypeError` if the other " @@ -1070,14 +1083,14 @@ msgstr "" "`TypeError` est levée à moins que la comparaison soit ``==`` ou ``!=``. Ces " "derniers cas renvoient respectivement :const:`False` et :const:`True`." -#: library/datetime.rst:620 +#: library/datetime.rst:631 msgid "" "In Boolean contexts, all :class:`date` objects are considered to be true." msgstr "" "Dans des contextes booléens, tous les objets :class:`date` sont considérés " "comme vrai." -#: library/datetime.rst:626 +#: library/datetime.rst:637 msgid "" "Return a date with the same value, except for those parameters given new " "values by whichever keyword arguments are specified." @@ -1085,11 +1098,11 @@ msgstr "" "Renvoie une date avec la même valeur, excepté pour les valeurs spécifiées " "par arguments nommés." -#: library/datetime.rst:1826 +#: library/datetime.rst:1848 msgid "Example::" msgstr "Exemple ::" -#: library/datetime.rst:1308 +#: library/datetime.rst:1319 msgid "" "Return a :class:`time.struct_time` such as returned by :func:`time." "localtime`." @@ -1097,16 +1110,16 @@ msgstr "" "Renvoie une :class:`time.struct_time` telle que renvoyée par :func:`time." "localtime`." -#: library/datetime.rst:641 +#: library/datetime.rst:652 msgid "The hours, minutes and seconds are 0, and the DST flag is -1." msgstr "" "Les heures, minutes et secondes sont égales à 0 et le drapeau DST vaut -1." -#: library/datetime.rst:1310 +#: library/datetime.rst:1321 msgid "``d.timetuple()`` is equivalent to::" msgstr "``d.timetuple()`` est équivalent à ::" -#: library/datetime.rst:647 +#: library/datetime.rst:658 msgid "" "where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " "day number within the current year starting with ``1`` for January 1st." @@ -1115,7 +1128,7 @@ msgstr "" "numéro du jour dans l'année courante commençant par ``1`` pour le 1\\ :sup:" "`er` janvier." -#: library/datetime.rst:653 +#: library/datetime.rst:664 msgid "" "Return the proleptic Gregorian ordinal of the date, where January 1 of year " "1 has ordinal 1. For any :class:`date` object *d*, ``date.fromordinal(d." @@ -1125,7 +1138,7 @@ msgstr "" "l'an 1 a l'ordinal 1. Pour tout objet :class:`date` *d*, ``date." "fromordinal(d.toordinal()) == d``." -#: library/datetime.rst:660 +#: library/datetime.rst:671 msgid "" "Return the day of the week as an integer, where Monday is 0 and Sunday is 6. " "For example, ``date(2002, 12, 4).weekday() == 2``, a Wednesday. See also :" @@ -1135,7 +1148,7 @@ msgstr "" "dimanche vaut 6. Par exemple, ``date(2002, 12, 4).weekday() == 2``, un " "mercredi. Voir aussi :meth:`isoweekday`." -#: library/datetime.rst:667 +#: library/datetime.rst:678 msgid "" "Return the day of the week as an integer, where Monday is 1 and Sunday is 7. " "For example, ``date(2002, 12, 4).isoweekday() == 3``, a Wednesday. See also :" @@ -1145,7 +1158,7 @@ msgstr "" "dimanche vaut 7. Par exemple, ``date(2002, 12, 4).isoweekday() == 3``, un " "mercredi. Voir aussi :meth:`weekday`, :meth:`isocalendar`." -#: library/datetime.rst:674 +#: library/datetime.rst:685 msgid "" "Return a :term:`named tuple` object with three components: ``year``, " "``week`` and ``weekday``." @@ -1153,14 +1166,14 @@ msgstr "" "Renvoie un objet :term:`named tuple` avec trois composants : ``year``, " "``week`` et ``weekday``." -#: library/datetime.rst:677 +#: library/datetime.rst:688 msgid "" "The ISO calendar is a widely used variant of the Gregorian calendar. [#]_" msgstr "" "Le calendrier ISO est une variante largement utilisée du calendrier " "grégorien. [#]_" -#: library/datetime.rst:679 +#: library/datetime.rst:690 msgid "" "The ISO year consists of 52 or 53 full weeks, and where a week starts on a " "Monday and ends on a Sunday. The first week of an ISO year is the first " @@ -1174,7 +1187,7 @@ msgstr "" "un jeudi. Elle est appelée la semaine numéro 1, et l'année ISO de ce jeudi " "est la même que son année Grégorienne." -#: library/datetime.rst:684 +#: library/datetime.rst:695 msgid "" "For example, 2004 begins on a Thursday, so the first week of ISO year 2004 " "begins on Monday, 29 Dec 2003 and ends on Sunday, 4 Jan 2004::" @@ -1183,34 +1196,30 @@ msgstr "" "l'année ISO 2004 débute le lundi 29 décembre 2003 et se termine le dimanche " "4 janvier 2004 ::" -#: library/datetime.rst:693 +#: library/datetime.rst:704 msgid "Result changed from a tuple to a :term:`named tuple`." msgstr "Le résultat a changé d'un *n*-uplet à un :term:`named tuple`." -#: library/datetime.rst:698 +#: library/datetime.rst:709 msgid "" "Return a string representing the date in ISO 8601 format, ``YYYY-MM-DD``::" msgstr "" "Renvoie une chaîne de caractères représentant la date au format ISO 8601, " "\"YYYY-MM-DD\" ::" -#: library/datetime.rst:704 -msgid "This is the inverse of :meth:`date.fromisoformat`." -msgstr "C'est la réciproque de :meth:`date.fromisoformat`." - -#: library/datetime.rst:708 +#: library/datetime.rst:717 msgid "For a date *d*, ``str(d)`` is equivalent to ``d.isoformat()``." msgstr "Pour une date *d*, ``str(d)`` est équivalent à ``d.isoformat()``." -#: library/datetime.rst:713 +#: library/datetime.rst:722 msgid "Return a string representing the date::" msgstr "Renvoie une chaîne de caractères représentant la date ::" -#: library/datetime.rst:1494 +#: library/datetime.rst:1505 msgid "``d.ctime()`` is equivalent to::" msgstr "``d.ctime()`` est équivalent à ::" -#: library/datetime.rst:723 +#: library/datetime.rst:732 msgid "" "on platforms where the native C :c:func:`ctime` function (which :func:`time." "ctime` invokes, but which :meth:`date.ctime` does not invoke) conforms to " @@ -1219,7 +1228,7 @@ msgstr "" "sur les plateformes où la fonction C native :c:func:`ctime` (que :func:`time." "ctime` invoque, mais pas :meth:`date.ctime`) est conforme au standard C." -#: library/datetime.rst:730 +#: library/datetime.rst:739 msgid "" "Return a string representing the date, controlled by an explicit format " "string. Format codes referring to hours, minutes or seconds will see 0 " @@ -1231,7 +1240,7 @@ msgstr "" "heures, minutes ou secondes auront pour valeur 0. Pour une liste complète " "des directives de formatage, voir :ref:`strftime-strptime-behavior`." -#: library/datetime.rst:738 +#: library/datetime.rst:747 msgid "" "Same as :meth:`.date.strftime`. This makes it possible to specify a format " "string for a :class:`.date` object in :ref:`formatted string literals `__." +#: library/datetime.rst:1002 +msgid "Ordinal dates are not currently supported." +msgstr "" + +#: library/datetime.rst:1776 +msgid "Fractional hours and minutes are not supported." msgstr "" -"Ceci ne prend pas en charge l'analyse arbitraire des chaînes de caractères " -"ISO 8601 - il est uniquement destiné à l'opération réciproque de :meth:" -"`datetime.isoformat`. Un analyseur ISO 8601 plus complet, ``dateutil.parser." -"isoparse`` est disponible dans le paquet tiers `dateutil `__." -#: library/datetime.rst:1423 library/datetime.rst:1770 +#: library/datetime.rst:1434 library/datetime.rst:1778 msgid "Examples::" msgstr "Exemples ::" -#: library/datetime.rst:1025 +#: library/datetime.rst:1029 +#, fuzzy +msgid "" +"Previously, this method only supported formats that could be emitted by :" +"meth:`date.isoformat()` or :meth:`datetime.isoformat()`." +msgstr "" +"Renvoie une :class:`.datetime` correspondant à *date_string* dans le format " +"émis par :meth:`date.isoformat` et :meth:`datetime.isoformat`." + +#: library/datetime.rst:1036 msgid "" "Return a :class:`.datetime` corresponding to the ISO calendar date specified " "by year, week and day. The non-date components of the datetime are populated " @@ -1632,7 +1644,7 @@ msgstr "" "la date de *datetime* sont renseignées avec leurs valeurs par défaut " "normales. C'est la réciproque de la fonction :meth:`datetime.isocalendar`." -#: library/datetime.rst:1034 +#: library/datetime.rst:1045 msgid "" "Return a :class:`.datetime` corresponding to *date_string*, parsed according " "to *format*." @@ -1640,11 +1652,11 @@ msgstr "" "Renvoie une classe :class:`.datetime` correspondant à *date_string*, " "analysée selon *format*." -#: library/datetime.rst:1037 +#: library/datetime.rst:1048 msgid "This is equivalent to::" msgstr "C’est équivalent à ::" -#: library/datetime.rst:1041 +#: library/datetime.rst:1052 msgid "" ":exc:`ValueError` is raised if the date_string and format can't be parsed " "by :func:`time.strptime` or if it returns a value which isn't a time tuple. " @@ -1656,7 +1668,7 @@ msgstr "" "pas un *n*-uplet de temps. Pour une liste complète des directives de " "formatage, voir :ref:`strftime-strptime-behavior`." -#: library/datetime.rst:1052 +#: library/datetime.rst:1063 msgid "" "The earliest representable :class:`.datetime`, ``datetime(MINYEAR, 1, 1, " "tzinfo=None)``." @@ -1664,7 +1676,7 @@ msgstr "" "Le plus ancien :class:`.datetime` représentable, ``datetime(MINYEAR, 1, 1, " "tzinfo=None)``." -#: library/datetime.rst:1058 +#: library/datetime.rst:1069 msgid "" "The latest representable :class:`.datetime`, ``datetime(MAXYEAR, 12, 31, 23, " "59, 59, 999999, tzinfo=None)``." @@ -1672,7 +1684,7 @@ msgstr "" "Le dernier :class:`.datetime` représentable, ``datetime(MAXYEAR, 12, 31, 23, " "59, 59, 999999, tzinfo=None)``." -#: library/datetime.rst:1064 +#: library/datetime.rst:1075 msgid "" "The smallest possible difference between non-equal :class:`.datetime` " "objects, ``timedelta(microseconds=1)``." @@ -1680,19 +1692,19 @@ msgstr "" "La plus petite différence possible entre deux objets :class:`.datetime` non-" "égaux, ``timedelta(microseconds=1)``." -#: library/datetime.rst:1690 +#: library/datetime.rst:1701 msgid "In ``range(24)``." msgstr "Dans ``range(24)``." -#: library/datetime.rst:1097 library/datetime.rst:1700 +#: library/datetime.rst:1108 library/datetime.rst:1711 msgid "In ``range(60)``." msgstr "Dans ``range(60)``." -#: library/datetime.rst:1705 +#: library/datetime.rst:1716 msgid "In ``range(1000000)``." msgstr "Dans ``range(1000000)``." -#: library/datetime.rst:1107 +#: library/datetime.rst:1118 msgid "" "The object passed as the *tzinfo* argument to the :class:`.datetime` " "constructor, or ``None`` if none was passed." @@ -1700,7 +1712,7 @@ msgstr "" "L'objet passé en tant que paramètre *tzinfo* du constructeur de la classe :" "class:`.datetime` ou ``None`` si aucun n'a été donné." -#: library/datetime.rst:1716 +#: library/datetime.rst:1727 msgid "" "In ``[0, 1]``. Used to disambiguate wall times during a repeated interval. " "(A repeated interval occurs when clocks are rolled back at the end of " @@ -1714,36 +1726,36 @@ msgstr "" "décrémenté pour des raisons politiques.) La valeur 0 (1) représente le plus " "ancien (récent) des deux moments représentés par la même heure." -#: library/datetime.rst:1126 +#: library/datetime.rst:1137 msgid "``datetime2 = datetime1 + timedelta``" msgstr "``datetime2 = datetime1 + timedelta``" -#: library/datetime.rst:2308 library/datetime.rst:2325 -#: library/datetime.rst:2390 library/datetime.rst:2399 +#: library/datetime.rst:2329 library/datetime.rst:2346 +#: library/datetime.rst:2411 library/datetime.rst:2420 msgid "\\(1)" msgstr "\\(1)" -#: library/datetime.rst:1128 +#: library/datetime.rst:1139 msgid "``datetime2 = datetime1 - timedelta``" msgstr "``datetime2 = datetime1 - timedelta``" -#: library/datetime.rst:2341 +#: library/datetime.rst:2362 msgid "\\(2)" msgstr "\\(2)" -#: library/datetime.rst:1130 +#: library/datetime.rst:1141 msgid "``timedelta = datetime1 - datetime2``" msgstr "``timedelta = datetime1 - datetime2``" -#: library/datetime.rst:1132 +#: library/datetime.rst:1143 msgid "``datetime1 < datetime2``" msgstr "``datetime1 < datetime2``" -#: library/datetime.rst:1132 +#: library/datetime.rst:1143 msgid "Compares :class:`.datetime` to :class:`.datetime`. (4)" msgstr "Compare :class:`.datetime` à :class:`.datetime`. (4)" -#: library/datetime.rst:1137 +#: library/datetime.rst:1148 #, fuzzy msgid "" "datetime2 is a duration of timedelta removed from datetime1, moving forward " @@ -1763,7 +1775,7 @@ msgstr "" "qu'aucun ajustement de fuseau horaire n'est réalisé même si l'entrée est " "avisée." -#: library/datetime.rst:1146 +#: library/datetime.rst:1157 msgid "" "Computes the datetime2 such that datetime2 + timedelta == datetime1. As for " "addition, the result has the same :attr:`~.datetime.tzinfo` attribute as the " @@ -1775,7 +1787,7 @@ msgstr "" "que le *datetime* d'entrée, et aucun ajustement de fuseau horaire n'est " "réalisé même si l'entrée est avisée." -#: library/datetime.rst:1151 +#: library/datetime.rst:1162 #, fuzzy msgid "" "Subtraction of a :class:`.datetime` from a :class:`.datetime` is defined " @@ -1787,7 +1799,7 @@ msgstr "" "avisés. Si l'un est avisé et que l'autre est naïf, une :exc:`TypeError` est " "levée." -#: library/datetime.rst:1155 +#: library/datetime.rst:1166 #, fuzzy msgid "" "If both are naive, or both are aware and have the same :attr:`~.datetime." @@ -1801,7 +1813,7 @@ msgstr "" "``datetime2 + t == datetime1``. Aucun ajustement de fuseau horaire n'a lieu " "dans ce cas." -#: library/datetime.rst:1160 +#: library/datetime.rst:1171 #, fuzzy msgid "" "If both are aware and have different :attr:`~.datetime.tzinfo` attributes, " @@ -1816,7 +1828,7 @@ msgstr "" "a.utcoffset()) - (b.replace(tzinfo=None) - b.utcoffset())`` à l'exception " "que l'implémentation ne produit jamais de débordement." -#: library/datetime.rst:1166 +#: library/datetime.rst:1177 msgid "" "*datetime1* is considered less than *datetime2* when *datetime1* precedes " "*datetime2* in time." @@ -1824,7 +1836,7 @@ msgstr "" "*datetime1* est considéré inférieur à *datetime2* quand il le précède dans " "le temps." -#: library/datetime.rst:1169 +#: library/datetime.rst:1180 #, fuzzy msgid "" "If one comparand is naive and the other is aware, :exc:`TypeError` is raised " @@ -1835,7 +1847,7 @@ msgstr "" "une comparaison d'ordre est attendue. Pour les comparaisons d'égalité, les " "instances naïves ne sont jamais égales aux instances avisées." -#: library/datetime.rst:1173 +#: library/datetime.rst:1184 #, fuzzy msgid "" "If both comparands are aware, and have the same :attr:`~.datetime.tzinfo` " @@ -1852,7 +1864,7 @@ msgstr "" "premièrement ajustés en soustrayant leurs décalages UTC (obtenus depuis " "``self.utcoffset()``)." -#: library/datetime.rst:1179 +#: library/datetime.rst:1190 #, fuzzy msgid "" "Equality comparisons between aware and naive :class:`.datetime` instances " @@ -1861,7 +1873,7 @@ msgstr "" "Les comparaisons d'égalité entre des instances :class:`.datetime` naïves et " "avisées ne lèvent pas de :exc:`TypeError`." -#: library/datetime.rst:1185 +#: library/datetime.rst:1196 #, fuzzy msgid "" "In order to stop comparison from falling back to the default scheme of " @@ -1885,11 +1897,11 @@ msgstr "" "comparaison soit ``==`` ou ``!=``. Ces derniers cas renvoient " "respectivement :const:`False` et :const:`True`." -#: library/datetime.rst:1199 +#: library/datetime.rst:1210 msgid "Return :class:`date` object with same year, month and day." msgstr "Renvoie un objet :class:`date` avec les mêmes année, mois et jour." -#: library/datetime.rst:1204 +#: library/datetime.rst:1215 #, fuzzy msgid "" "Return :class:`.time` object with same hour, minute, second, microsecond and " @@ -1899,11 +1911,11 @@ msgstr "" "microseconde et *fold*. :attr:`.tzinfo` est ``None``. Voir aussi la " "méthode :meth:`timetz`." -#: library/datetime.rst:1216 +#: library/datetime.rst:1227 msgid "The fold value is copied to the returned :class:`.time` object." msgstr "La valeur *fold* est copiée vers l'objet :class:`.time` renvoyé." -#: library/datetime.rst:1213 +#: library/datetime.rst:1224 #, fuzzy msgid "" "Return :class:`.time` object with same hour, minute, second, microsecond, " @@ -1913,7 +1925,7 @@ msgstr "" "seconde, microseconde, *fold* et *tzinfo*. Voir aussi la méthode :meth:" "`time`." -#: library/datetime.rst:1224 +#: library/datetime.rst:1235 #, fuzzy msgid "" "Return a datetime with the same attributes, except for those attributes " @@ -1926,7 +1938,7 @@ msgstr "" "Notez que ``tzinfo=None`` peut être spécifié pour créer un *datetime* naïf " "depuis un *datetime* avisé sans conversion de la date ou de l'heure." -#: library/datetime.rst:1235 +#: library/datetime.rst:1246 msgid "" "Return a :class:`.datetime` object with new :attr:`.tzinfo` attribute *tz*, " "adjusting the date and time data so the result is the same UTC time as " @@ -1936,7 +1948,7 @@ msgstr "" "valant *tz*, ajustant la date et l'heure pour que le résultat soit le même " "temps UTC que *self*, mais dans le temps local au fuseau *tz*." -#: library/datetime.rst:1239 +#: library/datetime.rst:1250 #, fuzzy msgid "" "If provided, *tz* must be an instance of a :class:`tzinfo` subclass, and " @@ -1948,7 +1960,7 @@ msgstr "" "``None``. Si *self* est naïf, Python considère que le temps est exprimé " "dans le fuseau horaire du système." -#: library/datetime.rst:1243 +#: library/datetime.rst:1254 #, fuzzy msgid "" "If called without arguments (or with ``tz=None``) the system local timezone " @@ -1961,7 +1973,7 @@ msgstr "" "l'instance *datetime* convertie aura pour valeur une instance de :class:" "`timezone` avec le nom de fuseau et le décalage obtenus depuis l'OS." -#: library/datetime.rst:1248 +#: library/datetime.rst:1259 msgid "" "If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no " "adjustment of date or time data is performed. Else the result is local time " @@ -1975,7 +1987,7 @@ msgstr "" "après ``astz = dt.astimezone(tz)``, ``astz - astz.utcoffset()`` aura les " "mêmes données de date et d'heure que ``dt - dt.utcoffset()``." -#: library/datetime.rst:1254 +#: library/datetime.rst:1265 #, fuzzy msgid "" "If you merely want to attach a time zone object *tz* to a datetime *dt* " @@ -1989,7 +2001,7 @@ msgstr "" "d'un *datetime* *dt* avisé sans conversion des données de date et d'heure, " "utilisez ``dt.replace(tzinfo=None)``." -#: library/datetime.rst:1259 +#: library/datetime.rst:1270 msgid "" "Note that the default :meth:`tzinfo.fromutc` method can be overridden in a :" "class:`tzinfo` subclass to affect the result returned by :meth:`astimezone`. " @@ -2000,11 +2012,11 @@ msgstr "" "meth:`astimezone`. En ignorant les cas d'erreurs, :meth:`astimezone` se " "comporte comme ::" -#: library/datetime.rst:1271 +#: library/datetime.rst:1282 msgid "*tz* now can be omitted." msgstr "*tz* peut maintenant être omis." -#: library/datetime.rst:1274 +#: library/datetime.rst:1285 msgid "" "The :meth:`astimezone` method can now be called on naive instances that are " "presumed to represent system local time." @@ -2012,7 +2024,7 @@ msgstr "" "La méthode :meth:`astimezone` peut maintenant être appelée sur des instances " "naïves qui sont supposées représenter un temps local au système." -#: library/datetime.rst:1281 +#: library/datetime.rst:1292 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "utcoffset(self)``, and raises an exception if the latter doesn't return " @@ -2023,12 +2035,12 @@ msgstr "" "ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " "inférieure à un jour." -#: library/datetime.rst:1868 library/datetime.rst:2220 -#: library/datetime.rst:2528 +#: library/datetime.rst:1890 library/datetime.rst:2241 +#: library/datetime.rst:2550 msgid "The UTC offset is not restricted to a whole number of minutes." msgstr "Le décalage UTC peut aussi être autre chose qu'un ensemble de minutes." -#: library/datetime.rst:1291 +#: library/datetime.rst:1302 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "dst(self)``, and raises an exception if the latter doesn't return ``None`` " @@ -2039,11 +2051,11 @@ msgstr "" "renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " "inférieure à un jour." -#: library/datetime.rst:1878 library/datetime.rst:2028 +#: library/datetime.rst:1900 library/datetime.rst:2050 msgid "The DST offset is not restricted to a whole number of minutes." msgstr "Le décalage DST n'est pas restreint à des minutes entières." -#: library/datetime.rst:1301 +#: library/datetime.rst:1312 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "tzname(self)``, raises an exception if the latter doesn't return ``None`` or " @@ -2053,7 +2065,7 @@ msgstr "" "tzinfo.tzname(self)``, lève une exception si l'expression précédente ne " "renvoie pas ``None`` ou une chaîne de caractères," -#: library/datetime.rst:1316 +#: library/datetime.rst:1327 #, fuzzy msgid "" "where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " @@ -2063,18 +2075,15 @@ msgid "" "`tm_isdst` is set to ``-1``; else if :meth:`dst` returns a non-zero value, :" "attr:`tm_isdst` is set to ``1``; else :attr:`tm_isdst` is set to ``0``." msgstr "" -"Renvoie un :class:`time.struct_time` comme renvoyé par :func:`time." -"localtime`. ``d.timetuple()`` est équivalent à ``time.struct_time((d.year, d." -"month, d.day, d.hour, d.minute, d.second, d.weekday(), yday, dst))``, où " -"``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` est le numéro " -"de jour dans l'année courante commençant avec ``1`` pour le 1er janvier. " -"L'option :attr:`tm_isdist` du résultat est attribuée selon la méthode :meth:" -"`dst` : si :attr:`.tzinfo` est ``None`` ou que :meth:`dst` renvoie " -"``None``, :attr:`tm_isdst` est mise à ``-1`` ; sinon, si :meth:`dst` renvoie " -"une valeur non-nulle, :attr:`tm_isdst` est mise à ``1`` ; sinon :attr:" -"`tm_isdst` est mise à ``0``." - -#: library/datetime.rst:1327 +"où ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` est le " +"numéro de jour dans l'année courante commençant avec ``1`` pour le 1\\ :sup:" +"`er` janvier. L'option :attr:`tm_isdist` du résultat est attribuée selon la " +"méthode :meth:`dst` : si :attr:`.tzinfo` est ``None`` ou que :meth:`dst` " +"renvoie ``None``, :attr:`tm_isdst` est mise à ``-1`` ; sinon, si :meth:`dst` " +"renvoie une valeur non nulle, :attr:`tm_isdst` est mise à ``1`` ; sinon :" +"attr:`tm_isdst` est mise à ``0``." + +#: library/datetime.rst:1338 #, fuzzy msgid "" "If :class:`.datetime` instance *d* is naive, this is the same as ``d." @@ -2086,7 +2095,7 @@ msgstr "" "de ce que renvoie ``d.dst()``. L'heure d'été n'est jamais effective pour un " "temps UTC." -#: library/datetime.rst:1331 +#: library/datetime.rst:1342 #, fuzzy msgid "" "If *d* is aware, *d* is normalized to UTC time, by subtracting ``d." @@ -2099,9 +2108,9 @@ msgstr "" "utcoffset()``, et un :class:`time.struct_time` est renvoyé pour le temps " "normalisé. :attr:`tm_isdst` est forcé à 0. Notez qu'une :exc:" "`OverflowError` peut être levée si *d.year* vaut ``MINYEAR``ou ``MAXYEAR`` " -"et que l'ajustement UTC fait dépasser les bornes." +"et que l'ajustement UTC fait déborder la limite de l'année." -#: library/datetime.rst:1340 +#: library/datetime.rst:1351 msgid "" "Because naive ``datetime`` objects are treated by many ``datetime`` methods " "as local times, it is preferred to use aware datetimes to represent times in " @@ -2118,7 +2127,7 @@ msgstr "" "``datetime.replace(tzinfo=timezone.utc)`` pour la rendre avisée, puis vous " "pouvez utiliser :meth:`.datetime.timetuple`." -#: library/datetime.rst:1349 +#: library/datetime.rst:1360 msgid "" "Return the proleptic Gregorian ordinal of the date. The same as ``self." "date().toordinal()``." @@ -2126,7 +2135,7 @@ msgstr "" "Renvoie l'ordinal du calendrier grégorien proleptique de cette date. " "Identique à ``self.date().toordinal()``." -#: library/datetime.rst:1354 +#: library/datetime.rst:1365 msgid "" "Return POSIX timestamp corresponding to the :class:`.datetime` instance. The " "return value is a :class:`float` similar to that returned by :func:`time." @@ -2136,7 +2145,7 @@ msgstr "" "La valeur renvoyée est un :class:`float` similaire à ceux renvoyés par :func:" "`time.time`." -#: library/datetime.rst:1358 +#: library/datetime.rst:1369 #, fuzzy msgid "" "Naive :class:`.datetime` instances are assumed to represent local time and " @@ -2152,14 +2161,14 @@ msgstr "" "plateformes, cette méthode peut lever une :exc:`OverflowError` pour les " "temps trop éloignés dans le passé ou le futur." -#: library/datetime.rst:1365 +#: library/datetime.rst:1376 msgid "" "For aware :class:`.datetime` instances, the return value is computed as::" msgstr "" "Pour les instances :class:`.datetime` avisées, la valeur renvoyée est " "calculée comme suit ::" -#: library/datetime.rst:1372 +#: library/datetime.rst:1383 msgid "" "The :meth:`timestamp` method uses the :attr:`.fold` attribute to " "disambiguate the times during a repeated interval." @@ -2167,7 +2176,7 @@ msgstr "" "La méthode :meth:`timestamp` utilise l'attribut :attr:`.fold` pour " "désambiguïser le temps dans un intervalle répété." -#: library/datetime.rst:1378 +#: library/datetime.rst:1389 #, fuzzy msgid "" "There is no method to obtain the POSIX timestamp directly from a naive :" @@ -2181,11 +2190,11 @@ msgstr "" "que le fuseau horaire de votre système est UTC, vous pouvez obtenir " "l'horodatage *POSIX* en fournissant ``tzinfo=timezone.utc`` ::" -#: library/datetime.rst:1386 +#: library/datetime.rst:1397 msgid "or by calculating the timestamp directly::" msgstr "ou en calculant l'horodatage (*timestamp* en anglais) directement ::" -#: library/datetime.rst:1392 +#: library/datetime.rst:1403 msgid "" "Return the day of the week as an integer, where Monday is 0 and Sunday is 6. " "The same as ``self.date().weekday()``. See also :meth:`isoweekday`." @@ -2194,7 +2203,7 @@ msgstr "" "dimanche vaut 6. Identique à ``self.date().weekday()``. Voir aussi :meth:" "`isoweekday`." -#: library/datetime.rst:1398 +#: library/datetime.rst:1409 msgid "" "Return the day of the week as an integer, where Monday is 1 and Sunday is 7. " "The same as ``self.date().isoweekday()``. See also :meth:`weekday`, :meth:" @@ -2204,7 +2213,7 @@ msgstr "" "dimanche vaut 7. Identique à ``self.date().isoweekday()``. Voir aussi :meth:" "`weekday`, :meth:`isocalendar`." -#: library/datetime.rst:1405 +#: library/datetime.rst:1416 msgid "" "Return a :term:`named tuple` with three components: ``year``, ``week`` and " "``weekday``. The same as ``self.date().isocalendar()``." @@ -2212,20 +2221,20 @@ msgstr "" "Renvoie un :term:`n-uplet nommé` de 3 éléments : ``year``, " "``week`` et ``weekday``. Identique à ``self.date().isocalendar()``." -#: library/datetime.rst:1411 +#: library/datetime.rst:1422 msgid "Return a string representing the date and time in ISO 8601 format:" msgstr "" "Renvoie une chaîne représentant la date et l'heure au format ISO 8601 :" -#: library/datetime.rst:1413 +#: library/datetime.rst:1424 msgid "``YYYY-MM-DDTHH:MM:SS.ffffff``, if :attr:`microsecond` is not 0" msgstr "``YYYY-MM-DDTHH:MM:SS.ffffff``, si :attr:`microsecond` ne vaut pas 0" -#: library/datetime.rst:1414 +#: library/datetime.rst:1425 msgid "``YYYY-MM-DDTHH:MM:SS``, if :attr:`microsecond` is 0" msgstr "``YYYY-MM-DDTHH:MM:SS``, si :attr:`microsecond` vaut 0" -#: library/datetime.rst:1416 +#: library/datetime.rst:1427 msgid "" "If :meth:`utcoffset` does not return ``None``, a string is appended, giving " "the UTC offset:" @@ -2233,7 +2242,7 @@ msgstr "" "Si :meth:`utcoffset` ne renvoie pas ``None``, une chaîne est ajoutée, " "donnant le décalage UTC :" -#: library/datetime.rst:1419 +#: library/datetime.rst:1430 msgid "" "``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` " "is not 0" @@ -2241,13 +2250,13 @@ msgstr "" "``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` " "ne vaut pas 0" -#: library/datetime.rst:1421 +#: library/datetime.rst:1432 msgid "" "``YYYY-MM-DDTHH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0" msgstr "" "``YYYY-MM-DDTHH:MM:SS+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` vaut 0" -#: library/datetime.rst:1431 +#: library/datetime.rst:1442 msgid "" "The optional argument *sep* (default ``'T'``) is a one-character separator, " "placed between the date and time portions of the result. For example::" @@ -2256,7 +2265,7 @@ msgstr "" "caractère, placé entre les portions du résultat correspondant à la date et à " "l'heure. Par exemple ::" -#: library/datetime.rst:1806 +#: library/datetime.rst:1828 msgid "" "The optional argument *timespec* specifies the number of additional " "components of the time to include (the default is ``'auto'``). It can be one " @@ -2266,7 +2275,7 @@ msgstr "" "additionnels de temps à inclure (par défaut ``'auto'``). Il peut valoir " "l'une des valeurs suivantes :" -#: library/datetime.rst:1810 +#: library/datetime.rst:1832 msgid "" "``'auto'``: Same as ``'seconds'`` if :attr:`microsecond` is 0, same as " "``'microseconds'`` otherwise." @@ -2274,17 +2283,17 @@ msgstr "" "``'auto'`` : Identique à ``'seconds'`` si :attr:`microsecond` vaut 0, à " "``'microseconds'`` sinon." -#: library/datetime.rst:1812 +#: library/datetime.rst:1834 msgid "``'hours'``: Include the :attr:`hour` in the two-digit ``HH`` format." msgstr "``'hours'`` : Inclut :attr:`hour` au format à deux chiffres ``HH``." -#: library/datetime.rst:1813 +#: library/datetime.rst:1835 msgid "" "``'minutes'``: Include :attr:`hour` and :attr:`minute` in ``HH:MM`` format." msgstr "" "``'minutes'`` : Inclut :attr:`hour` et :attr:`minute` au format ``HH:MM``." -#: library/datetime.rst:1814 +#: library/datetime.rst:1836 msgid "" "``'seconds'``: Include :attr:`hour`, :attr:`minute`, and :attr:`second` in " "``HH:MM:SS`` format." @@ -2292,7 +2301,7 @@ msgstr "" "``'seconds'`` : Inclut :attr:`hour`, :attr:`minute` et :attr:`second` au " "format ``HH:MM:SS``." -#: library/datetime.rst:1816 +#: library/datetime.rst:1838 msgid "" "``'milliseconds'``: Include full time, but truncate fractional second part " "to milliseconds. ``HH:MM:SS.sss`` format." @@ -2300,25 +2309,25 @@ msgstr "" "``'milliseconds'`` : Inclut le temps complet, mais tronque la partie " "fractionnaire des millisecondes, au format ``HH:MM:SS.sss``." -#: library/datetime.rst:1818 +#: library/datetime.rst:1840 msgid "``'microseconds'``: Include full time in ``HH:MM:SS.ffffff`` format." msgstr "" "``'microseconds'`` : Inclut le temps complet, au format ``HH:MM:SS.ffffff``." -#: library/datetime.rst:1822 +#: library/datetime.rst:1844 msgid "Excluded time components are truncated, not rounded." msgstr "Les composants de temps exclus sont tronqués et non arrondis." -#: library/datetime.rst:1463 +#: library/datetime.rst:1474 msgid ":exc:`ValueError` will be raised on an invalid *timespec* argument::" msgstr "" "Une :exc:`ValueError` est levée en cas d'argument *timespec* invalide ::" -#: library/datetime.rst:1837 +#: library/datetime.rst:1859 msgid "Added the *timespec* argument." msgstr "Ajout de l'argument *timespec*." -#: library/datetime.rst:1479 +#: library/datetime.rst:1490 msgid "" "For a :class:`.datetime` instance *d*, ``str(d)`` is equivalent to ``d." "isoformat(' ')``." @@ -2326,11 +2335,11 @@ msgstr "" "Pour une instance *d* de :class:`.datetime`, ``str(d)`` est équivalent à ``d." "isoformat(' ')``." -#: library/datetime.rst:1485 +#: library/datetime.rst:1496 msgid "Return a string representing the date and time::" msgstr "Renvoie une chaîne de caractères représentant la date et l'heure ::" -#: library/datetime.rst:1491 +#: library/datetime.rst:1502 msgid "" "The output string will *not* include time zone information, regardless of " "whether the input is aware or naive." @@ -2338,20 +2347,17 @@ msgstr "" "La chaîne de caractères en sortie n'inclura *pas* d'informations sur le " "fuseau horaire, que l'entrée soit avisée ou naïve." -#: library/datetime.rst:1498 +#: library/datetime.rst:1509 #, fuzzy msgid "" "on platforms where the native C :c:func:`ctime` function (which :func:`time." "ctime` invokes, but which :meth:`datetime.ctime` does not invoke) conforms " "to the C standard." msgstr "" -"Renvoie une chaîne de caractères représentant la date, par exemple " -"``date(2002, 12, 4).ctime() == 'Wed Dec 4 00:00:00 2002'``. ``d.ctime()`` " -"est équivalent à ``time.ctime(time.mktime(d.timetuple()))`` sur les " -"plateformes où la fonction C native :c:func:`ctime` (que :func:`time.ctime` " -"invoque, mais pas :meth:`date.ctime`) est conforme au standard C." +"sur les plateformes où la fonction C native :c:func:`ctime` (que :func:`time." +"ctime` invoque, mais pas :meth:`date.ctime`) est conforme au standard C." -#: library/datetime.rst:1504 +#: library/datetime.rst:1515 #, fuzzy msgid "" "Return a string representing the date and time, controlled by an explicit " @@ -2362,7 +2368,7 @@ msgstr "" "de format explicite. Pour une liste complète des directives de formatage, " "voir :ref:`strftime-strptime-behavior`." -#: library/datetime.rst:1511 +#: library/datetime.rst:1522 #, fuzzy msgid "" "Same as :meth:`.datetime.strftime`. This makes it possible to specify a " @@ -2376,15 +2382,15 @@ msgstr "" "une liste complète des directives de formatage, voir :ref:`strftime-strptime-" "behavior`." -#: library/datetime.rst:1518 +#: library/datetime.rst:1529 msgid "Examples of Usage: :class:`.datetime`" msgstr "Exemple d'utilisation de la classe :class:`.datetime` :" -#: library/datetime.rst:1520 +#: library/datetime.rst:1531 msgid "Examples of working with :class:`~datetime.datetime` objects:" msgstr "Exemples d'utilisation des objets :class:`~datetime.datetime` :" -#: library/datetime.rst:1573 +#: library/datetime.rst:1584 msgid "" "The example below defines a :class:`tzinfo` subclass capturing time zone " "information for Kabul, Afghanistan, which used +4 UTC until 1945 and then " @@ -2394,24 +2400,25 @@ msgstr "" "des informations sur les fuseaux horaires pour Kaboul, en Afghanistan, qui a " "utilisé +4 UTC jusqu'en 1945, puis +4:30 UTC par la suite ::" -#: library/datetime.rst:1620 +#: library/datetime.rst:1631 msgid "Usage of ``KabulTz`` from above::" msgstr "Utilisation de ``KabulTz`` cité plus haut ::" -#: library/datetime.rst:1646 +#: library/datetime.rst:1657 msgid ":class:`.time` Objects" msgstr "Objets :class:`.time`" -#: library/datetime.rst:1648 +#: library/datetime.rst:1659 #, fuzzy msgid "" "A :class:`time` object represents a (local) time of day, independent of any " "particular day, and subject to adjustment via a :class:`tzinfo` object." msgstr "" -"Un objet *time* représente une heure (locale) du jour, indépendante de tout " -"jour particulier, et sujette à des ajustements par un objet :class:`tzinfo`." +"Un objet :class:`time` représente une heure (locale) du jour, indépendante " +"de tout jour particulier, et sujette à des ajustements par un objet :class:" +"`tzinfo`." -#: library/datetime.rst:1653 +#: library/datetime.rst:1664 #, fuzzy msgid "" "All arguments are optional. *tzinfo* may be ``None``, or an instance of a :" @@ -2422,7 +2429,7 @@ msgstr "" "instance d'une sous-classe :class:`tzinfo`. Les autres arguments doivent " "être des nombres entiers, dans les intervalles suivants :" -#: library/datetime.rst:1663 +#: library/datetime.rst:1674 #, fuzzy msgid "" "If an argument outside those ranges is given, :exc:`ValueError` is raised. " @@ -2432,18 +2439,18 @@ msgstr "" "levée. Ils valent tous ``0`` par défaut, à l'exception de *tzinfo* qui " "vaut :const:`None`." -#: library/datetime.rst:1671 +#: library/datetime.rst:1682 msgid "The earliest representable :class:`.time`, ``time(0, 0, 0, 0)``." msgstr "" "Le plus petit objet :class:`.time` représentable, ``time(0, 0, 0, 0)``." -#: library/datetime.rst:1676 +#: library/datetime.rst:1687 msgid "The latest representable :class:`.time`, ``time(23, 59, 59, 999999)``." msgstr "" "Le plus grand objet :class:`.time` représentable, ``time(23, 59, 59, " "999999)``." -#: library/datetime.rst:1681 +#: library/datetime.rst:1692 msgid "" "The smallest possible difference between non-equal :class:`.time` objects, " "``timedelta(microseconds=1)``, although note that arithmetic on :class:`." @@ -2453,7 +2460,7 @@ msgstr "" "égaux, ``timedelta(microseconds=1)``, notez cependant que les objets :class:" "`.time` n'implémentent pas d'opérations arithmétiques." -#: library/datetime.rst:1710 +#: library/datetime.rst:1721 msgid "" "The object passed as the tzinfo argument to the :class:`.time` constructor, " "or ``None`` if none was passed." @@ -2461,7 +2468,7 @@ msgstr "" "L'objet passé comme argument *tzinfo* au constructeur de :class:`.time`, ou " "``None`` si aucune valeur n'a été passée." -#: library/datetime.rst:1724 +#: library/datetime.rst:1735 #, fuzzy msgid "" ":class:`.time` objects support comparison of :class:`.time` to :class:`." @@ -2470,13 +2477,13 @@ msgid "" "if an order comparison is attempted. For equality comparisons, naive " "instances are never equal to aware instances." msgstr "" -"comparaison d'un :class:`.time` avec un autre :class:`.time`, où *a* est " -"considéré inférieur à *b* s'il le précède dans le temps. Si un opérande est " -"naïf et l'autre avisé, et qu'une relation d'ordre est attendue, une :exc:" -"`TypeError` est levée. Pour les égalités, les instances naïves ne sont " -"jamais égales aux instances avisées." +"Les objets :class:`.time` gèrent la comparaison d'un :class:`.time` avec un " +"autre :class:`.time`, où *a* est considéré inférieur à *b* s'il le précède " +"dans le temps. Si un opérande est naïf et l'autre avisé, et qu'une relation " +"d'ordre est attendue, une :exc:`TypeError` est levée. Pour les égalités, les " +"instances naïves ne sont jamais égales aux instances avisées." -#: library/datetime.rst:1730 +#: library/datetime.rst:1741 #, fuzzy msgid "" "If both comparands are aware, and have the same :attr:`~time.tzinfo` " @@ -2501,7 +2508,7 @@ msgstr "" "que la comparaison soit ``==`` ou ``!=``. Ces derniers cas renvoient " "respectivement :const:`False` et :const:`True`." -#: library/datetime.rst:1740 +#: library/datetime.rst:1751 #, fuzzy msgid "" "Equality comparisons between aware and naive :class:`~datetime.time` " @@ -2510,14 +2517,14 @@ msgstr "" "Les comparaisons d'égalité entre instances de :class:`~datetime.time` naïves " "et avisées ne lèvent pas de :exc:`TypeError`." -#: library/datetime.rst:1744 +#: library/datetime.rst:1755 msgid "" "In Boolean contexts, a :class:`.time` object is always considered to be true." msgstr "" "Dans un contexte booléen, un objet :class:`.time` est toujours considéré " "comme vrai." -#: library/datetime.rst:1746 +#: library/datetime.rst:1757 #, fuzzy msgid "" "Before Python 3.5, a :class:`.time` object was considered to be false if it " @@ -2530,31 +2537,39 @@ msgstr "" "propice aux erreurs, il a été supprimé en Python 3.5. Voir :issue:`13936` " "pour les détails complets." -#: library/datetime.rst:1753 +#: library/datetime.rst:1764 msgid "Other constructor:" msgstr "Autre constructeur :" -#: library/datetime.rst:1757 +#: library/datetime.rst:1768 #, fuzzy msgid "" -"Return a :class:`.time` corresponding to a *time_string* in one of the " -"formats emitted by :meth:`time.isoformat`. Specifically, this function " -"supports strings in the format:" +"Return a :class:`.time` corresponding to a *time_string* in any valid ISO " +"8601 format, with the following exceptions:" msgstr "" -"Renvoie une :class:`date` correspondant à *date_string* dans le format émis " -"par :meth:`date.isoformat`. Spécifiquement, cette fonction gère des chaînes " -"dans le(s) format(s) ``YYYY-MM-DD``." +"Renvoie une :class:`time` correspondant à *time_string* dans le format émis " +"par :meth:`time.isoformat`. Spécifiquement, cette fonction gère des chaînes " +"dans le format :" -#: library/datetime.rst:1767 -#, fuzzy +#: library/datetime.rst:1772 msgid "" -"This does *not* support parsing arbitrary ISO 8601 strings. It is only " -"intended as the inverse operation of :meth:`time.isoformat`." +"The leading `T`, normally required in cases where there may be ambiguity " +"between a date and a time, is not required." msgstr "" -"Ceci ne gère pas l'analyse arbitraire de chaînes ISO 8601, ceci est " -"seulement destiné à l'opération inverse de :meth:`time.isoformat`." -#: library/datetime.rst:1788 +#: library/datetime.rst:1774 +msgid "" +"Fractional seconds may have any number of digits (anything beyond 6 will be " +"truncated)." +msgstr "" + +#: library/datetime.rst:1800 +msgid "" +"Previously, this method only supported formats that could be emitted by :" +"meth:`time.isoformat()`." +msgstr "" + +#: library/datetime.rst:1810 #, fuzzy msgid "" "Return a :class:`.time` with the same value, except for those attributes " @@ -2568,20 +2583,20 @@ msgstr "" "`.time` naïve à partir d'une instance :class:`.time` avisée, sans conversion " "des données de temps." -#: library/datetime.rst:1799 +#: library/datetime.rst:1821 msgid "Return a string representing the time in ISO 8601 format, one of:" msgstr "" "Renvoie une chaîne de caractères représentant la date au format ISO 8601 :" -#: library/datetime.rst:1801 +#: library/datetime.rst:1823 msgid "``HH:MM:SS.ffffff``, if :attr:`microsecond` is not 0" msgstr "``HH:MM:SS.ffffff``, si :attr:`microsecond` ne vaut pas 0" -#: library/datetime.rst:1802 +#: library/datetime.rst:1824 msgid "``HH:MM:SS``, if :attr:`microsecond` is 0" msgstr "``HH:MM:SS``, si :attr:`microsecond` vaut 0" -#: library/datetime.rst:1803 +#: library/datetime.rst:1825 msgid "" "``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :meth:`utcoffset` does not " "return ``None``" @@ -2589,7 +2604,7 @@ msgstr "" "``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, si :meth:`utcoffset` ne renvoie pas " "``None``" -#: library/datetime.rst:1804 +#: library/datetime.rst:1826 msgid "" "``HH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0 and :meth:" "`utcoffset` does not return ``None``" @@ -2597,27 +2612,27 @@ msgstr "" "``HH:MM:SS+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` vaut 0 et :meth:" "`utcoffset` ne renvoie pas ``None``" -#: library/datetime.rst:1824 +#: library/datetime.rst:1846 msgid ":exc:`ValueError` will be raised on an invalid *timespec* argument." msgstr "" "Une :exc:`ValueError` sera levée en cas d'argument *timespec* invalide." -#: library/datetime.rst:1843 +#: library/datetime.rst:1865 msgid "For a time *t*, ``str(t)`` is equivalent to ``t.isoformat()``." msgstr "Pour un temps *t*, ``str(t)`` est équivalent à ``t.isoformat()``." -#: library/datetime.rst:1848 +#: library/datetime.rst:1870 #, fuzzy msgid "" "Return a string representing the time, controlled by an explicit format " "string. For a complete list of formatting directives, see :ref:`strftime-" "strptime-behavior`." msgstr "" -"Renvoie une chaîne de caractères représentant la date, contrôlée par une " +"Renvoie une chaîne de caractères représentant l'heure, contrôlée par une " "chaîne de formatage explicite. Pour une liste complète des directives de " "formatage, voir :ref:`strftime-strptime-behavior`." -#: library/datetime.rst:1855 +#: library/datetime.rst:1877 #, fuzzy msgid "" "Same as :meth:`.time.strftime`. This makes it possible to specify a format " @@ -2631,7 +2646,7 @@ msgstr "" "liste complète des directives de formatage, voir :ref:`strftime-strptime-" "behavior`." -#: library/datetime.rst:1864 +#: library/datetime.rst:1886 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "utcoffset(None)``, and raises an exception if the latter doesn't return " @@ -2642,7 +2657,7 @@ msgstr "" "ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " "inférieure à un jour." -#: library/datetime.rst:1874 +#: library/datetime.rst:1896 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "dst(None)``, and raises an exception if the latter doesn't return ``None``, " @@ -2653,7 +2668,7 @@ msgstr "" "renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " "inférieure à un jour." -#: library/datetime.rst:1883 +#: library/datetime.rst:1905 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "tzname(None)``, or raises an exception if the latter doesn't return ``None`` " @@ -2663,19 +2678,19 @@ msgstr "" "tzinfo.tzname(None)``, et lève une exception si l'expression précédente ne " "renvoie pas ``None`` ou une chaîne de caractères." -#: library/datetime.rst:1888 +#: library/datetime.rst:1910 msgid "Examples of Usage: :class:`.time`" msgstr "Exemples d'utilisation de :class:`.time`" -#: library/datetime.rst:1890 +#: library/datetime.rst:1912 msgid "Examples of working with a :class:`.time` object::" msgstr "Exemples d'utilisation de l'objet :class:`.time` ::" -#: library/datetime.rst:1921 +#: library/datetime.rst:1943 msgid ":class:`tzinfo` Objects" msgstr "Objets :class:`tzinfo`" -#: library/datetime.rst:1925 +#: library/datetime.rst:1947 msgid "" "This is an abstract base class, meaning that this class should not be " "instantiated directly. Define a subclass of :class:`tzinfo` to capture " @@ -2686,7 +2701,7 @@ msgstr "" "class:`tzinfo` pour capturer des informations sur un fuseau horaire " "particulier." -#: library/datetime.rst:1929 +#: library/datetime.rst:1951 msgid "" "An instance of (a concrete subclass of) :class:`tzinfo` can be passed to the " "constructors for :class:`.datetime` and :class:`.time` objects. The latter " @@ -2702,7 +2717,7 @@ msgstr "" "temps local par rapport à UTC, le nom du fuseau horaire, le décalage d'heure " "d'été, tous relatifs à un objet de date ou d'heure qui leur est passé." -#: library/datetime.rst:1935 +#: library/datetime.rst:1957 #, fuzzy msgid "" "You need to derive a concrete subclass, and (at least) supply " @@ -2712,16 +2727,15 @@ msgid "" "represent timezones with fixed offset from UTC such as UTC itself or North " "American EST and EDT." msgstr "" -"Cette classe est une classe abstraite, signifiant qu'elle ne doit pas être " -"instanciée directement. Vous devez en dériver une sous-classe concrète, et " -"(au minimum) fournir des implémentations aux méthodes standard :class:" -"`tzinfo` requises par les méthodes de :class:`.datetime` que vous utilisez. " -"Le module :mod:`datetime` fournit une simple sous-classe concrète de :class:" -"`tzinfo`, :class:`timezone`, qui peut peut représenter des fuseaux horaires " -"avec des décalages fixes par rapport à UTC, tels qu'UTC lui-même ou les nord-" -"américains EST et EDT." +"Vous devez en dériver une sous-classe concrète et (au minimum) fournir des " +"implémentations aux méthodes standard :class:`tzinfo` requises par les " +"méthodes de :class:`.datetime` que vous utilisez. Le module :mod:`datetime` " +"fournit une simple sous-classe concrète de :class:`tzinfo`, :class:" +"`timezone`, qui peut représenter des fuseaux horaires avec des décalages " +"fixes par rapport à UTC, tels qu'UTC lui-même ou les fuseaux nord-américains " +"EST et EDT." -#: library/datetime.rst:1942 +#: library/datetime.rst:1964 #, fuzzy msgid "" "Special requirement for pickling: A :class:`tzinfo` subclass must have an :" @@ -2734,7 +2748,7 @@ msgstr "" "sans quoi un objet sérialisé ne pourrait pas toujours être désérialisé. " "C'est un prérequis technique qui pourrait être assoupli dans le futur." -#: library/datetime.rst:1947 +#: library/datetime.rst:1969 #, fuzzy msgid "" "A concrete subclass of :class:`tzinfo` may need to implement the following " @@ -2746,7 +2760,7 @@ msgstr "" "l'utilisation qui est faite des objets :mod:`datetime` avisés. Dans le " "doute, implémentez-les toutes." -#: library/datetime.rst:1954 +#: library/datetime.rst:1976 msgid "" "Return offset of local time from UTC, as a :class:`timedelta` object that is " "positive east of UTC. If local time is west of UTC, this should be negative." @@ -2755,7 +2769,7 @@ msgstr "" "objet :class:`timedelta` qui est positif à l'est de UTC. Si l'heure locale " "est à l'ouest de UTC, il doit être négatif." -#: library/datetime.rst:1957 +#: library/datetime.rst:1979 #, fuzzy msgid "" "This represents the *total* offset from UTC; for example, if a :class:" @@ -2766,19 +2780,16 @@ msgid "" "magnitude of the offset must be less than one day). Most implementations of :" "meth:`utcoffset` will probably look like one of these two::" msgstr "" -"Renvoie le décalage entre le temps local et UTC, comme un objet :class:" -"`timedelta` qui est positif à l'est d'UTC. Si le temps local se situe à " -"l'ouest d'UTC, le décalage doit être négatif. Notez que cela est prévu pour " -"être le décalage total par rapport à UTC ; par exemple, si un objet :class:" -"`tzinfo` représente à la fois un fuseau horaire et son ajustement à l'heure " -"d'été, :meth:`utcoffset` devrait renvoyer leur somme. Si le décalage UTC " -"n'est pas connu, renvoie ``None``. Sinon, la valeur renvoyée doit être un " -"objet :class:`timedelta` compris strictement entre ``-timedelta(hours=24)`` " -"et ``timedelta(hours=24)`` (la magnitude du décalage doit être inférieure à " -"un jour). La plupart des implémentations de :meth:`utcoffset` ressembleront " -"probablement à l'une des deux suivantes ::" +"Cela représente le décalage *total* par rapport à UTC ; par exemple, si un " +"objet :class:`tzinfo` représente à la fois un fuseau horaire et son " +"ajustement à l'heure d'été, :meth:`utcoffset` devrait renvoyer leur somme. " +"Si le décalage UTC n'est pas connu, renvoie ``None``. Sinon, la valeur " +"renvoyée doit être un objet :class:`timedelta` compris strictement entre ``-" +"timedelta(hours=24)`` et ``timedelta(hours=24)`` (l'amplitude du décalage " +"doit être inférieure à un jour). La plupart des implémentations de :meth:" +"`utcoffset` ressembleront probablement à l'une des deux suivantes ::" -#: library/datetime.rst:1968 +#: library/datetime.rst:1990 msgid "" "If :meth:`utcoffset` does not return ``None``, :meth:`dst` should not return " "``None`` either." @@ -2786,7 +2797,7 @@ msgstr "" "Si :meth:`utcoffset` ne renvoie pas ``None``, :meth:`dst` ne doit pas non " "plus renvoyer ``None``." -#: library/datetime.rst:1971 +#: library/datetime.rst:1993 msgid "" "The default implementation of :meth:`utcoffset` raises :exc:" "`NotImplementedError`." @@ -2794,7 +2805,7 @@ msgstr "" "L'implémentation par défaut de :meth:`utcoffset` lève une :exc:" "`NotImplementedError`." -#: library/datetime.rst:1980 +#: library/datetime.rst:2002 msgid "" "Return the daylight saving time (DST) adjustment, as a :class:`timedelta` " "object or ``None`` if DST information isn't known." @@ -2802,7 +2813,7 @@ msgstr "" "Renvoie le réglage de l'heure d'été (DST), sous la forme d'un objet :class:" "`timedelta` ou ``None`` si l'information DST n'est pas connue." -#: library/datetime.rst:1984 +#: library/datetime.rst:2006 #, fuzzy msgid "" "Return ``timedelta(0)`` if DST is not in effect. If DST is in effect, return " @@ -2815,8 +2826,6 @@ msgid "" "should be set, and :meth:`tzinfo.fromutc` calls :meth:`dst` to account for " "DST changes when crossing time zones." msgstr "" -"Renvoie l'ajustement d'heure d'été (DST, *daylight saving time*), comme un " -"objet :class:`timedelta` ou ``None`` si l'information n'est pas connue. " "Renvoie ``timedelta(0)`` si l'heure d'été n'est pas effective. Si elle est " "effective, renvoie un décalage sous forme d'un objet :class:`timedelta` " "(voir :meth:`utcoffset` pour les détails). Notez que ce décalage, si " @@ -2829,7 +2838,7 @@ msgstr "" "`dst` pour tenir compte des heures d'été quand elle traverse des fuseaux " "horaires." -#: library/datetime.rst:1994 +#: library/datetime.rst:2016 msgid "" "An instance *tz* of a :class:`tzinfo` subclass that models both standard and " "daylight times must be consistent in this sense:" @@ -2837,11 +2846,11 @@ msgstr "" "Une instance *tz* d'une sous-classe :class:`tzinfo` convenant à la fois pour " "une heure standard et une heure d'été doit être cohérente :" -#: library/datetime.rst:1997 +#: library/datetime.rst:2019 msgid "``tz.utcoffset(dt) - tz.dst(dt)``" msgstr "``tz.utcoffset(dt) - tz.dst(dt)``" -#: library/datetime.rst:1999 +#: library/datetime.rst:2021 #, fuzzy msgid "" "must return the same result for every :class:`.datetime` *dt* with ``dt." @@ -2865,7 +2874,7 @@ msgstr "" "l'implémentation par défaut de :meth:`tzinfo.fromutc` pour tout de même " "fonctionner correctement avec :meth:`astimezone`." -#: library/datetime.rst:2008 +#: library/datetime.rst:2030 msgid "" "Most implementations of :meth:`dst` will probably look like one of these " "two::" @@ -2873,18 +2882,18 @@ msgstr "" "La plupart des implémentations de :meth:`dst` ressembleront probablement à " "l'une des deux suivantes ::" -#: library/datetime.rst:2014 +#: library/datetime.rst:2036 msgid "or::" msgstr "ou ::" -#: library/datetime.rst:2026 +#: library/datetime.rst:2048 msgid "" "The default implementation of :meth:`dst` raises :exc:`NotImplementedError`." msgstr "" "L'implémentation par défaut de :meth:`dst` lève une :exc:" "`NotImplementedError`." -#: library/datetime.rst:2034 +#: library/datetime.rst:2056 #, fuzzy msgid "" "Return the time zone name corresponding to the :class:`.datetime` object " @@ -2898,7 +2907,7 @@ msgid "" "if the :class:`tzinfo` class is accounting for daylight time." msgstr "" "Renvoie le nom du fuseau horaire correspondant à l'objet :class:`.datetime` " -"*dt*, sous forme d'une chaîne de caractères. rien n'est défini sur les noms " +"*dt*, sous forme d'une chaîne de caractères. Rien n'est défini sur les noms " "par le module :mod:`datetime`, et il n'est pas nécessaire que ces noms " "signifient quelque chose en particulier. Par exemple, « *GMT* », « *UTC* », " "« *-500* », « *-5:00* », « *EDT* », « *US/Eastern* » et « *America/New " @@ -2908,7 +2917,7 @@ msgstr "" "renvoyer des noms différents en fonction de valeurs de *dt* spécifiques, en " "particulier si la classe :class:`tzinfo` tient compte de l'heure d'été." -#: library/datetime.rst:2044 +#: library/datetime.rst:2066 msgid "" "The default implementation of :meth:`tzname` raises :exc:" "`NotImplementedError`." @@ -2916,7 +2925,7 @@ msgstr "" "L'implémentation par défaut de :meth:`tzname` lève une :exc:" "`NotImplementedError`." -#: library/datetime.rst:2047 +#: library/datetime.rst:2069 #, fuzzy msgid "" "These methods are called by a :class:`.datetime` or :class:`.time` object, " @@ -2933,7 +2942,7 @@ msgstr "" "être prêtes à recevoir un argument ``None`` pour *dt*, ou une instance de :" "class:`.datetime`." -#: library/datetime.rst:2053 +#: library/datetime.rst:2075 #, fuzzy msgid "" "When ``None`` is passed, it's up to the class designer to decide the best " @@ -2945,11 +2954,11 @@ msgstr "" "Quand ``None`` est passé, il est de la responsabilité du *designer* de la " "classe de choisir la meilleure réponse. Par exemple, renvoyer ``None`` est " "approprié si la classe souhaite signaler que les objets de temps ne " -"participent pas au protocole :class:`tzinfo`. Il peut être plus utile pour " +"participent pas au protocole :class:`tzinfo`. Il peut être plus utile pour " "``utcoffset(None)`` de renvoyer le décalage UTC standard, comme il n'existe " "aucune autre convention pour obtenir ce décalage." -#: library/datetime.rst:2059 +#: library/datetime.rst:2081 #, fuzzy msgid "" "When a :class:`.datetime` object is passed in response to a :class:`." @@ -2962,12 +2971,12 @@ msgstr "" "Quand un objet :class:`.datetime` est passé en réponse à une méthode de :" "class:`.datetime`, ``dt.tzinfo`` est le même objet que *self*. Les méthodes " "de :class:`tzinfo` peuvent se baser là-dessus, à moins que le code " -"utilisateur appelle directement des méthodes de :class:`tzinfo`. " -"L'intention est que les méthodes de :class:`tzinfo` interprètent *dt* comme " -"étant le temps local, et n'aient pas à se soucier des objets dans d'autres " -"fuseaux horaires." +"utilisateur appelle directement des méthodes de :class:`tzinfo`. L'intention " +"est que les méthodes de :class:`tzinfo` interprètent *dt* comme étant le " +"temps local, et n'aient pas à se soucier des objets dans d'autres fuseaux " +"horaires." -#: library/datetime.rst:2065 +#: library/datetime.rst:2087 msgid "" "There is one more :class:`tzinfo` method that a subclass may wish to " "override:" @@ -2975,7 +2984,7 @@ msgstr "" "Il y a une dernière méthode de :class:`tzinfo` que les sous-classes peuvent " "vouloir redéfinir :" -#: library/datetime.rst:2070 +#: library/datetime.rst:2092 #, fuzzy msgid "" "This is called from the default :class:`datetime.astimezone()` " @@ -2985,13 +2994,13 @@ msgid "" "equivalent datetime in *self*'s local time." msgstr "" "Elle est appelée par l'implémentation par défaut de :class:`datetime." -"astimezone()`. Quand appelée depuis cette méthode, ``dt.tzinfo`` est " -"*self*, et les données de date et d'heure de *dt* sont vues comme exprimant " -"un temps UTC. Le rôle de :meth:`fromutc` est d'ajuster les données de date " -"et d'heure, renvoyant un objet *datetime* équivalent à *self*, dans le temps " -"local." +"astimezone()`. Lors d'un appel depuis cette méthode, ``dt.tzinfo`` vaut " +"*self* et les données de date et d'heure de *dt* sont vues comme exprimant " +"un horodatage UTC. Le rôle de :meth:`fromutc` est d'ajuster les données de " +"date et d'heure, renvoyant un objet *datetime* équivalent à *self*, dans le " +"temps local." -#: library/datetime.rst:2076 +#: library/datetime.rst:2098 #, fuzzy msgid "" "Most :class:`tzinfo` subclasses should be able to inherit the default :meth:" @@ -3006,11 +3015,11 @@ msgid "" "result is one of the hours straddling the moment the standard offset changes." msgstr "" "La plupart des sous-classes :class:`tzinfo` doivent être en mesure d'hériter " -"sans problème de l'implémentation par défaut de :meth:`fromutc`. Elle est " +"sans problème de l'implémentation par défaut de :meth:`fromutc`. Elle est " "suffisamment robuste pour gérer les fuseaux horaires à décalage fixe, et les " "fuseaux représentant à la fois des heures standards et d'été, et ce même si " -"le décalage de l'heure d'été est différent suivant les années. Un exemple " -"de fuseau horaire qui ne serait pas géré correctement dans tous les cas par " +"le décalage de l'heure d'été est différent suivant les années. Un exemple de " +"fuseau horaire qui ne serait pas géré correctement dans tous les cas par " "l'implémentation par défaut de :meth:`fromutc` en est un où le décalage " "standard (par rapport à UTC) dépend de valeurs spécifiques de date et " "d'heure passées, ce qui peut arriver pour des raisons politiques. Les " @@ -3018,7 +3027,7 @@ msgstr "" "ne pas produire les résultats attendus si le résultat est l'une des heures " "affectées par le changement d'heure." -#: library/datetime.rst:2087 +#: library/datetime.rst:2109 msgid "" "Skipping code for error cases, the default :meth:`fromutc` implementation " "acts like::" @@ -3026,7 +3035,7 @@ msgstr "" "En omettant le code des cas d'erreurs, l'implémentation par défaut de :meth:" "`fromutc` se comporte comme suit ::" -#: library/datetime.rst:2105 +#: library/datetime.rst:2127 msgid "" "In the following :download:`tzinfo_examples.py <../includes/tzinfo_examples." "py>` file there are some examples of :class:`tzinfo` classes:" @@ -3034,7 +3043,7 @@ msgstr "" "Dans le fichier :download:`tzinfo_examples.py <../includes/tzinfo_examples." "py>` il y a des exemples de :class:`tzinfo` classes:" -#: library/datetime.rst:2111 +#: library/datetime.rst:2133 #, fuzzy msgid "" "Note that there are unavoidable subtleties twice per year in a :class:" @@ -3045,12 +3054,12 @@ msgid "" msgstr "" "Notez que, deux fois par an, on rencontre des subtilités inévitables dans " "les sous-classes de :class:`tzinfo` représentant à la fois des heures " -"standard et d'été, au passage de l'une à l'autre. Concrètement, considérez " +"standard et d'été, au passage de l'une à l'autre. Concrètement, considérez " "le fuseau de l'est des États-Unis (UTC -0500), où EDT (heure d'été) débute à " "la minute qui suit 1:59 (EST) le second dimanche de mars, et se termine à la " "minute qui suit 1:59 (EDT) le premier dimanche de novembre ::" -#: library/datetime.rst:2125 +#: library/datetime.rst:2147 #, fuzzy msgid "" "When DST starts (the \"start\" line), the local wall clock leaps from 1:59 " @@ -3060,12 +3069,12 @@ msgid "" "get::" msgstr "" "Quand l'heure d'été débute (la ligne « *start* »), l'horloge locale passe de " -"1:59 à 3:00. Une heure de la forme 2:MM n'a pas vraiment de sens ce jour " -"là, donc ``astimezone(Eastern)`` ne délivrera pas de résultat avec ``hour " -"== 2`` pour le jour où débute l'heure d'été. Par exemple, lors de la " -"transition du printemps 2016, nous obtenons ::" +"1:59 à 3:00. Une heure de la forme 2:MM n'a pas vraiment de sens ce jour là, " +"donc ``astimezone(Eastern)`` ne fournira pas de résultat avec ``hour == 2`` " +"pour le jour où débute l'heure d'été. Par exemple, lors du changement " +"d'heure du printemps 2016, nous obtenons ::" -#: library/datetime.rst:2144 +#: library/datetime.rst:2166 #, fuzzy msgid "" "When DST ends (the \"end\" line), there's a potentially worse problem: " @@ -3082,18 +3091,19 @@ msgid "" msgstr "" "Quand l'heure d'été se termine (la ligne « *end* »), il y a potentiellement " "un problème pire que cela : il y a une heure qui ne peut pas être exprimée " -"sans ambiguïté en temps local : la dernière heure de l'heure d'été. Dans " +"sans ambiguïté en temps local : la dernière heure de l'heure d'été. Dans " "l'est des États-Unis, l'heure d'été se termine sur les heures de la forme 5:" -"MM UTC. L'horloge locale passe de 1:59 (heure d'été) à 1:00 (heure " -"standard) à nouveau. Les heures locales de la forme 1:MM sont ambiguës. :" -"meth:`astimezone` imite le comportement des horloges locales en associant " -"deux heures UTC adjacentes à la même heure locale. Dans notre exemple, les " -"temps UTC de la forme 5:MM et 6:MM sont tous deux associés à 1:MM quand " -"convertis vers ce fuseau, mais les heures les plus anciennes ont l'attribut :" -"attr:`~datetime.fold` à 0 et les plus récentes l'ont à 1. Par exemple, lors " -"de la transition de l'automne 2016, nous obtenons ::" - -#: library/datetime.rst:2166 +"MM UTC. L'horloge locale passe de 1:59 (heure d'été) à 1:00 (heure d'hiver) " +"à nouveau. Les heures locales de la forme 1:MM sont ambiguës. :meth:" +"`astimezone` imite le comportement des horloges locales en associant deux " +"heures UTC adjacentes à la même heure locale. Dans notre exemple, les " +"horodatages UTC de la forme 5:MM et 6:MM sont tous deux associés à 1:MM " +"quand ils sont convertis vers ce fuseau, mais les horodatages les plus " +"anciens ont l'attribut :attr:`~datetime.fold` à 0 et les plus récents l'ont " +"à 1. Par exemple, lors du changement d'heure de l'automne 2016, nous " +"obtenons ::" + +#: library/datetime.rst:2188 #, fuzzy msgid "" "Note that the :class:`.datetime` instances that differ only by the value of " @@ -3103,7 +3113,7 @@ msgstr "" "valeur de leur attribut :attr:`~datetime.fold` sont considérées égales dans " "les comparaisons." -#: library/datetime.rst:2169 +#: library/datetime.rst:2191 msgid "" "Applications that can't bear wall-time ambiguities should explicitly check " "the value of the :attr:`~datetime.fold` attribute or avoid using hybrid :" @@ -3120,37 +3130,38 @@ msgstr "" "représentant uniquement le fuseau EST (de décalage fixe *-5h*) ou uniquement " "EDT (*-4h*))." -#: library/datetime.rst:2184 -msgid "`dateutil.tz `_" -msgstr "`dateutil.tz `_" +#: library/datetime.rst:2205 +msgid ":mod:`zoneinfo`" +msgstr ":mod:`zoneinfo`" -#: library/datetime.rst:2178 +#: library/datetime.rst:2200 #, fuzzy msgid "" "The :mod:`datetime` module has a basic :class:`timezone` class (for handling " "arbitrary fixed offsets from UTC) and its :attr:`timezone.utc` attribute (a " "UTC timezone instance)." msgstr "" -"La bibliothèque standard contient la classe :class:`timezone` pour gérer des " -"décalages fixes par rapport à UTC et :attr:`timezone.utc` comme instance du " -"fuseau horaire UTC." +"Le module :mod:`datetime` contient une classe élémentaire :class:`timezone` " +"pour gérer des décalages fixes par rapport à UTC et :attr:`timezone.utc` " +"comme instance du fuseau horaire UTC." -#: library/datetime.rst:2182 +#: library/datetime.rst:2204 +#, fuzzy msgid "" -"*dateutil.tz* library brings the *IANA timezone database* (also known as the " -"Olson database) to Python, and its usage is recommended." +"``zoneinfo`` brings the *IANA timezone database* (also known as the Olson " +"database) to Python, and its usage is recommended." msgstr "" "La bibliothèque *dateutil.tz* apporte à Python la *base de données de " "fuseaux horaires IANA* (aussi appelée base de données Olson), et son " "utilisation est recommandée." -#: library/datetime.rst:2190 +#: library/datetime.rst:2211 msgid "`IANA timezone database `_" msgstr "" "`Base de données des fuseaux horaires de l'IANA `_" -#: library/datetime.rst:2187 +#: library/datetime.rst:2208 msgid "" "The Time Zone Database (often called tz, tzdata or zoneinfo) contains code " "and data that represent the history of local time for many representative " @@ -3165,11 +3176,11 @@ msgstr "" "politiques sur les bornes du fuseau, les décalages UTC, et les règles de " "passage à l'heure d'été." -#: library/datetime.rst:2197 +#: library/datetime.rst:2218 msgid ":class:`timezone` Objects" msgstr "Objets :class:`timezone`" -#: library/datetime.rst:2199 +#: library/datetime.rst:2220 msgid "" "The :class:`timezone` class is a subclass of :class:`tzinfo`, each instance " "of which represents a timezone defined by a fixed offset from UTC." @@ -3178,21 +3189,19 @@ msgstr "" "chaque instance représente un fuseau horaire défini par un décalage fixe par " "rapport à UTC." -#: library/datetime.rst:2203 +#: library/datetime.rst:2224 #, fuzzy msgid "" "Objects of this class cannot be used to represent timezone information in " "the locations where different offsets are used in different days of the year " "or where historical changes have been made to civil time." msgstr "" -"La classe :class:`timezone` est une sous-classe de :class:`tzinfo`, où " -"chaque instance représente un fuseau horaire défini par un décalage fixe par " -"rapport à UTC. Notez que les que les objets de cette classe ne peuvent pas " -"être utilisés pour représenter les informations de fuseaux horaires dans des " -"emplacements où plusieurs décalages sont utilisés au cours de l'année ou où " -"des changements historiques ont été opérés sur le temps civil." +"Les objets de cette classe ne peuvent pas être utilisés pour représenter les " +"informations de fuseaux horaires dans des emplacements où plusieurs " +"décalages sont utilisés au cours de l'année ni où le déroulement du temps " +"civil a fait l'objet d'ajustements." -#: library/datetime.rst:2210 +#: library/datetime.rst:2231 #, fuzzy msgid "" "The *offset* argument must be specified as a :class:`timedelta` object " @@ -3201,21 +3210,21 @@ msgid "" "otherwise :exc:`ValueError` is raised." msgstr "" "L'argument *offset* doit être spécifié comme un objet :class:`timedelta` " -"représentant la différence entre le temps local et UTC. Il doit être " +"représentant la différence entre le temps local et UTC. Il doit être " "strictement compris entre ``-timedelta(hours=24)`` et " "``timedelta(hours=24)``, autrement une :exc:`ValueError` est levée." -#: library/datetime.rst:2215 +#: library/datetime.rst:2236 #, fuzzy msgid "" "The *name* argument is optional. If specified it must be a string that will " "be used as the value returned by the :meth:`datetime.tzname` method." msgstr "" -"L'argument *name* est optionnel. Si spécifié, il doit être une chaîne de " -"caractères qui sera utilisée comme valeur de retour de la méthode :meth:" +"L'argument *name* est optionnel. S'il est spécifié, il doit être une chaîne " +"de caractères qui sera utilisée comme valeur de retour de la méthode :meth:" "`datetime.tzname`." -#: library/datetime.rst:2237 +#: library/datetime.rst:2258 msgid "" "Return the fixed value specified when the :class:`timezone` instance is " "constructed." @@ -3223,18 +3232,16 @@ msgstr "" "Renvoie la valeur fixe spécifiée lorsque l'instance :class:`timezone` est " "construite." -#: library/datetime.rst:2229 +#: library/datetime.rst:2250 #, fuzzy msgid "" "The *dt* argument is ignored. The return value is a :class:`timedelta` " "instance equal to the difference between the local time and UTC." msgstr "" -"Renvoie la valeur fixe spécifiée à la création de l'instance de :class:" -"`timezone`. L'argument *dt* est ignoré. La valeur de retour est une " -"instance :class:`timedelta` égale à la différence entre le temps local et " -"UTC." +"L'argument *dt* est ignoré. La valeur de retour est une instance :class:" +"`timedelta` égale à la différence entre le temps local et UTC." -#: library/datetime.rst:2240 +#: library/datetime.rst:2261 #, fuzzy msgid "" "If *name* is not provided in the constructor, the name returned by " @@ -3243,27 +3250,26 @@ msgid "" "in the format ``UTC±HH:MM``, where ± is the sign of ``offset``, HH and MM " "are two digits of ``offset.hours`` and ``offset.minutes`` respectively." msgstr "" -"Renvoie la valeur fixe spécifiée à la création de l'instance de :class:" -"`timezone`. Si *name* n'est pas fourni au constructeur, le nom renvoyé par " +"Si *name* n'est pas fourni au constructeur, le nom renvoyé par " "``tzname(dt)`` est généré comme suit à partir de la valeur de ``offset``. " "Si *offset* vaut ``timedelta(0)``, le nom sera « UTC », autrement le nom " -"sera une chaîne de la forme \"UTC±HH:MM\", où ± est le signe d'``offset``, " +"sera une chaîne de la forme ``UTC±HH:MM``, où ± est le signe d'``offset``, " "et HH et MM sont respectivement les représentations à deux chiffres de " "``offset.hours`` et ``offset.minutes``." -#: library/datetime.rst:2246 +#: library/datetime.rst:2267 msgid "" -"Name generated from ``offset=timedelta(0)`` is now plain `'UTC'`, not ``'UTC" -"+00:00'``." +"Name generated from ``offset=timedelta(0)`` is now plain `'UTC'`, not " +"``'UTC+00:00'``." msgstr "" "Le nom généré à partir de ``offset=timedelta(0)`` est maintenant \"UTC\" " "plutôt que \"UTC+00:00\"." -#: library/datetime.rst:2253 +#: library/datetime.rst:2274 msgid "Always returns ``None``." msgstr "Renvoie toujours ``None``." -#: library/datetime.rst:2257 +#: library/datetime.rst:2278 msgid "" "Return ``dt + offset``. The *dt* argument must be an aware :class:`." "datetime` instance, with ``tzinfo`` set to ``self``." @@ -3271,15 +3277,15 @@ msgstr "" "Renvoie ``dt + offset``. L'argument *dt* doit être une instance avisée de :" "class:`.datetime`, avec ``tzinfo`` valant ``self``." -#: library/datetime.rst:2264 +#: library/datetime.rst:2285 msgid "The UTC timezone, ``timezone(timedelta(0))``." msgstr "Le fuseau horaire UTC, ``timezone(timedelta(0))``." -#: library/datetime.rst:2273 +#: library/datetime.rst:2294 msgid ":meth:`strftime` and :meth:`strptime` Behavior" msgstr "Comportement de :meth:`strftime` et :meth:`strptime`" -#: library/datetime.rst:2275 +#: library/datetime.rst:2296 #, fuzzy msgid "" ":class:`date`, :class:`.datetime`, and :class:`.time` objects all support a " @@ -3289,11 +3295,9 @@ msgstr "" "Les objets :class:`date`, :class:`.datetime` et :class:`.time` comportent " "tous une méthode ``strftime(format)``, pour créer une représentation du " "temps sous forme d'une chaîne de caractères, contrôlée par une chaîne de " -"formatage explicite. Grossièrement, ``d.strftime(fmt)`` se comporte comme " -"la fonction ``time.strftime(fmt, d.timetuple())`` du module :mod:`time`, " -"bien que tous les objets ne comportent pas de méthode :meth:`timetuple`." +"formatage explicite." -#: library/datetime.rst:2279 +#: library/datetime.rst:2300 msgid "" "Conversely, the :meth:`datetime.strptime` class method creates a :class:`." "datetime` object from a string representing a date and time and a " @@ -3303,7 +3307,7 @@ msgstr "" "class:`.datetime` à partir d'une chaîne représentant une date et une heure, " "et une chaîne de format correspondante." -#: library/datetime.rst:2283 +#: library/datetime.rst:2304 msgid "" "The table below provides a high-level comparison of :meth:`strftime` versus :" "meth:`strptime`:" @@ -3311,70 +3315,70 @@ msgstr "" "Le tableau ci-dessous fournit une comparaison de haut niveau entre :meth:" "`strftime` et :meth:`strptime` :" -#: library/datetime.rst:2287 +#: library/datetime.rst:2308 msgid "``strftime``" msgstr "``strftime``" -#: library/datetime.rst:2287 +#: library/datetime.rst:2308 msgid "``strptime``" msgstr "``strptime``" -#: library/datetime.rst:2289 +#: library/datetime.rst:2310 msgid "Usage" msgstr "Utilisation" -#: library/datetime.rst:2289 +#: library/datetime.rst:2310 msgid "Convert object to a string according to a given format" msgstr "Convertit un objet en une chaîne de caractères selon un format donné" -#: library/datetime.rst:2289 +#: library/datetime.rst:2310 msgid "" "Parse a string into a :class:`.datetime` object given a corresponding format" msgstr "" "Analyse une chaîne de caractères dans un objet :class:`.datetime` en " "fonction du format de correspondance donné" -#: library/datetime.rst:2291 +#: library/datetime.rst:2312 msgid "Type of method" msgstr "Type de méthode" -#: library/datetime.rst:2291 +#: library/datetime.rst:2312 msgid "Instance method" msgstr "Méthode d'instance" -#: library/datetime.rst:2291 +#: library/datetime.rst:2312 msgid "Class method" msgstr "Méthode de classe" -#: library/datetime.rst:2293 +#: library/datetime.rst:2314 msgid "Method of" msgstr "Méthode de" -#: library/datetime.rst:2293 +#: library/datetime.rst:2314 msgid ":class:`date`; :class:`.datetime`; :class:`.time`" msgstr ":class:`date` ; :class:`.datetime` ; :class:`.time`" -#: library/datetime.rst:2293 +#: library/datetime.rst:2314 msgid ":class:`.datetime`" msgstr ":class:`.datetime`" -#: library/datetime.rst:2295 +#: library/datetime.rst:2316 msgid "Signature" msgstr "Signature" -#: library/datetime.rst:2295 +#: library/datetime.rst:2316 msgid "``strftime(format)``" msgstr "``strftime(format)``" -#: library/datetime.rst:2295 +#: library/datetime.rst:2316 msgid "``strptime(date_string, format)``" msgstr "``strptime(date_string, format)``" -#: library/datetime.rst:2300 +#: library/datetime.rst:2321 msgid ":meth:`strftime` and :meth:`strptime` Format Codes" msgstr "Codes de formatage de :meth:`strftime` et :meth:`strptime`" -#: library/datetime.rst:2302 +#: library/datetime.rst:2323 msgid "" "The following is a list of all the format codes that the 1989 C standard " "requires, and these work on all platforms with a standard C implementation." @@ -3383,27 +3387,27 @@ msgstr "" "standard C (version 1989), ils fonctionnent sur toutes les plateformes " "possédant une implémentation de C standard." -#: library/datetime.rst:2409 +#: library/datetime.rst:2430 msgid "Directive" msgstr "Directive" -#: library/datetime.rst:2409 +#: library/datetime.rst:2430 msgid "Meaning" msgstr "Signification" -#: library/datetime.rst:2409 +#: library/datetime.rst:2430 msgid "Example" msgstr "Exemple" -#: library/datetime.rst:2409 +#: library/datetime.rst:2430 msgid "Notes" msgstr "Notes" -#: library/datetime.rst:2308 +#: library/datetime.rst:2329 msgid "``%a``" msgstr "``%a``" -#: library/datetime.rst:2308 +#: library/datetime.rst:2329 msgid "Weekday as locale's abbreviated name." msgstr "Jour de la semaine abrégé dans la langue locale." @@ -3415,11 +3419,11 @@ msgstr "Sun, Mon, ..., Sat (en_US);" msgid "So, Mo, ..., Sa (de_DE)" msgstr "Lu, Ma, ..., Di (*fr_FR*)" -#: library/datetime.rst:2313 +#: library/datetime.rst:2334 msgid "``%A``" msgstr "``%A``" -#: library/datetime.rst:2313 +#: library/datetime.rst:2334 msgid "Weekday as locale's full name." msgstr "Jour de la semaine complet dans la langue locale." @@ -3431,41 +3435,41 @@ msgstr "*Sunday*, *Monday*, ..., *Saturday* (*en_US*);" msgid "Sonntag, Montag, ..., Samstag (de_DE)" msgstr "Lundi, Mardi, ..., Dimanche (*fr_FR*)" -#: library/datetime.rst:2318 +#: library/datetime.rst:2339 msgid "``%w``" msgstr "``%w``" -#: library/datetime.rst:2318 +#: library/datetime.rst:2339 msgid "Weekday as a decimal number, where 0 is Sunday and 6 is Saturday." msgstr "" "Jour de la semaine en chiffre, avec 0 pour le dimanche et 6 pour le samedi." -#: library/datetime.rst:2318 +#: library/datetime.rst:2339 msgid "0, 1, ..., 6" msgstr "0, 1, ..., 6" -#: library/datetime.rst:2322 +#: library/datetime.rst:2343 msgid "``%d``" msgstr "``%d``" -#: library/datetime.rst:2322 +#: library/datetime.rst:2343 msgid "Day of the month as a zero-padded decimal number." msgstr "Jour du mois sur deux chiffres." -#: library/datetime.rst:2322 +#: library/datetime.rst:2343 msgid "01, 02, ..., 31" msgstr "01, 02, ..., 31" -#: library/datetime.rst:2335 library/datetime.rst:2344 -#: library/datetime.rst:2353 library/datetime.rst:2371 +#: library/datetime.rst:2356 library/datetime.rst:2365 +#: library/datetime.rst:2374 library/datetime.rst:2392 msgid "\\(9)" msgstr "\\(9)" -#: library/datetime.rst:2325 +#: library/datetime.rst:2346 msgid "``%b``" msgstr "``%b``" -#: library/datetime.rst:2325 +#: library/datetime.rst:2346 msgid "Month as locale's abbreviated name." msgstr "Nom du mois abrégé dans la langue locale." @@ -3477,11 +3481,11 @@ msgstr "Jan, Feb, ..., Dec (*en_US*);" msgid "Jan, Feb, ..., Dez (de_DE)" msgstr "janv., févr., ..., déc. (*fr_FR*)" -#: library/datetime.rst:2330 +#: library/datetime.rst:2351 msgid "``%B``" msgstr "``%B``" -#: library/datetime.rst:2330 +#: library/datetime.rst:2351 msgid "Month as locale's full name." msgstr "Nom complet du mois dans la langue locale." @@ -3493,67 +3497,67 @@ msgstr "*January*, *February*, ..., *December* (*en_US*);" msgid "Januar, Februar, ..., Dezember (de_DE)" msgstr "janvier, février, ..., décembre (*fr_FR*)" -#: library/datetime.rst:2335 +#: library/datetime.rst:2356 msgid "``%m``" msgstr "``%m``" -#: library/datetime.rst:2335 +#: library/datetime.rst:2356 msgid "Month as a zero-padded decimal number." msgstr "Numéro du mois sur deux chiffres." -#: library/datetime.rst:2347 +#: library/datetime.rst:2368 msgid "01, 02, ..., 12" msgstr "01, 02, ..., 12" -#: library/datetime.rst:2338 +#: library/datetime.rst:2359 msgid "``%y``" msgstr "``%y``" -#: library/datetime.rst:2338 +#: library/datetime.rst:2359 msgid "Year without century as a zero-padded decimal number." msgstr "Année sur deux chiffres (sans le siècle)." -#: library/datetime.rst:2338 +#: library/datetime.rst:2359 msgid "00, 01, ..., 99" msgstr "00, 01, ..., 99" -#: library/datetime.rst:2341 +#: library/datetime.rst:2362 msgid "``%Y``" msgstr "``%Y``" -#: library/datetime.rst:2341 +#: library/datetime.rst:2362 msgid "Year with century as a decimal number." msgstr "Année complète sur quatre chiffres." -#: library/datetime.rst:2411 +#: library/datetime.rst:2432 msgid "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" msgstr "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" -#: library/datetime.rst:2344 +#: library/datetime.rst:2365 msgid "``%H``" msgstr "``%H``" -#: library/datetime.rst:2344 +#: library/datetime.rst:2365 msgid "Hour (24-hour clock) as a zero-padded decimal number." msgstr "Heure à deux chiffres de 00 à 23." -#: library/datetime.rst:2344 +#: library/datetime.rst:2365 msgid "00, 01, ..., 23" msgstr "00, 01, ..., 23" -#: library/datetime.rst:2347 +#: library/datetime.rst:2368 msgid "``%I``" msgstr "``%I``" -#: library/datetime.rst:2347 +#: library/datetime.rst:2368 msgid "Hour (12-hour clock) as a zero-padded decimal number." msgstr "Heure à deux chiffres pour les horloges 12h (01 à 12)." -#: library/datetime.rst:2350 +#: library/datetime.rst:2371 msgid "``%p``" msgstr "``%p``" -#: library/datetime.rst:2350 +#: library/datetime.rst:2371 msgid "Locale's equivalent of either AM or PM." msgstr "Équivalent local à AM/PM." @@ -3565,55 +3569,56 @@ msgstr "AM, PM (en_US);" msgid "am, pm (de_DE)" msgstr "am, pm (de_DE)" -#: library/datetime.rst:2350 +#: library/datetime.rst:2371 msgid "\\(1), \\(3)" msgstr "\\(1), \\(3)" -#: library/datetime.rst:2353 +#: library/datetime.rst:2374 msgid "``%M``" msgstr "``%M``" -#: library/datetime.rst:2353 +#: library/datetime.rst:2374 msgid "Minute as a zero-padded decimal number." msgstr "Minutes sur deux chiffres." -#: library/datetime.rst:2356 +#: library/datetime.rst:2377 msgid "00, 01, ..., 59" msgstr "00, 01, ..., 59" -#: library/datetime.rst:2356 +#: library/datetime.rst:2377 msgid "``%S``" msgstr "``%S``" -#: library/datetime.rst:2356 +#: library/datetime.rst:2377 msgid "Second as a zero-padded decimal number." msgstr "Secondes sur deux chiffres." -#: library/datetime.rst:2356 +#: library/datetime.rst:2377 msgid "\\(4), \\(9)" msgstr "\\(4), \\(9)" -#: library/datetime.rst:2359 +#: library/datetime.rst:2380 msgid "``%f``" msgstr "``%f``" -#: library/datetime.rst:2359 -msgid "Microsecond as a decimal number, zero-padded on the left." +#: library/datetime.rst:2380 +#, fuzzy +msgid "Microsecond as a decimal number, zero-padded to 6 digits." msgstr "Microsecondes sur 6 chiffres." -#: library/datetime.rst:2359 +#: library/datetime.rst:2380 msgid "000000, 000001, ..., 999999" msgstr "000000, 000001, ..., 999999" -#: library/datetime.rst:2359 +#: library/datetime.rst:2380 msgid "\\(5)" msgstr "\\(5)" -#: library/datetime.rst:2526 +#: library/datetime.rst:2548 msgid "``%z``" msgstr "``%z``" -#: library/datetime.rst:2363 +#: library/datetime.rst:2384 msgid "" "UTC offset in the form ``±HHMM[SS[.ffffff]]`` (empty string if the object is " "naive)." @@ -3621,45 +3626,46 @@ msgstr "" "Décalage horaire UTC sous la forme ``±HHMM[SS[.ffffff]]`` (chaîne vide si " "l'instance est naïve)." -#: library/datetime.rst:2363 +#: library/datetime.rst:2384 msgid "(empty), +0000, -0400, +1030, +063415, -030712.345216" msgstr "(vide), +0000, -0400, +1030, +063415, -030712.345216" -#: library/datetime.rst:2368 +#: library/datetime.rst:2389 msgid "\\(6)" msgstr "\\(6)" -#: library/datetime.rst:2550 +#: library/datetime.rst:2572 msgid "``%Z``" msgstr "``%Z``" -#: library/datetime.rst:2368 +#: library/datetime.rst:2389 msgid "Time zone name (empty string if the object is naive)." msgstr "Nom du fuseau horaire (chaîne vide si l'instance est naïve)." -#: library/datetime.rst:2368 +#: library/datetime.rst:2389 msgid "(empty), UTC, GMT" msgstr "(vide), UTC, GMT" -#: library/datetime.rst:2371 +#: library/datetime.rst:2392 msgid "``%j``" msgstr "``%j``" -#: library/datetime.rst:2371 +#: library/datetime.rst:2392 msgid "Day of the year as a zero-padded decimal number." msgstr "Numéro du jour dans l'année sur trois chiffres." -#: library/datetime.rst:2371 +#: library/datetime.rst:2392 msgid "001, 002, ..., 366" msgstr "001, 002, ..., 366" -#: library/datetime.rst:2374 +#: library/datetime.rst:2395 msgid "``%U``" msgstr "``%U``" -#: library/datetime.rst:2374 +#: library/datetime.rst:2395 +#, fuzzy msgid "" -"Week number of the year (Sunday as the first day of the week) as a zero " +"Week number of the year (Sunday as the first day of the week) as a zero-" "padded decimal number. All days in a new year preceding the first Sunday are " "considered to be in week 0." msgstr "" @@ -3667,33 +3673,34 @@ msgstr "" "premier jour de la semaine). Tous les jours de l'année précédent le premier " "dimanche sont considérés comme appartenant à la semaine 0." -#: library/datetime.rst:2382 +#: library/datetime.rst:2403 msgid "00, 01, ..., 53" msgstr "00, 01, ..., 53" -#: library/datetime.rst:2382 +#: library/datetime.rst:2403 msgid "\\(7), \\(9)" msgstr "\\(7), \\(9)" -#: library/datetime.rst:2382 +#: library/datetime.rst:2403 msgid "``%W``" msgstr "``%W``" -#: library/datetime.rst:2382 +#: library/datetime.rst:2403 +#, fuzzy msgid "" -"Week number of the year (Monday as the first day of the week) as a decimal " -"number. All days in a new year preceding the first Monday are considered to " -"be in week 0." +"Week number of the year (Monday as the first day of the week) as a zero-" +"padded decimal number. All days in a new year preceding the first Monday are " +"considered to be in week 0." msgstr "" -"Numéro de la semaine à deux chiffres (où lundi est considéré comme le " +"Numéro de la semaine à deux chiffres (où dimanche est considéré comme le " "premier jour de la semaine). Tous les jours de l'année précédent le premier " -"lundi sont considérés comme appartenant à la semaine 0." +"dimanche sont considérés comme appartenant à la semaine 0." -#: library/datetime.rst:2390 +#: library/datetime.rst:2411 msgid "``%c``" msgstr "``%c``" -#: library/datetime.rst:2390 +#: library/datetime.rst:2411 msgid "Locale's appropriate date and time representation." msgstr "Représentation locale de la date et de l'heure." @@ -3705,11 +3712,11 @@ msgstr "Tue Aug 16 21:30:00 1988 (*en_US*);" msgid "Di 16 Aug 21:30:00 1988 (de_DE)" msgstr "mar. 16 août 1988 21:30:00 (*fr_FR*)" -#: library/datetime.rst:2395 +#: library/datetime.rst:2416 msgid "``%x``" msgstr "``%x``" -#: library/datetime.rst:2395 +#: library/datetime.rst:2416 msgid "Locale's appropriate date representation." msgstr "Représentation locale de la date." @@ -3725,11 +3732,11 @@ msgstr "08/16/1988 (*en_US*);" msgid "16.08.1988 (de_DE)" msgstr "16/08/1988 (*fr_FR*)" -#: library/datetime.rst:2399 +#: library/datetime.rst:2420 msgid "``%X``" msgstr "``%X``" -#: library/datetime.rst:2399 +#: library/datetime.rst:2420 msgid "Locale's appropriate time representation." msgstr "Représentation locale de l'heure." @@ -3741,19 +3748,19 @@ msgstr "21:30:00 (*en_US*) ;" msgid "21:30:00 (de_DE)" msgstr "21:30:00 (*fr_FR*)" -#: library/datetime.rst:2402 +#: library/datetime.rst:2423 msgid "``%%``" msgstr "``%%``" -#: library/datetime.rst:2402 +#: library/datetime.rst:2423 msgid "A literal ``'%'`` character." msgstr "Un caractère ``'%'`` littéral." -#: library/datetime.rst:2402 +#: library/datetime.rst:2423 msgid "%" msgstr "%" -#: library/datetime.rst:2405 +#: library/datetime.rst:2426 msgid "" "Several additional directives not required by the C89 standard are included " "for convenience. These parameters all correspond to ISO 8601 date values." @@ -3762,11 +3769,11 @@ msgstr "" "incluses pour des raisons de commodité. Ces paramètres correspondent tous " "aux valeurs de date de la norme ISO 8601." -#: library/datetime.rst:2411 +#: library/datetime.rst:2432 msgid "``%G``" msgstr "``%G``" -#: library/datetime.rst:2411 +#: library/datetime.rst:2432 msgid "" "ISO 8601 year with century representing the year that contains the greater " "part of the ISO week (``%V``)." @@ -3774,27 +3781,27 @@ msgstr "" "Année complète ISO 8601 représentant l'année contenant la plus grande partie " "de la semaine ISO (``%V``)." -#: library/datetime.rst:2411 +#: library/datetime.rst:2432 msgid "\\(8)" msgstr "\\(8)" -#: library/datetime.rst:2416 +#: library/datetime.rst:2437 msgid "``%u``" msgstr "``%u``" -#: library/datetime.rst:2416 +#: library/datetime.rst:2437 msgid "ISO 8601 weekday as a decimal number where 1 is Monday." msgstr "Jour de la semaine ISO 8601 où 1 correspond au lundi." -#: library/datetime.rst:2416 +#: library/datetime.rst:2437 msgid "1, 2, ..., 7" msgstr "1, 2, ..., 7" -#: library/datetime.rst:2419 +#: library/datetime.rst:2440 msgid "``%V``" msgstr "``%V``" -#: library/datetime.rst:2419 +#: library/datetime.rst:2440 msgid "" "ISO 8601 week as a decimal number with Monday as the first day of the week. " "Week 01 is the week containing Jan 4." @@ -3802,15 +3809,15 @@ msgstr "" "Numéro de la semaine ISO 8601, avec lundi étant le premier jour de la " "semaine. La semaine 01 est la semaine contenant le 4 janvier." -#: library/datetime.rst:2419 +#: library/datetime.rst:2440 msgid "01, 02, ..., 53" msgstr "01, 02, ..., 53" -#: library/datetime.rst:2419 +#: library/datetime.rst:2440 msgid "\\(8), \\(9)" msgstr "\\(8), \\(9)" -#: library/datetime.rst:2426 +#: library/datetime.rst:2447 #, fuzzy msgid "" "These may not be available on all platforms when used with the :meth:" @@ -3819,51 +3826,48 @@ msgid "" "meth:`strptime` with incomplete or ambiguous ISO 8601 directives will raise " "a :exc:`ValueError`." msgstr "" -"Plusieurs directives additionnelles non requises par le standard *C89* sont " -"incluses par commodité. Ces paramètres correspondent tous aux valeurs de " -"dates ISO 8601. Ils peuvent ne pas être disponibles sur toutes les " -"plateformes quand utilisés avec la méthode :meth:`strftime`. Les directives " -"ISO 8601 d'année et de semaine ne sont pas interchangeables avec les " -"directives d'année et de semaine précédentes. Appeler :meth:`strptime` avec " -"des directives ISO 8601 incomplètes ou ambiguës lèvera une :exc:`ValueError`." +"Elles peuvent ne pas être disponibles sur toutes les plateformes quand elles " +"sont utilisées avec la méthode :meth:`strftime`. Les directives ISO 8601 " +"d'année et de semaine ne sont pas interchangeables avec les directives " +"d'année et de semaine précédentes. Appeler :meth:`strptime` avec des " +"directives ISO 8601 incomplètes ou ambiguës lèvera une :exc:`ValueError`." -#: library/datetime.rst:2431 +#: library/datetime.rst:2452 #, fuzzy msgid "" "The full set of format codes supported varies across platforms, because " "Python calls the platform C library's :func:`strftime` function, and " "platform variations are common. To see the full set of format codes " -"supported on your platform, consult the :manpage:`strftime(3)` documentation." +"supported on your platform, consult the :manpage:`strftime(3)` " +"documentation. There are also differences between platforms in handling of " +"unsupported format specifiers." msgstr "" "L'ensemble complet des codes de formatage implémentés varie selon les " "plateformes, parce que Python appelle la fonction :func:`strftime` de la " -"bibliothèque C de la plateforme, et les variations sont courantes. Pour " -"voir un ensemble complet des codes de formatage implémentés par votre " -"plateforme, consultez la documentation de :manpage:`strftime(3)`." +"bibliothèque C de la plateforme, et les variations sont courantes. Pour voir " +"un ensemble complet des codes de formatage implémentés par votre plateforme, " +"consultez la documentation de :manpage:`strftime(3)`." -#: library/datetime.rst:2436 +#: library/datetime.rst:2458 msgid "``%G``, ``%u`` and ``%V`` were added." msgstr "``%G``, ``%u`` et ``%V`` ont été ajoutés." -#: library/datetime.rst:2440 +#: library/datetime.rst:2462 msgid "Technical Detail" msgstr "Détail technique" -#: library/datetime.rst:2442 +#: library/datetime.rst:2464 #, fuzzy msgid "" "Broadly speaking, ``d.strftime(fmt)`` acts like the :mod:`time` module's " "``time.strftime(fmt, d.timetuple())`` although not all objects support a :" "meth:`timetuple` method." msgstr "" -"Les objets :class:`date`, :class:`.datetime` et :class:`.time` comportent " -"tous une méthode ``strftime(format)``, pour créer une représentation du " -"temps sous forme d'une chaîne de caractères, contrôlée par une chaîne de " -"formatage explicite. Grossièrement, ``d.strftime(fmt)`` se comporte comme " -"la fonction ``time.strftime(fmt, d.timetuple())`` du module :mod:`time`, " -"bien que tous les objets ne comportent pas de méthode :meth:`timetuple`." +"Grossièrement, ``d.strftime(fmt)`` se comporte comme la fonction ``time." +"strftime(fmt, d.timetuple())`` du module :mod:`time`, bien que tous les " +"objets ne comportent pas de méthode :meth:`timetuple`." -#: library/datetime.rst:2446 +#: library/datetime.rst:2468 msgid "" "For the :meth:`datetime.strptime` class method, the default value is " "``1900-01-01T00:00:00.000``: any components not specified in the format " @@ -3873,12 +3877,12 @@ msgstr "" "``1900-01-01T00:00:00.000`` : tous les composants non spécifiés dans la " "chaîne de formatage seront retirés de la valeur par défaut. [#]_" -#: library/datetime.rst:2450 +#: library/datetime.rst:2472 msgid "Using ``datetime.strptime(date_string, format)`` is equivalent to::" msgstr "" "L'utilisation de ``datetime.strptime(date_string, format)`` équivaut à ::" -#: library/datetime.rst:2454 +#: library/datetime.rst:2476 msgid "" "except when the format includes sub-second components or timezone offset " "information, which are supported in ``datetime.strptime`` but are discarded " @@ -3888,7 +3892,7 @@ msgstr "" "informations de décalage de fuseau horaire, qui sont prises en charge dans " "``datetime.strptime`` mais pas par ``time.strptime``." -#: library/datetime.rst:2458 +#: library/datetime.rst:2480 #, fuzzy msgid "" "For :class:`.time` objects, the format codes for year, month, and day should " @@ -3897,11 +3901,11 @@ msgid "" "day." msgstr "" "Pour les objets :class:`.time`, les codes de formatage pour l'année, le mois " -"et le jour ne devraient pas être utilisés, puisque les objets de temps ne " -"possèdent pas de telles valeurs. S'ils sont tout de même utilisés, ``1900`` " -"est substitué à l'année, et ``1`` au mois et au jour." +"et le jour ne devraient pas être utilisés, puisque les objets :class:`time` " +"ne possèdent pas de telles valeurs. S'ils sont tout de même utilisés, " +"``1900`` est utilisé pour l'année, et ``1`` pour le mois et le jour." -#: library/datetime.rst:2462 +#: library/datetime.rst:2484 #, fuzzy msgid "" "For :class:`date` objects, the format codes for hours, minutes, seconds, and " @@ -3910,10 +3914,10 @@ msgid "" msgstr "" "Pour les objets :class:`date`, les codes de formatage pour les heures, " "minutes, secondes et microsecondes ne devraient pas être utilisés, puisque " -"les objets :class:`date` ne possèdent pas de telles valeurs. S'ils sont " -"tous de même utilisés, ils sont substitués par ``0``." +"les objets :class:`date` ne possèdent pas de telles valeurs. S'ils sont tout " +"de même utilisés, la valeur ``0`` est utilisée." -#: library/datetime.rst:2466 +#: library/datetime.rst:2488 msgid "" "For the same reason, handling of format strings containing Unicode code " "points that can't be represented in the charset of the current locale is " @@ -3928,7 +3932,7 @@ msgstr "" "plateformes ``strftime`` lève une :exc:`UnicodeError` ou renvoie une chaîne " "vide." -#: library/datetime.rst:2475 +#: library/datetime.rst:2497 msgid "" "Because the format depends on the current locale, care should be taken when " "making assumptions about the output value. Field orderings will vary (for " @@ -3947,7 +3951,7 @@ msgstr "" "utilisez :meth:`locale.getlocale` pour déterminer l'encodage de la locale " "courante)." -#: library/datetime.rst:2484 +#: library/datetime.rst:2506 msgid "" "The :meth:`strptime` method can parse years in the full [1, 9999] range, but " "years < 1000 must be zero-filled to 4-digit width." @@ -3956,7 +3960,7 @@ msgstr "" "[1, 9999], mais toutes les années < 1000 doivent être représentées sur " "quatre chiffres." -#: library/datetime.rst:2487 +#: library/datetime.rst:2509 msgid "" "In previous versions, :meth:`strftime` method was restricted to years >= " "1900." @@ -3964,13 +3968,13 @@ msgstr "" "Dans les versions précédentes, la méthode :meth:`strftime` était limitée aux " "années >= 1900." -#: library/datetime.rst:2491 +#: library/datetime.rst:2513 msgid "" "In version 3.2, :meth:`strftime` method was restricted to years >= 1000." msgstr "" "En version 3.2, la méthode :meth:`strftime` était limitée aux années >= 1000." -#: library/datetime.rst:2496 +#: library/datetime.rst:2518 msgid "" "When used with the :meth:`strptime` method, the ``%p`` directive only " "affects the output hour field if the ``%I`` directive is used to parse the " @@ -3980,7 +3984,7 @@ msgstr "" "n'affecte l'heure extraite que si la directive ``%I`` est utilisée pour " "analyser l'heure." -#: library/datetime.rst:2500 +#: library/datetime.rst:2522 msgid "" "Unlike the :mod:`time` module, the :mod:`datetime` module does not support " "leap seconds." @@ -3988,7 +3992,7 @@ msgstr "" "À l'inverse du module :mod:`time`, le module :mod:`datetime` ne gère pas les " "secondes intercalaires." -#: library/datetime.rst:2504 +#: library/datetime.rst:2526 #, fuzzy msgid "" "When used with the :meth:`strptime` method, the ``%f`` directive accepts " @@ -3996,13 +4000,13 @@ msgid "" "the set of format characters in the C standard (but implemented separately " "in datetime objects, and therefore always available)." msgstr "" -"Quand utilisée avec la méthode :meth:`strptime`, la directive ``%f`` accepte " -"un nombre de 1 à 6 chiffres, où des zéros seront ajoutés à droite jusqu'à " -"former un nombre de 6 chiffres. ``%f`` est une extension de l'ensemble des " -"caractères de formatage du standard C (mais implémentée séparément dans les " -"objets *datetime*, la rendant ainsi toujours disponible)." +"Quand elle est utilisée avec la méthode :meth:`strptime`, la directive ``" +"%f`` accepte un nombre de 1 à 6 chiffres, où des zéros seront ajoutés à " +"droite. ``%f`` est une extension de l'ensemble des caractères de formatage " +"du standard C (mais implémentée séparément dans les objets *datetime*, la " +"rendant ainsi toujours disponible)." -#: library/datetime.rst:2511 +#: library/datetime.rst:2533 msgid "" "For a naive object, the ``%z`` and ``%Z`` format codes are replaced by empty " "strings." @@ -4010,11 +4014,11 @@ msgstr "" "Pour les objets naïfs, les codes de formatage ``%z`` et ``%Z`` sont " "remplacés par des chaînes vides." -#: library/datetime.rst:2514 +#: library/datetime.rst:2536 msgid "For an aware object:" msgstr "Pour un objet avisé :" -#: library/datetime.rst:2517 +#: library/datetime.rst:2539 #, fuzzy msgid "" ":meth:`utcoffset` is transformed into a string of the form ``±HHMM[SS[." @@ -4034,11 +4038,13 @@ msgstr "" "donnant le nombre de minutes du décalage UTC, où ``SS`` est une chaîne de " "deux chiffres donnant le nombre de secondes du décalage UTC et où ``ffffff`` " "est une chaîne de six chiffres donnant le nombre en micro-secondes du " -"décalage UTC. Par exemple, si :meth:`utcoffset` renvoie " -"``timedelta(hours=-3, minutes=-30)``, ``%z`` est remplacé par la chaîne " -"`'-0330'``." +"décalage UTC. La partie ``ffffff`` est omise lorsque le décalage est un " +"nombre entier de secondes et les parties ``ffffff`` et ``SS`` sont omises " +"lorsque le décalage est un nombre entier de minutes. Par exemple, si :meth:" +"`utcoffset` renvoie ``timedelta(hours=-3, minutes=-30)``, ``%z`` est " +"remplacé par la chaîne `'-0330'``." -#: library/datetime.rst:2531 +#: library/datetime.rst:2553 msgid "" "When the ``%z`` directive is provided to the :meth:`strptime` method, the " "UTC offsets can have a colon as a separator between hours, minutes and " @@ -4050,30 +4056,30 @@ msgstr "" "minutes et secondes. Par exemple, ``'+01:00:00'``, est analysé comme un " "décalage d'une heure. Par ailleurs, ``'Z'`` est identique à ``'+00:00'``." -#: library/datetime.rst:2539 +#: library/datetime.rst:2561 #, fuzzy msgid "" "In :meth:`strftime`, ``%Z`` is replaced by an empty string if :meth:`tzname` " "returns ``None``; otherwise ``%Z`` is replaced by the returned value, which " "must be a string." msgstr "" -"Si :meth:`tzname` renvoie ``None``, ``%Z`` est remplacé par une chaîne " -"vide. Autrement ``%Z`` est remplacé par la valeur renvoyée, qui doit être " -"une chaîne." +"Si :meth:`tzname` renvoie ``None``, ``%Z`` est remplacé par une chaîne vide " +"dans :meth:`strftime`. Autrement ``%Z`` est remplacé par la valeur renvoyée, " +"qui doit être une chaîne." -#: library/datetime.rst:2543 +#: library/datetime.rst:2565 msgid ":meth:`strptime` only accepts certain values for ``%Z``:" msgstr ":meth:`strptime` accepte seulement certaines valeurs pour ``%Z`` :" -#: library/datetime.rst:2545 +#: library/datetime.rst:2567 msgid "any value in ``time.tzname`` for your machine's locale" msgstr "toute valeur dans ``time.tzname`` pour votre machine locale" -#: library/datetime.rst:2546 +#: library/datetime.rst:2568 msgid "the hard-coded values ``UTC`` and ``GMT``" msgstr "les valeurs ``UTC`` et ``GMT`` codés en dur" -#: library/datetime.rst:2548 +#: library/datetime.rst:2570 msgid "" "So someone living in Japan may have ``JST``, ``UTC``, and ``GMT`` as valid " "values, but probably not ``EST``. It will raise ``ValueError`` for invalid " @@ -4083,7 +4089,7 @@ msgstr "" "``UTC`` et ``GMT``, mais probablement pas ``EST``. Les valeurs invalides " "lèvent ``ValueError``." -#: library/datetime.rst:2552 +#: library/datetime.rst:2574 #, fuzzy msgid "" "When the ``%z`` directive is provided to the :meth:`strptime` method, an " @@ -4091,10 +4097,10 @@ msgid "" "result will be set to a :class:`timezone` instance." msgstr "" "Quand la directive ``%z`` est fournie à la méthode :meth:`strptime`, un " -"objet :class:`.datetime` avisé est construit. L'attribut ``tzinfo`` du " +"objet :class:`.datetime` avisé est construit. L'attribut ``tzinfo`` du " "résultat aura pour valeur une instance de :class:`timezone`." -#: library/datetime.rst:2558 +#: library/datetime.rst:2580 msgid "" "When used with the :meth:`strptime` method, ``%U`` and ``%W`` are only used " "in calculations when the day of the week and the calendar year (``%Y``) are " @@ -4104,7 +4110,7 @@ msgstr "" "et ``%W`` ne sont utilisées dans les calculs que si le jour de la semaine et " "l'année calendaire (``%Y``) sont spécifiés." -#: library/datetime.rst:2563 +#: library/datetime.rst:2585 msgid "" "Similar to ``%U`` and ``%W``, ``%V`` is only used in calculations when the " "day of the week and the ISO year (``%G``) are specified in a :meth:" @@ -4113,29 +4119,29 @@ msgid "" msgstr "" "De façon similaire à ``%U`` et ``%W``, ``%v`` n'est utilisé dans les calculs " "que lorsque le jour de la semaine et l'année ISO (``%G``) sont spécifiés " -"dans la chaîne de formatage :meth:`strptime`. Notez aussi que ``%G`` et ``" -"%Y`` ne sont pas interchangeables." +"dans la chaîne de formatage :meth:`strptime`. Notez aussi que ``%G`` et " +"``%Y`` ne sont pas interchangeables." -#: library/datetime.rst:2569 +#: library/datetime.rst:2591 msgid "" "When used with the :meth:`strptime` method, the leading zero is optional " "for formats ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, ``%J``, ``%U``, " "``%W``, and ``%V``. Format ``%y`` does require a leading zero." msgstr "" "Quand cette directive est utilisée avec la méthode :meth:`strptime`, le zéro " -"d'entête est optionnel pour les formats ``%d``, ``%m``, ``%H``, ``%I``, ``" -"%M``, ``%S``, ``%J``, ``%U``, ``%W`` et ``%V``. Le format ``%y`` requiert un " -"zéro en entête." +"d'entête est optionnel pour les formats ``%d``, ``%m``, ``%H``, ``%I``, " +"``%M``, ``%S``, ``%J``, ``%U``, ``%W`` et ``%V``. Le format ``%y`` requiert " +"un zéro en entête." -#: library/datetime.rst:2574 +#: library/datetime.rst:2596 msgid "Footnotes" msgstr "Notes" -#: library/datetime.rst:2575 +#: library/datetime.rst:2597 msgid "If, that is, we ignore the effects of Relativity" msgstr "Si on ignore les effets de la Relativité" -#: library/datetime.rst:2577 +#: library/datetime.rst:2599 #, fuzzy msgid "" "This matches the definition of the \"proleptic Gregorian\" calendar in " @@ -4144,16 +4150,12 @@ msgid "" "converting between proleptic Gregorian ordinals and many other calendar " "systems." msgstr "" -"Un objet :class:`date` représente une date (année, mois et jour) dans un " -"calendrier idéal, l'actuel calendrier grégorien étendu indéfiniment dans les " -"deux directions. Le 1er janvier de l'an 1 est appelé le jour numéro 1, le 2 " -"janvier de l'an 1 est appelé le jour numéro 2, et ainsi de suite. Cela " -"correspond à la définition du calendrier « grégorien proleptique » dans le " -"livre *Calendrical Calculations* de Dershowitz et Reingold, où il est la " -"base de tous les calculs. Référez-vous au livre pour les algorithmes de " +"Cela correspond à la définition du calendrier « grégorien proleptique » dans " +"le livre *Calendrical Calculations* de Dershowitz et Reingold, où il est la " +"base de tous les calculs. Référez-vous au livre pour les algorithmes de " "conversion entre calendriers grégorien proleptique et les autres systèmes." -#: library/datetime.rst:2583 +#: library/datetime.rst:2605 msgid "" "See R. H. van Gent's `guide to the mathematics of the ISO 8601 calendar " "`_ for a " @@ -4163,7 +4165,7 @@ msgstr "" "www.staff.science.uu.nl/~gent0113/calendar/isocalendar.htm>`_ pour une bonne " "explication." -#: library/datetime.rst:2587 +#: library/datetime.rst:2609 msgid "" "Passing ``datetime.strptime('Feb 29', '%b %d')`` will fail since ``1900`` is " "not a leap year." @@ -4171,6 +4173,58 @@ msgstr "" "Passer ``datetime.strptime(‘Feb 29’, ‘%b %d’)`` ne marchera pas car ``1900`` " "n’est pas une année bissextile." +#~ msgid "This is the inverse of :meth:`date.fromisoformat`." +#~ msgstr "C'est la réciproque de :meth:`date.fromisoformat`." + +#~ msgid "Specifically, this function supports strings in the format:" +#~ msgstr "" +#~ "Plus précisément, cette fonction prend en charge les chaînes de " +#~ "caractères dans le format :" + +#~ msgid "" +#~ "This does *not* support parsing arbitrary ISO 8601 strings - it is only " +#~ "intended as the inverse operation of :meth:`datetime.isoformat`. A more " +#~ "full-featured ISO 8601 parser, ``dateutil.parser.isoparse`` is available " +#~ "in the third-party package `dateutil `__." +#~ msgstr "" +#~ "Ceci ne prend pas en charge l'analyse arbitraire des chaînes de " +#~ "caractères ISO 8601 - il est uniquement destiné à l'opération réciproque " +#~ "de :meth:`datetime.isoformat`. Un analyseur ISO 8601 plus complet, " +#~ "``dateutil.parser.isoparse`` est disponible dans le paquet tiers " +#~ "`dateutil `__." + +#, fuzzy +#~ msgid "" +#~ "Return a :class:`.time` corresponding to a *time_string* in one of the " +#~ "formats emitted by :meth:`time.isoformat`. Specifically, this function " +#~ "supports strings in the format:" +#~ msgstr "" +#~ "Renvoie une :class:`date` correspondant à *date_string* dans le format " +#~ "émis par :meth:`date.isoformat`. Spécifiquement, cette fonction gère des " +#~ "chaînes dans le(s) format(s) ``YYYY-MM-DD``." + +#, fuzzy +#~ msgid "" +#~ "This does *not* support parsing arbitrary ISO 8601 strings. It is only " +#~ "intended as the inverse operation of :meth:`time.isoformat`." +#~ msgstr "" +#~ "Ceci ne gère pas l'analyse arbitraire de chaînes ISO 8601, ceci est " +#~ "seulement destiné à l'opération inverse de :meth:`time.isoformat`." + +#~ msgid "" +#~ "Week number of the year (Monday as the first day of the week) as a " +#~ "decimal number. All days in a new year preceding the first Monday are " +#~ "considered to be in week 0." +#~ msgstr "" +#~ "Numéro de la semaine à deux chiffres (où lundi est considéré comme le " +#~ "premier jour de la semaine). Tous les jours de l'année précédent le " +#~ "premier lundi sont considérés comme appartenant à la semaine 0." + +#~ msgid "`dateutil.tz `_" +#~ msgstr "`dateutil.tz `_" + #~ msgid "Return a 3-tuple, (ISO year, ISO week number, ISO weekday)." #~ msgstr "" #~ "Renvoie un *n*-uplet de 3 éléments, (année ISO, numéro de semaine ISO, " diff --git a/library/dbm.po b/library/dbm.po index eaacdea199..4c2179827a 100644 --- a/library/dbm.po +++ b/library/dbm.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -54,69 +54,73 @@ msgid "" "name, such as ``'dbm.ndbm'`` or ``'dbm.gnu'``." msgstr "" -#: library/dbm.rst:39 -msgid "Open the database file *file* and return a corresponding object." +#: library/dbm.rst:210 library/dbm.rst:393 +msgid "Accepts :term:`path-like object` for filename." msgstr "" #: library/dbm.rst:41 +msgid "Open the database file *file* and return a corresponding object." +msgstr "" + +#: library/dbm.rst:43 msgid "" "If the database file already exists, the :func:`whichdb` function is used to " "determine its type and the appropriate module is used; if it does not exist, " "the first module listed above that can be imported is used." msgstr "" -#: library/dbm.rst:161 library/dbm.rst:346 +#: library/dbm.rst:166 library/dbm.rst:357 msgid "The optional *flag* argument can be:" msgstr "" -#: library/dbm.rst:164 library/dbm.rst:279 library/dbm.rst:349 +#: library/dbm.rst:169 library/dbm.rst:287 library/dbm.rst:360 msgid "Value" msgstr "Valeur" -#: library/dbm.rst:164 library/dbm.rst:279 library/dbm.rst:349 +#: library/dbm.rst:169 library/dbm.rst:287 library/dbm.rst:360 msgid "Meaning" msgstr "Signification" -#: library/dbm.rst:166 library/dbm.rst:351 +#: library/dbm.rst:171 library/dbm.rst:362 msgid "``'r'``" msgstr "``'r'``" -#: library/dbm.rst:166 library/dbm.rst:351 +#: library/dbm.rst:171 library/dbm.rst:362 msgid "Open existing database for reading only (default)" msgstr "" -#: library/dbm.rst:169 library/dbm.rst:354 +#: library/dbm.rst:174 library/dbm.rst:365 msgid "``'w'``" msgstr "``'w'``" -#: library/dbm.rst:169 library/dbm.rst:354 +#: library/dbm.rst:174 library/dbm.rst:365 msgid "Open existing database for reading and writing" msgstr "" -#: library/dbm.rst:172 library/dbm.rst:357 +#: library/dbm.rst:177 library/dbm.rst:368 msgid "``'c'``" msgstr "``'c'``" -#: library/dbm.rst:172 library/dbm.rst:357 +#: library/dbm.rst:177 library/dbm.rst:368 msgid "Open database for reading and writing, creating it if it doesn't exist" msgstr "" -#: library/dbm.rst:175 library/dbm.rst:360 +#: library/dbm.rst:180 library/dbm.rst:371 msgid "``'n'``" msgstr "``'n'``" -#: library/dbm.rst:175 library/dbm.rst:360 +#: library/dbm.rst:180 library/dbm.rst:371 msgid "Always create a new, empty database, open for reading and writing" msgstr "" -#: library/dbm.rst:294 library/dbm.rst:364 +#: library/dbm.rst:302 library/dbm.rst:375 msgid "" "The optional *mode* argument is the Unix mode of the file, used only when " "the database has to be created. It defaults to octal ``0o666`` (and will be " "modified by the prevailing umask)." msgstr "" -#: library/dbm.rst:68 +#: library/dbm.rst:70 msgid "" "The object returned by :func:`.open` supports the same basic functionality " "as dictionaries; keys and their corresponding values can be stored, " @@ -124,64 +128,68 @@ msgid "" "method are available, as well as :meth:`get` and :meth:`setdefault`." msgstr "" -#: library/dbm.rst:73 +#: library/dbm.rst:75 msgid "" ":meth:`get` and :meth:`setdefault` are now available in all database modules." msgstr "" -#: library/dbm.rst:76 +#: library/dbm.rst:78 msgid "" "Deleting a key from a read-only database raises database module specific " "error instead of :exc:`KeyError`." msgstr "" -#: library/dbm.rst:80 +#: library/dbm.rst:82 +msgid "Accepts :term:`path-like object` for file." +msgstr "" + +#: library/dbm.rst:85 msgid "" "Key and values are always stored as bytes. This means that when strings are " "used they are implicitly converted to the default encoding before being " "stored." msgstr "" -#: library/dbm.rst:84 +#: library/dbm.rst:89 msgid "" "These objects also support being used in a :keyword:`with` statement, which " "will automatically close them when done." msgstr "" -#: library/dbm.rst:87 +#: library/dbm.rst:92 msgid "" "Added native support for the context management protocol to the objects " "returned by :func:`.open`." msgstr "" -#: library/dbm.rst:91 +#: library/dbm.rst:96 msgid "" "The following example records some hostnames and a corresponding title, and " "then prints out the contents of the database::" msgstr "" -#: library/dbm.rst:121 +#: library/dbm.rst:126 msgid "Module :mod:`shelve`" msgstr "" -#: library/dbm.rst:122 +#: library/dbm.rst:127 msgid "Persistence module which stores non-string data." msgstr "" -#: library/dbm.rst:125 +#: library/dbm.rst:130 msgid "The individual submodules are described in the following sections." msgstr "" -#: library/dbm.rst:129 +#: library/dbm.rst:134 msgid ":mod:`dbm.gnu` --- GNU's reinterpretation of dbm" msgstr "" -#: library/dbm.rst:135 +#: library/dbm.rst:140 #, fuzzy msgid "**Source code:** :source:`Lib/dbm/gnu.py`" msgstr "**Code source :** :source:`Lib/bdb.py`" -#: library/dbm.rst:139 +#: library/dbm.rst:144 msgid "" "This module is quite similar to the :mod:`dbm` module, but uses the GNU " "library ``gdbm`` instead to provide some additional functionality. Please " @@ -189,7 +197,7 @@ msgid "" "incompatible." msgstr "" -#: library/dbm.rst:143 +#: library/dbm.rst:148 msgid "" "The :mod:`dbm.gnu` module provides an interface to the GNU DBM library. " "``dbm.gnu.gdbm`` objects behave like mappings (dictionaries), except that " @@ -198,73 +206,73 @@ msgid "" "and :meth:`values` methods are not supported." msgstr "" -#: library/dbm.rst:152 +#: library/dbm.rst:157 msgid "" "Raised on :mod:`dbm.gnu`-specific errors, such as I/O errors. :exc:" "`KeyError` is raised for general mapping errors like specifying an incorrect " "key." msgstr "" -#: library/dbm.rst:158 +#: library/dbm.rst:163 msgid "" "Open a ``gdbm`` database and return a :class:`gdbm` object. The *filename* " "argument is the name of the database file." msgstr "" -#: library/dbm.rst:179 +#: library/dbm.rst:184 msgid "" "The following additional characters may be appended to the flag to control " "how the database is opened:" msgstr "" -#: library/dbm.rst:185 +#: library/dbm.rst:190 msgid "``'f'``" msgstr "``'f'``" -#: library/dbm.rst:185 +#: library/dbm.rst:190 msgid "" "Open the database in fast mode. Writes to the database will not be " "synchronized." msgstr "" -#: library/dbm.rst:188 +#: library/dbm.rst:193 msgid "``'s'``" msgstr "``'s'``" -#: library/dbm.rst:188 +#: library/dbm.rst:193 msgid "" "Synchronized mode. This will cause changes to the database to be immediately " "written to the file." msgstr "" -#: library/dbm.rst:192 +#: library/dbm.rst:197 msgid "``'u'``" msgstr "``'u'``" -#: library/dbm.rst:192 +#: library/dbm.rst:197 msgid "Do not lock database." msgstr "" -#: library/dbm.rst:195 +#: library/dbm.rst:200 msgid "" "Not all flags are valid for all versions of ``gdbm``. The module constant :" "const:`open_flags` is a string of supported flag characters. The exception :" "exc:`error` is raised if an invalid flag is specified." msgstr "" -#: library/dbm.rst:199 +#: library/dbm.rst:204 msgid "" "The optional *mode* argument is the Unix mode of the file, used only when " "the database has to be created. It defaults to octal ``0o666``." msgstr "" -#: library/dbm.rst:202 +#: library/dbm.rst:207 msgid "" "In addition to the dictionary-like methods, ``gdbm`` objects have the " "following methods:" msgstr "" -#: library/dbm.rst:207 +#: library/dbm.rst:215 msgid "" "It's possible to loop over every key in the database using this method and " "the :meth:`nextkey` method. The traversal is ordered by ``gdbm``'s internal " @@ -272,14 +280,14 @@ msgid "" "starting key." msgstr "" -#: library/dbm.rst:214 +#: library/dbm.rst:222 msgid "" "Returns the key that follows *key* in the traversal. The following code " "prints every key in the database ``db``, without having to create a list in " "memory that contains them all::" msgstr "" -#: library/dbm.rst:225 +#: library/dbm.rst:233 msgid "" "If you have carried out a lot of deletions and would like to shrink the " "space used by the ``gdbm`` file, this routine will reorganize the database. " @@ -288,26 +296,26 @@ msgid "" "reused as new (key, value) pairs are added." msgstr "" -#: library/dbm.rst:233 +#: library/dbm.rst:241 msgid "" "When the database has been opened in fast mode, this method forces any " "unwritten data to be written to the disk." msgstr "" -#: library/dbm.rst:238 +#: library/dbm.rst:246 msgid "Close the ``gdbm`` database." msgstr "" -#: library/dbm.rst:241 +#: library/dbm.rst:249 msgid ":mod:`dbm.ndbm` --- Interface based on ndbm" msgstr "" -#: library/dbm.rst:247 +#: library/dbm.rst:255 #, fuzzy msgid "**Source code:** :source:`Lib/dbm/ndbm.py`" msgstr "**Code source :** :source:`Lib/bdb.py`" -#: library/dbm.rst:251 +#: library/dbm.rst:259 msgid "" "The :mod:`dbm.ndbm` module provides an interface to the Unix \"(n)dbm\" " "library. Dbm objects behave like mappings (dictionaries), except that keys " @@ -316,7 +324,7 @@ msgid "" "are not supported." msgstr "" -#: library/dbm.rst:256 +#: library/dbm.rst:264 msgid "" "This module can be used with the \"classic\" ndbm interface or the GNU GDBM " "compatibility interface. On Unix, the :program:`configure` script will " @@ -324,48 +332,48 @@ msgid "" "module." msgstr "" -#: library/dbm.rst:262 +#: library/dbm.rst:270 msgid "" "Raised on :mod:`dbm.ndbm`-specific errors, such as I/O errors. :exc:" "`KeyError` is raised for general mapping errors like specifying an incorrect " "key." msgstr "" -#: library/dbm.rst:268 +#: library/dbm.rst:276 msgid "Name of the ``ndbm`` implementation library used." msgstr "" -#: library/dbm.rst:273 +#: library/dbm.rst:281 msgid "" "Open a dbm database and return a ``ndbm`` object. The *filename* argument " "is the name of the database file (without the :file:`.dir` or :file:`.pag` " "extensions)." msgstr "" -#: library/dbm.rst:276 +#: library/dbm.rst:284 msgid "The optional *flag* argument must be one of these values:" msgstr "" -#: library/dbm.rst:298 +#: library/dbm.rst:306 msgid "" "In addition to the dictionary-like methods, ``ndbm`` objects provide the " "following method:" msgstr "" -#: library/dbm.rst:303 +#: library/dbm.rst:314 msgid "Close the ``ndbm`` database." msgstr "" -#: library/dbm.rst:307 +#: library/dbm.rst:318 msgid ":mod:`dbm.dumb` --- Portable DBM implementation" msgstr "" -#: library/dbm.rst:312 +#: library/dbm.rst:323 #, fuzzy msgid "**Source code:** :source:`Lib/dbm/dumb.py`" msgstr "**Code source :** :source:`Lib/bdb.py`" -#: library/dbm.rst:318 +#: library/dbm.rst:329 msgid "" "The :mod:`dbm.dumb` module is intended as a last resort fallback for the :" "mod:`dbm` module when a more robust module is not available. The :mod:`dbm." @@ -373,7 +381,7 @@ msgid "" "the other database modules." msgstr "" -#: library/dbm.rst:325 +#: library/dbm.rst:336 msgid "" "The :mod:`dbm.dumb` module provides a persistent dictionary-like interface " "which is written entirely in Python. Unlike other modules such as :mod:`dbm." @@ -381,18 +389,18 @@ msgid "" "the keys and values are always stored as bytes." msgstr "" -#: library/dbm.rst:330 +#: library/dbm.rst:341 msgid "The module defines the following:" msgstr "Le module définit :" -#: library/dbm.rst:335 +#: library/dbm.rst:346 msgid "" "Raised on :mod:`dbm.dumb`-specific errors, such as I/O errors. :exc:" "`KeyError` is raised for general mapping errors like specifying an incorrect " "key." msgstr "" -#: library/dbm.rst:341 +#: library/dbm.rst:352 msgid "" "Open a ``dumbdbm`` database and return a dumbdbm object. The *filename* " "argument is the basename of the database file (without any specific " @@ -400,7 +408,7 @@ msgid "" "and :file:`.dir` extensions are created." msgstr "" -#: library/dbm.rst:369 +#: library/dbm.rst:380 #, fuzzy msgid "" "It is possible to crash the Python interpreter when loading a database with " @@ -411,31 +419,31 @@ msgstr "" "suffisamment grandes ou complexes lors de la compilation d'un objet AST dû à " "la limitation de la profondeur de la pile d'appels." -#: library/dbm.rst:373 +#: library/dbm.rst:384 msgid "" ":func:`.open` always creates a new database when the flag has the value " "``'n'``." msgstr "" -#: library/dbm.rst:377 +#: library/dbm.rst:388 msgid "" "A database opened with flags ``'r'`` is now read-only. Opening with flags " "``'r'`` and ``'w'`` no longer creates a database if it does not exist." msgstr "" -#: library/dbm.rst:382 +#: library/dbm.rst:396 msgid "" "In addition to the methods provided by the :class:`collections.abc." "MutableMapping` class, :class:`dumbdbm` objects provide the following " "methods:" msgstr "" -#: library/dbm.rst:388 +#: library/dbm.rst:402 msgid "" "Synchronize the on-disk directory and data files. This method is called by " "the :meth:`Shelve.sync` method." msgstr "" -#: library/dbm.rst:393 +#: library/dbm.rst:407 msgid "Close the ``dumbdbm`` database." msgstr "" diff --git a/library/decimal.po b/library/decimal.po index 2dc929a750..a296b00a92 100644 --- a/library/decimal.po +++ b/library/decimal.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2018-10-07 18:55+0200\n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 15:52+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.11\n" +"X-Generator: Poedit 2.4.1\n" #: library/decimal.rst:2 msgid ":mod:`decimal` --- Decimal fixed point and floating point arithmetic" @@ -459,7 +459,7 @@ msgstr "" #: library/decimal.rst:392 msgid "Once constructed, :class:`Decimal` objects are immutable." -msgstr "Une fois construit, les objets :class:`Decimal` sont immuables." +msgstr "Une fois construit, les objets :class:`Decimal` sont immuables." #: library/decimal.rst:394 msgid "" @@ -543,7 +543,7 @@ msgid "" msgstr "" "Les objets ``Decimal`` ne peuvent généralement pas être combinés avec des " "``float`` ou des objets :class:`fractions.Fraction` lors d'opérations " -"arithmétiques : tout addition entre un :class:`Decimal` avec un :class:" +"arithmétiques : tout addition entre un :class:`Decimal` avec un :class:" "`float`, par exemple, lève une exception :exc:`TypeError`. Cependant, il est " "possible d'utiliser les opérateurs de comparaison entre instances de :class:" "`Decimal` avec les autres types numériques. Cela évite d'avoir des résultats " @@ -631,7 +631,7 @@ msgid "" "details of the total order." msgstr "" -#: library/decimal.rst:531 library/decimal.rst:834 +#: library/decimal.rst:531 library/decimal.rst:835 msgid "" "This operation is unaffected by context and is quiet: no flags are changed " "and no rounding is performed. As an exception, the C version may raise " @@ -678,10 +678,12 @@ msgid "" msgstr "" #: library/decimal.rst:576 -msgid "Classmethod that converts a float to a decimal number, exactly." +msgid "" +"Alternative constructor that only accepts instances of :class:`float` or :" +"class:`int`." msgstr "" -#: library/decimal.rst:578 +#: library/decimal.rst:579 msgid "" "Note `Decimal.from_float(0.1)` is not the same as `Decimal('0.1')`. Since " "0.1 is not exactly representable in binary floating point, the value is " @@ -690,92 +692,113 @@ msgid "" "`0.1000000000000000055511151231257827021181583404541015625`." msgstr "" -#: library/decimal.rst:584 +#: library/decimal.rst:585 msgid "" "From Python 3.2 onwards, a :class:`Decimal` instance can also be constructed " "directly from a :class:`float`." msgstr "" -#: library/decimal.rst:602 +#: library/decimal.rst:603 msgid "" "Fused multiply-add. Return self*other+third with no rounding of the " "intermediate product self*other." msgstr "" -#: library/decimal.rst:610 +#: library/decimal.rst:611 msgid "" "Return :const:`True` if the argument is canonical and :const:`False` " "otherwise. Currently, a :class:`Decimal` instance is always canonical, so " "this operation always returns :const:`True`." msgstr "" +"Renvoie :const:`True` si l'argument est sous forme canonique et :const:" +"`False` sinon. Actuellement, une instance :class:`Decimal` est toujours " +"canonique, donc cette opération renvoie toujours :const:`True`." -#: library/decimal.rst:616 +#: library/decimal.rst:617 msgid "" "Return :const:`True` if the argument is a finite number, and :const:`False` " "if the argument is an infinity or a NaN." msgstr "" +"Renvoie :const:`True` si l'argument est un nombre fini et :const:`False` si " +"l'argument est un infini ou NaN." -#: library/decimal.rst:621 +#: library/decimal.rst:622 msgid "" "Return :const:`True` if the argument is either positive or negative infinity " "and :const:`False` otherwise." msgstr "" +"Renvoie :const:`True` si l'argument est un infini positif ou négatif et :" +"const:`False` sinon." -#: library/decimal.rst:626 +#: library/decimal.rst:627 msgid "" "Return :const:`True` if the argument is a (quiet or signaling) NaN and :" "const:`False` otherwise." msgstr "" +"Renvoie :const:`True` si l'argument est un NaN (signalétique ou " +"silencieux) et :const:`False` sinon." -#: library/decimal.rst:631 +#: library/decimal.rst:632 msgid "" "Return :const:`True` if the argument is a *normal* finite number. Return :" "const:`False` if the argument is zero, subnormal, infinite or a NaN." msgstr "" -#: library/decimal.rst:636 +#: library/decimal.rst:637 msgid "" "Return :const:`True` if the argument is a quiet NaN, and :const:`False` " "otherwise." msgstr "" +"Renvoie :const:`True` si l'argument est un NaN silencieux et :const:`False` " +"sinon." -#: library/decimal.rst:641 +#: library/decimal.rst:642 msgid "" "Return :const:`True` if the argument has a negative sign and :const:`False` " "otherwise. Note that zeros and NaNs can both carry signs." msgstr "" +"Renvoie :const:`True` si l'argument est négatif et :const:`False` sinon. " +"Notez que les zéros et les NaNs peuvent être signés." -#: library/decimal.rst:646 +#: library/decimal.rst:647 msgid "" "Return :const:`True` if the argument is a signaling NaN and :const:`False` " "otherwise." msgstr "" +"Renvoie :const:`True` si l'argument est un NaN signalétique et :const:" +"`False` sinon." -#: library/decimal.rst:651 +#: library/decimal.rst:652 msgid "" "Return :const:`True` if the argument is subnormal, and :const:`False` " "otherwise." msgstr "" -#: library/decimal.rst:656 +#: library/decimal.rst:657 msgid "" "Return :const:`True` if the argument is a (positive or negative) zero and :" "const:`False` otherwise." msgstr "" +"Renvoie :const:`True` si l'argument est un zéro (positif ou négatif) et :" +"const:`False` sinon." -#: library/decimal.rst:661 +#: library/decimal.rst:662 msgid "" "Return the natural (base e) logarithm of the operand. The result is " "correctly rounded using the :const:`ROUND_HALF_EVEN` rounding mode." msgstr "" +"Renvoie le logarithme naturel (base e) de l'opérande. Le résultat est " +"arrondi avec le mode :const:`ROUND_HALF_EVEN`." -#: library/decimal.rst:666 +#: library/decimal.rst:667 msgid "" "Return the base ten logarithm of the operand. The result is correctly " "rounded using the :const:`ROUND_HALF_EVEN` rounding mode." msgstr "" +"Renvoie le logarithme en base 10 de l'opérande. Le résultat est arrondi avec " +"le mode :const:`ROUND_HALF_EVEN`." -#: library/decimal.rst:671 +#: library/decimal.rst:672 msgid "" "For a nonzero number, return the adjusted exponent of its operand as a :" "class:`Decimal` instance. If the operand is a zero then ``Decimal('-" @@ -783,74 +806,74 @@ msgid "" "the operand is an infinity then ``Decimal('Infinity')`` is returned." msgstr "" -#: library/decimal.rst:679 +#: library/decimal.rst:680 msgid "" ":meth:`logical_and` is a logical operation which takes two *logical " "operands* (see :ref:`logical_operands_label`). The result is the digit-wise " "``and`` of the two operands." msgstr "" -#: library/decimal.rst:685 +#: library/decimal.rst:686 msgid "" ":meth:`logical_invert` is a logical operation. The result is the digit-wise " "inversion of the operand." msgstr "" -#: library/decimal.rst:690 +#: library/decimal.rst:691 msgid "" ":meth:`logical_or` is a logical operation which takes two *logical operands* " "(see :ref:`logical_operands_label`). The result is the digit-wise ``or`` of " "the two operands." msgstr "" -#: library/decimal.rst:696 +#: library/decimal.rst:697 msgid "" ":meth:`logical_xor` is a logical operation which takes two *logical " "operands* (see :ref:`logical_operands_label`). The result is the digit-wise " "exclusive or of the two operands." msgstr "" -#: library/decimal.rst:702 +#: library/decimal.rst:703 msgid "" "Like ``max(self, other)`` except that the context rounding rule is applied " "before returning and that :const:`NaN` values are either signaled or ignored " "(depending on the context and whether they are signaling or quiet)." msgstr "" -#: library/decimal.rst:709 +#: library/decimal.rst:710 msgid "" "Similar to the :meth:`.max` method, but the comparison is done using the " "absolute values of the operands." msgstr "" -#: library/decimal.rst:714 +#: library/decimal.rst:715 msgid "" "Like ``min(self, other)`` except that the context rounding rule is applied " "before returning and that :const:`NaN` values are either signaled or ignored " "(depending on the context and whether they are signaling or quiet)." msgstr "" -#: library/decimal.rst:721 +#: library/decimal.rst:722 msgid "" "Similar to the :meth:`.min` method, but the comparison is done using the " "absolute values of the operands." msgstr "" -#: library/decimal.rst:726 +#: library/decimal.rst:727 msgid "" "Return the largest number representable in the given context (or in the " "current thread's context if no context is given) that is smaller than the " "given operand." msgstr "" -#: library/decimal.rst:732 +#: library/decimal.rst:733 msgid "" "Return the smallest number representable in the given context (or in the " "current thread's context if no context is given) that is larger than the " "given operand." msgstr "" -#: library/decimal.rst:738 +#: library/decimal.rst:739 msgid "" "If the two operands are unequal, return the number closest to the first " "operand in the direction of the second operand. If both operands are " @@ -858,7 +881,7 @@ msgid "" "be the same as the sign of the second operand." msgstr "" -#: library/decimal.rst:745 +#: library/decimal.rst:746 msgid "" "Normalize the number by stripping the rightmost trailing zeros and " "converting any result equal to :const:`Decimal('0')` to :const:" @@ -868,63 +891,72 @@ msgid "" "``Decimal('32.1')``." msgstr "" -#: library/decimal.rst:754 +#: library/decimal.rst:755 msgid "" "Return a string describing the *class* of the operand. The returned value " "is one of the following ten strings." msgstr "" -#: library/decimal.rst:757 +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:758 msgid "``\"-Infinity\"``, indicating that the operand is negative infinity." -msgstr "" +msgstr "``\"-Infinity\"``, indiquant que l'opérande est l'infini négatif ;" -#: library/decimal.rst:758 +#: library/decimal.rst:759 msgid "" "``\"-Normal\"``, indicating that the operand is a negative normal number." msgstr "" -#: library/decimal.rst:759 +#: library/decimal.rst:760 msgid "" "``\"-Subnormal\"``, indicating that the operand is negative and subnormal." msgstr "" -#: library/decimal.rst:760 +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:761 msgid "``\"-Zero\"``, indicating that the operand is a negative zero." -msgstr "" +msgstr "``\"-Zero\"``, indiquant que l'opérande est un zéro négatif ;" -#: library/decimal.rst:761 +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:762 msgid "``\"+Zero\"``, indicating that the operand is a positive zero." -msgstr "" +msgstr "``\"+Zero\"``, indiquant que l'opérande est un zéro positif ;" -#: library/decimal.rst:762 +#: library/decimal.rst:763 msgid "" "``\"+Subnormal\"``, indicating that the operand is positive and subnormal." msgstr "" -#: library/decimal.rst:763 +#: library/decimal.rst:764 msgid "" "``\"+Normal\"``, indicating that the operand is a positive normal number." msgstr "" -#: library/decimal.rst:764 +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:765 msgid "``\"+Infinity\"``, indicating that the operand is positive infinity." -msgstr "" +msgstr "``\"+Infinity\"``, indiquant que l'opérande est l'infini positif ;" -#: library/decimal.rst:765 +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:766 msgid "``\"NaN\"``, indicating that the operand is a quiet NaN (Not a Number)." msgstr "" +"``\"NaN\"``, indiquant que l'opérande est un NaN (*Not a Number*, pas un " +"nombre) silencieux ;" -#: library/decimal.rst:766 +#: library/decimal.rst:767 msgid "``\"sNaN\"``, indicating that the operand is a signaling NaN." msgstr "" +"``\"sNaN\"``, indiquant que l'opérande est un NaN (*Not a Number*, pas un " +"nombre) signalétique." -#: library/decimal.rst:770 +#: library/decimal.rst:771 msgid "" "Return a value equal to the first operand after rounding and having the " "exponent of the second operand." msgstr "" -#: library/decimal.rst:776 +#: library/decimal.rst:777 msgid "" "Unlike other operations, if the length of the coefficient after the quantize " "operation would be greater than precision, then an :const:`InvalidOperation` " @@ -932,13 +964,13 @@ msgid "" "quantized exponent is always equal to that of the right-hand operand." msgstr "" -#: library/decimal.rst:782 +#: library/decimal.rst:783 msgid "" "Also unlike other operations, quantize never signals Underflow, even if the " "result is subnormal and inexact." msgstr "" -#: library/decimal.rst:785 +#: library/decimal.rst:786 msgid "" "If the exponent of the second operand is larger than that of the first then " "rounding may be necessary. In this case, the rounding mode is determined by " @@ -947,19 +979,19 @@ msgid "" "context is used." msgstr "" -#: library/decimal.rst:791 +#: library/decimal.rst:792 msgid "" "An error is returned whenever the resulting exponent is greater than :attr:" "`Emax` or less than :attr:`Etiny`." msgstr "" -#: library/decimal.rst:796 +#: library/decimal.rst:797 msgid "" "Return ``Decimal(10)``, the radix (base) in which the :class:`Decimal` class " "does all its arithmetic. Included for compatibility with the specification." msgstr "" -#: library/decimal.rst:802 +#: library/decimal.rst:803 msgid "" "Return the remainder from dividing *self* by *other*. This differs from " "``self % other`` in that the sign of the remainder is chosen so as to " @@ -968,11 +1000,11 @@ msgid "" "other``, and if two integers are equally near then the even one is chosen." msgstr "" -#: library/decimal.rst:809 +#: library/decimal.rst:810 msgid "If the result is zero then its sign will be the sign of *self*." msgstr "" -#: library/decimal.rst:820 +#: library/decimal.rst:821 msgid "" "Return the result of rotating the digits of the first operand by an amount " "specified by the second operand. The second operand must be an integer in " @@ -984,20 +1016,20 @@ msgid "" "are unchanged." msgstr "" -#: library/decimal.rst:831 +#: library/decimal.rst:832 msgid "" "Test whether self and other have the same exponent or whether both are :" "const:`NaN`." msgstr "" -#: library/decimal.rst:840 +#: library/decimal.rst:841 msgid "" "Return the first operand with exponent adjusted by the second. Equivalently, " "return the first operand multiplied by ``10**other``. The second operand " "must be an integer." msgstr "" -#: library/decimal.rst:846 +#: library/decimal.rst:847 msgid "" "Return the result of shifting the digits of the first operand by an amount " "specified by the second operand. The second operand must be an integer in " @@ -1008,34 +1040,34 @@ msgid "" "exponent of the first operand are unchanged." msgstr "" -#: library/decimal.rst:856 +#: library/decimal.rst:857 msgid "Return the square root of the argument to full precision." msgstr "" -#: library/decimal.rst:1440 +#: library/decimal.rst:1457 msgid "" "Convert to a string, using engineering notation if an exponent is needed." msgstr "" -#: library/decimal.rst:1442 +#: library/decimal.rst:1459 msgid "" "Engineering notation has an exponent which is a multiple of 3. This can " "leave up to 3 digits to the left of the decimal place and may require the " "addition of either one or two trailing zeros." msgstr "" -#: library/decimal.rst:867 +#: library/decimal.rst:868 msgid "" "For example, this converts ``Decimal('123E+1')`` to ``Decimal('1.23E+3')``." msgstr "" -#: library/decimal.rst:871 +#: library/decimal.rst:872 msgid "" "Identical to the :meth:`to_integral_value` method. The ``to_integral`` name " "has been kept for compatibility with older versions." msgstr "" -#: library/decimal.rst:876 +#: library/decimal.rst:877 msgid "" "Round to the nearest integer, signaling :const:`Inexact` or :const:`Rounded` " "as appropriate if rounding occurs. The rounding mode is determined by the " @@ -1043,18 +1075,18 @@ msgid "" "parameter is given then the rounding mode of the current context is used." msgstr "" -#: library/decimal.rst:884 +#: library/decimal.rst:885 msgid "" "Round to the nearest integer without signaling :const:`Inexact` or :const:" "`Rounded`. If given, applies *rounding*; otherwise, uses the rounding " "method in either the supplied *context* or the current context." msgstr "" -#: library/decimal.rst:892 +#: library/decimal.rst:893 msgid "Logical operands" msgstr "" -#: library/decimal.rst:894 +#: library/decimal.rst:895 msgid "" "The :meth:`logical_and`, :meth:`logical_invert`, :meth:`logical_or`, and :" "meth:`logical_xor` methods expect their arguments to be *logical operands*. " @@ -1062,59 +1094,77 @@ msgid "" "are both zero, and whose digits are all either :const:`0` or :const:`1`." msgstr "" -#: library/decimal.rst:906 +#: library/decimal.rst:907 msgid "Context objects" msgstr "" -#: library/decimal.rst:908 +#: library/decimal.rst:909 msgid "" "Contexts are environments for arithmetic operations. They govern precision, " "set rules for rounding, determine which signals are treated as exceptions, " "and limit the range for exponents." msgstr "" -#: library/decimal.rst:912 +#: library/decimal.rst:913 msgid "" "Each thread has its own current context which is accessed or changed using " "the :func:`getcontext` and :func:`setcontext` functions:" msgstr "" -#: library/decimal.rst:918 +#: library/decimal.rst:919 msgid "Return the current context for the active thread." msgstr "" -#: library/decimal.rst:923 +#: library/decimal.rst:924 msgid "Set the current context for the active thread to *c*." msgstr "" -#: library/decimal.rst:925 +#: library/decimal.rst:926 msgid "" "You can also use the :keyword:`with` statement and the :func:`localcontext` " "function to temporarily change the active context." msgstr "" -#: library/decimal.rst:930 +#: library/decimal.rst:931 msgid "" "Return a context manager that will set the current context for the active " "thread to a copy of *ctx* on entry to the with-statement and restore the " "previous context when exiting the with-statement. If no context is " -"specified, a copy of the current context is used." +"specified, a copy of the current context is used. The *kwargs* argument is " +"used to set the attributes of the new context." msgstr "" -#: library/decimal.rst:935 +#: library/decimal.rst:937 msgid "" "For example, the following code sets the current decimal precision to 42 " "places, performs a calculation, and then automatically restores the previous " "context::" msgstr "" -#: library/decimal.rst:945 +#: library/decimal.rst:947 +msgid "Using keyword arguments, the code would be the following::" +msgstr "" + +#: library/decimal.rst:955 +msgid "" +"Raises :exc:`TypeError` if *kwargs* supplies an attribute that :class:" +"`Context` doesn't support. Raises either :exc:`TypeError` or :exc:" +"`ValueError` if *kwargs* supplies an invalid value for an attribute." +msgstr "" + +#: library/decimal.rst:959 +msgid "" +":meth:`localcontext` now supports setting context attributes through the use " +"of keyword arguments." +msgstr "" + +#: library/decimal.rst:962 msgid "" "New contexts can also be created using the :class:`Context` constructor " "described below. In addition, the module provides three pre-made contexts:" msgstr "" -#: library/decimal.rst:951 +#: library/decimal.rst:968 msgid "" "This is a standard context defined by the General Decimal Arithmetic " "Specification. Precision is set to nine. Rounding is set to :const:" @@ -1123,12 +1173,12 @@ msgid "" "`Subnormal`." msgstr "" -#: library/decimal.rst:957 +#: library/decimal.rst:974 msgid "" "Because many of the traps are enabled, this context is useful for debugging." msgstr "" -#: library/decimal.rst:962 +#: library/decimal.rst:979 msgid "" "This is a standard context defined by the General Decimal Arithmetic " "Specification. Precision is set to nine. Rounding is set to :const:" @@ -1136,7 +1186,7 @@ msgid "" "exceptions are not raised during computations)." msgstr "" -#: library/decimal.rst:967 +#: library/decimal.rst:984 msgid "" "Because the traps are disabled, this context is useful for applications that " "prefer to have result value of :const:`NaN` or :const:`Infinity` instead of " @@ -1144,7 +1194,7 @@ msgid "" "presence of conditions that would otherwise halt the program." msgstr "" -#: library/decimal.rst:975 +#: library/decimal.rst:992 msgid "" "This context is used by the :class:`Context` constructor as a prototype for " "new contexts. Changing a field (such a precision) has the effect of " @@ -1152,7 +1202,7 @@ msgid "" "constructor." msgstr "" -#: library/decimal.rst:979 +#: library/decimal.rst:996 msgid "" "This context is most useful in multi-threaded environments. Changing one of " "the fields before threads are started has the effect of setting system-wide " @@ -1160,65 +1210,65 @@ msgid "" "as it would require thread synchronization to prevent race conditions." msgstr "" -#: library/decimal.rst:984 +#: library/decimal.rst:1001 msgid "" "In single threaded environments, it is preferable to not use this context at " "all. Instead, simply create contexts explicitly as described below." msgstr "" -#: library/decimal.rst:987 +#: library/decimal.rst:1004 msgid "" -"The default values are :attr:`prec`\\ =\\ :const:`28`, :attr:`rounding`\\ =" -"\\ :const:`ROUND_HALF_EVEN`, and enabled traps for :class:`Overflow`, :class:" -"`InvalidOperation`, and :class:`DivisionByZero`." +"The default values are :attr:`prec`\\ =\\ :const:`28`, :attr:`rounding`\\ " +"=\\ :const:`ROUND_HALF_EVEN`, and enabled traps for :class:`Overflow`, :" +"class:`InvalidOperation`, and :class:`DivisionByZero`." msgstr "" -#: library/decimal.rst:992 +#: library/decimal.rst:1009 msgid "" "In addition to the three supplied contexts, new contexts can be created with " "the :class:`Context` constructor." msgstr "" -#: library/decimal.rst:998 +#: library/decimal.rst:1015 msgid "" "Creates a new context. If a field is not specified or is :const:`None`, the " "default values are copied from the :const:`DefaultContext`. If the *flags* " "field is not specified or is :const:`None`, all flags are cleared." msgstr "" -#: library/decimal.rst:1002 +#: library/decimal.rst:1019 msgid "" "*prec* is an integer in the range [:const:`1`, :const:`MAX_PREC`] that sets " "the precision for arithmetic operations in the context." msgstr "" -#: library/decimal.rst:1005 +#: library/decimal.rst:1022 msgid "" "The *rounding* option is one of the constants listed in the section " "`Rounding Modes`_." msgstr "" -#: library/decimal.rst:1008 +#: library/decimal.rst:1025 msgid "" "The *traps* and *flags* fields list any signals to be set. Generally, new " "contexts should only set traps and leave the flags clear." msgstr "" -#: library/decimal.rst:1011 +#: library/decimal.rst:1028 msgid "" "The *Emin* and *Emax* fields are integers specifying the outer limits " "allowable for exponents. *Emin* must be in the range [:const:`MIN_EMIN`, :" "const:`0`], *Emax* in the range [:const:`0`, :const:`MAX_EMAX`]." msgstr "" -#: library/decimal.rst:1015 +#: library/decimal.rst:1032 msgid "" "The *capitals* field is either :const:`0` or :const:`1` (the default). If " "set to :const:`1`, exponents are printed with a capital :const:`E`; " "otherwise, a lowercase :const:`e` is used: :const:`Decimal('6.02e+23')`." msgstr "" -#: library/decimal.rst:1019 +#: library/decimal.rst:1036 msgid "" "The *clamp* field is either :const:`0` (the default) or :const:`1`. If set " "to :const:`1`, the exponent ``e`` of a :class:`Decimal` instance " @@ -1232,13 +1282,13 @@ msgid "" "significant trailing zeros. For example::" msgstr "" -#: library/decimal.rst:1034 +#: library/decimal.rst:1051 msgid "" "A *clamp* value of :const:`1` allows compatibility with the fixed-width " "decimal interchange formats specified in IEEE 754." msgstr "" -#: library/decimal.rst:1037 +#: library/decimal.rst:1054 msgid "" "The :class:`Context` class defines several general purpose methods as well " "as a large number of methods for doing arithmetic directly in a given " @@ -1251,30 +1301,30 @@ msgid "" "a Decimal instance is accepted." msgstr "" -#: library/decimal.rst:1050 +#: library/decimal.rst:1067 msgid "Resets all of the flags to :const:`0`." msgstr "" -#: library/decimal.rst:1054 +#: library/decimal.rst:1071 msgid "Resets all of the traps to :const:`0`." msgstr "" -#: library/decimal.rst:1060 +#: library/decimal.rst:1077 msgid "Return a duplicate of the context." msgstr "" -#: library/decimal.rst:1064 +#: library/decimal.rst:1081 msgid "Return a copy of the Decimal instance num." msgstr "" -#: library/decimal.rst:1068 +#: library/decimal.rst:1085 msgid "" "Creates a new Decimal instance from *num* but using *self* as context. " "Unlike the :class:`Decimal` constructor, the context precision, rounding " "method, flags, and traps are applied to the conversion." msgstr "" -#: library/decimal.rst:1072 +#: library/decimal.rst:1089 msgid "" "This is useful because constants are often given to a greater precision than " "is needed by the application. Another benefit is that rounding immediately " @@ -1283,14 +1333,14 @@ msgid "" "sum can change the result:" msgstr "" -#: library/decimal.rst:1086 +#: library/decimal.rst:1103 msgid "" "This method implements the to-number operation of the IBM specification. If " "the argument is a string, no leading or trailing whitespace or underscores " "are permitted." msgstr "" -#: library/decimal.rst:1092 +#: library/decimal.rst:1109 msgid "" "Creates a new Decimal instance from a float *f* but rounding using *self* as " "the context. Unlike the :meth:`Decimal.from_float` class method, the " @@ -1298,18 +1348,18 @@ msgid "" "conversion." msgstr "" -#: library/decimal.rst:1112 +#: library/decimal.rst:1129 msgid "" "Returns a value equal to ``Emin - prec + 1`` which is the minimum exponent " "value for subnormal results. When underflow occurs, the exponent is set to :" "const:`Etiny`." msgstr "" -#: library/decimal.rst:1118 +#: library/decimal.rst:1135 msgid "Returns a value equal to ``Emax - prec + 1``." msgstr "" -#: library/decimal.rst:1120 +#: library/decimal.rst:1137 msgid "" "The usual approach to working with decimals is to create :class:`Decimal` " "instances and then apply arithmetic operations which take place within the " @@ -1319,189 +1369,193 @@ msgid "" "recounted here." msgstr "" -#: library/decimal.rst:1130 +#: library/decimal.rst:1147 msgid "Returns the absolute value of *x*." msgstr "Renvoie la valeur absolue de *x*." -#: library/decimal.rst:1135 +#: library/decimal.rst:1152 msgid "Return the sum of *x* and *y*." -msgstr "" +msgstr "Renvoie la somme de *x* et *y*." -#: library/decimal.rst:1140 +#: library/decimal.rst:1157 msgid "Returns the same Decimal object *x*." msgstr "" -#: library/decimal.rst:1145 +#: library/decimal.rst:1162 msgid "Compares *x* and *y* numerically." msgstr "" -#: library/decimal.rst:1150 +#: library/decimal.rst:1167 msgid "Compares the values of the two operands numerically." msgstr "" -#: library/decimal.rst:1155 +#: library/decimal.rst:1172 msgid "Compares two operands using their abstract representation." msgstr "" -#: library/decimal.rst:1160 +#: library/decimal.rst:1177 msgid "" "Compares two operands using their abstract representation, ignoring sign." msgstr "" -#: library/decimal.rst:1165 +#: library/decimal.rst:1182 msgid "Returns a copy of *x* with the sign set to 0." msgstr "" -#: library/decimal.rst:1170 +#: library/decimal.rst:1187 msgid "Returns a copy of *x* with the sign inverted." -msgstr "" +msgstr "Renvoie une copie de *x* mais de signe opposé." -#: library/decimal.rst:1175 +#: library/decimal.rst:1192 msgid "Copies the sign from *y* to *x*." -msgstr "" +msgstr "Copie le signe de *y* vers *x*." -#: library/decimal.rst:1180 +#: library/decimal.rst:1197 msgid "Return *x* divided by *y*." -msgstr "" +msgstr "Renvoie *x* divisé par *y*." -#: library/decimal.rst:1185 +#: library/decimal.rst:1202 msgid "Return *x* divided by *y*, truncated to an integer." -msgstr "" +msgstr "Renvoie *x* divisé par *y*, tronqué comme entier." -#: library/decimal.rst:1190 +#: library/decimal.rst:1207 msgid "Divides two numbers and returns the integer part of the result." -msgstr "" +msgstr "Renvoie la partie entière de la division entre deux nombres." -#: library/decimal.rst:1195 +#: library/decimal.rst:1212 msgid "Returns `e ** x`." -msgstr "" +msgstr "Renvoie ``e ** x``." -#: library/decimal.rst:1200 +#: library/decimal.rst:1217 msgid "Returns *x* multiplied by *y*, plus *z*." -msgstr "" +msgstr "Renvoie *x* multiplié par *y*, plus *z*." -#: library/decimal.rst:1205 +#: library/decimal.rst:1222 msgid "Returns ``True`` if *x* is canonical; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1210 +#: library/decimal.rst:1227 msgid "Returns ``True`` if *x* is finite; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1215 +#: library/decimal.rst:1232 msgid "Returns ``True`` if *x* is infinite; otherwise returns ``False``." -msgstr "" +msgstr "Renvoie ``True`` si *x* est infini et ``False`` sinon." -#: library/decimal.rst:1220 +#: library/decimal.rst:1237 msgid "Returns ``True`` if *x* is a qNaN or sNaN; otherwise returns ``False``." msgstr "" +"Renvoie ``True`` si *x* est un NaN (silencieux ou signalétique) et " +"``False`` sinon." -#: library/decimal.rst:1225 +#: library/decimal.rst:1242 msgid "" "Returns ``True`` if *x* is a normal number; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1230 +#: library/decimal.rst:1247 msgid "Returns ``True`` if *x* is a quiet NaN; otherwise returns ``False``." msgstr "" +"Renvoie ``True`` si *x* est un NaN silencieux et ``False`` sinon." -#: library/decimal.rst:1235 +#: library/decimal.rst:1252 msgid "Returns ``True`` if *x* is negative; otherwise returns ``False``." -msgstr "" +msgstr "Renvoie ``True`` si *x* est négatif et ``False`` sinon." -#: library/decimal.rst:1240 +#: library/decimal.rst:1257 msgid "" "Returns ``True`` if *x* is a signaling NaN; otherwise returns ``False``." msgstr "" +"Renvoie ``True`` si *x* est un NaN signalétique et ``False`` sinon." -#: library/decimal.rst:1245 +#: library/decimal.rst:1262 msgid "Returns ``True`` if *x* is subnormal; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1250 +#: library/decimal.rst:1267 msgid "Returns ``True`` if *x* is a zero; otherwise returns ``False``." -msgstr "" +msgstr "Renvoie ``True`` si *x* est un zéro et ``False`` sinon." -#: library/decimal.rst:1255 +#: library/decimal.rst:1272 msgid "Returns the natural (base e) logarithm of *x*." -msgstr "" +msgstr "Renvoie le logarithme naturel (en base e) de *x*." -#: library/decimal.rst:1260 +#: library/decimal.rst:1277 msgid "Returns the base 10 logarithm of *x*." -msgstr "" +msgstr "Renvoie le logarithme en base 10 de *x*." -#: library/decimal.rst:1265 +#: library/decimal.rst:1282 msgid "Returns the exponent of the magnitude of the operand's MSD." msgstr "" -#: library/decimal.rst:1270 +#: library/decimal.rst:1287 msgid "Applies the logical operation *and* between each operand's digits." msgstr "" -#: library/decimal.rst:1275 +#: library/decimal.rst:1292 msgid "Invert all the digits in *x*." msgstr "" -#: library/decimal.rst:1280 +#: library/decimal.rst:1297 msgid "Applies the logical operation *or* between each operand's digits." msgstr "" -#: library/decimal.rst:1285 +#: library/decimal.rst:1302 msgid "Applies the logical operation *xor* between each operand's digits." msgstr "" -#: library/decimal.rst:1290 +#: library/decimal.rst:1307 msgid "Compares two values numerically and returns the maximum." -msgstr "" +msgstr "Renvoie le maximum entre les deux valeurs numériques." -#: library/decimal.rst:1305 +#: library/decimal.rst:1322 msgid "Compares the values numerically with their sign ignored." msgstr "" -#: library/decimal.rst:1300 +#: library/decimal.rst:1317 msgid "Compares two values numerically and returns the minimum." msgstr "" -#: library/decimal.rst:1310 +#: library/decimal.rst:1327 msgid "Minus corresponds to the unary prefix minus operator in Python." msgstr "" -#: library/decimal.rst:1315 +#: library/decimal.rst:1332 msgid "Return the product of *x* and *y*." -msgstr "" +msgstr "Renvoie la multiplication de *x* avec *y*." -#: library/decimal.rst:1320 +#: library/decimal.rst:1337 msgid "Returns the largest representable number smaller than *x*." msgstr "" -#: library/decimal.rst:1325 +#: library/decimal.rst:1342 msgid "Returns the smallest representable number larger than *x*." msgstr "" -#: library/decimal.rst:1330 +#: library/decimal.rst:1347 msgid "Returns the number closest to *x*, in direction towards *y*." msgstr "" -#: library/decimal.rst:1335 +#: library/decimal.rst:1352 msgid "Reduces *x* to its simplest form." -msgstr "" +msgstr "Réduit *x* à sa forme la plus simple." -#: library/decimal.rst:1340 +#: library/decimal.rst:1357 msgid "Returns an indication of the class of *x*." msgstr "" -#: library/decimal.rst:1345 +#: library/decimal.rst:1362 msgid "" "Plus corresponds to the unary prefix plus operator in Python. This " "operation applies the context precision and rounding, so it is *not* an " "identity operation." msgstr "" -#: library/decimal.rst:1352 +#: library/decimal.rst:1369 msgid "Return ``x`` to the power of ``y``, reduced modulo ``modulo`` if given." msgstr "" -#: library/decimal.rst:1354 +#: library/decimal.rst:1371 msgid "" "With two arguments, compute ``x**y``. If ``x`` is negative then ``y`` must " "be integral. The result will be inexact unless ``y`` is integral and the " @@ -1510,42 +1564,44 @@ msgid "" "in the Python version." msgstr "" -#: library/decimal.rst:1360 +#: library/decimal.rst:1377 msgid "" "``Decimal(0) ** Decimal(0)`` results in ``InvalidOperation``, and if " "``InvalidOperation`` is not trapped, then results in ``Decimal('NaN')``." msgstr "" -#: library/decimal.rst:1363 +#: library/decimal.rst:1380 msgid "" "The C module computes :meth:`power` in terms of the correctly-rounded :meth:" "`exp` and :meth:`ln` functions. The result is well-defined but only \"almost " "always correctly-rounded\"." msgstr "" -#: library/decimal.rst:1368 +#: library/decimal.rst:1385 msgid "" "With three arguments, compute ``(x**y) % modulo``. For the three argument " "form, the following restrictions on the arguments hold:" msgstr "" -#: library/decimal.rst:1371 +#: library/decimal.rst:1388 msgid "all three arguments must be integral" msgstr "" -#: library/decimal.rst:1372 +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:1389 msgid "``y`` must be nonnegative" -msgstr "" +msgstr "``y`` ne doit pas être négatif ;" -#: library/decimal.rst:1373 +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:1390 msgid "at least one of ``x`` or ``y`` must be nonzero" -msgstr "" +msgstr "au moins l'un de ``x`` ou ``y`` doit être différent de zéro ;" -#: library/decimal.rst:1374 +#: library/decimal.rst:1391 msgid "``modulo`` must be nonzero and have at most 'precision' digits" msgstr "" -#: library/decimal.rst:1376 +#: library/decimal.rst:1393 msgid "" "The value resulting from ``Context.power(x, y, modulo)`` is equal to the " "value that would be obtained by computing ``(x**y) % modulo`` with unbounded " @@ -1554,170 +1610,176 @@ msgid "" "result is always exact." msgstr "" -#: library/decimal.rst:1386 +#: library/decimal.rst:1403 msgid "Returns a value equal to *x* (rounded), having the exponent of *y*." msgstr "" -#: library/decimal.rst:1391 +#: library/decimal.rst:1408 msgid "Just returns 10, as this is Decimal, :)" -msgstr "" +msgstr "Renvoie 10 car c'est Decimal, :)" -#: library/decimal.rst:1396 +#: library/decimal.rst:1413 msgid "Returns the remainder from integer division." -msgstr "" +msgstr "Donne le reste de la division entière." -#: library/decimal.rst:1398 +#: library/decimal.rst:1415 msgid "" "The sign of the result, if non-zero, is the same as that of the original " "dividend." msgstr "" -#: library/decimal.rst:1404 +#: library/decimal.rst:1421 msgid "" "Returns ``x - y * n``, where *n* is the integer nearest the exact value of " "``x / y`` (if the result is 0 then its sign will be the sign of *x*)." msgstr "" -#: library/decimal.rst:1410 +#: library/decimal.rst:1427 msgid "Returns a rotated copy of *x*, *y* times." msgstr "" -#: library/decimal.rst:1415 +#: library/decimal.rst:1432 msgid "Returns ``True`` if the two operands have the same exponent." -msgstr "" +msgstr "Renvoie ``True`` si les deux opérandes ont le même exposant." -#: library/decimal.rst:1420 +#: library/decimal.rst:1437 msgid "Returns the first operand after adding the second value its exp." msgstr "" -#: library/decimal.rst:1425 +#: library/decimal.rst:1442 msgid "Returns a shifted copy of *x*, *y* times." msgstr "" -#: library/decimal.rst:1430 +#: library/decimal.rst:1447 msgid "Square root of a non-negative number to context precision." msgstr "" -#: library/decimal.rst:1435 +#: library/decimal.rst:1452 msgid "Return the difference between *x* and *y*." msgstr "" -#: library/decimal.rst:1449 +#: library/decimal.rst:1466 msgid "Rounds to an integer." msgstr "" -#: library/decimal.rst:1454 +#: library/decimal.rst:1471 msgid "Converts a number to a string using scientific notation." msgstr "" -#: library/decimal.rst:1461 +#: library/decimal.rst:1478 msgid "Constants" msgstr "Constantes" -#: library/decimal.rst:1463 +#: library/decimal.rst:1480 msgid "" "The constants in this section are only relevant for the C module. They are " "also included in the pure Python version for compatibility." msgstr "" +"Les constantes de cette section ne sont pertinentes que pour le module C. " +"Elles sont aussi incluses pour le compatibilité dans la version en Python " +"pur." -#: library/decimal.rst:1467 +#: library/decimal.rst:1484 msgid "32-bit" msgstr "32-bit" -#: library/decimal.rst:1467 +#: library/decimal.rst:1484 msgid "64-bit" msgstr "64-bit" -#: library/decimal.rst:1471 +#: library/decimal.rst:1488 msgid ":const:`425000000`" msgstr ":const:`425000000`" -#: library/decimal.rst:1471 +#: library/decimal.rst:1488 msgid ":const:`999999999999999999`" msgstr ":const:`999999999999999999`" -#: library/decimal.rst:1473 +#: library/decimal.rst:1490 msgid ":const:`-425000000`" msgstr ":const:`-425000000`" -#: library/decimal.rst:1473 +#: library/decimal.rst:1490 msgid ":const:`-999999999999999999`" msgstr ":const:`-999999999999999999`" -#: library/decimal.rst:1475 +#: library/decimal.rst:1492 msgid ":const:`-849999999`" msgstr ":const:`-849999999`" -#: library/decimal.rst:1475 +#: library/decimal.rst:1492 msgid ":const:`-1999999999999999997`" msgstr ":const:`-1999999999999999997`" -#: library/decimal.rst:1481 +#: library/decimal.rst:1498 msgid "" "The value is ``True``. Deprecated, because Python now always has threads." msgstr "" +"La valeur est ``True``. Déprécié, parce que maintenant Python possède " +"toujours des fils d'exécution." -#: library/decimal.rst:1487 +#: library/decimal.rst:1504 msgid "" -"The default value is ``True``. If Python is compiled ``--without-decimal-" -"contextvar``, the C version uses a thread-local rather than a coroutine-" -"local context and the value is ``False``. This is slightly faster in some " -"nested context scenarios." +"The default value is ``True``. If Python is :option:`configured using the --" +"without-decimal-contextvar option <--without-decimal-contextvar>`, the C " +"version uses a thread-local rather than a coroutine-local context and the " +"value is ``False``. This is slightly faster in some nested context " +"scenarios." msgstr "" -#: library/decimal.rst:1491 +#: library/decimal.rst:1509 msgid "backported to 3.7 and 3.8." msgstr "" -#: library/decimal.rst:1495 +#: library/decimal.rst:1513 msgid "Rounding modes" -msgstr "" +msgstr "Modes d'arrondi" -#: library/decimal.rst:1499 +#: library/decimal.rst:1517 msgid "Round towards :const:`Infinity`." msgstr "" -#: library/decimal.rst:1503 +#: library/decimal.rst:1521 msgid "Round towards zero." msgstr "" -#: library/decimal.rst:1507 +#: library/decimal.rst:1525 msgid "Round towards :const:`-Infinity`." msgstr "" -#: library/decimal.rst:1511 +#: library/decimal.rst:1529 msgid "Round to nearest with ties going towards zero." msgstr "" -#: library/decimal.rst:1515 +#: library/decimal.rst:1533 msgid "Round to nearest with ties going to nearest even integer." msgstr "" -#: library/decimal.rst:1519 +#: library/decimal.rst:1537 msgid "Round to nearest with ties going away from zero." msgstr "" -#: library/decimal.rst:1523 +#: library/decimal.rst:1541 msgid "Round away from zero." msgstr "" -#: library/decimal.rst:1527 +#: library/decimal.rst:1545 msgid "" "Round away from zero if last digit after rounding towards zero would have " "been 0 or 5; otherwise round towards zero." msgstr "" -#: library/decimal.rst:1534 +#: library/decimal.rst:1552 msgid "Signals" -msgstr "" +msgstr "Signaux" -#: library/decimal.rst:1536 +#: library/decimal.rst:1554 msgid "" "Signals represent conditions that arise during computation. Each corresponds " "to one context flag and one context trap enabler." msgstr "" -#: library/decimal.rst:1539 +#: library/decimal.rst:1557 msgid "" "The context flag is set whenever the condition is encountered. After the " "computation, flags may be checked for informational purposes (for instance, " @@ -1725,7 +1787,7 @@ msgid "" "sure to clear all flags before starting the next computation." msgstr "" -#: library/decimal.rst:1544 +#: library/decimal.rst:1562 msgid "" "If the context's trap enabler is set for the signal, then the condition " "causes a Python exception to be raised. For example, if the :class:" @@ -1733,26 +1795,26 @@ msgid "" "raised upon encountering the condition." msgstr "" -#: library/decimal.rst:1552 +#: library/decimal.rst:1570 msgid "Altered an exponent to fit representation constraints." msgstr "" -#: library/decimal.rst:1554 +#: library/decimal.rst:1572 msgid "" "Typically, clamping occurs when an exponent falls outside the context's :" "attr:`Emin` and :attr:`Emax` limits. If possible, the exponent is reduced " "to fit by adding zeros to the coefficient." msgstr "" -#: library/decimal.rst:1561 +#: library/decimal.rst:1579 msgid "Base class for other signals and a subclass of :exc:`ArithmeticError`." msgstr "" -#: library/decimal.rst:1566 +#: library/decimal.rst:1584 msgid "Signals the division of a non-infinite number by zero." msgstr "" -#: library/decimal.rst:1568 +#: library/decimal.rst:1586 msgid "" "Can occur with division, modulo division, or when raising a number to a " "negative power. If this signal is not trapped, returns :const:`Infinity` " @@ -1760,32 +1822,32 @@ msgid "" "calculation." msgstr "" -#: library/decimal.rst:1575 +#: library/decimal.rst:1593 msgid "Indicates that rounding occurred and the result is not exact." msgstr "" -#: library/decimal.rst:1577 +#: library/decimal.rst:1595 msgid "" "Signals when non-zero digits were discarded during rounding. The rounded " "result is returned. The signal flag or trap is used to detect when results " "are inexact." msgstr "" -#: library/decimal.rst:1584 +#: library/decimal.rst:1602 msgid "An invalid operation was performed." msgstr "" -#: library/decimal.rst:1586 +#: library/decimal.rst:1604 msgid "" "Indicates that an operation was requested that does not make sense. If not " "trapped, returns :const:`NaN`. Possible causes include::" msgstr "" -#: library/decimal.rst:1602 +#: library/decimal.rst:1620 msgid "Numerical overflow." -msgstr "" +msgstr "Débordement numérique." -#: library/decimal.rst:1604 +#: library/decimal.rst:1622 msgid "" "Indicates the exponent is larger than :attr:`Emax` after rounding has " "occurred. If not trapped, the result depends on the rounding mode, either " @@ -1794,11 +1856,11 @@ msgid "" "`Rounded` are also signaled." msgstr "" -#: library/decimal.rst:1613 +#: library/decimal.rst:1631 msgid "Rounding occurred though possibly no information was lost." msgstr "" -#: library/decimal.rst:1615 +#: library/decimal.rst:1633 msgid "" "Signaled whenever rounding discards digits; even if those digits are zero " "(such as rounding :const:`5.00` to :const:`5.0`). If not trapped, returns " @@ -1806,31 +1868,31 @@ msgid "" "digits." msgstr "" -#: library/decimal.rst:1623 +#: library/decimal.rst:1641 msgid "Exponent was lower than :attr:`Emin` prior to rounding." msgstr "" -#: library/decimal.rst:1625 +#: library/decimal.rst:1643 msgid "" "Occurs when an operation result is subnormal (the exponent is too small). If " "not trapped, returns the result unchanged." msgstr "" -#: library/decimal.rst:1631 +#: library/decimal.rst:1649 msgid "Numerical underflow with result rounded to zero." msgstr "" -#: library/decimal.rst:1633 +#: library/decimal.rst:1651 msgid "" "Occurs when a subnormal result is pushed to zero by rounding. :class:" "`Inexact` and :class:`Subnormal` are also signaled." msgstr "" -#: library/decimal.rst:1639 +#: library/decimal.rst:1657 msgid "Enable stricter semantics for mixing floats and Decimals." msgstr "" -#: library/decimal.rst:1641 +#: library/decimal.rst:1659 msgid "" "If the signal is not trapped (default), mixing floats and Decimals is " "permitted in the :class:`~decimal.Decimal` constructor, :meth:`~decimal." @@ -1841,26 +1903,26 @@ msgid "" "Context.create_decimal_from_float` do not set the flag." msgstr "" -#: library/decimal.rst:1649 +#: library/decimal.rst:1667 msgid "" "Otherwise (the signal is trapped), only equality comparisons and explicit " "conversions are silent. All other mixed operations raise :exc:" "`FloatOperation`." msgstr "" -#: library/decimal.rst:1653 +#: library/decimal.rst:1671 msgid "The following table summarizes the hierarchy of signals::" msgstr "" -#: library/decimal.rst:1674 +#: library/decimal.rst:1692 msgid "Floating Point Notes" msgstr "" -#: library/decimal.rst:1678 +#: library/decimal.rst:1696 msgid "Mitigating round-off error with increased precision" msgstr "" -#: library/decimal.rst:1680 +#: library/decimal.rst:1698 msgid "" "The use of decimal floating point eliminates decimal representation error " "(making it possible to represent :const:`0.1` exactly); however, some " @@ -1868,7 +1930,7 @@ msgid "" "fixed precision." msgstr "" -#: library/decimal.rst:1684 +#: library/decimal.rst:1702 msgid "" "The effects of round-off error can be amplified by the addition or " "subtraction of nearly offsetting quantities resulting in loss of " @@ -1877,24 +1939,24 @@ msgid "" "of the associative and distributive properties of addition:" msgstr "" -#: library/decimal.rst:1708 +#: library/decimal.rst:1726 msgid "" "The :mod:`decimal` module makes it possible to restore the identities by " "expanding the precision sufficiently to avoid loss of significance:" msgstr "" -#: library/decimal.rst:1728 +#: library/decimal.rst:1746 msgid "Special values" msgstr "" -#: library/decimal.rst:1730 +#: library/decimal.rst:1748 msgid "" "The number system for the :mod:`decimal` module provides special values " "including :const:`NaN`, :const:`sNaN`, :const:`-Infinity`, :const:" "`Infinity`, and two zeros, :const:`+0` and :const:`-0`." msgstr "" -#: library/decimal.rst:1734 +#: library/decimal.rst:1752 msgid "" "Infinities can be constructed directly with: ``Decimal('Infinity')``. Also, " "they can arise from dividing by zero when the :exc:`DivisionByZero` signal " @@ -1903,14 +1965,14 @@ msgid "" "representable number." msgstr "" -#: library/decimal.rst:1739 +#: library/decimal.rst:1757 msgid "" "The infinities are signed (affine) and can be used in arithmetic operations " "where they get treated as very large, indeterminate numbers. For instance, " "adding a constant to infinity gives another infinite result." msgstr "" -#: library/decimal.rst:1743 +#: library/decimal.rst:1761 msgid "" "Some operations are indeterminate and return :const:`NaN`, or if the :exc:" "`InvalidOperation` signal is trapped, raise an exception. For example, " @@ -1921,14 +1983,14 @@ msgid "" "the calculation to proceed while flagging specific results as invalid." msgstr "" -#: library/decimal.rst:1751 +#: library/decimal.rst:1769 msgid "" "A variant is :const:`sNaN` which signals rather than remaining quiet after " "every operation. This is a useful return value when an invalid result needs " "to interrupt a calculation for special handling." msgstr "" -#: library/decimal.rst:1755 +#: library/decimal.rst:1773 msgid "" "The behavior of Python's comparison operators can be a little surprising " "where a :const:`NaN` is involved. A test for equality where one of the " @@ -1945,7 +2007,7 @@ msgid "" "methods instead." msgstr "" -#: library/decimal.rst:1768 +#: library/decimal.rst:1786 msgid "" "The signed zeros can result from calculations that underflow. They keep the " "sign that would have resulted if the calculation had been carried out to " @@ -1953,7 +2015,7 @@ msgid "" "negative zeros are treated as equal and their sign is informational." msgstr "" -#: library/decimal.rst:1773 +#: library/decimal.rst:1791 msgid "" "In addition to the two signed zeros which are distinct yet equal, there are " "various representations of zero with differing precisions yet equivalent in " @@ -1962,11 +2024,11 @@ msgid "" "that the following calculation returns a value equal to zero:" msgstr "" -#: library/decimal.rst:1788 +#: library/decimal.rst:1806 msgid "Working with threads" msgstr "" -#: library/decimal.rst:1790 +#: library/decimal.rst:1808 msgid "" "The :func:`getcontext` function accesses a different :class:`Context` object " "for each thread. Having separate thread contexts means that threads may " @@ -1974,20 +2036,20 @@ msgid "" "other threads." msgstr "" -#: library/decimal.rst:1794 +#: library/decimal.rst:1812 msgid "" "Likewise, the :func:`setcontext` function automatically assigns its target " "to the current thread." msgstr "" -#: library/decimal.rst:1797 +#: library/decimal.rst:1815 msgid "" "If :func:`setcontext` has not been called before :func:`getcontext`, then :" "func:`getcontext` will automatically create a new context for use in the " "current thread." msgstr "" -#: library/decimal.rst:1801 +#: library/decimal.rst:1819 msgid "" "The new context is copied from a prototype context called *DefaultContext*. " "To control the defaults so that each thread will use the same values " @@ -1996,67 +2058,77 @@ msgid "" "a race condition between threads calling :func:`getcontext`. For example::" msgstr "" -#: library/decimal.rst:1826 +#: library/decimal.rst:1844 msgid "Recipes" msgstr "Cas pratiques" -#: library/decimal.rst:1828 +#: library/decimal.rst:1846 msgid "" "Here are a few recipes that serve as utility functions and that demonstrate " "ways to work with the :class:`Decimal` class::" msgstr "" -#: library/decimal.rst:1983 +#: library/decimal.rst:2001 msgid "Decimal FAQ" msgstr "FAQ *decimal*" -#: library/decimal.rst:1985 +#: library/decimal.rst:2003 msgid "" "Q. It is cumbersome to type ``decimal.Decimal('1234.5')``. Is there a way " "to minimize typing when using the interactive interpreter?" msgstr "" -"Q. C'est fastidieux de taper ``decimal.Decimal('1234.5')``. Y a-t-il un " +"Q. C'est fastidieux de taper ``decimal.Decimal('1234.5')``. Y a-t-il un " "moyen de réduire la frappe quand on utilise l'interpréteur interactif ?" -#: library/decimal.rst:1988 +#: library/decimal.rst:2006 msgid "A. Some users abbreviate the constructor to just a single letter:" msgstr "" "R. Certains utilisateurs abrègent le constructeur en une seule lettre :" -#: library/decimal.rst:1994 +#: library/decimal.rst:2012 msgid "" "Q. In a fixed-point application with two decimal places, some inputs have " "many places and need to be rounded. Others are not supposed to have excess " "digits and need to be validated. What methods should be used?" msgstr "" -#: library/decimal.rst:1998 +#: library/decimal.rst:2016 msgid "" "A. The :meth:`quantize` method rounds to a fixed number of decimal places. " "If the :const:`Inexact` trap is set, it is also useful for validation:" msgstr "" -#: library/decimal.rst:2016 +#: library/decimal.rst:2034 msgid "" "Q. Once I have valid two place inputs, how do I maintain that invariant " "throughout an application?" msgstr "" +"Q. Une fois que mes entrées sont à deux décimales valides, comment maintenir " +"cet invariant dans l'application ?" -#: library/decimal.rst:2019 +#: library/decimal.rst:2037 msgid "" "A. Some operations like addition, subtraction, and multiplication by an " "integer will automatically preserve fixed point. Others operations, like " "division and non-integer multiplication, will change the number of decimal " "places and need to be followed-up with a :meth:`quantize` step:" msgstr "" +"R. Certaines opérations comme l'addition, la soustraction et la " +"multiplication par un entier préservent automatiquement la virgule fixe. " +"D'autres opérations, comme la division et la multiplication par des non-" +"entiers, changent le nombre de décimales et doivent être suivies d'une " +"étape :meth:`quantize` :" -#: library/decimal.rst:2037 +#: library/decimal.rst:2055 msgid "" "In developing fixed-point applications, it is convenient to define functions " "to handle the :meth:`quantize` step:" msgstr "" +"Lors du développement d'applications en virgule fixe, il est pratique de " +"définir des fonctions pour gérer cette étape de quantification " +"par :meth:`quantize` :" -#: library/decimal.rst:2050 +#: library/decimal.rst:2068 msgid "" "Q. There are many ways to express the same value. The numbers :const:" "`200`, :const:`200.000`, :const:`2E2`, and :const:`.02E+4` all have the same " @@ -2064,19 +2136,19 @@ msgid "" "recognizable canonical value?" msgstr "" -#: library/decimal.rst:2055 +#: library/decimal.rst:2073 msgid "" "A. The :meth:`normalize` method maps all equivalent values to a single " "representative:" msgstr "" -#: library/decimal.rst:2062 +#: library/decimal.rst:2080 msgid "" "Q. Some decimal values always print with exponential notation. Is there a " "way to get a non-exponential representation?" msgstr "" -#: library/decimal.rst:2065 +#: library/decimal.rst:2083 msgid "" "A. For some values, exponential notation is the only way to express the " "number of significant places in the coefficient. For example, expressing :" @@ -2084,31 +2156,31 @@ msgid "" "original's two-place significance." msgstr "" -#: library/decimal.rst:2070 +#: library/decimal.rst:2088 msgid "" "If an application does not care about tracking significance, it is easy to " "remove the exponent and trailing zeroes, losing significance, but keeping " "the value unchanged:" msgstr "" -#: library/decimal.rst:2080 +#: library/decimal.rst:2098 msgid "Q. Is there a way to convert a regular float to a :class:`Decimal`?" msgstr "" -#: library/decimal.rst:2082 +#: library/decimal.rst:2100 msgid "" "A. Yes, any binary floating point number can be exactly expressed as a " "Decimal though an exact conversion may take more precision than intuition " "would suggest:" msgstr "" -#: library/decimal.rst:2091 +#: library/decimal.rst:2109 msgid "" "Q. Within a complex calculation, how can I make sure that I haven't gotten a " "spurious result because of insufficient precision or rounding anomalies." msgstr "" -#: library/decimal.rst:2094 +#: library/decimal.rst:2112 msgid "" "A. The decimal module makes it easy to test results. A best practice is to " "re-run calculations using greater precision and with various rounding modes. " @@ -2116,14 +2188,14 @@ msgid "" "issues, ill-conditioned inputs, or a numerically unstable algorithm." msgstr "" -#: library/decimal.rst:2099 +#: library/decimal.rst:2117 msgid "" "Q. I noticed that context precision is applied to the results of operations " "but not to the inputs. Is there anything to watch out for when mixing " "values of different precisions?" msgstr "" -#: library/decimal.rst:2103 +#: library/decimal.rst:2121 msgid "" "A. Yes. The principle is that all values are considered to be exact and so " "is the arithmetic on those values. Only the results are rounded. The " @@ -2132,23 +2204,23 @@ msgid "" "haven't been rounded:" msgstr "" -#: library/decimal.rst:2116 +#: library/decimal.rst:2134 msgid "" "The solution is either to increase precision or to force rounding of inputs " "using the unary plus operation:" msgstr "" -#: library/decimal.rst:2125 +#: library/decimal.rst:2143 msgid "" "Alternatively, inputs can be rounded upon creation using the :meth:`Context." "create_decimal` method:" msgstr "" -#: library/decimal.rst:2131 +#: library/decimal.rst:2149 msgid "Q. Is the CPython implementation fast for large numbers?" msgstr "" -#: library/decimal.rst:2133 +#: library/decimal.rst:2151 msgid "" "A. Yes. In the CPython and PyPy3 implementations, the C/CFFI versions of " "the decimal module integrate the high speed `libmpdec \n" "Language-Team: FRENCH \n" @@ -32,142 +32,146 @@ msgid "" "setting the :envvar:`PYTHONDEVMODE` environment variable to ``1``." msgstr "" -#: library/devmode.rst:17 -msgid "Effects of the Python Development Mode" +#: library/devmode.rst:16 +msgid "See also :ref:`Python debug build `." msgstr "" #: library/devmode.rst:19 +msgid "Effects of the Python Development Mode" +msgstr "" + +#: library/devmode.rst:21 msgid "" "Enabling the Python Development Mode is similar to the following command, " "but with additional effects described below::" msgstr "" -#: library/devmode.rst:24 +#: library/devmode.rst:26 msgid "Effects of the Python Development Mode:" msgstr "" -#: library/devmode.rst:26 +#: library/devmode.rst:28 msgid "" "Add ``default`` :ref:`warning filter `. The " "following warnings are shown:" msgstr "" -#: library/devmode.rst:29 +#: library/devmode.rst:31 msgid ":exc:`DeprecationWarning`" msgstr ":exc:`DeprecationWarning`" -#: library/devmode.rst:30 +#: library/devmode.rst:32 msgid ":exc:`ImportWarning`" msgstr ":exc:`ImportWarning`" -#: library/devmode.rst:31 +#: library/devmode.rst:33 msgid ":exc:`PendingDeprecationWarning`" msgstr ":exc:`PendingDeprecationWarning`" -#: library/devmode.rst:32 +#: library/devmode.rst:34 msgid ":exc:`ResourceWarning`" msgstr ":exc:`ResourceWarning`" -#: library/devmode.rst:34 +#: library/devmode.rst:36 msgid "" "Normally, the above warnings are filtered by the default :ref:`warning " "filters `." msgstr "" -#: library/devmode.rst:37 +#: library/devmode.rst:39 msgid "" "It behaves as if the :option:`-W default <-W>` command line option is used." msgstr "" -#: library/devmode.rst:39 +#: library/devmode.rst:41 msgid "" "Use the :option:`-W error <-W>` command line option or set the :envvar:" "`PYTHONWARNINGS` environment variable to ``error`` to treat warnings as " "errors." msgstr "" -#: library/devmode.rst:43 +#: library/devmode.rst:45 msgid "Install debug hooks on memory allocators to check for:" msgstr "" -#: library/devmode.rst:45 +#: library/devmode.rst:47 msgid "Buffer underflow" msgstr "" -#: library/devmode.rst:46 +#: library/devmode.rst:48 msgid "Buffer overflow" msgstr "" -#: library/devmode.rst:47 +#: library/devmode.rst:49 msgid "Memory allocator API violation" msgstr "" -#: library/devmode.rst:48 +#: library/devmode.rst:50 msgid "Unsafe usage of the GIL" msgstr "" -#: library/devmode.rst:50 +#: library/devmode.rst:52 msgid "See the :c:func:`PyMem_SetupDebugHooks` C function." msgstr "" -#: library/devmode.rst:52 +#: library/devmode.rst:54 msgid "" "It behaves as if the :envvar:`PYTHONMALLOC` environment variable is set to " "``debug``." msgstr "" -#: library/devmode.rst:55 +#: library/devmode.rst:57 msgid "" "To enable the Python Development Mode without installing debug hooks on " "memory allocators, set the :envvar:`PYTHONMALLOC` environment variable to " "``default``." msgstr "" -#: library/devmode.rst:59 +#: library/devmode.rst:61 msgid "" "Call :func:`faulthandler.enable` at Python startup to install handlers for " "the :const:`SIGSEGV`, :const:`SIGFPE`, :const:`SIGABRT`, :const:`SIGBUS` " "and :const:`SIGILL` signals to dump the Python traceback on a crash." msgstr "" -#: library/devmode.rst:63 +#: library/devmode.rst:65 msgid "" "It behaves as if the :option:`-X faulthandler <-X>` command line option is " "used or if the :envvar:`PYTHONFAULTHANDLER` environment variable is set to " "``1``." msgstr "" -#: library/devmode.rst:67 +#: library/devmode.rst:69 msgid "" "Enable :ref:`asyncio debug mode `. For example, :mod:" "`asyncio` checks for coroutines that were not awaited and logs them." msgstr "" -#: library/devmode.rst:70 +#: library/devmode.rst:72 msgid "" "It behaves as if the :envvar:`PYTHONASYNCIODEBUG` environment variable is " "set to ``1``." msgstr "" -#: library/devmode.rst:73 +#: library/devmode.rst:75 msgid "" "Check the *encoding* and *errors* arguments for string encoding and decoding " "operations. Examples: :func:`open`, :meth:`str.encode` and :meth:`bytes." "decode`." msgstr "" -#: library/devmode.rst:77 +#: library/devmode.rst:79 msgid "" "By default, for best performance, the *errors* argument is only checked at " "the first encoding/decoding error and the *encoding* argument is sometimes " "ignored for empty strings." msgstr "" -#: library/devmode.rst:81 +#: library/devmode.rst:83 msgid "The :class:`io.IOBase` destructor logs ``close()`` exceptions." msgstr "" -#: library/devmode.rst:82 +#: library/devmode.rst:84 msgid "" "Set the :attr:`~sys.flags.dev_mode` attribute of :attr:`sys.flags` to " "``True``." @@ -175,7 +179,7 @@ msgstr "" "Définit l'attribut :attr:`~sys.flags.dev_mode` de :attr:`sys.flags` à " "``True``" -#: library/devmode.rst:85 +#: library/devmode.rst:87 msgid "" "The Python Development Mode does not enable the :mod:`tracemalloc` module by " "default, because the overhead cost (to performance and memory) would be too " @@ -186,57 +190,63 @@ msgid "" "allocated." msgstr "" -#: library/devmode.rst:92 +#: library/devmode.rst:94 msgid "" "The Python Development Mode does not prevent the :option:`-O` command line " "option from removing :keyword:`assert` statements nor from setting :const:" "`__debug__` to ``False``." msgstr "" -#: library/devmode.rst:96 +#: library/devmode.rst:98 +msgid "" +"The Python Development Mode can only be enabled at the Python startup. Its " +"value can be read from :data:`sys.flags.dev_mode `." +msgstr "" + +#: library/devmode.rst:101 msgid "The :class:`io.IOBase` destructor now logs ``close()`` exceptions." msgstr "" -#: library/devmode.rst:99 +#: library/devmode.rst:104 msgid "" "The *encoding* and *errors* arguments are now checked for string encoding " "and decoding operations." msgstr "" -#: library/devmode.rst:105 +#: library/devmode.rst:110 msgid "ResourceWarning Example" msgstr "" -#: library/devmode.rst:107 +#: library/devmode.rst:112 msgid "" "Example of a script counting the number of lines of the text file specified " "in the command line::" msgstr "" -#: library/devmode.rst:121 +#: library/devmode.rst:126 msgid "" "The script does not close the file explicitly. By default, Python does not " "emit any warning. Example using README.txt, which has 269 lines:" msgstr "" -#: library/devmode.rst:129 +#: library/devmode.rst:134 msgid "" "Enabling the Python Development Mode displays a :exc:`ResourceWarning` " "warning:" msgstr "" -#: library/devmode.rst:139 +#: library/devmode.rst:144 msgid "" "In addition, enabling :mod:`tracemalloc` shows the line where the file was " "opened:" msgstr "" -#: library/devmode.rst:154 +#: library/devmode.rst:159 msgid "" "The fix is to close explicitly the file. Example using a context manager::" msgstr "" -#: library/devmode.rst:162 +#: library/devmode.rst:167 msgid "" "Not closing a resource explicitly can leave a resource open for way longer " "than expected; it can cause severe issues upon exiting Python. It is bad in " @@ -244,25 +254,25 @@ msgid "" "application more deterministic and more reliable." msgstr "" -#: library/devmode.rst:169 +#: library/devmode.rst:174 msgid "Bad file descriptor error example" msgstr "" -#: library/devmode.rst:171 +#: library/devmode.rst:176 msgid "Script displaying the first line of itself::" msgstr "" -#: library/devmode.rst:184 +#: library/devmode.rst:189 msgid "By default, Python does not emit any warning:" msgstr "" -#: library/devmode.rst:191 +#: library/devmode.rst:196 msgid "" "The Python Development Mode shows a :exc:`ResourceWarning` and logs a \"Bad " "file descriptor\" error when finalizing the file object:" msgstr "" -#: library/devmode.rst:207 +#: library/devmode.rst:212 msgid "" "``os.close(fp.fileno())`` closes the file descriptor. When the file object " "finalizer tries to close the file descriptor again, it fails with the ``Bad " @@ -271,7 +281,7 @@ msgid "" "`18748` for an example)." msgstr "" -#: library/devmode.rst:213 +#: library/devmode.rst:218 msgid "" "The fix is to remove the ``os.close(fp.fileno())`` line, or open the file " "with ``closefd=False``." diff --git a/library/difflib.po b/library/difflib.po index 4790874a38..c0f95672d5 100644 --- a/library/difflib.po +++ b/library/difflib.po @@ -5,10 +5,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2020-10-15 09:15+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2022-10-18 12:28+0200\n" "Last-Translator: Loc Cosnier \n" -"Language-Team: French \n" +"Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -270,7 +270,7 @@ msgstr "" "Mettre *context* à ``True`` lorsque les différences contextuelles doivent " "être affichées, sinon la valeur par défaut est ``False`` pour afficher les " "fichiers complets. Les *numlines* ont pour valeur par défaut ``5``. Lorsque " -"*context* est `True``, *numlines* contrôle le nombre de lignes de contexte " +"*context* est ``True``, *numlines* contrôle le nombre de lignes de contexte " "qui entourent les différences mise en évidence. Lorsque *context* est " "``False``, *numlines* contrôle le nombre de lignes qui sont affichées avant " "un surlignage de différence lors de l'utilisation des hyperliens " @@ -656,8 +656,8 @@ msgstr "" #: library/difflib.rst:468 msgid "" "Return list of triples describing non-overlapping matching subsequences. " -"Each triple is of the form ``(i, j, n)``, and means that ``a[i:i+n] == b[j:j" -"+n]``. The triples are monotonically increasing in *i* and *j*." +"Each triple is of the form ``(i, j, n)``, and means that ``a[i:i+n] == b[j:" +"j+n]``. The triples are monotonically increasing in *i* and *j*." msgstr "" #: library/difflib.rst:473 diff --git a/library/dis.po b/library/dis.po index bd017d256e..67cc13978e 100644 --- a/library/dis.po +++ b/library/dis.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-24 17:33+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2019-07-18 21:03+0200\n" "Last-Translator: Aya Keddam \n" "Language-Team: FRENCH \n" @@ -56,11 +56,19 @@ msgstr "" "Utilisez 2 bits pour chaque instruction. Avant, le nombre de bits variait " "par instruction." -#: library/dis.rst:28 +#: library/dis.rst:27 +msgid "" +"Some instructions are accompanied by one or more inline cache entries, which " +"take the form of :opcode:`CACHE` instructions. These instructions are hidden " +"by default, but can be shown by passing ``show_caches=True`` to any :mod:" +"`dis` utility." +msgstr "" + +#: library/dis.rst:34 msgid "Example: Given the function :func:`myfunc`::" msgstr "Exemple : Etant donné la fonction :func:`myfunc` ::" -#: library/dis.rst:33 +#: library/dis.rst:39 msgid "" "the following command can be used to display the disassembly of :func:" "`myfunc`::" @@ -68,15 +76,15 @@ msgstr "" "la commande suivante peut-être utilisé pour afficher le désassemblage de :" "func:`myfunc` ::" -#: library/dis.rst:42 +#: library/dis.rst:52 msgid "(The \"2\" is a line number)." msgstr "(Le \"2\" est un numéro de ligne)." -#: library/dis.rst:45 +#: library/dis.rst:55 msgid "Bytecode analysis" msgstr "Analyse du code intermédiaire" -#: library/dis.rst:49 +#: library/dis.rst:59 msgid "" "The bytecode analysis API allows pieces of Python code to be wrapped in a :" "class:`Bytecode` object that provides easy access to details of the compiled " @@ -86,7 +94,7 @@ msgstr "" "code en Python dans une classe :class:`Bytecode`, qui permet un accès facile " "aux détails du code compilé." -#: library/dis.rst:56 +#: library/dis.rst:66 msgid "" "Analyse the bytecode corresponding to a function, generator, asynchronous " "generator, coroutine, method, string of source code, or a code object (as " @@ -97,7 +105,7 @@ msgstr "" "caractères du code source, ou bien une classe (comme retourne la fonction :" "func:`compile`)." -#: library/dis.rst:60 +#: library/dis.rst:70 msgid "" "This is a convenience wrapper around many of the functions listed below, " "most notably :func:`get_instructions`, as iterating over a :class:`Bytecode` " @@ -108,7 +116,7 @@ msgstr "" "instance de la classe :class:`Bytecode` rend les opérations du code " "intermédiaire des instances de :class:`Instruction`." -#: library/dis.rst:225 +#: library/dis.rst:250 msgid "" "If *first_line* is not ``None``, it indicates the line number that should be " "reported for the first source line in the disassembled code. Otherwise, the " @@ -120,7 +128,7 @@ msgstr "" "Autrement, les informations sur la ligne source sont prises directement à " "partir de la classe du code désassemblé." -#: library/dis.rst:69 +#: library/dis.rst:79 msgid "" "If *current_offset* is not ``None``, it refers to an instruction offset in " "the disassembled code. Setting this means :meth:`.dis` will display a " @@ -131,7 +139,7 @@ msgstr "" "dire que :meth:`.dis` va générer un marqueur de \" l'instruction en cours\" " "contre le code d'opération donné." -#: library/dis.rst:75 +#: library/dis.rst:85 msgid "" "Construct a :class:`Bytecode` instance from the given traceback, setting " "*current_offset* to the instruction responsible for the exception." @@ -139,15 +147,15 @@ msgstr "" "Construisez une instance :class:`Bytecode` à partir de la trace d'appel, en " "mettant *current_offet* à l'instruction responsable de l'exception." -#: library/dis.rst:80 +#: library/dis.rst:90 msgid "The compiled code object." msgstr "Le code compilé objet." -#: library/dis.rst:84 +#: library/dis.rst:94 msgid "The first source line of the code object (if available)" msgstr "La première ligne source du code objet (si disponible)" -#: library/dis.rst:88 +#: library/dis.rst:98 msgid "" "Return a formatted view of the bytecode operations (the same as printed by :" "func:`dis.dis`, but returned as a multi-line string)." @@ -156,7 +164,7 @@ msgstr "" "celle envoyée par :func:`dis.dis`, mais comme une chaîne de caractères de " "plusieurs lignes )." -#: library/dis.rst:93 +#: library/dis.rst:103 msgid "" "Return a formatted multi-line string with detailed information about the " "code object, like :func:`code_info`." @@ -164,20 +172,25 @@ msgstr "" "Retourne une chaîne de caractères de plusieurs lignes formatée avec des " "informations détaillées sur l'objet code comme :func:`code_info`." -#: library/dis.rst:130 library/dis.rst:176 +#: library/dis.rst:146 library/dis.rst:192 msgid "This can now handle coroutine and asynchronous generator objects." msgstr "" "Cette version supporte la coroutine et les objets générateurs asynchrones." -#: library/dis.rst:99 +#: library/dis.rst:195 library/dis.rst:238 library/dis.rst:257 +#, fuzzy +msgid "Added the ``show_caches`` parameter." +msgstr "Ajout du paramètre *file*." + +#: library/dis.rst:112 msgid "Example::" msgstr "Exemple ::" -#: library/dis.rst:112 +#: library/dis.rst:128 msgid "Analysis functions" msgstr "Analyse de fonctions" -#: library/dis.rst:114 +#: library/dis.rst:130 msgid "" "The :mod:`dis` module also defines the following analysis functions that " "convert the input directly to the desired output. They can be useful if only " @@ -189,7 +202,7 @@ msgstr "" "peuvent être utiles si il n'y a qu'une seule opération à effectuer, la " "représentation intermédiaire objet n'étant donc pas utile dans ce cas:" -#: library/dis.rst:120 +#: library/dis.rst:136 msgid "" "Return a formatted multi-line string with detailed code object information " "for the supplied function, generator, asynchronous generator, coroutine, " @@ -200,7 +213,7 @@ msgstr "" "générateurs asynchrone, coroutine, la méthode, la chaine de caractères du " "code source ou objet." -#: library/dis.rst:124 +#: library/dis.rst:140 msgid "" "Note that the exact contents of code info strings are highly implementation " "dependent and they may change arbitrarily across Python VMs or Python " @@ -211,7 +224,7 @@ msgstr "" "peuvent changer arbitrairement sous machines virtuelles Python ou les " "versions de Python." -#: library/dis.rst:136 +#: library/dis.rst:152 msgid "" "Print detailed code object information for the supplied function, method, " "source code string or code object to *file* (or ``sys.stdout`` if *file* is " @@ -221,7 +234,7 @@ msgstr "" "méthode, la chaîne de caractère du code source ou du code objet à *file* (ou " "bien ``sys.stdout`` si *file* n'est pas spécifié)." -#: library/dis.rst:140 +#: library/dis.rst:156 msgid "" "This is a convenient shorthand for ``print(code_info(x), file=file)``, " "intended for interactive exploration at the interpreter prompt." @@ -230,11 +243,11 @@ msgstr "" "principalement fait pour l'exploration interactive sur l'invite de " "l'interpréteur." -#: library/dis.rst:170 library/dis.rst:213 +#: library/dis.rst:186 library/dis.rst:235 msgid "Added *file* parameter." msgstr "Ajout du paramètre *file*." -#: library/dis.rst:151 +#: library/dis.rst:167 msgid "" "Disassemble the *x* object. *x* can denote either a module, a class, a " "method, a function, a generator, an asynchronous generator, a coroutine, a " @@ -263,7 +276,7 @@ msgstr "" "`compile` avant qu'elles ne soient désassemblées. Si aucun objet n'est " "fourni, cette fonction désassemble les dernières traces d'appel." -#: library/dis.rst:186 library/dis.rst:210 +#: library/dis.rst:205 library/dis.rst:232 msgid "" "The disassembly is written as text to the supplied *file* argument if " "provided and to ``sys.stdout`` otherwise." @@ -271,7 +284,7 @@ msgstr "" "Le désassemblage est envoyé sous forme de texte à l'argument du fichier " "*file* si il est fourni, et à ``sys.stdout`` sinon." -#: library/dis.rst:167 +#: library/dis.rst:183 msgid "" "The maximal depth of recursion is limited by *depth* unless it is ``None``. " "``depth=0`` means no recursion." @@ -279,13 +292,13 @@ msgstr "" "La profondeur maximale de récursion est limitée par *depth* sauf si elle " "correspond à ``None``. ``depth=0`` indique qu'il n'y a pas de récursion." -#: library/dis.rst:173 +#: library/dis.rst:189 msgid "Implemented recursive disassembling and added *depth* parameter." msgstr "" "Le désassemblage récursif a été implémenté, et le paramètre *depth* a été " "ajouté." -#: library/dis.rst:182 +#: library/dis.rst:201 msgid "" "Disassemble the top-of-stack function of a traceback, using the last " "traceback if none was passed. The instruction causing the exception is " @@ -295,7 +308,7 @@ msgstr "" "la dernière trace d'appels si rien n'a été envoyé. L'instruction à l'origine " "de l'exception est indiquée." -#: library/dis.rst:196 +#: library/dis.rst:218 msgid "" "Disassemble a code object, indicating the last instruction if *lasti* was " "provided. The output is divided in the following columns:" @@ -303,35 +316,35 @@ msgstr "" "Désassemble un code objet, en indiquant la dernière instruction si *lasti* " "est fournie. La sortie est répartie sur les colonnes suivantes :" -#: library/dis.rst:199 +#: library/dis.rst:221 msgid "the line number, for the first instruction of each line" msgstr "le numéro de ligne, pour la première instruction de chaque ligne" -#: library/dis.rst:200 +#: library/dis.rst:222 msgid "the current instruction, indicated as ``-->``," msgstr "l'instruction en cours, indiquée par ``-->``," -#: library/dis.rst:201 +#: library/dis.rst:223 msgid "a labelled instruction, indicated with ``>>``," msgstr "une instruction libellée, indiquée par ``> >``," -#: library/dis.rst:202 +#: library/dis.rst:224 msgid "the address of the instruction," msgstr "l'adresse de l'instruction," -#: library/dis.rst:203 +#: library/dis.rst:225 msgid "the operation code name," msgstr "le nom de le code d'opération," -#: library/dis.rst:204 +#: library/dis.rst:226 msgid "operation parameters, and" msgstr "paramètres de l'opération, et" -#: library/dis.rst:205 +#: library/dis.rst:227 msgid "interpretation of the parameters in parentheses." msgstr "interprétation des paramètres entre parenthèses." -#: library/dis.rst:207 +#: library/dis.rst:229 msgid "" "The parameter interpretation recognizes local and global variable names, " "constant values, branch targets, and compare operators." @@ -340,7 +353,7 @@ msgstr "" "globales, des valeurs constantes, des branchements cibles, et des opérateurs " "de comparaison." -#: library/dis.rst:219 +#: library/dis.rst:244 msgid "" "Return an iterator over the instructions in the supplied function, method, " "source code string or code object." @@ -348,7 +361,7 @@ msgstr "" "Retourne un itérateur sur les instructions dans la fonction fournie, la " "méthode, les chaînes de caractères du code source ou objet." -#: library/dis.rst:222 +#: library/dis.rst:247 msgid "" "The iterator generates a series of :class:`Instruction` named tuples giving " "the details of each operation in the supplied code." @@ -356,7 +369,7 @@ msgstr "" "Cet itérateur génère une série de *n*-uplets de :class:`Instruction` qui " "donnent les détails de chacune des opérations dans le code fourni." -#: library/dis.rst:235 +#: library/dis.rst:263 msgid "" "This generator function uses the ``co_firstlineno`` and ``co_lnotab`` " "attributes of the code object *code* to find the offsets which are starts of " @@ -365,23 +378,23 @@ msgid "" "to decode it." msgstr "" -#: library/dis.rst:241 +#: library/dis.rst:269 msgid "Line numbers can be decreasing. Before, they were always increasing." msgstr "" "Les numéros de lignes peuvent être décroissants. Avant, ils étaient toujours " "croissants." -#: library/dis.rst:247 +#: library/dis.rst:275 msgid "" "Detect all offsets in the raw compiled bytecode string *code* which are jump " "targets, and return a list of these offsets." msgstr "" -#: library/dis.rst:253 +#: library/dis.rst:281 msgid "Compute the stack effect of *opcode* with argument *oparg*." msgstr "" -#: library/dis.rst:255 +#: library/dis.rst:283 msgid "" "If the code has a jump target and *jump* is ``True``, :func:`~stack_effect` " "will return the stack effect of jumping. If *jump* is ``False``, it will " @@ -389,16 +402,16 @@ msgid "" "it will return the maximal stack effect of both cases." msgstr "" -#: library/dis.rst:262 +#: library/dis.rst:290 #, fuzzy msgid "Added *jump* parameter." msgstr "Ajout du paramètre *file*." -#: library/dis.rst:269 +#: library/dis.rst:297 msgid "Python Bytecode Instructions" msgstr "Les instructions du code intermédiaire en Python" -#: library/dis.rst:271 +#: library/dis.rst:299 msgid "" "The :func:`get_instructions` function and :class:`Bytecode` class provide " "details of bytecode instructions as :class:`Instruction` instances:" @@ -407,11 +420,11 @@ msgstr "" "des détails sur le code intermédiaire des instructions comme :class:" "`Instruction` instances:" -#: library/dis.rst:276 +#: library/dis.rst:304 msgid "Details for a bytecode operation" msgstr "Détails sur le code intermédiaire de l'opération" -#: library/dis.rst:280 +#: library/dis.rst:308 msgid "" "numeric code for operation, corresponding to the opcode values listed below " "and the bytecode values in the :ref:`opcode_collections`." @@ -420,185 +433,128 @@ msgstr "" "dessous et les valeurs du code intermédiaire dans la :ref:" "`opcode_collections`." -#: library/dis.rst:286 +#: library/dis.rst:314 msgid "human readable name for operation" msgstr "nom lisible/compréhensible de l'opération" -#: library/dis.rst:291 +#: library/dis.rst:319 msgid "numeric argument to operation (if any), otherwise ``None``" msgstr "le cas échéant, argument numérique de l'opération sinon ``None``" -#: library/dis.rst:296 -msgid "resolved arg value (if known), otherwise same as arg" -msgstr "" +#: library/dis.rst:324 +#, fuzzy +msgid "resolved arg value (if any), otherwise ``None``" +msgstr "le cas échéant, argument numérique de l'opération sinon ``None``" -#: library/dis.rst:301 -msgid "human readable description of operation argument" +#: library/dis.rst:329 +msgid "" +"human readable description of operation argument (if any), otherwise an " +"empty string." msgstr "" -#: library/dis.rst:306 +#: library/dis.rst:335 msgid "start index of operation within bytecode sequence" msgstr "" -#: library/dis.rst:311 +#: library/dis.rst:340 msgid "line started by this opcode (if any), otherwise ``None``" msgstr "" -#: library/dis.rst:316 +#: library/dis.rst:345 msgid "``True`` if other code jumps to here, otherwise ``False``" msgstr "" -#: library/dis.rst:321 +#: library/dis.rst:350 msgid "" -"The Python compiler currently generates the following bytecode instructions." +":class:`dis.Positions` object holding the start and end locations that are " +"covered by this instruction." msgstr "" -#: library/dis.rst:324 -msgid "**General instructions**" +#: library/dis.rst:357 +msgid "Field ``positions`` is added." msgstr "" -#: library/dis.rst:328 -msgid "Do nothing code. Used as a placeholder by the bytecode optimizer." +#: library/dis.rst:362 +msgid "In case the information is not available, some fields might be `None`." msgstr "" -#: library/dis.rst:333 -msgid "Removes the top-of-stack (TOS) item." +#: library/dis.rst:372 +msgid "" +"The Python compiler currently generates the following bytecode instructions." msgstr "" -#: library/dis.rst:338 -msgid "Swaps the two top-most stack items." +#: library/dis.rst:375 +msgid "**General instructions**" msgstr "" -#: library/dis.rst:343 +#: library/dis.rst:379 msgid "" -"Lifts second and third stack item one position up, moves top down to " -"position three." +"Do nothing code. Used as a placeholder by the bytecode optimizer, and to " +"generate line tracing events." msgstr "" -#: library/dis.rst:349 -msgid "" -"Lifts second, third and fourth stack items one position up, moves top down " -"to position four." +#: library/dis.rst:385 +msgid "Removes the top-of-stack (TOS) item." msgstr "" -#: library/dis.rst:357 -msgid "Duplicates the reference on top of the stack." +#: library/dis.rst:390 +msgid "" +"Push the *i*-th item to the top of the stack. The item is not removed from " +"its original location." msgstr "" -#: library/dis.rst:364 -msgid "" -"Duplicates the two references on top of the stack, leaving them in the same " -"order." +#: library/dis.rst:398 +msgid "Swap TOS with the item at position *i*." msgstr "" -#: library/dis.rst:370 +#: library/dis.rst:403 msgid "**Unary operations**" msgstr "" -#: library/dis.rst:372 +#: library/dis.rst:405 msgid "" "Unary operations take the top of the stack, apply the operation, and push " "the result back on the stack." msgstr "" -#: library/dis.rst:377 +#: library/dis.rst:410 msgid "Implements ``TOS = +TOS``." msgstr "" -#: library/dis.rst:382 +#: library/dis.rst:415 msgid "Implements ``TOS = -TOS``." msgstr "" -#: library/dis.rst:387 +#: library/dis.rst:420 msgid "Implements ``TOS = not TOS``." msgstr "" -#: library/dis.rst:392 +#: library/dis.rst:425 msgid "Implements ``TOS = ~TOS``." msgstr "" -#: library/dis.rst:397 +#: library/dis.rst:430 msgid "Implements ``TOS = iter(TOS)``." msgstr "" -#: library/dis.rst:402 +#: library/dis.rst:435 msgid "" "If ``TOS`` is a :term:`generator iterator` or :term:`coroutine` object it is " "left as is. Otherwise, implements ``TOS = iter(TOS)``." msgstr "" -#: library/dis.rst:408 -msgid "**Binary operations**" +#: library/dis.rst:441 +msgid "**Binary and in-place operations**" msgstr "" -#: library/dis.rst:410 +#: library/dis.rst:443 msgid "" "Binary operations remove the top of the stack (TOS) and the second top-most " "stack item (TOS1) from the stack. They perform the operation, and put the " "result back on the stack." msgstr "" -#: library/dis.rst:416 -msgid "Implements ``TOS = TOS1 ** TOS``." -msgstr "" - -#: library/dis.rst:421 -msgid "Implements ``TOS = TOS1 * TOS``." -msgstr "" - -#: library/dis.rst:426 -msgid "Implements ``TOS = TOS1 @ TOS``." -msgstr "" - -#: library/dis.rst:433 -msgid "Implements ``TOS = TOS1 // TOS``." -msgstr "" - -#: library/dis.rst:438 -msgid "Implements ``TOS = TOS1 / TOS``." -msgstr "" - -#: library/dis.rst:443 -msgid "Implements ``TOS = TOS1 % TOS``." -msgstr "" - -#: library/dis.rst:448 -msgid "Implements ``TOS = TOS1 + TOS``." -msgstr "" - -#: library/dis.rst:453 -msgid "Implements ``TOS = TOS1 - TOS``." -msgstr "" - -#: library/dis.rst:458 -msgid "Implements ``TOS = TOS1[TOS]``." -msgstr "" - -#: library/dis.rst:463 -msgid "Implements ``TOS = TOS1 << TOS``." -msgstr "" - -#: library/dis.rst:468 -msgid "Implements ``TOS = TOS1 >> TOS``." -msgstr "" - -#: library/dis.rst:473 -msgid "Implements ``TOS = TOS1 & TOS``." -msgstr "" - -#: library/dis.rst:478 -msgid "Implements ``TOS = TOS1 ^ TOS``." -msgstr "" - -#: library/dis.rst:483 -msgid "Implements ``TOS = TOS1 | TOS``." -msgstr "" - -#: library/dis.rst:486 -msgid "**In-place operations**" -msgstr "" - -#: library/dis.rst:488 +#: library/dis.rst:447 msgid "" "In-place operations are like binary operations, in that they remove TOS and " "TOS1, and push the result back on the stack, but the operation is done in-" @@ -606,142 +562,119 @@ msgid "" "to be) the original TOS1." msgstr "" -#: library/dis.rst:495 -msgid "Implements in-place ``TOS = TOS1 ** TOS``." -msgstr "" - -#: library/dis.rst:500 -msgid "Implements in-place ``TOS = TOS1 * TOS``." -msgstr "" - -#: library/dis.rst:505 -msgid "Implements in-place ``TOS = TOS1 @ TOS``." -msgstr "" - -#: library/dis.rst:512 -msgid "Implements in-place ``TOS = TOS1 // TOS``." -msgstr "" - -#: library/dis.rst:517 -msgid "Implements in-place ``TOS = TOS1 / TOS``." -msgstr "" - -#: library/dis.rst:522 -msgid "Implements in-place ``TOS = TOS1 % TOS``." -msgstr "" - -#: library/dis.rst:527 -msgid "Implements in-place ``TOS = TOS1 + TOS``." -msgstr "" - -#: library/dis.rst:532 -msgid "Implements in-place ``TOS = TOS1 - TOS``." +#: library/dis.rst:455 +msgid "" +"Implements the binary and in-place operators (depending on the value of " +"*op*)." msgstr "" -#: library/dis.rst:537 -msgid "Implements in-place ``TOS = TOS1 << TOS``." +#: library/dis.rst:463 +msgid "Implements ``TOS = TOS1[TOS]``." msgstr "" -#: library/dis.rst:542 -msgid "Implements in-place ``TOS = TOS1 >> TOS``." +#: library/dis.rst:468 +msgid "Implements ``TOS1[TOS] = TOS2``." msgstr "" -#: library/dis.rst:547 -msgid "Implements in-place ``TOS = TOS1 & TOS``." +#: library/dis.rst:473 +msgid "Implements ``del TOS1[TOS]``." msgstr "" -#: library/dis.rst:552 -msgid "Implements in-place ``TOS = TOS1 ^ TOS``." +#: library/dis.rst:476 +msgid "**Coroutine opcodes**" msgstr "" -#: library/dis.rst:557 -msgid "Implements in-place ``TOS = TOS1 | TOS``." +#: library/dis.rst:480 +msgid "" +"Implements ``TOS = get_awaitable(TOS)``, where ``get_awaitable(o)`` returns " +"``o`` if ``o`` is a coroutine object or a generator object with the " +"CO_ITERABLE_COROUTINE flag, or resolves ``o.__await__``." msgstr "" -#: library/dis.rst:562 -msgid "Implements ``TOS1[TOS] = TOS2``." +#: library/dis.rst:485 +msgid "" +"If the ``where`` operand is nonzero, it indicates where the instruction " +"occurs:" msgstr "" -#: library/dis.rst:567 -msgid "Implements ``del TOS1[TOS]``." +#: library/dis.rst:488 +msgid "``1`` After a call to ``__aenter__``" msgstr "" -#: library/dis.rst:570 -msgid "**Coroutine opcodes**" +#: library/dis.rst:489 +msgid "``2`` After a call to ``__aexit__``" msgstr "" -#: library/dis.rst:574 -msgid "" -"Implements ``TOS = get_awaitable(TOS)``, where ``get_awaitable(o)`` returns " -"``o`` if ``o`` is a coroutine object or a generator object with the " -"CO_ITERABLE_COROUTINE flag, or resolves ``o.__await__``." +#: library/dis.rst:493 +msgid "Previously, this instruction did not have an oparg." msgstr "" -#: library/dis.rst:584 +#: library/dis.rst:499 msgid "Implements ``TOS = TOS.__aiter__()``." msgstr "" -#: library/dis.rst:587 +#: library/dis.rst:502 msgid "Returning awaitable objects from ``__aiter__`` is no longer supported." msgstr "" -#: library/dis.rst:594 +#: library/dis.rst:509 msgid "" "Implements ``PUSH(get_awaitable(TOS.__anext__()))``. See ``GET_AWAITABLE`` " "for details about ``get_awaitable``" msgstr "" -#: library/dis.rst:602 +#: library/dis.rst:517 msgid "" "Terminates an :keyword:`async for` loop. Handles an exception raised when " -"awaiting a next item. If TOS is :exc:`StopAsyncIteration` pop 7 values from " -"the stack and restore the exception state using the second three of them. " -"Otherwise re-raise the exception using the three values from the stack. An " +"awaiting a next item. If TOS is :exc:`StopAsyncIteration` pop 3 values from " +"the stack and restore the exception state using the second of them. " +"Otherwise re-raise the exception using the value from the stack. An " "exception handler block is removed from the block stack." msgstr "" -#: library/dis.rst:613 +#: library/dis.rst:609 library/dis.rst:620 msgid "" -"Resolves ``__aenter__`` and ``__aexit__`` from the object on top of the " -"stack. Pushes ``__aexit__`` and result of ``__aenter__()`` to the stack." +"Exception representation on the stack now consist of one, not three, items." msgstr "" -#: library/dis.rst:621 -msgid "Creates a new frame object." +#: library/dis.rst:530 +msgid "" +"Resolves ``__aenter__`` and ``__aexit__`` from the object on top of the " +"stack. Pushes ``__aexit__`` and result of ``__aenter__()`` to the stack." msgstr "" -#: library/dis.rst:627 +#: library/dis.rst:537 msgid "**Miscellaneous opcodes**" msgstr "" -#: library/dis.rst:631 +#: library/dis.rst:541 msgid "" "Implements the expression statement for the interactive mode. TOS is " "removed from the stack and printed. In non-interactive mode, an expression " "statement is terminated with :opcode:`POP_TOP`." msgstr "" -#: library/dis.rst:638 +#: library/dis.rst:548 msgid "" "Calls ``set.add(TOS1[-i], TOS)``. Used to implement set comprehensions." msgstr "" -#: library/dis.rst:643 +#: library/dis.rst:553 msgid "" "Calls ``list.append(TOS1[-i], TOS)``. Used to implement list comprehensions." msgstr "" -#: library/dis.rst:648 +#: library/dis.rst:558 msgid "" "Calls ``dict.__setitem__(TOS1[-i], TOS1, TOS)``. Used to implement dict " "comprehensions." msgstr "" -#: library/dis.rst:652 +#: library/dis.rst:562 msgid "Map value is TOS and map key is TOS1. Before, those were reversed." msgstr "" -#: library/dis.rst:655 +#: library/dis.rst:565 msgid "" "For all of the :opcode:`SET_ADD`, :opcode:`LIST_APPEND` and :opcode:" "`MAP_ADD` instructions, while the added value or key/value pair is popped " @@ -749,19 +682,19 @@ msgid "" "further iterations of the loop." msgstr "" -#: library/dis.rst:663 +#: library/dis.rst:573 msgid "Returns with TOS to the caller of the function." msgstr "" -#: library/dis.rst:668 +#: library/dis.rst:578 msgid "Pops TOS and yields it from a :term:`generator`." msgstr "" -#: library/dis.rst:673 +#: library/dis.rst:583 msgid "Pops TOS and delegates to it as a subiterator from a :term:`generator`." msgstr "" -#: library/dis.rst:680 +#: library/dis.rst:590 msgid "" "Checks whether ``__annotations__`` is defined in ``locals()``, if not it is " "set up to an empty ``dict``. This opcode is only emitted if a class or " @@ -769,87 +702,150 @@ msgid "" "statically." msgstr "" -#: library/dis.rst:690 +#: library/dis.rst:600 msgid "" "Loads all symbols not starting with ``'_'`` directly from the module TOS to " "the local namespace. The module is popped after loading all names. This " "opcode implements ``from module import *``." msgstr "" -#: library/dis.rst:697 +#: library/dis.rst:607 msgid "" -"Removes one block from the block stack. Per frame, there is a stack of " -"blocks, denoting :keyword:`try` statements, and such." +"Pops a value from the stack, which is used to restore the exception state." msgstr "" -#: library/dis.rst:703 +#: library/dis.rst:614 msgid "" -"Removes one block from the block stack. The popped block must be an " -"exception handler block, as implicitly created when entering an except " -"handler. In addition to popping extraneous values from the frame stack, the " -"last three popped values are used to restore the exception state." +"Re-raises the exception currently on top of the stack. If oparg is non-zero, " +"pops an additional value from the stack which is used to set ``f_lasti`` of " +"the current frame." msgstr "" -#: library/dis.rst:711 -msgid "Re-raises the exception currently on top of the stack." +#: library/dis.rst:625 +msgid "" +"Pops a value from the stack. Pushes the current exception to the top of the " +"stack. Pushes the value originally popped back to the stack. Used in " +"exception handlers." msgstr "" -#: library/dis.rst:718 +#: library/dis.rst:633 msgid "" -"Calls the function in position 7 on the stack with the top three items on " -"the stack as arguments. Used to implement the call ``context_manager." -"__exit__(*exc_info())`` when an exception has occurred in a :keyword:`with` " -"statement." +"Performs exception matching for ``except``. Tests whether the TOS1 is an " +"exception matching TOS. Pops TOS and pushes the boolean result of the test." msgstr "" -#: library/dis.rst:728 +#: library/dis.rst:640 +msgid "" +"Performs exception matching for ``except*``. Applies ``split(TOS)`` on the " +"exception group representing TOS1." +msgstr "" + +#: library/dis.rst:643 +msgid "" +"In case of a match, pops two items from the stack and pushes the non-" +"matching subgroup (``None`` in case of full match) followed by the matching " +"subgroup. When there is no match, pops one item (the match type) and pushes " +"``None``." +msgstr "" + +#: library/dis.rst:652 +msgid "" +"Combines the raised and reraised exceptions list from TOS, into an exception " +"group to propagate from a try-except* block. Uses the original exception " +"group from TOS1 to reconstruct the structure of reraised exceptions. Pops " +"two items from the stack and pushes the exception to reraise or ``None`` if " +"there isn't one." +msgstr "" + +#: library/dis.rst:662 +msgid "" +"Calls the function in position 4 on the stack with arguments (type, val, tb) " +"representing the exception at the top of the stack. Used to implement the " +"call ``context_manager.__exit__(*exc_info())`` when an exception has " +"occurred in a :keyword:`with` statement." +msgstr "" + +#: library/dis.rst:669 +msgid "" +"The ``__exit__`` function is in position 4 of the stack rather than 7. " +"Exception representation on the stack now consist of one, not three, items." +msgstr "" + +#: library/dis.rst:676 msgid "" "Pushes :exc:`AssertionError` onto the stack. Used by the :keyword:`assert` " "statement." msgstr "" -#: library/dis.rst:736 +#: library/dis.rst:684 msgid "" "Pushes :func:`builtins.__build_class__` onto the stack. It is later called " -"by :opcode:`CALL_FUNCTION` to construct a class." +"to construct a class." msgstr "" -#: library/dis.rst:742 +#: library/dis.rst:690 msgid "" "This opcode performs several operations before a with block starts. First, " "it loads :meth:`~object.__exit__` from the context manager and pushes it " -"onto the stack for later use by :opcode:`WITH_CLEANUP_START`. Then, :meth:" -"`~object.__enter__` is called, and a finally block pointing to *delta* is " -"pushed. Finally, the result of calling the ``__enter__()`` method is pushed " -"onto the stack. The next opcode will either ignore it (:opcode:`POP_TOP`), " -"or store it in (a) variable(s) (:opcode:`STORE_FAST`, :opcode:`STORE_NAME`, " -"or :opcode:`UNPACK_SEQUENCE`)." +"onto the stack for later use by :opcode:`WITH_EXCEPT_START`. Then, :meth:" +"`~object.__enter__` is called. Finally, the result of calling the " +"``__enter__()`` method is pushed onto the stack." msgstr "" -#: library/dis.rst:754 -msgid "All of the following opcodes use their arguments." +#: library/dis.rst:701 +msgid "Push ``len(TOS)`` onto the stack." msgstr "" -#: library/dis.rst:758 +#: library/dis.rst:708 +msgid "" +"If TOS is an instance of :class:`collections.abc.Mapping` (or, more " +"technically: if it has the :const:`Py_TPFLAGS_MAPPING` flag set in its :c:" +"member:`~PyTypeObject.tp_flags`), push ``True`` onto the stack. Otherwise, " +"push ``False``." +msgstr "" + +#: library/dis.rst:718 +msgid "" +"If TOS is an instance of :class:`collections.abc.Sequence` and is *not* an " +"instance of :class:`str`/:class:`bytes`/:class:`bytearray` (or, more " +"technically: if it has the :const:`Py_TPFLAGS_SEQUENCE` flag set in its :c:" +"member:`~PyTypeObject.tp_flags`), push ``True`` onto the stack. Otherwise, " +"push ``False``." +msgstr "" + +#: library/dis.rst:728 +msgid "" +"TOS is a tuple of mapping keys, and TOS1 is the match subject. If TOS1 " +"contains all of the keys in TOS, push a :class:`tuple` containing the " +"corresponding values. Otherwise, push ``None``." +msgstr "" + +#: library/dis.rst:1279 +msgid "" +"Previously, this instruction also pushed a boolean value indicating success " +"(``True``) or failure (``False``)." +msgstr "" + +#: library/dis.rst:741 msgid "" "Implements ``name = TOS``. *namei* is the index of *name* in the attribute :" "attr:`co_names` of the code object. The compiler tries to use :opcode:" "`STORE_FAST` or :opcode:`STORE_GLOBAL` if possible." msgstr "" -#: library/dis.rst:765 +#: library/dis.rst:748 msgid "" "Implements ``del name``, where *namei* is the index into :attr:`co_names` " "attribute of the code object." msgstr "" -#: library/dis.rst:771 +#: library/dis.rst:754 msgid "" "Unpacks TOS into *count* individual values, which are put onto the stack " "right-to-left." msgstr "" -#: library/dis.rst:777 +#: library/dis.rst:760 msgid "" "Implements assignment with a starred target: Unpacks an iterable in TOS into " "individual values, where the total number of values can be smaller than the " @@ -857,119 +853,119 @@ msgid "" "leftover items." msgstr "" -#: library/dis.rst:782 +#: library/dis.rst:765 msgid "" "The low byte of *counts* is the number of values before the list value, the " "high byte of *counts* the number of values after it. The resulting values " "are put onto the stack right-to-left." msgstr "" -#: library/dis.rst:789 +#: library/dis.rst:772 msgid "" "Implements ``TOS.name = TOS1``, where *namei* is the index of name in :attr:" "`co_names`." msgstr "" -#: library/dis.rst:795 +#: library/dis.rst:778 msgid "" "Implements ``del TOS.name``, using *namei* as index into :attr:`co_names`." msgstr "" -#: library/dis.rst:800 +#: library/dis.rst:783 msgid "Works as :opcode:`STORE_NAME`, but stores the name as a global." msgstr "" -#: library/dis.rst:805 +#: library/dis.rst:788 msgid "Works as :opcode:`DELETE_NAME`, but deletes a global name." msgstr "" -#: library/dis.rst:810 +#: library/dis.rst:793 msgid "Pushes ``co_consts[consti]`` onto the stack." msgstr "" -#: library/dis.rst:815 +#: library/dis.rst:798 msgid "Pushes the value associated with ``co_names[namei]`` onto the stack." msgstr "" -#: library/dis.rst:820 +#: library/dis.rst:803 msgid "" "Creates a tuple consuming *count* items from the stack, and pushes the " "resulting tuple onto the stack." msgstr "" -#: library/dis.rst:826 +#: library/dis.rst:809 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a list." msgstr "" -#: library/dis.rst:831 +#: library/dis.rst:814 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a set." msgstr "" -#: library/dis.rst:836 +#: library/dis.rst:819 msgid "" "Pushes a new dictionary object onto the stack. Pops ``2 * count`` items so " "that the dictionary holds *count* entries: ``{..., TOS3: TOS2, TOS1: TOS}``." msgstr "" -#: library/dis.rst:840 +#: library/dis.rst:823 msgid "" "The dictionary is created from stack items instead of creating an empty " "dictionary pre-sized to hold *count* items." msgstr "" -#: library/dis.rst:847 +#: library/dis.rst:830 msgid "" "The version of :opcode:`BUILD_MAP` specialized for constant keys. Pops the " "top element on the stack which contains a tuple of keys, then starting from " "``TOS1``, pops *count* values to form values in the built dictionary." msgstr "" -#: library/dis.rst:856 +#: library/dis.rst:839 msgid "" "Concatenates *count* strings from the stack and pushes the resulting string " "onto the stack." msgstr "" -#: library/dis.rst:864 +#: library/dis.rst:847 msgid "" "Pops a list from the stack and pushes a tuple containing the same values." msgstr "" -#: library/dis.rst:871 +#: library/dis.rst:854 msgid "Calls ``list.extend(TOS1[-i], TOS)``. Used to build lists." msgstr "" -#: library/dis.rst:878 +#: library/dis.rst:861 msgid "Calls ``set.update(TOS1[-i], TOS)``. Used to build sets." msgstr "" -#: library/dis.rst:885 +#: library/dis.rst:868 msgid "Calls ``dict.update(TOS1[-i], TOS)``. Used to build dicts." msgstr "" -#: library/dis.rst:892 +#: library/dis.rst:875 msgid "Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys." msgstr "" -#: library/dis.rst:899 +#: library/dis.rst:882 msgid "Replaces TOS with ``getattr(TOS, co_names[namei])``." msgstr "" -#: library/dis.rst:904 +#: library/dis.rst:887 msgid "" "Performs a Boolean operation. The operation name can be found in " "``cmp_op[opname]``." msgstr "" -#: library/dis.rst:910 +#: library/dis.rst:893 msgid "Performs ``is`` comparison, or ``is not`` if ``invert`` is 1." msgstr "" -#: library/dis.rst:917 +#: library/dis.rst:900 msgid "Performs ``in`` comparison, or ``not in`` if ``invert`` is 1." msgstr "" -#: library/dis.rst:924 +#: library/dis.rst:907 msgid "" "Imports the module ``co_names[namei]``. TOS and TOS1 are popped and provide " "the *fromlist* and *level* arguments of :func:`__import__`. The module " @@ -978,48 +974,86 @@ msgid "" "modifies the namespace." msgstr "" -#: library/dis.rst:933 +#: library/dis.rst:916 msgid "" "Loads the attribute ``co_names[namei]`` from the module found in TOS. The " "resulting object is pushed onto the stack, to be subsequently stored by a :" "opcode:`STORE_FAST` instruction." msgstr "" -#: library/dis.rst:940 +#: library/dis.rst:923 msgid "Increments bytecode counter by *delta*." msgstr "" -#: library/dis.rst:945 -msgid "If TOS is true, sets the bytecode counter to *target*. TOS is popped." +#: library/dis.rst:928 +msgid "Decrements bytecode counter by *delta*. Checks for interrupts." +msgstr "" + +#: library/dis.rst:935 +msgid "Decrements bytecode counter by *delta*. Does not check for interrupts." msgstr "" -#: library/dis.rst:952 -msgid "If TOS is false, sets the bytecode counter to *target*. TOS is popped." +#: library/dis.rst:942 +msgid "" +"If TOS is true, increments the bytecode counter by *delta*. TOS is popped." +msgstr "" + +#: library/dis.rst:949 +msgid "" +"If TOS is true, decrements the bytecode counter by *delta*. TOS is popped." +msgstr "" + +#: library/dis.rst:956 +msgid "" +"If TOS is false, increments the bytecode counter by *delta*. TOS is popped." +msgstr "" + +#: library/dis.rst:963 +msgid "" +"If TOS is false, decrements the bytecode counter by *delta*. TOS is popped." msgstr "" -#: library/dis.rst:958 +#: library/dis.rst:970 msgid "" -"Tests whether the second value on the stack is an exception matching TOS, " -"and jumps if it is not. Pops two values from the stack." +"If TOS is not ``None``, increments the bytecode counter by *delta*. TOS is " +"popped." msgstr "" -#: library/dis.rst:966 +#: library/dis.rst:977 msgid "" -"If TOS is true, sets the bytecode counter to *target* and leaves TOS on the " -"stack. Otherwise (TOS is false), TOS is popped." +"If TOS is not ``None``, decrements the bytecode counter by *delta*. TOS is " +"popped." msgstr "" -#: library/dis.rst:974 +#: library/dis.rst:984 msgid "" -"If TOS is false, sets the bytecode counter to *target* and leaves TOS on the " -"stack. Otherwise (TOS is true), TOS is popped." +"If TOS is ``None``, increments the bytecode counter by *delta*. TOS is " +"popped." msgstr "" -#: library/dis.rst:982 -msgid "Set bytecode counter to *target*." +#: library/dis.rst:991 +msgid "" +"If TOS is ``None``, decrements the bytecode counter by *delta*. TOS is " +"popped." msgstr "" -#: library/dis.rst:987 +#: library/dis.rst:998 +msgid "" +"If TOS is true, increments the bytecode counter by *delta* and leaves TOS on " +"the stack. Otherwise (TOS is false), TOS is popped." +msgstr "" + +#: library/dis.rst:1013 +msgid "The oparg is now a relative delta rather than an absolute target." +msgstr "" + +#: library/dis.rst:1008 +msgid "" +"If TOS is false, increments the bytecode counter by *delta* and leaves TOS " +"on the stack. Otherwise (TOS is true), TOS is popped." +msgstr "" + +#: library/dis.rst:1019 msgid "" "TOS is an :term:`iterator`. Call its :meth:`~iterator.__next__` method. If " "this yields a new value, push it on the stack (leaving the iterator below " @@ -1027,117 +1061,151 @@ msgid "" "code counter is incremented by *delta*." msgstr "" -#: library/dis.rst:995 -msgid "Loads the global named ``co_names[namei]`` onto the stack." +#: library/dis.rst:1027 +msgid "Loads the global named ``co_names[namei>>1]`` onto the stack." msgstr "" -#: library/dis.rst:1000 +#: library/dis.rst:1029 msgid "" -"Pushes a try block from a try-finally or try-except clause onto the block " -"stack. *delta* points to the finally block or the first except block." +"If the low bit of ``namei`` is set, then a ``NULL`` is pushed to the stack " +"before the global variable." msgstr "" -#: library/dis.rst:1006 +#: library/dis.rst:1035 msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack." msgstr "" -#: library/dis.rst:1011 +#: library/dis.rst:1040 msgid "Stores TOS into the local ``co_varnames[var_num]``." msgstr "" -#: library/dis.rst:1016 +#: library/dis.rst:1045 msgid "Deletes local ``co_varnames[var_num]``." msgstr "" -#: library/dis.rst:1021 +#: library/dis.rst:1050 msgid "" -"Pushes a reference to the cell contained in slot *i* of the cell and free " -"variable storage. The name of the variable is ``co_cellvars[i]`` if *i* is " -"less than the length of *co_cellvars*. Otherwise it is ``co_freevars[i - " -"len(co_cellvars)]``." +"Creates a new cell in slot ``i``. If that slot is empty then that value is " +"stored into the new cell." msgstr "" -#: library/dis.rst:1029 +#: library/dis.rst:1058 msgid "" -"Loads the cell contained in slot *i* of the cell and free variable storage. " +"Pushes a reference to the cell contained in slot ``i`` of the \"fast " +"locals\" storage. The name of the variable is ``co_fastlocalnames[i]``." +msgstr "" + +#: library/dis.rst:1061 +msgid "" +"Note that ``LOAD_CLOSURE`` is effectively an alias for ``LOAD_FAST``. It " +"exists to keep bytecode a little more readable." +msgstr "" + +#: library/dis.rst:1073 library/dis.rst:1094 library/dis.rst:1105 +msgid "``i`` is no longer offset by the length of ``co_varnames``." +msgstr "" + +#: library/dis.rst:1070 +msgid "" +"Loads the cell contained in slot ``i`` of the \"fast locals\" storage. " "Pushes a reference to the object the cell contains on the stack." msgstr "" -#: library/dis.rst:1035 +#: library/dis.rst:1079 msgid "" "Much like :opcode:`LOAD_DEREF` but first checks the locals dictionary before " "consulting the cell. This is used for loading free variables in class " "bodies." msgstr "" -#: library/dis.rst:1044 +#: library/dis.rst:1091 msgid "" -"Stores TOS into the cell contained in slot *i* of the cell and free variable " +"Stores TOS into the cell contained in slot ``i`` of the \"fast locals\" " "storage." msgstr "" -#: library/dis.rst:1050 +#: library/dis.rst:1100 msgid "" -"Empties the cell contained in slot *i* of the cell and free variable " -"storage. Used by the :keyword:`del` statement." +"Empties the cell contained in slot ``i`` of the \"fast locals\" storage. " +"Used by the :keyword:`del` statement." msgstr "" -#: library/dis.rst:1058 +#: library/dis.rst:1111 +msgid "" +"Copies the ``n`` free variables from the closure into the frame. Removes the " +"need for special code on the caller's side when calling closures." +msgstr "" + +#: library/dis.rst:1120 msgid "" "Raises an exception using one of the 3 forms of the ``raise`` statement, " "depending on the value of *argc*:" msgstr "" -#: library/dis.rst:1061 +#: library/dis.rst:1123 msgid "0: ``raise`` (re-raise previous exception)" msgstr "" -#: library/dis.rst:1062 +#: library/dis.rst:1124 msgid "1: ``raise TOS`` (raise exception instance or type at ``TOS``)" msgstr "" -#: library/dis.rst:1063 +#: library/dis.rst:1125 msgid "" "2: ``raise TOS1 from TOS`` (raise exception instance or type at ``TOS1`` " "with ``__cause__`` set to ``TOS``)" msgstr "" -#: library/dis.rst:1069 +#: library/dis.rst:1131 msgid "" -"Calls a callable object with positional arguments. *argc* indicates the " -"number of positional arguments. The top of the stack contains positional " -"arguments, with the right-most argument on top. Below the arguments is a " -"callable object to call. ``CALL_FUNCTION`` pops all arguments and the " -"callable object off the stack, calls the callable object with those " -"arguments, and pushes the return value returned by the callable object." +"Calls a callable object with the number of arguments specified by ``argc``, " +"including the named arguments specified by the preceding :opcode:`KW_NAMES`, " +"if any. On the stack are (in ascending order), either:" +msgstr "" + +#: library/dis.rst:1136 +msgid "NULL" msgstr "" -#: library/dis.rst:1077 -msgid "This opcode is used only for calls with positional arguments." +#: library/dis.rst:1143 +msgid "The callable" msgstr "" -#: library/dis.rst:1083 +#: library/dis.rst:1138 +msgid "The positional arguments" +msgstr "" + +#: library/dis.rst:1146 +msgid "The named arguments" +msgstr "" + +#: library/dis.rst:1141 +msgid "or:" +msgstr "" + +#: library/dis.rst:1144 +msgid "``self``" +msgstr "" + +#: library/dis.rst:1145 +msgid "The remaining positional arguments" +msgstr "" + +#: library/dis.rst:1148 msgid "" -"Calls a callable object with positional (if any) and keyword arguments. " -"*argc* indicates the total number of positional and keyword arguments. The " -"top element on the stack contains a tuple with the names of the keyword " -"arguments, which must be strings. Below that are the values for the keyword " -"arguments, in the order corresponding to the tuple. Below that are " -"positional arguments, with the right-most parameter on top. Below the " -"arguments is a callable object to call. ``CALL_FUNCTION_KW`` pops all " -"arguments and the callable object off the stack, calls the callable object " -"with those arguments, and pushes the return value returned by the callable " -"object." +"``argc`` is the total of the positional and named arguments, excluding " +"``self`` when a ``NULL`` is not present." msgstr "" -#: library/dis.rst:1095 +#: library/dis.rst:1151 msgid "" -"Keyword arguments are packed in a tuple instead of a dictionary, *argc* " -"indicates the total number of arguments." +"``CALL`` pops all arguments and the callable object off the stack, calls the " +"callable object with those arguments, and pushes the return value returned " +"by the callable object." msgstr "" -#: library/dis.rst:1102 +#: library/dis.rst:1160 msgid "" "Calls a callable object with variable set of positional and keyword " "arguments. If the lowest bit of *flags* is set, the top of the stack " @@ -1149,66 +1217,80 @@ msgid "" "arguments, and pushes the return value returned by the callable object." msgstr "" -#: library/dis.rst:1117 +#: library/dis.rst:1175 msgid "" "Loads a method named ``co_names[namei]`` from the TOS object. TOS is popped. " "This bytecode distinguishes two cases: if TOS has a method with the correct " "name, the bytecode pushes the unbound method and TOS. TOS will be used as " -"the first argument (``self``) by :opcode:`CALL_METHOD` when calling the " -"unbound method. Otherwise, ``NULL`` and the object return by the attribute " -"lookup are pushed." +"the first argument (``self``) by :opcode:`CALL` when calling the unbound " +"method. Otherwise, ``NULL`` and the object return by the attribute lookup " +"are pushed." msgstr "" -#: library/dis.rst:1129 +#: library/dis.rst:1187 msgid "" -"Calls a method. *argc* is the number of positional arguments. Keyword " -"arguments are not supported. This opcode is designed to be used with :" -"opcode:`LOAD_METHOD`. Positional arguments are on top of the stack. Below " -"them, the two items described in :opcode:`LOAD_METHOD` are on the stack " -"(either ``self`` and an unbound method object or ``NULL`` and an arbitrary " -"callable). All of them are popped and the return value is pushed." +"Prefixes :opcode:`CALL`. Logically this is a no op. It exists to enable " +"effective specialization of calls. ``argc`` is the number of arguments as " +"described in :opcode:`CALL`." msgstr "" -#: library/dis.rst:1141 +#: library/dis.rst:1196 +msgid "" +"Pushes a ``NULL`` to the stack. Used in the call sequence to match the " +"``NULL`` pushed by :opcode:`LOAD_METHOD` for non-method calls." +msgstr "" + +#: library/dis.rst:1205 +msgid "" +"Prefixes :opcode:`PRECALL`. Stores a reference to ``co_consts[consti]`` into " +"an internal variable for use by :opcode:`CALL`. ``co_consts[consti]`` must " +"be a tuple of strings." +msgstr "" + +#: library/dis.rst:1214 msgid "" "Pushes a new function object on the stack. From bottom to top, the consumed " "stack must consist of values if the argument carries a specified flag value" msgstr "" -#: library/dis.rst:1144 +#: library/dis.rst:1217 msgid "" "``0x01`` a tuple of default values for positional-only and positional-or-" "keyword parameters in positional order" msgstr "" -#: library/dis.rst:1146 +#: library/dis.rst:1219 msgid "``0x02`` a dictionary of keyword-only parameters' default values" msgstr "" -#: library/dis.rst:1147 -msgid "``0x04`` an annotation dictionary" +#: library/dis.rst:1220 +msgid "``0x04`` a tuple of strings containing parameters' annotations" msgstr "" -#: library/dis.rst:1148 +#: library/dis.rst:1221 msgid "``0x08`` a tuple containing cells for free variables, making a closure" msgstr "" -#: library/dis.rst:1149 +#: library/dis.rst:1222 msgid "the code associated with the function (at TOS1)" msgstr "" -#: library/dis.rst:1150 +#: library/dis.rst:1223 msgid "the :term:`qualified name` of the function (at TOS)" msgstr "" -#: library/dis.rst:1157 +#: library/dis.rst:1225 +msgid "Flag value ``0x04`` is a tuple of strings instead of dictionary" +msgstr "" + +#: library/dis.rst:1232 msgid "" "Pushes a slice object on the stack. *argc* must be 2 or 3. If it is 2, " "``slice(TOS1, TOS)`` is pushed; if it is 3, ``slice(TOS2, TOS1, TOS)`` is " "pushed. See the :func:`slice` built-in function for more information." msgstr "" -#: library/dis.rst:1164 +#: library/dis.rst:1239 msgid "" "Prefixes any opcode which has an argument too big to fit into the default " "one byte. *ext* holds an additional byte which act as higher bits in the " @@ -1216,86 +1298,142 @@ msgid "" "allowed, forming an argument from two-byte to four-byte." msgstr "" -#: library/dis.rst:1172 +#: library/dis.rst:1247 msgid "" "Used for implementing formatted literal strings (f-strings). Pops an " "optional *fmt_spec* from the stack, then a required *value*. *flags* is " "interpreted as follows:" msgstr "" -#: library/dis.rst:1176 +#: library/dis.rst:1251 msgid "``(flags & 0x03) == 0x00``: *value* is formatted as-is." msgstr "" -#: library/dis.rst:1177 +#: library/dis.rst:1252 msgid "" "``(flags & 0x03) == 0x01``: call :func:`str` on *value* before formatting it." msgstr "" -#: library/dis.rst:1179 +#: library/dis.rst:1254 msgid "" "``(flags & 0x03) == 0x02``: call :func:`repr` on *value* before formatting " "it." msgstr "" -#: library/dis.rst:1181 +#: library/dis.rst:1256 msgid "" "``(flags & 0x03) == 0x03``: call :func:`ascii` on *value* before formatting " "it." msgstr "" -#: library/dis.rst:1183 +#: library/dis.rst:1258 msgid "" "``(flags & 0x04) == 0x04``: pop *fmt_spec* from the stack and use it, else " "use an empty *fmt_spec*." msgstr "" -#: library/dis.rst:1186 +#: library/dis.rst:1261 msgid "" "Formatting is performed using :c:func:`PyObject_Format`. The result is " "pushed on the stack." msgstr "" -#: library/dis.rst:1194 +#: library/dis.rst:1269 +msgid "" +"TOS is a tuple of keyword attribute names, TOS1 is the class being matched " +"against, and TOS2 is the match subject. *count* is the number of positional " +"sub-patterns." +msgstr "" + +#: library/dis.rst:1273 +msgid "" +"Pop TOS, TOS1, and TOS2. If TOS2 is an instance of TOS1 and has the " +"positional and keyword attributes required by *count* and TOS, push a tuple " +"of extracted attributes. Otherwise, push ``None``." +msgstr "" + +#: library/dis.rst:1286 +msgid "A no-op. Performs internal tracing, debugging and optimization checks." +msgstr "" + +#: library/dis.rst:1288 +msgid "The ``where`` operand marks where the ``RESUME`` occurs:" +msgstr "" + +#: library/dis.rst:1290 +msgid "``0`` The start of a function" +msgstr "" + +#: library/dis.rst:1291 +msgid "``1`` After a ``yield`` expression" +msgstr "" + +#: library/dis.rst:1292 +msgid "``2`` After a ``yield from`` expression" +msgstr "" + +#: library/dis.rst:1293 +msgid "``3`` After an ``await`` expression" +msgstr "" + +#: library/dis.rst:1300 +msgid "" +"Create a generator, coroutine, or async generator from the current frame. " +"Clear the current frame and return the newly created generator." +msgstr "" + +#: library/dis.rst:1308 +msgid "" +"Sends ``None`` to the sub-generator of this generator. Used in ``yield " +"from`` and ``await`` statements." +msgstr "" + +#: library/dis.rst:1316 +msgid "" +"Wraps the value on top of the stack in an ``async_generator_wrapped_value``. " +"Used to yield in async generators." +msgstr "" + +#: library/dis.rst:1324 msgid "" "This is not really an opcode. It identifies the dividing line between " "opcodes which don't use their argument and those that do (``< " "HAVE_ARGUMENT`` and ``>= HAVE_ARGUMENT``, respectively)." msgstr "" -#: library/dis.rst:1198 +#: library/dis.rst:1328 msgid "" "Now every instruction has an argument, but opcodes ``< HAVE_ARGUMENT`` " "ignore it. Before, only opcodes ``>= HAVE_ARGUMENT`` had an argument." msgstr "" -#: library/dis.rst:1206 +#: library/dis.rst:1336 msgid "Opcode collections" msgstr "" -#: library/dis.rst:1208 +#: library/dis.rst:1338 msgid "" "These collections are provided for automatic introspection of bytecode " "instructions:" msgstr "" -#: library/dis.rst:1213 +#: library/dis.rst:1343 msgid "Sequence of operation names, indexable using the bytecode." msgstr "" -#: library/dis.rst:1218 +#: library/dis.rst:1348 msgid "Dictionary mapping operation names to bytecodes." msgstr "" -#: library/dis.rst:1223 +#: library/dis.rst:1353 msgid "Sequence of all compare operation names." msgstr "" -#: library/dis.rst:1228 +#: library/dis.rst:1358 msgid "Sequence of bytecodes that access a constant." msgstr "" -#: library/dis.rst:1233 +#: library/dis.rst:1363 msgid "" "Sequence of bytecodes that access a free variable (note that 'free' in this " "context refers to names in the current scope that are referenced by inner " @@ -1303,22 +1441,22 @@ msgid "" "does *not* include references to global or builtin scopes)." msgstr "" -#: library/dis.rst:1241 +#: library/dis.rst:1371 msgid "Sequence of bytecodes that access an attribute by name." msgstr "" -#: library/dis.rst:1246 +#: library/dis.rst:1376 msgid "Sequence of bytecodes that have a relative jump target." msgstr "" -#: library/dis.rst:1251 +#: library/dis.rst:1381 msgid "Sequence of bytecodes that have an absolute jump target." msgstr "" -#: library/dis.rst:1256 +#: library/dis.rst:1386 msgid "Sequence of bytecodes that access a local variable." msgstr "" -#: library/dis.rst:1261 +#: library/dis.rst:1391 msgid "Sequence of bytecodes of Boolean operations." msgstr "" diff --git a/library/distutils.po b/library/distutils.po index 07b2adf59c..b31a7207c2 100644 --- a/library/distutils.po +++ b/library/distutils.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" "PO-Revision-Date: 2018-09-28 12:38+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -21,6 +21,12 @@ msgstr ":mod:`distutils` — Création et installation des modules Python" #: library/distutils.rst:12 msgid "" +":mod:`distutils` is deprecated with removal planned for Python 3.12. See " +"the :ref:`What's New ` entry for more information." +msgstr "" + +#: library/distutils.rst:17 +msgid "" "The :mod:`distutils` package provides support for building and installing " "additional modules into a Python installation. The new modules may be " "either 100%-pure Python, or may be extension modules written in C, or may be " @@ -33,7 +39,7 @@ msgstr "" "d'extension écrits en C, soit des collections de paquets Python qui incluent " "des modules codés en C et en Python." -#: library/distutils.rst:17 +#: library/distutils.rst:22 msgid "" "Most Python users will *not* want to use this module directly, but instead " "use the cross-version tools maintained by the Python Packaging Authority. In " @@ -46,11 +52,11 @@ msgstr "" "readthedocs.io/en/latest/>`__ est une alternative améliorée à :mod:" "`distutils` qui fournit :" -#: library/distutils.rst:23 +#: library/distutils.rst:28 msgid "support for declaring project dependencies" msgstr "support pour la déclaration des dépendances de projets" -#: library/distutils.rst:24 +#: library/distutils.rst:29 msgid "" "additional mechanisms for configuring which files to include in source " "releases (including plugins for integration with version control systems)" @@ -59,7 +65,7 @@ msgstr "" "distributions source (y compris les extensions pour l'intégration avec les " "systèmes de contrôle de version)" -#: library/distutils.rst:26 +#: library/distutils.rst:31 msgid "" "the ability to declare project \"entry points\", which can be used as the " "basis for application plugin systems" @@ -67,7 +73,7 @@ msgstr "" "la possibilité de déclarer les \"points d'entrée\" du projet, qui peuvent " "être utilisés comme base pour les systèmes d'extensions" -#: library/distutils.rst:28 +#: library/distutils.rst:33 msgid "" "the ability to automatically generate Windows command line executables at " "installation time rather than needing to prebuild them" @@ -76,11 +82,11 @@ msgstr "" "commande Windows au moment de l'installation plutôt que de devoir les pré-" "construire" -#: library/distutils.rst:30 +#: library/distutils.rst:35 msgid "consistent behaviour across all supported Python versions" msgstr "comportement cohérent entre toutes les versions Python supportées" -#: library/distutils.rst:32 +#: library/distutils.rst:37 msgid "" "The recommended `pip `__ installer runs all ``setup." "py`` scripts with ``setuptools``, even if the script itself only imports " @@ -93,7 +99,7 @@ msgstr "" "reportez-vous au `Python Packaging User Guide `_." -#: library/distutils.rst:38 +#: library/distutils.rst:43 msgid "" "For the benefits of packaging tool authors and users seeking a deeper " "understanding of the details of the current packaging and distribution " @@ -105,10 +111,10 @@ msgstr "" "de paquets et de leur distribution, la documentation utilisateur historique " "de :mod:`distutils` la référence de son API restent disponibles :" -#: library/distutils.rst:43 +#: library/distutils.rst:48 msgid ":ref:`install-index`" msgstr ":ref:`install-index`" -#: library/distutils.rst:44 +#: library/distutils.rst:49 msgid ":ref:`distutils-index`" msgstr ":ref:`distutils-index`" diff --git a/library/doctest.po b/library/doctest.po index 38f6cb8c36..1e8a68f143 100644 --- a/library/doctest.po +++ b/library/doctest.po @@ -5,23 +5,23 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2021-09-12 09:38-0400\n" +"Last-Translator: Edith Viau \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.3\n" #: library/doctest.rst:2 msgid ":mod:`doctest` --- Test interactive Python examples" -msgstr "" +msgstr ":mod:`doctest` — Exemples de tests interactifs en Python" #: library/doctest.rst:12 -#, fuzzy msgid "**Source code:** :source:`Lib/doctest.py`" -msgstr "**Code source:** :source:`Lib/os.py`" +msgstr "**Code source :** :source:`Lib/doctest.py`" #: library/doctest.rst:16 msgid "" @@ -29,18 +29,27 @@ msgid "" "interactive Python sessions, and then executes those sessions to verify that " "they work exactly as shown. There are several common ways to use doctest:" msgstr "" +"Le module :mod:`doctest` cherche des extraits de texte ressemblant à des " +"sessions Python interactives avant de les exécuter, de façon à vérifier que " +"le fonctionnement correspond exactement à la description. Voici quelques cas " +"d'utilisation de *doctest* :" #: library/doctest.rst:20 msgid "" "To check that a module's docstrings are up-to-date by verifying that all " "interactive examples still work as documented." msgstr "" +"Vérifier que les *docstrings* d'un module sont à jour en vérifiant que tous " +"les exemples interactifs fonctionnent toujours tels que décrits." #: library/doctest.rst:23 msgid "" "To perform regression testing by verifying that interactive examples from a " "test file or a test object work as expected." msgstr "" +"Réaliser un test de régression en vérifiant que les exemples interactifs " +"provenant d'un fichier de test ou d'un objet de test fonctionnent comme " +"prévu." #: library/doctest.rst:26 msgid "" @@ -49,16 +58,22 @@ msgid "" "text are emphasized, this has the flavor of \"literate testing\" or " "\"executable documentation\"." msgstr "" +"Rédiger de la documentation sous forme de tutoriel pour un paquet, avec une " +"abondance d'exemples ayant des entrées et des sorties. On pourrait voir ça " +"comme des tests « dans le texte » ou de la « documentation exécutable », " +"selon le point de vue." #: library/doctest.rst:31 msgid "Here's a complete but small example module::" -msgstr "" +msgstr "Voici un petit exemple d'un module qui soit tout de même complet ::" #: library/doctest.rst:88 msgid "" "If you run :file:`example.py` directly from the command line, :mod:`doctest` " "works its magic:" msgstr "" +"L'exécution du fichier :file:`example.py` directement à partir de la ligne " +"de commande démontre la magie de :mod:`doctest` :" #: library/doctest.rst:96 msgid "" @@ -66,10 +81,14 @@ msgid "" "Pass ``-v`` to the script, and :mod:`doctest` prints a detailed log of what " "it's trying, and prints a summary at the end:" msgstr "" +"Il n'y a pas de sortie ! C'est normal, cela signifie que tous les exemples " +"fonctionnent. Passez ``-v`` au script pour que :mod:`doctest` affiche un " +"journal détaillé de ce qui a été essayé, avant d'afficher un résumé à la " +"fin :" #: library/doctest.rst:114 msgid "And so on, eventually ending with:" -msgstr "" +msgstr "Et ainsi de suite, jusqu'à ce qu'on atteigne :" #: library/doctest.rst:133 msgid "" @@ -79,26 +98,37 @@ msgid "" "libraries. Especially useful examples can be found in the standard test " "file :file:`Lib/test/test_doctest.py`." msgstr "" +"C'est tout ce dont vous avez besoin pour pouvoir commencer une utilisation " +"productive de :mod:`doctest` ! Allez-y. Les sections suivantes donnent tous " +"les détails. Notez qu'il y a plusieurs exemples de *doctests* dans la suite " +"de tests de la bibliothèque standard de Python et dans les autres " +"bibliothèques. Des exemples particulièrement utiles se situent dans le " +"fichier de test standard :file:`Lib/test/test_doctest.py`." #: library/doctest.rst:143 msgid "Simple Usage: Checking Examples in Docstrings" -msgstr "" +msgstr "Utilisation simple : vérifier des exemples dans des *docstrings*" #: library/doctest.rst:145 msgid "" "The simplest way to start using doctest (but not necessarily the way you'll " "continue to do it) is to end each module :mod:`M` with::" msgstr "" +"Le plus simple pour commencer à utiliser *doctest* (mais pas nécessairement " +"la façon avec laquelle vous continuerez) est de terminer chaque module :mod:" +"`M` avec ::" #: library/doctest.rst:152 msgid ":mod:`doctest` then examines docstrings in module :mod:`M`." -msgstr "" +msgstr ":mod:`doctest` examine alors les *docstrings* dans le module :mod:`M`." #: library/doctest.rst:154 msgid "" "Running the module as a script causes the examples in the docstrings to get " "executed and verified::" msgstr "" +"Exécuter le module comme un script a comme conséquence d'exécuter et de " +"vérifier les exemples dans les *docstrings* ::" #: library/doctest.rst:159 msgid "" @@ -107,16 +137,22 @@ msgid "" "and the final line of output is ``***Test Failed*** N failures.``, where *N* " "is the number of examples that failed." msgstr "" +"Ceci n'affiche rien à moins qu'un exemple échoue ; le cas échéant, les " +"exemples défaillants et les causes du ou des échecs sont affichés sur " +"*stdout*, et la ligne finale de la sortie est ``***Test Failed*** *N " +"failures*.``, où *N* est le nombre d'exemples défaillants." #: library/doctest.rst:164 msgid "Run it with the ``-v`` switch instead::" -msgstr "" +msgstr "À la place, exécutez-la avec l'option de ligne de commande ``-v`` ::" #: library/doctest.rst:168 msgid "" "and a detailed report of all examples tried is printed to standard output, " "along with assorted summaries at the end." msgstr "" +"alors, un rapport détaillé de tous les exemples faisant partie de l'essai " +"est affiché sur la sortie standard, accompagné à la fin de leurs résumés." #: library/doctest.rst:171 msgid "" @@ -125,6 +161,10 @@ msgid "" "``sys.argv`` is not examined by :func:`testmod` (so passing ``-v`` or not " "has no effect)." msgstr "" +"Vous pouvez activer le mode verbeux en passant ``verbose=True`` à :func:" +"`testmod`, ou vous le désactiver en lui passant ``verbose=False``. Dans ces " +"deux cas, ``sys.argv`` n'est pas inspecté par :func:`testmod` (ainsi, lui " +"passer ``-v`` ou pas n'a aucun effet)." #: library/doctest.rst:176 msgid "" @@ -132,6 +172,10 @@ msgid "" "instruct the Python interpreter to run the doctest module directly from the " "standard library and pass the module name(s) on the command line::" msgstr "" +"Il y a un raccourci pour exécuter :func:`testmod` à partir de la ligne de " +"commande. Vous demandez à l'interpréteur Python d'exécuter le module " +"*doctest* directement à partir de la bibliothèque standard afin de passer le " +"ou les noms des modules à partir de la ligne de commande ainsi ::" #: library/doctest.rst:182 msgid "" @@ -139,22 +183,31 @@ msgid "" "`testmod` on it. Note that this may not work correctly if the file is part " "of a package and imports other submodules from that package." msgstr "" +"Ceci importera :file:`example.py` comme un module autonome et exécutera :" +"func:`testmod` sur celui-ci. Notez que ceci peut ne pas fonctionner si le " +"fichier fait partie d'un paquet et importe d'autres sous-modules de ce " +"paquet." #: library/doctest.rst:186 msgid "" "For more information on :func:`testmod`, see section :ref:`doctest-basic-" "api`." msgstr "" +"Pour plus d'informations sur :func:`testmod`, consultez la section :ref:" +"`doctest-basic-api`." #: library/doctest.rst:192 msgid "Simple Usage: Checking Examples in a Text File" -msgstr "" +msgstr "Utilisation simple : vérifier des exemples dans un fichier texte" #: library/doctest.rst:194 msgid "" "Another simple application of doctest is testing interactive examples in a " "text file. This can be done with the :func:`testfile` function::" msgstr "" +"Une autre application simple de *doctest* est de tester des exemples " +"interactifs dans un fichier texte. Ceci est fait avec la fonction :func:" +"`testfile` ::" #: library/doctest.rst:200 msgid "" @@ -163,12 +216,19 @@ msgid "" "if it were a single giant docstring; the file doesn't need to contain a " "Python program! For example, perhaps :file:`example.txt` contains this:" msgstr "" +"Ce court script exécute et vérifie chacun des exemples Python interactifs " +"contenus dans le fichier :file:`example.txt`. Le contenu du fichier est " +"traité comme une seule *docstring* géante ; le fichier n'a pas besoin de " +"contenir un programme Python ! Par exemple, prenons un fichier :file:" +"`example.txt` contenant :" #: library/doctest.rst:223 msgid "" "Running ``doctest.testfile(\"example.txt\")`` then finds the error in this " "documentation::" msgstr "" +"Exécuter ``doctest.testfile(\"example.txt\")`` recherche les erreurs dans " +"cette documentation ::" #: library/doctest.rst:234 msgid "" @@ -177,6 +237,10 @@ msgid "" "cause(s) of the failure(s) are printed to stdout, using the same format as :" "func:`testmod`." msgstr "" +"Comme pour :func:`testmod`, :func:`testfile` n'affichera rien sauf si un " +"exemple échoue. Si un exemple échoue, alors le ou les exemples défaillants " +"et leurs causes sont affichés sur *stdout*, dans le même format que :func:" +"`testmod`." #: library/doctest.rst:239 msgid "" @@ -185,12 +249,19 @@ msgid "" "optional arguments that can be used to tell it to look for files in other " "locations." msgstr "" +"Par défaut, :func:`testfile` cherche les fichiers dans le répertoire où se " +"situe le module qui l'appelle. Consultez la section :ref:`doctest-basic-api` " +"pour une description des options de ligne de commande à utiliser afin de " +"chercher dans d'autres répertoires." #: library/doctest.rst:243 msgid "" "Like :func:`testmod`, :func:`testfile`'s verbosity can be set with the ``-" "v`` command-line switch or with the optional keyword argument *verbose*." msgstr "" +"Comme pour :func:`testmod`, la verbosité de :func:`testfile` peut être " +"ajustée avec l'option de ligne de commande ``-v`` ou avec le mot clé " +"*verbose*." #: library/doctest.rst:247 msgid "" @@ -198,22 +269,31 @@ msgid "" "instruct the Python interpreter to run the doctest module directly from the " "standard library and pass the file name(s) on the command line::" msgstr "" +"Il y a un raccourci pour exécuter :func:`testfile` à partir de la ligne de " +"commande. Demandez à l'interpréteur Python d'exécuter le module *doctest* " +"directement à partir de la bibliothèque standard et de passer le ou les noms " +"des modules à partir de la ligne de commande ainsi ::" #: library/doctest.rst:253 msgid "" "Because the file name does not end with :file:`.py`, :mod:`doctest` infers " "that it must be run with :func:`testfile`, not :func:`testmod`." msgstr "" +"Puisque le nom du fichier ne se termine pas par :file:`.py`, :mod:`doctest` " +"en déduit qu'il s'exécute à l'aide de :func:`testfile`, et non pas :func:" +"`testmod`." #: library/doctest.rst:256 msgid "" "For more information on :func:`testfile`, see section :ref:`doctest-basic-" "api`." msgstr "" +"Pour plus d'information sur :func:`testfile`, consultez la section :ref:" +"`doctest-basic-api`." #: library/doctest.rst:262 msgid "How It Works" -msgstr "" +msgstr "Comment ça marche" #: library/doctest.rst:264 msgid "" @@ -224,16 +304,27 @@ msgid "" "examples; for information about actually running doctest on these examples, " "see the following sections." msgstr "" +"Cette section examine en détail le fonctionnement de *doctest* : quelles " +"*docstrings* sont considérées, comment sont trouvés les exemples " +"interactifs, quel est le contexte d'exécution sélectionné, comment les " +"exceptions sont gérées, et de quelles façons les options de ligne de " +"commande peuvent être utilisées pour définir le comportement. Ceci est " +"l'information dont vous avez besoin pour écrire des exemples *doctest* ; " +"pour de l'information sur l'exécution de *doctest* sur ces exemples, " +"consultez les sections suivantes." #: library/doctest.rst:275 msgid "Which Docstrings Are Examined?" -msgstr "" +msgstr "Quelles *docstrings* sont considérées ?" #: library/doctest.rst:277 msgid "" "The module docstring, and all function, class and method docstrings are " "searched. Objects imported into the module are not searched." msgstr "" +"Les *docstrings* du module, de toutes les fonctions, classes, et méthodes " +"sont cherchées. Les objets qui sont importés dans le module ne sont pas " +"cherchés." #: library/doctest.rst:280 msgid "" @@ -243,44 +334,62 @@ msgid "" "searched, and strings are treated as if they were docstrings. In output, a " "key ``K`` in ``M.__test__`` appears with name ::" msgstr "" +"De plus, si ``M.__test__`` existe et qu'il est vrai, il doit être un *dict* " +"dont chaque élément lie un nom (chaîne de caractère) à un objet (fonction, " +"classe, chaîne de caractère). Les *docstrings* d'objets fonctions et classes " +"trouvées dans ``M.__test__`` sont cherchés, et les chaînes de caractères " +"sont traitées comme si elles étaient des *docstrings*. En sortie, une clé " +"``K`` dans ``M.__test__`` apparaît avec le nom ::" #: library/doctest.rst:288 msgid "" "Any classes found are recursively searched similarly, to test docstrings in " "their contained methods and nested classes." msgstr "" +"Toute classe trouvée est ainsi cherchée récursivement, afin de tester les " +"*docstrings* contenues dans leurs méthodes et leurs classes imbriquées." -#: library/doctest.rst:299 +#: library/doctest.rst:295 msgid "How are Docstring Examples Recognized?" -msgstr "" +msgstr "Comment les exemples *docstring* sont-ils identifiés ?" -#: library/doctest.rst:301 +#: library/doctest.rst:297 msgid "" "In most cases a copy-and-paste of an interactive console session works fine, " "but doctest isn't trying to do an exact emulation of any specific Python " "shell." msgstr "" +"Dans la plupart des cas, un copier-coller d'une séance interactive de " +"console fonctionne bien, mais *doctest* n'essaye pas de faire une simulation " +"exacte d'un *shell* Python spécifique." -#: library/doctest.rst:326 +#: library/doctest.rst:322 msgid "" "Any expected output must immediately follow the final ``'>>> '`` or ``'... " "'`` line containing the code, and the expected output (if any) extends to " "the next ``'>>> '`` or all-whitespace line." msgstr "" +"Toute sortie souhaitée doit immédiatement suivre le dernier ``'>>> '`` ou le " +"dernier ``'... '`` contenant le code, et la sortie souhaitée, s'il y en a " +"une, s'étend jusqu'au prochain ``'>>> '`` ou à la prochaine ligne vide." -#: library/doctest.rst:330 +#: library/doctest.rst:326 msgid "The fine print:" -msgstr "" +msgstr "En détail :" -#: library/doctest.rst:332 +#: library/doctest.rst:328 msgid "" "Expected output cannot contain an all-whitespace line, since such a line is " "taken to signal the end of expected output. If expected output does contain " "a blank line, put ```` in your doctest example each place a blank " "line is expected." msgstr "" +"La sortie souhaitée ne peut pas contenir une ligne vide, puisque contenir " +"une telle ligne signale la fin de la sortie souhaitée. Si la sortie " +"souhaitée doit contenir une ligne vide, ajoutez ```` dans votre " +"exemple *doctest* à chaque endroit où une ligne vide est souhaitée." -#: library/doctest.rst:337 +#: library/doctest.rst:333 msgid "" "All hard tab characters are expanded to spaces, using 8-column tab stops. " "Tabs in output generated by the tested code are not modified. Because any " @@ -294,43 +403,71 @@ msgid "" "different algorithm for handling tabs by writing a custom :class:" "`DocTestParser` class." msgstr "" - -#: library/doctest.rst:349 +"Tous les caractères de tabulation insécables (*hard tab characters*) sont " +"convertis en espaces, en utilisant des taquets de tabulation de 8 espaces. " +"Les tabulations se trouvant dans la sortie générée par le code test ne sont " +"pas modifiées. Comme tout caractère de tabulation insécable *est* converti, " +"ceci veut dire que si le code de sortie inclut des caractères de tabulation " +"insécables, alors la seule façon que le *doctest* peut réussir est si " +"l'option :const:`NORMALIZE_WHITESPACE` ou si :ref:`directive ` a cours. De façon alternative, le test peut être ré-écrit afin " +"de capturer la sortie et de la comparer à un ensemble de valeurs attendues, " +"et ce, en tant qu'étape du test. Cette gestion des tabulations à la source a " +"été obtenue suite à un processus d'essais et d'erreurs ; il a été démontré " +"que c'était là la façon de les gérer qui soit la moins susceptible de " +"générer des erreurs. Il est possible d'utiliser un algorithme différent pour " +"la gestion des tabulations en rédigeant une classe sur mesure :class:" +"`DocTestParser`." + +#: library/doctest.rst:345 msgid "" "Output to stdout is captured, but not output to stderr (exception tracebacks " "are captured via a different means)." msgstr "" +"La sortie vers *stdout* est capturée, mais pas la sortie vers *stderr* (les " +"traces d'appel sont capturées par d'autres moyens)." -#: library/doctest.rst:352 +#: library/doctest.rst:348 msgid "" "If you continue a line via backslashing in an interactive session, or for " "any other reason use a backslash, you should use a raw docstring, which will " "preserve your backslashes exactly as you type them::" msgstr "" +"Si vous souhaitez conserver les barres obliques inversées telles quelles " +"lorsque vous terminez une ligne avec une barre oblique inversée dans une " +"séance interactive, ou quand vous utilisez une telle barre pour toute autre " +"raison, vous devez utiliser une *docstring* brute ::" -#: library/doctest.rst:361 +#: library/doctest.rst:357 msgid "" "Otherwise, the backslash will be interpreted as part of the string. For " "example, the ``\\n`` above would be interpreted as a newline character. " "Alternatively, you can double each backslash in the doctest version (and not " "use a raw string)::" msgstr "" +"Sinon, la barre oblique inversée est interprétée comme faisant partie de la " +"chaîne de caractères. Par exemple, le ``\\n`` ci-dessus est interprété comme " +"un caractère de saut de ligne. De façon alternative, vous pouvez doubler " +"chaque barre oblique inversée dans la version *doctest* (et n'utilisez pas " +"dans ce cas de *docstring* brute) ::" -#: library/doctest.rst:370 +#: library/doctest.rst:366 msgid "The starting column doesn't matter::" -msgstr "" +msgstr "La colonne de départ n'a pas d'importance ::" -#: library/doctest.rst:377 +#: library/doctest.rst:373 msgid "" "and as many leading whitespace characters are stripped from the expected " "output as appeared in the initial ``'>>> '`` line that started the example." msgstr "" +"et autant d'espaces sont retirés de la sortie attendue qu'il y avait " +"d'espaces avant la ligne commençant par ``'>>> '``." -#: library/doctest.rst:384 +#: library/doctest.rst:380 msgid "What's the Execution Context?" -msgstr "" +msgstr "Quel est le contexte d'exécution ?" -#: library/doctest.rst:386 +#: library/doctest.rst:382 msgid "" "By default, each time :mod:`doctest` finds a docstring to test, it uses a " "*shallow copy* of :mod:`M`'s globals, so that running tests doesn't change " @@ -340,18 +477,30 @@ msgid "" "names defined earlier in the docstring being run. Examples cannot see names " "defined in other docstrings." msgstr "" +"Par défaut, chaque fois que :mod:`doctest` trouve une *docstring* à tester, " +"il utilise une *copie superficielle* des variables globales de :mod:`M`, de " +"telle façon que l'exécution de tests ne change pas les variables globales " +"réelles du module et que l'exécution d'un unique test dans :mod:`M` ne " +"puisse laisser traîner des miettes pouvant accidentellement causer la " +"réussite d'un autre test. Ceci signifie que les exemples peuvent utiliser " +"librement n'importe quel nom défini au niveau supérieur dans :mod:`M` ainsi " +"que les noms définis précédemment dans la *docstring* en cours d'exécution. " +"Les exemples ne peuvent voir les noms définis dans d'autres *docstrings*." -#: library/doctest.rst:394 +#: library/doctest.rst:390 msgid "" "You can force use of your own dict as the execution context by passing " "``globs=your_dict`` to :func:`testmod` or :func:`testfile` instead." msgstr "" +"Vous pouvez forcer l'utilisation de votre propre *dict* comme contexte " +"d'exécution en passant ``globs=your_dict`` à :func:`testmod` ou encore, à :" +"func:`testfile`." -#: library/doctest.rst:401 +#: library/doctest.rst:397 msgid "What About Exceptions?" -msgstr "" +msgstr "Qu'en est-il des exceptions ?" -#: library/doctest.rst:403 +#: library/doctest.rst:399 msgid "" "No problem, provided that the traceback is the only output produced by the " "example: just paste in the traceback. [#]_ Since tracebacks contain details " @@ -359,53 +508,78 @@ msgid "" "numbers), this is one case where doctest works hard to be flexible in what " "it accepts." msgstr "" +"Pas de problèmes, tant que la trace d'appels est la seule sortie produite " +"par l'exemple : il suffit d'ajouter la trace. [#]_ Comme les traces d'appels " +"contiennent des détails qui sont sujets à changement rapide (par exemple, le " +"chemin exact vers un fichier et les numéros de ligne), ceci est un cas où " +"*doctest* fait un effort pour être flexible dans ce qu'il accepte." -#: library/doctest.rst:409 +#: library/doctest.rst:405 msgid "Simple example::" -msgstr "" +msgstr "Exemple simple ::" -#: library/doctest.rst:416 +#: library/doctest.rst:412 msgid "" "That doctest succeeds if :exc:`ValueError` is raised, with the ``list." "remove(x): x not in list`` detail as shown." msgstr "" +"Ce *doctest* réussit si :exc:`ValueError` est levée, avec le détail ``list." +"remote(x): x not in list`` tel que montré." -#: library/doctest.rst:419 +#: library/doctest.rst:415 msgid "" "The expected output for an exception must start with a traceback header, " "which may be either of the following two lines, indented the same as the " "first line of the example::" msgstr "" +"La sortie attendue pour une exception doit commencer par un en-tête de trace " +"d'appels, qui peut être l'une des deux lignes suivantes, avec la même " +"indentation que la première ligne de l'exemple ::" -#: library/doctest.rst:426 +#: library/doctest.rst:422 msgid "" "The traceback header is followed by an optional traceback stack, whose " "contents are ignored by doctest. The traceback stack is typically omitted, " "or copied verbatim from an interactive session." msgstr "" +"L'en-tête de la trace d'appels est suivi par une pile optionnelle de trace " +"d'appels, dont le contenu est ignoré par *doctest*. La trace d'appels est " +"habituellement omise, ou est copiée verbatim à partir d'une séance " +"interactive." -#: library/doctest.rst:430 +#: library/doctest.rst:426 msgid "" "The traceback stack is followed by the most interesting part: the line(s) " "containing the exception type and detail. This is usually the last line of " "a traceback, but can extend across multiple lines if the exception has a " "multi-line detail::" msgstr "" +"La pile de trace d'appels est suivie par la partie la plus intéressante : la " +"ou les lignes contenant le type et le détail de l'exception. Ceci est " +"habituellement la dernière ligne de la trace d'appels ; dans le cas où " +"l'exception a un détail sur plusieurs lignes, il est possible de prolonger " +"sur plusieurs lignes ::" -#: library/doctest.rst:442 +#: library/doctest.rst:438 msgid "" "The last three lines (starting with :exc:`ValueError`) are compared against " "the exception's type and detail, and the rest are ignored." msgstr "" +"Les trois dernières lignes (en commençant par :exc:`ValueError`) sont " +"comparées avec le type et le détail de l'exception ; tout le reste est " +"ignoré." -#: library/doctest.rst:445 +#: library/doctest.rst:441 msgid "" "Best practice is to omit the traceback stack, unless it adds significant " "documentation value to the example. So the last example is probably better " "as::" msgstr "" +"La pratique optimale est d'omettre la pile de trace d'appels, à moins que " +"celle-ci ait une valeur significative de documentation de l'exemple. Ainsi, " +"le dernier exemple est probablement meilleur tel qui suit ::" -#: library/doctest.rst:455 +#: library/doctest.rst:451 msgid "" "Note that tracebacks are treated very specially. In particular, in the " "rewritten example, the use of ``...`` is independent of doctest's :const:" @@ -413,12 +587,20 @@ msgid "" "just as well be three (or three hundred) commas or digits, or an indented " "transcript of a Monty Python skit." msgstr "" +"Prenez note que les traces d'appels sont traitées de façon vraiment " +"particulière. Précisément, dans l'exemple ré-écrit, l'utilisation de ``...`` " +"est indépendante de l'option *doctest* :const:`ELLIPSIS`. Les points de " +"suspension dans cet exemple peuvent être omis, ou peuvent aussi être trois " +"(ou trois cents) virgules ou chiffres, ou une retranscription indentée d'une " +"parodie de Monty Python." -#: library/doctest.rst:461 +#: library/doctest.rst:457 msgid "Some details you should read once, but won't need to remember:" msgstr "" +"Quelques détails que vous devriez lire une fois, mais que vous pouvez " +"oublier :" -#: library/doctest.rst:463 +#: library/doctest.rst:459 msgid "" "Doctest can't guess whether your expected output came from an exception " "traceback or from ordinary printing. So, e.g., an example that expects " @@ -427,8 +609,15 @@ msgid "" "ordinary output rarely begins with a traceback header line, so this doesn't " "create real problems." msgstr "" +"*Doctest* ne peut pas deviner si votre sortie attendue provient d'une trace " +"d'appels issue d'une exception ou d'un affichage ordinaire. Ainsi, si nous " +"avons un exemple s'attendant à obtenir ``ValueError: 42 is prime``, celui-ci " +"réussira peu importe si :exc:`ValueError` est réellement levée ou si " +"l'exemple affiche simplement ce texte de trace d'appels. Dans la pratique, " +"une sortie ordinaire commence rarement par une ligne d'en-tête de trace " +"d'appels ; ainsi, ceci ne pose pas de vrai problème." -#: library/doctest.rst:470 +#: library/doctest.rst:466 msgid "" "Each line of the traceback stack (if present) must be indented further than " "the first line of the example, *or* start with a non-alphanumeric character. " @@ -436,15 +625,25 @@ msgid "" "with an alphanumeric is taken to be the start of the exception detail. Of " "course this does the right thing for genuine tracebacks." msgstr "" +"Chaque ligne de la trace d'appel (s'il y en a) doit soit être indentée d'un " +"niveau supplémentaire au niveau de la première ligne de l'exemple *ou* doit " +"commencer par un caractère qui ne soit pas alphanumérique. La première ligne " +"suivant l'en-tête de la trace d'appels qui soit indentée similairement et " +"qui commence par un caractère alphanumérique est comprise comme étant le " +"début du détail de l'exception. Bien sûr, ceci fait la chose adéquate pour " +"les traces d'appels véritables." -#: library/doctest.rst:476 +#: library/doctest.rst:472 msgid "" "When the :const:`IGNORE_EXCEPTION_DETAIL` doctest option is specified, " "everything following the leftmost colon and any module information in the " "exception name is ignored." msgstr "" +"Lorsque l'option de *doctest* :const:`IGNORE_EXCEPTION_DETAIL` est définie, " +"tout ce qui suit le point-virgule se trouvant le plus à gauche ainsi que " +"toute information liée au module dans le nom de l'exception sont ignorés." -#: library/doctest.rst:480 +#: library/doctest.rst:476 msgid "" "The interactive shell omits the traceback header line for some :exc:" "`SyntaxError`\\ s. But doctest uses the traceback header line to " @@ -452,26 +651,40 @@ msgid "" "need to test a :exc:`SyntaxError` that omits the traceback header, you will " "need to manually add the traceback header line to your test example." msgstr "" +"Le shell interactif omet la ligne d'en-tête de la trace d'appels pour " +"certaines erreurs :exc:`SyntaxError`. Ceci étant dit, *doctest* utilise la " +"ligne d'en-tête de la trace d'appels afin de faire une distinction entre les " +"exceptions et les autres types d'erreurs. Ainsi, dans les rares cas où vous " +"avez besoin de tester une erreur :exc:`SyntaxError` qui omet l'en-tête de la " +"trace d'appels, il vous est nécessaire d'ajouter manuellement la ligne d'en-" +"tête de la trace d'appels à l'exemple de test." -#: library/doctest.rst:488 +#: library/doctest.rst:484 +#, fuzzy msgid "" -"For some :exc:`SyntaxError`\\ s, Python displays the character position of " -"the syntax error, using a ``^`` marker::" +"For some exceptions, Python displays the position of the error using ``^`` " +"markers and tildes::" msgstr "" +"Pour certaines erreurs :exc:`SyntaxError`, Python affiche la position du " +"caractère de l'erreur de syntaxe, en utilisant un marqueur ``^`` ::" -#: library/doctest.rst:497 +#: library/doctest.rst:493 msgid "" "Since the lines showing the position of the error come before the exception " "type and detail, they are not checked by doctest. For example, the " "following test would pass, even though it puts the ``^`` marker in the wrong " "location::" msgstr "" +"Comme les lignes dénotant la position de l'erreur précèdent le type et le " +"détail de l'exception, elles ne sont pas vérifiées par *doctest*. Par " +"exemple, le test suivant réussira, même si le marqueur ``^`` n'est pas à la " +"bonne place ::" -#: library/doctest.rst:513 +#: library/doctest.rst:508 msgid "Option Flags" -msgstr "" +msgstr "Options de ligne de commande" -#: library/doctest.rst:515 +#: library/doctest.rst:510 msgid "" "A number of option flags control various aspects of doctest's behavior. " "Symbolic names for the flags are supplied as module constants, which can be :" @@ -480,18 +693,28 @@ msgid "" "and may be passed to the doctest command line interface via the ``-o`` " "option." msgstr "" +"Un ensemble d'options de ligne de commande contrôle différents aspects du " +"comportement de *doctest*. Pour les options, des noms symboliques sont " +"fournis comme des constantes de module, qui peuvent être composés par un OU " +"bit à bit (:ref:`bitwise ORed `) et passés à diverses fonctions. " +"Les noms peuvent aussi être utilisés dans des :ref:`instructions doctest " +"`, et peuvent être passés à l'interface de ligne de " +"commande de *doctest* à l'aide de l'option ``-o``." -#: library/doctest.rst:521 +#: library/doctest.rst:516 msgid "The ``-o`` command line option." -msgstr "" +msgstr "L'option de ligne de commande ``-o``." -#: library/doctest.rst:524 +#: library/doctest.rst:519 msgid "" "The first group of options define test semantics, controlling aspects of how " "doctest decides whether actual output matches an example's expected output:" msgstr "" +"Le premier groupe d'options définit les sémantiques de test, de façon à " +"contrôler comment *doctest* décide si la sortie obtenue correspond à la " +"sortie attendue de l'exemple :" -#: library/doctest.rst:530 +#: library/doctest.rst:525 msgid "" "By default, if an expected output block contains just ``1``, an actual " "output block containing just ``1`` or just ``True`` is considered to be a " @@ -502,8 +725,18 @@ msgid "" "output still work in these cases. This option will probably go away, but " "not for several years." msgstr "" +"Par défaut, si un bloc de sortie attendu contient uniquement un ``1``, un " +"vrai bloc de sortie contenant uniquement un ``1`` ou un ``True`` sera " +"considéré comme étant une correspondance ; de façon similaire, nous avons " +"une correspondance pour ``0`` et ``False``. Lorsque l'option :const:" +"`DONT_ACCEPT_TRUE_FOR_1` est précisée, aucune de ces substitutions n'est " +"acceptée. Le comportement par défaut s'ajuste au fait que Python a changé le " +"type de renvoi de plusieurs fonctions, passant de nombres entiers à des " +"booléens ; les *doctests* s'attendant à une sortie de \"petit " +"entier\" (*little integer*) fonctionnent encore dans ces cas. Cette option " +"disparaîtra probablement, mais pas avant plusieurs années." -#: library/doctest.rst:542 +#: library/doctest.rst:537 msgid "" "By default, if an expected output block contains a line containing only the " "string ````, then that line will match a blank line in the actual " @@ -511,8 +744,15 @@ msgid "" "is the only way to communicate that a blank line is expected. When :const:" "`DONT_ACCEPT_BLANKLINE` is specified, this substitution is not allowed." msgstr "" +"Par défaut, si un bloc de sortie attendue contient une ligne contenant " +"uniquement la chaîne de caractères ````, alors cette ligne sera " +"en correspondance avec une ligne vide dans la sortie réelle. Puisqu'une " +"véritable ligne vide permet de délimiter la sortie attendue, ceci est la " +"seule façon de communiquer qu'une ligne vide est souhaitée. Lorsque " +"l'option :const:`DONT_ACCEPT_BLANKLINE` est précisée, cette substitution " +"n'est pas permise." -#: library/doctest.rst:551 +#: library/doctest.rst:546 msgid "" "When specified, all sequences of whitespace (blanks and newlines) are " "treated as equal. Any sequence of whitespace within the expected output " @@ -521,8 +761,16 @@ msgid "" "useful when a line of expected output is very long, and you want to wrap it " "across multiple lines in your source." msgstr "" +"Lorsque précisé, toutes les séquences de caractères d'espacement et de " +"caractères de saut de ligne sont traitées comme équivalentes. Toute séquence " +"de caractères d'espacement à l'intérieur de la sortie attendue correspondra " +"alors à toute séquence de caractères d'espacement à l'intérieur de la sortie " +"réelle. Par défaut, les caractères d'espacement doivent correspondre de " +"façon exacte. L'option :const:`NORMALIZE_WHITESPACE` est particulièrement " +"utile lorsqu'une ligne de sortie attendue est très longue, et que l'on " +"souhaite la répartir sur plusieurs lignes dans le fichier source." -#: library/doctest.rst:562 +#: library/doctest.rst:557 msgid "" "When specified, an ellipsis marker (``...``) in the expected output can " "match any substring in the actual output. This includes substrings that " @@ -530,49 +778,49 @@ msgid "" "this simple. Complicated uses can lead to the same kinds of \"oops, it " "matched too much!\" surprises that ``.*`` is prone to in regular expressions." msgstr "" +"Lorsque précisé, un marqueur de points de suspension (``...``) dans la " +"sortie attendue peut correspondre à n'importe quelle partie de chaîne de " +"caractères dans la sortie réelle. Ceci inclut les parties qui traversent les " +"frontières de lignes, ainsi que les parties vides de chaînes de caractères ; " +"ainsi, il est préférable d'en faire une utilisation simple. Les usages " +"complexes mènent aux mêmes surprises du type \"oups, il y avait trop de " +"correspondances !\" que l'utilisation de ``.*`` dans les expressions " +"régulières." -#: library/doctest.rst:571 +#: library/doctest.rst:566 msgid "" -"When specified, an example that expects an exception passes if an exception " -"of the expected type is raised, even if the exception detail does not " -"match. For example, an example expecting ``ValueError: 42`` will pass if " -"the actual exception raised is ``ValueError: 3*14``, but will fail, e.g., " -"if :exc:`TypeError` is raised." +"When specified, doctests expecting exceptions pass so long as an exception " +"of the expected type is raised, even if the details (message and fully-" +"qualified exception name) don't match." msgstr "" -#: library/doctest.rst:577 +#: library/doctest.rst:570 msgid "" -"It will also ignore the module name used in Python 3 doctest reports. Hence " -"both of these variations will work with the flag specified, regardless of " -"whether the test is run under Python 2.7 or Python 3.2 (or later versions)::" +"For example, an example expecting ``ValueError: 42`` will pass if the actual " +"exception raised is ``ValueError: 3*14``, but will fail if, say, a :exc:" +"`TypeError` is raised instead. It will also ignore any fully-qualified name " +"included before the exception class, which can vary between implementations " +"and versions of Python and the code/libraries in use. Hence, all three of " +"these variations will work with the flag specified:" msgstr "" -#: library/doctest.rst:589 +#: library/doctest.rst:592 msgid "" "Note that :const:`ELLIPSIS` can also be used to ignore the details of the " -"exception message, but such a test may still fail based on whether or not " -"the module details are printed as part of the exception name. Using :const:" -"`IGNORE_EXCEPTION_DETAIL` and the details from Python 2.3 is also the only " -"clear way to write a doctest that doesn't care about the exception detail " -"yet continues to pass under Python 2.3 or earlier (those releases do not " -"support :ref:`doctest directives ` and ignore them as " -"irrelevant comments). For example::" -msgstr "" - -#: library/doctest.rst:603 -msgid "" -"passes under Python 2.3 and later Python versions with the flag specified, " -"even though the detail changed in Python 2.4 to say \"does not\" instead of " -"\"doesn't\"." +"exception message, but such a test may still fail based on whether the " +"module name is present or matches exactly." msgstr "" -#: library/doctest.rst:607 +#: library/doctest.rst:596 msgid "" ":const:`IGNORE_EXCEPTION_DETAIL` now also ignores any information relating " "to the module containing the exception under test." msgstr "" +"Maintenant, :const:`IGNORE_EXCEPTION_DETAIL` permet aussi d'ignorer toute " +"information liée au module contenant l'exception qui est en train d'être " +"testée." -#: library/doctest.rst:614 +#: library/doctest.rst:603 msgid "" "When specified, do not run the example at all. This can be useful in " "contexts where doctest examples serve as both documentation and test cases, " @@ -580,33 +828,50 @@ msgid "" "be checked. E.g., the example's output might be random; or the example " "might depend on resources which would be unavailable to the test driver." msgstr "" +"Lorsque précisé, cesse complètement l'exécution de tous les exemples. Ceci " +"peut être utile dans des contextes où les exemples *doctest* sont à la fois " +"de la documentation et des cas de tests, et qu'un exemple doit être inclus " +"pour des raisons de documentation, mais ne devrait pas être vérifié. Par " +"exemple, la sortie de l'exemple doit être aléatoire ; ou encore, lorsque " +"l'exemple peut dépendre de ressources inatteignables pour l'exécuteur de " +"test." -#: library/doctest.rst:620 +#: library/doctest.rst:609 msgid "" "The SKIP flag can also be used for temporarily \"commenting out\" examples." msgstr "" +"L'option *SKIP* peut aussi être utilisée temporairement afin de commenter " +"des exemples et d'en empêcher l'exécution." -#: library/doctest.rst:625 +#: library/doctest.rst:614 msgid "A bitmask or'ing together all the comparison flags above." msgstr "" +"Un masque binaire effectuant une composition avec OU de toutes les options " +"de comparaisons ci-dessus." -#: library/doctest.rst:627 +#: library/doctest.rst:616 msgid "The second group of options controls how test failures are reported:" msgstr "" +"Le deuxième groupe d'options détermine comment les échecs de tests sont " +"signalés :" -#: library/doctest.rst:632 +#: library/doctest.rst:621 msgid "" "When specified, failures that involve multi-line expected and actual outputs " "are displayed using a unified diff." msgstr "" +"Lorsque précisé, les défaillances qui font intervenir des sorties attendues " +"et réelles multi-lignes sont affichées dans une *diff* unifiée." -#: library/doctest.rst:638 +#: library/doctest.rst:627 msgid "" "When specified, failures that involve multi-line expected and actual outputs " "will be displayed using a context diff." msgstr "" +"Lorsque précisé, les défaillances qui font intervenir des sorties attendues " +"et réelles multi-lignes sont affichées dans une *diff* de contexte." -#: library/doctest.rst:644 +#: library/doctest.rst:633 msgid "" "When specified, differences are computed by ``difflib.Differ``, using the " "same algorithm as the popular :file:`ndiff.py` utility. This is the only " @@ -615,8 +880,15 @@ msgid "" "output contains letter ``l``, a line is inserted with a caret marking the " "mismatching column positions." msgstr "" +"Lorsque précisé, les différences sont obtenues grâce à ``difflib.Differ``, " +"en utilisant le même algorithme que le populaire utilitaire :file:`ndiff." +"py`. Ceci est la seule méthode qui puisse faire la différence à l'intérieur " +"des lignes ainsi que parmi les lignes prises conjointement. Par exemple, si " +"une ligne de sortie attendue contient le chiffre ``1`` alors que la sortie " +"réelle contient la lettre ``l``, une ligne est insérée avec un marqueur " +"caret démarquant les positions de colonnes où il n'y a pas de correspondance." -#: library/doctest.rst:653 +#: library/doctest.rst:642 msgid "" "When specified, display the first failing example in each doctest, but " "suppress output for all remaining examples. This will prevent doctest from " @@ -626,32 +898,52 @@ msgid "" "remaining examples are still run, and still count towards the total number " "of failures reported; only the output is suppressed." msgstr "" +"Lorsque précisé, le premier exemple défaillant de chaque *doctest* est " +"affiché, mais la sortie est supprimée pour tous les autres exemples. Ceci " +"empêche *doctest* de rapporter les exemples adéquats qui échouent du fait " +"d'échecs précédents ; ceci peut aussi cacher des exemples inadéquats qui " +"échouent de façon indépendante au premier échec. Lorsque :const:" +"`REPORT_ONLY_FIRST_FAILURE` est précisé, les exemples restants sont toujours " +"exécutés, et sont toujours comptabilisés dans le nombre total des lignes " +"échouant ; seulement la sortie est omise." -#: library/doctest.rst:664 +#: library/doctest.rst:653 msgid "" "When specified, exit after the first failing example and don't attempt to " "run the remaining examples. Thus, the number of failures reported will be at " "most 1. This flag may be useful during debugging, since examples after the " "first failure won't even produce debugging output." msgstr "" +"Lorsque précisé, mettre fin à l'exécution après le premier exemple " +"défaillant et ne pas essayer d'exécuter les exemples restants. Ainsi, le " +"nombre d'échecs rapporté sera au plus un (1). Cette option peut être utile " +"durant le débogage, étant donné que les exemples suivant le premier échec ne " +"produiront aucune sortie de débogage." -#: library/doctest.rst:669 +#: library/doctest.rst:658 msgid "" "The doctest command line accepts the option ``-f`` as a shorthand for ``-o " "FAIL_FAST``." msgstr "" +"La ligne de commande de *doctest* accepte l'option ``-f`` comme un raccourci " +"de ``-o FAIL_FAST``." -#: library/doctest.rst:677 +#: library/doctest.rst:666 msgid "A bitmask or'ing together all the reporting flags above." msgstr "" +"Un masque binaire effectuant une composition avec le OU de toutes les " +"options de signalement ci-dessus." -#: library/doctest.rst:680 +#: library/doctest.rst:669 msgid "" "There is also a way to register new option flag names, though this isn't " "useful unless you intend to extend :mod:`doctest` internals via subclassing:" msgstr "" +"Il y a aussi une façon d'enregistrer des nouveaux noms d'option, quoique " +"ceci n'est pas utile sauf dans le cas où vous devez faire une extension pour " +"le code interne de :mod:`doctest` par le biais d'une sous-classe :" -#: library/doctest.rst:686 +#: library/doctest.rst:675 msgid "" "Create a new option flag with a given name, and return the new flag's " "integer value. :func:`register_optionflag` can be used when subclassing :" @@ -659,64 +951,99 @@ msgid "" "are supported by your subclasses. :func:`register_optionflag` should always " "be called using the following idiom::" msgstr "" +"Crée une nouvelle option avec un nom donné, et renvoie la valeur en nombre " +"entier de la nouvelle option. La fonction :func:`register_optionflag` peut " +"être utilisée lors de la création de sous-classes à partir de :class:" +"`OutputChecker` ou :class:`DocTestRunner` pour créer de nouvelles options " +"qui sont supportées par vos sous-classes. La fonction :func:" +"`register_optionflag` devrait toujours être appelée par l'expression " +"suivante ::" -#: library/doctest.rst:702 -#, fuzzy +#: library/doctest.rst:691 msgid "Directives" -msgstr "Directive" +msgstr "Instructions" -#: library/doctest.rst:704 +#: library/doctest.rst:693 msgid "" "Doctest directives may be used to modify the :ref:`option flags ` for an individual example. Doctest directives are special Python " "comments following an example's source code:" msgstr "" +"Les instructions *doctest* peuvent être utilisées afin de modifier les :ref:" +"`options ` pour un exemple individuel. Les instructions " +"*doctest* sont des commentaires Python spéciaux suivant le code source d'un " +"exemple :" -#: library/doctest.rst:715 +#: library/doctest.rst:704 +#, fuzzy msgid "" "Whitespace is not allowed between the ``+`` or ``-`` and the directive " "option name. The directive option name can be any of the option flag names " "explained above." msgstr "" +"Les caractères d'espacement ne sont pas permis entre les ``+`` ou les ``-`` " +"et le nom de l'option d'instruction. Le nom de l'option d'instruction peut " +"être n'importe lequel des noms d'options expliqués ci-dessus." -#: library/doctest.rst:719 +#: library/doctest.rst:708 msgid "" "An example's doctest directives modify doctest's behavior for that single " "example. Use ``+`` to enable the named behavior, or ``-`` to disable it." msgstr "" +"Les instructions d'un exemple *doctest* modifient le comportement de " +"*doctest* et ce, seulement pour cet exemple. Utilisez ``+`` pour activer le " +"comportement nommé, ou ``-`` pour le désactiver." -#: library/doctest.rst:722 -msgid "For example, this test passes::" -msgstr "" +#: library/doctest.rst:711 +#, fuzzy +msgid "For example, this test passes:" +msgstr "Par exemple, ce test réussit ::" -#: library/doctest.rst:728 +#: library/doctest.rst:720 +#, fuzzy msgid "" "Without the directive it would fail, both because the actual output doesn't " "have two blanks before the single-digit list elements, and because the " "actual output is on a single line. This test also passes, and also requires " -"a directive to do so::" +"a directive to do so:" msgstr "" +"Sans l'instruction, ce serait un échec, et ce, à la fois parce que la sortie " +"réelle n'a pas deux espaces vides avant les éléments de la liste formés d'un " +"seul chiffre, et aussi parce que la sortie réelle est contenue sur une seule " +"ligne. Ce test réussit aussi, et nécessite lui aussi une instruction pour ce " +"faire ::" -#: library/doctest.rst:736 +#: library/doctest.rst:731 +#, fuzzy msgid "" "Multiple directives can be used on a single physical line, separated by " -"commas::" +"commas:" msgstr "" +"Plusieurs instructions sont utilisées sur une unique ligne physique, " +"séparées par des virgules ::" -#: library/doctest.rst:742 +#: library/doctest.rst:740 +#, fuzzy msgid "" "If multiple directive comments are used for a single example, then they are " -"combined::" +"combined:" msgstr "" +"Si plusieurs commentaires d'instructions sont utilisés pour un exemple " +"unique, alors ils sont combinés ::" -#: library/doctest.rst:749 +#: library/doctest.rst:750 +#, fuzzy msgid "" "As the previous example shows, you can add ``...`` lines to your example " "containing only directives. This can be useful when an example is too long " -"for a directive to comfortably fit on the same line::" +"for a directive to comfortably fit on the same line:" msgstr "" +"Comme l'exemple précédent le démontre, vous pouvez ajouter des lignes " +"contenant des points de suspension ``...`` à votre exemple ne contenant que " +"des instructions. Ceci peut être utile lorsqu'un exemple est trop long pour " +"qu'une instruction puisse être écrite sur la même ligne ::" -#: library/doctest.rst:757 +#: library/doctest.rst:761 msgid "" "Note that since all options are disabled by default, and directives apply " "only to the example they appear in, enabling options (via ``+`` in a " @@ -725,12 +1052,20 @@ msgid "" "defaults. In such cases, disabling an option via ``-`` in a directive can " "be useful." msgstr "" +"Prendre note que puisque toutes les options sont désactivées par défaut, et " +"comme les instructions s'appliquent uniquement aux exemples dans lesquelles " +"elles apparaissent, activer les options (par le biais de ``+`` dans une " +"instruction) est habituellement le seul choix ayant du sens. Toutefois, les " +"options peuvent aussi être passées aux fonctions qui exécutent les " +"*doctests*, définissant de nouvelles valeurs par défaut. Dans de tels cas, " +"désactiver une option par l'utilisation de ``-`` dans une instruction peut " +"être utile." -#: library/doctest.rst:767 +#: library/doctest.rst:771 msgid "Warnings" msgstr "Avertissements" -#: library/doctest.rst:769 +#: library/doctest.rst:773 msgid "" ":mod:`doctest` is serious about requiring exact matches in expected output. " "If even a single character doesn't match, the test fails. This will " @@ -739,85 +1074,113 @@ msgid "" "doesn't guarantee that the element is printed in any particular order, so a " "test like ::" msgstr "" +"Le module :mod:`doctest` est rigoureux pour ce qui est d'inclure des " +"correspondances exactes dans la sortie attendue. Si un seul caractère ne " +"correspond pas, le test échoue. Ceci vous surprendra probablement quelques " +"fois, alors que vous apprenez exactement ce que Python garantit et ne " +"garantit pas pour qui est des sorties. Par exemple, lorsqu'on affiche un " +"ensemble (set), Python ne garantit pas que les éléments sont affichés dans " +"un ordre particulier ; ainsi un test tel que ::" -#: library/doctest.rst:778 +#: library/doctest.rst:782 msgid "is vulnerable! One workaround is to do ::" -msgstr "" +msgstr "est vulnérable ! Une alternative est de faire ::" -#: library/doctest.rst:783 +#: library/doctest.rst:787 msgid "instead. Another is to do ::" -msgstr "" +msgstr "à la place. Une autre façon de faire est ::" -#: library/doctest.rst:791 -msgid "" -"Before Python 3.6, when printing a dict, Python did not guarantee that the " -"key-value pairs was printed in any particular order." -msgstr "" - -#: library/doctest.rst:794 +#: library/doctest.rst:793 msgid "There are others, but you get the idea." -msgstr "" +msgstr "Il y en a d'autres, mais vous saisissez l'idée." -#: library/doctest.rst:796 -msgid "" -"Another bad idea is to print things that embed an object address, like ::" +#: library/doctest.rst:795 +#, fuzzy +msgid "Another bad idea is to print things that embed an object address, like" msgstr "" +"Une autre mauvaise idée est d'afficher des choses intégrant l'adresse d'un " +"objet, comme ceci ::" -#: library/doctest.rst:804 +#: library/doctest.rst:805 +#, fuzzy msgid "" -"The :const:`ELLIPSIS` directive gives a nice approach for the last example::" +"The :const:`ELLIPSIS` directive gives a nice approach for the last example:" msgstr "" +"L'instruction :const:`ELLIPSIS` donne une approche sympathique pour le " +"dernier exemple ::" -#: library/doctest.rst:809 +#: library/doctest.rst:813 msgid "" "Floating-point numbers are also subject to small output variations across " "platforms, because Python defers to the platform C library for float " "formatting, and C libraries vary widely in quality here. ::" msgstr "" +"Les nombres à virgule flottante sont aussi sujets à de petites variations à " +"la sortie, tout dépendamment de la plateforme utilisée, étant donné que " +"Python s'en remet à la bibliothèque de la plateforme C pour la mise-en-forme " +"des *floats*, et les bibliothèques C varient grandement pour ce qui de leur " +"qualité sur ce point. ::" -#: library/doctest.rst:820 +#: library/doctest.rst:824 +#, fuzzy msgid "" "Numbers of the form ``I/2.**J`` are safe across all platforms, and I often " "contrive doctest examples to produce numbers of that form::" msgstr "" +"Les nombres ayant la forme ``I/2.**J`` sont sécuritaires pour toutes les " +"plateformes, et je restreins souvent les exemples *doctest* à produire des " +"nombres ayant cette forme ::" -#: library/doctest.rst:826 +#: library/doctest.rst:830 msgid "" "Simple fractions are also easier for people to understand, and that makes " "for better documentation." msgstr "" +"Les fractions simples sont aussi plus faciles à comprendre, et cela fait une " +"meilleure documentation." -#: library/doctest.rst:833 +#: library/doctest.rst:837 msgid "Basic API" -msgstr "" +msgstr "API de base" -#: library/doctest.rst:835 +#: library/doctest.rst:839 msgid "" "The functions :func:`testmod` and :func:`testfile` provide a simple " "interface to doctest that should be sufficient for most basic uses. For a " "less formal introduction to these two functions, see sections :ref:`doctest-" "simple-testmod` and :ref:`doctest-simple-testfile`." msgstr "" +"Les fonctions :func:`testmod` et :func:`testfile` fournissent une interface " +"simple pour *doctest* qui est suffisante pour les cas d'usage les plus " +"élémentaires. Pour une introduction moins formelle à ces deux fonctions, " +"voir les sections :ref:`doctest-simple-testmod` et :ref:`doctest-simple-" +"testfile`." -#: library/doctest.rst:843 +#: library/doctest.rst:847 msgid "" "All arguments except *filename* are optional, and should be specified in " "keyword form." msgstr "" +"Tous les arguments sauf *filename* sont optionnels, et doivent être précisés " +"sous forme lettrée." -#: library/doctest.rst:846 +#: library/doctest.rst:850 msgid "" "Test examples in the file named *filename*. Return ``(failure_count, " "test_count)``." msgstr "" +"Teste les exemples dans le fichier nommé *filename*. Renvoie " +"``(failure_count, test_count)``." -#: library/doctest.rst:849 +#: library/doctest.rst:853 msgid "" "Optional argument *module_relative* specifies how the filename should be " "interpreted:" msgstr "" +"L'argument optionnel *module_relative* précise comment le nom de fichier " +"doit être interprété :" -#: library/doctest.rst:852 +#: library/doctest.rst:856 msgid "" "If *module_relative* is ``True`` (the default), then *filename* specifies an " "OS-independent module-relative path. By default, this path is relative to " @@ -826,21 +1189,34 @@ msgid "" "should use ``/`` characters to separate path segments, and may not be an " "absolute path (i.e., it may not begin with ``/``)." msgstr "" +"Si *module_relative* prend la valeur ``True`` (la valeur par défaut), alors " +"*filename* précise un chemin relatif au module qui soit indépendant du " +"système d'exploitation (*OS*). Par défaut, ce chemin est relatif au " +"répertoire du module appelant ; mais si l'argument *package* est précisé, " +"alors il est relatif à ce paquet. Pour garantir l'indépendance quant au " +"système d'exploitation, *filename* doit utiliser des caractères ``/`` pour " +"séparer chaque segment de chemin, et ne peut pas être un chemin absolu " +"(c'est-à-dire qu'il ne peut pas commencer par ``/``)." -#: library/doctest.rst:859 +#: library/doctest.rst:863 msgid "" "If *module_relative* is ``False``, then *filename* specifies an OS-specific " "path. The path may be absolute or relative; relative paths are resolved " "with respect to the current working directory." msgstr "" +"Si *module_relative* prend la valeur ``False``, alors *filename* précise un " +"chemin en fonction du système d'exploitation. Le chemin peut être absolu ou " +"relatif ; les chemins relatifs sont résolus en rapport au répertoire actif." -#: library/doctest.rst:863 +#: library/doctest.rst:867 msgid "" "Optional argument *name* gives the name of the test; by default, or if " "``None``, ``os.path.basename(filename)`` is used." msgstr "" +"L'option *name* désigne le nom du test ; par défaut, ou si ``None`` est " +"passé en argument, ``os.path.basename(filename)`` est utilisé." -#: library/doctest.rst:866 +#: library/doctest.rst:870 msgid "" "Optional argument *package* is a Python package or the name of a Python " "package whose directory should be used as the base directory for a module-" @@ -848,16 +1224,26 @@ msgid "" "directory is used as the base directory for module-relative filenames. It " "is an error to specify *package* if *module_relative* is ``False``." msgstr "" +"L'option *package* est un paquet Python ou le nom d'un paquet Python dont le " +"répertoire doit être utilisé comme le répertoire principal pour un nom de " +"fichier lié à un module. Si aucun paquet n'est spécifié, le répertoire du " +"module appelé à l'exécution est utilisé comme le répertoire principal pour " +"les noms de fichiers liés au module. C'est une erreur que de spécifier " +"*package* si *module_relative* a ``False`` comme valeur." -#: library/doctest.rst:872 +#: library/doctest.rst:876 msgid "" "Optional argument *globs* gives a dict to be used as the globals when " "executing examples. A new shallow copy of this dict is created for the " "doctest, so its examples start with a clean slate. By default, or if " "``None``, a new empty dict is used." msgstr "" +"L'option *globs* spécifie un *dict* à utiliser comme *globals* lorsque des " +"exemples sont exécutés. Une copie superficielle de ce *dict* est créée pour " +"le *doctest* ; ainsi, ces exemples commencent avec un état vide. Par défaut, " +"ou si ``None`` est passé en argument, un nouveau *dict* vide est utilisé." -#: library/doctest.rst:877 +#: library/doctest.rst:881 msgid "" "Optional argument *extraglobs* gives a dict merged into the globals used to " "execute examples. This works like :meth:`dict.update`: if *globs* and " @@ -869,85 +1255,131 @@ msgid "" "passing an *extraglobs* dict mapping the generic name to the subclass to be " "tested." msgstr "" +"L'option *extraglobs* spécifie un *dict* intégré dans les variables globales " +"utilisées pour exécuter l'exemple. Ceci fonctionne comme :meth:`dict." +"update` : si *globs* et *extraglobs* ont une clé commune, la valeur associée " +"à *extraglobs* apparaît dans le *dict* combiné. Par défaut, ou si ``None`` " +"est passé en argument, aucune variable globale supplémentaire est utilisée. " +"Ceci est une fonctionnalité avancée qui permet la configuration des " +"*doctests*. Par exemple, un *doctest* peut être rédigé pour une classe de " +"base, en utilisant un nom générique pour la classe, puis réutilisé afin de " +"tester un nombre indéfini de sous-classes en passant un *dict* *extraglobs* " +"reliant le nom générique à la sous-classe qui doit être testée." -#: library/doctest.rst:886 +#: library/doctest.rst:890 msgid "" "Optional argument *verbose* prints lots of stuff if true, and prints only " "failures if false; by default, or if ``None``, it's true if and only if ``'-" "v'`` is in ``sys.argv``." msgstr "" +"L'option *verbose* affiche une grande quantité d'information si elle est " +"vraie, et affiche uniquement les défaillances si elle est fausse ; par " +"défaut, ou si ``None``, celle-ci est vraie si et seulement si ``-v`` est " +"présent dans ``sys.argv``." -#: library/doctest.rst:890 +#: library/doctest.rst:894 msgid "" "Optional argument *report* prints a summary at the end when true, else " "prints nothing at the end. In verbose mode, the summary is detailed, else " "the summary is very brief (in fact, empty if all tests passed)." msgstr "" +"L'option *report* affiche un résumé à la fin lorsque vraie ; sinon, rien " +"n'est affiché à la fin. En mode *verbose*, le résumé est détaillé, sinon le " +"résumé est très bref (en fait, vide si tous les tests ont réussi)." -#: library/doctest.rst:894 +#: library/doctest.rst:898 msgid "" "Optional argument *optionflags* (default value 0) takes the :ref:`bitwise OR " "` of option flags. See section :ref:`doctest-options`." msgstr "" +"L'option *optionflags* (dont la valeur par défaut est de zéro) calcule la " +"valeur :ref:`bitwise OR ` des options de ligne de commande. Voir la " +"section :ref:`doctest-options`." -#: library/doctest.rst:898 +#: library/doctest.rst:902 msgid "" "Optional argument *raise_on_error* defaults to false. If true, an exception " "is raised upon the first failure or unexpected exception in an example. " "This allows failures to be post-mortem debugged. Default behavior is to " "continue running examples." msgstr "" +"L'option *raise_on_error* est fausse par défaut. Si elle est vraie, une " +"exception est levée à la première défaillance ou à la première exception qui " +"ne soit prévue dans l'exemple. Ceci permet aux défaillances d'être analysées " +"lors d'un post-mortem. Le comportement par défaut est de poursuivre " +"l'exécution des exemples." -#: library/doctest.rst:1043 +#: library/doctest.rst:1047 msgid "" "Optional argument *parser* specifies a :class:`DocTestParser` (or subclass) " "that should be used to extract tests from the files. It defaults to a " "normal parser (i.e., ``DocTestParser()``)." msgstr "" +"L'option *parser* définit une classe ou une sous-classe :class:" +"`DocTestParser` qui doit être utilisée pour extraire les tests des fichiers. " +"Par défaut, on utilise un analyseur normal (c'est-à-dire, " +"``DocTestParser()``)." -#: library/doctest.rst:1047 +#: library/doctest.rst:1051 msgid "" "Optional argument *encoding* specifies an encoding that should be used to " "convert the file to unicode." msgstr "" +"L'option *encoding* définit un encodage à utiliser pour convertir le fichier " +"en format *unicode*." -#: library/doctest.rst:913 +#: library/doctest.rst:917 msgid "" "All arguments are optional, and all except for *m* should be specified in " "keyword form." msgstr "" +"Toutes les options sont facultatives, et toutes sauf *m* doivent être " +"définies en format lettré." -#: library/doctest.rst:916 +#: library/doctest.rst:920 msgid "" "Test examples in docstrings in functions and classes reachable from module " "*m* (or module :mod:`__main__` if *m* is not supplied or is ``None``), " "starting with ``m.__doc__``." msgstr "" +"Ceci teste les exemples en *docstrings* dans les fonctions et les classes " +"accessibles depuis le module *m* (ou depuis le module :mod:`__main__` si *m* " +"n'a pas été défini ou est ``None``), en commençant par ``m.__doc__``." -#: library/doctest.rst:920 +#: library/doctest.rst:924 msgid "" "Also test examples reachable from dict ``m.__test__``, if it exists and is " "not ``None``. ``m.__test__`` maps names (strings) to functions, classes and " "strings; function and class docstrings are searched for examples; strings " "are searched directly, as if they were docstrings." msgstr "" +"Ceci teste aussi les exemples accessibles depuis le *dict* ``m.__test__``, " +"si et seulement s'il existe et qu'il n'est pas ``None``. Le *dict* ``m." +"__test__`` associe des noms (chaînes de caractères) à des fonctions, des " +"classes et des chaînes de caractères ; les *docstrings* de fonctions et de " +"classes sont fouillées pour des exemples ; les chaînes de caractères sont " +"fouillées directement, comme si elles étaient des *docstrings*." -#: library/doctest.rst:925 +#: library/doctest.rst:929 msgid "" "Only docstrings attached to objects belonging to module *m* are searched." msgstr "" +"Seulement les *docstrings* attribuées à des objets appartenant au module *m* " +"sont fouillées." -#: library/doctest.rst:927 +#: library/doctest.rst:931 msgid "Return ``(failure_count, test_count)``." -msgstr "" +msgstr "Renvoie ``(failure_count, test_count)``." -#: library/doctest.rst:929 +#: library/doctest.rst:933 msgid "" "Optional argument *name* gives the name of the module; by default, or if " "``None``, ``m.__name__`` is used." msgstr "" +"L'option *name* donne le nom du module ; par défaut, ou si ``None``, ``m." +"__name__`` est utilisé." -#: library/doctest.rst:932 +#: library/doctest.rst:936 msgid "" "Optional argument *exclude_empty* defaults to false. If true, objects for " "which no doctests are found are excluded from consideration. The default is " @@ -956,57 +1388,83 @@ msgid "" "output for objects with no tests. The *exclude_empty* argument to the newer :" "class:`DocTestFinder` constructor defaults to true." msgstr "" +"L'option *exclude_empty* prend la valeur faux par défaut. Si la valeur est " +"vraie, les objets pour lesquels aucun *doctest* n'est trouvé ne sont pas " +"pris en compte. Le défaut est un bricolage permettant la compatibilité à " +"rebours, de façon à ce que le code qui utilise toujours :meth:`doctest." +"master.summarize` en conjonction avec :func:`testmod` puisse continuer " +"d'obtenir des sorties pour les objets n'ayant aucun test. L'option " +"*exclude_empty* dans le constructeur de la classe plus récente :class:" +"`DocTestFinder` prend vrai comme valeur par défaut." -#: library/doctest.rst:939 +#: library/doctest.rst:943 msgid "" "Optional arguments *extraglobs*, *verbose*, *report*, *optionflags*, " "*raise_on_error*, and *globs* are the same as for function :func:`testfile` " "above, except that *globs* defaults to ``m.__dict__``." msgstr "" +"Les options *extraglobs*, *verbose*, *report*, *optionflags*, " +"*raise_on_error*, et *globs* sont les mêmes que pour la fonction :func:" +"`testfile` ci-dessus, sauf pour *globs*, qui est ``m.__dict__`` par défaut." -#: library/doctest.rst:946 +#: library/doctest.rst:950 msgid "" "Test examples associated with object *f*; for example, *f* may be a string, " "a module, a function, or a class object." msgstr "" +"Les exemples de test associés à l'objet *f* ; par exemple, *f* peut être une " +"chaîne de caractères, un module, une fonction, ou un objet de classe." -#: library/doctest.rst:949 +#: library/doctest.rst:953 msgid "" "A shallow copy of dictionary argument *globs* is used for the execution " "context." msgstr "" +"Une copie superficielle de l'argument-dictionnaire *globs* est utilisée pour " +"le contexte d'exécution." -#: library/doctest.rst:951 +#: library/doctest.rst:955 msgid "" -"Optional argument *name* is used in failure messages, and defaults to ``" -"\"NoName\"``." +"Optional argument *name* is used in failure messages, and defaults to " +"``\"NoName\"``." msgstr "" +"L'option *name* est utilisée pour les messages d'échec, et prend " +"``\"NoName\"`` comme valeur par défaut." -#: library/doctest.rst:954 +#: library/doctest.rst:958 msgid "" "If optional argument *verbose* is true, output is generated even if there " "are no failures. By default, output is generated only in case of an example " "failure." msgstr "" +"Si l'option *verbose* est vraie, les sorties sont générées même s'il n'y a " +"aucun échec. Par défaut, la sortie est générée seulement si un exemple " +"échoue." -#: library/doctest.rst:957 +#: library/doctest.rst:961 msgid "" "Optional argument *compileflags* gives the set of flags that should be used " "by the Python compiler when running the examples. By default, or if " "``None``, flags are deduced corresponding to the set of future features " "found in *globs*." msgstr "" +"L'option *compileflags* donne l'ensemble des options qui doit être utilisée " +"par le compilateur Python lorsqu'il exécute les exemples. Par défaut, ou si " +"``None``, les options sont inférées à partir de l'ensemble des " +"fonctionnalités futures trouvées dans *globs*." -#: library/doctest.rst:961 +#: library/doctest.rst:965 msgid "" "Optional argument *optionflags* works as for function :func:`testfile` above." msgstr "" +"L'option *optionflags* fonctionne similairement à la fonction :func:" +"`testfile` ci-dessus." -#: library/doctest.rst:967 +#: library/doctest.rst:971 msgid "Unittest API" -msgstr "" +msgstr "API de tests unitaires" -#: library/doctest.rst:969 +#: library/doctest.rst:973 msgid "" "As your collection of doctest'ed modules grows, you'll want a way to run all " "their doctests systematically. :mod:`doctest` provides two functions that " @@ -1014,20 +1472,33 @@ msgid "" "files containing doctests. To integrate with :mod:`unittest` test " "discovery, include a :func:`load_tests` function in your test module::" msgstr "" +"Au fur et à mesure que la collection de modules testés avec *doctest* " +"s'agrandira, vous allez souhaiter avoir une façon d'exécuter " +"systématiquement tous les *doctests*. Le module :mod:`doctest` fournit deux " +"fonctions qui peuvent être utilisées afin de créer des suites de tests " +"unitaires :mod:`unittest` à partir des modules et des fichiers textes " +"contenant des *doctests*. Afin d'intégrer la découverte fournie par :mod:" +"`unittest`, il suffit d'ajouter une fonction :func:`load_tests` dans votre " +"module de test ::" -#: library/doctest.rst:983 +#: library/doctest.rst:987 msgid "" "There are two main functions for creating :class:`unittest.TestSuite` " "instances from text files and modules with doctests:" msgstr "" +"Il y a deux fonctions principales pour créer des instances de la classe :" +"class:`unittest.TestSuite` à partir de fichiers textes et de modules ayant " +"des *doctests* :" -#: library/doctest.rst:989 +#: library/doctest.rst:993 msgid "" "Convert doctest tests from one or more text files to a :class:`unittest." "TestSuite`." msgstr "" +"Convertit des tests *doctest* à partir d'un ou plusieurs fichiers vers une " +"classe :class:`unittest.TestSuite`." -#: library/doctest.rst:992 +#: library/doctest.rst:996 msgid "" "The returned :class:`unittest.TestSuite` is to be run by the unittest " "framework and runs the interactive examples in each file. If an example in " @@ -1035,22 +1506,32 @@ msgid "" "`failureException` exception is raised showing the name of the file " "containing the test and a (sometimes approximate) line number." msgstr "" +"La classe renvoyée :class:`unittest.TestSuite` doit être exécutée dans le " +"cadriciel de tests unitaires et exécute les exemples interactifs trouvés " +"dans chaque fichier. Si un exemple de n'importe quel fichier échoue, alors " +"le test unitaire de synthèse échoue aussi, et une exception :exc:" +"`failureException` est levée, affichant le nom du fichier contenant le test " +"et un numéro de ligne (celui-ci est parfois approximatif)." -#: library/doctest.rst:998 +#: library/doctest.rst:1002 msgid "Pass one or more paths (as strings) to text files to be examined." msgstr "" +"Passe un ou plusieurs chemins (sous forme de chaînes de caractères) à des " +"fichiers textes afin d'être vérifiés." -#: library/doctest.rst:1000 +#: library/doctest.rst:1004 msgid "Options may be provided as keyword arguments:" -msgstr "" +msgstr "Les options peuvent être fournies comme des options lettrées :" -#: library/doctest.rst:1002 +#: library/doctest.rst:1006 msgid "" "Optional argument *module_relative* specifies how the filenames in *paths* " "should be interpreted:" msgstr "" +"L'option *module_relative* précise comment les noms de fichiers dans *paths* " +"doivent être interprétés :" -#: library/doctest.rst:1005 +#: library/doctest.rst:1009 msgid "" "If *module_relative* is ``True`` (the default), then each filename in " "*paths* specifies an OS-independent module-relative path. By default, this " @@ -1060,15 +1541,26 @@ msgid "" "segments, and may not be an absolute path (i.e., it may not begin with ``/" "``)." msgstr "" +"Si *module_relative* a ``True`` comme valeur (valeur par défaut), alors " +"chaque nom de fichier dans *paths* précise un chemin relatif au module qui " +"soit indépendant du système d'exploitation. Par défaut, ce chemin est " +"relatif au répertoire du module appelant ; mais si l'option *package* est " +"précisée, alors il est relatif à ce paquet. Afin de garantir l'indépendance " +"face au système d'exploitation, chaque nom de fichier doit utiliser des " +"caractères ``/`` afin de séparer les segments de chemin, et ne peut pas être " +"un chemin absolu (c'est-à-dire, il ne peut pas commencer par ``/``)." -#: library/doctest.rst:1013 +#: library/doctest.rst:1017 msgid "" "If *module_relative* is ``False``, then each filename in *paths* specifies " "an OS-specific path. The path may be absolute or relative; relative paths " "are resolved with respect to the current working directory." msgstr "" +"Si *module_relative* prend la valeur ``False``, alors *filename* précise un " +"chemin en fonction du système d'exploitation. Le chemin peut être absolu ou " +"relatif ; les chemins relatifs sont résolus en rapport au répertoire actif." -#: library/doctest.rst:1017 +#: library/doctest.rst:1021 msgid "" "Optional argument *package* is a Python package or the name of a Python " "package whose directory should be used as the base directory for module-" @@ -1077,49 +1569,79 @@ msgid "" "filenames. It is an error to specify *package* if *module_relative* is " "``False``." msgstr "" +"L'option *package* est un paquet Python ou le nom d'un paquet Python dont le " +"répertoire dont être utilisé comme le répertoire principal pour un nom de " +"fichier dans *paths* qui soit lié à un module. Si aucun paquet n'est " +"spécifié, le répertoire du module appelé à l'exécution est utilisé comme le " +"répertoire principal pour les noms de fichiers liés au module. C'est une " +"erreur que de spécifier *package* si *module_relative* a ``False`` comme " +"valeur." -#: library/doctest.rst:1024 +#: library/doctest.rst:1028 msgid "" "Optional argument *setUp* specifies a set-up function for the test suite. " "This is called before running the tests in each file. The *setUp* function " "will be passed a :class:`DocTest` object. The setUp function can access the " "test globals as the *globs* attribute of the test passed." msgstr "" +"L'option *setUp* précise une fonction de mise-en-place pour la suite de " +"tests. Ceci est appelé avant l'exécution des tests dans chaque fichier. La " +"fonction *setUp* est passée à un objet :class:`DocTest`. La fonction *setUp* " +"peut accéder aux valeurs globales du test par le biais de l'attribut *globs* " +"du test passé." -#: library/doctest.rst:1029 +#: library/doctest.rst:1033 msgid "" "Optional argument *tearDown* specifies a tear-down function for the test " "suite. This is called after running the tests in each file. The *tearDown* " "function will be passed a :class:`DocTest` object. The setUp function can " "access the test globals as the *globs* attribute of the test passed." msgstr "" +"L'option *tearDown* précise une fonction de démolition pour la suite de " +"tests. Celle-ci est appelée après avoir exécuté les tests dans chaque " +"fichier. La fonction *tearDown* est passée à un objet :class:`DocTest`. La " +"fonction *setUp* peut accéder aux valeurs globales du test par l'attribut " +"*globs* du test passé." -#: library/doctest.rst:1068 +#: library/doctest.rst:1072 msgid "" "Optional argument *globs* is a dictionary containing the initial global " "variables for the tests. A new copy of this dictionary is created for each " "test. By default, *globs* is a new empty dictionary." msgstr "" +"L'option *globs* est un dictionnaire contenant les variables globales " +"initiales pour les tests. Une nouvelle copie de ce dictionnaire est créée " +"pour chaque test. Par défaut, *globs* est un nouveau dictionnaire vide." -#: library/doctest.rst:1038 +#: library/doctest.rst:1042 msgid "" "Optional argument *optionflags* specifies the default doctest options for " "the tests, created by or-ing together individual option flags. See section :" "ref:`doctest-options`. See function :func:`set_unittest_reportflags` below " "for a better way to set reporting options." msgstr "" +"Les options *optionflags* précisent les options par défaut de *doctest* pour " +"les tests, créées en composant par un OU les différentes options " +"individuelles. Voir la section :ref:`doctest-options`. Voir la fonction :" +"func:`set_unittest_reportflags` ci-dessous pour une meilleure façon de " +"préciser des options de rapport." -#: library/doctest.rst:1050 +#: library/doctest.rst:1054 msgid "" "The global ``__file__`` is added to the globals provided to doctests loaded " "from a text file using :func:`DocFileSuite`." msgstr "" +"La valeur globale ``__file__`` est ajoutée aux valeurs globales fournies par " +"les *doctests*, ceux-ci étant téléchargés d'un fichier texte utilisant la " +"fonction :func:`DocFileSuite`." -#: library/doctest.rst:1056 +#: library/doctest.rst:1060 msgid "Convert doctest tests for a module to a :class:`unittest.TestSuite`." msgstr "" +"Convertit les tests *doctest* pour un module donné à une classe :class:" +"`unittest.TestSuite`." -#: library/doctest.rst:1058 +#: library/doctest.rst:1062 msgid "" "The returned :class:`unittest.TestSuite` is to be run by the unittest " "framework and runs each doctest in the module. If any of the doctests fail, " @@ -1127,43 +1649,64 @@ msgid "" "exception is raised showing the name of the file containing the test and a " "(sometimes approximate) line number." msgstr "" +"La classe renvoyée :class:`unittest.TestSuite` doit être exécutée par le " +"cadriciel de test unitaire, afin d'exécuter chaque *doctest* dans le module. " +"Si n'importe lequel des *doctests* échoue, alors le test unitaire de " +"synthèse échoue, et une exception :exc:`failureException` est levée, " +"affichant le nom du fichier contenant le test et un numéro de ligne pouvant " +"être approximatif." -#: library/doctest.rst:1064 +#: library/doctest.rst:1068 msgid "" "Optional argument *module* provides the module to be tested. It can be a " "module object or a (possibly dotted) module name. If not specified, the " "module calling this function is used." msgstr "" +"L'option *module* fournit le module qui sera testé. Il peut prendre la forme " +"d'un objet-module ou celle du nom d'un module (possiblement *dotted*). Si " +"non-précisée, le module appelant cette fonction est utilisé." -#: library/doctest.rst:1072 +#: library/doctest.rst:1076 msgid "" "Optional argument *extraglobs* specifies an extra set of global variables, " "which is merged into *globs*. By default, no extra globals are used." msgstr "" +"L'option *extraglobs* précise un ensemble supplémentaire de variables " +"globales, à fusionner avec *globs*. Par défaut, aucune variable globale " +"supplémentaire est utilisée." -#: library/doctest.rst:1075 +#: library/doctest.rst:1079 msgid "" "Optional argument *test_finder* is the :class:`DocTestFinder` object (or a " "drop-in replacement) that is used to extract doctests from the module." msgstr "" +"L'option *test_finder* est l'instance de :class:`DocTestFinder` (ou un " +"remplacement *drop-in*) qui est utilisée pour extraire les *doctests* à " +"partir du module." -#: library/doctest.rst:1078 +#: library/doctest.rst:1082 msgid "" "Optional arguments *setUp*, *tearDown*, and *optionflags* are the same as " "for function :func:`DocFileSuite` above." msgstr "" +"Les options *setUp*, *tearDown* et *optionflags* sont les mêmes que pour la " +"fonction :func:`DocFileSuite` ci-dessus." -#: library/doctest.rst:1081 +#: library/doctest.rst:1085 msgid "This function uses the same search technique as :func:`testmod`." msgstr "" +"Cette fonction utilise la même technique de recherche que :func:`testmod`." -#: library/doctest.rst:1083 +#: library/doctest.rst:1087 msgid "" ":func:`DocTestSuite` returns an empty :class:`unittest.TestSuite` if " "*module* contains no docstrings instead of raising :exc:`ValueError`." msgstr "" +"La fonction :func:`DocTestSuite` renvoie une instance vide de la classe :" +"class:`unittest.TestSuite` si *module* ne contient aucune *docstring*, et " +"ce, au lieu de lever l'exception :exc:`ValueError`." -#: library/doctest.rst:1088 +#: library/doctest.rst:1092 msgid "" "Under the covers, :func:`DocTestSuite` creates a :class:`unittest.TestSuite` " "out of :class:`doctest.DocTestCase` instances, and :class:`DocTestCase` is a " @@ -1171,15 +1714,24 @@ msgid "" "documented here (it's an internal detail), but studying its code can answer " "questions about the exact details of :mod:`unittest` integration." msgstr "" +"Sous le capot, :func:`DocTestSuite` crée une classe :class:`unittest." +"TestSuite` à partir d'instances de :class:`doctest.DocTestCase` ; de plus, :" +"class:`DocTestCase` est une sous-classe de :class:`unittest.TestCase`. La " +"classe :class:`DocTestCase` n'est pas documentée ici (c'est un détail " +"interne), mais l'étude de son code peut répondre à des questions concernant " +"les détails exacts de l'intégration du module :mod:`doctest`." -#: library/doctest.rst:1094 +#: library/doctest.rst:1098 msgid "" "Similarly, :func:`DocFileSuite` creates a :class:`unittest.TestSuite` out " "of :class:`doctest.DocFileCase` instances, and :class:`DocFileCase` is a " "subclass of :class:`DocTestCase`." msgstr "" +"De la même façon, :func:`DocFileSuite` crée une classe :class:`unittest." +"TestSuite` à partir des instances :class:`doctest.DocFileCase`, où :class:" +"`DocFileCase` est une sous-classe de :class:`DocTestCase`." -#: library/doctest.rst:1098 +#: library/doctest.rst:1102 msgid "" "So both ways of creating a :class:`unittest.TestSuite` run instances of :" "class:`DocTestCase`. This is important for a subtle reason: when you run :" @@ -1191,24 +1743,43 @@ msgid "" "specified by command line options), but there's no way to pass options " "through :mod:`unittest` to :mod:`doctest` test runners." msgstr "" - -#: library/doctest.rst:1108 +"Ainsi, les deux façons de créer une :class:`unittest.TestSuite` utilisent " +"des instances de la classe :class:`DocTestCase`. Ceci est important pour une " +"raison subtile : lorsque vous exécutez par vous-même des fonctions :mod:" +"`doctest`, vous pouvez contrôler les options :mod:`doctest` qui sont " +"utilisées de façon directe, en passant des options aux fonctions :mod:" +"`doctest`. Toutefois, si vous écrivez un cadriciel :mod:`unittest`, alors :" +"mod:`unittest` a le contrôle final de quand et de comment les tests sont " +"exécutés. La personne qui écrit le cadriciel souhaite habituellement " +"contrôler les options de rapport de :mod:`doctest` (qui sont peut-être, par " +"exemple, spécifiées en options de ligne de commande), sauf qu'il n'y a pas " +"de moyen de spécifier des options à l'attention des exécuteurs de test de :" +"mod:`doctest` à partir de :mod:`unittest`." + +#: library/doctest.rst:1112 msgid "" "For this reason, :mod:`doctest` also supports a notion of :mod:`doctest` " "reporting flags specific to :mod:`unittest` support, via this function:" msgstr "" +"Pour cette raison, :mod:`doctest` implémente le concept d'options de rapport " +"de :mod:`doctest` qui soit spécifique à :mod:`unittest`, par le biais de " +"cette fonction :" -#: library/doctest.rst:1114 +#: library/doctest.rst:1118 msgid "Set the :mod:`doctest` reporting flags to use." msgstr "" +"Voir les options de ligne de commandes de :mod:`doctest` pour l'utilisation." -#: library/doctest.rst:1116 +#: library/doctest.rst:1120 msgid "" "Argument *flags* takes the :ref:`bitwise OR ` of option flags. See " "section :ref:`doctest-options`. Only \"reporting flags\" can be used." msgstr "" +"L'argument *flags* prend la :ref:`composition OU bit à bit ` des " +"arguments. Voir la section :ref:`doctest-options`. Ce sont uniquement les " +"\"options de rapport\" qui peuvent être utilisées." -#: library/doctest.rst:1119 +#: library/doctest.rst:1123 msgid "" "This is a module-global setting, and affects all future doctests run by " "module :mod:`unittest`: the :meth:`runTest` method of :class:`DocTestCase` " @@ -1221,18 +1792,32 @@ msgid "" "were specified when the :class:`DocTestCase` instance was constructed, :mod:" "`doctest`'s :mod:`unittest` reporting flags are ignored." msgstr "" - -#: library/doctest.rst:1130 +"Ceci est un paramètre au niveau global du module, et affecte tous les futurs " +"*doctests* exécutés par le module :mod:`unittest` : la méthode :meth:" +"`runTest` de :class:`DocTestCase` prend en compte les options précisées pour " +"le cas de test lorsque l'instance de la classe :class:`DocTestCase` a été " +"construite. Si aucune option de rapport n'a été précisée (ce qui est le cas " +"typique et attendu), les options de rapport du module :mod:`unitest` de :mod:" +"`doctest` sont :ref:`` vers les options, et " +"les options obtenues sont passées à l'instance de la classe :class:" +"`DocTestRunner` créée pour exécuter le *doctest*. Si une seule option de " +"rapport a été précisée lorsque l'instance de :class:`DocTestCase` a été " +"construite, les options de rapport du module :mod:`unittest` de :mod:" +"`doctest` sont ignorées." + +#: library/doctest.rst:1134 msgid "" "The value of the :mod:`unittest` reporting flags in effect before the " "function was called is returned by the function." msgstr "" +"La valeur prise par les options de rapport de :mod:`unittest` et ce, avant " +"que la fonction n'ait été appelée, est renvoyée par la fonction." -#: library/doctest.rst:1137 +#: library/doctest.rst:1141 msgid "Advanced API" -msgstr "" +msgstr "API avancé" -#: library/doctest.rst:1139 +#: library/doctest.rst:1143 msgid "" "The basic API is a simple wrapper that's intended to make doctest easy to " "use. It is fairly flexible, and should meet most users' needs; however, if " @@ -1240,85 +1825,91 @@ msgid "" "doctest's capabilities, then you should use the advanced API." msgstr "" -#: library/doctest.rst:1144 +#: library/doctest.rst:1148 msgid "" "The advanced API revolves around two container classes, which are used to " "store the interactive examples extracted from doctest cases:" msgstr "" -#: library/doctest.rst:1147 +#: library/doctest.rst:1151 msgid "" ":class:`Example`: A single Python :term:`statement`, paired with its " "expected output." msgstr "" +":class:`Example` : Un unique :term:`statement` Python, pris conjointement " +"avec sa sortie attendue." -#: library/doctest.rst:1150 +#: library/doctest.rst:1154 msgid "" ":class:`DocTest`: A collection of :class:`Example`\\ s, typically extracted " "from a single docstring or text file." msgstr "" +":class:`DocTest` : Une collection de :class:`Example`, habituellement " +"extraits d'une seule *docstring* ou fichier texte." -#: library/doctest.rst:1153 +#: library/doctest.rst:1157 msgid "" "Additional processing classes are defined to find, parse, and run, and check " "doctest examples:" msgstr "" -#: library/doctest.rst:1156 +#: library/doctest.rst:1160 msgid "" ":class:`DocTestFinder`: Finds all docstrings in a given module, and uses a :" "class:`DocTestParser` to create a :class:`DocTest` from every docstring that " "contains interactive examples." msgstr "" -#: library/doctest.rst:1160 +#: library/doctest.rst:1164 msgid "" ":class:`DocTestParser`: Creates a :class:`DocTest` object from a string " "(such as an object's docstring)." msgstr "" -#: library/doctest.rst:1163 +#: library/doctest.rst:1167 msgid "" ":class:`DocTestRunner`: Executes the examples in a :class:`DocTest`, and " "uses an :class:`OutputChecker` to verify their output." msgstr "" -#: library/doctest.rst:1166 +#: library/doctest.rst:1170 msgid "" ":class:`OutputChecker`: Compares the actual output from a doctest example " "with the expected output, and decides whether they match." msgstr "" -#: library/doctest.rst:1169 +#: library/doctest.rst:1173 msgid "" "The relationships among these processing classes are summarized in the " "following diagram::" msgstr "" -#: library/doctest.rst:1185 +#: library/doctest.rst:1189 msgid "DocTest Objects" -msgstr "" +msgstr "Objets *doctest*" -#: library/doctest.rst:1190 +#: library/doctest.rst:1194 msgid "" "A collection of doctest examples that should be run in a single namespace. " "The constructor arguments are used to initialize the attributes of the same " "names." msgstr "" -#: library/doctest.rst:1194 +#: library/doctest.rst:1198 msgid "" ":class:`DocTest` defines the following attributes. They are initialized by " "the constructor, and should not be modified directly." msgstr "" +":class:`DocTest` définit les attributs suivants. Ils sont initialisés par le " +"constructeur, et ne doivent pas être modifiés directement." -#: library/doctest.rst:1200 +#: library/doctest.rst:1204 msgid "" "A list of :class:`Example` objects encoding the individual interactive " "Python examples that should be run by this test." msgstr "" -#: library/doctest.rst:1206 +#: library/doctest.rst:1210 msgid "" "The namespace (aka globals) that the examples should be run in. This is a " "dictionary mapping names to values. Any changes to the namespace made by " @@ -1326,57 +1917,57 @@ msgid "" "`globs` after the test is run." msgstr "" -#: library/doctest.rst:1214 +#: library/doctest.rst:1218 msgid "" "A string name identifying the :class:`DocTest`. Typically, this is the name " "of the object or file that the test was extracted from." msgstr "" -#: library/doctest.rst:1220 +#: library/doctest.rst:1224 msgid "" "The name of the file that this :class:`DocTest` was extracted from; or " "``None`` if the filename is unknown, or if the :class:`DocTest` was not " "extracted from a file." msgstr "" -#: library/doctest.rst:1227 +#: library/doctest.rst:1231 msgid "" "The line number within :attr:`filename` where this :class:`DocTest` begins, " "or ``None`` if the line number is unavailable. This line number is zero-" "based with respect to the beginning of the file." msgstr "" -#: library/doctest.rst:1234 +#: library/doctest.rst:1238 msgid "" "The string that the test was extracted from, or ``None`` if the string is " "unavailable, or if the test was not extracted from a string." msgstr "" -#: library/doctest.rst:1241 +#: library/doctest.rst:1245 msgid "Example Objects" -msgstr "" +msgstr "Exemples d'objets" -#: library/doctest.rst:1246 +#: library/doctest.rst:1250 msgid "" "A single interactive example, consisting of a Python statement and its " "expected output. The constructor arguments are used to initialize the " "attributes of the same names." msgstr "" -#: library/doctest.rst:1251 +#: library/doctest.rst:1255 msgid "" ":class:`Example` defines the following attributes. They are initialized by " "the constructor, and should not be modified directly." msgstr "" -#: library/doctest.rst:1257 +#: library/doctest.rst:1261 msgid "" "A string containing the example's source code. This source code consists of " "a single Python statement, and always ends with a newline; the constructor " "adds a newline when necessary." msgstr "" -#: library/doctest.rst:1264 +#: library/doctest.rst:1268 msgid "" "The expected output from running the example's source code (either from " "stdout, or a traceback in case of exception). :attr:`want` ends with a " @@ -1384,7 +1975,7 @@ msgid "" "The constructor adds a newline when necessary." msgstr "" -#: library/doctest.rst:1272 +#: library/doctest.rst:1276 msgid "" "The exception message generated by the example, if the example is expected " "to generate an exception; or ``None`` if it is not expected to generate an " @@ -1393,20 +1984,20 @@ msgid "" "unless it's ``None``. The constructor adds a newline if needed." msgstr "" -#: library/doctest.rst:1281 +#: library/doctest.rst:1285 msgid "" "The line number within the string containing this example where the example " "begins. This line number is zero-based with respect to the beginning of the " "containing string." msgstr "" -#: library/doctest.rst:1288 +#: library/doctest.rst:1292 msgid "" "The example's indentation in the containing string, i.e., the number of " "space characters that precede the example's first prompt." msgstr "" -#: library/doctest.rst:1294 +#: library/doctest.rst:1298 msgid "" "A dictionary mapping from option flags to ``True`` or ``False``, which is " "used to override default options for this example. Any option flags not " @@ -1415,11 +2006,11 @@ msgid "" "are set." msgstr "" -#: library/doctest.rst:1303 +#: library/doctest.rst:1307 msgid "DocTestFinder objects" -msgstr "" +msgstr "Objets *DocTestFinder*" -#: library/doctest.rst:1308 +#: library/doctest.rst:1312 msgid "" "A processing class used to extract the :class:`DocTest`\\ s that are " "relevant to a given object, from its docstring and the docstrings of its " @@ -1427,48 +2018,48 @@ msgid "" "classes, functions, methods, staticmethods, classmethods, and properties." msgstr "" -#: library/doctest.rst:1313 +#: library/doctest.rst:1317 msgid "" "The optional argument *verbose* can be used to display the objects searched " "by the finder. It defaults to ``False`` (no output)." msgstr "" -#: library/doctest.rst:1316 +#: library/doctest.rst:1320 msgid "" "The optional argument *parser* specifies the :class:`DocTestParser` object " "(or a drop-in replacement) that is used to extract doctests from docstrings." msgstr "" -#: library/doctest.rst:1319 +#: library/doctest.rst:1323 msgid "" "If the optional argument *recurse* is false, then :meth:`DocTestFinder.find` " "will only examine the given object, and not any contained objects." msgstr "" -#: library/doctest.rst:1322 +#: library/doctest.rst:1326 msgid "" "If the optional argument *exclude_empty* is false, then :meth:`DocTestFinder." "find` will include tests for objects with empty docstrings." msgstr "" -#: library/doctest.rst:1326 +#: library/doctest.rst:1330 msgid ":class:`DocTestFinder` defines the following method:" -msgstr "" +msgstr "La classe :class:`DocTestFinder` définit la méthode suivante :" -#: library/doctest.rst:1331 +#: library/doctest.rst:1335 msgid "" "Return a list of the :class:`DocTest`\\ s that are defined by *obj*'s " "docstring, or by any of its contained objects' docstrings." msgstr "" -#: library/doctest.rst:1334 +#: library/doctest.rst:1338 msgid "" "The optional argument *name* specifies the object's name; this name will be " "used to construct names for the returned :class:`DocTest`\\ s. If *name* is " "not specified, then ``obj.__name__`` is used." msgstr "" -#: library/doctest.rst:1338 +#: library/doctest.rst:1342 msgid "" "The optional parameter *module* is the module that contains the given " "object. If the module is not specified or is ``None``, then the test finder " @@ -1476,26 +2067,26 @@ msgid "" "module is used:" msgstr "" -#: library/doctest.rst:1342 +#: library/doctest.rst:1346 msgid "As a default namespace, if *globs* is not specified." msgstr "" -#: library/doctest.rst:1344 +#: library/doctest.rst:1348 msgid "" "To prevent the DocTestFinder from extracting DocTests from objects that are " "imported from other modules. (Contained objects with modules other than " "*module* are ignored.)" msgstr "" -#: library/doctest.rst:1348 +#: library/doctest.rst:1352 msgid "To find the name of the file containing the object." -msgstr "" +msgstr "Afin de trouver le nom du fichier contenant l'objet." -#: library/doctest.rst:1350 +#: library/doctest.rst:1354 msgid "To help find the line number of the object within its file." msgstr "" -#: library/doctest.rst:1352 +#: library/doctest.rst:1356 msgid "" "If *module* is ``False``, no attempt to find the module will be made. This " "is obscure, of use mostly in testing doctest itself: if *module* is " @@ -1504,7 +2095,7 @@ msgid "" "contained objects will (recursively) be searched for doctests." msgstr "" -#: library/doctest.rst:1358 +#: library/doctest.rst:1362 msgid "" "The globals for each :class:`DocTest` is formed by combining *globs* and " "*extraglobs* (bindings in *extraglobs* override bindings in *globs*). A new " @@ -1514,34 +2105,39 @@ msgid "" "defaults to ``{}``." msgstr "" -#: library/doctest.rst:1369 +#: library/doctest.rst:1373 msgid "DocTestParser objects" -msgstr "" +msgstr "Objets *DocTestParser*" -#: library/doctest.rst:1374 +#: library/doctest.rst:1378 msgid "" "A processing class used to extract interactive examples from a string, and " "use them to create a :class:`DocTest` object." msgstr "" -#: library/doctest.rst:1446 +#: library/doctest.rst:1450 msgid ":class:`DocTestParser` defines the following methods:" -msgstr "" +msgstr "La classe :class:`DocTestFinder` définit les méthodes suivantes :" -#: library/doctest.rst:1383 +#: library/doctest.rst:1387 msgid "" "Extract all doctest examples from the given string, and collect them into a :" "class:`DocTest` object." msgstr "" +"Extrait tous les exemples de *doctests* à partir de la chaîne de caractère " +"donnée, et les réunit dans un objet :class:`DocTest`." -#: library/doctest.rst:1386 +#: library/doctest.rst:1390 msgid "" "*globs*, *name*, *filename*, and *lineno* are attributes for the new :class:" "`DocTest` object. See the documentation for :class:`DocTest` for more " "information." msgstr "" +"Notez que *globs*, *name*, *filname* et *lineno* sont des attributs pour le " +"nouvel objet :class:`DocTest`. Voir la documentation pour :class:`DocTest` " +"pour plus d'information." -#: library/doctest.rst:1393 +#: library/doctest.rst:1397 msgid "" "Extract all doctest examples from the given string, and return them as a " "list of :class:`Example` objects. Line numbers are 0-based. The optional " @@ -1549,7 +2145,7 @@ msgid "" "error messages." msgstr "" -#: library/doctest.rst:1400 +#: library/doctest.rst:1404 msgid "" "Divide the given string into examples and intervening text, and return them " "as a list of alternating :class:`Example`\\ s and strings. Line numbers for " @@ -1557,17 +2153,17 @@ msgid "" "name identifying this string, and is only used for error messages." msgstr "" -#: library/doctest.rst:1409 +#: library/doctest.rst:1413 msgid "DocTestRunner objects" -msgstr "" +msgstr "Objets *DocTestRunner*" -#: library/doctest.rst:1414 +#: library/doctest.rst:1418 msgid "" "A processing class used to execute and verify the interactive examples in a :" "class:`DocTest`." msgstr "" -#: library/doctest.rst:1417 +#: library/doctest.rst:1421 msgid "" "The comparison between expected outputs and actual outputs is done by an :" "class:`OutputChecker`. This comparison may be customized with a number of " @@ -1577,7 +2173,7 @@ msgid "" "constructor." msgstr "" -#: library/doctest.rst:1423 +#: library/doctest.rst:1427 msgid "" "The test runner's display output can be controlled in two ways. First, an " "output function can be passed to :meth:`TestRunner.run`; this function will " @@ -1588,14 +2184,14 @@ msgid "" "`report_unexpected_exception`, and :meth:`report_failure`." msgstr "" -#: library/doctest.rst:1431 +#: library/doctest.rst:1435 msgid "" "The optional keyword argument *checker* specifies the :class:`OutputChecker` " "object (or drop-in replacement) that should be used to compare the expected " "outputs to the actual outputs of doctest examples." msgstr "" -#: library/doctest.rst:1435 +#: library/doctest.rst:1439 msgid "" "The optional keyword argument *verbose* controls the :class:" "`DocTestRunner`'s verbosity. If *verbose* is ``True``, then information is " @@ -1604,56 +2200,56 @@ msgid "" "verbose output is used iff the command-line switch ``-v`` is used." msgstr "" -#: library/doctest.rst:1441 +#: library/doctest.rst:1445 msgid "" "The optional keyword argument *optionflags* can be used to control how the " "test runner compares expected output to actual output, and how it displays " "failures. For more information, see section :ref:`doctest-options`." msgstr "" -#: library/doctest.rst:1451 +#: library/doctest.rst:1455 msgid "" "Report that the test runner is about to process the given example. This " "method is provided to allow subclasses of :class:`DocTestRunner` to " "customize their output; it should not be called directly." msgstr "" -#: library/doctest.rst:1455 +#: library/doctest.rst:1459 msgid "" "*example* is the example about to be processed. *test* is the test " "*containing example*. *out* is the output function that was passed to :meth:" "`DocTestRunner.run`." msgstr "" -#: library/doctest.rst:1462 +#: library/doctest.rst:1466 msgid "" "Report that the given example ran successfully. This method is provided to " "allow subclasses of :class:`DocTestRunner` to customize their output; it " "should not be called directly." msgstr "" -#: library/doctest.rst:1477 +#: library/doctest.rst:1481 msgid "" "*example* is the example about to be processed. *got* is the actual output " "from the example. *test* is the test containing *example*. *out* is the " "output function that was passed to :meth:`DocTestRunner.run`." msgstr "" -#: library/doctest.rst:1473 +#: library/doctest.rst:1477 msgid "" "Report that the given example failed. This method is provided to allow " "subclasses of :class:`DocTestRunner` to customize their output; it should " "not be called directly." msgstr "" -#: library/doctest.rst:1484 +#: library/doctest.rst:1488 msgid "" "Report that the given example raised an unexpected exception. This method is " "provided to allow subclasses of :class:`DocTestRunner` to customize their " "output; it should not be called directly." msgstr "" -#: library/doctest.rst:1488 +#: library/doctest.rst:1492 msgid "" "*example* is the example about to be processed. *exc_info* is a tuple " "containing information about the unexpected exception (as returned by :func:" @@ -1661,13 +2257,13 @@ msgid "" "output function that was passed to :meth:`DocTestRunner.run`." msgstr "" -#: library/doctest.rst:1496 +#: library/doctest.rst:1500 msgid "" "Run the examples in *test* (a :class:`DocTest` object), and display the " "results using the writer function *out*." msgstr "" -#: library/doctest.rst:1499 +#: library/doctest.rst:1503 msgid "" "The examples are run in the namespace ``test.globs``. If *clear_globs* is " "true (the default), then this namespace will be cleared after the test runs, " @@ -1675,39 +2271,39 @@ msgid "" "after the test completes, then use *clear_globs=False*." msgstr "" -#: library/doctest.rst:1504 +#: library/doctest.rst:1508 msgid "" "*compileflags* gives the set of flags that should be used by the Python " "compiler when running the examples. If not specified, then it will default " "to the set of future-import flags that apply to *globs*." msgstr "" -#: library/doctest.rst:1508 +#: library/doctest.rst:1512 msgid "" "The output of each example is checked using the :class:`DocTestRunner`'s " "output checker, and the results are formatted by the :meth:`DocTestRunner." "report_\\*` methods." msgstr "" -#: library/doctest.rst:1515 +#: library/doctest.rst:1519 msgid "" "Print a summary of all the test cases that have been run by this " "DocTestRunner, and return a :term:`named tuple` ``TestResults(failed, " "attempted)``." msgstr "" -#: library/doctest.rst:1518 +#: library/doctest.rst:1522 msgid "" "The optional *verbose* argument controls how detailed the summary is. If " "the verbosity is not specified, then the :class:`DocTestRunner`'s verbosity " "is used." msgstr "" -#: library/doctest.rst:1525 +#: library/doctest.rst:1529 msgid "OutputChecker objects" -msgstr "" +msgstr "Objets *OutputChecker*" -#: library/doctest.rst:1530 +#: library/doctest.rst:1534 msgid "" "A class used to check the whether the actual output from a doctest example " "matches the expected output. :class:`OutputChecker` defines two methods: :" @@ -1716,11 +2312,11 @@ msgid "" "string describing the differences between two outputs." msgstr "" -#: library/doctest.rst:1537 +#: library/doctest.rst:1541 msgid ":class:`OutputChecker` defines the following methods:" -msgstr "" +msgstr "La classe :class:`OutputChecker` définit les méthodes suivantes :" -#: library/doctest.rst:1541 +#: library/doctest.rst:1545 msgid "" "Return ``True`` iff the actual output from an example (*got*) matches the " "expected output (*want*). These strings are always considered to match if " @@ -1729,28 +2325,31 @@ msgid "" "`doctest-options` for more information about option flags." msgstr "" -#: library/doctest.rst:1550 +#: library/doctest.rst:1554 msgid "" "Return a string describing the differences between the expected output for a " "given example (*example*) and the actual output (*got*). *optionflags* is " "the set of option flags used to compare *want* and *got*." msgstr "" -#: library/doctest.rst:1558 +#: library/doctest.rst:1562 msgid "Debugging" -msgstr "" +msgstr "Débogage" -#: library/doctest.rst:1560 +#: library/doctest.rst:1564 msgid "Doctest provides several mechanisms for debugging doctest examples:" msgstr "" +"*Doctest* fournit plusieurs mécanismes pour déboguer des exemples *doctest* :" -#: library/doctest.rst:1562 +#: library/doctest.rst:1566 msgid "" "Several functions convert doctests to executable Python programs, which can " "be run under the Python debugger, :mod:`pdb`." msgstr "" +"Plusieurs fonctions convertissent les *doctests* en programmes Python " +"exécutables, qui peuvent être exécutés grâce au débogueur Python, :mod:`pdb`." -#: library/doctest.rst:1565 +#: library/doctest.rst:1569 msgid "" "The :class:`DebugRunner` class is a subclass of :class:`DocTestRunner` that " "raises an exception for the first failing example, containing information " @@ -1758,13 +2357,13 @@ msgid "" "debugging on the example." msgstr "" -#: library/doctest.rst:1570 +#: library/doctest.rst:1574 msgid "" "The :mod:`unittest` cases generated by :func:`DocTestSuite` support the :" "meth:`debug` method defined by :class:`unittest.TestCase`." msgstr "" -#: library/doctest.rst:1573 +#: library/doctest.rst:1577 msgid "" "You can add a call to :func:`pdb.set_trace` in a doctest example, and you'll " "drop into the Python debugger when that line is executed. Then you can " @@ -1772,21 +2371,21 @@ msgid "" "`a.py` contains just this module docstring::" msgstr "" -#: library/doctest.rst:1588 +#: library/doctest.rst:1592 msgid "Then an interactive Python session may look like this::" -msgstr "" +msgstr "Alors une séance interactive de Python peut ressembler à ceci ::" -#: library/doctest.rst:1621 +#: library/doctest.rst:1625 msgid "" "Functions that convert doctests to Python code, and possibly run the " "synthesized code under the debugger:" msgstr "" -#: library/doctest.rst:1627 +#: library/doctest.rst:1631 msgid "Convert text with examples to a script." -msgstr "" +msgstr "Convertit du texte contenant des exemples en un script." -#: library/doctest.rst:1629 +#: library/doctest.rst:1633 msgid "" "Argument *s* is a string containing doctest examples. The string is " "converted to a Python script, where doctest examples in *s* are converted to " @@ -1794,22 +2393,26 @@ msgid "" "generated script is returned as a string. For example, ::" msgstr "" -#: library/doctest.rst:1644 +#: library/doctest.rst:1648 +#, fuzzy msgid "displays::" -msgstr "" +msgstr "affiche ::" -#: library/doctest.rst:1654 +#: library/doctest.rst:1658 msgid "" "This function is used internally by other functions (see below), but can " "also be useful when you want to transform an interactive Python session into " "a Python script." msgstr "" +"Cette fonction est utilisée à l'interne par d'autres fonctions (voir ci-" +"bas), mais peut aussi être utile lorsque l'on souhaite transformer une " +"séance interactive de Python en script Python." -#: library/doctest.rst:1661 +#: library/doctest.rst:1665 msgid "Convert the doctest for an object to a script." -msgstr "" +msgstr "Convertit en script l'objet *doctest*." -#: library/doctest.rst:1663 +#: library/doctest.rst:1667 msgid "" "Argument *module* is a module object, or dotted name of a module, containing " "the object whose doctests are of interest. Argument *name* is the name " @@ -1819,17 +2422,19 @@ msgid "" "module :file:`a.py` contains a top-level function :func:`f`, then ::" msgstr "" -#: library/doctest.rst:1673 +#: library/doctest.rst:1677 msgid "" "prints a script version of function :func:`f`'s docstring, with doctests " "converted to code, and the rest placed in comments." msgstr "" +"affiche une version script de la *docstring* de la fonction :func:`f`, avec " +"des *doctests* convertis en code, et le reste dans les commentaires." -#: library/doctest.rst:1679 +#: library/doctest.rst:1683 msgid "Debug the doctests for an object." -msgstr "" +msgstr "Débogue les *doctests* pour un objet." -#: library/doctest.rst:1681 +#: library/doctest.rst:1685 msgid "" "The *module* and *name* arguments are the same as for function :func:" "`testsource` above. The synthesized Python script for the named object's " @@ -1837,13 +2442,15 @@ msgid "" "the control of the Python debugger, :mod:`pdb`." msgstr "" -#: library/doctest.rst:1686 +#: library/doctest.rst:1690 msgid "" "A shallow copy of ``module.__dict__`` is used for both local and global " "execution context." msgstr "" +"Une copie superficielle de ``module.__dict__`` est utilisée à la fois pour " +"les contextes d'exécution locaux et globaux." -#: library/doctest.rst:1689 +#: library/doctest.rst:1693 msgid "" "Optional argument *pm* controls whether post-mortem debugging is used. If " "*pm* has a true value, the script file is run directly, and the debugger " @@ -1855,30 +2462,39 @@ msgid "" "to :func:`pdb.run`." msgstr "" -#: library/doctest.rst:1700 +#: library/doctest.rst:1704 msgid "Debug the doctests in a string." -msgstr "" +msgstr "Débogue les *doctests* dans une chaîne de caractères." -#: library/doctest.rst:1702 +#: library/doctest.rst:1706 msgid "" "This is like function :func:`debug` above, except that a string containing " "doctest examples is specified directly, via the *src* argument." msgstr "" +"Ceci est similaire à la fonction :func:`debug` décrite ci-haut, mis-à-part " +"qu'une chaîne de caractères contenant des exemples *doctest* est définie " +"directement, par l'option *src*." -#: library/doctest.rst:1705 +#: library/doctest.rst:1709 msgid "" "Optional argument *pm* has the same meaning as in function :func:`debug` " "above." msgstr "" +"L'option *pm* a la même définition que dans la fonction :func:`debug` ci-" +"haut." -#: library/doctest.rst:1707 +#: library/doctest.rst:1711 msgid "" "Optional argument *globs* gives a dictionary to use as both local and global " "execution context. If not specified, or ``None``, an empty dictionary is " "used. If specified, a shallow copy of the dictionary is used." msgstr "" +"L'option *globs* définit un dictionnaire à utiliser comme contexte " +"d'exécution global et local. Si elle n'est pas définie, ou si ``None``, un " +"dictionnaire vide est utilisé. Si définie, une copie superficielle du " +"dictionnaire est utilisée." -#: library/doctest.rst:1712 +#: library/doctest.rst:1716 msgid "" "The :class:`DebugRunner` class, and the special exceptions it may raise, are " "of most interest to testing framework authors, and will only be sketched " @@ -1886,7 +2502,7 @@ msgid "" "(which is a doctest!) for more details:" msgstr "" -#: library/doctest.rst:1720 +#: library/doctest.rst:1724 msgid "" "A subclass of :class:`DocTestRunner` that raises an exception as soon as a " "failure is encountered. If an unexpected exception occurs, an :exc:" @@ -1896,89 +2512,107 @@ msgid "" "the actual output." msgstr "" -#: library/doctest.rst:1727 +#: library/doctest.rst:1731 msgid "" "For information about the constructor parameters and methods, see the " "documentation for :class:`DocTestRunner` in section :ref:`doctest-advanced-" "api`." msgstr "" +"Pour de l'information sur les paramètres et méthodes du constructeur, voir " +"la documentation pour la classe :class:`DocTestrunner` dans la section :reF:" +"`doctest-advanced-api`." -#: library/doctest.rst:1730 +#: library/doctest.rst:1734 msgid "" "There are two exceptions that may be raised by :class:`DebugRunner` " "instances:" msgstr "" +"Il y a deux exceptions qui peuvent être levées par des instances :class:" +"`DebugRunner` :" -#: library/doctest.rst:1735 +#: library/doctest.rst:1739 msgid "" "An exception raised by :class:`DocTestRunner` to signal that a doctest " "example's actual output did not match its expected output. The constructor " "arguments are used to initialize the attributes of the same names." msgstr "" +"Une exception levée par :class:`DocTestRunner` pour signaler que la sortie " +"obtenue suite à un exemple *doctest* ne correspond pas à la sortie attendue. " +"Les arguments du constructeur sont utilisés pour initialiser les attributs " +"des mêmes noms." -#: library/doctest.rst:1739 +#: library/doctest.rst:1743 msgid ":exc:`DocTestFailure` defines the following attributes:" -msgstr "" +msgstr ":exc:`DocTestFailure` définit les attributs suivants :" -#: library/doctest.rst:1768 +#: library/doctest.rst:1772 msgid "The :class:`DocTest` object that was being run when the example failed." msgstr "" +"L'objet issu de la classe :class:`DocTest` qui était en cours d'exécution " +"lorsque l'exemple a échoué." -#: library/doctest.rst:1773 +#: library/doctest.rst:1777 msgid "The :class:`Example` that failed." -msgstr "" +msgstr "L'exemple :class:`Example` qui a échoué." -#: library/doctest.rst:1754 +#: library/doctest.rst:1758 msgid "The example's actual output." -msgstr "" +msgstr "La sortie obtenue par l'exécution de l'exemple." -#: library/doctest.rst:1759 +#: library/doctest.rst:1763 msgid "" "An exception raised by :class:`DocTestRunner` to signal that a doctest " "example raised an unexpected exception. The constructor arguments are used " "to initialize the attributes of the same names." msgstr "" +"Une exception levée par :class:`DocTestRunner` afin de signaler qu'un " +"exemple *doctest* a levé une exception inattendue. Les arguments du " +"constructeur sont utilisés pour initialiser les attributs des mêmes noms." -#: library/doctest.rst:1763 +#: library/doctest.rst:1767 msgid ":exc:`UnexpectedException` defines the following attributes:" -msgstr "" +msgstr ":exc:`UnexpectedException` définit les attributs suivants :" -#: library/doctest.rst:1778 +#: library/doctest.rst:1782 msgid "" "A tuple containing information about the unexpected exception, as returned " "by :func:`sys.exc_info`." msgstr "" +"Un n-uplet contenant l'information au sujet de l'exception inattendue, telle " +"que retourné par :func:`sys.exc_info`." -#: library/doctest.rst:1785 +#: library/doctest.rst:1789 msgid "Soapbox" -msgstr "" +msgstr "Éditorial" -#: library/doctest.rst:1787 +#: library/doctest.rst:1791 msgid "" "As mentioned in the introduction, :mod:`doctest` has grown to have three " "primary uses:" msgstr "" +"Comme mentionné dans l'introduction, :mod:`doctest` a présentement trois " +"usages principaux :" -#: library/doctest.rst:1790 +#: library/doctest.rst:1794 msgid "Checking examples in docstrings." -msgstr "" +msgstr "Vérifier les exemples dans les *docstrings*." -#: library/doctest.rst:1792 +#: library/doctest.rst:1796 msgid "Regression testing." -msgstr "" +msgstr "Test de régression." -#: library/doctest.rst:1794 +#: library/doctest.rst:1798 msgid "Executable documentation / literate testing." -msgstr "" +msgstr "De la documentation exécutable / des tests littéraires." -#: library/doctest.rst:1796 +#: library/doctest.rst:1800 msgid "" "These uses have different requirements, and it is important to distinguish " "them. In particular, filling your docstrings with obscure test cases makes " "for bad documentation." msgstr "" -#: library/doctest.rst:1800 +#: library/doctest.rst:1804 msgid "" "When writing a docstring, choose docstring examples with care. There's an " "art to this that needs to be learned---it may not be natural at first. " @@ -1990,7 +2624,7 @@ msgid "" "\"harmless\" change." msgstr "" -#: library/doctest.rst:1808 +#: library/doctest.rst:1812 msgid "" "Doctest also makes an excellent tool for regression testing, especially if " "you don't skimp on explanatory text. By interleaving prose and examples, it " @@ -2011,13 +2645,13 @@ msgid "" "different results, blurring the distinction between testing and explaining." msgstr "" -#: library/doctest.rst:1826 +#: library/doctest.rst:1830 msgid "" "Regression testing is best confined to dedicated objects or files. There " "are several options for organizing tests:" msgstr "" -#: library/doctest.rst:1829 +#: library/doctest.rst:1833 msgid "" "Write text files containing test cases as interactive examples, and test the " "files using :func:`testfile` or :func:`DocFileSuite`. This is recommended, " @@ -2025,7 +2659,7 @@ msgid "" "doctest." msgstr "" -#: library/doctest.rst:1834 +#: library/doctest.rst:1838 msgid "" "Define functions named ``_regrtest_topic`` that consist of single " "docstrings, containing test cases for the named topics. These functions can " @@ -2033,27 +2667,99 @@ msgid "" "test file." msgstr "" -#: library/doctest.rst:1838 +#: library/doctest.rst:1842 msgid "" "Define a ``__test__`` dictionary mapping from regression test topics to " "docstrings containing test cases." msgstr "" -#: library/doctest.rst:1841 +#: library/doctest.rst:1845 msgid "" "When you have placed your tests in a module, the module can itself be the " "test runner. When a test fails, you can arrange for your test runner to re-" "run only the failing doctest while you debug the problem. Here is a minimal " "example of such a test runner::" msgstr "" +"Lorsque vous placez vos tests dans un module, le module lui-même peut être " +"l'exécuteur de tests. Lorsqu'un test échoue, vous pouvez signifier à votre " +"exécuteur de tests de rouler une seconde fois uniquement les tests qui " +"échouent et ce, tant que vous travaillez sur le problème. Voici un exemple " +"minimal d'un test exécuteur de tests ::" -#: library/doctest.rst:1863 +#: library/doctest.rst:1867 msgid "Footnotes" msgstr "Notes" -#: library/doctest.rst:1864 +#: library/doctest.rst:1868 msgid "" "Examples containing both expected output and an exception are not supported. " "Trying to guess where one ends and the other begins is too error-prone, and " "that also makes for a confusing test." msgstr "" +"Les exemples contenant à la fois la sortie attendue et une exception ne sont " +"pas supportés. Tenter de deviner où finit l'un et où commence l'autre peut " +"mener à plusieurs erreurs, en plus d'être un test qui soit source de " +"confusion." + +#~ msgid "" +#~ "When specified, an example that expects an exception passes if an " +#~ "exception of the expected type is raised, even if the exception detail " +#~ "does not match. For example, an example expecting ``ValueError: 42`` " +#~ "will pass if the actual exception raised is ``ValueError: 3*14``, but " +#~ "will fail, e.g., if :exc:`TypeError` is raised." +#~ msgstr "" +#~ "Lorsque précisé, un exemple qui s'attend à une exception réussit le test " +#~ "si une exception du type attendu est levée, même si le détail de " +#~ "l'exception ne correspond pas. Par exemple, un exemple s'attendant à " +#~ "``ValueError: 42`` réussira si l'exception réellement levée est " +#~ "``ValueError: 3*14``, mais échouera si par exemple :exc:`TypeError` est " +#~ "levée." + +#~ msgid "" +#~ "It will also ignore the module name used in Python 3 doctest reports. " +#~ "Hence both of these variations will work with the flag specified, " +#~ "regardless of whether the test is run under Python 2.7 or Python 3.2 (or " +#~ "later versions)::" +#~ msgstr "" +#~ "Il fera fi du nom de module utilisé dans les rapports *doctest* de Python " +#~ "3. Ainsi, ces deux variations fonctionneront avec l'option précisée, peu " +#~ "importe si le test est exécuté avec Python 2.7 ou Python 3.2 (ou des " +#~ "versions ultérieures) ::" + +#~ msgid "" +#~ "Note that :const:`ELLIPSIS` can also be used to ignore the details of the " +#~ "exception message, but such a test may still fail based on whether or not " +#~ "the module details are printed as part of the exception name. Using :" +#~ "const:`IGNORE_EXCEPTION_DETAIL` and the details from Python 2.3 is also " +#~ "the only clear way to write a doctest that doesn't care about the " +#~ "exception detail yet continues to pass under Python 2.3 or earlier (those " +#~ "releases do not support :ref:`doctest directives ` " +#~ "and ignore them as irrelevant comments). For example::" +#~ msgstr "" +#~ "Prendre note que :const:`ELLIPSIS` peut aussi être utilisée afin " +#~ "d'ignorer les détails du message d'exception, mais un tel test peut tout " +#~ "de même échouer si les détails du module sont affichés comme faisant " +#~ "partie du nom de l'exception. L'utilisation de :const:" +#~ "`IGNORE_EXCEPTION_DETAIL` et des détails de Python 2.3 est aussi la seule " +#~ "façon claire d'écrire un *doctest* qui ne se soucie pas du détail " +#~ "d'exception tout en continuant de réussir, et ce, pour Python 2.3 ou " +#~ "antérieur (ces versions ne supportent pas les :ref:`instructions doctest " +#~ "`, les ignorant et les traitant comme des " +#~ "commentaires sans pertinence). Par exemple ::" + +#~ msgid "" +#~ "passes under Python 2.3 and later Python versions with the flag " +#~ "specified, even though the detail changed in Python 2.4 to say \"does " +#~ "not\" instead of \"doesn't\"." +#~ msgstr "" +#~ "réussit sous Python 2.3 ainsi que pour les versions ultérieures de " +#~ "Python, avec l'option précisée, même si le détail a été changé dans " +#~ "Python 2.4 pour mentionner *\"does not\"* plutôt que *\"doesn't\"* (ne " +#~ "fait pas)." + +#~ msgid "" +#~ "Before Python 3.6, when printing a dict, Python did not guarantee that " +#~ "the key-value pairs was printed in any particular order." +#~ msgstr "" +#~ "Avant Python 3.6, lorsque Python affichait un *dict*, il ne garantissait " +#~ "pas que les paires clés-valeurs suivaient un ordre particulier." diff --git a/library/email.encoders.po b/library/email.encoders.po index 46fd9480bc..b54990fc26 100644 --- a/library/email.encoders.po +++ b/library/email.encoders.po @@ -6,14 +6,14 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2018-10-05 09:50+0200\n" -"Last-Translator: \n" +"PO-Revision-Date: 2022-10-18 12:35+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.6\n" +"X-Generator: Poedit 2.4.1\n" #: library/email.encoders.rst:2 msgid ":mod:`email.encoders`: Encoders" @@ -40,6 +40,10 @@ msgid "" "sets the content type and CTE header using the *_subtype* and *_charset* " "values passed during the instantiation of that class." msgstr "" +"Ce module est obsolète en Python 3. Il n'est pas de besoin d'appeler " +"explicitement les fonctions définies ici puisque la classe :class:`~email." +"mime.text.MIMEText` ajuste le type de contenu et l'entête CTE à l'aide des " +"paramètres *_subtype* et *_charset* de son constructeur." #: library/email.encoders.rst:20 msgid "" @@ -63,7 +67,6 @@ msgstr "" "données binaires." #: library/email.encoders.rst:27 -#, fuzzy msgid "" "The :mod:`email` package provides some convenient encoders in its :mod:" "`encoders` module. These encoders are actually used by the :class:`~email." @@ -110,7 +113,7 @@ msgstr "" "printable`` [#]_ à l'en-tête :mailheader:`Content-Transfer-Encoding`. C'est " "un bon encodage à utiliser quand la majorité de la charge utile contient " "essentiellement des données imprimables, à l'exceptions de quelques " -"caractères. " +"caractères." #: library/email.encoders.rst:52 msgid "" diff --git a/library/email.errors.po b/library/email.errors.po index 2c6fafeb9e..948fd29ead 100644 --- a/library/email.errors.po +++ b/library/email.errors.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2020-09-29 06:16-0400\n" -"Last-Translator: G. Robert \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-11-06 21:40+0100\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.6\n" +"X-Generator: Poedit 3.0\n" #: library/email.errors.rst:2 msgid ":mod:`email.errors`: Exception and Defect classes" @@ -234,3 +234,11 @@ msgstr "" ":class:`InvalidBase64LengthDefect` — Le nombre de caractères (autres que de " "remplissage) d'un bloc d'octets encodés en base64 est invalide (1 de plus " "qu'un multiple de 4). Le bloc encodé n'a pas été modifié." + +#: library/email.errors.rst:116 +msgid "" +":class:`InvalidDateDefect` -- When decoding an invalid or unparsable date " +"field. The original value is kept as-is." +msgstr "" +":class:`InvalidDateDefect` — Le champ de date est invalide. La valeur est " +"laissée telle-quelle." diff --git a/library/email.header.po b/library/email.header.po index e761d13ceb..0488266715 100644 --- a/library/email.header.po +++ b/library/email.header.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -203,9 +203,9 @@ msgstr "" #: library/email.header.rst:138 msgid "" "*linesep* specifies the characters used to separate the lines of the folded " -"header. It defaults to the most useful value for Python application code (``" -"\\n``), but ``\\r\\n`` can be specified in order to produce headers with RFC-" -"compliant line separators." +"header. It defaults to the most useful value for Python application code " +"(``\\n``), but ``\\r\\n`` can be specified in order to produce headers with " +"RFC-compliant line separators." msgstr "" #: library/email.header.rst:143 diff --git a/library/email.headerregistry.po b/library/email.headerregistry.po index 6019a94e17..aadc71e1f7 100644 --- a/library/email.headerregistry.po +++ b/library/email.headerregistry.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2019-09-06 13:49+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -177,8 +177,8 @@ msgstr "" msgid "" ":rfc:`5322` specifies a very specific format for dates within email headers. " "The ``DateHeader`` parser recognizes that date format, as well as " -"recognizing a number of variant forms that are sometimes found \"in the wild" -"\"." +"recognizing a number of variant forms that are sometimes found \"in the " +"wild\"." msgstr "" #: library/email.headerregistry.rst:146 library/email.headerregistry.rst:188 @@ -251,8 +251,9 @@ msgstr "" msgid "" "The ``decoded`` value of the header will have all encoded words decoded to " "unicode. :class:`~encodings.idna` encoded domain names are also decoded to " -"unicode. The ``decoded`` value is set by :attr:`~str.join`\\ ing the :class:" -"`str` value of the elements of the ``groups`` attribute with ``', '``." +"unicode. The ``decoded`` value is set by :ref:`joining ` " +"the :class:`str` value of the elements of the ``groups`` attribute with ``', " +"'``." msgstr "" #: library/email.headerregistry.rst:213 diff --git a/library/email.mime.po b/library/email.mime.po index bb758b7967..b260c23ffe 100644 --- a/library/email.mime.po +++ b/library/email.mime.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -89,7 +89,7 @@ msgid "" msgstr "" #: library/email.mime.rst:104 library/email.mime.rst:169 -#: library/email.mime.rst:224 library/email.mime.rst:258 +#: library/email.mime.rst:225 library/email.mime.rst:259 msgid "Added *policy* keyword-only parameter." msgstr "" @@ -136,8 +136,8 @@ msgid "" "Message.attach>` method." msgstr "" -#: library/email.mime.rst:131 library/email.mime.rst:199 -#: library/email.mime.rst:253 +#: library/email.mime.rst:131 library/email.mime.rst:200 +#: library/email.mime.rst:254 msgid "" "Optional *policy* argument defaults to :class:`compat32 `." @@ -188,11 +188,11 @@ msgid "" "A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" "`MIMEAudio` class is used to create MIME message objects of major type :" "mimetype:`audio`. *_audiodata* is a string containing the raw audio data. " -"If this data can be decoded by the standard Python module :mod:`sndhdr`, " -"then the subtype will be automatically included in the :mailheader:`Content-" -"Type` header. Otherwise you can explicitly specify the audio subtype via the " -"*_subtype* argument. If the minor type could not be guessed and *_subtype* " -"was not given, then :exc:`TypeError` is raised." +"If this data can be decoded as au, wav, aiff, or aifc, then the subtype will " +"be automatically included in the :mailheader:`Content-Type` header. " +"Otherwise you can explicitly specify the audio subtype via the *_subtype* " +"argument. If the minor type could not be guessed and *_subtype* was not " +"given, then :exc:`TypeError` is raised." msgstr "" #: library/email.mime.rst:155 @@ -216,14 +216,15 @@ msgid "" "A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" "`MIMEImage` class is used to create MIME message objects of major type :" "mimetype:`image`. *_imagedata* is a string containing the raw image data. " -"If this data can be decoded by the standard Python module :mod:`imghdr`, " -"then the subtype will be automatically included in the :mailheader:`Content-" -"Type` header. Otherwise you can explicitly specify the image subtype via the " -"*_subtype* argument. If the minor type could not be guessed and *_subtype* " -"was not given, then :exc:`TypeError` is raised." +"If this data type can be detected (jpeg, png, gif, tiff, rgb, pbm, pgm, ppm, " +"rast, xbm, bmp, webp, and exr attempted), then the subtype will be " +"automatically included in the :mailheader:`Content-Type` header. Otherwise " +"you can explicitly specify the image subtype via the *_subtype* argument. If " +"the minor type could not be guessed and *_subtype* was not given, then :exc:" +"`TypeError` is raised." msgstr "" -#: library/email.mime.rst:189 +#: library/email.mime.rst:190 msgid "" "Optional *_encoder* is a callable (i.e. function) which will perform the " "actual encoding of the image data for transport. This callable takes one " @@ -235,17 +236,17 @@ msgid "" "encoders` module for a list of the built-in encoders." msgstr "" -#: library/email.mime.rst:201 +#: library/email.mime.rst:202 msgid "" "*_params* are passed straight through to the :class:`~email.mime.base." "MIMEBase` constructor." msgstr "" -#: library/email.mime.rst:211 +#: library/email.mime.rst:212 msgid "Module: :mod:`email.mime.message`" msgstr "Module : :mod:`email.mime.message`" -#: library/email.mime.rst:213 +#: library/email.mime.rst:214 msgid "" "A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" "`MIMEMessage` class is used to create MIME objects of main type :mimetype:" @@ -254,17 +255,17 @@ msgid "" "`TypeError` is raised." msgstr "" -#: library/email.mime.rst:219 +#: library/email.mime.rst:220 msgid "" "Optional *_subtype* sets the subtype of the message; it defaults to :" "mimetype:`rfc822`." msgstr "" -#: library/email.mime.rst:231 +#: library/email.mime.rst:232 msgid "Module: :mod:`email.mime.text`" msgstr "Module : :mod:`email.mime.text`" -#: library/email.mime.rst:233 +#: library/email.mime.rst:234 msgid "" "A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" "`MIMEText` class is used to create MIME objects of major type :mimetype:" @@ -277,7 +278,7 @@ msgid "" "Charset` instance." msgstr "" -#: library/email.mime.rst:243 +#: library/email.mime.rst:244 msgid "" "Unless the *_charset* argument is explicitly set to ``None``, the MIMEText " "object created will have both a :mailheader:`Content-Type` header with a " @@ -290,6 +291,6 @@ msgid "" "Encoding` header)." msgstr "" -#: library/email.mime.rst:255 +#: library/email.mime.rst:256 msgid "*_charset* also accepts :class:`~email.charset.Charset` instances." msgstr "" diff --git a/library/email.po b/library/email.po index bd8059f1aa..ab5181ce61 100644 --- a/library/email.po +++ b/library/email.po @@ -5,14 +5,15 @@ 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: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-09-06 21:25+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.1\n" #: library/email.rst:2 msgid ":mod:`email` --- An email and MIME handling package" @@ -23,7 +24,6 @@ msgid "**Source code:** :source:`Lib/email/__init__.py`" msgstr "**Code source:** :source:`Lib/email/__init__.py`" #: library/email.rst:15 -#, fuzzy msgid "" "The :mod:`email` package is a library for managing email messages. It is " "specifically *not* designed to do any sending of email messages to SMTP (:" @@ -37,7 +37,7 @@ msgstr "" "spécifiquement conçu pour ne pas gérer les envois d'e-mails vers SMTP (:rfc:" "`2821`), NNTP, ou autres serveurs ; ces fonctions sont du ressort " "des modules comme :mod:`smtplib` et :mod:`nntplib`. Le paquet :mod:`email` " -"tente de respecter les RFC autant que possible, il gère :rfc:`5233` et :rfc:" +"tente de respecter les RFC autant que possible, il gère :rfc:`5322` et :rfc:" "`6532`, ainsi que les RFCs en rapport avec les MIME comme :rfc:`2045`, :rfc:" "`2046`, :rfc:`2047`, :rfc:`2183`, et :rfc:`2231`." diff --git a/library/email.policy.po b/library/email.policy.po index a862b68eec..92759bd4ad 100644 --- a/library/email.policy.po +++ b/library/email.policy.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -595,8 +595,8 @@ msgstr "" #: library/email.policy.rst:520 msgid "" "An instance of ``EmailPolicy`` with all defaults unchanged. This policy " -"uses the standard Python ``\\n`` line endings rather than the RFC-correct ``" -"\\r\\n``." +"uses the standard Python ``\\n`` line endings rather than the RFC-correct " +"``\\r\\n``." msgstr "" #: library/email.policy.rst:527 diff --git a/library/email.utils.po b/library/email.utils.po index a185e2e2ac..14d7ec7958 100644 --- a/library/email.utils.po +++ b/library/email.utils.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2021-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" @@ -140,7 +140,9 @@ msgstr "" #: library/email.utils.rst:126 msgid "" "The inverse of :func:`format_datetime`. Performs the same function as :func:" -"`parsedate`, but on success returns a :mod:`~datetime.datetime`. If the " +"`parsedate`, but on success returns a :mod:`~datetime.datetime`; otherwise " +"``ValueError`` is raised if *date* contains an invalid value such as an hour " +"greater than 23 or a timezone offset not between -24 and 24 hours. If the " "input date has a timezone of ``-0000``, the ``datetime`` will be a naive " "``datetime``, and if the date is conforming to the RFCs it will represent a " "time in UTC but with no indication of the actual source timezone of the " @@ -149,25 +151,25 @@ msgid "" "corresponding a :class:`~datetime.timezone` :class:`~datetime.tzinfo`." msgstr "" -#: library/email.utils.rst:140 +#: library/email.utils.rst:142 msgid "" "Turn a 10-tuple as returned by :func:`parsedate_tz` into a UTC timestamp " "(seconds since the Epoch). If the timezone item in the tuple is ``None``, " "assume local time." msgstr "" -#: library/email.utils.rst:147 +#: library/email.utils.rst:149 msgid "Returns a date string as per :rfc:`2822`, e.g.::" msgstr "" -#: library/email.utils.rst:151 +#: library/email.utils.rst:153 msgid "" "Optional *timeval* if given is a floating point time value as accepted by :" "func:`time.gmtime` and :func:`time.localtime`, otherwise the current time is " "used." msgstr "" -#: library/email.utils.rst:155 +#: library/email.utils.rst:157 msgid "" "Optional *localtime* is a flag that when ``True``, interprets *timeval*, and " "returns a date relative to the local timezone instead of UTC, properly " @@ -175,7 +177,7 @@ msgid "" "UTC is used." msgstr "" -#: library/email.utils.rst:160 +#: library/email.utils.rst:162 msgid "" "Optional *usegmt* is a flag that when ``True``, outputs a date string with " "the timezone as an ascii string ``GMT``, rather than a numeric ``-0000``. " @@ -183,7 +185,7 @@ msgid "" "*localtime* is ``False``. The default is ``False``." msgstr "" -#: library/email.utils.rst:168 +#: library/email.utils.rst:170 msgid "" "Like ``formatdate``, but the input is a :mod:`datetime` instance. If it is " "a naive datetime, it is assumed to be \"UTC with no information about the " @@ -195,11 +197,11 @@ msgid "" "date headers." msgstr "" -#: library/email.utils.rst:182 +#: library/email.utils.rst:184 msgid "Decode the string *s* according to :rfc:`2231`." msgstr "" -#: library/email.utils.rst:187 +#: library/email.utils.rst:189 msgid "" "Encode the string *s* according to :rfc:`2231`. Optional *charset* and " "*language*, if given is the character set name and language name to use. If " @@ -208,7 +210,7 @@ msgid "" "*language*." msgstr "" -#: library/email.utils.rst:195 +#: library/email.utils.rst:197 msgid "" "When a header parameter is encoded in :rfc:`2231` format, :meth:`Message." "get_param ` may return a 3-tuple containing " @@ -220,23 +222,23 @@ msgid "" "defaults to ``'us-ascii'``." msgstr "" -#: library/email.utils.rst:204 +#: library/email.utils.rst:206 msgid "" "For convenience, if the *value* passed to :func:`collapse_rfc2231_value` is " "not a tuple, it should be a string and it is returned unquoted." msgstr "" -#: library/email.utils.rst:210 +#: library/email.utils.rst:212 msgid "" "Decode parameters list according to :rfc:`2231`. *params* is a sequence of " "2-tuples containing elements of the form ``(content-type, string-value)``." msgstr "" -#: library/email.utils.rst:215 +#: library/email.utils.rst:217 msgid "Footnotes" msgstr "Notes" -#: library/email.utils.rst:216 +#: library/email.utils.rst:218 msgid "" "Note that the sign of the timezone offset is the opposite of the sign of the " "``time.timezone`` variable for the same timezone; the latter variable " diff --git a/library/ensurepip.po b/library/ensurepip.po index f68d024b18..154944c75b 100644 --- a/library/ensurepip.po +++ b/library/ensurepip.po @@ -5,19 +5,19 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" -"PO-Revision-Date: 2017-08-10 00:59+0200\n" -"Last-Translator: Julien Palard \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-10-17 12:41+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.11\n" +"X-Generator: Poedit 3.0\n" #: library/ensurepip.rst:2 msgid ":mod:`ensurepip` --- Bootstrapping the ``pip`` installer" -msgstr "" +msgstr ":mod:`ensurepip` — Amorçage de l'installateur ``pip``" #: library/ensurepip.rst:12 msgid "" @@ -28,6 +28,12 @@ msgid "" "is bundled with maintenance and feature releases of the CPython reference " "interpreter." msgstr "" +"Le module :mod:`ensurepip` met en place l'installateur ``pip`` dans un " +"environnement Python, classique ou virtuel. Ce principe d'amorçage a été " +"choisi car ``pip`` est un projet séparé de Python avec son propre cycle de " +"versions. Il permet en particulier d'embarquer la version la plus récente de " +"``pip`` dans les mises à jour de maintenance de l'interpréteur CPython comme " +"dans les nouvelles versions principales." #: library/ensurepip.rst:19 msgid "" @@ -36,12 +42,19 @@ msgid "" "needed if installing ``pip`` was skipped when installing Python (or when " "creating a virtual environment) or after explicitly uninstalling ``pip``." msgstr "" +"Dans la plupart des cas, il n'est pas nécessaire de recourir à ce module. " +"``pip`` est le plus souvent déjà installé pour vous. Cependant, " +"``ensurepip`` peut s'avérer utile si l'installation de ``pip`` a été sautée " +"au moment de l'installation de Python (ou en créant un environnement " +"virtuel), ou bien si ``pip`` a été désinstallé par l'utilisateur." #: library/ensurepip.rst:27 msgid "" "This module *does not* access the internet. All of the components needed to " "bootstrap ``pip`` are included as internal parts of the package." msgstr "" +"Ce module n'accède *pas* au réseau. Tout ce qu'il faut pour amorcer ``pip`` " +"est compris dans le paquet." #: library/ensurepip.rst:34 msgid ":ref:`installing-index`" @@ -49,18 +62,19 @@ msgstr ":ref:`installing-index`" #: library/ensurepip.rst:34 msgid "The end user guide for installing Python packages" -msgstr "" +msgstr "Guide de l'utilisateur final pour installer des paquets Python" #: library/ensurepip.rst:36 msgid ":pep:`453`: Explicit bootstrapping of pip in Python installations" msgstr "" +":pep:`453` : Amorçage explicite de pip dans les installations de Python" #: library/ensurepip.rst:37 msgid "The original rationale and specification for this module." msgstr "" +"Les motivations pour l'ajout de ce module et sa spécification d'origine" #: library/ensurepip.rst:41 -#, fuzzy msgid "Command line interface" msgstr "Interface en ligne de commande" @@ -68,18 +82,24 @@ msgstr "Interface en ligne de commande" msgid "" "The command line interface is invoked using the interpreter's ``-m`` switch." msgstr "" +"On fait appel à l'interface en ligne de commande à l'aide de l'option ``-m`` " +"de l'interpréteur." #: library/ensurepip.rst:45 msgid "The simplest possible invocation is::" -msgstr "" +msgstr "L'invocation la plus simple est ::" #: library/ensurepip.rst:49 msgid "" "This invocation will install ``pip`` if it is not already installed, but " "otherwise does nothing. To ensure the installed version of ``pip`` is at " -"least as recent as the one bundled with ``ensurepip``, pass the ``--" +"least as recent as the one available in ``ensurepip``, pass the ``--" "upgrade`` option::" msgstr "" +"Cette commande installe ``pip`` s'il n'est pas déjà présent. Sinon, elle ne " +"fait rien. Pour s'assurer que la version de ``pip`` est au moins aussi " +"récente que celle embarquée dans ``ensurepip``, passer l'option ``--" +"upgrade`` ::" #: library/ensurepip.rst:56 msgid "" @@ -88,6 +108,9 @@ msgid "" "virtual environment). The installation location can be controlled through " "two additional command line options:" msgstr "" +"``pip`` est installé par défaut dans l'environnement virtuel courant, s'il y " +"en a un, ou bien dans le dossier ``site-packages`` du système. L'emplacement " +"d'installation se règle à travers deux options :" #: library/ensurepip.rst:61 msgid "" @@ -95,6 +118,9 @@ msgid "" "rather than the root of the currently active virtual environment (if any) or " "the default root for the current Python installation." msgstr "" +"``--root `` : installe ``pip`` sur un chemin relatif à la racine " +"*dossier* au lieu de la racine de l'environnement virtuel ou la racine par " +"défaut de l'installation de Python." #: library/ensurepip.rst:64 msgid "" @@ -102,6 +128,9 @@ msgid "" "than globally for the current Python installation (this option is not " "permitted inside an active virtual environment)." msgstr "" +"``--user`` : installe ``pip`` dans le dossier ``site-packages`` propre à " +"l'utilisateur au lieu du dossier global de l'installation de Python. Cette " +"option n'est pas valide dans un environnement virtuel." #: library/ensurepip.rst:68 msgid "" @@ -109,41 +138,53 @@ msgid "" "stands for the version of Python used to invoke ``ensurepip``). The scripts " "installed can be controlled through two additional command line options:" msgstr "" +"Par défaut, les commandes ``pipX`` et ``pipX.Y`` sont créées (où X.Y est la " +"version de Python avec laquelle ``ensurepip`` est utilisé). Cela se contrôle " +"par deux options supplémentaires :" #: library/ensurepip.rst:73 msgid "" "``--altinstall``: if an alternate installation is requested, the ``pipX`` " "script will *not* be installed." msgstr "" +"``--altinstall`` : dans ce mode d'« installation parallèle », seule la " +"commande ``pipX.Y`` est ajoutée, et pas la commande ``pipX``." #: library/ensurepip.rst:76 msgid "" "``--default-pip``: if a \"default pip\" installation is requested, the " "``pip`` script will be installed in addition to the two regular scripts." msgstr "" +"``--default-pip`` : ce mode d'« installation de la version par défaut » crée " +"la commande ``pip`` en plus de ``pipX`` et ``pipX.Y``." #: library/ensurepip.rst:79 msgid "" "Providing both of the script selection options will trigger an exception." -msgstr "" +msgstr "Combiner ces deux options conduit à une exception." #: library/ensurepip.rst:83 msgid "Module API" -msgstr "" +msgstr "API du module" #: library/ensurepip.rst:85 msgid ":mod:`ensurepip` exposes two functions for programmatic use:" msgstr "" +"Le module :mod:`ensurepip` définit deux fonctions pour utilisation dans les " +"programmes :" #: library/ensurepip.rst:89 msgid "" -"Returns a string specifying the bundled version of pip that will be " +"Returns a string specifying the available version of pip that will be " "installed when bootstrapping an environment." msgstr "" +"Renvoie, sous forme de chaîne, la version de ``pip`` qui serait installée " +"par ``ensurepip``." #: library/ensurepip.rst:96 msgid "Bootstraps ``pip`` into the current or designated environment." msgstr "" +"Amorce ``pip`` dans l'environnement courant ou un environnement spécifique." #: library/ensurepip.rst:98 msgid "" @@ -151,51 +192,70 @@ msgid "" "*root* is ``None``, then installation uses the default install location for " "the current environment." msgstr "" +"Passer *root* permet de changer la racine du chemin d'installation. Si " +"*root* vaut ``None`` (la valeur par défaut), l'installation se fait dans la " +"racine par défaut pour l'environnement courant." #: library/ensurepip.rst:102 msgid "" "*upgrade* indicates whether or not to upgrade an existing installation of an " -"earlier version of ``pip`` to the bundled version." +"earlier version of ``pip`` to the available version." msgstr "" +"*upgrade* indique s'il faut ou non effectuer la mise à jour d'une éventuelle " +"version plus ancienne de ``pip`` déjà installée vers la version embarquée " +"dans ``ensurepip``." #: library/ensurepip.rst:105 msgid "" "*user* indicates whether to use the user scheme rather than installing " "globally." msgstr "" +"Si *user* vaut vrai, ``pip`` est mis dans des chemins qui le rendent " +"disponible pour cet utilisateur uniquement, et non pour tous les " +"utilisateurs de l'installation de Python." #: library/ensurepip.rst:108 msgid "" "By default, the scripts ``pipX`` and ``pipX.Y`` will be installed (where X.Y " "stands for the current version of Python)." msgstr "" +"Par défaut, les commandes créées sont ``pipX`` et ``pipX.Y`` (où X.Y est la " +"version de Python)." #: library/ensurepip.rst:111 msgid "If *altinstall* is set, then ``pipX`` will *not* be installed." -msgstr "" +msgstr "Si *altinstall* vaut vrai, ``pipX`` n'est pas créée." #: library/ensurepip.rst:113 msgid "" "If *default_pip* is set, then ``pip`` will be installed in addition to the " "two regular scripts." msgstr "" +"Si *default_pip* vaut vrai, la commande ``pip`` est créée en plus des deux " +"autres." #: library/ensurepip.rst:116 msgid "" "Setting both *altinstall* and *default_pip* will trigger :exc:`ValueError`." msgstr "" +"Le fait de combiner *altinstall* et *default_pip* lève l'exception :exc:" +"`ValueError`." #: library/ensurepip.rst:119 msgid "" "*verbosity* controls the level of output to :data:`sys.stdout` from the " "bootstrapping operation." msgstr "" +"*verbosity* règle le niveau de verbosité des messages émis sur :data:`sys." +"stdout` pendant l'amorçage." #: library/ensurepip.rst:122 msgid "" "Raises an :ref:`auditing event ` ``ensurepip.bootstrap`` with " "argument ``root``." msgstr "" +"Cette fonction lève un :ref:`événement d'audit ` ``ensurepip." +"bootstrap`` avec l'argument ``root``." #: library/ensurepip.rst:126 msgid "" @@ -203,6 +263,9 @@ msgid "" "environ``. Invoking the command line interface in a subprocess instead " "allows these side effects to be avoided." msgstr "" +"Le processus d'amorçage a des effets de bord sur ``sys.path`` et ``os." +"environ``. Pour les éviter, on peut appeler l'interface en ligne de commande " +"dans un sous-processus." #: library/ensurepip.rst:132 msgid "" @@ -211,3 +274,7 @@ msgid "" "be present by default (as the dependencies may be removed in a future " "version of ``pip``)." msgstr "" +"L'amorçage peut installer des modules supplémentaires qui sont requis pour " +"``pip``. Les autres programmes ne doivent pas prendre pour acquise la " +"présence de ces modules, car ``pip`` pourrait dans une version future se " +"passer de ces dépendances." diff --git a/library/enum.po b/library/enum.po index 82b0d09704..3b495db7af 100644 --- a/library/enum.po +++ b/library/enum.po @@ -5,19 +5,19 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" -"PO-Revision-Date: 2019-12-11 11:26+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-11-14 15:50+0100\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.7.1\n" +"X-Generator: Poedit 3.0.1\n" #: library/enum.rst:2 msgid ":mod:`enum` --- Support for enumerations" -msgstr ":mod:`enum` — Énumerations" +msgstr ":mod:`enum` — Énumérations" #: library/enum.rst:14 msgid "**Source code:** :source:`Lib/enum.py`" @@ -25,147 +25,82 @@ msgstr "**Code source :** :source:`Lib/enum.py`" #: library/enum.rst:18 msgid "" -"An enumeration is a set of symbolic names (members) bound to unique, " -"constant values. Within an enumeration, the members can be compared by " -"identity, and the enumeration itself can be iterated over." +"This page contains the API reference information. For tutorial information " +"and discussion of more advanced topics, see" msgstr "" -"Une énumération est un ensemble de noms symboliques, appelés *membres*, liés " -"à des valeurs constantes et uniques. Au sein d'une énumération, les membres " -"peuvent être comparés entre eux et il est possible d'itérer sur " -"l'énumération elle-même." -#: library/enum.rst:22 -msgid "Case of Enum Members" +#: library/enum.rst:21 +msgid ":ref:`Basic Tutorial `" msgstr "" -#: library/enum.rst:24 -msgid "" -"Because Enums are used to represent constants we recommend using UPPER_CASE " -"names for enum members, and will be using that style in our examples." +#: library/enum.rst:22 +msgid ":ref:`Advanced Tutorial `" msgstr "" -#: library/enum.rst:30 -msgid "Module Contents" -msgstr "Contenu du module" - -#: library/enum.rst:32 -msgid "" -"This module defines four enumeration classes that can be used to define " -"unique sets of names and values: :class:`Enum`, :class:`IntEnum`, :class:" -"`Flag`, and :class:`IntFlag`. It also defines one decorator, :func:" -"`unique`, and one helper, :class:`auto`." +#: library/enum.rst:23 +msgid ":ref:`Enum Cookbook `" msgstr "" -"Ce module définit quatre classes d'énumération qui permettent de définir des " -"ensembles uniques de noms et de valeurs : :class:`Enum`, :class:`IntEnum`, :" -"class:`Flag` et :class:`IntFlag`. Il fournit également un décorateur, :func:" -"`unique`, ainsi qu'une classe utilitaire, :class:`auto`." -#: library/enum.rst:39 -msgid "" -"Base class for creating enumerated constants. See section `Functional API`_ " -"for an alternate construction syntax." -msgstr "" -"Classe de base pour créer une énumération de constantes. Voir la section " -"`API par fonction`_ pour une syntaxe alternative de construction." +#: library/enum.rst:27 +#, fuzzy +msgid "An enumeration:" +msgstr "Énumérations dérivées" -#: library/enum.rst:44 -msgid "" -"Base class for creating enumerated constants that are also subclasses of :" -"class:`int`." +#: library/enum.rst:29 +msgid "is a set of symbolic names (members) bound to unique values" msgstr "" -"Classe de base pour créer une énumération de constantes qui sont également " -"des sous-classes de :class:`int`." -#: library/enum.rst:49 -msgid "" -"Base class for creating enumerated constants that can be combined using the " -"bitwise operators without losing their :class:`IntFlag` membership. :class:" -"`IntFlag` members are also subclasses of :class:`int`." -msgstr "" -"Classe de base pour créer une énumération de constantes pouvant être " -"combinées avec des opérateurs de comparaison bit-à-bit, sans perdre leur " -"qualité de :class:`IntFlag`. Les membres de :class:`IntFlag` sont aussi des " -"sous-classes de :class:`int`." - -#: library/enum.rst:55 -msgid "" -"Base class for creating enumerated constants that can be combined using the " -"bitwise operations without losing their :class:`Flag` membership." +#: library/enum.rst:30 +#, fuzzy +msgid "can be iterated over to return its members in definition order" msgstr "" -"Classe de base pour créer une énumération de constantes pouvant être " -"combinées avec des opérateurs de comparaison bit-à-bit, sans perdre leur " -"qualité de :class:`Flag`." +"Les énumérations sont itérables, l'ordre d'itération est celui dans lequel " +"les membres sont déclarés ::" -#: library/enum.rst:61 -msgid "" -"Enum class decorator that ensures only one name is bound to any one value." +#: library/enum.rst:31 +msgid "uses *call* syntax to return members by value" msgstr "" -"Décorateur de classe qui garantit qu'une valeur ne puisse être associée qu'à " -"un seul nom." -#: library/enum.rst:65 -#, fuzzy -msgid "" -"Instances are replaced with an appropriate value for Enum members. By " -"default, the initial value starts at 1." +#: library/enum.rst:32 +msgid "uses *index* syntax to return members by name" msgstr "" -"Les instances de cette classe remplacent les membres d'une *Enum* par une " -"valeur appropriée." -#: library/enum.rst:67 -msgid "``Flag``, ``IntFlag``, ``auto``" -msgstr "``Flag``, ``IntFlag``, ``auto``" - -#: library/enum.rst:71 -msgid "Creating an Enum" -msgstr "Création d'une *Enum*" - -#: library/enum.rst:73 +#: library/enum.rst:34 msgid "" -"Enumerations are created using the :keyword:`class` syntax, which makes them " -"easy to read and write. An alternative creation method is described in " -"`Functional API`_. To define an enumeration, subclass :class:`Enum` as " -"follows::" +"Enumerations are created either by using :keyword:`class` syntax, or by " +"using function-call syntax::" msgstr "" -"Une énumération est créée comme une :keyword:`class`, ce qui la rend facile " -"à lire et à écrire. Une autre méthode de création est décrite dans `API par " -"fonction`_. Pour définir une énumération, il faut hériter de :class:`Enum` " -"de la manière suivante ::" - -#: library/enum.rst:85 -msgid "Enum member values" -msgstr "Valeurs des membres d'une *Enum*" -#: library/enum.rst:87 +#: library/enum.rst:48 +#, fuzzy msgid "" -"Member values can be anything: :class:`int`, :class:`str`, etc.. If the " -"exact value is unimportant you may use :class:`auto` instances and an " -"appropriate value will be chosen for you. Care must be taken if you mix :" -"class:`auto` with other values." +"Even though we can use :keyword:`class` syntax to create Enums, Enums are " +"not normal Python classes. See :ref:`How are Enums different? ` for more details." msgstr "" -"La valeur d'un membre peut être de n'importe quel type : :class:`int`, :" -"class:`str`, etc. Si la valeur exacte n'a pas d'importance, utilisez des " -"instances de :class:`auto` et une valeur appropriée sera choisie pour vous. " -"Soyez vigilant si vous mélangez :class:`auto` avec d'autres valeurs." +"Même si on utilise la syntaxe en :keyword:`class` pour créer des " +"énumérations, les *Enums* ne sont pas des vraies classes Python. Voir `En " +"quoi les Enums sont différentes ?`_ pour plus de détails." -#: library/enum.rst:92 +#: library/enum.rst:52 msgid "Nomenclature" msgstr "Nomenclature" -#: library/enum.rst:94 +#: library/enum.rst:54 msgid "The class :class:`Color` is an *enumeration* (or *enum*)" msgstr "La classe :class:`Color` est une *énumération* (ou un *enum*)." -#: library/enum.rst:95 +#: library/enum.rst:55 +#, fuzzy msgid "" "The attributes :attr:`Color.RED`, :attr:`Color.GREEN`, etc., are " -"*enumeration members* (or *enum members*) and are functionally constants." +"*enumeration members* (or *members*) and are functionally constants." msgstr "" "Les attributs :attr:`Color.RED`, :attr:`Color.GREEN`, etc., sont les " "*membres de l'énumération* (ou les *membres de l'enum*) et sont " "fonctionnellement des constantes." -#: library/enum.rst:97 +#: library/enum.rst:57 msgid "" "The enum members have *names* and *values* (the name of :attr:`Color.RED` is " "``RED``, the value of :attr:`Color.BLUE` is ``3``, etc.)" @@ -173,1011 +108,653 @@ msgstr "" "Les membres de *l'enum* ont chacun un *nom* et une *valeur* ; le nom de :" "attr:`Color.RED` est ``RED``, la valeur de :attr:`Color.BLUE` est ``3``, etc." -#: library/enum.rst:103 -msgid "" -"Even though we use the :keyword:`class` syntax to create Enums, Enums are " -"not normal Python classes. See `How are Enums different?`_ for more details." -msgstr "" -"Même si on utilise la syntaxe en :keyword:`class` pour créer des " -"énumérations, les *Enums* ne sont pas des vraies classes Python. Voir `En " -"quoi les Enums sont différentes ?`_ pour plus de détails." +#: library/enum.rst:64 +msgid "Module Contents" +msgstr "Contenu du module" -#: library/enum.rst:107 -msgid "Enumeration members have human readable string representations::" +#: library/enum.rst:66 +msgid ":class:`EnumType`" msgstr "" -"Les membres d'une énumération ont une représentation en chaîne de caractères " -"compréhensible par un humain ::" - -#: library/enum.rst:112 -msgid "...while their ``repr`` has more information::" -msgstr "… tandis que leur ``repr`` contient plus d'informations ::" -#: library/enum.rst:117 -msgid "The *type* of an enumeration member is the enumeration it belongs to::" -msgstr "Le *type* d'un membre est l'énumération auquel ce membre appartient ::" +#: library/enum.rst:68 +msgid "The ``type`` for Enum and its subclasses." +msgstr "" -#: library/enum.rst:125 -msgid "Enum members also have a property that contains just their item name::" -msgstr "Les membres ont également un attribut qui contient leur nom ::" +#: library/enum.rst:70 +#, fuzzy +msgid ":class:`Enum`" +msgstr "Avec :class:`auto`" -#: library/enum.rst:130 -msgid "Enumerations support iteration, in definition order::" +#: library/enum.rst:72 +#, fuzzy +msgid "Base class for creating enumerated constants." msgstr "" -"Les énumérations sont itérables, l'ordre d'itération est celui dans lequel " -"les membres sont déclarés ::" +"Classe de base pour créer une énumération de constantes qui sont également " +"des sous-classes de :class:`int`." + +#: library/enum.rst:74 +#, fuzzy +msgid ":class:`IntEnum`" +msgstr "IntEnum" -#: library/enum.rst:146 +#: library/enum.rst:76 +#, fuzzy msgid "" -"Enumeration members are hashable, so they can be used in dictionaries and " -"sets::" +"Base class for creating enumerated constants that are also subclasses of :" +"class:`int`. (`Notes`_)" msgstr "" -"Les membres d'une énumération sont hachables, ils peuvent ainsi être " -"utilisés dans des dictionnaires ou des ensembles ::" +"Classe de base pour créer une énumération de constantes qui sont également " +"des sous-classes de :class:`int`." -#: library/enum.rst:156 -msgid "Programmatic access to enumeration members and their attributes" -msgstr "Accès dynamique aux membres et à leurs attributs" +#: library/enum.rst:79 +msgid ":class:`StrEnum`" +msgstr "" -#: library/enum.rst:158 +#: library/enum.rst:81 +#, fuzzy msgid "" -"Sometimes it's useful to access members in enumerations programmatically (i." -"e. situations where ``Color.RED`` won't do because the exact color is not " -"known at program-writing time). ``Enum`` allows such access::" +"Base class for creating enumerated constants that are also subclasses of :" +"class:`str`. (`Notes`_)" msgstr "" -"Il est parfois utile de pouvoir accéder dynamiquement aux membres d'une " -"énumération (p. ex. dans des situations où il ne suffit pas d'utiliser " -"``Color.RED`` car la couleur précise n'est pas connue à l'écriture du " -"programme). ``Enum`` permet de tels accès ::" +"Classe de base pour créer une énumération de constantes qui sont également " +"des sous-classes de :class:`int`." -#: library/enum.rst:167 -msgid "If you want to access enum members by *name*, use item access::" -msgstr "" -"Pour accéder aux membres par leur *nom*, utilisez l'accès par indexation ::" +#: library/enum.rst:84 +#, fuzzy +msgid ":class:`Flag`" +msgstr "Avec :class:`auto`" -#: library/enum.rst:174 -msgid "If you have an enum member and need its :attr:`name` or :attr:`value`::" -msgstr "Pour obtenir l'attribut :attr:`name` ou :attr:`value` d'un membre ::" +#: library/enum.rst:86 +msgid "" +"Base class for creating enumerated constants that can be combined using the " +"bitwise operations without losing their :class:`Flag` membership." +msgstr "" +"Classe de base pour créer une énumération de constantes pouvant être " +"combinées avec des opérateurs de comparaison bit-à-bit, sans perdre leur " +"qualité de :class:`Flag`." -#: library/enum.rst:184 -msgid "Duplicating enum members and values" -msgstr "Duplication de membres et de valeurs" +#: library/enum.rst:89 +#, fuzzy +msgid ":class:`IntFlag`" +msgstr "Exemple d'une classe :class:`IntFlag` ::" -#: library/enum.rst:186 -msgid "Having two enum members with the same name is invalid::" +#: library/enum.rst:91 +#, fuzzy +msgid "" +"Base class for creating enumerated constants that can be combined using the " +"bitwise operators without losing their :class:`IntFlag` membership. :class:" +"`IntFlag` members are also subclasses of :class:`int`. (`Notes`_)" msgstr "" -"Il n'est pas possible d'avoir deux membres du même nom dans un *enum* ::" +"Classe de base pour créer une énumération de constantes pouvant être " +"combinées avec des opérateurs de comparaison bit-à-bit, sans perdre leur " +"qualité de :class:`IntFlag`. Les membres de :class:`IntFlag` sont aussi des " +"sous-classes de :class:`int`." -#: library/enum.rst:196 -msgid "" -"However, two enum members are allowed to have the same value. Given two " -"members A and B with the same value (and A defined first), B is an alias to " -"A. By-value lookup of the value of A and B will return A. By-name lookup " -"of B will also return A::" +#: library/enum.rst:95 +msgid ":class:`EnumCheck`" msgstr "" -"Cependant deux membres peuvent avoir la même valeur. Si deux membres A et B " -"ont la même valeur (et que A est défini en premier), B sera un alias de A. " -"Un accès par valeur avec la valeur commune à A et B renverra A. Un accès à B " -"par nom renverra aussi A ::" -#: library/enum.rst:216 +#: library/enum.rst:97 msgid "" -"Attempting to create a member with the same name as an already defined " -"attribute (another member, a method, etc.) or attempting to create an " -"attribute with the same name as a member is not allowed." +"An enumeration with the values ``CONTINUOUS``, ``NAMED_FLAGS``, and " +"``UNIQUE``, for use with :func:`verify` to ensure various constraints are " +"met by a given enumeration." msgstr "" -"Il est interdit de créer un membre avec le même nom qu'un attribut déjà " -"défini (un autre membre, une méthode, etc.) ou de créer un attribut avec le " -"nom d'un membre." -#: library/enum.rst:222 -msgid "Ensuring unique enumeration values" -msgstr "Coercition d'unicité des valeurs d'une énumération" +#: library/enum.rst:101 +msgid ":class:`FlagBoundary`" +msgstr "" -#: library/enum.rst:224 +#: library/enum.rst:103 msgid "" -"By default, enumerations allow multiple names as aliases for the same value. " -"When this behavior isn't desired, the following decorator can be used to " -"ensure each value is used only once in the enumeration:" +"An enumeration with the values ``STRICT``, ``CONFORM``, ``EJECT``, and " +"``KEEP`` which allows for more fine-grained control over how invalid values " +"are dealt with in an enumeration." msgstr "" -"Par défaut, les énumérations autorisent les alias de nom pour une même " -"valeur. Quand ce comportement n'est pas désiré, il faut utiliser le " -"décorateur suivant pour s'assurer que chaque valeur n'est utilisée qu'une " -"seule fois au sein de l'énumération : ::" -#: library/enum.rst:230 +#: library/enum.rst:107 +#, fuzzy +msgid ":class:`auto`" +msgstr "Avec :class:`auto`" + +#: library/enum.rst:109 +#, fuzzy msgid "" -"A :keyword:`class` decorator specifically for enumerations. It searches an " -"enumeration's :attr:`__members__` gathering any aliases it finds; if any are " -"found :exc:`ValueError` is raised with the details::" +"Instances are replaced with an appropriate value for Enum members. :class:" +"`StrEnum` defaults to the lower-cased version of the member name, while " +"other Enums default to 1 and increase from there." msgstr "" -"Un décorateur de :keyword:`class` spécifique aux énumérations. Il examine " -"l'attribut :attr:`__members__` d'une énumération et recherche des alias ; " -"s'il en trouve, l'exception :exc:`ValueError` est levée avec des détails ::" - -#: library/enum.rst:248 -msgid "Using automatic values" -msgstr "Valeurs automatiques" +"Les instances sont remplacées par une valeur appropriée pour les membres de " +"l'énumération. Par défaut, la valeur initiale démarre à 1." -#: library/enum.rst:250 -msgid "If the exact value is unimportant you can use :class:`auto`::" +#: library/enum.rst:113 +msgid ":func:`~enum.property`" msgstr "" -"Si la valeur exacte n'a pas d'importance, vous pouvez utiliser :class:" -"`auto` ::" -#: library/enum.rst:261 +#: library/enum.rst:115 msgid "" -"The values are chosen by :func:`_generate_next_value_`, which can be " -"overridden::" +"Allows :class:`Enum` members to have attributes without conflicting with " +"member names." msgstr "" -"Les valeurs sont déterminées par :func:`_generate_next_value_`, qui peut " -"être redéfinie ::" -#: library/enum.rst:279 -#, fuzzy -msgid "" -"The goal of the default :meth:`_generate_next_value_` method is to provide " -"the next :class:`int` in sequence with the last :class:`int` provided, but " -"the way it does this is an implementation detail and may change." +#: library/enum.rst:118 +msgid ":func:`unique`" msgstr "" -"La méthode par défaut :meth:`_generate_next_value_` doit fournir le :class:" -"`int` suivant de la séquence en fonction du dernier :class:`int` fourni, " -"mais la séquence générée dépend de l'implémentation Python." -#: library/enum.rst:285 +#: library/enum.rst:120 msgid "" -"The :meth:`_generate_next_value_` method must be defined before any members." +"Enum class decorator that ensures only one name is bound to any one value." msgstr "" +"Décorateur de classe qui garantit qu'une valeur ne puisse être associée qu'à " +"un seul nom." -#: library/enum.rst:288 -msgid "Iteration" -msgstr "Itération" - -#: library/enum.rst:290 -msgid "Iterating over the members of an enum does not provide the aliases::" -msgstr "Itérer sur les membres d'une énumération ne parcourt pas les alias ::" +#: library/enum.rst:122 +msgid ":func:`verify`" +msgstr "" -#: library/enum.rst:295 +#: library/enum.rst:124 +#, fuzzy msgid "" -"The special attribute ``__members__`` is a read-only ordered mapping of " -"names to members. It includes all names defined in the enumeration, " -"including the aliases::" +"Enum class decorator that checks user-selectable constraints on an " +"enumeration." msgstr "" -"L'attribut spécial ``__members__`` est un dictionnaire en lecture seule " -"ordonné qui fait correspondre les noms aux membres. Il inclut tous les noms " -"définis dans l'énumération, alias compris ::" +"Décorateur de classe qui garantit qu'une valeur ne puisse être associée qu'à " +"un seul nom." -#: library/enum.rst:307 -msgid "" -"The ``__members__`` attribute can be used for detailed programmatic access " -"to the enumeration members. For example, finding all the aliases::" +#: library/enum.rst:127 +msgid ":func:`member`" msgstr "" -"L'attribut ``__members__`` peut servir à accéder dynamiquement aux membres " -"de l'énumération. Par exemple, pour trouver tous les alias ::" -#: library/enum.rst:315 -msgid "Comparisons" -msgstr "Comparaisons" +#: library/enum.rst:129 +msgid "Make ``obj`` a member. Can be used as a decorator." +msgstr "" -#: library/enum.rst:317 -msgid "Enumeration members are compared by identity::" -msgstr "Les membres d'une énumération sont comparés par identité ::" +#: library/enum.rst:131 +msgid ":func:`nonmember`" +msgstr "" -#: library/enum.rst:326 -msgid "" -"Ordered comparisons between enumeration values are *not* supported. Enum " -"members are not integers (but see `IntEnum`_ below)::" +#: library/enum.rst:133 +msgid "Do not make ``obj`` a member. Can be used as a decorator." msgstr "" -"Les comparaisons d'ordre entre les valeurs d'une énumération n'existent " -"*pas* ; les membres d'un *enum* ne sont pas des entiers (voir cependant " -"`IntEnum`_ ci-dessous) ::" -#: library/enum.rst:334 -msgid "Equality comparisons are defined though::" -msgstr "A contrario, les comparaisons d'égalité existent ::" +#: library/enum.rst:136 +msgid "``Flag``, ``IntFlag``, ``auto``" +msgstr "``Flag``, ``IntFlag``, ``auto``" -#: library/enum.rst:343 -msgid "" -"Comparisons against non-enumeration values will always compare not equal " -"(again, :class:`IntEnum` was explicitly designed to behave differently, see " -"below)::" +#: library/enum.rst:137 +msgid "``StrEnum``, ``EnumCheck``, ``FlagBoundary``, ``property``" msgstr "" -"Les comparaisons avec des valeurs ne provenant pas d'énumérations sont " -"toujours fausses (ici encore, :class:`IntEnum` a été conçue pour fonctionner " -"différemment, voir ci-dessous) ::" -#: library/enum.rst:352 -msgid "Allowed members and attributes of enumerations" -msgstr "Membres et attributs autorisés dans une énumération" +#: library/enum.rst:138 +msgid "``member``, ``nonmember``" +msgstr "" -#: library/enum.rst:354 -msgid "" -"The examples above use integers for enumeration values. Using integers is " -"short and handy (and provided by default by the `Functional API`_), but not " -"strictly enforced. In the vast majority of use-cases, one doesn't care what " -"the actual value of an enumeration is. But if the value *is* important, " -"enumerations can have arbitrary values." +#: library/enum.rst:143 +msgid "Data Types" msgstr "" -"Les exemples précédents utilisent des entiers pour énumérer les valeurs. " -"C'est un choix concis et pratique (et implémenté par défaut dans l'`API par " -"fonction`_), mais ce n'est pas une obligation. Dans la majorité des cas, il " -"importe peu de connaître la valeur réelle d'une énumération. Il est " -"toutefois possible de donner une valeur arbitraire aux énumérations, si " -"cette valeur est *vraiment* significative." -#: library/enum.rst:360 +#: library/enum.rst:148 msgid "" -"Enumerations are Python classes, and can have methods and special methods as " -"usual. If we have this enumeration::" +"*EnumType* is the :term:`metaclass` for *enum* enumerations. It is possible " +"to subclass *EnumType* -- see :ref:`Subclassing EnumType ` for details." msgstr "" -"Les énumérations sont des classes Python et peuvent donc avoir des méthodes " -"et des méthodes spéciales. L'énumération suivante ::" -#: library/enum.rst:380 -msgid "Then::" -msgstr "amène ::" - -#: library/enum.rst:389 -msgid "" -"The rules for what is allowed are as follows: names that start and end with " -"a single underscore are reserved by enum and cannot be used; all other " -"attributes defined within an enumeration will become members of this " -"enumeration, with the exception of special methods (:meth:`__str__`, :meth:" -"`__add__`, etc.), descriptors (methods are also descriptors), and variable " -"names listed in :attr:`_ignore_`." -msgstr "" -"Les règles pour ce qui est autorisé sont les suivantes : les noms qui " -"commencent et finissent avec un seul tiret bas sont réservés par *enum* et " -"ne peuvent pas être utilisés ; tous les autres attributs définis dans " -"l'énumération en deviendront des membres, à l'exception des méthodes " -"spéciales (:meth:`__str__`, :meth:`__add__`, etc.), des descripteurs (les " -"méthodes sont aussi des descripteurs) et des noms de variable listés dans :" -"attr:`_ignore_`." - -#: library/enum.rst:396 -#, fuzzy +#: library/enum.rst:152 msgid "" -"Note: if your enumeration defines :meth:`__new__` and/or :meth:`__init__` " -"then any value(s) given to the enum member will be passed into those " -"methods. See `Planet`_ for an example." +"*EnumType* is responsible for setting the correct :meth:`__repr__`, :meth:" +"`__str__`, :meth:`__format__`, and :meth:`__reduce__` methods on the final " +"*enum*, as well as creating the enum members, properly handling duplicates, " +"providing iteration over the enum class, etc." msgstr "" -"Remarque : si l'énumération définit :meth:`__new__` ou :meth:`__init__`, " -"alors la (ou les) valeur affectée au membre sera passée à ces méthodes. Voir " -"l'exemple de `Planet`_." -#: library/enum.rst:402 -msgid "Restricted Enum subclassing" -msgstr "Restrictions sur l'héritage" +#: library/enum.rst:159 +msgid "Returns ``True`` if member belongs to the ``cls``::" +msgstr "" -#: library/enum.rst:404 +#: library/enum.rst:167 msgid "" -"A new :class:`Enum` class must have one base Enum class, up to one concrete " -"data type, and as many :class:`object`-based mixin classes as needed. The " -"order of these base classes is::" +"In Python 3.12 it will be possible to check for member values and not just " +"members; until then, a ``TypeError`` will be raised if a non-Enum-member is " +"used in a containment check." msgstr "" -"Une nouvelle classe :class:`Enum` doit avoir une classe *Enum* de base, au " -"plus un type de données concret et autant de classes de mélange (basées sur :" -"class:`object`) que nécessaire. L'ordre de ces classes de base est le " -"suivant ::" -#: library/enum.rst:411 +#: library/enum.rst:173 msgid "" -"Also, subclassing an enumeration is allowed only if the enumeration does not " -"define any members. So this is forbidden::" +"Returns ``['__class__', '__doc__', '__members__', '__module__']`` and the " +"names of the members in *cls*::" msgstr "" -"Hériter d'une énumération n'est permis que si cette énumération ne définit " -"aucun membre. Le code suivant n'est pas autorisé ::" -#: library/enum.rst:421 -msgid "But this is allowed::" -msgstr "Mais celui-ci est correct ::" - -#: library/enum.rst:432 +#: library/enum.rst:181 msgid "" -"Allowing subclassing of enums that define members would lead to a violation " -"of some important invariants of types and instances. On the other hand, it " -"makes sense to allow sharing some common behavior between a group of " -"enumerations. (See `OrderedEnum`_ for an example.)" +"Returns the Enum member in *cls* matching *name*, or raises an :exc:" +"`AttributeError`::" msgstr "" -"Autoriser l'héritage d'*enums* définissant des membres violerait des " -"invariants sur les types et les instances. D'un autre côté, il est logique " -"d'autoriser un groupe d'énumérations à partager un comportement commun (voir " -"par exemple `OrderedEnum`_)." -#: library/enum.rst:439 -msgid "Pickling" -msgstr "Sérialisation" +#: library/enum.rst:188 +msgid "" +"Returns the Enum member in *cls* matching *name*, or raises an :exc:" +"`KeyError`::" +msgstr "" -#: library/enum.rst:441 -msgid "Enumerations can be pickled and unpickled::" -msgstr "Les énumérations peuvent être sérialisées et déserialisées ::" +#: library/enum.rst:195 +#, fuzzy +msgid "Returns each member in *cls* in definition order::" +msgstr "" +"Les énumérations sont itérables, l'ordre d'itération est celui dans lequel " +"les membres sont déclarés ::" -#: library/enum.rst:448 -msgid "" -"The usual restrictions for pickling apply: picklable enums must be defined " -"in the top level of a module, since unpickling requires them to be " -"importable from that module." +#: library/enum.rst:202 +msgid "Returns the number of member in *cls*::" msgstr "" -"Les restrictions habituelles de sérialisation s'appliquent : les *enums* à " -"sérialiser doivent être déclarés dans l'espace de nom de haut niveau du " -"module car la déserialisation nécessite que ces *enums* puissent être " -"importés depuis ce module." -#: library/enum.rst:454 -msgid "" -"With pickle protocol version 4 it is possible to easily pickle enums nested " -"in other classes." +#: library/enum.rst:209 +msgid "Returns each member in *cls* in reverse definition order::" msgstr "" -"Depuis la version 4 du protocole de *pickle*, il est possible de sérialiser " -"facilement des *enums* imbriqués dans d'autres classes." -#: library/enum.rst:457 -msgid "" -"It is possible to modify how Enum members are pickled/unpickled by defining :" -"meth:`__reduce_ex__` in the enumeration class." +#: library/enum.rst:217 +msgid "*Enum* is the base class for all *enum* enumerations." msgstr "" -"Redéfinir la méthode :meth:`__reduce_ex__` permet de modifier la " -"sérialisation ou la dé-sérialisation des membres d'une énumération." -#: library/enum.rst:462 -msgid "Functional API" -msgstr "API par fonction" +#: library/enum.rst:221 +msgid "The name used to define the ``Enum`` member::" +msgstr "" -#: library/enum.rst:464 -msgid "" -"The :class:`Enum` class is callable, providing the following functional API::" +#: library/enum.rst:228 +msgid "The value given to the ``Enum`` member::" msgstr "" -"La :class:`Enum` est appelable et implémente l'API par fonction suivante ::" -#: library/enum.rst:476 +#: library/enum.rst:233 +msgid "Enum member values" +msgstr "Valeurs des membres d'une *Enum*" + +#: library/enum.rst:235 msgid "" -"The semantics of this API resemble :class:`~collections.namedtuple`. The " -"first argument of the call to :class:`Enum` is the name of the enumeration." +"Member values can be anything: :class:`int`, :class:`str`, etc.. If the " +"exact value is unimportant you may use :class:`auto` instances and an " +"appropriate value will be chosen for you. Care must be taken if you mix :" +"class:`auto` with other values." msgstr "" -"La sémantique de cette API est similaire à :class:`~collections.namedtuple`. " -"Le premier argument de l'appel à :class:`Enum` est le nom de l'énumération." +"La valeur d'un membre peut être de n'importe quel type : :class:`int`, :" +"class:`str`, etc. Si la valeur exacte n'a pas d'importance, utilisez des " +"instances de :class:`auto` et une valeur appropriée sera choisie pour vous. " +"Soyez vigilant si vous mélangez :class:`auto` avec d'autres valeurs." -#: library/enum.rst:479 +#: library/enum.rst:242 msgid "" -"The second argument is the *source* of enumeration member names. It can be " -"a whitespace-separated string of names, a sequence of names, a sequence of 2-" -"tuples with key/value pairs, or a mapping (e.g. dictionary) of names to " -"values. The last two options enable assigning arbitrary values to " -"enumerations; the others auto-assign increasing integers starting with 1 " -"(use the ``start`` parameter to specify a different starting value). A new " -"class derived from :class:`Enum` is returned. In other words, the above " -"assignment to :class:`Animal` is equivalent to::" +"``_ignore_`` is only used during creation and is removed from the " +"enumeration once creation is complete." msgstr "" -"Le second argument est la *source* des noms des membres de l'énumération. Il " -"peut être une chaîne de caractères contenant les noms séparés par des " -"espaces, une séquence de noms, une séquence de couples clé / valeur ou un " -"dictionnaire (p. ex. un *dict*) de valeurs indexées par des noms. Les deux " -"dernières options permettent d'affecter des valeurs arbitraires aux " -"énumérations ; les autres affectent automatiquement des entiers en " -"commençant par 1 (le paramètre ``start`` permet de changer la valeur de " -"départ). Ceci renvoie une nouvelle classe dérivée de :class:`Enum`. En " -"d'autres termes, la déclaration de :class:`Animal` ci-dessus équivaut à ::" -#: library/enum.rst:495 +#: library/enum.rst:245 msgid "" -"The reason for defaulting to ``1`` as the starting number and not ``0`` is " -"that ``0`` is ``False`` in a boolean sense, but enum members all evaluate to " -"``True``." +"``_ignore_`` is a list of names that will not become members, and whose " +"names will also be removed from the completed enumeration. See :ref:" +"`TimePeriod ` for an example." msgstr "" -"La valeur de départ par défaut est ``1`` et non ``0`` car ``0`` au sens " -"booléen vaut ``False`` alors que tous les membres d'une *enum* valent " -"``True``." -#: library/enum.rst:499 -msgid "" -"Pickling enums created with the functional API can be tricky as frame stack " -"implementation details are used to try and figure out which module the " -"enumeration is being created in (e.g. it will fail if you use a utility " -"function in separate module, and also may not work on IronPython or Jython). " -"The solution is to specify the module name explicitly as follows::" +#: library/enum.rst:251 +msgid "This method is called in two different ways:" msgstr "" -"La sérialisation d'énumérations créées avec l'API en fonction peut être " -"source de problèmes, car celle-ci repose sur des détails d'implémentation de " -"l'affichage de la pile d'appel pour tenter de déterminer dans quel module " -"l'énumération est créée (p. ex. elle échouera avec les fonctions utilitaires " -"provenant d'un module séparé et peut ne pas fonctionner avec IronPython ou " -"Jython). La solution consiste à préciser explicitement le nom du module " -"comme ceci ::" -#: library/enum.rst:509 -msgid "" -"If ``module`` is not supplied, and Enum cannot determine what it is, the new " -"Enum members will not be unpicklable; to keep errors closer to the source, " -"pickling will be disabled." +#: library/enum.rst:253 +msgid "to look up an existing member:" msgstr "" -"Si ``module`` n'est pas fourni et que *Enum* ne peut pas le deviner, les " -"nouveaux membres de *l'Enum* ne seront pas déserialisables ; pour garder les " -"erreurs au plus près de leur origine, la sérialisation sera désactivée." -#: library/enum.rst:513 -msgid "" -"The new pickle protocol 4 also, in some circumstances, relies on :attr:" -"`~definition.__qualname__` being set to the location where pickle will be " -"able to find the class. For example, if the class was made available in " -"class SomeData in the global scope::" +#: library/enum.rst:0 +msgid "cls" msgstr "" -"Le nouveau protocole version 4 de *pickle* se base lui aussi, dans certains " -"cas, sur le fait que :attr:`~definition.__qualname__` pointe sur l'endroit " -"où *pickle* peut trouver la classe. Par exemple, si la classe était " -"disponible depuis la classe *SomeData* dans l'espace de nom de plus haut " -"niveau ::" -#: library/enum.rst:520 -msgid "The complete signature is::" -msgstr "La signature complète est la suivante ::" +#: library/enum.rst:260 +msgid "The enum class being called." +msgstr "" #: library/enum.rst:0 msgid "value" msgstr "value" -#: library/enum.rst:524 -msgid "What the new Enum class will record as its name." -msgstr "Le nom de la la nouvelle classe *Enum*." +#: library/enum.rst:256 +msgid "The value to lookup." +msgstr "" + +#: library/enum.rst:258 +msgid "to use the ``cls`` enum to create a new enum:" +msgstr "" + +#: library/enum.rst:261 +msgid "The name of the new Enum to create." +msgstr "" #: library/enum.rst:0 msgid "names" msgstr "names" -#: library/enum.rst:526 -msgid "" -"The Enum members. This can be a whitespace or comma separated string " -"(values will start at 1 unless otherwise specified)::" +#: library/enum.rst:262 +msgid "The names/values of the members for the new Enum." msgstr "" -"Les membres de l'énumération. Une chaîne de caractères séparés par des " -"espaces ou des virgules (la valeur de départ est fixée à 1, sauf si " -"spécifiée autrement) ::" - -#: library/enum.rst:531 -msgid "or an iterator of names::" -msgstr "ou un itérateur sur les noms ::" - -#: library/enum.rst:535 -msgid "or an iterator of (name, value) pairs::" -msgstr "ou un itérateur sur les *n*-uplets (nom, valeur) ::" - -#: library/enum.rst:539 -msgid "or a mapping::" -msgstr "ou une correspondance ::" #: library/enum.rst:0 msgid "module" msgstr "module" -#: library/enum.rst:543 -msgid "name of module where new Enum class can be found." +#: library/enum.rst:263 +#, fuzzy +msgid "The name of the module the new Enum is created in." msgstr "nom du module dans lequel la classe *Enum* se trouve." #: library/enum.rst:0 msgid "qualname" msgstr "qualname" -#: library/enum.rst:545 -msgid "where in module new Enum class can be found." -msgstr "localisation de la nouvelle classe *Enum* dans le module." +#: library/enum.rst:264 +#, fuzzy +msgid "The actual location in the module where this Enum can be found." +msgstr "nom du module dans lequel la classe *Enum* se trouve." #: library/enum.rst:0 msgid "type" msgstr "type" -#: library/enum.rst:547 -msgid "type to mix in to new Enum class." -msgstr "le type à mélanger dans la nouvelle classe *Enum*." +#: library/enum.rst:265 +msgid "A mix-in type for the new Enum." +msgstr "" #: library/enum.rst:0 msgid "start" msgstr "start" -#: library/enum.rst:549 -msgid "number to start counting at if only names are passed in." -msgstr "index de départ si uniquement des noms sont passés." - -#: library/enum.rst:551 -msgid "The *start* parameter was added." -msgstr "Ajout du paramètre *start*." - -#: library/enum.rst:556 -msgid "Derived Enumerations" -msgstr "Énumérations dérivées" - -#: library/enum.rst:559 -msgid "IntEnum" -msgstr "IntEnum" +#: library/enum.rst:266 +msgid "The first integer value for the Enum (used by :class:`auto`)" +msgstr "" -#: library/enum.rst:561 -msgid "" -"The first variation of :class:`Enum` that is provided is also a subclass of :" -"class:`int`. Members of an :class:`IntEnum` can be compared to integers; by " -"extension, integer enumerations of different types can also be compared to " -"each other::" +#: library/enum.rst:0 +msgid "boundary" msgstr "" -"La première version dérivée de :class:`Enum` qui existe est aussi une sous-" -"classe de :class:`int`. Les membres de :class:`IntEnum` peuvent être " -"comparés à des entiers et, par extension, les comparaisons entre des " -"énumérations entières de type différent sont possibles ::" -#: library/enum.rst:582 +#: library/enum.rst:267 msgid "" -"However, they still can't be compared to standard :class:`Enum` " -"enumerations::" +"How to handle out-of-range values from bit operations (:class:`Flag` only)" msgstr "" -"Elles ne peuvent cependant toujours pas être comparées à des énumérations " -"standards de :class:`Enum` ::" -#: library/enum.rst:595 +#: library/enum.rst:271 msgid "" -":class:`IntEnum` values behave like integers in other ways you'd expect::" +"Returns ``['__class__', '__doc__', '__module__', 'name', 'value']`` and any " +"public methods defined on *self.__class__*::" msgstr "" -"Les valeurs de :class:`IntEnum` se comportent comme des entiers, comme on " -"pouvait s'y attendre ::" -#: library/enum.rst:606 -msgid "IntFlag" -msgstr "IntFlag" +#: library/enum.rst:0 +msgid "name" +msgstr "``name``" -#: library/enum.rst:608 -msgid "" -"The next variation of :class:`Enum` provided, :class:`IntFlag`, is also " -"based on :class:`int`. The difference being :class:`IntFlag` members can be " -"combined using the bitwise operators (&, \\|, ^, ~) and the result is still " -"an :class:`IntFlag` member. However, as the name implies, :class:`IntFlag` " -"members also subclass :class:`int` and can be used wherever an :class:`int` " -"is used. Any operation on an :class:`IntFlag` member besides the bit-wise " -"operations will lose the :class:`IntFlag` membership." -msgstr "" -"La version dérivée suivante de :class:`Enum` est :class:`IntFlag`. Elle est " -"aussi basée sur :class:`int`, à la différence près que les membres de :class:" -"`IntFlag` peuvent être combinés en utilisant les opérateurs bit-à-bit (&, " -"\\|, ^, ~) et que le résultat reste un membre de :class:`IntFlag`. " -"Cependant, comme le nom l'indique, les membres d'une classe :class:`IntFlag` " -"héritent aussi de :class:`int` et peuvent être utilisés là où un :class:" -"`int` est utilisé. Toute opération sur un membre d'une classe :class:" -"`IntFlag`, autre qu'un opérateur bit-à-bit lui fait perdre sa qualité de :" -"class:`IntFlag`." - -#: library/enum.rst:618 -msgid "Sample :class:`IntFlag` class::" -msgstr "Exemple d'une classe :class:`IntFlag` ::" +#: library/enum.rst:291 +msgid "The name of the member being defined (e.g. 'RED')." +msgstr "" -#: library/enum.rst:634 -msgid "It is also possible to name the combinations::" -msgstr "Il est aussi possible de nommer les combinaisons ::" +#: library/enum.rst:292 +msgid "The start value for the Enum; the default is 1." +msgstr "" -#: library/enum.rst:646 -msgid "" -"Another important difference between :class:`IntFlag` and :class:`Enum` is " -"that if no flags are set (the value is 0), its boolean evaluation is :data:" -"`False`::" +#: library/enum.rst:0 +msgid "count" msgstr "" -"Une autre différence importante entre :class:`IntFlag` et :class:`Enum` est " -"que, si aucune option n'est activée (la valeur vaut 0), son évaluation " -"booléenne est :data:`False` ::" -#: library/enum.rst:654 -msgid "" -"Because :class:`IntFlag` members are also subclasses of :class:`int` they " -"can be combined with them::" +#: library/enum.rst:293 +msgid "The number of members currently defined, not including this one." msgstr "" -"Comme les membres d'une classe :class:`IntFlag` héritent aussi de :class:" -"`int`, ils peuvent être combinés avec eux ::" -#: library/enum.rst:662 -msgid "Flag" -msgstr "Option" +#: library/enum.rst:0 +msgid "last_values" +msgstr "``last_values``" -#: library/enum.rst:664 -msgid "" -"The last variation is :class:`Flag`. Like :class:`IntFlag`, :class:`Flag` " -"members can be combined using the bitwise operators (&, \\|, ^, ~). Unlike :" -"class:`IntFlag`, they cannot be combined with, nor compared against, any " -"other :class:`Flag` enumeration, nor :class:`int`. While it is possible to " -"specify the values directly it is recommended to use :class:`auto` as the " -"value and let :class:`Flag` select an appropriate value." +#: library/enum.rst:294 +msgid "A list of the previous values." msgstr "" -"La dernière version dérivée est la classe :class:`Flag`. Comme :class:" -"`IntFlag`, les membres d'une classe :class:`Flag` peuvent être combinés en " -"utilisant les opérateurs de comparaison bit-à-bit. Cependant, à la " -"différence de :class:`IntFlag`, ils ne peuvent ni être combinés, ni être " -"comparés avec une autre énumération :class:`Flag`, ni avec :class:`int`. " -"Bien qu'il soit possible de définir directement les valeurs, il est " -"recommandé d'utiliser :class:`auto` comme valeur et de laisser :class:`Flag` " -"choisir une valeur appropriée." -#: library/enum.rst:673 +#: library/enum.rst:296 msgid "" -"Like :class:`IntFlag`, if a combination of :class:`Flag` members results in " -"no flags being set, the boolean evaluation is :data:`False`::" +"A *staticmethod* that is used to determine the next value returned by :class:" +"`auto`::" msgstr "" -"Comme avec :class:`IntFlag`, si une combinaison de membres d'une classe :" -"class:`Flag` n'active aucune option, l'évaluation booléenne de la " -"comparaison est :data:`False` ::" -#: library/enum.rst:687 +#: library/enum.rst:311 msgid "" -"Individual flags should have values that are powers of two (1, 2, 4, " -"8, ...), while combinations of flags won't::" +"A *classmethod* that is used to further configure subsequent subclasses. By " +"default, does nothing." msgstr "" -"Les options de base doivent avoir des puissances de deux pour valeurs (1, 2, " -"4, 8, ...) mais pas les combinaisons ::" -#: library/enum.rst:699 +#: library/enum.rst:316 msgid "" -"Giving a name to the \"no flags set\" condition does not change its boolean " -"value::" +"A *classmethod* for looking up values not found in *cls*. By default it " +"does nothing, but can be overridden to implement custom search behavior::" msgstr "" -"Donner un nom à la valeur « aucune option activée » ne change pas sa valeur " -"booléenne ::" -#: library/enum.rst:715 +#: library/enum.rst:337 msgid "" -"For the majority of new code, :class:`Enum` and :class:`Flag` are strongly " -"recommended, since :class:`IntEnum` and :class:`IntFlag` break some semantic " -"promises of an enumeration (by being comparable to integers, and thus by " -"transitivity to other unrelated enumerations). :class:`IntEnum` and :class:" -"`IntFlag` should be used only in cases where :class:`Enum` and :class:`Flag` " -"will not do; for example, when integer constants are replaced with " -"enumerations, or for interoperability with other systems." +"Returns the string used for *repr()* calls. By default, returns the *Enum* " +"name, member name, and value, but can be overridden::" msgstr "" -"Dans la plupart des cas, il est fortement recommandé d'utiliser :class:" -"`Enum` et :class:`Flag` pour écrire du code nouveau, car :class:`IntEnum` " -"et :class:`IntFlag` violent certains principes sémantiques d'une énumération " -"(en pouvant être comparées à des entiers et donc, par transitivité, à " -"d'autres énumérations). :class:`IntEnum` et :class:`IntFlag` ne doivent être " -"utilisées que dans les cas où :class:`Enum` et :class:`Flag` ne suffisent " -"pas ; par exemple quand des constantes entières sont remplacées par des " -"énumérations, ou pour l’interopérabilité avec d'autres systèmes." -#: library/enum.rst:725 -msgid "Others" -msgstr "Autres" - -#: library/enum.rst:727 +#: library/enum.rst:352 msgid "" -"While :class:`IntEnum` is part of the :mod:`enum` module, it would be very " -"simple to implement independently::" +"Returns the string used for *str()* calls. By default, returns the *Enum* " +"name and member name, but can be overridden::" msgstr "" -"Bien que :class:`IntEnum` fasse partie du module :mod:`enum`, elle serait " -"très simple à implémenter hors de ce module ::" -#: library/enum.rst:733 +#: library/enum.rst:366 msgid "" -"This demonstrates how similar derived enumerations can be defined; for " -"example a :class:`StrEnum` that mixes in :class:`str` instead of :class:" -"`int`." +"Returns the string used for *format()* and *f-string* calls. By default, " +"returns :meth:`__str__` returns, but can be overridden::" msgstr "" -"Ceci montre comment définir des énumérations dérivées similaires ; par " -"exemple une classe :class:`StrEnum` qui dériverait de :class:`str` au lieu " -"de :class:`int`." - -#: library/enum.rst:736 -msgid "Some rules:" -msgstr "Quelques règles :" -#: library/enum.rst:738 +#: library/enum.rst:380 msgid "" -"When subclassing :class:`Enum`, mix-in types must appear before :class:" -"`Enum` itself in the sequence of bases, as in the :class:`IntEnum` example " -"above." +"Using :class:`auto` with :class:`Enum` results in integers of increasing " +"value, starting with ``1``." msgstr "" -"Pour hériter de :class:`Enum`, les types de mélange doivent être placés " -"avant la classe :class:`Enum` elle-même dans la liste des classes de base, " -"comme dans l'exemple de :class:`IntEnum` ci-dessus." -#: library/enum.rst:741 -#, fuzzy +#: library/enum.rst:386 msgid "" -"While :class:`Enum` can have members of any type, once you mix in an " -"additional type, all the members must have values of that type, e.g. :class:" -"`int` above. This restriction does not apply to mix-ins which only add " -"methods and don't specify another type." +"*IntEnum* is the same as *Enum*, but its members are also integers and can " +"be used anywhere that an integer can be used. If any integer operation is " +"performed with an *IntEnum* member, the resulting value loses its " +"enumeration status." msgstr "" -"Même si une classe :class:`Enum` peut avoir des membres de n'importe quel " -"type, dès lors qu'un type de mélange est ajouté, tous les membres doivent " -"être de ce type, p. ex. :class:`int` ci-dessus. Cette restriction ne " -"s'applique pas aux types de mélange qui ne font qu'ajouter des méthodes et " -"ne définissent pas de type de données, tels :class:`int` ou :class:`str`. " -#: library/enum.rst:745 +#: library/enum.rst:406 msgid "" -"When another data type is mixed in, the :attr:`value` attribute is *not the " -"same* as the enum member itself, although it is equivalent and will compare " -"equal." +"Using :class:`auto` with :class:`IntEnum` results in integers of increasing " +"value, starting with ``1``." msgstr "" -"Quand un autre type de données est mélangé, l'attribut :attr:`value` n'est " -"*pas* identique au membre de l'énumération lui-même, bien qu'ils soient " -"équivalents et égaux en comparaison." -#: library/enum.rst:748 +#: library/enum.rst:580 msgid "" -"%-style formatting: `%s` and `%r` call the :class:`Enum` class's :meth:" -"`__str__` and :meth:`__repr__` respectively; other codes (such as `%i` or `" -"%h` for IntEnum) treat the enum member as its mixed-in type." +":meth:`__str__` is now :func:`int.__str__` to better support the " +"*replacement of existing constants* use-case. :meth:`__format__` was " +"already :func:`int.__format__` for that same reason." msgstr "" -"Formatage de style *%* : `%s` et `%r` appellent respectivement les méthodes :" -"meth:`__str__` et :meth:`__repr__` de la classe :class:`Enum` ; les autres " -"codes, comme `%i` ou `%h` pour *IntEnum*, s'appliquent au membre comme si " -"celui-ci était converti en son type de mélange." -#: library/enum.rst:751 -#, fuzzy +#: library/enum.rst:416 msgid "" -":ref:`Formatted string literals `, :meth:`str.format`, and :func:" -"`format` will use the mixed-in type's :meth:`__format__` unless :meth:" -"`__str__` or :meth:`__format__` is overridden in the subclass, in which case " -"the overridden methods or :class:`Enum` methods will be used. Use the !s " -"and !r format codes to force usage of the :class:`Enum` class's :meth:" -"`__str__` and :meth:`__repr__` methods." +"*StrEnum* is the same as *Enum*, but its members are also strings and can be " +"used in most of the same places that a string can be used. The result of " +"any string operation performed on or with a *StrEnum* member is not part of " +"the enumeration." msgstr "" -":ref:`Chaînes de caractères formatées littérales ` : :meth:`str." -"format` et :func:`format` appellent la méthode :meth:`__format__` du type de " -"mélange. Pour appeler les fonctions :func:`str` ou :func:`repr` de la " -"classe :class:`Enum`, il faut utiliser les codes de formatage `!s` ou `!r`." - -#: library/enum.rst:759 -msgid "When to use :meth:`__new__` vs. :meth:`__init__`" -msgstr "Quand utiliser :meth:`__new__` ou :meth:`__init__`" -#: library/enum.rst:761 +#: library/enum.rst:420 msgid "" -":meth:`__new__` must be used whenever you want to customize the actual value " -"of the :class:`Enum` member. Any other modifications may go in either :meth:" -"`__new__` or :meth:`__init__`, with :meth:`__init__` being preferred." +"There are places in the stdlib that check for an exact :class:`str` instead " +"of a :class:`str` subclass (i.e. ``type(unknown) == str`` instead of " +"``isinstance(str, unknown)``), and in those locations you will need to use " +"``str(StrEnum.member)``." msgstr "" -#: library/enum.rst:765 +#: library/enum.rst:427 msgid "" -"For example, if you want to pass several items to the constructor, but only " -"want one of them to be the value::" +"Using :class:`auto` with :class:`StrEnum` results in the lower-cased member " +"name as the value." msgstr "" -"Par exemple, si vous voulez passer plusieurs éléments au constructeur, mais " -"qu'un seul d'entre eux soit la valeur ::" - -#: library/enum.rst:791 -msgid "Interesting examples" -msgstr "Exemples intéressants" -#: library/enum.rst:793 +#: library/enum.rst:430 msgid "" -"While :class:`Enum`, :class:`IntEnum`, :class:`IntFlag`, and :class:`Flag` " -"are expected to cover the majority of use-cases, they cannot cover them " -"all. Here are recipes for some different types of enumerations that can be " -"used directly, or as examples for creating one's own." +":meth:`__str__` is :func:`str.__str__` to better support the *replacement of " +"existing constants* use-case. :meth:`__format__` is likewise :func:`str." +"__format__` for that same reason." msgstr "" -"Bien que :class:`Enum`, :class:`IntEnum`, :class:`IntFlag` et :class:`Flag` " -"soient conçues pour répondre à la majorité des besoins, elles ne peuvent " -"répondre à tous. Voici quelques recettes d'énumération qui peuvent être " -"réutilisées telles quelles, ou peuvent servir d'exemple pour développer vos " -"propres énumérations." - -#: library/enum.rst:800 -msgid "Omitting values" -msgstr "Omettre les valeurs" -#: library/enum.rst:802 +#: library/enum.rst:438 msgid "" -"In many use-cases one doesn't care what the actual value of an enumeration " -"is. There are several ways to define this type of simple enumeration:" +"*Flag* members support the bitwise operators ``&`` (*AND*), ``|`` (*OR*), " +"``^`` (*XOR*), and ``~`` (*INVERT*); the results of those operators are " +"members of the enumeration." msgstr "" -"Dans de nombreux cas, la valeur réelle de l'énumération n'a pas " -"d'importance. Il y a plusieurs façons de définir ce type d'énumération " -"simple :" - -#: library/enum.rst:805 -msgid "use instances of :class:`auto` for the value" -msgstr "affecter des instances de :class:`auto` aux valeurs" -#: library/enum.rst:806 -msgid "use instances of :class:`object` as the value" -msgstr "affecter des instances de :class:`object` aux valeurs" - -#: library/enum.rst:807 -msgid "use a descriptive string as the value" -msgstr "affecter des chaînes de caractères aux valeurs pour les décrire" - -#: library/enum.rst:808 -msgid "" -"use a tuple as the value and a custom :meth:`__new__` to replace the tuple " -"with an :class:`int` value" +#: library/enum.rst:444 +msgid "Returns *True* if value is in self::" msgstr "" -"affecter un *n*-uplet aux valeurs et définir une méthode :meth:`__new__` " -"pour remplacer les *n*-uplets avec un :class:`int`" -#: library/enum.rst:811 -msgid "" -"Using any of these methods signifies to the user that these values are not " -"important, and also enables one to add, remove, or reorder members without " -"having to renumber the remaining members." +#: library/enum.rst:464 +msgid "Returns all contained members::" msgstr "" -"Utiliser une de ces méthodes indique à l'utilisateur que les valeurs n'ont " -"pas d'importance. Cela permet aussi d'ajouter, de supprimer ou de ré-" -"ordonner les membres sans avoir à ré-énumérer les membres existants." -#: library/enum.rst:815 -msgid "" -"Whichever method you choose, you should provide a :meth:`repr` that also " -"hides the (unimportant) value::" +#: library/enum.rst:473 +msgid "Returns number of members in flag::" msgstr "" -"Quelle que soit la méthode choisie, il faut fournir une méthode :meth:`repr` " -"qui masque les valeurs (pas importantes de toute façon) ::" -#: library/enum.rst:825 -msgid "Using :class:`auto`" -msgstr "Avec :class:`auto`" +#: library/enum.rst:482 +msgid "Returns *True* if any members in flag, *False* otherwise::" +msgstr "" -#: library/enum.rst:827 -msgid "Using :class:`auto` would look like::" -msgstr "On utilise :class:`auto` de la manière suivante ::" +#: library/enum.rst:494 +msgid "Returns current flag binary or'ed with other::" +msgstr "" -#: library/enum.rst:839 -msgid "Using :class:`object`" -msgstr "Avec :class:`object`" +#: library/enum.rst:501 +msgid "Returns current flag binary and'ed with other::" +msgstr "" -#: library/enum.rst:841 -msgid "Using :class:`object` would look like::" -msgstr "On utilise :class:`object` de la manière suivante ::" +#: library/enum.rst:510 +msgid "Returns current flag binary xor'ed with other::" +msgstr "" -#: library/enum.rst:853 -msgid "Using a descriptive string" -msgstr "Avec une chaîne de caractères de description" +#: library/enum.rst:519 +msgid "Returns all the flags in *type(self)* that are not in self::" +msgstr "" -#: library/enum.rst:855 -msgid "Using a string as the value would look like::" -msgstr "On utilise une chaîne de caractères de la manière suivante ::" +#: library/enum.rst:530 +msgid "" +"Function used to format any remaining unnamed numeric values. Default is " +"the value's repr; common choices are :func:`hex` and :func:`oct`." +msgstr "" -#: library/enum.rst:869 -msgid "Using a custom :meth:`__new__`" -msgstr "Avec une méthode ad-hoc :meth:`__new__`" +#: library/enum.rst:535 +msgid "" +"Using :class:`auto` with :class:`Flag` results in integers that are powers " +"of two, starting with ``1``." +msgstr "" -#: library/enum.rst:871 -msgid "Using an auto-numbering :meth:`__new__` would look like::" +#: library/enum.rst:538 +msgid "The *repr()* of zero-valued flags has changed. It is now::" msgstr "" -"On utilise une méthode :meth:`__new__` d'énumération de la manière " -"suivante ::" -#: library/enum.rst:890 +#: library/enum.rst:546 msgid "" -"To make a more general purpose ``AutoNumber``, add ``*args`` to the " -"signature::" +"*IntFlag* is the same as *Flag*, but its members are also integers and can " +"be used anywhere that an integer can be used." msgstr "" -#: library/enum.rst:900 +#: library/enum.rst:559 msgid "" -"Then when you inherit from ``AutoNumber`` you can write your own " -"``__init__`` to handle any extra arguments::" +"If any integer operation is performed with an *IntFlag* member, the result " +"is not an *IntFlag*::" msgstr "" -#: library/enum.rst:919 -msgid "" -"The :meth:`__new__` method, if defined, is used during creation of the Enum " -"members; it is then replaced by Enum's :meth:`__new__` which is used after " -"class creation for lookup of existing members." +#: library/enum.rst:565 +msgid "If a *Flag* operation is performed with an *IntFlag* member and:" msgstr "" -"La méthode :meth:`__new__`, si définie, est appelée à la création des " -"membres de l'énumération ; elle est ensuite remplacée par la méthode :meth:" -"`__new__` de *Enum*, qui est utilisée après la création de la classe pour la " -"recherche des membres existants." -#: library/enum.rst:925 -msgid "OrderedEnum" -msgstr "OrderedEnum" +#: library/enum.rst:567 +msgid "the result is a valid *IntFlag*: an *IntFlag* is returned" +msgstr "" -#: library/enum.rst:927 +#: library/enum.rst:568 msgid "" -"An ordered enumeration that is not based on :class:`IntEnum` and so " -"maintains the normal :class:`Enum` invariants (such as not being comparable " -"to other enumerations)::" +"the result is not a valid *IntFlag*: the result depends on the " +"*FlagBoundary* setting" msgstr "" -"Une énumération ordonnée qui n'est pas basée sur :class:`IntEnum` et qui, " -"par conséquent, respecte les invariants classiques de :class:`Enum` (comme " -"par exemple l'impossibilité de pouvoir être comparée à d'autres " -"énumérations) ::" -#: library/enum.rst:961 -msgid "DuplicateFreeEnum" -msgstr "DuplicateFreeEnum" +#: library/enum.rst:570 +msgid "The *repr()* of unnamed zero-valued flags has changed. It is now:" +msgstr "" -#: library/enum.rst:963 +#: library/enum.rst:577 msgid "" -"Raises an error if a duplicate member name is found instead of creating an " -"alias::" +"Using :class:`auto` with :class:`IntFlag` results in integers that are " +"powers of two, starting with ``1``." msgstr "" -"Lève une erreur si un membre est dupliqué, plutôt que de créer un alias ::" -#: library/enum.rst:988 +#: library/enum.rst:587 msgid "" -"This is a useful example for subclassing Enum to add or change other " -"behaviors as well as disallowing aliases. If the only desired change is " -"disallowing aliases, the :func:`unique` decorator can be used instead." +"*EnumCheck* contains the options used by the :func:`verify` decorator to " +"ensure various constraints; failed constraints result in a :exc:`ValueError`." msgstr "" -"Cet exemple d'héritage de *Enum* est intéressant pour ajouter ou modifier " -"des comportements comme interdire les alias. Si vous ne souhaitez " -"qu'interdire les alias, il suffit d'utiliser le décorateur :func:`unique`." -#: library/enum.rst:994 -msgid "Planet" -msgstr "Planet" +#: library/enum.rst:592 +msgid "Ensure that each value has only one name::" +msgstr "" -#: library/enum.rst:996 +#: library/enum.rst:608 msgid "" -"If :meth:`__new__` or :meth:`__init__` is defined the value of the enum " -"member will be passed to those methods::" +"Ensure that there are no missing values between the lowest-valued member and " +"the highest-valued member::" msgstr "" -"Si :meth:`__new__` ou :meth:`__init__` sont définies, la valeur du membre de " -"l'énumération sera passée à ces méthodes ::" - -#: library/enum.rst:1024 -msgid "TimePeriod" -msgstr "TimePeriod" - -#: library/enum.rst:1026 -msgid "An example to show the :attr:`_ignore_` attribute in use::" -msgstr "Exemple d'utilisation de l'attribut :attr:`_ignore_` ::" -#: library/enum.rst:1043 -msgid "How are Enums different?" -msgstr "En quoi les *Enums* sont différentes ?" +#: library/enum.rst:623 +msgid "" +"Ensure that any flag groups/masks contain only named flags -- useful when " +"values are specified instead of being generated by :func:`auto`" +msgstr "" -#: library/enum.rst:1045 +#: library/enum.rst:640 msgid "" -"Enums have a custom metaclass that affects many aspects of both derived Enum " -"classes and their instances (members)." +"CONTINUOUS and NAMED_FLAGS are designed to work with integer-valued members." msgstr "" -"Les *enums* ont une métaclasse spéciale qui affecte de nombreux aspects des " -"classes dérivées de *Enum* et de leur instances (membres)." -#: library/enum.rst:1050 -msgid "Enum Classes" -msgstr "Classes *Enum*" +#: library/enum.rst:646 +msgid "" +"*FlagBoundary* controls how out-of-range values are handled in *Flag* and " +"its subclasses." +msgstr "" -#: library/enum.rst:1052 +#: library/enum.rst:651 msgid "" -"The :class:`EnumMeta` metaclass is responsible for providing the :meth:" -"`__contains__`, :meth:`__dir__`, :meth:`__iter__` and other methods that " -"allow one to do things with an :class:`Enum` class that fail on a typical " -"class, such as `list(Color)` or `some_enum_var in Color`. :class:`EnumMeta` " -"is responsible for ensuring that various other methods on the final :class:" -"`Enum` class are correct (such as :meth:`__new__`, :meth:`__getnewargs__`, :" -"meth:`__str__` and :meth:`__repr__`)." +"Out-of-range values cause a :exc:`ValueError` to be raised. This is the " +"default for :class:`Flag`::" msgstr "" -"La métaclasse :class:`EnumMeta` se charge de fournir les méthodes :meth:" -"`__contains__`, :meth:`__dir__`, :meth:`__iter__` etc. qui permettent de " -"faire des opérations sur une classe :class:`Enum` qui ne fonctionneraient " -"pas sur une classe standard, comme `list(Color)` ou `some_enum_var in " -"Color`. :class:`EnumMeta` garantit que les autres méthodes de la classe " -"finale :class:`Enum` sont correctes (comme :meth:`__new__`, :meth:" -"`__getnewargs__`, :meth:`__str__` et :meth:`__repr__`)." -#: library/enum.rst:1062 -msgid "Enum Members (aka instances)" -msgstr "Membres d'Enum (c.-à-d. instances)" +#: library/enum.rst:668 +msgid "" +"Out-of-range values have invalid values removed, leaving a valid *Flag* " +"value::" +msgstr "" -#: library/enum.rst:1064 +#: library/enum.rst:681 msgid "" -"The most interesting thing about Enum members is that they are singletons. :" -"class:`EnumMeta` creates them all while it is creating the :class:`Enum` " -"class itself, and then puts a custom :meth:`__new__` in place to ensure that " -"no new ones are ever instantiated by returning only the existing member " -"instances." +"Out-of-range values lose their *Flag* membership and revert to :class:`int`. " +"This is the default for :class:`IntFlag`::" msgstr "" -"Il est intéressant de souligner que les membres d'une *Enum* sont des " -"singletons. La classe :class:`EnumMeta` les crée tous au moment de la " -"création de la classe :class:`Enum` elle-même et implémente une méthode :" -"meth:`__new__` spécifique. Cette méthode renvoie toujours les instances de " -"membres déjà existantes pour être sûr de ne jamais en instancier de " -"nouvelles." -#: library/enum.rst:1072 -msgid "Finer Points" -msgstr "Aspects approfondis" +#: library/enum.rst:694 +msgid "" +"Out-of-range values are kept, and the *Flag* membership is kept. This is " +"used for some stdlib flags:" +msgstr "" -#: library/enum.rst:1075 +#: library/enum.rst:710 msgid "Supported ``__dunder__`` names" msgstr "Noms de la forme ``__dunder__`` disponibles" -#: library/enum.rst:1077 +#: library/enum.rst:712 msgid "" ":attr:`__members__` is a read-only ordered mapping of ``member_name``:" "``member`` items. It is only available on the class." @@ -1185,7 +762,7 @@ msgstr "" ":attr:`__members__` est un dictionnaire en lecture seule ordonné d'éléments " "``nom_du_membre`` / ``membre``. Il n'est disponible que depuis la classe." -#: library/enum.rst:1080 +#: library/enum.rst:715 msgid "" ":meth:`__new__`, if specified, must create and return the enum members; it " "is also a very good idea to set the member's :attr:`_value_` appropriately. " @@ -1196,22 +773,22 @@ msgstr "" "du membre est également conseillé. Une fois que tous les membres ont été " "créés, cette méthode n'est plus utilisée." -#: library/enum.rst:1086 +#: library/enum.rst:721 msgid "Supported ``_sunder_`` names" msgstr "Noms de la forme ``_sunder_`` disponibles" -#: library/enum.rst:1088 +#: library/enum.rst:723 msgid "``_name_`` -- name of the member" msgstr "``_name_`` -- nom du membre" -#: library/enum.rst:1089 +#: library/enum.rst:724 msgid "" "``_value_`` -- value of the member; can be set / modified in ``__new__``" msgstr "" -"``_value_`` -- valeur du membre ; il est possible d'y accéder ou de la muer " +"``_value_`` -- valeur du membre ; il est possible d'y accéder ou de la muer " "dans ``__new__``" -#: library/enum.rst:1091 +#: library/enum.rst:726 msgid "" "``_missing_`` -- a lookup function used when a value is not found; may be " "overridden" @@ -1219,18 +796,17 @@ msgstr "" "``_missing_`` -- une fonction de recherche qui est appelée quand la valeur " "n'est pas trouvée ; elle peut être redéfinie" -#: library/enum.rst:1093 -#, fuzzy +#: library/enum.rst:728 msgid "" "``_ignore_`` -- a list of names, either as a :class:`list` or a :class:" "`str`, that will not be transformed into members, and will be removed from " "the final class" msgstr "" -"``_ignore_`` -- une liste de noms, sous la forme de :func:`list` ou de :func:" -"`str`, qui ne seront pas transformés en membres, et seront supprimés de la " -"classe résultante" +"``_ignore_`` -- une liste de noms, sous la forme d'une :func:`list` ou " +"d'une :func:`str`, qui ne seront pas convertis en membres et seront " +"supprimés de la classe résultante" -#: library/enum.rst:1096 +#: library/enum.rst:731 msgid "" "``_order_`` -- used in Python 2/3 code to ensure member order is consistent " "(class attribute, removed during class creation)" @@ -1239,118 +815,1122 @@ msgstr "" "membres est cohérent (attribut de classe, supprimé durant la création de la " "classe)" -#: library/enum.rst:1098 +#: library/enum.rst:733 +#, fuzzy msgid "" -"``_generate_next_value_`` -- used by the `Functional API`_ and by :class:" -"`auto` to get an appropriate value for an enum member; may be overridden" +"``_generate_next_value_`` -- used to get an appropriate value for an enum " +"member; may be overridden" msgstr "" "``_generate_next_value_`` -- utilisée par l' `API par fonction`_ et par :" "class:`auto` pour obtenir une valeur appropriée à affecter à un membre de " "*l'enum* ; elle peut être redéfinie" -#: library/enum.rst:1102 +#: library/enum.rst:738 +msgid "" +"For standard :class:`Enum` classes the next value chosen is the last value " +"seen incremented by one." +msgstr "" + +#: library/enum.rst:741 +msgid "" +"For :class:`Flag` classes the next value chosen will be the next highest " +"power-of-two, regardless of the last value seen." +msgstr "" + +#: library/enum.rst:744 msgid "``_missing_``, ``_order_``, ``_generate_next_value_``" msgstr "``_missing_``, ``_order_``, ``_generate_next_value_``" -#: library/enum.rst:1103 +#: library/enum.rst:745 msgid "``_ignore_``" msgstr "``_ignore_``" -#: library/enum.rst:1105 +#: library/enum.rst:750 +msgid "Utilities and Decorators" +msgstr "" + +#: library/enum.rst:754 msgid "" -"To help keep Python 2 / Python 3 code in sync an :attr:`_order_` attribute " -"can be provided. It will be checked against the actual order of the " -"enumeration and raise an error if the two do not match::" +"*auto* can be used in place of a value. If used, the *Enum* machinery will " +"call an *Enum*'s :meth:`_generate_next_value_` to get an appropriate value. " +"For *Enum* and *IntEnum* that appropriate value will be the last value plus " +"one; for *Flag* and *IntFlag* it will be the first power-of-two greater than " +"the last value; for *StrEnum* it will be the lower-cased version of the " +"member's name." msgstr "" -"Pour faciliter la transition de Python 2 en Python 3, l'attribut :attr:" -"`_order_` peut être défini. Il sera comparé au véritable ordre de " -"l'énumération et lève une erreur si les deux ne correspondent pas ::" -#: library/enum.rst:1121 +#: library/enum.rst:761 msgid "" -"In Python 2 code the :attr:`_order_` attribute is necessary as definition " -"order is lost before it can be recorded." +"``_generate_next_value_`` can be overridden to customize the values used by " +"*auto*." msgstr "" -"En Python 2, l'attribut :attr:`_order_` est indispensable car l'ordre de la " -"définition est perdu avant de pouvoir être enregistré." -#: library/enum.rst:1126 -msgid "_Private__names" +#: library/enum.rst:766 +msgid "" +"A decorator similar to the built-in *property*, but specifically for " +"enumerations. It allows member attributes to have the same names as members " +"themselves." msgstr "" -#: library/enum.rst:1128 +#: library/enum.rst:770 msgid "" -"Private names will be normal attributes in Python 3.10 instead of either an " -"error or a member (depending on if the name ends with an underscore). Using " -"these names in 3.9 will issue a :exc:`DeprecationWarning`." +"the *property* and the member must be defined in separate classes; for " +"example, the *value* and *name* attributes are defined in the *Enum* class, " +"and *Enum* subclasses can define members with the names ``value`` and " +"``name``." msgstr "" -#: library/enum.rst:1134 -msgid "``Enum`` member type" -msgstr "Type des membres de ``Enum``" +#: library/enum.rst:779 +#, fuzzy +msgid "" +"A :keyword:`class` decorator specifically for enumerations. It searches an " +"enumeration's :attr:`__members__`, gathering any aliases it finds; if any " +"are found :exc:`ValueError` is raised with the details::" +msgstr "" +"Un décorateur de :keyword:`class` spécifique aux énumérations. Il examine " +"l'attribut :attr:`__members__` d'une énumération et recherche des alias ; " +"s'il en trouve, l'exception :exc:`ValueError` est levée avec des détails ::" -#: library/enum.rst:1136 +#: library/enum.rst:797 msgid "" -":class:`Enum` members are instances of their :class:`Enum` class, and are " -"normally accessed as ``EnumClass.member``. Under certain circumstances they " -"can also be accessed as ``EnumClass.member.member``, but you should never do " -"this as that lookup may fail or, worse, return something besides the :class:" -"`Enum` member you are looking for (this is another good reason to use all-" -"uppercase names for members)::" +"A :keyword:`class` decorator specifically for enumerations. Members from :" +"class:`EnumCheck` are used to specify which constraints should be checked on " +"the decorated enumeration." msgstr "" -"Les membres de :class:`Enum` sont des instances de leur classe :class:" -"`Enum`. On y accède normalement par ``ClasseEnum.membre``. Dans certains " -"cas, on peut également y accéder par ``ClasseEnum.membre.membre``, mais ceci " -"est fortement déconseillé car cette indirection est susceptible d'échouer, " -"ou pire, de ne pas renvoyer le membre de la classe :class:`Enum` désiré " -"(c'est une autre bonne raison pour définir tous les noms des membres en " -"majuscules) ::" -#: library/enum.rst:1157 -msgid "Boolean value of ``Enum`` classes and members" -msgstr "Valeur booléenne des classes ``Enum`` et de leurs membres" +#: library/enum.rst:805 +msgid "A decorator for use in enums: its target will become a member." +msgstr "" -#: library/enum.rst:1159 -msgid "" -":class:`Enum` members that are mixed with non-:class:`Enum` types (such as :" -"class:`int`, :class:`str`, etc.) are evaluated according to the mixed-in " -"type's rules; otherwise, all members evaluate as :data:`True`. To make your " -"own Enum's boolean evaluation depend on the member's value add the following " -"to your class::" +#: library/enum.rst:811 +msgid "A decorator for use in enums: its target will not become a member." msgstr "" -"Les membres d'une classe :class:`Enum` mélangée avec un type non dérivé de :" -"class:`Enum` (comme :class:`int`, :class:`str`, etc.) sont évalués selon les " -"règles du type de mélange. Sinon, tous les membres valent :data:`True`. Pour " -"faire dépendre l'évaluation booléenne de votre propre *Enum* de la valeur du " -"membre, il faut ajouter le code suivant à votre classe ::" -#: library/enum.rst:1168 -msgid ":class:`Enum` classes always evaluate as :data:`True`." -msgstr "Les classes :class:`Enum` valent toujours :data:`True`." +#: library/enum.rst:818 +msgid "Notes" +msgstr "" -#: library/enum.rst:1172 -msgid "``Enum`` classes with methods" -msgstr "Classes ``Enum`` avec des méthodes" +#: library/enum.rst:820 +msgid ":class:`IntEnum`, :class:`StrEnum`, and :class:`IntFlag`" +msgstr "" -#: library/enum.rst:1174 +#: library/enum.rst:822 msgid "" -"If you give your :class:`Enum` subclass extra methods, like the `Planet`_ " -"class above, those methods will show up in a :func:`dir` of the member, but " -"not of the class::" +"These three enum types are designed to be drop-in replacements for existing " +"integer- and string-based values; as such, they have extra limitations:" msgstr "" -"Si votre classe :class:`Enum` contient des méthodes supplémentaires, comme " -"la classe `Planet`_ ci-dessus, elles s'afficheront avec un appel à :func:" -"`dir` sur le membre, mais pas avec un appel sur la classe ::" -#: library/enum.rst:1185 -msgid "Combining members of ``Flag``" -msgstr "Combinaison de membres de ``Flag``" +#: library/enum.rst:825 +msgid "``__str__`` uses the value and not the name of the enum member" +msgstr "" -#: library/enum.rst:1187 +#: library/enum.rst:827 msgid "" -"If a combination of Flag members is not named, the :func:`repr` will include " -"all named flags and all named combinations of flags that are in the value::" -msgstr "" -"Si une valeur issue de la combinaison de membres de *Flag* n'est pas " -"associée explicitement à un membre, la fonction :func:`repr` inclut tous les " -"membres et toutes les combinaisons de membres présents dans cette valeur ::" +"``__format__``, because it uses ``__str__``, will also use the value of the " +"enum member instead of its name" +msgstr "" + +#: library/enum.rst:830 +msgid "" +"If you do not need/want those limitations, you can either create your own " +"base class by mixing in the ``int`` or ``str`` type yourself::" +msgstr "" + +#: library/enum.rst:837 +msgid "or you can reassign the appropriate :meth:`str`, etc., in your enum::" +msgstr "" + +#~ msgid "" +#~ "An enumeration is a set of symbolic names (members) bound to unique, " +#~ "constant values. Within an enumeration, the members can be compared by " +#~ "identity, and the enumeration itself can be iterated over." +#~ msgstr "" +#~ "Une énumération est un ensemble de noms symboliques, appelés *membres*, " +#~ "liés à des valeurs constantes et uniques. Au sein d'une énumération, les " +#~ "membres peuvent être comparés et il est possible d'itérer sur " +#~ "l'énumération elle-même." + +#~ msgid "Case of Enum Members" +#~ msgstr "Convention de nommage pour les membres d'une **Enum**" + +#~ msgid "" +#~ "Because Enums are used to represent constants we recommend using " +#~ "UPPER_CASE names for enum members, and will be using that style in our " +#~ "examples." +#~ msgstr "" +#~ "Puisque les **Enums** sont utilisées pour représenter des constantes, il " +#~ "est recommandé d'utiliser des majuscules (format " +#~ "``MAJUSCULE_AVEC_SOULIGNÉS``) pour leurs membres. Cette convention de " +#~ "style sera utilisée dans les exemples." + +#~ msgid "" +#~ "This module defines four enumeration classes that can be used to define " +#~ "unique sets of names and values: :class:`Enum`, :class:`IntEnum`, :class:" +#~ "`Flag`, and :class:`IntFlag`. It also defines one decorator, :func:" +#~ "`unique`, and one helper, :class:`auto`." +#~ msgstr "" +#~ "Ce module définit quatre classes d'énumération qui permettent de définir " +#~ "des ensembles uniques de noms et de valeurs : :class:`Enum`, :class:" +#~ "`IntEnum`, :class:`Flag` et :class:`IntFlag`. Il fournit également un " +#~ "décorateur, :func:`unique`, ainsi qu'une classe utilitaire, :class:`auto`." + +#~ msgid "" +#~ "Base class for creating enumerated constants. See section `Functional " +#~ "API`_ for an alternate construction syntax." +#~ msgstr "" +#~ "Classe de base pour créer une énumération de constantes. Voir la section " +#~ "`API par fonction`_ pour une syntaxe alternative de construction." + +#~ msgid "Creating an Enum" +#~ msgstr "Création d'une *Enum*" + +#~ msgid "" +#~ "Enumerations are created using the :keyword:`class` syntax, which makes " +#~ "them easy to read and write. An alternative creation method is described " +#~ "in `Functional API`_. To define an enumeration, subclass :class:`Enum` " +#~ "as follows::" +#~ msgstr "" +#~ "Une énumération est créée comme une :keyword:`class`, ce qui la rend " +#~ "facile à lire et à écrire. Une autre méthode de création est décrite dans " +#~ "`API par fonction`_. Pour définir une énumération, il faut hériter de :" +#~ "class:`Enum` de la manière suivante ::" + +#~ msgid "Enumeration members have human readable string representations::" +#~ msgstr "" +#~ "Les membres d'une énumération ont une représentation en chaîne de " +#~ "caractères compréhensible par un humain ::" + +#~ msgid "...while their ``repr`` has more information::" +#~ msgstr "… tandis que leur ``repr`` contient plus d'informations ::" + +#~ msgid "" +#~ "The *type* of an enumeration member is the enumeration it belongs to::" +#~ msgstr "" +#~ "Le *type* d'un membre est l'énumération auquel ce membre appartient ::" + +#~ msgid "" +#~ "Enum members also have a property that contains just their item name::" +#~ msgstr "Les membres ont également un attribut qui contient leur nom ::" + +#~ msgid "" +#~ "Enumeration members are hashable, so they can be used in dictionaries and " +#~ "sets::" +#~ msgstr "" +#~ "Les membres d'une énumération sont hachables, ils peuvent ainsi être " +#~ "utilisés dans des dictionnaires ou des ensembles ::" + +#~ msgid "Programmatic access to enumeration members and their attributes" +#~ msgstr "Accès dynamique aux membres et à leurs attributs" + +#~ msgid "" +#~ "Sometimes it's useful to access members in enumerations programmatically " +#~ "(i.e. situations where ``Color.RED`` won't do because the exact color is " +#~ "not known at program-writing time). ``Enum`` allows such access::" +#~ msgstr "" +#~ "Il est parfois utile de pouvoir accéder dynamiquement aux membres d'une " +#~ "énumération (p. ex. dans des situations où il ne suffit pas d'utiliser " +#~ "``Color.RED`` car la couleur précise n'est pas connue à l'écriture du " +#~ "programme). ``Enum`` permet de tels accès ::" + +#~ msgid "If you want to access enum members by *name*, use item access::" +#~ msgstr "" +#~ "Pour accéder aux membres par leur *nom*, utilisez l'accès par " +#~ "indexation ::" + +#~ msgid "" +#~ "If you have an enum member and need its :attr:`name` or :attr:`value`::" +#~ msgstr "" +#~ "Pour obtenir l'attribut :attr:`name` ou :attr:`value` d'un membre ::" + +#~ msgid "Duplicating enum members and values" +#~ msgstr "Duplication de membres et de valeurs" + +#~ msgid "Having two enum members with the same name is invalid::" +#~ msgstr "" +#~ "Il n'est pas possible d'avoir deux membres du même nom dans un *enum* ::" + +#~ msgid "" +#~ "However, two enum members are allowed to have the same value. Given two " +#~ "members A and B with the same value (and A defined first), B is an alias " +#~ "to A. By-value lookup of the value of A and B will return A. By-name " +#~ "lookup of B will also return A::" +#~ msgstr "" +#~ "Cependant deux membres peuvent avoir la même valeur. Si deux membres A et " +#~ "B ont la même valeur (et que A est défini en premier), B sera un alias de " +#~ "A. Un accès par valeur avec la valeur commune à A et B renverra A. Un " +#~ "accès à B par nom renverra aussi A ::" + +#~ msgid "" +#~ "Attempting to create a member with the same name as an already defined " +#~ "attribute (another member, a method, etc.) or attempting to create an " +#~ "attribute with the same name as a member is not allowed." +#~ msgstr "" +#~ "Il est interdit de créer un membre avec le même nom qu'un attribut déjà " +#~ "défini (un autre membre, une méthode, etc.) ou de créer un attribut avec " +#~ "le nom d'un membre." + +#~ msgid "Ensuring unique enumeration values" +#~ msgstr "Coercition d'unicité des valeurs d'une énumération" + +#~ msgid "" +#~ "By default, enumerations allow multiple names as aliases for the same " +#~ "value. When this behavior isn't desired, the following decorator can be " +#~ "used to ensure each value is used only once in the enumeration:" +#~ msgstr "" +#~ "Par défaut, les énumérations autorisent les alias de nom pour une même " +#~ "valeur. Quand ce comportement n'est pas désiré, il faut utiliser le " +#~ "décorateur suivant pour s'assurer que chaque valeur n'est utilisée qu'une " +#~ "seule fois au sein de l'énumération : ::" + +#~ msgid "Using automatic values" +#~ msgstr "Valeurs automatiques" + +#~ msgid "If the exact value is unimportant you can use :class:`auto`::" +#~ msgstr "" +#~ "Si la valeur exacte n'a pas d'importance, vous pouvez utiliser :class:" +#~ "`auto` ::" + +#~ msgid "" +#~ "The values are chosen by :func:`_generate_next_value_`, which can be " +#~ "overridden::" +#~ msgstr "" +#~ "Les valeurs sont déterminées par :func:`_generate_next_value_`, qui peut " +#~ "être redéfinie ::" + +#~ msgid "" +#~ "The goal of the default :meth:`_generate_next_value_` method is to " +#~ "provide the next :class:`int` in sequence with the last :class:`int` " +#~ "provided, but the way it does this is an implementation detail and may " +#~ "change." +#~ msgstr "" +#~ "La méthode :meth:`_generate_next_value_` doit renvoyer le prochain :class:" +#~ "`int` de la séquence à partir du dernier :class:`int` fourni, mais " +#~ "l'implémentation de cette fonction peut changer." + +#~ msgid "" +#~ "The :meth:`_generate_next_value_` method must be defined before any " +#~ "members." +#~ msgstr "" +#~ "La méthode :meth:`_generate_next_value_` doit être définie avant tout " +#~ "membre." + +#~ msgid "Iteration" +#~ msgstr "Itération" + +#~ msgid "Iterating over the members of an enum does not provide the aliases::" +#~ msgstr "" +#~ "Itérer sur les membres d'une énumération ne parcourt pas les alias ::" + +#~ msgid "" +#~ "The special attribute ``__members__`` is a read-only ordered mapping of " +#~ "names to members. It includes all names defined in the enumeration, " +#~ "including the aliases::" +#~ msgstr "" +#~ "L'attribut spécial ``__members__`` est un dictionnaire en lecture seule " +#~ "ordonné qui fait correspondre les noms aux membres. Il inclut tous les " +#~ "noms définis dans l'énumération, alias compris ::" + +#~ msgid "" +#~ "The ``__members__`` attribute can be used for detailed programmatic " +#~ "access to the enumeration members. For example, finding all the aliases::" +#~ msgstr "" +#~ "L'attribut ``__members__`` peut servir à accéder dynamiquement aux " +#~ "membres de l'énumération. Par exemple, pour trouver tous les alias ::" + +#~ msgid "Comparisons" +#~ msgstr "Comparaisons" + +#~ msgid "Enumeration members are compared by identity::" +#~ msgstr "Les membres d'une énumération sont comparés par identité ::" + +#~ msgid "" +#~ "Ordered comparisons between enumeration values are *not* supported. Enum " +#~ "members are not integers (but see `IntEnum`_ below)::" +#~ msgstr "" +#~ "Les comparaisons d'ordre entre les valeurs d'une énumération n'existent " +#~ "*pas* ; les membres d'un *enum* ne sont pas des entiers (voir cependant " +#~ "`IntEnum`_ ci-dessous) ::" + +#~ msgid "Equality comparisons are defined though::" +#~ msgstr "A contrario, les comparaisons d'égalité existent ::" + +#~ msgid "" +#~ "Comparisons against non-enumeration values will always compare not equal " +#~ "(again, :class:`IntEnum` was explicitly designed to behave differently, " +#~ "see below)::" +#~ msgstr "" +#~ "Les comparaisons avec des valeurs ne provenant pas d'énumérations sont " +#~ "toujours fausses (ici encore, :class:`IntEnum` a été conçue pour " +#~ "fonctionner différemment, voir ci-dessous) ::" + +#~ msgid "Allowed members and attributes of enumerations" +#~ msgstr "Membres et attributs autorisés dans une énumération" + +#~ msgid "" +#~ "The examples above use integers for enumeration values. Using integers " +#~ "is short and handy (and provided by default by the `Functional API`_), " +#~ "but not strictly enforced. In the vast majority of use-cases, one " +#~ "doesn't care what the actual value of an enumeration is. But if the " +#~ "value *is* important, enumerations can have arbitrary values." +#~ msgstr "" +#~ "Les exemples précédents utilisent des entiers pour énumérer les valeurs. " +#~ "C'est un choix concis et pratique (et implémenté par défaut dans l'`API " +#~ "par fonction`_), mais ce n'est pas une obligation. Dans la majorité des " +#~ "cas, il importe peu de connaître la valeur réelle d'une énumération. Il " +#~ "est toutefois possible de donner une valeur arbitraire aux énumérations, " +#~ "si cette valeur est *vraiment* significative." + +#~ msgid "" +#~ "Enumerations are Python classes, and can have methods and special methods " +#~ "as usual. If we have this enumeration::" +#~ msgstr "" +#~ "Les énumérations sont des classes Python et peuvent donc avoir des " +#~ "méthodes et des méthodes spéciales. L'énumération suivante ::" + +#~ msgid "Then::" +#~ msgstr "Amène ::" + +#~ msgid "" +#~ "The rules for what is allowed are as follows: names that start and end " +#~ "with a single underscore are reserved by enum and cannot be used; all " +#~ "other attributes defined within an enumeration will become members of " +#~ "this enumeration, with the exception of special methods (:meth:" +#~ "`__str__`, :meth:`__add__`, etc.), descriptors (methods are also " +#~ "descriptors), and variable names listed in :attr:`_ignore_`." +#~ msgstr "" +#~ "Les règles pour ce qui est autorisé sont les suivantes : les noms qui " +#~ "commencent et finissent avec un seul tiret bas sont réservés par *enum* " +#~ "et ne peuvent pas être utilisés ; tous les autres attributs définis dans " +#~ "l'énumération en deviendront des membres, à l'exception des méthodes " +#~ "spéciales (:meth:`__str__`, :meth:`__add__`, etc.), des descripteurs (les " +#~ "méthodes sont aussi des descripteurs) et des noms de variable listés " +#~ "dans :attr:`_ignore_`." + +#~ msgid "" +#~ "Note: if your enumeration defines :meth:`__new__` and/or :meth:" +#~ "`__init__` then any value(s) given to the enum member will be passed into " +#~ "those methods. See `Planet`_ for an example." +#~ msgstr "" +#~ "Remarque : si votre énumération définit :meth:`__new__` ou :meth:" +#~ "`__init__`, alors les valeurs affectées aux membres seront passées à ces " +#~ "méthodes. Voir `Planet`_ pour exemple." + +#~ msgid "Restricted Enum subclassing" +#~ msgstr "Restrictions sur l'héritage" + +#~ msgid "" +#~ "A new :class:`Enum` class must have one base Enum class, up to one " +#~ "concrete data type, and as many :class:`object`-based mixin classes as " +#~ "needed. The order of these base classes is::" +#~ msgstr "" +#~ "Une nouvelle classe :class:`Enum` doit avoir une classe *Enum* de base, " +#~ "au plus un type de données concret et autant de classes de mélange " +#~ "(basées sur :class:`object`) que nécessaire. L'ordre de ces classes de " +#~ "base est le suivant ::" + +#~ msgid "" +#~ "Also, subclassing an enumeration is allowed only if the enumeration does " +#~ "not define any members. So this is forbidden::" +#~ msgstr "" +#~ "Hériter d'une énumération n'est permis que si cette énumération ne " +#~ "définit aucun membre. Le code suivant n'est pas autorisé ::" + +#~ msgid "But this is allowed::" +#~ msgstr "Mais celui-ci est correct ::" + +#~ msgid "" +#~ "Allowing subclassing of enums that define members would lead to a " +#~ "violation of some important invariants of types and instances. On the " +#~ "other hand, it makes sense to allow sharing some common behavior between " +#~ "a group of enumerations. (See `OrderedEnum`_ for an example.)" +#~ msgstr "" +#~ "Autoriser l'héritage d'*enums* définissant des membres violerait des " +#~ "invariants sur les types et les instances. D'un autre côté, il est " +#~ "logique d'autoriser un groupe d'énumérations à partager un comportement " +#~ "commun (voir par exemple `OrderedEnum`_)." + +#~ msgid "Pickling" +#~ msgstr "Sérialisation" + +#~ msgid "Enumerations can be pickled and unpickled::" +#~ msgstr "Les énumérations peuvent être sérialisées et déserialisées ::" + +#~ msgid "" +#~ "The usual restrictions for pickling apply: picklable enums must be " +#~ "defined in the top level of a module, since unpickling requires them to " +#~ "be importable from that module." +#~ msgstr "" +#~ "Les restrictions habituelles de sérialisation s'appliquent : les *enums* " +#~ "à sérialiser doivent être déclarés dans l'espace de nom de haut niveau du " +#~ "module, car la déserialisation nécessite que ces *enums* puissent être " +#~ "importés depuis ce module." + +#~ msgid "" +#~ "With pickle protocol version 4 it is possible to easily pickle enums " +#~ "nested in other classes." +#~ msgstr "" +#~ "Depuis la version 4 du protocole de *pickle*, il est possible de " +#~ "sérialiser facilement des *enums* imbriqués dans d'autres classes." + +#~ msgid "" +#~ "It is possible to modify how Enum members are pickled/unpickled by " +#~ "defining :meth:`__reduce_ex__` in the enumeration class." +#~ msgstr "" +#~ "Redéfinir la méthode :meth:`__reduce_ex__` permet de modifier la " +#~ "sérialisation ou la dé-sérialisation des membres d'une énumération." + +#~ msgid "Functional API" +#~ msgstr "API par fonction" + +#~ msgid "" +#~ "The :class:`Enum` class is callable, providing the following functional " +#~ "API::" +#~ msgstr "" +#~ "La :class:`Enum` est appelable et implémente l'API par fonction " +#~ "suivante ::" + +#~ msgid "" +#~ "The semantics of this API resemble :class:`~collections.namedtuple`. The " +#~ "first argument of the call to :class:`Enum` is the name of the " +#~ "enumeration." +#~ msgstr "" +#~ "La sémantique de cette API est similaire à :class:`~collections." +#~ "namedtuple`. Le premier argument de l'appel à :class:`Enum` est le nom de " +#~ "l'énumération." + +#~ msgid "" +#~ "The second argument is the *source* of enumeration member names. It can " +#~ "be a whitespace-separated string of names, a sequence of names, a " +#~ "sequence of 2-tuples with key/value pairs, or a mapping (e.g. dictionary) " +#~ "of names to values. The last two options enable assigning arbitrary " +#~ "values to enumerations; the others auto-assign increasing integers " +#~ "starting with 1 (use the ``start`` parameter to specify a different " +#~ "starting value). A new class derived from :class:`Enum` is returned. In " +#~ "other words, the above assignment to :class:`Animal` is equivalent to::" +#~ msgstr "" +#~ "Le second argument est la *source* des noms des membres de l'énumération. " +#~ "Il peut être une chaîne de caractères contenant les noms séparés par des " +#~ "espaces, une séquence de noms, une séquence de couples clé / valeur ou un " +#~ "dictionnaire (p. ex. un *dict*) de valeurs indexées par des noms. Les " +#~ "deux dernières options permettent d'affecter des valeurs arbitraires aux " +#~ "énumérations ; les autres affectent automatiquement des entiers en " +#~ "commençant par 1 (le paramètre ``start`` permet de changer la valeur de " +#~ "départ). Ceci renvoie une nouvelle classe dérivée de :class:`Enum`. En " +#~ "d'autres termes, la déclaration de :class:`Animal` ci-dessus équivaut à ::" + +#~ msgid "" +#~ "The reason for defaulting to ``1`` as the starting number and not ``0`` " +#~ "is that ``0`` is ``False`` in a boolean sense, but enum members all " +#~ "evaluate to ``True``." +#~ msgstr "" +#~ "La valeur de départ par défaut est ``1`` et non ``0`` car ``0`` au sens " +#~ "booléen vaut ``False`` alors que tous les membres d'une *enum* valent " +#~ "``True``." + +#~ msgid "" +#~ "Pickling enums created with the functional API can be tricky as frame " +#~ "stack implementation details are used to try and figure out which module " +#~ "the enumeration is being created in (e.g. it will fail if you use a " +#~ "utility function in separate module, and also may not work on IronPython " +#~ "or Jython). The solution is to specify the module name explicitly as " +#~ "follows::" +#~ msgstr "" +#~ "La sérialisation d'énumérations créées avec l'API en fonction peut être " +#~ "source de problèmes, car celle-ci repose sur des détails d'implémentation " +#~ "de l'affichage de la pile d'appel pour tenter de déterminer dans quel " +#~ "module l'énumération est créée (p. ex. elle échouera avec les fonctions " +#~ "utilitaires provenant d'un module séparé et peut ne pas fonctionner avec " +#~ "IronPython ou Jython). La solution consiste à préciser explicitement le " +#~ "nom du module comme ceci ::" + +#~ msgid "" +#~ "If ``module`` is not supplied, and Enum cannot determine what it is, the " +#~ "new Enum members will not be unpicklable; to keep errors closer to the " +#~ "source, pickling will be disabled." +#~ msgstr "" +#~ "Si ``module`` n'est pas fourni et que *Enum* ne peut pas le deviner, les " +#~ "nouveaux membres de *l'Enum* ne seront pas déserialisables ; pour garder " +#~ "les erreurs au plus près de leur origine, la sérialisation sera " +#~ "désactivée." + +#~ msgid "" +#~ "The new pickle protocol 4 also, in some circumstances, relies on :attr:" +#~ "`~definition.__qualname__` being set to the location where pickle will be " +#~ "able to find the class. For example, if the class was made available in " +#~ "class SomeData in the global scope::" +#~ msgstr "" +#~ "Le nouveau protocole version 4 de *pickle* se base lui aussi, dans " +#~ "certains cas, sur le fait que :attr:`~definition.__qualname__` pointe sur " +#~ "l'endroit où *pickle* peut trouver la classe. Par exemple, si la classe " +#~ "était disponible depuis la classe *SomeData* dans l'espace de nom de plus " +#~ "haut niveau ::" + +#~ msgid "The complete signature is::" +#~ msgstr "La signature complète est la suivante ::" + +#~ msgid "What the new Enum class will record as its name." +#~ msgstr "Le nom de la la nouvelle classe *Enum*." + +#~ msgid "" +#~ "The Enum members. This can be a whitespace or comma separated string " +#~ "(values will start at 1 unless otherwise specified)::" +#~ msgstr "" +#~ "Les membres de l'énumération. Une chaîne de caractères séparés par des " +#~ "espaces ou des virgules (la valeur de départ est fixée à 1, sauf si " +#~ "spécifiée autrement) ::" + +#~ msgid "or an iterator of names::" +#~ msgstr "ou un itérateur sur les noms ::" + +#~ msgid "or an iterator of (name, value) pairs::" +#~ msgstr "ou un itérateur sur les *n*-uplets (nom, valeur) ::" + +#~ msgid "or a mapping::" +#~ msgstr "ou une correspondance ::" + +#~ msgid "where in module new Enum class can be found." +#~ msgstr "localisation de la nouvelle classe *Enum* dans le module." + +#~ msgid "type to mix in to new Enum class." +#~ msgstr "le type à mélanger dans la nouvelle classe *Enum*." + +#~ msgid "number to start counting at if only names are passed in." +#~ msgstr "index de départ si uniquement des noms sont passés." + +#~ msgid "The *start* parameter was added." +#~ msgstr "Ajout du paramètre *start*." + +#~ msgid "" +#~ "The first variation of :class:`Enum` that is provided is also a subclass " +#~ "of :class:`int`. Members of an :class:`IntEnum` can be compared to " +#~ "integers; by extension, integer enumerations of different types can also " +#~ "be compared to each other::" +#~ msgstr "" +#~ "La première version dérivée de :class:`Enum` qui existe est aussi une " +#~ "sous-classe de :class:`int`. Les membres de :class:`IntEnum` peuvent être " +#~ "comparés à des entiers et, par extension, les comparaisons entre des " +#~ "énumérations entières de type différent sont possibles ::" + +#~ msgid "" +#~ "However, they still can't be compared to standard :class:`Enum` " +#~ "enumerations::" +#~ msgstr "" +#~ "Elles ne peuvent cependant toujours pas être comparées à des énumérations " +#~ "standards de :class:`Enum` ::" + +#~ msgid "" +#~ ":class:`IntEnum` values behave like integers in other ways you'd expect::" +#~ msgstr "" +#~ "Les valeurs de :class:`IntEnum` se comportent comme des entiers, comme on " +#~ "pouvait s'y attendre ::" + +#~ msgid "IntFlag" +#~ msgstr "IntFlag" + +#~ msgid "" +#~ "The next variation of :class:`Enum` provided, :class:`IntFlag`, is also " +#~ "based on :class:`int`. The difference being :class:`IntFlag` members can " +#~ "be combined using the bitwise operators (&, \\|, ^, ~) and the result is " +#~ "still an :class:`IntFlag` member. However, as the name implies, :class:" +#~ "`IntFlag` members also subclass :class:`int` and can be used wherever an :" +#~ "class:`int` is used. Any operation on an :class:`IntFlag` member besides " +#~ "the bit-wise operations will lose the :class:`IntFlag` membership." +#~ msgstr "" +#~ "La version dérivée suivante de :class:`Enum` est :class:`IntFlag`. Elle " +#~ "est aussi basée sur :class:`int`, à la différence près que les membres " +#~ "de :class:`IntFlag` peuvent être combinés en utilisant les opérateurs bit-" +#~ "à-bit (&, \\|, ^, ~) et que le résultat reste un membre de :class:" +#~ "`IntFlag`. Cependant, comme le nom l'indique, les membres d'une classe :" +#~ "class:`IntFlag` héritent aussi de :class:`int` et peuvent être utilisés " +#~ "là où un :class:`int` est utilisé. Toute opération sur un membre d'une " +#~ "classe :class:`IntFlag`, autre qu'un opérateur bit-à-bit lui fait perdre " +#~ "sa qualité de :class:`IntFlag`." + +#~ msgid "It is also possible to name the combinations::" +#~ msgstr "Il est aussi possible de nommer les combinaisons ::" + +#~ msgid "" +#~ "Another important difference between :class:`IntFlag` and :class:`Enum` " +#~ "is that if no flags are set (the value is 0), its boolean evaluation is :" +#~ "data:`False`::" +#~ msgstr "" +#~ "Une autre différence importante entre :class:`IntFlag` et :class:`Enum` " +#~ "est que, si aucune option n'est activée (la valeur vaut 0), son " +#~ "évaluation booléenne est :data:`False` ::" + +#~ msgid "" +#~ "Because :class:`IntFlag` members are also subclasses of :class:`int` they " +#~ "can be combined with them::" +#~ msgstr "" +#~ "Comme les membres d'une classe :class:`IntFlag` héritent aussi de :class:" +#~ "`int`, ils peuvent être combinés avec eux ::" + +#~ msgid "Flag" +#~ msgstr "Option" + +#~ msgid "" +#~ "The last variation is :class:`Flag`. Like :class:`IntFlag`, :class:" +#~ "`Flag` members can be combined using the bitwise operators (&, \\|, ^, " +#~ "~). Unlike :class:`IntFlag`, they cannot be combined with, nor compared " +#~ "against, any other :class:`Flag` enumeration, nor :class:`int`. While it " +#~ "is possible to specify the values directly it is recommended to use :" +#~ "class:`auto` as the value and let :class:`Flag` select an appropriate " +#~ "value." +#~ msgstr "" +#~ "La dernière version dérivée est la classe :class:`Flag`. Comme :class:" +#~ "`IntFlag`, les membres d'une classe :class:`Flag` peuvent être combinés " +#~ "en utilisant les opérateurs de comparaison bit-à-bit. Cependant, à la " +#~ "différence de :class:`IntFlag`, ils ne peuvent ni être combinés, ni être " +#~ "comparés avec une autre énumération :class:`Flag`, ni avec :class:`int`. " +#~ "Bien qu'il soit possible de définir directement les valeurs, il est " +#~ "recommandé d'utiliser :class:`auto` comme valeur et de laisser :class:" +#~ "`Flag` choisir une valeur appropriée." + +#~ msgid "" +#~ "Like :class:`IntFlag`, if a combination of :class:`Flag` members results " +#~ "in no flags being set, the boolean evaluation is :data:`False`::" +#~ msgstr "" +#~ "Comme avec :class:`IntFlag`, si une combinaison de membres d'une classe :" +#~ "class:`Flag` n'active aucune option, l'évaluation booléenne de la " +#~ "comparaison est :data:`False` ::" + +#~ msgid "" +#~ "Individual flags should have values that are powers of two (1, 2, 4, " +#~ "8, ...), while combinations of flags won't::" +#~ msgstr "" +#~ "Les options de base doivent avoir des puissances de deux pour valeurs (1, " +#~ "2, 4, 8, ...) mais pas les combinaisons ::" + +#~ msgid "" +#~ "Giving a name to the \"no flags set\" condition does not change its " +#~ "boolean value::" +#~ msgstr "" +#~ "Donner un nom à la valeur « aucune option activée » ne change pas sa " +#~ "valeur booléenne ::" + +#~ msgid "" +#~ "For the majority of new code, :class:`Enum` and :class:`Flag` are " +#~ "strongly recommended, since :class:`IntEnum` and :class:`IntFlag` break " +#~ "some semantic promises of an enumeration (by being comparable to " +#~ "integers, and thus by transitivity to other unrelated enumerations). :" +#~ "class:`IntEnum` and :class:`IntFlag` should be used only in cases where :" +#~ "class:`Enum` and :class:`Flag` will not do; for example, when integer " +#~ "constants are replaced with enumerations, or for interoperability with " +#~ "other systems." +#~ msgstr "" +#~ "Dans la plupart des cas, il est fortement recommandé d'utiliser :class:" +#~ "`Enum` et :class:`Flag` pour écrire du code nouveau, car :class:`IntEnum` " +#~ "et :class:`IntFlag` violent certains principes sémantiques d'une " +#~ "énumération (en pouvant être comparées à des entiers et donc, par " +#~ "transitivité, à d'autres énumérations). :class:`IntEnum` et :class:" +#~ "`IntFlag` ne doivent être utilisées que dans les cas où :class:`Enum` et :" +#~ "class:`Flag` ne suffisent pas ; par exemple quand des constantes entières " +#~ "sont remplacées par des énumérations, ou pour l’interopérabilité avec " +#~ "d'autres systèmes." + +#~ msgid "Others" +#~ msgstr "Autres" + +#~ msgid "" +#~ "While :class:`IntEnum` is part of the :mod:`enum` module, it would be " +#~ "very simple to implement independently::" +#~ msgstr "" +#~ "Bien que :class:`IntEnum` fasse partie du module :mod:`enum`, elle serait " +#~ "très simple à implémenter hors de ce module ::" + +#~ msgid "" +#~ "This demonstrates how similar derived enumerations can be defined; for " +#~ "example a :class:`StrEnum` that mixes in :class:`str` instead of :class:" +#~ "`int`." +#~ msgstr "" +#~ "Ceci montre comment définir des énumérations dérivées similaires ; par " +#~ "exemple une classe :class:`StrEnum` qui dériverait de :class:`str` au " +#~ "lieu de :class:`int`." + +#~ msgid "Some rules:" +#~ msgstr "Quelques règles :" + +#~ msgid "" +#~ "When subclassing :class:`Enum`, mix-in types must appear before :class:" +#~ "`Enum` itself in the sequence of bases, as in the :class:`IntEnum` " +#~ "example above." +#~ msgstr "" +#~ "Pour hériter de :class:`Enum`, les types de mélange doivent être placés " +#~ "avant la classe :class:`Enum` elle-même dans la liste des classes de " +#~ "base, comme dans l'exemple de :class:`IntEnum` ci-dessus." + +#~ msgid "" +#~ "While :class:`Enum` can have members of any type, once you mix in an " +#~ "additional type, all the members must have values of that type, e.g. :" +#~ "class:`int` above. This restriction does not apply to mix-ins which only " +#~ "add methods and don't specify another type." +#~ msgstr "" +#~ "Même si une classe :class:`Enum` peut avoir des membres de n'importe quel " +#~ "type, dès qu'un type est spécifié à la déclaration de la classe, alors " +#~ "tous les membres doivent être de ce type, p. ex. :class:`int` ci-dessus. " +#~ "Cette restriction ne s'applique pas aux classes dérivées qui n'ajoutent " +#~ "que des méthodes supplémentaires sans spécifier un type de données." + +#~ msgid "" +#~ "When another data type is mixed in, the :attr:`value` attribute is *not " +#~ "the same* as the enum member itself, although it is equivalent and will " +#~ "compare equal." +#~ msgstr "" +#~ "Quand un autre type de données est mélangé, l'attribut :attr:`value` " +#~ "n'est *pas* identique au membre de l'énumération lui-même, bien qu'ils " +#~ "soient équivalents et égaux en comparaison." + +#~ msgid "" +#~ "%-style formatting: `%s` and `%r` call the :class:`Enum` class's :meth:" +#~ "`__str__` and :meth:`__repr__` respectively; other codes (such as `%i` or " +#~ "`%h` for IntEnum) treat the enum member as its mixed-in type." +#~ msgstr "" +#~ "Formatage de style *%* : `%s` et `%r` appellent respectivement les " +#~ "méthodes :meth:`__str__` et :meth:`__repr__` de la classe :class:`Enum` ; " +#~ "les autres codes, comme `%i` ou `%h` pour *IntEnum*, s'appliquent au " +#~ "membre comme si celui-ci était converti en son type de mélange." + +#~ msgid "" +#~ ":ref:`Formatted string literals `, :meth:`str.format`, and :" +#~ "func:`format` will use the mixed-in type's :meth:`__format__` unless :" +#~ "meth:`__str__` or :meth:`__format__` is overridden in the subclass, in " +#~ "which case the overridden methods or :class:`Enum` methods will be used. " +#~ "Use the !s and !r format codes to force usage of the :class:`Enum` " +#~ "class's :meth:`__str__` and :meth:`__repr__` methods." +#~ msgstr "" +#~ "Les :ref:`chaînes littérales formatées ` : :meth:`str.format` " +#~ "et :func:`format` appellent la méthode :meth:`__format__` du type dérivé " +#~ "à moins que :meth:`__str__` ou :meth:`__format__` soit surchargée dans la " +#~ "sous-classe, auquel cas les méthodes surchargées ou celles de la classe :" +#~ "class:`Enum` seront utilisées. Pour appeler les méthodes :meth:`__str__` " +#~ "ou :meth:`__repr__` de la classe :class:`Enum`, il faut utiliser les " +#~ "codes de formatage ``!s`` ou ``!r``." + +#~ msgid "When to use :meth:`__new__` vs. :meth:`__init__`" +#~ msgstr "Quand utiliser :meth:`__new__` ou :meth:`__init__`" + +#~ msgid "" +#~ ":meth:`__new__` must be used whenever you want to customize the actual " +#~ "value of the :class:`Enum` member. Any other modifications may go in " +#~ "either :meth:`__new__` or :meth:`__init__`, with :meth:`__init__` being " +#~ "preferred." +#~ msgstr "" +#~ ":meth:`__new__` doit être utilisé dès que vous souhaitez personnaliser la " +#~ "valeur effective des membres d'un :class:`Enum`. Tout autre modification " +#~ "peut autant aller dans :meth:`__new__` que dans :meth:`__init__`, mais " +#~ "l'usage de :meth:`__init__` est recommandé." + +#~ msgid "" +#~ "For example, if you want to pass several items to the constructor, but " +#~ "only want one of them to be the value::" +#~ msgstr "" +#~ "Par exemple, si vous voulez passer plusieurs éléments au constructeur, " +#~ "mais qu'un seul d'entre eux soit la valeur ::" + +#~ msgid "Interesting examples" +#~ msgstr "Exemples intéressants" + +#~ msgid "" +#~ "While :class:`Enum`, :class:`IntEnum`, :class:`IntFlag`, and :class:" +#~ "`Flag` are expected to cover the majority of use-cases, they cannot cover " +#~ "them all. Here are recipes for some different types of enumerations that " +#~ "can be used directly, or as examples for creating one's own." +#~ msgstr "" +#~ "Bien que :class:`Enum`, :class:`IntEnum`, :class:`IntFlag` et :class:" +#~ "`Flag` soient conçues pour répondre à la majorité des besoins, elles ne " +#~ "peuvent répondre à tous. Voici quelques recettes d'énumération qui " +#~ "peuvent être réutilisées telles quelles, ou peuvent servir d'exemple pour " +#~ "développer vos propres énumérations." + +#~ msgid "Omitting values" +#~ msgstr "Omettre les valeurs" + +#~ msgid "" +#~ "In many use-cases one doesn't care what the actual value of an " +#~ "enumeration is. There are several ways to define this type of simple " +#~ "enumeration:" +#~ msgstr "" +#~ "Dans de nombreux cas, la valeur réelle de l'énumération n'a pas " +#~ "d'importance. Il y a plusieurs façons de définir ce type d'énumération " +#~ "simple :" + +#~ msgid "use instances of :class:`auto` for the value" +#~ msgstr "affecter des instances de :class:`auto` aux valeurs" + +#~ msgid "use instances of :class:`object` as the value" +#~ msgstr "affecter des instances de :class:`object` aux valeurs" + +#~ msgid "use a descriptive string as the value" +#~ msgstr "affecter des chaînes de caractères aux valeurs pour les décrire" + +#~ msgid "" +#~ "use a tuple as the value and a custom :meth:`__new__` to replace the " +#~ "tuple with an :class:`int` value" +#~ msgstr "" +#~ "affecter un *n*-uplet aux valeurs et définir une méthode :meth:`__new__` " +#~ "pour remplacer les *n*-uplets avec un :class:`int`" + +#~ msgid "" +#~ "Using any of these methods signifies to the user that these values are " +#~ "not important, and also enables one to add, remove, or reorder members " +#~ "without having to renumber the remaining members." +#~ msgstr "" +#~ "Utiliser une de ces méthodes indique à l'utilisateur que les valeurs " +#~ "n'ont pas d'importance. Cela permet aussi d'ajouter, de supprimer ou de " +#~ "ré-ordonner les membres sans avoir à ré-énumérer les membres existants." + +#~ msgid "" +#~ "Whichever method you choose, you should provide a :meth:`repr` that also " +#~ "hides the (unimportant) value::" +#~ msgstr "" +#~ "Quelle que soit la méthode choisie, il faut fournir une méthode :meth:" +#~ "`repr` qui masque les valeurs (pas importantes de toute façon) ::" + +#~ msgid "Using :class:`auto` would look like::" +#~ msgstr "On utilise :class:`auto` de la manière suivante ::" + +#~ msgid "Using :class:`object`" +#~ msgstr "Avec :class:`object`" + +#~ msgid "Using :class:`object` would look like::" +#~ msgstr "On utilise :class:`object` de la manière suivante ::" + +#~ msgid "Using a descriptive string" +#~ msgstr "Avec une chaîne de caractères de description" + +#~ msgid "Using a string as the value would look like::" +#~ msgstr "On utilise une chaîne de caractères de la manière suivante ::" + +#~ msgid "Using a custom :meth:`__new__`" +#~ msgstr "Avec une méthode ad-hoc :meth:`__new__`" + +#~ msgid "Using an auto-numbering :meth:`__new__` would look like::" +#~ msgstr "" +#~ "On utilise une méthode :meth:`__new__` d'énumération de la manière " +#~ "suivante ::" + +#~ msgid "" +#~ "To make a more general purpose ``AutoNumber``, add ``*args`` to the " +#~ "signature::" +#~ msgstr "" +#~ "Pour définir un ``AutoNumber`` plus générique, ajoutez ``*args`` à la " +#~ "signature ::" + +#~ msgid "" +#~ "Then when you inherit from ``AutoNumber`` you can write your own " +#~ "``__init__`` to handle any extra arguments::" +#~ msgstr "" +#~ "Ainsi, quand vous héritez d'``AutoNumber``, vous pouvez définir " +#~ "``__init__`` pour gérer tout argument supplémentaire ::" + +#~ msgid "" +#~ "The :meth:`__new__` method, if defined, is used during creation of the " +#~ "Enum members; it is then replaced by Enum's :meth:`__new__` which is used " +#~ "after class creation for lookup of existing members." +#~ msgstr "" +#~ "La méthode :meth:`__new__`, si définie, est appelée à la création des " +#~ "membres de l'énumération ; elle est ensuite remplacée par la méthode :" +#~ "meth:`__new__` de *Enum*, qui est utilisée après la création de la classe " +#~ "pour la recherche des membres existants." + +#~ msgid "OrderedEnum" +#~ msgstr "OrderedEnum" + +#~ msgid "" +#~ "An ordered enumeration that is not based on :class:`IntEnum` and so " +#~ "maintains the normal :class:`Enum` invariants (such as not being " +#~ "comparable to other enumerations)::" +#~ msgstr "" +#~ "Une énumération ordonnée qui n'est pas basée sur :class:`IntEnum` et qui, " +#~ "par conséquent, respecte les invariants classiques de :class:`Enum` " +#~ "(comme par exemple l'impossibilité de pouvoir être comparée à d'autres " +#~ "énumérations) ::" + +#~ msgid "DuplicateFreeEnum" +#~ msgstr "DuplicateFreeEnum" + +#~ msgid "" +#~ "Raises an error if a duplicate member name is found instead of creating " +#~ "an alias::" +#~ msgstr "" +#~ "Lève une erreur si un membre est dupliqué, plutôt que de créer un alias ::" + +#~ msgid "" +#~ "This is a useful example for subclassing Enum to add or change other " +#~ "behaviors as well as disallowing aliases. If the only desired change is " +#~ "disallowing aliases, the :func:`unique` decorator can be used instead." +#~ msgstr "" +#~ "Cet exemple d'héritage de *Enum* est intéressant pour ajouter ou modifier " +#~ "des comportements comme interdire les alias. Si vous ne souhaitez " +#~ "qu'interdire les alias, il suffit d'utiliser le décorateur :func:`unique`." + +#~ msgid "Planet" +#~ msgstr "Planet" + +#~ msgid "" +#~ "If :meth:`__new__` or :meth:`__init__` is defined the value of the enum " +#~ "member will be passed to those methods::" +#~ msgstr "" +#~ "Si :meth:`__new__` ou :meth:`__init__` sont définies, la valeur du membre " +#~ "de l'énumération sera passée à ces méthodes ::" + +#~ msgid "TimePeriod" +#~ msgstr "TimePeriod" + +#~ msgid "An example to show the :attr:`_ignore_` attribute in use::" +#~ msgstr "Exemple d'utilisation de l'attribut :attr:`_ignore_` ::" + +#~ msgid "How are Enums different?" +#~ msgstr "En quoi les *Enums* sont différentes ?" + +#~ msgid "" +#~ "Enums have a custom metaclass that affects many aspects of both derived " +#~ "Enum classes and their instances (members)." +#~ msgstr "" +#~ "Les *enums* ont une métaclasse spéciale qui affecte de nombreux aspects " +#~ "des classes dérivées de *Enum* et de leurs instances (membres)." + +#~ msgid "Enum Classes" +#~ msgstr "Classes *Enum*" + +#~ msgid "" +#~ "The :class:`EnumMeta` metaclass is responsible for providing the :meth:" +#~ "`__contains__`, :meth:`__dir__`, :meth:`__iter__` and other methods that " +#~ "allow one to do things with an :class:`Enum` class that fail on a typical " +#~ "class, such as `list(Color)` or `some_enum_var in Color`. :class:" +#~ "`EnumMeta` is responsible for ensuring that various other methods on the " +#~ "final :class:`Enum` class are correct (such as :meth:`__new__`, :meth:" +#~ "`__getnewargs__`, :meth:`__str__` and :meth:`__repr__`)." +#~ msgstr "" +#~ "La métaclasse :class:`EnumMeta` se charge de fournir les méthodes :meth:" +#~ "`__contains__`, :meth:`__dir__`, :meth:`__iter__` etc. qui permettent de " +#~ "faire des opérations sur une classe :class:`Enum` qui ne fonctionneraient " +#~ "pas sur une classe standard, comme `list(Color)` ou `some_enum_var in " +#~ "Color`. :class:`EnumMeta` garantit que les autres méthodes de la classe " +#~ "finale :class:`Enum` sont correctes (comme :meth:`__new__`, :meth:" +#~ "`__getnewargs__`, :meth:`__str__` et :meth:`__repr__`)." + +#~ msgid "Enum Members (aka instances)" +#~ msgstr "Membres d'Enum (c.-à-d. instances)" + +#~ msgid "" +#~ "The most interesting thing about Enum members is that they are " +#~ "singletons. :class:`EnumMeta` creates them all while it is creating the :" +#~ "class:`Enum` class itself, and then puts a custom :meth:`__new__` in " +#~ "place to ensure that no new ones are ever instantiated by returning only " +#~ "the existing member instances." +#~ msgstr "" +#~ "Il est intéressant de souligner que les membres d'une *Enum* sont des " +#~ "singletons. La classe :class:`EnumMeta` les crée tous au moment de la " +#~ "création de la classe :class:`Enum` elle-même et implémente une méthode :" +#~ "meth:`__new__` spécifique. Cette méthode renvoie toujours les instances " +#~ "de membres déjà existantes pour être sûr de ne jamais en instancier de " +#~ "nouvelles." + +#~ msgid "Finer Points" +#~ msgstr "Aspects approfondis" + +#~ msgid "" +#~ "To help keep Python 2 / Python 3 code in sync an :attr:`_order_` " +#~ "attribute can be provided. It will be checked against the actual order " +#~ "of the enumeration and raise an error if the two do not match::" +#~ msgstr "" +#~ "Pour faciliter la transition de Python 2 en Python 3, l'attribut :attr:" +#~ "`_order_` peut être défini. Il sera comparé au véritable ordre de " +#~ "l'énumération et lève une erreur si les deux ne correspondent pas ::" + +#~ msgid "" +#~ "In Python 2 code the :attr:`_order_` attribute is necessary as definition " +#~ "order is lost before it can be recorded." +#~ msgstr "" +#~ "En Python 2, l'attribut :attr:`_order_` est indispensable car l'ordre de " +#~ "la définition est perdu avant de pouvoir être enregistré." + +#~ msgid "_Private__names" +#~ msgstr "_Noms__privés" + +#~ msgid "" +#~ ":ref:`Private names ` will be normal attributes in " +#~ "Python 3.11 instead of either an error or a member (depending on if the " +#~ "name ends with an underscore). Using these names in 3.10 will issue a :" +#~ "exc:`DeprecationWarning`." +#~ msgstr "" +#~ "Les :ref:`noms privés ` seront des attributs " +#~ "habituels avec Python 3.11 et non plus des erreurs ou membres (selon si " +#~ "le nom termine par tiret bas ou non). Utiliser ces noms avec Python 3.10 " +#~ "lèvera un :exc:`DeprecationWarning`." + +#~ msgid "``Enum`` member type" +#~ msgstr "Type des membres de ``Enum``" + +#~ msgid "" +#~ ":class:`Enum` members are instances of their :class:`Enum` class, and are " +#~ "normally accessed as ``EnumClass.member``. Under certain circumstances " +#~ "they can also be accessed as ``EnumClass.member.member``, but you should " +#~ "never do this as that lookup may fail or, worse, return something besides " +#~ "the :class:`Enum` member you are looking for (this is another good reason " +#~ "to use all-uppercase names for members)::" +#~ msgstr "" +#~ "Les membres de :class:`Enum` sont des instances de leur classe :class:" +#~ "`Enum`. On y accède normalement par ``ClasseEnum.membre``. Dans certains " +#~ "cas, on peut également y accéder par ``ClasseEnum.membre.membre``, mais " +#~ "ceci est fortement déconseillé car cette indirection est susceptible " +#~ "d'échouer, ou pire, de ne pas renvoyer le membre de la classe :class:" +#~ "`Enum` désiré (c'est une autre bonne raison pour définir tous les noms " +#~ "des membres en majuscules) ::" + +#~ msgid "This behavior is deprecated and will be removed in 3.11." +#~ msgstr "Ce comportement est obsolète et sera retiré en 3.11." + +#~ msgid "Boolean value of ``Enum`` classes and members" +#~ msgstr "Valeur booléenne des classes ``Enum`` et de leurs membres" + +#~ msgid "" +#~ ":class:`Enum` members that are mixed with non-:class:`Enum` types (such " +#~ "as :class:`int`, :class:`str`, etc.) are evaluated according to the mixed-" +#~ "in type's rules; otherwise, all members evaluate as :data:`True`. To " +#~ "make your own Enum's boolean evaluation depend on the member's value add " +#~ "the following to your class::" +#~ msgstr "" +#~ "Les membres d'une classe :class:`Enum` mélangée avec un type non dérivé " +#~ "de :class:`Enum` (comme :class:`int`, :class:`str`, etc.) sont évalués " +#~ "selon les règles du type de mélange. Sinon, tous les membres valent :data:" +#~ "`True`. Pour faire dépendre l'évaluation booléenne de votre propre *Enum* " +#~ "de la valeur du membre, il faut ajouter le code suivant à votre classe ::" + +#~ msgid ":class:`Enum` classes always evaluate as :data:`True`." +#~ msgstr "Les classes :class:`Enum` valent toujours :data:`True`." + +#~ msgid "``Enum`` classes with methods" +#~ msgstr "Classes ``Enum`` avec des méthodes" + +#~ msgid "" +#~ "If you give your :class:`Enum` subclass extra methods, like the `Planet`_ " +#~ "class above, those methods will show up in a :func:`dir` of the member, " +#~ "but not of the class::" +#~ msgstr "" +#~ "Si votre classe :class:`Enum` contient des méthodes supplémentaires, " +#~ "comme la classe `Planet`_ ci-dessus, elles s'afficheront avec un appel à :" +#~ "func:`dir` sur le membre, mais pas avec un appel sur la classe ::" + +#~ msgid "Combining members of ``Flag``" +#~ msgstr "Combinaison de membres de ``Flag``" + +#~ msgid "" +#~ "If a combination of Flag members is not named, the :func:`repr` will " +#~ "include all named flags and all named combinations of flags that are in " +#~ "the value::" +#~ msgstr "" +#~ "Si une valeur issue de la combinaison de membres de *Flag* n'est pas " +#~ "associée explicitement à un membre, la fonction :func:`repr` inclut tous " +#~ "les membres et toutes les combinaisons de membres présents dans cette " +#~ "valeur ::" + +#~ msgid "" +#~ "In 3.11 unnamed combinations of flags will only produce the canonical " +#~ "flag members (aka single-value flags). So ``Color(7)`` will produce " +#~ "something like ````." +#~ msgstr "" +#~ "En 3.11, les combinaisons non-nommées de ``Flag`` ne renverront que les " +#~ "*flags* canoniques (*flags* associés à une unique valeur). Donc " +#~ "``Color(7)`` renverra ````." diff --git a/library/errno.po b/library/errno.po index 8fbcdbf3ad..7f52d12b7f 100644 --- a/library/errno.po +++ b/library/errno.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2019-06-10 15:48+0200\n" "Last-Translator: Dylan Gouin \n" "Language-Team: FRENCH \n" @@ -20,10 +20,11 @@ msgid ":mod:`errno` --- Standard errno system symbols" msgstr ":mod:`errno` — Symboles du système *errno* standard" #: library/errno.rst:9 +#, fuzzy msgid "" "This module makes available standard ``errno`` system symbols. The value of " "each symbol is the corresponding integer value. The names and descriptions " -"are borrowed from :file:`linux/include/errno.h`, which should be pretty all-" +"are borrowed from :file:`linux/include/errno.h`, which should be all-" "inclusive." msgstr "" "Ce module met à disposition des symboles du système standard ``errno``. La " @@ -61,495 +62,606 @@ msgstr "" "symboles disponibles font partie de cette liste :" #: library/errno.rst:30 -msgid "Operation not permitted" -msgstr "Opération interdite" - -#: library/errno.rst:35 -msgid "No such file or directory" -msgstr "Fichier ou répertoire inexistant" +#, fuzzy +msgid "" +"Operation not permitted. This error is mapped to the exception :exc:" +"`PermissionError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:40 -msgid "No such process" -msgstr "Processus inexistant" +#: library/errno.rst:36 +#, fuzzy +msgid "" +"No such file or directory. This error is mapped to the exception :exc:" +"`FileNotFoundError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:45 -msgid "Interrupted system call." -msgstr "Appel système interrompu" +#: library/errno.rst:42 +#, fuzzy +msgid "" +"No such process. This error is mapped to the exception :exc:" +"`ProcessLookupError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:48 -msgid "This error is mapped to the exception :exc:`InterruptedError`." +#, fuzzy +msgid "" +"Interrupted system call. This error is mapped to the exception :exc:" +"`InterruptedError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:53 +#: library/errno.rst:54 msgid "I/O error" msgstr "Erreur d'entrée-sortie" -#: library/errno.rst:58 +#: library/errno.rst:59 msgid "No such device or address" msgstr "Dispositif ou adresse inexistant" -#: library/errno.rst:63 +#: library/errno.rst:64 msgid "Arg list too long" msgstr "Liste d'arguments trop longue" -#: library/errno.rst:68 +#: library/errno.rst:69 msgid "Exec format error" msgstr "Erreur de format d'exécution" -#: library/errno.rst:73 +#: library/errno.rst:74 msgid "Bad file number" msgstr "Mauvais descripteur de fichier" -#: library/errno.rst:78 -msgid "No child processes" -msgstr "Pas de processus fils" +#: library/errno.rst:79 +#, fuzzy +msgid "" +"No child processes. This error is mapped to the exception :exc:" +"`ChildProcessError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:83 -msgid "Try again" -msgstr "Ressource temporairement indisponible (réessayez)" +#: library/errno.rst:85 +#, fuzzy +msgid "" +"Try again. This error is mapped to the exception :exc:`BlockingIOError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:88 +#: library/errno.rst:90 msgid "Out of memory" msgstr "Mémoire insuffisante" -#: library/errno.rst:93 -msgid "Permission denied" -msgstr "Autorisation refusée" +#: library/errno.rst:95 +#, fuzzy +msgid "" +"Permission denied. This error is mapped to the exception :exc:" +"`PermissionError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:98 +#: library/errno.rst:101 msgid "Bad address" msgstr "Mauvaise adresse" -#: library/errno.rst:103 +#: library/errno.rst:106 msgid "Block device required" msgstr "Dispositif de bloc requis" -#: library/errno.rst:108 +#: library/errno.rst:111 msgid "Device or resource busy" msgstr "Dispositif ou ressource occupé" -#: library/errno.rst:113 -msgid "File exists" -msgstr "Fichier déjà existant" +#: library/errno.rst:116 +#, fuzzy +msgid "" +"File exists. This error is mapped to the exception :exc:`FileExistsError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:118 +#: library/errno.rst:122 msgid "Cross-device link" msgstr "Lien inapproprié" -#: library/errno.rst:123 +#: library/errno.rst:127 msgid "No such device" msgstr "Dispositif inexistant" -#: library/errno.rst:128 -msgid "Not a directory" -msgstr "Pas un répertoire" - -#: library/errno.rst:133 -msgid "Is a directory" -msgstr "Est un répertoire" +#: library/errno.rst:132 +#, fuzzy +msgid "" +"Not a directory. This error is mapped to the exception :exc:" +"`NotADirectoryError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:138 +#, fuzzy +msgid "" +"Is a directory. This error is mapped to the exception :exc:" +"`IsADirectoryError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." + +#: library/errno.rst:144 msgid "Invalid argument" msgstr "Argument invalide" -#: library/errno.rst:143 +#: library/errno.rst:149 msgid "File table overflow" msgstr "Plus de descripteur de fichier disponible" -#: library/errno.rst:148 +#: library/errno.rst:154 msgid "Too many open files" msgstr "Trop de fichiers ouverts" -#: library/errno.rst:153 +#: library/errno.rst:159 msgid "Not a typewriter" msgstr "Opération de contrôle d'entrée-sortie invalide" -#: library/errno.rst:158 +#: library/errno.rst:164 msgid "Text file busy" msgstr "Fichier texte occupé" -#: library/errno.rst:163 +#: library/errno.rst:169 msgid "File too large" msgstr "Fichier trop grand" -#: library/errno.rst:168 +#: library/errno.rst:174 msgid "No space left on device" msgstr "Plus de place sur le dispositif" -#: library/errno.rst:173 +#: library/errno.rst:179 msgid "Illegal seek" msgstr "Recherche invalide" -#: library/errno.rst:178 +#: library/errno.rst:184 msgid "Read-only file system" msgstr "Système de fichiers en lecture seule" -#: library/errno.rst:183 +#: library/errno.rst:189 msgid "Too many links" msgstr "Trop de liens symboliques" -#: library/errno.rst:188 -msgid "Broken pipe" -msgstr "Tube brisé" +#: library/errno.rst:194 +#, fuzzy +msgid "" +"Broken pipe. This error is mapped to the exception :exc:`BrokenPipeError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:193 +#: library/errno.rst:200 msgid "Math argument out of domain of func" msgstr "Argument mathématique hors du domaine de définition de la fonction" -#: library/errno.rst:198 +#: library/errno.rst:205 msgid "Math result not representable" msgstr "Résultat mathématique non représentable" -#: library/errno.rst:203 +#: library/errno.rst:210 msgid "Resource deadlock would occur" msgstr "Un interblocage se produirait sur cette ressource" -#: library/errno.rst:208 +#: library/errno.rst:215 msgid "File name too long" msgstr "Nom de fichier trop long" -#: library/errno.rst:213 +#: library/errno.rst:220 msgid "No record locks available" msgstr "Plus de verrou de fichier disponible" -#: library/errno.rst:218 +#: library/errno.rst:225 msgid "Function not implemented" msgstr "Fonction non implémentée" -#: library/errno.rst:223 +#: library/errno.rst:230 msgid "Directory not empty" msgstr "Dossier non vide" -#: library/errno.rst:228 +#: library/errno.rst:235 msgid "Too many symbolic links encountered" msgstr "Trop de liens symboliques trouvés" -#: library/errno.rst:233 -msgid "Operation would block" -msgstr "L'opération bloquerait" +#: library/errno.rst:240 +#, fuzzy +msgid "" +"Operation would block. This error is mapped to the exception :exc:" +"`BlockingIOError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:238 +#: library/errno.rst:246 msgid "No message of desired type" msgstr "Pas de message du type voulu" -#: library/errno.rst:243 +#: library/errno.rst:251 msgid "Identifier removed" msgstr "Identifiant supprimé" -#: library/errno.rst:248 +#: library/errno.rst:256 msgid "Channel number out of range" msgstr "Le numéro de canal est hors des limites" -#: library/errno.rst:253 +#: library/errno.rst:261 msgid "Level 2 not synchronized" msgstr "Le niveau 2 n'est pas synchronisé" -#: library/errno.rst:258 +#: library/errno.rst:266 msgid "Level 3 halted" msgstr "Niveau 3 stoppé" -#: library/errno.rst:263 +#: library/errno.rst:271 msgid "Level 3 reset" msgstr "Niveau 3 réinitialisé" -#: library/errno.rst:268 +#: library/errno.rst:276 msgid "Link number out of range" msgstr "Le numéro du lien est hors des limites" -#: library/errno.rst:273 +#: library/errno.rst:281 msgid "Protocol driver not attached" msgstr "Le pilote de protocole n'est pas attaché" -#: library/errno.rst:278 +#: library/errno.rst:286 msgid "No CSI structure available" msgstr "Pas de structure *CSI* disponible" -#: library/errno.rst:283 +#: library/errno.rst:291 msgid "Level 2 halted" msgstr "Niveau 2 stoppé" -#: library/errno.rst:288 +#: library/errno.rst:296 msgid "Invalid exchange" msgstr "Échange invalide" -#: library/errno.rst:293 +#: library/errno.rst:301 msgid "Invalid request descriptor" msgstr "Descripteur de requête invalide" -#: library/errno.rst:298 +#: library/errno.rst:306 msgid "Exchange full" msgstr "Échange complet" -#: library/errno.rst:303 +#: library/errno.rst:311 msgid "No anode" msgstr "Pas de *anode*" -#: library/errno.rst:308 +#: library/errno.rst:316 msgid "Invalid request code" msgstr "Code de requête invalide" -#: library/errno.rst:313 +#: library/errno.rst:321 msgid "Invalid slot" msgstr "*Slot* invalide" -#: library/errno.rst:318 +#: library/errno.rst:326 msgid "File locking deadlock error" msgstr "Interblocage lors du verrouillage de fichier" -#: library/errno.rst:323 +#: library/errno.rst:331 msgid "Bad font file format" msgstr "Mauvais format de fichier de police" -#: library/errno.rst:328 +#: library/errno.rst:336 msgid "Device not a stream" msgstr "Le périphérique n'est pas un flux" -#: library/errno.rst:333 +#: library/errno.rst:341 msgid "No data available" msgstr "Pas de donnée disponible" -#: library/errno.rst:338 +#: library/errno.rst:346 msgid "Timer expired" msgstr "Délai maximal atteint" -#: library/errno.rst:343 +#: library/errno.rst:351 msgid "Out of streams resources" msgstr "Pas assez de ressources de type flux" -#: library/errno.rst:348 +#: library/errno.rst:356 msgid "Machine is not on the network" msgstr "Machine hors réseau" -#: library/errno.rst:353 +#: library/errno.rst:361 msgid "Package not installed" msgstr "Paquet non installé" -#: library/errno.rst:358 +#: library/errno.rst:366 msgid "Object is remote" msgstr "L'objet est distant" -#: library/errno.rst:363 +#: library/errno.rst:371 msgid "Link has been severed" msgstr "Lien coupé" -#: library/errno.rst:368 +#: library/errno.rst:376 msgid "Advertise error" msgstr "Erreur d'annonce" -#: library/errno.rst:373 +#: library/errno.rst:381 msgid "Srmount error" msgstr "Erreur *Srmount*" -#: library/errno.rst:378 +#: library/errno.rst:386 msgid "Communication error on send" msgstr "Erreur de communication lors de l'envoi" -#: library/errno.rst:383 +#: library/errno.rst:391 msgid "Protocol error" msgstr "Erreur de protocole" -#: library/errno.rst:388 +#: library/errno.rst:396 msgid "Multihop attempted" msgstr "Transfert à sauts multiples essayé" -#: library/errno.rst:393 +#: library/errno.rst:401 msgid "RFS specific error" msgstr "erreur spécifique *RFS*" -#: library/errno.rst:398 +#: library/errno.rst:406 msgid "Not a data message" msgstr "Pas un message de données" -#: library/errno.rst:403 +#: library/errno.rst:411 msgid "Value too large for defined data type" msgstr "Valeur trop grande pour être stockée dans ce type de donnée" -#: library/errno.rst:408 +#: library/errno.rst:416 msgid "Name not unique on network" msgstr "Nom non-unique dans le réseau" -#: library/errno.rst:413 +#: library/errno.rst:421 msgid "File descriptor in bad state" msgstr "Descripteur de fichier en mauvais état" -#: library/errno.rst:418 +#: library/errno.rst:426 msgid "Remote address changed" msgstr "Adresse distante changée" -#: library/errno.rst:423 +#: library/errno.rst:431 msgid "Can not access a needed shared library" msgstr "Accès impossible à une bibliothèque partagée nécessaire" -#: library/errno.rst:428 +#: library/errno.rst:436 msgid "Accessing a corrupted shared library" msgstr "Accès à une bibliothèque partagée corrompue" -#: library/errno.rst:433 +#: library/errno.rst:441 msgid ".lib section in a.out corrupted" msgstr "Section *.lib* de *a.out* corrompue" -#: library/errno.rst:438 +#: library/errno.rst:446 msgid "Attempting to link in too many shared libraries" msgstr "Tentative de liaison entre trop de bibliothèques partagées" -#: library/errno.rst:443 +#: library/errno.rst:451 msgid "Cannot exec a shared library directly" msgstr "Impossible d'exécuter directement une bibliothèque partagée" -#: library/errno.rst:448 +#: library/errno.rst:456 msgid "Illegal byte sequence" msgstr "Séquence de *bytes* illégale" -#: library/errno.rst:453 +#: library/errno.rst:461 msgid "Interrupted system call should be restarted" msgstr "Appel système interrompu qui devrait être relancé" -#: library/errno.rst:458 +#: library/errno.rst:466 msgid "Streams pipe error" msgstr "Erreur d’enchaînement de flux" -#: library/errno.rst:463 +#: library/errno.rst:471 msgid "Too many users" msgstr "Trop d'utilisateurs" -#: library/errno.rst:468 +#: library/errno.rst:476 msgid "Socket operation on non-socket" msgstr "" "Opération d'interface de connexion alors que ce n'est pas une interface de " "connexion" -#: library/errno.rst:473 +#: library/errno.rst:481 msgid "Destination address required" msgstr "Adresse de destination obligatoire" -#: library/errno.rst:478 +#: library/errno.rst:486 msgid "Message too long" msgstr "Message trop long" -#: library/errno.rst:483 +#: library/errno.rst:491 msgid "Protocol wrong type for socket" msgstr "Mauvais type de protocole pour ce connecteur" -#: library/errno.rst:488 +#: library/errno.rst:496 msgid "Protocol not available" msgstr "Protocole pas disponible" -#: library/errno.rst:493 +#: library/errno.rst:501 msgid "Protocol not supported" msgstr "Protocole non géré" -#: library/errno.rst:498 +#: library/errno.rst:506 msgid "Socket type not supported" msgstr "Type de connecteur non géré" -#: library/errno.rst:503 +#: library/errno.rst:511 msgid "Operation not supported on transport endpoint" msgstr "Opération non gérée par cette fin de lien" -#: library/errno.rst:508 +#: library/errno.rst:516 msgid "Protocol family not supported" msgstr "Famille de protocole non gérée" -#: library/errno.rst:513 +#: library/errno.rst:521 msgid "Address family not supported by protocol" msgstr "Famille d'adresses non gérée par ce protocole" -#: library/errno.rst:518 +#: library/errno.rst:526 msgid "Address already in use" msgstr "Adresse déjà utilisée" -#: library/errno.rst:523 +#: library/errno.rst:531 msgid "Cannot assign requested address" msgstr "Impossible d'assigner l'adresse demandée" -#: library/errno.rst:528 +#: library/errno.rst:536 msgid "Network is down" msgstr "Le réseau est désactivé" -#: library/errno.rst:533 +#: library/errno.rst:541 msgid "Network is unreachable" msgstr "Réseau inaccessible" -#: library/errno.rst:538 +#: library/errno.rst:546 msgid "Network dropped connection because of reset" msgstr "Connexion annulée par le réseau" -#: library/errno.rst:543 -msgid "Software caused connection abort" -msgstr "Connexion abandonnée" +#: library/errno.rst:551 +#, fuzzy +msgid "" +"Software caused connection abort. This error is mapped to the exception :exc:" +"`ConnectionAbortedError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:548 -msgid "Connection reset by peer" -msgstr "Connexion réinitialisée" +#: library/errno.rst:557 +#, fuzzy +msgid "" +"Connection reset by peer. This error is mapped to the exception :exc:" +"`ConnectionResetError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:553 +#: library/errno.rst:563 msgid "No buffer space available" msgstr "Plus d'espace tampon disponible" -#: library/errno.rst:558 +#: library/errno.rst:568 msgid "Transport endpoint is already connected" msgstr "L'interface de connexion est déjà connectée" -#: library/errno.rst:563 +#: library/errno.rst:573 msgid "Transport endpoint is not connected" msgstr "L'interface de connexion n'est pas connectée" -#: library/errno.rst:568 -msgid "Cannot send after transport endpoint shutdown" -msgstr "Impossible d'envoyer après l'arrêt du point final du transport" +#: library/errno.rst:578 +#, fuzzy +msgid "" +"Cannot send after transport endpoint shutdown. This error is mapped to the " +"exception :exc:`BrokenPipeError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:573 +#: library/errno.rst:584 msgid "Too many references: cannot splice" msgstr "Trop de descripteurs : impossible d'effectuer la liaison" -#: library/errno.rst:578 -msgid "Connection timed out" -msgstr "Délai maximal de connexion écoulé" +#: library/errno.rst:589 +#, fuzzy +msgid "" +"Connection timed out. This error is mapped to the exception :exc:" +"`TimeoutError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:583 -msgid "Connection refused" -msgstr "Connexion refusée" +#: library/errno.rst:595 +#, fuzzy +msgid "" +"Connection refused. This error is mapped to the exception :exc:" +"`ConnectionRefusedError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:588 +#: library/errno.rst:601 msgid "Host is down" msgstr "Hôte éteint" -#: library/errno.rst:593 +#: library/errno.rst:606 msgid "No route to host" msgstr "Pas de route vers l'hôte" -#: library/errno.rst:598 -msgid "Operation already in progress" -msgstr "Connexion déjà en cours" +#: library/errno.rst:611 +#, fuzzy +msgid "" +"Operation already in progress. This error is mapped to the exception :exc:" +"`BlockingIOError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:603 -msgid "Operation now in progress" -msgstr "Opération en cours" +#: library/errno.rst:617 +#, fuzzy +msgid "" +"Operation now in progress. This error is mapped to the exception :exc:" +"`BlockingIOError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:608 +#: library/errno.rst:623 msgid "Stale NFS file handle" msgstr "Descripteur de fichier NFS corrompu" -#: library/errno.rst:613 +#: library/errno.rst:628 msgid "Structure needs cleaning" msgstr "La structure a besoin d'être nettoyée" -#: library/errno.rst:618 +#: library/errno.rst:633 msgid "Not a XENIX named type file" msgstr "N'est pas un fichier nommé du type *XENIX*" -#: library/errno.rst:623 +#: library/errno.rst:638 msgid "No XENIX semaphores available" msgstr "Pas de sémaphore *XENIX* disponible" -#: library/errno.rst:628 +#: library/errno.rst:643 msgid "Is a named type file" msgstr "Est un fichier nommé" -#: library/errno.rst:633 +#: library/errno.rst:648 msgid "Remote I/O error" msgstr "Erreur d'entrées-sorties distante" -#: library/errno.rst:638 +#: library/errno.rst:653 msgid "Quota exceeded" msgstr "Quota dépassé" + +#: library/errno.rst:657 +msgid "Interface output queue is full" +msgstr "" + +#~ msgid "Operation not permitted" +#~ msgstr "Opération interdite" + +#~ msgid "No such file or directory" +#~ msgstr "Fichier ou répertoire inexistant" + +#~ msgid "No such process" +#~ msgstr "Processus inexistant" + +#~ msgid "Interrupted system call." +#~ msgstr "Appel système interrompu" + +#~ msgid "No child processes" +#~ msgstr "Pas de processus fils" + +#~ msgid "Try again" +#~ msgstr "Ressource temporairement indisponible (réessayez)" + +#~ msgid "Permission denied" +#~ msgstr "Autorisation refusée" + +#~ msgid "File exists" +#~ msgstr "Fichier déjà existant" + +#~ msgid "Not a directory" +#~ msgstr "Pas un répertoire" + +#~ msgid "Is a directory" +#~ msgstr "Est un répertoire" + +#~ msgid "Broken pipe" +#~ msgstr "Tube brisé" + +#~ msgid "Operation would block" +#~ msgstr "L'opération bloquerait" + +#~ msgid "Software caused connection abort" +#~ msgstr "Connexion abandonnée" + +#~ msgid "Connection reset by peer" +#~ msgstr "Connexion réinitialisée" + +#~ msgid "Cannot send after transport endpoint shutdown" +#~ msgstr "Impossible d'envoyer après l'arrêt du point final du transport" + +#~ msgid "Connection timed out" +#~ msgstr "Délai maximal de connexion écoulé" + +#~ msgid "Connection refused" +#~ msgstr "Connexion refusée" + +#~ msgid "Operation already in progress" +#~ msgstr "Connexion déjà en cours" + +#~ msgid "Operation now in progress" +#~ msgstr "Opération en cours" diff --git a/library/exceptions.po b/library/exceptions.po index 53e70298af..bf7eaf8c44 100644 --- a/library/exceptions.po +++ b/library/exceptions.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" -"PO-Revision-Date: 2020-10-15 09:04+0200\n" -"Last-Translator: Jules Lasne \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-04-07 23:15-0600\n" +"Last-Translator: Yannick Gingras \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.3\n" +"X-Generator: Poedit 3.0\n" #: library/exceptions.rst:4 msgid "Built-in Exceptions" @@ -62,7 +62,7 @@ msgstr "" "Du code utilisateur peut lever des exceptions natives. Cela peut être " "utilisé pour tester un gestionnaire d'exception ou pour rapporter une " "condition d'erreur \"comme si\" c'était l'interpréteur qui levait cette " -"exception ; mais attention car rien n'empêche du code utilisateur de lever " +"exception ; mais attention car rien n'empêche du code utilisateur de lever " "une erreur inappropriée." #: library/exceptions.rst:31 @@ -74,41 +74,39 @@ msgid "" "the Python Tutorial under :ref:`tut-userexceptions`." msgstr "" "Les classes d'exception natives peuvent être héritées pour définir de " -"nouvelles exceptions ; les programmeurs sont encouragés à faire dériver les " +"nouvelles exceptions ; les programmeurs sont encouragés à faire dériver les " "nouvelles exceptions de la classe :exc:`Exception` ou d'une de ses sous-" "classes, et non de :exc:`BaseException`. Plus d'informations sur la " "définition des exceptions sont disponibles dans le Tutoriel Python au " "chapitre :ref:`tut-userexceptions`." -#: library/exceptions.rst:37 +#: library/exceptions.rst:39 +msgid "Exception context" +msgstr "Contexte des exceptions" + +#: library/exceptions.rst:41 msgid "" -"When raising (or re-raising) an exception in an :keyword:`except` or :" -"keyword:`finally` clause :attr:`__context__` is automatically set to the " -"last exception caught; if the new exception is not handled the traceback " -"that is eventually displayed will include the originating exception(s) and " -"the final exception." +"When raising a new exception while another exception is already being " +"handled, the new exception's :attr:`__context__` attribute is automatically " +"set to the handled exception. An exception may be handled when an :keyword:" +"`except` or :keyword:`finally` clause, or a :keyword:`with` statement, is " +"used." msgstr "" -"En levant (ou levant à nouveau) une exception dans une clause :keyword:" -"`except` ou :keyword:`finally`, :attr:`__context__` est automatiquement " -"assigné à la dernière exception interceptée ; si la nouvelle exception n'est " -"pas gérée, la trace d'appels affichée inclut la ou les exception(s) " -"d'origine et l'exception finale." +"Quand une exception est levée pendant qu'une autre exception est déjà en " +"traitement, l'attribut :attr:`__context__` de la nouvelle exception est " +"automatiquement affecté à l'exception qui est en cours de traitement. Une " +"exception peut être traitée quand une clause :keyword:`except` ou :keyword:" +"`finally`, ou une instruction :keyword:`with` est utilisée." -#: library/exceptions.rst:43 -#, fuzzy +#: library/exceptions.rst:47 msgid "" -"When raising a new exception (rather than using a bare ``raise`` to re-raise " -"the exception currently being handled), the implicit exception context can " -"be supplemented with an explicit cause by using :keyword:`from` with :" -"keyword:`raise`::" +"This implicit exception context can be supplemented with an explicit cause " +"by using :keyword:`!from` with :keyword:`raise`::" msgstr "" -"En levant une nouvelle exception (plutôt que d'utiliser un simple ``raise`` " -"pour lever à nouveau l'exception en cours de traitement), le contexte " -"implicite d'exception peut être complété par une cause explicite en " -"utilisant :keyword:`from` avec :keyword:`raise` ::" +"Ce contexte implicite d'exception peut être complété par une cause explicite " +"en utilisant :keyword:`!from` avec :keyword:`raise` ::" -#: library/exceptions.rst:50 -#, fuzzy +#: library/exceptions.rst:53 msgid "" "The expression following :keyword:`from` must be an exception or " "``None``. It will be set as :attr:`__cause__` on the raised exception. " @@ -119,16 +117,16 @@ msgid "" "while leaving the old exception available in :attr:`__context__` for " "introspection when debugging." msgstr "" -"L'expression suivant :keyword:`from` doit être une exception ou ``None``. " -"Elle sera assignée en tant que :attr:`__cause__` dans l'exception levée. " -"Changer :attr:`__cause__` change aussi implicitement l'attribut :attr:" +"L'expression suivant :keyword:`from` doit être une exception ou " +"``None``. Elle sera assignée en tant que :attr:`__cause__` dans l'exception " +"levée. Changer :attr:`__cause__` change aussi implicitement l'attribut :attr:" "`__suppress_context__` à ``True``, de sorte que l'utilisation de ``raise " "new_exc from None`` remplace bien l'ancienne exception avec la nouvelle à " -"des fins d'affichage (e.g., convertir :exc:`KeyError` en :exc:" +"des fins d'affichage (par exemple, convertir :exc:`KeyError` en :exc:" "`AttributeError`), tout en laissant l'ancienne exception disponible dans :" "attr:`__context__` pour introspection lors du débogage." -#: library/exceptions.rst:59 +#: library/exceptions.rst:62 msgid "" "The default traceback display code shows these chained exceptions in " "addition to the traceback for the exception itself. An explicitly chained " @@ -143,7 +141,7 @@ msgstr "" "affichée que si :attr:`__cause__` est :const:`None` et :attr:" "`__suppress_context__` est faux." -#: library/exceptions.rst:65 +#: library/exceptions.rst:68 msgid "" "In either case, the exception itself is always shown after any chained " "exceptions so that the final line of the traceback always shows the last " @@ -153,11 +151,45 @@ msgstr "" "les exceptions enchaînées, de sorte que la dernière ligne de la trace " "d'appels montre toujours la dernière exception qui a été levée." -#: library/exceptions.rst:71 +#: library/exceptions.rst:74 +msgid "Inheriting from built-in exceptions" +msgstr "Hériter des exceptions natives" + +#: library/exceptions.rst:76 +msgid "" +"User code can create subclasses that inherit from an exception type. It's " +"recommended to only subclass one exception type at a time to avoid any " +"possible conflicts between how the bases handle the ``args`` attribute, as " +"well as due to possible memory layout incompatibilities." +msgstr "" +"Le code de l'utilisateur peut créer des sous-classes qui dérivent d'un type " +"d'exception. Il est recommandé de ne dériver que d'un seul type d'exception " +"à la fois pour éviter des conflits possibles dans la façon dont les classes " +"de base traitent l'argument ``args`` ainsi que des incompatibilités " +"potentielles avec l'utilisation de la mémoire." + +#: library/exceptions.rst:83 +msgid "" +"Most built-in exceptions are implemented in C for efficiency, see: :source:" +"`Objects/exceptions.c`. Some have custom memory layouts which makes it " +"impossible to create a subclass that inherits from multiple exception types. " +"The memory layout of a type is an implementation detail and might change " +"between Python versions, leading to new conflicts in the future. Therefore, " +"it's recommended to avoid subclassing multiple exception types altogether." +msgstr "" +"La majorité des exceptions natives sont implémentées en C pour des raisons " +"d'efficacité, voir :source:`Objects/exceptions.c`. L'architecture interne de " +"certaines est telle que cela rend impossible la création de sous-classes qui " +"dérivent de plusieurs types d'exceptions. L'agencement de la mémoire est un " +"détail d'implémentation qui est sujet à changement d'une version de Python à " +"l'autre, ce qui peut poser conflit dans le futur. Il est donc déconseillé de " +"dériver de plusieurs types d'exceptions." + +#: library/exceptions.rst:93 msgid "Base classes" msgstr "Classes de base" -#: library/exceptions.rst:73 +#: library/exceptions.rst:95 msgid "" "The following exceptions are used mostly as base classes for other " "exceptions." @@ -165,7 +197,7 @@ msgstr "" "Les exceptions suivantes sont utilisées principalement en tant que classes " "de base pour d'autres exceptions." -#: library/exceptions.rst:77 +#: library/exceptions.rst:99 msgid "" "The base class for all built-in exceptions. It is not meant to be directly " "inherited by user-defined classes (for that, use :exc:`Exception`). If :" @@ -179,7 +211,7 @@ msgstr "" "classe, la représentation du ou des argument(s) de l'instance est retournée, " "ou la chaîne vide s'il n'y avait pas d'arguments." -#: library/exceptions.rst:85 +#: library/exceptions.rst:107 msgid "" "The tuple of arguments given to the exception constructor. Some built-in " "exceptions (like :exc:`OSError`) expect a certain number of arguments and " @@ -192,16 +224,41 @@ msgstr "" "uplet, alors que d'autres ne sont généralement appelées qu'avec une seule " "chaîne de caractères rendant un message d'erreur." -#: library/exceptions.rst:92 +#: library/exceptions.rst:114 msgid "" "This method sets *tb* as the new traceback for the exception and returns the " -"exception object. It is usually used in exception handling code like this::" +"exception object. It was more commonly used before the exception chaining " +"features of :pep:`3134` became available. The following example shows how " +"we can convert an instance of ``SomeException`` into an instance of " +"``OtherException`` while preserving the traceback. Once raised, the current " +"frame is pushed onto the traceback of the ``OtherException``, as would have " +"happened to the traceback of the original ``SomeException`` had we allowed " +"it to propagate to the caller. ::" +msgstr "" +"Cette méthode affecte *tb* comme la nouvelle trace d'appels de l'exception " +"et renvoie l'objet exception. Elle était utilisée de façon plus courante " +"avant que la fonctionnalité de chaînage des exceptions de la :pep:`3134` " +"devienne disponible. L'exemple suivant démontre comment convertir une " +"instance de ``SomeException`` en une instance de ``OtherException`` tout en " +"préservant la pile d'appels. Une fois l'exception levée, le cadre courant " +"est empilé sur la trace d'appels de ``OtherException``, comme cela se serait " +"produit pour la trace d'appels de ``SomeException`` si on l'avait laissée se " +"propager jusqu'à l'appelant ::" + +#: library/exceptions.rst:131 +msgid "" +"Add the string ``note`` to the exception's notes which appear in the " +"standard traceback after the exception string. A :exc:`TypeError` is raised " +"if ``note`` is not a string." +msgstr "" + +#: library/exceptions.rst:139 +msgid "" +"A list of the notes of this exception, which were added with :meth:" +"`add_note`. This attribute is created when :meth:`add_note` is called." msgstr "" -"Cette méthode définit *tb* en tant que nouvelle trace d'appels pour " -"l'exception et retourne l'objet exception. Elle est généralement utilisée " -"dans du code de gestion d'exceptions comme ceci ::" -#: library/exceptions.rst:105 +#: library/exceptions.rst:147 msgid "" "All built-in, non-system-exiting exceptions are derived from this class. " "All user-defined exceptions should also be derived from this class." @@ -210,17 +267,17 @@ msgstr "" "dérivent de cette classe. Toutes les exceptions définies par l'utilisateur " "devraient également être dérivées de cette classe." -#: library/exceptions.rst:111 +#: library/exceptions.rst:153 msgid "" "The base class for those built-in exceptions that are raised for various " "arithmetic errors: :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:" "`FloatingPointError`." msgstr "" "La classe de base pour les exceptions natives qui sont levées pour diverses " -"erreurs arithmétiques : :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:" +"erreurs arithmétiques : :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:" "`FloatingPointError`." -#: library/exceptions.rst:118 +#: library/exceptions.rst:160 msgid "" "Raised when a :ref:`buffer ` related operation cannot be " "performed." @@ -228,7 +285,7 @@ msgstr "" "Levée lorsqu'une opération liée à un :ref:`tampon ` ne peut " "pas être exécutée." -#: library/exceptions.rst:124 +#: library/exceptions.rst:166 msgid "" "The base class for the exceptions that are raised when a key or index used " "on a mapping or sequence is invalid: :exc:`IndexError`, :exc:`KeyError`. " @@ -236,22 +293,22 @@ msgid "" msgstr "" "La classe de base pour les exceptions qui sont levées lorsqu'une clé ou un " "index utilisé sur un tableau de correspondances ou une séquence est " -"invalide : :exc:`IndexError`, :exc:`KeyError`. Peut être levée directement " +"invalide : :exc:`IndexError`, :exc:`KeyError`. Peut être levée directement " "par :func:`codecs.lookup`." -#: library/exceptions.rst:130 +#: library/exceptions.rst:172 msgid "Concrete exceptions" msgstr "Exceptions concrètes" -#: library/exceptions.rst:132 +#: library/exceptions.rst:174 msgid "The following exceptions are the exceptions that are usually raised." msgstr "Les exceptions suivantes sont celles qui sont habituellement levées." -#: library/exceptions.rst:138 +#: library/exceptions.rst:180 msgid "Raised when an :keyword:`assert` statement fails." msgstr "Levée lorsqu'une instruction :keyword:`assert` échoue." -#: library/exceptions.rst:143 +#: library/exceptions.rst:185 msgid "" "Raised when an attribute reference (see :ref:`attribute-references`) or " "assignment fails. (When an object does not support attribute references or " @@ -261,22 +318,38 @@ msgstr "" "`attribute-references`) échoue. (Lorsqu'un objet ne supporte pas du tout la " "référence ou l'assignation d'attribut, :exc:`TypeError` est levé.)" -#: library/exceptions.rst:150 +#: library/exceptions.rst:189 +msgid "" +"The :attr:`name` and :attr:`obj` attributes can be set using keyword-only " +"arguments to the constructor. When set they represent the name of the " +"attribute that was attempted to be accessed and the object that was accessed " +"for said attribute, respectively." +msgstr "" +"Les attributs :attr:`name` et :attr:`obj` peuvent être définis uniquement à " +"l'aide d'arguments nommés passés au constructeur. Lorsqu'ils sont définis, " +"ils représentent respectivement le nom de l'attribut pour lequel il y a eu " +"une tentative d'accès et l'objet qui a été accédé pour cet attribut." + +#: library/exceptions.rst:194 +msgid "Added the :attr:`name` and :attr:`obj` attributes." +msgstr "Ajout des attributs :attr:`name` et :attr:`obj`." + +#: library/exceptions.rst:199 msgid "" "Raised when the :func:`input` function hits an end-of-file condition (EOF) " "without reading any data. (N.B.: the :meth:`io.IOBase.read` and :meth:`io." "IOBase.readline` methods return an empty string when they hit EOF.)" msgstr "" "Levée lorsque la fonction :func:`input` atteint une condition de fin de " -"fichier (EOF) sans lire aucune donnée. (N.B.: les méthodes :meth:`io.IOBase." +"fichier (EOF) sans lire aucune donnée. (N.B. : les méthodes :meth:`io.IOBase." "read` et :meth:`io.IOBase.readline` retournent une chaîne vide lorsqu'elles " "atteignent EOF.)" -#: library/exceptions.rst:157 +#: library/exceptions.rst:206 msgid "Not currently used." msgstr "N’est pas utilisé pour le moment." -#: library/exceptions.rst:162 +#: library/exceptions.rst:211 msgid "" "Raised when a :term:`generator` or :term:`coroutine` is closed; see :meth:" "`generator.close` and :meth:`coroutine.close`. It directly inherits from :" @@ -288,7 +361,7 @@ msgstr "" "de :exc:`BaseException` au lieu de :exc:`Exception` puisqu'il ne s'agit pas " "techniquement d'une erreur." -#: library/exceptions.rst:170 +#: library/exceptions.rst:219 msgid "" "Raised when the :keyword:`import` statement has troubles trying to load a " "module. Also raised when the \"from list\" in ``from ... import`` has a " @@ -298,7 +371,7 @@ msgstr "" "de charger un module. Également levée lorsque Python ne trouve pas un nom " "dans ``from ... import``." -#: library/exceptions.rst:174 +#: library/exceptions.rst:223 msgid "" "The :attr:`name` and :attr:`path` attributes can be set using keyword-only " "arguments to the constructor. When set they represent the name of the module " @@ -310,11 +383,11 @@ msgstr "" "ils représentent respectivement le nom du module qui a été tenté d'être " "importé et le chemin d'accès au fichier qui a déclenché l'exception." -#: library/exceptions.rst:179 +#: library/exceptions.rst:228 msgid "Added the :attr:`name` and :attr:`path` attributes." msgstr "Ajout des attributs :attr:`name` et :attr:`path`." -#: library/exceptions.rst:184 +#: library/exceptions.rst:233 msgid "" "A subclass of :exc:`ImportError` which is raised by :keyword:`import` when a " "module could not be located. It is also raised when ``None`` is found in :" @@ -324,7 +397,7 @@ msgstr "" "lorsqu'un module n'a pas pu être localisé. Elle est généralement levée quand " "``None`` est trouvé dans :data:`sys.modules`." -#: library/exceptions.rst:193 +#: library/exceptions.rst:242 msgid "" "Raised when a sequence subscript is out of range. (Slice indices are " "silently truncated to fall in the allowed range; if an index is not an " @@ -332,9 +405,9 @@ msgid "" msgstr "" "Levée lorsqu'un indice de séquence est hors de la plage. (Les indices de " "tranches (*slices*) sont tronqués silencieusement pour tomber dans la plage " -"autorisée ; si un indice n'est pas un entier, :exc:`TypeError` est levée.)" +"autorisée ; si un indice n'est pas un entier, :exc:`TypeError` est levée.)" -#: library/exceptions.rst:202 +#: library/exceptions.rst:251 msgid "" "Raised when a mapping (dictionary) key is not found in the set of existing " "keys." @@ -342,7 +415,7 @@ msgstr "" "Levée lorsqu'une clef (de dictionnaire) n'est pas trouvée dans l'ensemble " "des clefs existantes." -#: library/exceptions.rst:209 +#: library/exceptions.rst:258 msgid "" "Raised when the user hits the interrupt key (normally :kbd:`Control-C` or :" "kbd:`Delete`). During execution, a check for interrupts is made regularly. " @@ -357,7 +430,22 @@ msgstr "" "du code qui intercepte :exc:`Exception` et ainsi empêcher l'interpréteur de " "quitter." -#: library/exceptions.rst:218 +#: library/exceptions.rst:266 +msgid "" +"Catching a :exc:`KeyboardInterrupt` requires special consideration. Because " +"it can be raised at unpredictable points, it may, in some circumstances, " +"leave the running program in an inconsistent state. It is generally best to " +"allow :exc:`KeyboardInterrupt` to end the program as quickly as possible or " +"avoid raising it entirely. (See :ref:`handlers-and-exceptions`.)" +msgstr "" +"Attraper une :exc:`KeyboardInterrupt` demande une considération " +"particulière. Comme elle peut être levée à des moments imprévisibles, elle " +"peut dans certains cas laisser le programme en cours d'exécution dans un " +"état incohérent. Il est généralement préférable de laisser :exc:" +"`KeyboardInterrupt` arrêter le programme aussi rapidement que possible ou " +"d'éviter catégoriquement de la lever (voir :ref:`handlers-and-exceptions`)." + +#: library/exceptions.rst:276 msgid "" "Raised when an operation runs out of memory but the situation may still be " "rescued (by deleting some objects). The associated value is a string " @@ -372,11 +460,11 @@ msgstr "" "est une chaîne de caractères indiquant quel type d'opération (interne) est à " "court de mémoire. À noter qu'en raison de l'architecture interne de gestion " "de la mémoire (la fonction :c:func:`malloc` du C), l'interpréteur peut ne " -"pas toujours être capable de rattraper cette situation ; il lève néanmoins " +"pas toujours être capable de rattraper cette situation ; il lève néanmoins " "une exception pour qu'une pile d'appels puisse être affichée, dans le cas où " "un programme en cours d'exécution en était la cause." -#: library/exceptions.rst:229 +#: library/exceptions.rst:287 msgid "" "Raised when a local or global name is not found. This applies only to " "unqualified names. The associated value is an error message that includes " @@ -386,7 +474,21 @@ msgstr "" "qu'aux noms non qualifiés. La valeur associée est un message d'erreur qui " "inclut le nom qui n'a pas pu être trouvé." -#: library/exceptions.rst:236 +#: library/exceptions.rst:291 +msgid "" +"The :attr:`name` attribute can be set using a keyword-only argument to the " +"constructor. When set it represent the name of the variable that was " +"attempted to be accessed." +msgstr "" +"L'attribut :attr:`name` doit être défini uniquement à l'aide d'un argument " +"nommé passé au constructeur. Lorsqu'il est défini, il représente le nom de " +"la variable pour laquelle il y a eu une tentative d'accès." + +#: library/exceptions.rst:295 +msgid "Added the :attr:`name` attribute." +msgstr "Ajout de l'attribut :attr:`name`." + +#: library/exceptions.rst:301 msgid "" "This exception is derived from :exc:`RuntimeError`. In user defined base " "classes, abstract methods should raise this exception when they require " @@ -399,18 +501,18 @@ msgstr "" "méthode, ou lorsque la classe est en cours de développement pour indiquer " "que l'implémentation concrète doit encore être ajoutée." -#: library/exceptions.rst:243 +#: library/exceptions.rst:308 msgid "" "It should not be used to indicate that an operator or method is not meant to " "be supported at all -- in that case either leave the operator / method " "undefined or, if a subclass, set it to :data:`None`." msgstr "" "Elle ne devrait pas être utilisée pour indiquer qu'un opérateur ou qu'une " -"méthode n'est pas destiné à être pris en charge du tout -- dans ce cas, " -"laissez soit l'opérateur / la méthode non défini, soit, s'il s'agit d'une " -"sous-classe, assignez-le à :data:`None`." +"méthode n'est pas destiné à être pris en charge du tout – dans ce cas, " +"évitez de définir l'opérateur ou la méthode, ou s'il s'agit d'une sous-" +"classe, assignez-le à :data:`None`." -#: library/exceptions.rst:249 +#: library/exceptions.rst:314 msgid "" "``NotImplementedError`` and ``NotImplemented`` are not interchangeable, even " "though they have similar names and purposes. See :data:`NotImplemented` for " @@ -420,7 +522,7 @@ msgstr "" "même s'ils ont des noms et des objectifs similaires. Voir :data:" "`NotImplemented` pour des détails sur la façon de les utiliser." -#: library/exceptions.rst:258 +#: library/exceptions.rst:323 msgid "" "This exception is raised when a system function returns a system-related " "error, including I/O failures such as \"file not found\" or \"disk full" @@ -431,7 +533,7 @@ msgstr "" "non trouvé\" ou \"disque plein\" (pas pour les types d'arguments illégaux ou " "d'autres erreurs accidentelles)." -#: library/exceptions.rst:262 +#: library/exceptions.rst:327 msgid "" "The second form of the constructor sets the corresponding attributes, " "described below. The attributes default to :const:`None` if not specified. " @@ -445,7 +547,7 @@ msgstr "" "l'attribut :attr:`~BaseException.args` contient seulement une paire avec les " "valeurs des deux premiers arguments du constructeur." -#: library/exceptions.rst:268 +#: library/exceptions.rst:333 msgid "" "The constructor often actually returns a subclass of :exc:`OSError`, as " "described in `OS exceptions`_ below. The particular subclass depends on the " @@ -459,11 +561,11 @@ msgstr "" "de la construction d':exc:`OSError` directement ou via un alias, et n'est " "pas hérité lors du sous-classement." -#: library/exceptions.rst:276 +#: library/exceptions.rst:341 msgid "A numeric error code from the C variable :c:data:`errno`." msgstr "Code d'erreur numérique de la variable C :c:data:`errno`." -#: library/exceptions.rst:280 +#: library/exceptions.rst:345 msgid "" "Under Windows, this gives you the native Windows error code. The :attr:`." "errno` attribute is then an approximate translation, in POSIX terms, of that " @@ -473,7 +575,7 @@ msgstr "" "errno` est alors une traduction approximative, en termes POSIX, de ce code " "d'erreur natif." -#: library/exceptions.rst:284 +#: library/exceptions.rst:349 msgid "" "Under Windows, if the *winerror* constructor argument is an integer, the :" "attr:`.errno` attribute is determined from the Windows error code, and the " @@ -485,7 +587,7 @@ msgstr "" "et l'argument *errno* est ignoré. Sur d'autres plateformes, l'argument " "*winerror* est ignoré, et l'attribut :attr:`winerror` n'existe pas." -#: library/exceptions.rst:292 +#: library/exceptions.rst:357 msgid "" "The corresponding error message, as provided by the operating system. It is " "formatted by the C functions :c:func:`perror` under POSIX, and :c:func:" @@ -495,7 +597,7 @@ msgstr "" "d'exploitation. Il est formaté par les fonctions C :c:func:`perror` sous " "POSIX, et :c:func:`FormatMessage` sous Windows." -#: library/exceptions.rst:300 +#: library/exceptions.rst:365 msgid "" "For exceptions that involve a file system path (such as :func:`open` or :" "func:`os.unlink`), :attr:`filename` is the file name passed to the function. " @@ -509,7 +611,7 @@ msgstr "" "à deux chemins d'accès au système de fichiers (comme :func:`os.rename`), :" "attr:`filename2` correspond au deuxième nom de fichier passé à la fonction." -#: library/exceptions.rst:307 +#: library/exceptions.rst:372 msgid "" ":exc:`EnvironmentError`, :exc:`IOError`, :exc:`WindowsError`, :exc:`socket." "error`, :exc:`select.error` and :exc:`mmap.error` have been merged into :exc:" @@ -519,19 +621,20 @@ msgstr "" "error`, :exc:`select.error` et :exc:`mmap.error` ont fusionnées en :exc:" "`OSError`, et le constructeur peut renvoyer une sous-classe." -#: library/exceptions.rst:313 +#: library/exceptions.rst:378 msgid "" "The :attr:`filename` attribute is now the original file name passed to the " -"function, instead of the name encoded to or decoded from the filesystem " -"encoding. Also, the *filename2* constructor argument and attribute was " -"added." +"function, instead of the name encoded to or decoded from the :term:" +"`filesystem encoding and error handler`. Also, the *filename2* constructor " +"argument and attribute was added." msgstr "" "L'attribut :attr:`filename` est maintenant le nom du fichier originel passé " -"à la fonction, au lieu du nom encodé ou décodé à partir de l'encodage du " -"système de fichiers. De plus, l'argument du constructeur et attribut " -"*filename2* a été ajouté." +"à la fonction, au lieu du nom encodé ou décodé à partir du :term:" +"`gestionnaire d'encodage et d'erreur du système de fichiers `. De plus, l'argument du constructeur et " +"attribut *filename2* a été ajouté." -#: library/exceptions.rst:322 +#: library/exceptions.rst:387 msgid "" "Raised when the result of an arithmetic operation is too large to be " "represented. This cannot occur for integers (which would rather raise :exc:" @@ -543,12 +646,12 @@ msgstr "" "Levée lorsque le résultat d'une opération arithmétique est trop grand pour " "être représenté. Cela ne peut pas se produire pour les entiers (qui " "préfèrent lever :exc:`MemoryError` plutôt que d'abandonner). Cependant, pour " -"des raisons historiques, OverflowError est parfois levée pour des entiers " -"qui sont en dehors d'une plage requise. En raison de l'absence de " +"des raisons historiques, ``OverflowError`` est parfois levée pour des " +"entiers qui sont en dehors d'une plage requise. En raison de l'absence de " "normalisation de la gestion des exceptions de virgule flottante en C, la " "plupart des opérations en virgule flottante ne sont pas vérifiées." -#: library/exceptions.rst:332 +#: library/exceptions.rst:397 msgid "" "This exception is derived from :exc:`RuntimeError`. It is raised when the " "interpreter detects that the maximum recursion depth (see :func:`sys." @@ -558,11 +661,11 @@ msgstr "" "l'interpréteur détecte que la profondeur de récursivité maximale (voir :func:" "`sys.getrecursionlimit`) est dépassée." -#: library/exceptions.rst:336 +#: library/exceptions.rst:401 msgid "Previously, a plain :exc:`RuntimeError` was raised." msgstr "Auparavant, une simple :exc:`RuntimeError` était levée." -#: library/exceptions.rst:342 +#: library/exceptions.rst:407 msgid "" "This exception is raised when a weak reference proxy, created by the :func:" "`weakref.proxy` function, is used to access an attribute of the referent " @@ -575,7 +678,7 @@ msgstr "" "Pour plus d'informations sur les pointeurs faibles, voir le module :mod:" "`weakref`." -#: library/exceptions.rst:350 +#: library/exceptions.rst:415 msgid "" "Raised when an error is detected that doesn't fall in any of the other " "categories. The associated value is a string indicating what precisely went " @@ -585,7 +688,7 @@ msgstr "" "détectée. La valeur associée est une chaîne de caractères indiquant " "précisément ce qui s'est mal passé." -#: library/exceptions.rst:357 +#: library/exceptions.rst:422 msgid "" "Raised by built-in function :func:`next` and an :term:`iterator`\\'s :meth:" "`~iterator.__next__` method to signal that there are no further items " @@ -595,7 +698,7 @@ msgstr "" "__next__` d'un :term:`iterator` (itérateur) pour signaler qu'il n'y a pas " "d'autres éléments produits par l'itérateur." -#: library/exceptions.rst:361 +#: library/exceptions.rst:426 msgid "" "The exception object has a single attribute :attr:`value`, which is given as " "an argument when constructing the exception, and defaults to :const:`None`." @@ -604,7 +707,7 @@ msgstr "" "argument lors de la construction de l'exception, et vaut :const:`None` par " "défaut." -#: library/exceptions.rst:365 +#: library/exceptions.rst:430 msgid "" "When a :term:`generator` or :term:`coroutine` function returns, a new :exc:" "`StopIteration` instance is raised, and the value returned by the function " @@ -615,7 +718,7 @@ msgstr "" "valeur retournée par la fonction est passée au paramètre :attr:`value` du " "constructeur de l'exception." -#: library/exceptions.rst:370 +#: library/exceptions.rst:435 msgid "" "If a generator code directly or indirectly raises :exc:`StopIteration`, it " "is converted into a :exc:`RuntimeError` (retaining the :exc:`StopIteration` " @@ -625,7 +728,7 @@ msgstr "" "`StopIteration`, elle est convertie en :exc:`RuntimeError` (en conservant :" "exc:`StopIteration` comme cause de la nouvelle exception)." -#: library/exceptions.rst:374 +#: library/exceptions.rst:439 msgid "" "Added ``value`` attribute and the ability for generator functions to use it " "to return a value." @@ -633,15 +736,15 @@ msgstr "" "Ajout de l'attribut ``value`` et de la possibilité pour les fonctions de " "générateur de l'utiliser pour retourner une valeur." -#: library/exceptions.rst:378 +#: library/exceptions.rst:443 msgid "" "Introduced the RuntimeError transformation via ``from __future__ import " "generator_stop``, see :pep:`479`." msgstr "" -"Introduit la transformation des erreurs RuntimeError via ``from __future__ " -"import generator_stop``, cf. :pep:`479`." +"Introduit la transformation des erreurs ``RuntimeError`` via ``from " +"__future__ import generator_stop``, cf. :pep:`479`." -#: library/exceptions.rst:382 +#: library/exceptions.rst:447 msgid "" "Enable :pep:`479` for all code by default: a :exc:`StopIteration` error " "raised in a generator is transformed into a :exc:`RuntimeError`." @@ -650,7 +753,7 @@ msgstr "" "`StopIteration` est levée dans un générateur elle est transformée en une :" "exc:`RuntimeError`." -#: library/exceptions.rst:388 +#: library/exceptions.rst:453 msgid "" "Must be raised by :meth:`__anext__` method of an :term:`asynchronous " "iterator` object to stop the iteration." @@ -658,46 +761,87 @@ msgstr "" "Doit être levée par la méthode :meth:`__anext__` d'un objet :term:" "`asynchronous iterator` pour arrêter l'itération." -#: library/exceptions.rst:395 +#: library/exceptions.rst:460 msgid "" "Raised when the parser encounters a syntax error. This may occur in an :" -"keyword:`import` statement, in a call to the built-in functions :func:`exec` " -"or :func:`eval`, or when reading the initial script or standard input (also " -"interactively)." +"keyword:`import` statement, in a call to the built-in functions :func:" +"`compile`, :func:`exec`, or :func:`eval`, or when reading the initial script " +"or standard input (also interactively)." msgstr "" "Levée lorsque l'analyseur syntaxique rencontre une erreur de syntaxe. Cela " "peut se produire dans une instruction :keyword:`import`, dans un appel aux " -"fonctions natives :func:`exec` ou :func:`eval`, ou lors de la lecture du " -"script initial ou de l'entrée standard (également de manière interactive)." +"fonctions natives :func:`compile`, :func:`exec` ou :func:`eval`, ou lors de " +"la lecture du script initial ou de l'entrée standard (également de manière " +"interactive)." -#: library/exceptions.rst:400 +#: library/exceptions.rst:466 msgid "" -"The :func:`str` of the exception instance returns only the error message." +"The :func:`str` of the exception instance returns only the error message. " +"Details is a tuple whose members are also available as separate attributes." msgstr "" +"La conversion en chaîne avec :func:`str` de l'instance de l'exception ne " +"renvoie que le message d'erreur. L'argument ``details`` est un *n*-uplet dont " +"les membres sont disponibles en tant qu'attributs séparés." -#: library/exceptions.rst:404 -#, fuzzy +#: library/exceptions.rst:471 msgid "The name of the file the syntax error occurred in." -msgstr "Le nom de l'encodage qui a provoqué l'erreur." +msgstr "Le nom du fichier dans lequel l'erreur de syntaxe a été rencontrée." -#: library/exceptions.rst:408 +#: library/exceptions.rst:475 msgid "" "Which line number in the file the error occurred in. This is 1-indexed: the " "first line in the file has a ``lineno`` of 1." msgstr "" +"Le numéro de la ligne dans le fichier où l'erreur s'est produite. L'indiçage " +"commence à 1 : ``lineno`` vaut 1 pour la première ligne du fichier." -#: library/exceptions.rst:413 +#: library/exceptions.rst:480 msgid "" "The column in the line where the error occurred. This is 1-indexed: the " "first character in the line has an ``offset`` of 1." msgstr "" +"La colonne dans la ligne où l'erreur s'est produite. L'indiçage commence à " +"1 : ``offset`` vaut 1 pour le premier caractère de la ligne." -#: library/exceptions.rst:418 -#, fuzzy +#: library/exceptions.rst:485 msgid "The source code text involved in the error." -msgstr "Le nom de l'encodage qui a provoqué l'erreur." +msgstr "Le texte du code source impliqué dans l'erreur." -#: library/exceptions.rst:423 +#: library/exceptions.rst:489 +msgid "" +"Which line number in the file the error occurred ends in. This is 1-indexed: " +"the first line in the file has a ``lineno`` of 1." +msgstr "" +"Le numéro de la dernière ligne produisant l'erreur. L'indiçage commence à " +"1 : ``lineno`` vaut 1 pour la première ligne du fichier." + +#: library/exceptions.rst:494 +msgid "" +"The column in the end line where the error occurred finishes. This is 1-" +"indexed: the first character in the line has an ``offset`` of 1." +msgstr "" +"Le numéro de la dernière colonne (de la dernière ligne) produisant l'erreur. " +"L'indiçage commence à 1 : ``offset`` vaut 1 pour le premier caractère de la " +"ligne." + +#: library/exceptions.rst:497 +msgid "" +"For errors in f-string fields, the message is prefixed by \"f-string: \" and " +"the offsets are offsets in a text constructed from the replacement " +"expression. For example, compiling f'Bad {a b} field' results in this args " +"attribute: ('f-string: ...', ('', 1, 2, '(a b)\\n', 1, 5))." +msgstr "" +"Pour les erreurs dans les chaînes de formatage *f-strings*, le message " +"commence par « f-string: » et les champs *offset* sont les décalages dans " +"un texte construit à partir de l’expression de remplacement. Par exemple, " +"compiler ``f'Bad {a b} field'`` produit cet attribut *args* : ``('f-" +"string: ...', ('', 1, 2, '(a b)\\n', 1, 5)).``" + +#: library/exceptions.rst:502 +msgid "Added the :attr:`end_lineno` and :attr:`end_offset` attributes." +msgstr "Ajout des attributs :attr:`end_lineno` et :attr:`end_offset`." + +#: library/exceptions.rst:507 msgid "" "Base class for syntax errors related to incorrect indentation. This is a " "subclass of :exc:`SyntaxError`." @@ -705,7 +849,7 @@ msgstr "" "Classe de base pour les erreurs de syntaxe liées à une indentation " "incorrecte. C'est une sous-classe de :exc:`SyntaxError`." -#: library/exceptions.rst:429 +#: library/exceptions.rst:513 msgid "" "Raised when indentation contains an inconsistent use of tabs and spaces. " "This is a subclass of :exc:`IndentationError`." @@ -713,7 +857,7 @@ msgstr "" "Levée lorsqu'une indentation contient une utilisation incohérente des " "tabulations et des espaces. C'est une sous-classe de :exc:`IndentationError`." -#: library/exceptions.rst:435 +#: library/exceptions.rst:519 msgid "" "Raised when the interpreter finds an internal error, but the situation does " "not look so serious to cause it to abandon all hope. The associated value is " @@ -724,7 +868,7 @@ msgstr "" "espoir. La valeur associée est une chaîne de caractères indiquant l'erreur " "qui est survenue (en termes bas niveau)." -#: library/exceptions.rst:439 +#: library/exceptions.rst:523 msgid "" "You should report this to the author or maintainer of your Python " "interpreter. Be sure to report the version of the Python interpreter (``sys." @@ -734,11 +878,11 @@ msgid "" msgstr "" "Vous devriez le signaler à l'auteur ou au responsable de votre interpréteur " "Python. Assurez-vous de signaler la version de l'interpréteur (``sys." -"version`` ; elle est également affichée au lancement d'une session " +"version`` ; elle est également affichée au lancement d'une session " "interactive), le message d'erreur exact (la valeur associée à l'exception) " "et si possible le code source du programme qui a déclenché l'erreur." -#: library/exceptions.rst:448 +#: library/exceptions.rst:532 msgid "" "This exception is raised by the :func:`sys.exit` function. It inherits " "from :exc:`BaseException` instead of :exc:`Exception` so that it is not " @@ -755,15 +899,15 @@ msgstr "" "exc:`BaseException` au lieu d':exc:`Exception` pour ne pas qu'elle soit " "interceptée accidentellement par du code qui intercepte :exc:`Exception`. " "Cela permet à l'exception de se propager correctement et de faire quitter " -"l'interpréteur. Lorsqu'elle n'est pas gérée, l'interpréteur Python quitte ; " +"l'interpréteur. Lorsqu'elle n'est pas gérée, l'interpréteur Python quitte ; " "aucune trace d'appels n'est affichée. Le constructeur accepte le même " "argument optionnel passé à :func:`sys.exit`. Si la valeur est un entier, " "elle spécifie l'état de sortie du système (passé à la fonction C :c:func:" -"`exit`) ; si elle est ``None``, l'état de sortie est zéro ; si elle a un " +"`exit`) ; si elle est ``None``, l'état de sortie est zéro ; si elle a un " "autre type (comme une chaîne de caractères), la valeur de l'objet est " "affichée et l'état de sortie est un." -#: library/exceptions.rst:459 +#: library/exceptions.rst:543 msgid "" "A call to :func:`sys.exit` is translated into an exception so that clean-up " "handlers (:keyword:`finally` clauses of :keyword:`try` statements) can be " @@ -780,7 +924,7 @@ msgstr "" "immédiatement (par exemple, dans le processus enfant après un appel à :func:" "`os.fork`)." -#: library/exceptions.rst:468 +#: library/exceptions.rst:552 msgid "" "The exit status or error message that is passed to the constructor. " "(Defaults to ``None``.)" @@ -788,7 +932,7 @@ msgstr "" "L'état de sortie ou le message d'erreur passé au constructeur. (``None`` par " "défaut.)" -#: library/exceptions.rst:474 +#: library/exceptions.rst:558 msgid "" "Raised when an operation or function is applied to an object of " "inappropriate type. The associated value is a string giving details about " @@ -798,7 +942,7 @@ msgstr "" "inapproprié. La valeur associée est une chaîne de caractères donnant des " "détails sur le type d'inadéquation." -#: library/exceptions.rst:477 +#: library/exceptions.rst:561 msgid "" "This exception may be raised by user code to indicate that an attempted " "operation on an object is not supported, and is not meant to be. If an " @@ -811,7 +955,7 @@ msgstr "" "donnée mais n'a pas encore fourni une implémentation, lever :exc:" "`NotImplementedError` est plus approprié." -#: library/exceptions.rst:482 +#: library/exceptions.rst:566 msgid "" "Passing arguments of the wrong type (e.g. passing a :class:`list` when an :" "class:`int` is expected) should result in a :exc:`TypeError`, but passing " @@ -823,7 +967,7 @@ msgstr "" "le passage d'arguments avec la mauvaise valeur (e.g. un nombre en dehors des " "limites attendues) devrait résulter en une :exc:`ValueError`." -#: library/exceptions.rst:489 +#: library/exceptions.rst:573 msgid "" "Raised when a reference is made to a local variable in a function or method, " "but no value has been bound to that variable. This is a subclass of :exc:" @@ -833,7 +977,7 @@ msgstr "" "ou une méthode, mais qu'aucune valeur n'a été liée à cette variable. C'est " "une sous-classe de :exc:`NameError`." -#: library/exceptions.rst:496 +#: library/exceptions.rst:580 msgid "" "Raised when a Unicode-related encoding or decoding error occurs. It is a " "subclass of :exc:`ValueError`." @@ -841,7 +985,7 @@ msgstr "" "Levée lorsqu'une erreur d'encodage ou de décodage liée à Unicode se produit. " "C'est une sous-classe de :exc:`ValueError`." -#: library/exceptions.rst:499 +#: library/exceptions.rst:583 msgid "" ":exc:`UnicodeError` has attributes that describe the encoding or decoding " "error. For example, ``err.object[err.start:err.end]`` gives the particular " @@ -851,27 +995,27 @@ msgstr "" "décodage. Par exemple, ``err.object[err.start:err.end]`` donne l'entrée " "particulière invalide sur laquelle le codec a échoué." -#: library/exceptions.rst:505 +#: library/exceptions.rst:589 msgid "The name of the encoding that raised the error." msgstr "Le nom de l'encodage qui a provoqué l'erreur." -#: library/exceptions.rst:509 +#: library/exceptions.rst:593 msgid "A string describing the specific codec error." msgstr "Une chaîne de caractères décrivant l'erreur de codec spécifique." -#: library/exceptions.rst:513 +#: library/exceptions.rst:597 msgid "The object the codec was attempting to encode or decode." msgstr "L'objet que le codec essayait d'encoder ou de décoder." -#: library/exceptions.rst:517 +#: library/exceptions.rst:601 msgid "The first index of invalid data in :attr:`object`." msgstr "Le premier index des données invalides dans :attr:`object`." -#: library/exceptions.rst:521 +#: library/exceptions.rst:605 msgid "The index after the last invalid data in :attr:`object`." msgstr "L'index après la dernière donnée invalide dans :attr:`object`." -#: library/exceptions.rst:526 +#: library/exceptions.rst:610 msgid "" "Raised when a Unicode-related error occurs during encoding. It is a " "subclass of :exc:`UnicodeError`." @@ -879,7 +1023,7 @@ msgstr "" "Levée lorsqu'une erreur liée à Unicode se produit durant l'encodage. C'est " "une sous-classe d':exc:`UnicodeError`." -#: library/exceptions.rst:532 +#: library/exceptions.rst:616 msgid "" "Raised when a Unicode-related error occurs during decoding. It is a " "subclass of :exc:`UnicodeError`." @@ -887,7 +1031,7 @@ msgstr "" "Levée lorsqu'une erreur liée à Unicode se produit durant le décodage. C'est " "une sous-classe d':exc:`UnicodeError`." -#: library/exceptions.rst:538 +#: library/exceptions.rst:622 msgid "" "Raised when a Unicode-related error occurs during translating. It is a " "subclass of :exc:`UnicodeError`." @@ -895,7 +1039,7 @@ msgstr "" "Levée lorsqu'une erreur liée à Unicode se produit durant la traduction. " "C'est une sous-classe d':exc:`UnicodeError`." -#: library/exceptions.rst:544 +#: library/exceptions.rst:628 msgid "" "Raised when an operation or function receives an argument that has the right " "type but an inappropriate value, and the situation is not described by a " @@ -905,7 +1049,7 @@ msgstr "" "le bon type mais une valeur inappropriée, et que la situation n'est pas " "décrite par une exception plus précise telle que :exc:`IndexError`." -#: library/exceptions.rst:551 +#: library/exceptions.rst:635 msgid "" "Raised when the second argument of a division or modulo operation is zero. " "The associated value is a string indicating the type of the operands and the " @@ -915,23 +1059,23 @@ msgstr "" "est zéro. La valeur associée est une chaîne indiquant le type des opérandes " "et de l'opération." -#: library/exceptions.rst:556 +#: library/exceptions.rst:640 msgid "" "The following exceptions are kept for compatibility with previous versions; " "starting from Python 3.3, they are aliases of :exc:`OSError`." msgstr "" "Les exceptions suivantes sont conservées pour la compatibilité avec les " -"anciennes versions ; depuis Python 3.3, ce sont des alias d':exc:`OSError`." +"anciennes versions ; depuis Python 3.3, ce sont des alias d':exc:`OSError`." -#: library/exceptions.rst:565 +#: library/exceptions.rst:649 msgid "Only available on Windows." msgstr "Seulement disponible sous Windows." -#: library/exceptions.rst:569 +#: library/exceptions.rst:653 msgid "OS exceptions" msgstr "Exceptions système" -#: library/exceptions.rst:571 +#: library/exceptions.rst:655 msgid "" "The following exceptions are subclasses of :exc:`OSError`, they get raised " "depending on the system error code." @@ -939,25 +1083,27 @@ msgstr "" "Les exceptions suivantes sont des sous-classes d':exc:`OSError`, elles sont " "levées en fonction du code d'erreur système." -#: library/exceptions.rst:576 +#: library/exceptions.rst:660 msgid "" "Raised when an operation would block on an object (e.g. socket) set for non-" -"blocking operation. Corresponds to :c:data:`errno` ``EAGAIN``, ``EALREADY``, " -"``EWOULDBLOCK`` and ``EINPROGRESS``." +"blocking operation. Corresponds to :c:data:`errno` :py:data:`~errno." +"EAGAIN`, :py:data:`~errno.EALREADY`, :py:data:`~errno.EWOULDBLOCK` and :py:" +"data:`~errno.EINPROGRESS`." msgstr "" "Levée lorsqu'une opération bloque sur un objet (par exemple un connecteur) " -"configuré pour une opération non-bloquante. Correspond à :c:data:`errno` " -"``EAGAIN``, ``EALREADY``, ``EWOULDBLOCK`` et ``EINPROGRESS``." +"configuré pour une opération non-bloquante. Correspond à :c:data:`errno` :py:" +"data:`~errno.EAGAIN`, :py:data:`~errno.EALREADY`, :py:data:`~errno." +"EWOULDBLOCK` et :py:data:`~errno.EINPROGRESS`." -#: library/exceptions.rst:581 +#: library/exceptions.rst:665 msgid "" "In addition to those of :exc:`OSError`, :exc:`BlockingIOError` can have one " "more attribute:" msgstr "" "En plus de ceux de :exc:`OSError`, :exc:`BlockingIOError` peut avoir un " -"attribut de plus :" +"attribut de plus :" -#: library/exceptions.rst:586 +#: library/exceptions.rst:670 msgid "" "An integer containing the number of characters written to the stream before " "it blocked. This attribute is available when using the buffered I/O classes " @@ -967,19 +1113,19 @@ msgstr "" "qu'il ne soit bloqué. Cet attribut est disponible lors de l'utilisation des " "classes tampon entrées-sorties du module :mod:`io`." -#: library/exceptions.rst:592 +#: library/exceptions.rst:676 msgid "" "Raised when an operation on a child process failed. Corresponds to :c:data:" -"`errno` ``ECHILD``." +"`errno` :py:data:`~errno.ECHILD`." msgstr "" "Levée lorsqu'une opération sur un processus enfant a échoué. Correspond à :c:" -"data:`errno` ``ECHILD``." +"data:`errno` :py:data:`~errno.ECHILD`." -#: library/exceptions.rst:597 +#: library/exceptions.rst:681 msgid "A base class for connection-related issues." msgstr "Une classe de base pour les problèmes de connexion." -#: library/exceptions.rst:599 +#: library/exceptions.rst:683 msgid "" "Subclasses are :exc:`BrokenPipeError`, :exc:`ConnectionAbortedError`, :exc:" "`ConnectionRefusedError` and :exc:`ConnectionResetError`." @@ -988,61 +1134,65 @@ msgstr "" "`ConnectionAbortedError`, :exc:`ConnectionRefusedError` et :exc:" "`ConnectionResetError`." -#: library/exceptions.rst:604 +#: library/exceptions.rst:688 msgid "" "A subclass of :exc:`ConnectionError`, raised when trying to write on a pipe " "while the other end has been closed, or trying to write on a socket which " -"has been shutdown for writing. Corresponds to :c:data:`errno` ``EPIPE`` and " -"``ESHUTDOWN``." +"has been shutdown for writing. Corresponds to :c:data:`errno` :py:data:" +"`~errno.EPIPE` and :py:data:`~errno.ESHUTDOWN`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levé en essayant d'écrire sur un " "*pipe* alors que l'autre extrémité a été fermée, ou en essayant d'écrire sur " "un connecteur (*socket* en anglais) qui a été fermé pour l'écriture. " -"Correspond à :c:data:`errno` ``EPIPE`` et ``ESHUTDOWN``." +"Correspond à :c:data:`errno` :py:data:`~errno.EPIPE` et :py:data:`~errno." +"ESHUTDOWN`." -#: library/exceptions.rst:611 +#: library/exceptions.rst:695 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " -"aborted by the peer. Corresponds to :c:data:`errno` ``ECONNABORTED``." +"aborted by the peer. Corresponds to :c:data:`errno` :py:data:`~errno." +"ECONNABORTED`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levée lorsqu'une tentative de " -"connexion est interrompue par le pair. Correspond à :c:data:`errno` " -"``ECONNABORTED``." +"connexion est interrompue par le pair. Correspond à :c:data:`errno` :py:data:" +"`~errno.ECONNABORTED`." -#: library/exceptions.rst:617 +#: library/exceptions.rst:701 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " -"refused by the peer. Corresponds to :c:data:`errno` ``ECONNREFUSED``." +"refused by the peer. Corresponds to :c:data:`errno` :py:data:`~errno." +"ECONNREFUSED`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levée lorsqu'une tentative de " -"connexion est refusée par le pair. Correspond à :c:data:`errno` " -"``ECONNREFUSED``." +"connexion est refusée par le pair. Correspond à :c:data:`errno` :py:data:" +"`~errno.ECONNREFUSED`." -#: library/exceptions.rst:623 +#: library/exceptions.rst:707 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection is reset by " -"the peer. Corresponds to :c:data:`errno` ``ECONNRESET``." +"the peer. Corresponds to :c:data:`errno` :py:data:`~errno.ECONNRESET`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levée lorsqu'une connexion est " -"réinitialisée par le pair. Correspond à :c:data:`errno` ``ECONNRESET``." +"réinitialisée par le pair. Correspond à :c:data:`errno` :py:data:`~errno." +"ECONNRESET`." -#: library/exceptions.rst:629 +#: library/exceptions.rst:713 msgid "" "Raised when trying to create a file or directory which already exists. " -"Corresponds to :c:data:`errno` ``EEXIST``." +"Corresponds to :c:data:`errno` :py:data:`~errno.EEXIST`." msgstr "" -"Levée en essayant de créer un fichier ou un répertoire qui existe déjà. " -"Correspond à :c:data:`errno` ``EEXIST``." +"Levée pendant la tentative de création d'un fichier ou d'un répertoire qui " +"existe déjà. Correspond à :c:data:`errno` :py:data:`~errno.EEXIST`." -#: library/exceptions.rst:634 +#: library/exceptions.rst:718 msgid "" "Raised when a file or directory is requested but doesn't exist. Corresponds " -"to :c:data:`errno` ``ENOENT``." +"to :c:data:`errno` :py:data:`~errno.ENOENT`." msgstr "" "Levée lorsqu'un fichier ou répertoire est demandé mais n'existe pas. " -"Correspond à :c:data:`errno` ``ENOENT``." +"Correspond à :c:data:`errno` :py:data:`~errno.ENOENT`." -#: library/exceptions.rst:639 +#: library/exceptions.rst:723 msgid "" "Raised when a system call is interrupted by an incoming signal. Corresponds " "to :c:data:`errno` :py:data:`~errno.EINTR`." @@ -1050,7 +1200,7 @@ msgstr "" "Levée lorsqu'un appel système est interrompu par un signal entrant. " "Correspond à :c:data:`errno` :py:data:`~errno.EINTR`." -#: library/exceptions.rst:642 +#: library/exceptions.rst:726 msgid "" "Python now retries system calls when a syscall is interrupted by a signal, " "except if the signal handler raises an exception (see :pep:`475` for the " @@ -1060,63 +1210,68 @@ msgstr "" "un signal, sauf si le gestionnaire de signal lève une exception (voir :pep:" "`475` pour les raisons), au lieu de lever :exc:`InterruptedError`." -#: library/exceptions.rst:649 +#: library/exceptions.rst:733 msgid "" "Raised when a file operation (such as :func:`os.remove`) is requested on a " -"directory. Corresponds to :c:data:`errno` ``EISDIR``." +"directory. Corresponds to :c:data:`errno` :py:data:`~errno.EISDIR`." msgstr "" "Levée lorsqu'une opération sur un fichier (comme :func:`os.remove`) est " -"demandée sur un répertoire. Correspond à :c:data:`errno` ``EISDIR``." +"demandée sur un répertoire. Correspond à :c:data:`errno` :py:data:`~errno." +"EISDIR`." -#: library/exceptions.rst:655 +#: library/exceptions.rst:739 msgid "" "Raised when a directory operation (such as :func:`os.listdir`) is requested " -"on something which is not a directory. Corresponds to :c:data:`errno` " -"``ENOTDIR``." +"on something which is not a directory. On most POSIX platforms, it may also " +"be raised if an operation attempts to open or traverse a non-directory file " +"as if it were a directory. Corresponds to :c:data:`errno` :py:data:`~errno." +"ENOTDIR`." msgstr "" "Levée lorsqu'une opération sur un répertoire (comme :func:`os.listdir`) est " -"demandée sur autre chose qu'un répertoire. Correspond à :c:data:`errno` " -"``ENOTDIR``." +"demandée sur autre chose qu'un répertoire. Sur la majorité des plateformes " +"*POSIX*, elle est aussi levée quand une opération tente d'ouvrir ou de " +"traverser un fichier qui n'est pas un répertoire comme s'il en était un. " +"Correspond à :c:data:`errno` :py:data:`~errno.ENOTDIR`." -#: library/exceptions.rst:661 +#: library/exceptions.rst:747 msgid "" "Raised when trying to run an operation without the adequate access rights - " -"for example filesystem permissions. Corresponds to :c:data:`errno` " -"``EACCES`` and ``EPERM``." +"for example filesystem permissions. Corresponds to :c:data:`errno` :py:data:" +"`~errno.EACCES` and :py:data:`~errno.EPERM`." msgstr "" "Levée lorsqu'on essaye d'exécuter une opération sans les droits d'accès " "adéquats — par exemple les permissions du système de fichiers. Correspond à :" -"c:data:`errno` ``EACCES`` et ``EPERM``." +"c:data:`errno` :py:data:`~errno.EACCES` et :py:data:`~errno.EPERM`." -#: library/exceptions.rst:667 +#: library/exceptions.rst:753 msgid "" -"Raised when a given process doesn't exist. Corresponds to :c:data:`errno` " -"``ESRCH``." +"Raised when a given process doesn't exist. Corresponds to :c:data:`errno` :" +"py:data:`~errno.ESRCH`." msgstr "" -"Levée lorsqu'un processus donné n'existe pas. Correspond à :c:data:`errno` " -"``ESRCH``." +"Levée lorsqu'un processus donné n'existe pas. Correspond à :c:data:`errno` :" +"py:data:`~errno.ESRCH`." -#: library/exceptions.rst:672 +#: library/exceptions.rst:758 msgid "" "Raised when a system function timed out at the system level. Corresponds to :" -"c:data:`errno` ``ETIMEDOUT``." +"c:data:`errno` :py:data:`~errno.ETIMEDOUT`." msgstr "" "Levée lorsqu'une fonction système a expiré au niveau système. Correspond à :" -"c:data:`errno` ``ETIMEDOUT``." +"c:data:`errno` :py:data:`~errno.ETIMEDOUT`." -#: library/exceptions.rst:675 +#: library/exceptions.rst:761 msgid "All the above :exc:`OSError` subclasses were added." msgstr "Toutes les sous-classes d':exc:`OSError` ci-dessus ont été ajoutées." -#: library/exceptions.rst:681 +#: library/exceptions.rst:767 msgid ":pep:`3151` - Reworking the OS and IO exception hierarchy" msgstr ":pep:`3151` -- Refonte de la hiérarchie des exceptions système et IO" -#: library/exceptions.rst:687 +#: library/exceptions.rst:773 msgid "Warnings" msgstr "Avertissements" -#: library/exceptions.rst:689 +#: library/exceptions.rst:775 msgid "" "The following exceptions are used as warning categories; see the :ref:" "`warning-categories` documentation for more details." @@ -1124,16 +1279,16 @@ msgstr "" "Les exceptions suivantes sont utilisées comme catégories d'avertissement ; " "voir :mod:`warning-categories` pour plus d'informations." -#: library/exceptions.rst:694 +#: library/exceptions.rst:780 msgid "Base class for warning categories." msgstr "Classe de base pour les catégories d'avertissement." -#: library/exceptions.rst:699 +#: library/exceptions.rst:785 msgid "Base class for warnings generated by user code." msgstr "" "Classe de base pour les avertissements générés par du code utilisateur." -#: library/exceptions.rst:704 +#: library/exceptions.rst:790 msgid "" "Base class for warnings about deprecated features when those warnings are " "intended for other Python developers." @@ -1141,14 +1296,21 @@ msgstr "" "Classe de base pour les avertissements sur les fonctionnalités obsolètes, " "lorsque ces avertissements sont destinés aux autres développeurs Python." -#: library/exceptions.rst:707 +#: library/exceptions.rst:793 msgid "" "Ignored by the default warning filters, except in the ``__main__`` module (:" "pep:`565`). Enabling the :ref:`Python Development Mode ` shows this " "warning." msgstr "" +"Ignoré par les filtres d'avertissements par défaut, sauf dans le module " +"``__main__`` (:pep:`565`). Activer le :ref:`mode de développement de Python " +"` affiche cet avertissement." + +#: library/exceptions.rst:813 +msgid "The deprecation policy is described in :pep:`387`." +msgstr "La politique relative à l'obsolescence est décrite dans la :pep:`387`." -#: library/exceptions.rst:714 +#: library/exceptions.rst:802 msgid "" "Base class for warnings about features which are obsolete and expected to be " "deprecated in the future, but are not deprecated at the moment." @@ -1157,7 +1319,7 @@ msgstr "" "indiquent que la fonctionnalité peut encore être utilisée actuellement, mais " "qu'elle sera supprimée dans le futur." -#: library/exceptions.rst:718 +#: library/exceptions.rst:806 msgid "" "This class is rarely used as emitting a warning about a possible upcoming " "deprecation is unusual, and :exc:`DeprecationWarning` is preferred for " @@ -1167,23 +1329,25 @@ msgstr "" "d’une obsolescence à venir est inhabituel, et :exc:`DeprecationWarning` est " "préféré pour les obsolescences actuelles." -#: library/exceptions.rst:746 library/exceptions.rst:764 +#: library/exceptions.rst:836 library/exceptions.rst:863 msgid "" "Ignored by the default warning filters. Enabling the :ref:`Python " "Development Mode ` shows this warning." msgstr "" +"Ignoré par les filtres d'avertissements par défaut. Activer le :ref:`mode de " +"développement de Python ` affiche cet avertissement." -#: library/exceptions.rst:728 +#: library/exceptions.rst:818 msgid "Base class for warnings about dubious syntax." msgstr "Classe de base pour les avertissements sur de la syntaxe douteuse." -#: library/exceptions.rst:733 +#: library/exceptions.rst:823 msgid "Base class for warnings about dubious runtime behavior." msgstr "" "Classe de base pour les avertissements sur les comportements d'exécution " "douteux." -#: library/exceptions.rst:738 +#: library/exceptions.rst:828 msgid "" "Base class for warnings about deprecated features when those warnings are " "intended for end users of applications that are written in Python." @@ -1192,35 +1356,168 @@ msgstr "" "seront obsolètes dans le futur quand ces avertissements destinés aux " "utilisateurs finaux des applications écrites en Python." -#: library/exceptions.rst:744 +#: library/exceptions.rst:834 msgid "Base class for warnings about probable mistakes in module imports." msgstr "" "Classe de base pour les avertissements sur des erreurs probables dans les " "importations de modules." -#: library/exceptions.rst:752 +#: library/exceptions.rst:842 msgid "Base class for warnings related to Unicode." msgstr "Classe de base pour les avertissements liés à l'Unicode." -#: library/exceptions.rst:757 +#: library/exceptions.rst:847 +msgid "Base class for warnings related to encodings." +msgstr "Classe de base pour les avertissements liés à l'encodage des chaînes." + +#: library/exceptions.rst:849 +msgid "See :ref:`io-encoding-warning` for details." +msgstr "Voir :ref:`io-encoding-warning` pour plus d'informations." + +#: library/exceptions.rst:856 msgid "" "Base class for warnings related to :class:`bytes` and :class:`bytearray`." msgstr "" "Classe de base pour les avertissements liés à :class:`bytes` et :class:" "`bytearray`." -#: library/exceptions.rst:762 -#, fuzzy +#: library/exceptions.rst:861 msgid "Base class for warnings related to resource usage." -msgstr "Classe de base pour les avertissements liés à l'Unicode." +msgstr "" +"Classe de base pour les avertissements liés à l'utilisation des ressources." + +#: library/exceptions.rst:870 +#, fuzzy +msgid "Exception groups" +msgstr "Hiérarchie des exceptions" + +#: library/exceptions.rst:872 +msgid "" +"The following are used when it is necessary to raise multiple unrelated " +"exceptions. They are part of the exception hierarchy so they can be handled " +"with :keyword:`except` like all other exceptions. In addition, they are " +"recognised by :keyword:`except*`, which matches their subgroups " +"based on the types of the contained exceptions." +msgstr "" + +#: library/exceptions.rst:881 +msgid "" +"Both of these exception types wrap the exceptions in the sequence ``excs``. " +"The ``msg`` parameter must be a string. The difference between the two " +"classes is that :exc:`BaseExceptionGroup` extends :exc:`BaseException` and " +"it can wrap any exception, while :exc:`ExceptionGroup` extends :exc:" +"`Exception` and it can only wrap subclasses of :exc:`Exception`. This design " +"is so that ``except Exception`` catches an :exc:`ExceptionGroup` but not :" +"exc:`BaseExceptionGroup`." +msgstr "" + +#: library/exceptions.rst:889 +msgid "" +"The :exc:`BaseExceptionGroup` constructor returns an :exc:`ExceptionGroup` " +"rather than a :exc:`BaseExceptionGroup` if all contained exceptions are :exc:" +"`Exception` instances, so it can be used to make the selection automatic. " +"The :exc:`ExceptionGroup` constructor, on the other hand, raises a :exc:" +"`TypeError` if any contained exception is not an :exc:`Exception` subclass." +msgstr "" + +#: library/exceptions.rst:898 +msgid "The ``msg`` argument to the constructor. This is a read-only attribute." +msgstr "" + +#: library/exceptions.rst:902 +msgid "" +"A tuple of the exceptions in the ``excs`` sequence given to the constructor. " +"This is a read-only attribute." +msgstr "" + +#: library/exceptions.rst:907 +msgid "" +"Returns an exception group that contains only the exceptions from the " +"current group that match *condition*, or ``None`` if the result is empty." +msgstr "" + +#: library/exceptions.rst:910 +msgid "" +"The condition can be either a function that accepts an exception and returns " +"true for those that should be in the subgroup, or it can be an exception " +"type or a tuple of exception types, which is used to check for a match using " +"the same check that is used in an ``except`` clause." +msgstr "" + +#: library/exceptions.rst:915 +msgid "" +"The nesting structure of the current exception is preserved in the result, " +"as are the values of its :attr:`message`, :attr:`__traceback__`, :attr:" +"`__cause__`, :attr:`__context__` and :attr:`__notes__` fields. Empty nested " +"groups are omitted from the result." +msgstr "" + +#: library/exceptions.rst:920 +msgid "" +"The condition is checked for all exceptions in the nested exception group, " +"including the top-level and any nested exception groups. If the condition is " +"true for such an exception group, it is included in the result in full." +msgstr "" + +#: library/exceptions.rst:926 +msgid "" +"Like :meth:`subgroup`, but returns the pair ``(match, rest)`` where " +"``match`` is ``subgroup(condition)`` and ``rest`` is the remaining non-" +"matching part." +msgstr "" -#: library/exceptions.rst:772 +#: library/exceptions.rst:932 +msgid "" +"Returns an exception group with the same :attr:`message`, :attr:" +"`__traceback__`, :attr:`__cause__`, :attr:`__context__` and :attr:" +"`__notes__` but which wraps the exceptions in ``excs``." +msgstr "" + +#: library/exceptions.rst:936 +msgid "" +"This method is used by :meth:`subgroup` and :meth:`split`. A subclass needs " +"to override it in order to make :meth:`subgroup` and :meth:`split` return " +"instances of the subclass rather than :exc:`ExceptionGroup`. ::" +msgstr "" + +#: library/exceptions.rst:948 +msgid "" +"Note that :exc:`BaseExceptionGroup` defines :meth:`__new__`, so subclasses " +"that need a different constructor signature need to override that rather " +"than :meth:`__init__`. For example, the following defines an exception group " +"subclass which accepts an exit_code and and constructs the group's message " +"from it. ::" +msgstr "" + +#: library/exceptions.rst:967 msgid "Exception hierarchy" msgstr "Hiérarchie des exceptions" -#: library/exceptions.rst:774 +#: library/exceptions.rst:969 msgid "The class hierarchy for built-in exceptions is:" -msgstr "La hiérarchie de classes pour les exceptions natives est la suivante :" +msgstr "La hiérarchie de classes pour les exceptions natives est la suivante :" + +#~ msgid "" +#~ "When raising (or re-raising) an exception in an :keyword:`except` or :" +#~ "keyword:`finally` clause :attr:`__context__` is automatically set to the " +#~ "last exception caught; if the new exception is not handled the traceback " +#~ "that is eventually displayed will include the originating exception(s) " +#~ "and the final exception." +#~ msgstr "" +#~ "En levant (ou levant à nouveau) une exception dans une clause :keyword:" +#~ "`except` ou :keyword:`finally`, :attr:`__context__` est automatiquement " +#~ "assigné à la dernière exception interceptée ; si la nouvelle exception " +#~ "n'est pas gérée, la trace d'appels affichée inclut la ou les exception(s) " +#~ "d'origine et l'exception finale." + +#~ msgid "" +#~ "This method sets *tb* as the new traceback for the exception and returns " +#~ "the exception object. It is usually used in exception handling code like " +#~ "this::" +#~ msgstr "" +#~ "Cette méthode définit *tb* en tant que nouvelle trace d'appels pour " +#~ "l'exception et retourne l'objet exception. Elle est généralement utilisée " +#~ "dans du code de gestion d'exceptions comme ceci ::" #~ msgid "" #~ "Instances of this class have attributes :attr:`filename`, :attr:" diff --git a/library/faulthandler.po b/library/faulthandler.po index 1f224e6666..05808053de 100644 --- a/library/faulthandler.po +++ b/library/faulthandler.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\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" @@ -98,7 +98,7 @@ msgid "" "``False``, dump only the current thread." msgstr "" -#: library/faulthandler.rst:73 library/faulthandler.rst:133 +#: library/faulthandler.rst:73 library/faulthandler.rst:137 msgid "Added support for passing file descriptor to this function." msgstr "" @@ -124,21 +124,27 @@ msgstr "" msgid "On Windows, a handler for Windows exception is also installed." msgstr "" -#: library/faulthandler.rst:81 +#: library/faulthandler.rst:79 +msgid "" +"The dump now mentions if a garbage collector collection is running if " +"*all_threads* is true." +msgstr "" + +#: library/faulthandler.rst:85 msgid "" "Disable the fault handler: uninstall the signal handlers installed by :func:" "`enable`." msgstr "" -#: library/faulthandler.rst:86 +#: library/faulthandler.rst:90 msgid "Check if the fault handler is enabled." msgstr "" -#: library/faulthandler.rst:90 +#: library/faulthandler.rst:94 msgid "Dumping the tracebacks after a timeout" msgstr "" -#: library/faulthandler.rst:94 +#: library/faulthandler.rst:98 msgid "" "Dump the tracebacks of all threads, after a timeout of *timeout* seconds, or " "every *timeout* seconds if *repeat* is ``True``. If *exit* is ``True``, " @@ -149,58 +155,58 @@ msgid "" "a sub-second resolution." msgstr "" -#: library/faulthandler.rst:102 +#: library/faulthandler.rst:106 msgid "" "The *file* must be kept open until the traceback is dumped or :func:" "`cancel_dump_traceback_later` is called: see :ref:`issue with file " "descriptors `." msgstr "" -#: library/faulthandler.rst:106 +#: library/faulthandler.rst:110 msgid "This function is implemented using a watchdog thread." msgstr "" -#: library/faulthandler.rst:108 +#: library/faulthandler.rst:112 msgid "This function is now always available." msgstr "" -#: library/faulthandler.rst:116 +#: library/faulthandler.rst:120 msgid "Cancel the last call to :func:`dump_traceback_later`." msgstr "" -#: library/faulthandler.rst:120 +#: library/faulthandler.rst:124 msgid "Dumping the traceback on a user signal" msgstr "" -#: library/faulthandler.rst:124 +#: library/faulthandler.rst:128 msgid "" "Register a user signal: install a handler for the *signum* signal to dump " "the traceback of all threads, or of the current thread if *all_threads* is " "``False``, into *file*. Call the previous handler if chain is ``True``." msgstr "" -#: library/faulthandler.rst:128 +#: library/faulthandler.rst:132 msgid "" "The *file* must be kept open until the signal is unregistered by :func:" "`unregister`: see :ref:`issue with file descriptors `." msgstr "" -#: library/faulthandler.rst:142 +#: library/faulthandler.rst:146 msgid "Not available on Windows." msgstr "" -#: library/faulthandler.rst:138 +#: library/faulthandler.rst:142 msgid "" "Unregister a user signal: uninstall the handler of the *signum* signal " "installed by :func:`register`. Return ``True`` if the signal was registered, " "``False`` otherwise." msgstr "" -#: library/faulthandler.rst:148 +#: library/faulthandler.rst:152 msgid "Issue with file descriptors" msgstr "" -#: library/faulthandler.rst:150 +#: library/faulthandler.rst:154 msgid "" ":func:`enable`, :func:`dump_traceback_later` and :func:`register` keep the " "file descriptor of their *file* argument. If the file is closed and its file " @@ -209,11 +215,11 @@ msgid "" "Call these functions again each time that the file is replaced." msgstr "" -#: library/faulthandler.rst:158 +#: library/faulthandler.rst:162 msgid "Example" msgstr "Exemple" -#: library/faulthandler.rst:160 +#: library/faulthandler.rst:164 msgid "" "Example of a segmentation fault on Linux with and without enabling the fault " "handler:" diff --git a/library/fcntl.po b/library/fcntl.po index fd4d1271cf..188495e14c 100644 --- a/library/fcntl.po +++ b/library/fcntl.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2017-08-10 00:59+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -54,14 +54,28 @@ msgid "" "On macOS, the fcntl module exposes the ``F_GETPATH`` constant, which obtains " "the path of a file from a file descriptor. On Linux(>=3.15), the fcntl " "module exposes the ``F_OFD_GETLK``, ``F_OFD_SETLK`` and ``F_OFD_SETLKW`` " -"constants, which working with open file description locks." +"constants, which are used when working with open file description locks." msgstr "" -#: library/fcntl.rst:42 +#: library/fcntl.rst:43 +msgid "" +"On Linux >= 2.6.11, the fcntl module exposes the ``F_GETPIPE_SZ`` and " +"``F_SETPIPE_SZ`` constants, which allow to check and modify a pipe's size " +"respectively." +msgstr "" + +#: library/fcntl.rst:48 +msgid "" +"On FreeBSD, the fcntl module exposes the ``F_DUP2FD`` and " +"``F_DUP2FD_CLOEXEC`` constants, which allow to duplicate a file descriptor, " +"the latter setting ``FD_CLOEXEC`` flag in addition." +msgstr "" + +#: library/fcntl.rst:53 msgid "The module defines the following functions:" msgstr "Le module définit les fonctions suivantes :" -#: library/fcntl.rst:47 +#: library/fcntl.rst:58 msgid "" "Perform the operation *cmd* on file descriptor *fd* (file objects providing " "a :meth:`~io.IOBase.fileno` method are accepted as well). The values used " @@ -80,23 +94,23 @@ msgid "" "result in a segmentation violation or a more subtle data corruption." msgstr "" -#: library/fcntl.rst:64 +#: library/fcntl.rst:75 msgid "If the :c:func:`fcntl` fails, an :exc:`OSError` is raised." msgstr "" -#: library/fcntl.rst:66 +#: library/fcntl.rst:77 msgid "" "Raises an :ref:`auditing event ` ``fcntl.fcntl`` with arguments " "``fd``, ``cmd``, ``arg``." msgstr "" -#: library/fcntl.rst:71 +#: library/fcntl.rst:82 msgid "" "This function is identical to the :func:`~fcntl.fcntl` function, except that " "the argument handling is even more complicated." msgstr "" -#: library/fcntl.rst:74 +#: library/fcntl.rst:85 msgid "" "The *request* parameter is limited to values that can fit in 32-bits. " "Additional constants of interest for use as the *request* argument can be " @@ -104,26 +118,26 @@ msgid "" "relevant C header files." msgstr "" -#: library/fcntl.rst:79 +#: library/fcntl.rst:90 msgid "" "The parameter *arg* can be one of an integer, an object supporting the read-" "only buffer interface (like :class:`bytes`) or an object supporting the read-" "write buffer interface (like :class:`bytearray`)." msgstr "" -#: library/fcntl.rst:83 +#: library/fcntl.rst:94 msgid "" "In all but the last case, behaviour is as for the :func:`~fcntl.fcntl` " "function." msgstr "" -#: library/fcntl.rst:86 +#: library/fcntl.rst:97 msgid "" "If a mutable buffer is passed, then the behaviour is determined by the value " "of the *mutate_flag* parameter." msgstr "" -#: library/fcntl.rst:89 +#: library/fcntl.rst:100 msgid "" "If it is false, the buffer's mutability is ignored and behaviour is as for a " "read-only buffer, except that the 1024 byte limit mentioned above is avoided " @@ -131,7 +145,7 @@ msgid "" "system wants to put there, things should work." msgstr "" -#: library/fcntl.rst:94 +#: library/fcntl.rst:105 msgid "" "If *mutate_flag* is true (the default), then the buffer is (in effect) " "passed to the underlying :func:`ioctl` system call, the latter's return code " @@ -142,21 +156,21 @@ msgid "" "copied back into the supplied buffer." msgstr "" -#: library/fcntl.rst:102 +#: library/fcntl.rst:113 msgid "If the :c:func:`ioctl` fails, an :exc:`OSError` exception is raised." msgstr "" -#: library/fcntl.rst:104 +#: library/fcntl.rst:115 msgid "An example::" msgstr "Un exemple ::" -#: library/fcntl.rst:117 +#: library/fcntl.rst:128 msgid "" "Raises an :ref:`auditing event ` ``fcntl.ioctl`` with arguments " "``fd``, ``request``, ``arg``." msgstr "" -#: library/fcntl.rst:122 +#: library/fcntl.rst:133 msgid "" "Perform the lock operation *operation* on file descriptor *fd* (file objects " "providing a :meth:`~io.IOBase.fileno` method are accepted as well). See the " @@ -164,17 +178,17 @@ msgid "" "function is emulated using :c:func:`fcntl`.)" msgstr "" -#: library/fcntl.rst:127 +#: library/fcntl.rst:138 msgid "If the :c:func:`flock` fails, an :exc:`OSError` exception is raised." msgstr "" -#: library/fcntl.rst:129 +#: library/fcntl.rst:140 msgid "" "Raises an :ref:`auditing event ` ``fcntl.flock`` with arguments " "``fd``, ``operation``." msgstr "" -#: library/fcntl.rst:134 +#: library/fcntl.rst:145 msgid "" "This is essentially a wrapper around the :func:`~fcntl.fcntl` locking calls. " "*fd* is the file descriptor (file objects providing a :meth:`~io.IOBase." @@ -182,19 +196,19 @@ msgid "" "*cmd* is one of the following values:" msgstr "" -#: library/fcntl.rst:139 +#: library/fcntl.rst:150 msgid ":const:`LOCK_UN` -- unlock" msgstr "" -#: library/fcntl.rst:140 +#: library/fcntl.rst:151 msgid ":const:`LOCK_SH` -- acquire a shared lock" msgstr "" -#: library/fcntl.rst:141 +#: library/fcntl.rst:152 msgid ":const:`LOCK_EX` -- acquire an exclusive lock" msgstr "" -#: library/fcntl.rst:143 +#: library/fcntl.rst:154 msgid "" "When *cmd* is :const:`LOCK_SH` or :const:`LOCK_EX`, it can also be bitwise " "ORed with :const:`LOCK_NB` to avoid blocking on lock acquisition. If :const:" @@ -206,44 +220,44 @@ msgid "" "for writing." msgstr "" -#: library/fcntl.rst:152 +#: library/fcntl.rst:163 msgid "" "*len* is the number of bytes to lock, *start* is the byte offset at which " "the lock starts, relative to *whence*, and *whence* is as with :func:`io." "IOBase.seek`, specifically:" msgstr "" -#: library/fcntl.rst:156 +#: library/fcntl.rst:167 msgid ":const:`0` -- relative to the start of the file (:data:`os.SEEK_SET`)" msgstr "" -#: library/fcntl.rst:157 +#: library/fcntl.rst:168 msgid "" ":const:`1` -- relative to the current buffer position (:data:`os.SEEK_CUR`)" msgstr "" -#: library/fcntl.rst:158 +#: library/fcntl.rst:169 msgid ":const:`2` -- relative to the end of the file (:data:`os.SEEK_END`)" msgstr "" -#: library/fcntl.rst:160 +#: library/fcntl.rst:171 msgid "" "The default for *start* is 0, which means to start at the beginning of the " "file. The default for *len* is 0 which means to lock to the end of the " "file. The default for *whence* is also 0." msgstr "" -#: library/fcntl.rst:164 +#: library/fcntl.rst:175 msgid "" "Raises an :ref:`auditing event ` ``fcntl.lockf`` with arguments " "``fd``, ``cmd``, ``len``, ``start``, ``whence``." msgstr "" -#: library/fcntl.rst:166 +#: library/fcntl.rst:177 msgid "Examples (all on a SVR4 compliant system)::" msgstr "" -#: library/fcntl.rst:176 +#: library/fcntl.rst:187 msgid "" "Note that in the first example the return value variable *rv* will hold an " "integer value; in the second example it will hold a :class:`bytes` object. " @@ -251,11 +265,11 @@ msgid "" "therefore using the :func:`flock` call may be better." msgstr "" -#: library/fcntl.rst:187 +#: library/fcntl.rst:198 msgid "Module :mod:`os`" msgstr "Module :mod:`os`" -#: library/fcntl.rst:185 +#: library/fcntl.rst:196 msgid "" "If the locking flags :data:`~os.O_SHLOCK` and :data:`~os.O_EXLOCK` are " "present in the :mod:`os` module (on BSD only), the :func:`os.open` function " diff --git a/library/filecmp.po b/library/filecmp.po index e9e81bce8c..34a8d4b6db 100644 --- a/library/filecmp.po +++ b/library/filecmp.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" "PO-Revision-Date: 2019-05-23 20:39+0200\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -46,15 +46,23 @@ msgstr "" "égaux, ``False`` sinon." #: library/filecmp.rst:25 +#, fuzzy msgid "" -"If *shallow* is true, files with identical :func:`os.stat` signatures are " -"taken to be equal. Otherwise, the contents of the files are compared." +"If *shallow* is true and the :func:`os.stat` signatures (file type, size, " +"and modification time) of both files are identical, the files are taken to " +"be equal." msgstr "" "Si *shallow* est vrai, les fichiers avec des signatures :func:`os.stat()` " "identiques sont considérés comme égaux. Sinon, le contenu des fichiers est " "comparé." -#: library/filecmp.rst:28 +#: library/filecmp.rst:29 +msgid "" +"Otherwise, the files are treated as different if their sizes or contents " +"differ." +msgstr "" + +#: library/filecmp.rst:31 msgid "" "Note that no external programs are called from this function, giving it " "portability and efficiency." @@ -62,7 +70,7 @@ msgstr "" "Notez qu'aucun programme externe n'est appelé à partir de cette fonction, ce " "qui lui confère des qualités de portabilité et d'efficacité." -#: library/filecmp.rst:31 +#: library/filecmp.rst:34 msgid "" "This function uses a cache for past comparisons and the results, with cache " "entries invalidated if the :func:`os.stat` information for the file " @@ -73,7 +81,7 @@ msgstr "" "`os.stat()` du fichier sont modifiées. La totalité du cache peut être " "effacée avec :func:`clear_cache()`." -#: library/filecmp.rst:38 +#: library/filecmp.rst:41 msgid "" "Compare the files in the two directories *dir1* and *dir2* whose names are " "given by *common*." @@ -81,7 +89,7 @@ msgstr "" "Compare les fichiers des deux répertoires *dir1* et *dir2* dont les noms " "sont donnés par *common*." -#: library/filecmp.rst:41 +#: library/filecmp.rst:44 msgid "" "Returns three lists of file names: *match*, *mismatch*, *errors*. *match* " "contains the list of files that match, *mismatch* contains the names of " @@ -98,7 +106,7 @@ msgstr "" "l'utilisateur ne dispose pas de l'autorisation nécessaire pour les lire ou " "si la comparaison n'a pas pu être effectuée pour une autre raison." -#: library/filecmp.rst:48 +#: library/filecmp.rst:51 msgid "" "The *shallow* parameter has the same meaning and default value as for :func:" "`filecmp.cmp`." @@ -106,7 +114,7 @@ msgstr "" "Le paramètre *shallow* a la même signification et la même valeur par défaut " "que pour :func:`filecmp.cmp`." -#: library/filecmp.rst:51 +#: library/filecmp.rst:54 msgid "" "For example, ``cmpfiles('a', 'b', ['c', 'd/e'])`` will compare ``a/c`` with " "``b/c`` and ``a/d/e`` with ``b/d/e``. ``'c'`` and ``'d/e'`` will each be in " @@ -116,7 +124,7 @@ msgstr "" "c`` et ``a/d/e`` avec ``b/d/e``. ``'c'`` et ``'d/e'`` seront chacun dans " "l'une des trois listes renvoyées." -#: library/filecmp.rst:58 +#: library/filecmp.rst:61 msgid "" "Clear the filecmp cache. This may be useful if a file is compared so quickly " "after it is modified that it is within the mtime resolution of the " @@ -126,11 +134,11 @@ msgstr "" "juste après avoir été modifié (dans un délai inférieur à la résolution " "*mtime* du système de fichiers sous-jacent)." -#: library/filecmp.rst:68 +#: library/filecmp.rst:71 msgid "The :class:`dircmp` class" msgstr "La classe :class:`dircmp`" -#: library/filecmp.rst:72 +#: library/filecmp.rst:75 msgid "" "Construct a new directory comparison object, to compare the directories *a* " "and *b*. *ignore* is a list of names to ignore, and defaults to :attr:" @@ -142,7 +150,7 @@ msgstr "" "à :attr:`filecmp.DEFAULT_IGNORES`. *hide* est une liste de noms à cacher, " "par défaut à ``[os.curdir, os.pardir]``." -#: library/filecmp.rst:77 +#: library/filecmp.rst:80 msgid "" "The :class:`dircmp` class compares files by doing *shallow* comparisons as " "described for :func:`filecmp.cmp`." @@ -150,22 +158,22 @@ msgstr "" "La classe :class:`dircmp` compare les fichiers en faisant des comparaisons " "*superficielles* comme décrit pour :func:`filecmp.cmp`." -#: library/filecmp.rst:80 +#: library/filecmp.rst:83 msgid "The :class:`dircmp` class provides the following methods:" msgstr "La classe :class:`dircmp` fournit les méthodes suivantes :" -#: library/filecmp.rst:84 +#: library/filecmp.rst:87 msgid "Print (to :data:`sys.stdout`) a comparison between *a* and *b*." msgstr "Affiche (sur :data:`sys.stdout`) une comparaison entre *a* et *b*." -#: library/filecmp.rst:88 +#: library/filecmp.rst:91 msgid "" "Print a comparison between *a* and *b* and common immediate subdirectories." msgstr "" "Affiche une comparaison entre *a* et *b* et les sous-répertoires immédiats " "communs." -#: library/filecmp.rst:93 +#: library/filecmp.rst:96 msgid "" "Print a comparison between *a* and *b* and common subdirectories " "(recursively)." @@ -173,7 +181,7 @@ msgstr "" "Affiche une comparaison entre a et b et les sous-répertoires communs " "(récursivement)." -#: library/filecmp.rst:96 +#: library/filecmp.rst:99 msgid "" "The :class:`dircmp` class offers a number of interesting attributes that may " "be used to get various bits of information about the directory trees being " @@ -183,7 +191,7 @@ msgstr "" "qui peuvent être utilisés pour obtenir diverses informations sur les " "arborescences de répertoires comparées." -#: library/filecmp.rst:100 +#: library/filecmp.rst:103 msgid "" "Note that via :meth:`__getattr__` hooks, all attributes are computed lazily, " "so there is no speed penalty if only those attributes which are lightweight " @@ -193,45 +201,45 @@ msgstr "" "sont calculés de manière paresseuse. Il n'y a donc pas de pénalité en " "vitesse si seuls les attributs rapides à calculer sont utilisés." -#: library/filecmp.rst:107 +#: library/filecmp.rst:110 msgid "The directory *a*." msgstr "Le répertoire *a*." -#: library/filecmp.rst:112 +#: library/filecmp.rst:115 msgid "The directory *b*." msgstr "Le répertoire *b*." -#: library/filecmp.rst:117 +#: library/filecmp.rst:120 msgid "Files and subdirectories in *a*, filtered by *hide* and *ignore*." msgstr "" "Fichiers et sous-répertoires dans *a* , filtrés par *hide* et *ignore*." -#: library/filecmp.rst:122 +#: library/filecmp.rst:125 msgid "Files and subdirectories in *b*, filtered by *hide* and *ignore*." msgstr "" "Fichiers et sous-répertoires dans *b* , filtrés par *hide* et *ignore*." -#: library/filecmp.rst:127 +#: library/filecmp.rst:130 msgid "Files and subdirectories in both *a* and *b*." msgstr "Fichiers et sous-répertoires à la fois dans *a* et *b*." -#: library/filecmp.rst:132 +#: library/filecmp.rst:135 msgid "Files and subdirectories only in *a*." msgstr "Fichiers et sous-répertoires uniquement dans *a*." -#: library/filecmp.rst:137 +#: library/filecmp.rst:140 msgid "Files and subdirectories only in *b*." msgstr "Fichiers et sous-répertoires uniquement dans *b*." -#: library/filecmp.rst:142 +#: library/filecmp.rst:145 msgid "Subdirectories in both *a* and *b*." msgstr "Sous-répertoires à la fois dans *a* et *b*." -#: library/filecmp.rst:147 +#: library/filecmp.rst:150 msgid "Files in both *a* and *b*." msgstr "Fichiers à la fois dans *a* et *b*." -#: library/filecmp.rst:152 +#: library/filecmp.rst:155 msgid "" "Names in both *a* and *b*, such that the type differs between the " "directories, or names for which :func:`os.stat` reports an error." @@ -239,7 +247,7 @@ msgstr "" "Noms dans *a* et *b* , tels que le type diffère entre les répertoires, ou " "noms pour lesquels :func:`os.stat` signale une erreur." -#: library/filecmp.rst:158 +#: library/filecmp.rst:161 msgid "" "Files which are identical in both *a* and *b*, using the class's file " "comparison operator." @@ -247,7 +255,7 @@ msgstr "" "Fichiers identiques dans *a* et *b*, en utilisant l'opérateur de comparaison " "de fichiers de la classe." -#: library/filecmp.rst:164 +#: library/filecmp.rst:167 msgid "" "Files which are in both *a* and *b*, whose contents differ according to the " "class's file comparison operator." @@ -255,23 +263,32 @@ msgstr "" "Fichiers figurant à la fois dans *a* et dans *b* , dont le contenu diffère " "en fonction de l'opérateur de comparaison de fichiers de la classe." -#: library/filecmp.rst:170 +#: library/filecmp.rst:173 msgid "Files which are in both *a* and *b*, but could not be compared." msgstr "" "Fichiers à la fois dans *a* et dans *b* , mais ne pouvant pas être comparés." -#: library/filecmp.rst:175 +#: library/filecmp.rst:178 +#, fuzzy msgid "" -"A dictionary mapping names in :attr:`common_dirs` to :class:`dircmp` objects." +"A dictionary mapping names in :attr:`common_dirs` to :class:`dircmp` " +"instances (or MyDirCmp instances if this instance is of type MyDirCmp, a " +"subclass of :class:`dircmp`)." msgstr "" "Un dictionnaire faisant correspondre les noms dans :attr:`common_dirs` vers " "des objets :class:`dircmp`." #: library/filecmp.rst:182 +msgid "" +"Previously entries were always :class:`dircmp` instances. Now entries are " +"the same type as *self*, if *self* is a subclass of :class:`dircmp`." +msgstr "" + +#: library/filecmp.rst:191 msgid "List of directories ignored by :class:`dircmp` by default." msgstr "Liste des répertoires ignorés par défaut par :class:`dircmp`." -#: library/filecmp.rst:185 +#: library/filecmp.rst:194 msgid "" "Here is a simplified example of using the ``subdirs`` attribute to search " "recursively through two directories to show common different files::" diff --git a/library/fileinput.po b/library/fileinput.po index 8456c7ad15..6200a79453 100644 --- a/library/fileinput.po +++ b/library/fileinput.po @@ -5,18 +5,19 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2021-09-19 23:19+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.1\n" #: library/fileinput.rst:2 msgid ":mod:`fileinput` --- Iterate over lines from multiple input streams" -msgstr "" +msgstr ":mod:`fileinput` — Parcourt les lignes provenant de plusieurs entrées" #: library/fileinput.rst:10 msgid "**Source code:** :source:`Lib/fileinput.py`" @@ -28,10 +29,13 @@ msgid "" "over standard input or a list of files. If you just want to read or write " "one file see :func:`open`." msgstr "" +"Ce module offre une classe auxiliaire et des fonctions pour lire facilement " +"l'entrée standard ou bien les fichiers d'une liste. Si vous n'avez besoin de " +"lire ou écrire qu'un seul fichier, il suffit de :func:`open`." #: library/fileinput.rst:18 msgid "The typical use is::" -msgstr "" +msgstr "Ce module s'utilise le plus couramment comme ceci :" #: library/fileinput.rst:24 msgid "" @@ -42,6 +46,12 @@ msgid "" "it as the first argument to :func:`.input`. A single file name is also " "allowed." msgstr "" +"Ce code traite une à une les lignes des fichiers de ``sys.argv[1:]``. Si " +"cette liste est vide (pas d'argument en ligne de commande), il lit l'entrée " +"standard. Le nom de fichier ``'-'`` est équivalent à l'entrée standard (les " +"arguments facultatifs *mode* et *openhook* sont ignorés dans ce cas). On " +"peut aussi passer la liste des fichiers comme argument à :func:`.input`, " +"voire un nom de fichier unique." #: library/fileinput.rst:30 msgid "" @@ -50,12 +60,16 @@ msgid "" "`FileInput`. If an I/O error occurs during opening or reading a file, :exc:" "`OSError` is raised." msgstr "" +"Par défaut, tous les fichiers sont ouverts en mode texte. On peut changer ce " +"comportement à l'aide du paramètre *mode* de la fonction :func:`.input` ou " +"du constructeur de :class:`FileInput`. Si une erreur d'entrée-sortie se " +"produit durant l'ouverture ou la lecture d'un fichier, l'exception :exc:" +"`OSError` est levée." #: library/fileinput.rst:35 -#, fuzzy msgid ":exc:`IOError` used to be raised; it is now an alias of :exc:`OSError`." msgstr "" -":exc:`IOError` était normalement levée, elle est maintenant un alias de :exc:" +":exc:`IOError` était levée auparavant, elle est devenue un alias de :exc:" "`OSError`." #: library/fileinput.rst:38 @@ -64,6 +78,10 @@ msgid "" "return no lines, except perhaps for interactive use, or if it has been " "explicitly reset (e.g. using ``sys.stdin.seek(0)``)." msgstr "" +"Si ``sys.stdin`` apparaît plus d'une fois dans la liste, toutes les lignes " +"sont consommées dès la première fois, sauf éventuellement en cas d'usage " +"interactif ou si le flux d'entrée standard a été modifié dans l'intervalle " +"(par exemple avec ``sys.stdin.seek(0)``)." #: library/fileinput.rst:42 msgid "" @@ -71,94 +89,144 @@ msgid "" "in the list of filenames is noticeable at all is when the last file opened " "is empty." msgstr "" +"Les fichiers vides sont ouverts et refermés immédiatement. Ils ne sont pas " +"détectables dans la liste des fichiers, sauf éventuellement dans le cas où " +"le dernier fichier est vide." #: library/fileinput.rst:46 msgid "" "Lines are returned with any newlines intact, which means that the last line " "in a file may not have one." msgstr "" +"Les caractères de saut de ligne sont préservés, donc toutes les lignes se " +"terminent par un saut de ligne, sauf éventuellement la dernière ligne d'un " +"fichier." #: library/fileinput.rst:49 +#, fuzzy msgid "" "You can control how files are opened by providing an opening hook via the " "*openhook* parameter to :func:`fileinput.input` or :class:`FileInput()`. The " "hook must be a function that takes two arguments, *filename* and *mode*, and " -"returns an accordingly opened file-like object. Two useful hooks are already " -"provided by this module." -msgstr "" - -#: library/fileinput.rst:55 +"returns an accordingly opened file-like object. If *encoding* and/or " +"*errors* are specified, they will be passed to the hook as additional " +"keyword arguments. This module provides a :func:`hook_compressed` to support " +"compressed files." +msgstr "" +"Le paramètre *openhook* donne le contrôle sur la manière dont les fichiers " +"sont ouverts par :func:`fileinput.input` ou :class:`FileInput()`. Il s'agit " +"d'un point d'entrée automatique (*hook* en anglais). S'il est précisé, sa " +"valeur doit être une fonction, qui est appelée avec les arguments *filename* " +"et *mode* pour renvoyer un objet fichier-compatible ouvert selon *mode*. Ce " +"module contient deux fonctions prédéfinies qui peuvent être passées pour " +"*openhook*." + +#: library/fileinput.rst:56 msgid "The following function is the primary interface of this module:" -msgstr "" +msgstr "La fonction suivante constitue l'interface principale du module :" -#: library/fileinput.rst:60 +#: library/fileinput.rst:61 msgid "" "Create an instance of the :class:`FileInput` class. The instance will be " "used as global state for the functions of this module, and is also returned " "to use during iteration. The parameters to this function will be passed " "along to the constructor of the :class:`FileInput` class." msgstr "" +"Crée une instance de :class:`FileInput`, qui devient l'état global pour " +"toutes les fonctions du module. Elle est également renvoyée afin que " +"l'utilisateur puisse la parcourir comme un objet itérable. Tous les " +"paramètres de cette fonction sont transmis au constructeur de :class:" +"`FileInput`." -#: library/fileinput.rst:65 +#: library/fileinput.rst:66 msgid "" "The :class:`FileInput` instance can be used as a context manager in the :" "keyword:`with` statement. In this example, *input* is closed after the :" "keyword:`!with` statement is exited, even if an exception occurs::" msgstr "" +"Les instances de :class:`FileInput` peuvent s'utiliser comme gestionnaires " +"de contexte, avec l'instruction :keyword:`with`. Dans le code suivant, " +"*input* est fermé lorsque le bloc :keyword:`!with` se termine, y compris si " +"une exception l'a interrompu." -#: library/fileinput.rst:166 +#: library/fileinput.rst:170 msgid "Can be used as a context manager." -msgstr "" +msgstr "prise en charge du protocole de gestionnaire de contexte." -#: library/fileinput.rst:76 +#: library/fileinput.rst:77 msgid "The keyword parameters *mode* and *openhook* are now keyword-only." +msgstr "les paramètres *mode* et *openhook* doivent être nommés." + +#: library/fileinput.rst:176 library/fileinput.rst:210 +#, fuzzy +msgid "The keyword-only parameter *encoding* and *errors* are added." msgstr "" +"les paramètres *mode* et *openhook* doivent impérativement être nommés." -#: library/fileinput.rst:80 +#: library/fileinput.rst:84 msgid "" "The following functions use the global state created by :func:`fileinput." "input`; if there is no active state, :exc:`RuntimeError` is raised." msgstr "" +"Toutes les fonctions suivantes font appel à l'état global du module mis en " +"place par :func:`fileinput.input`. L'absence de cet état déclenche " +"l'exception :exc:`RuntimeError`." -#: library/fileinput.rst:86 +#: library/fileinput.rst:90 msgid "" "Return the name of the file currently being read. Before the first line has " "been read, returns ``None``." msgstr "" +"Renvoie le nom du fichier en train d'être lu, ou ``None`` avant la lecture " +"de la toute première ligne." -#: library/fileinput.rst:92 +#: library/fileinput.rst:96 msgid "" "Return the integer \"file descriptor\" for the current file. When no file is " "opened (before the first line and between files), returns ``-1``." msgstr "" +"Renvoie le descripteur de fichier (sous forme d'entier) utilisé pour lire le " +"fichier courant. Si aucun fichier n'est ouvert (avant la première ligne et " +"entre les fichiers), le résultat est ``-1``." -#: library/fileinput.rst:98 +#: library/fileinput.rst:102 msgid "" "Return the cumulative line number of the line that has just been read. " "Before the first line has been read, returns ``0``. After the last line of " "the last file has been read, returns the line number of that line." msgstr "" +"Renvoie le numéro de la ligne qui vient d'être lue, en commençant par la " +"première ligne du premier fichier. Avant cette toute première ligne, renvoie " +"``0``. Après la dernière ligne du dernier fichier, renvoie le numéro de " +"cette ligne." -#: library/fileinput.rst:105 +#: library/fileinput.rst:109 msgid "" "Return the line number in the current file. Before the first line has been " "read, returns ``0``. After the last line of the last file has been read, " "returns the line number of that line within the file." msgstr "" +"Renvoie le numéro de ligne relatif au fichier courant. Avant la toute " +"première ligne, renvoie ``0``. Après la toute dernière ligne, renvoie le " +"numéro de cette ligne par rapport à son fichier source." -#: library/fileinput.rst:112 +#: library/fileinput.rst:116 msgid "" "Return ``True`` if the line just read is the first line of its file, " "otherwise return ``False``." msgstr "" +"Renvoie ``True`` ou ``False`` selon que la ligne qui vient d'être lue est la " +"première du fichier." -#: library/fileinput.rst:118 +#: library/fileinput.rst:122 msgid "" "Return ``True`` if the last line was read from ``sys.stdin``, otherwise " "return ``False``." msgstr "" +"``True`` ou ``False`` selon que la dernière ligne lue provenait de ``sys." +"stdin`` ou non." -#: library/fileinput.rst:124 +#: library/fileinput.rst:128 msgid "" "Close the current file so that the next iteration will read the first line " "from the next file (if any); lines not read from the file will not count " @@ -168,62 +236,99 @@ msgid "" "file. After the last line of the last file has been read, this function has " "no effect." msgstr "" +"Ferme le fichier courant et laisse la lecture se poursuivre au début du " +"suivant (ou se terminer si c'était le dernier fichier ; dans ce cas cette " +"fonction ne fait rien). Les lignes court-circuitées ne comptent pas dans les " +"numéros des lignes des fichiers suivants. Le nom du fichier courant n'est " +"pas modifié immédiatement, mais seulement après que la première ligne du " +"fichier suivant a été lue. Cette fonction n'a pas d'effet avant la lecture " +"de la première ligne (elle ne peut pas sauter le premier fichier)." -#: library/fileinput.rst:134 +#: library/fileinput.rst:138 msgid "Close the sequence." msgstr "" +"Ferme le fichier courant et termine la lecture en sautant les fichiers " +"suivants." -#: library/fileinput.rst:136 +#: library/fileinput.rst:140 msgid "" "The class which implements the sequence behavior provided by the module is " "available for subclassing as well:" msgstr "" +"La classe qui implémente ce comportement du module est publique. On peut en " +"créer des classes filles." -#: library/fileinput.rst:142 +#: library/fileinput.rst:146 +#, fuzzy msgid "" "Class :class:`FileInput` is the implementation; its methods :meth:" "`filename`, :meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:" "`isfirstline`, :meth:`isstdin`, :meth:`nextfile` and :meth:`close` " "correspond to the functions of the same name in the module. In addition it " -"has a :meth:`~io.TextIOBase.readline` method which returns the next input " -"line, and a :meth:`__getitem__` method which implements the sequence " -"behavior. The sequence must be accessed in strictly sequential order; random " -"access and :meth:`~io.TextIOBase.readline` cannot be mixed." -msgstr "" +"is :term:`iterable` and has a :meth:`~io.TextIOBase.readline` method which " +"returns the next input line. The sequence must be accessed in strictly " +"sequential order; random access and :meth:`~io.TextIOBase.readline` cannot " +"be mixed." +msgstr "" +":class:`FileInput` est l'implémentation principale du module. Ses méthodes :" +"meth:`filename`, :meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:" +"`isfirstline`, :meth:`isstdin`, :meth:`nextfile` et :meth:`close` " +"correspondent aux fonctions du même nom au niveau du module. Elle possède " +"également une méthode :meth:`~io.TextIOBase.readline`, qui lit une nouvelle " +"ligne et la renvoie, ainsi qu'une méthode :meth:`__getitem__` qui permet " +"l'accès à un indice. Il faut lire les éléments de la séquence strictement " +"dans l'ordre (l'accès à un indice arbitraire n'étant pas compatible avec :" +"meth:`~io.TextIOBase.readline`)." -#: library/fileinput.rst:151 +#: library/fileinput.rst:154 +#, fuzzy msgid "" "With *mode* you can specify which file mode will be passed to :func:`open`. " -"It must be one of ``'r'``, ``'rU'``, ``'U'`` and ``'rb'``." +"It must be one of ``'r'`` and ``'rb'``." msgstr "" +"Le paramètre *mode* permet de préciser le mode d'ouverture des fichiers. Il " +"est passé directement à :func:`open`. Les valeurs possibles sont ``'r'``, " +"``'rU'``, ``'U'`` et ``'rb'``." -#: library/fileinput.rst:154 +#: library/fileinput.rst:157 msgid "" "The *openhook*, when given, must be a function that takes two arguments, " "*filename* and *mode*, and returns an accordingly opened file-like object. " "You cannot use *inplace* and *openhook* together." msgstr "" +"S'il est fourni, l'argument *openhook* est une fonction. Elle est appelée " +"avec les paramètres *filename* et *mode*, et renvoie un objet fichier-" +"compatible ouvert selon *mode*. Notez que *openhook* et *inplace* sont " +"mutuellement exclusifs." -#: library/fileinput.rst:158 +#: library/fileinput.rst:161 +msgid "" +"You can specify *encoding* and *errors* that is passed to :func:`open` or " +"*openhook*." +msgstr "" + +#: library/fileinput.rst:163 msgid "" "A :class:`FileInput` instance can be used as a context manager in the :" "keyword:`with` statement. In this example, *input* is closed after the :" "keyword:`!with` statement is exited, even if an exception occurs::" msgstr "" +"Les objets :class:`FileInput` peuvent aussi fonctionner comme gestionnaires " +"de contexte dans un bloc :keyword:`with`. Dans l'exemple suivant, *input* " +"est fermé à la fin du bloc :keyword:`!with`, même arrêté par une exception." -#: library/fileinput.rst:169 -msgid "The ``'rU'`` and ``'U'`` modes." -msgstr "" - -#: library/fileinput.rst:172 -msgid "Support for :meth:`__getitem__` method is deprecated." +#: library/fileinput.rst:173 +msgid "The keyword parameter *mode* and *openhook* are now keyword-only." msgstr "" +"les paramètres *mode* et *openhook* doivent impérativement être nommés." -#: library/fileinput.rst:175 -msgid "The keyword parameter *mode* and *openhook* are now keyword-only." +#: library/fileinput.rst:179 +msgid "" +"The ``'rU'`` and ``'U'`` modes and the :meth:`__getitem__` method have been " +"removed." msgstr "" -#: library/fileinput.rst:180 +#: library/fileinput.rst:184 msgid "" "**Optional in-place filtering:** if the keyword argument ``inplace=True`` is " "passed to :func:`fileinput.input` or to the :class:`FileInput` constructor, " @@ -236,37 +341,80 @@ msgid "" "extension is ``'.bak'`` and it is deleted when the output file is closed. " "In-place filtering is disabled when standard input is read." msgstr "" +"**Filtrage sur place optionnel :** si ``inplace=True`` est passé à :func:" +"`fileinput.input` ou au constructeur de :class:`FileInput`, chaque fichier " +"d'entrée est déplacé vers une sauvegarde et la sortie standard est redirigée " +"vers le fichier lui-même, ce qui permet d'écrire des filtres qui modifient " +"directement les fichiers existants. Si le paramètre *backup* est fourni, il " +"donne l'extension des fichiers de sauvegarde. Dans ce cas, la sauvegarde est " +"conservée après l'opération. Par défaut, les fichiers de sauvegarde ont " +"l'extension ``'.bak'`` et sont supprimés dès que le fichier de sortie est " +"fermé. Si un fichier existe avec le même nom que la sauvegarde, il est " +"écrasé. Le filtrage sur place ne fait rien pour l'entrée standard." -#: library/fileinput.rst:192 +#: library/fileinput.rst:196 msgid "The two following opening hooks are provided by this module:" msgstr "" +"Les deux fonctions suivantes fournissent des valeurs prédéfinies pour " +"*openhook*." -#: library/fileinput.rst:196 +#: library/fileinput.rst:200 msgid "" "Transparently opens files compressed with gzip and bzip2 (recognized by the " "extensions ``'.gz'`` and ``'.bz2'``) using the :mod:`gzip` and :mod:`bz2` " "modules. If the filename extension is not ``'.gz'`` or ``'.bz2'``, the file " "is opened normally (ie, using :func:`open` without any decompression)." msgstr "" +"Ouvre de façon transparente les fichiers compressés avec gzip ou bzip2, à " +"l'aide des modules :mod:`gzip` et :mod:`bz2`. Les fichiers compressés sont " +"reconnus aux extensions ``'.gz'`` et ``'.bz2'``. Tous les fichiers qui n'ont " +"pas l'une de ces deux extensions sont ouverts normalement (avec :func:" +"`open`, sans décompression)." -#: library/fileinput.rst:201 +#: library/fileinput.rst:205 +msgid "" +"The *encoding* and *errors* values are passed to :class:`io.TextIOWrapper` " +"for compressed files and open for normal files." +msgstr "" + +#: library/fileinput.rst:208 +#, fuzzy msgid "" "Usage example: ``fi = fileinput.FileInput(openhook=fileinput." -"hook_compressed)``" +"hook_compressed, encoding=\"utf-8\")``" msgstr "" +"Exemple d'utilisation : ``fi = fileinput.FileInput(openhook=fileinput." +"hook_compressed)``." -#: library/fileinput.rst:206 +#: library/fileinput.rst:216 msgid "" "Returns a hook which opens each file with :func:`open`, using the given " "*encoding* and *errors* to read the file." msgstr "" +"Renvoie une fonction qui ouvre les fichiers en passant à :func:`open` les " +"arguments *encoding* et *errors*. Le résultat peut être exploité à travers " +"le point d'entrée automatique *openhook*." -#: library/fileinput.rst:209 +#: library/fileinput.rst:219 msgid "" "Usage example: ``fi = fileinput.FileInput(openhook=fileinput." "hook_encoded(\"utf-8\", \"surrogateescape\"))``" msgstr "" +"Exemple d'utilisation : ``fi = fileinput.FileInput(openhook=fileinput." +"hook_encoded(\"utf-8\", \"surrogateescape\"))``." -#: library/fileinput.rst:213 +#: library/fileinput.rst:223 msgid "Added the optional *errors* parameter." +msgstr "ajout du paramètre facultatif *errors*." + +#: library/fileinput.rst:226 +msgid "" +"This function is deprecated since :func:`fileinput.input` and :class:" +"`FileInput` now have *encoding* and *errors* parameters." msgstr "" + +#~ msgid "The ``'rU'`` and ``'U'`` modes." +#~ msgstr "modes ``'rU'`` et ``'U'``." + +#~ msgid "Support for :meth:`__getitem__` method is deprecated." +#~ msgstr "accès à un indice avec :meth:`__getitem__`." diff --git a/library/fnmatch.po b/library/fnmatch.po index 73943cbdb5..6df610b99b 100644 --- a/library/fnmatch.po +++ b/library/fnmatch.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: 2021-04-28 20:16+0200\n" "Last-Translator: Dimitri Merejkowsky \n" "Language-Team: FRENCH \n" @@ -97,7 +97,14 @@ msgstr "" "commençant par un point ne sont pas traités de manière spéciale par ce " "module, et sont reconnus par les motifs ``*`` et ``?``." -#: library/fnmatch.rst:52 +#: library/fnmatch.rst:49 +msgid "" +"Also note that :func:`functools.lru_cache` with the *maxsize* of 32768 is " +"used to cache the compiled regex patterns in the following functions: :func:" +"`fnmatch`, :func:`fnmatchcase`, :func:`filter`." +msgstr "" + +#: library/fnmatch.rst:55 msgid "" "Test whether the *filename* string matches the *pattern* string, returning :" "const:`True` or :const:`False`. Both parameters are case-normalized using :" @@ -111,7 +118,7 @@ msgstr "" "`fnmatchcase` peut être utilisée pour réaliser une comparaison sensible à la " "casse, indépendamment du système d'exploitation." -#: library/fnmatch.rst:58 +#: library/fnmatch.rst:61 msgid "" "This example will print all file names in the current directory with the " "extension ``.txt``::" @@ -119,7 +126,7 @@ msgstr "" "Cet exemple affiche tous les noms de fichiers du répertoire courant ayant " "pour extension ``.txt`` ::" -#: library/fnmatch.rst:71 +#: library/fnmatch.rst:74 msgid "" "Test whether *filename* matches *pattern*, returning :const:`True` or :const:" "`False`; the comparison is case-sensitive and does not apply :func:`os.path." @@ -129,7 +136,7 @@ msgstr "" "`True` ou :const:`False` ; la comparaison est sensible à la casse et " "n'utilise pas la fonction :func:`os.path.normcase`." -#: library/fnmatch.rst:78 +#: library/fnmatch.rst:81 msgid "" "Construct a list from those elements of the iterable *names* that match " "*pattern*. It is the same as ``[n for n in names if fnmatch(n, pattern)]``, " @@ -139,7 +146,7 @@ msgstr "" "*pattern*. Similaire à ``[n for n in names if fnmatch(n, pattern)]``, mais " "implémenté plus efficacement." -#: library/fnmatch.rst:84 +#: library/fnmatch.rst:87 msgid "" "Return the shell-style *pattern* converted to a regular expression for using " "with :func:`re.match`." @@ -147,14 +154,14 @@ msgstr "" "Renvoie le motif *pattern*, de style shell, converti en une expression " "régulière utilisable avec :func:`re.match`." -#: library/fnmatch.rst:87 +#: library/fnmatch.rst:90 msgid "Example:" msgstr "Exemple :" -#: library/fnmatch.rst:101 +#: library/fnmatch.rst:104 msgid "Module :mod:`glob`" msgstr "Module :mod:`glob`" -#: library/fnmatch.rst:102 +#: library/fnmatch.rst:105 msgid "Unix shell-style path expansion." msgstr "Recherche de chemins de style shell Unix." diff --git a/library/formatter.po b/library/formatter.po deleted file mode 100644 index 04e2d4fcbd..0000000000 --- a/library/formatter.po +++ /dev/null @@ -1,381 +0,0 @@ -# Copyright (C) 2001-2018, Python Software Foundation -# For licence information, see README file. -# -msgid "" -msgstr "" -"Project-Id-Version: Python 3\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: FRENCH \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: library/formatter.rst:2 -msgid ":mod:`formatter` --- Generic output formatting" -msgstr "" - -#: library/formatter.rst:8 -msgid "Due to lack of usage, the formatter module has been deprecated." -msgstr "" - -#: library/formatter.rst:13 -msgid "" -"This module supports two interface definitions, each with multiple " -"implementations: The *formatter* interface, and the *writer* interface which " -"is required by the formatter interface." -msgstr "" - -#: library/formatter.rst:17 -msgid "" -"Formatter objects transform an abstract flow of formatting events into " -"specific output events on writer objects. Formatters manage several stack " -"structures to allow various properties of a writer object to be changed and " -"restored; writers need not be able to handle relative changes nor any sort " -"of \"change back\" operation. Specific writer properties which may be " -"controlled via formatter objects are horizontal alignment, font, and left " -"margin indentations. A mechanism is provided which supports providing " -"arbitrary, non-exclusive style settings to a writer as well. Additional " -"interfaces facilitate formatting events which are not reversible, such as " -"paragraph separation." -msgstr "" - -#: library/formatter.rst:27 -msgid "" -"Writer objects encapsulate device interfaces. Abstract devices, such as " -"file formats, are supported as well as physical devices. The provided " -"implementations all work with abstract devices. The interface makes " -"available mechanisms for setting the properties which formatter objects " -"manage and inserting data into the output." -msgstr "" - -#: library/formatter.rst:37 -msgid "The Formatter Interface" -msgstr "" - -#: library/formatter.rst:39 -msgid "" -"Interfaces to create formatters are dependent on the specific formatter " -"class being instantiated. The interfaces described below are the required " -"interfaces which all formatters must support once initialized." -msgstr "" - -#: library/formatter.rst:43 -msgid "One data element is defined at the module level:" -msgstr "" - -#: library/formatter.rst:48 -msgid "" -"Value which can be used in the font specification passed to the " -"``push_font()`` method described below, or as the new value to any other " -"``push_property()`` method. Pushing the ``AS_IS`` value allows the " -"corresponding ``pop_property()`` method to be called without having to track " -"whether the property was changed." -msgstr "" - -#: library/formatter.rst:53 -msgid "The following attributes are defined for formatter instance objects:" -msgstr "" - -#: library/formatter.rst:58 -msgid "The writer instance with which the formatter interacts." -msgstr "" - -#: library/formatter.rst:63 -msgid "" -"Close any open paragraphs and insert at least *blanklines* before the next " -"paragraph." -msgstr "" - -#: library/formatter.rst:69 -msgid "" -"Add a hard line break if one does not already exist. This does not break " -"the logical paragraph." -msgstr "" - -#: library/formatter.rst:75 -msgid "" -"Insert a horizontal rule in the output. A hard break is inserted if there " -"is data in the current paragraph, but the logical paragraph is not broken. " -"The arguments and keywords are passed on to the writer's :meth:" -"`send_line_break` method." -msgstr "" - -#: library/formatter.rst:83 -msgid "" -"Provide data which should be formatted with collapsed whitespace. Whitespace " -"from preceding and successive calls to :meth:`add_flowing_data` is " -"considered as well when the whitespace collapse is performed. The data " -"which is passed to this method is expected to be word-wrapped by the output " -"device. Note that any word-wrapping still must be performed by the writer " -"object due to the need to rely on device and font information." -msgstr "" - -#: library/formatter.rst:93 -msgid "" -"Provide data which should be passed to the writer unchanged. Whitespace, " -"including newline and tab characters, are considered legal in the value of " -"*data*." -msgstr "" - -#: library/formatter.rst:100 -msgid "" -"Insert a label which should be placed to the left of the current left " -"margin. This should be used for constructing bulleted or numbered lists. If " -"the *format* value is a string, it is interpreted as a format specification " -"for *counter*, which should be an integer. The result of this formatting " -"becomes the value of the label; if *format* is not a string it is used as " -"the label value directly. The label value is passed as the only argument to " -"the writer's :meth:`send_label_data` method. Interpretation of non-string " -"label values is dependent on the associated writer." -msgstr "" - -#: library/formatter.rst:109 -msgid "" -"Format specifications are strings which, in combination with a counter " -"value, are used to compute label values. Each character in the format " -"string is copied to the label value, with some characters recognized to " -"indicate a transform on the counter value. Specifically, the character " -"``'1'`` represents the counter value formatter as an Arabic number, the " -"characters ``'A'`` and ``'a'`` represent alphabetic representations of the " -"counter value in upper and lower case, respectively, and ``'I'`` and ``'i'`` " -"represent the counter value in Roman numerals, in upper and lower case. " -"Note that the alphabetic and roman transforms require that the counter value " -"be greater than zero." -msgstr "" - -#: library/formatter.rst:122 -msgid "" -"Send any pending whitespace buffered from a previous call to :meth:" -"`add_flowing_data` to the associated writer object. This should be called " -"before any direct manipulation of the writer object." -msgstr "" - -#: library/formatter.rst:129 -msgid "" -"Push a new alignment setting onto the alignment stack. This may be :const:" -"`AS_IS` if no change is desired. If the alignment value is changed from the " -"previous setting, the writer's :meth:`new_alignment` method is called with " -"the *align* value." -msgstr "" - -#: library/formatter.rst:137 -msgid "Restore the previous alignment." -msgstr "" - -#: library/formatter.rst:142 -msgid "" -"Change some or all font properties of the writer object. Properties which " -"are not set to :const:`AS_IS` are set to the values passed in while others " -"are maintained at their current settings. The writer's :meth:`new_font` " -"method is called with the fully resolved font specification." -msgstr "" - -#: library/formatter.rst:150 -msgid "Restore the previous font." -msgstr "" - -#: library/formatter.rst:155 -msgid "" -"Increase the number of left margin indentations by one, associating the " -"logical tag *margin* with the new indentation. The initial margin level is " -"``0``. Changed values of the logical tag must be true values; false values " -"other than :const:`AS_IS` are not sufficient to change the margin." -msgstr "" - -#: library/formatter.rst:163 -msgid "Restore the previous margin." -msgstr "" - -#: library/formatter.rst:168 -msgid "" -"Push any number of arbitrary style specifications. All styles are pushed " -"onto the styles stack in order. A tuple representing the entire stack, " -"including :const:`AS_IS` values, is passed to the writer's :meth:" -"`new_styles` method." -msgstr "" - -#: library/formatter.rst:175 -msgid "" -"Pop the last *n* style specifications passed to :meth:`push_style`. A tuple " -"representing the revised stack, including :const:`AS_IS` values, is passed " -"to the writer's :meth:`new_styles` method." -msgstr "" - -#: library/formatter.rst:182 -msgid "Set the spacing style for the writer." -msgstr "" - -#: library/formatter.rst:187 -msgid "" -"Inform the formatter that data has been added to the current paragraph out-" -"of-band. This should be used when the writer has been manipulated " -"directly. The optional *flag* argument can be set to false if the writer " -"manipulations produced a hard line break at the end of the output." -msgstr "" - -#: library/formatter.rst:196 -msgid "Formatter Implementations" -msgstr "" - -#: library/formatter.rst:198 -msgid "" -"Two implementations of formatter objects are provided by this module. Most " -"applications may use one of these classes without modification or " -"subclassing." -msgstr "" - -#: library/formatter.rst:204 -msgid "" -"A formatter which does nothing. If *writer* is omitted, a :class:" -"`NullWriter` instance is created. No methods of the writer are called by :" -"class:`NullFormatter` instances. Implementations should inherit from this " -"class if implementing a writer interface but don't need to inherit any " -"implementation." -msgstr "" - -#: library/formatter.rst:213 -msgid "" -"The standard formatter. This implementation has demonstrated wide " -"applicability to many writers, and may be used directly in most " -"circumstances. It has been used to implement a full-featured World Wide Web " -"browser." -msgstr "" - -#: library/formatter.rst:221 -msgid "The Writer Interface" -msgstr "" - -#: library/formatter.rst:223 -msgid "" -"Interfaces to create writers are dependent on the specific writer class " -"being instantiated. The interfaces described below are the required " -"interfaces which all writers must support once initialized. Note that while " -"most applications can use the :class:`AbstractFormatter` class as a " -"formatter, the writer must typically be provided by the application." -msgstr "" - -#: library/formatter.rst:232 -msgid "Flush any buffered output or device control events." -msgstr "" - -#: library/formatter.rst:237 -msgid "" -"Set the alignment style. The *align* value can be any object, but by " -"convention is a string or ``None``, where ``None`` indicates that the " -"writer's \"preferred\" alignment should be used. Conventional *align* values " -"are ``'left'``, ``'center'``, ``'right'``, and ``'justify'``." -msgstr "" - -#: library/formatter.rst:245 -msgid "" -"Set the font style. The value of *font* will be ``None``, indicating that " -"the device's default font should be used, or a tuple of the form ``(size, " -"italic, bold, teletype)``. Size will be a string indicating the size of " -"font that should be used; specific strings and their interpretation must be " -"defined by the application. The *italic*, *bold*, and *teletype* values are " -"Boolean values specifying which of those font attributes should be used." -msgstr "" - -#: library/formatter.rst:255 -msgid "" -"Set the margin level to the integer *level* and the logical tag to *margin*. " -"Interpretation of the logical tag is at the writer's discretion; the only " -"restriction on the value of the logical tag is that it not be a false value " -"for non-zero values of *level*." -msgstr "" - -#: library/formatter.rst:263 -msgid "Set the spacing style to *spacing*." -msgstr "" - -#: library/formatter.rst:268 -msgid "" -"Set additional styles. The *styles* value is a tuple of arbitrary values; " -"the value :const:`AS_IS` should be ignored. The *styles* tuple may be " -"interpreted either as a set or as a stack depending on the requirements of " -"the application and writer implementation." -msgstr "" - -#: library/formatter.rst:276 -msgid "Break the current line." -msgstr "" - -#: library/formatter.rst:281 -msgid "" -"Produce a paragraph separation of at least *blankline* blank lines, or the " -"equivalent. The *blankline* value will be an integer. Note that the " -"implementation will receive a call to :meth:`send_line_break` before this " -"call if a line break is needed; this method should not include ending the " -"last line of the paragraph. It is only responsible for vertical spacing " -"between paragraphs." -msgstr "" - -#: library/formatter.rst:291 -msgid "" -"Display a horizontal rule on the output device. The arguments to this " -"method are entirely application- and writer-specific, and should be " -"interpreted with care. The method implementation may assume that a line " -"break has already been issued via :meth:`send_line_break`." -msgstr "" - -#: library/formatter.rst:299 -msgid "" -"Output character data which may be word-wrapped and re-flowed as needed. " -"Within any sequence of calls to this method, the writer may assume that " -"spans of multiple whitespace characters have been collapsed to single space " -"characters." -msgstr "" - -#: library/formatter.rst:306 -msgid "" -"Output character data which has already been formatted for display. " -"Generally, this should be interpreted to mean that line breaks indicated by " -"newline characters should be preserved and no new line breaks should be " -"introduced. The data may contain embedded newline and tab characters, " -"unlike data provided to the :meth:`send_formatted_data` interface." -msgstr "" - -#: library/formatter.rst:315 -msgid "" -"Set *data* to the left of the current left margin, if possible. The value of " -"*data* is not restricted; treatment of non-string values is entirely " -"application- and writer-dependent. This method will only be called at the " -"beginning of a line." -msgstr "" - -#: library/formatter.rst:324 -msgid "Writer Implementations" -msgstr "" - -#: library/formatter.rst:326 -msgid "" -"Three implementations of the writer object interface are provided as " -"examples by this module. Most applications will need to derive new writer " -"classes from the :class:`NullWriter` class." -msgstr "" - -#: library/formatter.rst:333 -msgid "" -"A writer which only provides the interface definition; no actions are taken " -"on any methods. This should be the base class for all writers which do not " -"need to inherit any implementation methods." -msgstr "" - -#: library/formatter.rst:340 -msgid "" -"A writer which can be used in debugging formatters, but not much else. Each " -"method simply announces itself by printing its name and arguments on " -"standard output." -msgstr "" - -#: library/formatter.rst:347 -msgid "" -"Simple writer class which writes output on the :term:`file object` passed in " -"as *file* or, if *file* is omitted, on standard output. The output is " -"simply word-wrapped to the number of columns specified by *maxcol*. This " -"class is suitable for reflowing a sequence of paragraphs." -msgstr "" diff --git a/library/fractions.po b/library/fractions.po index a3fce028be..9768ebcde2 100644 --- a/library/fractions.po +++ b/library/fractions.po @@ -5,10 +5,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2021-03-22 14:55+0100\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-10-18 15:57+0200\n" "Last-Translator: Loc Cosnier \n" -"Language-Team: French \n" +"Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -73,22 +73,24 @@ msgstr "" "La représentation habituelle de cette forme est ::" #: library/fractions.rst:43 +#, fuzzy msgid "" "where the optional ``sign`` may be either '+' or '-' and ``numerator`` and " -"``denominator`` (if present) are strings of decimal digits. In addition, " +"``denominator`` (if present) are strings of decimal digits (underscores may " +"be used to delimit digits as with integral literals in code). In addition, " "any string that represents a finite value and is accepted by the :class:" "`float` constructor is also accepted by the :class:`Fraction` constructor. " "In either form the input string may also have leading and/or trailing " "whitespace. Here are some examples::" msgstr "" -"où le ``sign`` optionnel peut être soit `+` soit `-`, et ``numerator`` et " +"où le ``sign`` optionnel peut être soit ``+`` soit ``-``, et ``numerator`` et " "``denominator`` (si présent) sont des chaînes de chiffres décimaux. De " "plus, toute chaîne qui représente une valeur finie et acceptée par le " "constructeur de :class:`float` est aussi acceptée par celui de :class:" "`Fraction`. Dans ces deux formes, la chaîne d'entrée peut aussi contenir " "des espaces en début ou en fin de chaîne. Voici quelques exemples ::" -#: library/fractions.rst:77 +#: library/fractions.rst:78 msgid "" "The :class:`Fraction` class inherits from the abstract base class :class:" "`numbers.Rational`, and implements all of the methods and operations from " @@ -102,7 +104,7 @@ msgstr "" "comme immuables. En plus de cela, :class:`Fraction` possède les propriétés " "et méthodes suivantes :" -#: library/fractions.rst:83 +#: library/fractions.rst:84 msgid "" "The :class:`Fraction` constructor now accepts :class:`float` and :class:" "`decimal.Decimal` instances." @@ -110,7 +112,7 @@ msgstr "" "Le constructeur de :class:`Fraction` accepte maintenant des instances de :" "class:`float` et :class:`decimal.Decimal`." -#: library/fractions.rst:87 +#: library/fractions.rst:88 msgid "" "The :func:`math.gcd` function is now used to normalize the *numerator* and " "*denominator*. :func:`math.gcd` always return a :class:`int` type. " @@ -121,15 +123,27 @@ msgstr "" "class:`int`. Auparavant, le type du PGCD dépendait du *numerator* et du " "*denominator*." -#: library/fractions.rst:94 +#: library/fractions.rst:93 +msgid "" +"Underscores are now permitted when creating a :class:`Fraction` instance " +"from a string, following :PEP:`515` rules." +msgstr "" + +#: library/fractions.rst:97 +msgid "" +":class:`Fraction` implements ``__int__`` now to satisfy ``typing." +"SupportsInt`` instance checks." +msgstr "" + +#: library/fractions.rst:103 msgid "Numerator of the Fraction in lowest term." msgstr "Numérateur de la fraction irréductible." -#: library/fractions.rst:98 +#: library/fractions.rst:107 msgid "Denominator of the Fraction in lowest term." msgstr "Dénominateur de la fraction irréductible." -#: library/fractions.rst:103 +#: library/fractions.rst:112 msgid "" "Return a tuple of two integers, whose ratio is equal to the Fraction and " "with a positive denominator." @@ -137,18 +151,18 @@ msgstr "" "Renvoie un *n*-uplet de deux entiers, dont le quotient est égal à la " "fraction et dont le dénominateur est positif." -#: library/fractions.rst:110 +#: library/fractions.rst:119 msgid "" -"This class method constructs a :class:`Fraction` representing the exact " -"value of *flt*, which must be a :class:`float`. Beware that ``Fraction." -"from_float(0.3)`` is not the same value as ``Fraction(3, 10)``." +"Alternative constructor which only accepts instances of :class:`float` or :" +"class:`numbers.Integral`. Beware that ``Fraction.from_float(0.3)`` is not " +"the same value as ``Fraction(3, 10)``." msgstr "" -"Cette méthode de classe construit un objet :class:`Fraction` représentant la " -"valeur exacte de *flt*, qui doit être de type :class:`float`. Attention, " -"``Fraction.from_float(0.3)`` n'est pas la même valeur que ``Fraction(3, " -"10)``." +"Ce constructeur alternatif accepte (uniquement) des nombres à virgule " +"flottante, de classe :class:`float`, ou plus généralement des instances de :" +"class:`numbers.Integral`. Attention, ``Fraction.from_float(0.3)`` est " +"différent de ``Fraction(3, 10)``." -#: library/fractions.rst:116 +#: library/fractions.rst:125 msgid "" "From Python 3.2 onwards, you can also construct a :class:`Fraction` instance " "directly from a :class:`float`." @@ -156,15 +170,15 @@ msgstr "" "Depuis Python 3.2, vous pouvez aussi construire une instance de :class:" "`Fraction` directement depuis un :class:`float`." -#: library/fractions.rst:122 +#: library/fractions.rst:131 msgid "" -"This class method constructs a :class:`Fraction` representing the exact " -"value of *dec*, which must be a :class:`decimal.Decimal` instance." +"Alternative constructor which only accepts instances of :class:`decimal." +"Decimal` or :class:`numbers.Integral`." msgstr "" -"Cette méthode de classe construit un objet :class:`Fraction` représentant la " -"valeur exacte de *dec*, qui doit être de type :class:`decimal.Decimal`." +"Ce constructeur alternatif accepte (uniquement) les instances de :class:" +"`decimal.Decimal` ou :class:`numbers.Integral`." -#: library/fractions.rst:127 +#: library/fractions.rst:136 msgid "" "From Python 3.2 onwards, you can also construct a :class:`Fraction` instance " "directly from a :class:`decimal.Decimal` instance." @@ -172,7 +186,7 @@ msgstr "" "Depuis Python 3.2, vous pouvez aussi construire une instance de :class:" "`Fraction` directement depuis une instance de :class:`decimal.Decimal`." -#: library/fractions.rst:134 +#: library/fractions.rst:143 msgid "" "Finds and returns the closest :class:`Fraction` to ``self`` that has " "denominator at most max_denominator. This method is useful for finding " @@ -182,11 +196,11 @@ msgstr "" "plus *max_denominator* comme dénominateur. Cette méthode est utile pour " "trouver des approximations rationnelles de nombres flottants donnés :" -#: library/fractions.rst:142 +#: library/fractions.rst:151 msgid "or for recovering a rational number that's represented as a float:" msgstr "ou pour retrouver un nombre rationnel représenté par un flottant :" -#: library/fractions.rst:155 +#: library/fractions.rst:164 msgid "" "Returns the greatest :class:`int` ``<= self``. This method can also be " "accessed through the :func:`math.floor` function:" @@ -194,7 +208,7 @@ msgstr "" "Renvoie le plus grand :class:`int` ``<= self``. Cette méthode peut aussi " "être utilisée à travers la fonction :func:`math.floor`." -#: library/fractions.rst:165 +#: library/fractions.rst:174 msgid "" "Returns the least :class:`int` ``>= self``. This method can also be " "accessed through the :func:`math.ceil` function." @@ -202,7 +216,7 @@ msgstr "" "Renvoie le plus petit :class:`int` ``>= self``. Cette méthode peut aussi " "être utilisée à travers la fonction :func:`math.ceil`." -#: library/fractions.rst:172 +#: library/fractions.rst:181 msgid "" "The first version returns the nearest :class:`int` to ``self``, rounding " "half to even. The second version rounds ``self`` to the nearest multiple of " @@ -217,14 +231,21 @@ msgstr "" "au nombre pair le plus proche. Cette méthode peut aussi être utilisée à via " "la fonction :func:`round`." -#: library/fractions.rst:181 +#: library/fractions.rst:190 msgid "Module :mod:`numbers`" msgstr "Module :mod:`numbers`" -#: library/fractions.rst:182 +#: library/fractions.rst:191 msgid "The abstract base classes making up the numeric tower." msgstr "Les classes abstraites représentant la hiérarchie des nombres." +#~ msgid "" +#~ "This class method constructs a :class:`Fraction` representing the exact " +#~ "value of *dec*, which must be a :class:`decimal.Decimal` instance." +#~ msgstr "" +#~ "Cette méthode de classe construit un objet :class:`Fraction` représentant " +#~ "la valeur exacte de *dec*, qui doit être de type :class:`decimal.Decimal`." + #~ msgid "" #~ "Return the greatest common divisor of the integers *a* and *b*. If " #~ "either *a* or *b* is nonzero, then the absolute value of ``gcd(a, b)`` is " diff --git a/library/ftplib.po b/library/ftplib.po index b010659c6b..6d06978c0f 100644 --- a/library/ftplib.po +++ b/library/ftplib.po @@ -5,18 +5,19 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2022-10-20 16:07+0100\n" +"Last-Translator: \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0.1\n" #: library/ftplib.rst:2 msgid ":mod:`ftplib` --- FTP protocol client" -msgstr "" +msgstr ":mod:`ftplib` — Le protocole client FTP" #: library/ftplib.rst:7 msgid "**Source code:** :source:`Lib/ftplib.py`" @@ -29,16 +30,23 @@ msgid "" "use this to write Python programs that perform a variety of automated FTP " "jobs, such as mirroring other FTP servers. It is also used by the module :" "mod:`urllib.request` to handle URLs that use FTP. For more information on " -"FTP (File Transfer Protocol), see Internet :rfc:`959`." +"FTP (File Transfer Protocol), see internet :rfc:`959`." msgstr "" +"Ce module définit la classe :class:`FTP` et quelques éléments associés. La " +"classe :class:`FTP` implémente le côté client du protocole FTP. Vous pouvez " +"l'utiliser pour écrire des programmes Python qui effectuent diverses tâches " +"automatisées telles que la synchronisation d'autres serveurs FTP. Il est " +"aussi utilisé par le module :mod:`urllib.request` pour gérer les URL qui " +"utilisent FTP. Pour plus d'informations sur FTP (File Transfer Protocol), " +"voir la :rfc:`959`." #: library/ftplib.rst:22 msgid "The default encoding is UTF-8, following :rfc:`2640`." -msgstr "" +msgstr "L'encodage par défaut est UTF-8, voir la :rfc:`2640`." #: library/ftplib.rst:24 msgid "Here's a sample session using the :mod:`ftplib` module::" -msgstr "" +msgstr "Voici un exemple de session utilisant le module :mod:`ftplib` ::" #: library/ftplib.rst:46 msgid "The module defines the following items:" @@ -60,6 +68,8 @@ msgstr "" #: library/ftplib.rst:60 msgid "The :class:`FTP` class supports the :keyword:`with` statement, e.g.:" msgstr "" +"La classe :class:`FTP` peut s'utiliser avec l'instruction :keyword:`with`, " +"p. ex.:" #: library/ftplib.rst:74 msgid "Support for the :keyword:`with` statement was added." @@ -111,23 +121,27 @@ msgstr "" #: library/ftplib.rst:124 msgid "Here's a sample session using the :class:`FTP_TLS` class::" -msgstr "" +msgstr "Voici un exemple de session utilisant la classe :class:`FTP_TLS` ::" #: library/ftplib.rst:137 msgid "Exception raised when an unexpected reply is received from the server." -msgstr "" +msgstr "Exception levée lorsqu'une réponse inattendue est reçue du serveur." #: library/ftplib.rst:142 msgid "" "Exception raised when an error code signifying a temporary error (response " "codes in the range 400--499) is received." msgstr "" +"Exception levée lorsqu'un code d'erreur signifiant une erreur temporaire " +"(code de réponse dans l'intervalle 400-499) est reçu." #: library/ftplib.rst:148 msgid "" "Exception raised when an error code signifying a permanent error (response " "codes in the range 500--599) is received." msgstr "" +"Exception levée lorsqu'un code d'erreur signifiant une erreur permanente " +"(code de réponse dans l'intervalle 500-599) est reçu." #: library/ftplib.rst:154 msgid "" @@ -135,6 +149,9 @@ msgid "" "the response specifications of the File Transfer Protocol, i.e. begin with a " "digit in the range 1--5." msgstr "" +"Exception levée lorsqu'une réponse reçue du serveur ne correspond pas aux à " +"la spécification de File Transfer Protocol, c.-à-d. qu'elle doit commencer " +"par un chiffre dans l'intervalle 1-5." #: library/ftplib.rst:161 msgid "" @@ -168,9 +185,9 @@ msgid "" msgstr "" #: library/ftplib.rst:184 -#, fuzzy msgid ":class:`FTP` instances have the following methods:" -msgstr "Les instances :class:`Mailbox` contiennent les méthodes suivantes :" +msgstr "" +"Les instances de la classe :class:`FTP` possèdent les méthodes suivantes :" #: library/ftplib.rst:189 msgid "" @@ -347,10 +364,17 @@ msgid "" "directory). Multiple arguments can be used to pass non-standard options to " "the ``NLST`` command." msgstr "" +"Renvoie une liste de noms de fichiers comme celle que renvoie la commande " +"``NLST``. Le paramètre optionnel *argument* est une liste de dossiers (la " +"valeur par défaut est le répertoire courant du serveur). Plusieurs " +"paramètres peuvent être utilisés pour passer des paramètres non standards à " +"la commande ``NLST``." #: library/ftplib.rst:371 msgid "If your server supports the command, :meth:`mlsd` offers a better API." msgstr "" +"La commande :meth:`mlsd` offre une meilleure API si votre serveur sait la " +"gérer." #: library/ftplib.rst:364 msgid "" @@ -365,6 +389,7 @@ msgstr "" #: library/ftplib.rst:376 msgid "Rename file *fromname* on the server to *toname*." msgstr "" +"Renomme le fichier portant le nom *fromname* en *toname* sur le serveur." #: library/ftplib.rst:381 msgid "" @@ -379,15 +404,15 @@ msgstr "" #: library/ftplib.rst:393 msgid "Create a new directory on the server." -msgstr "" +msgstr "Crée un nouveau dossier sur le serveur." #: library/ftplib.rst:398 msgid "Return the pathname of the current directory on the server." -msgstr "" +msgstr "Renvoie le chemin d'accès au répertoire courant sur le serveur." #: library/ftplib.rst:403 msgid "Remove the directory named *dirname* on the server." -msgstr "" +msgstr "Supprime le dossier portant le nom *dirname* sur le serveur." #: library/ftplib.rst:408 msgid "" @@ -450,8 +475,8 @@ msgstr "" #: library/ftplib.rst:461 msgid "Set up secure data connection." -msgstr "" +msgstr "Établit une connexion de données sécurisée." #: library/ftplib.rst:465 msgid "Set up clear text data connection." -msgstr "" +msgstr "Établit une connexion de données non sécurisées." diff --git a/library/functions.po b/library/functions.po index 9e9b176ab3..a2497c039a 100644 --- a/library/functions.po +++ b/library/functions.po @@ -5,10 +5,10 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-29 16:33+0200\n" -"PO-Revision-Date: 2020-08-30 23:21+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-01-27 22:46+0100\n" "Last-Translator: Antoine Wecxsteen\n" -"Language-Team: French \n" +"Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -28,283 +28,371 @@ msgstr "" "L'interpréteur Python propose quelques fonctions et types natifs qui sont " "toujours disponibles. Ils sont listés ici par ordre alphabétique." -#: library/functions.rst:13 +#: library/functions.rst:0 +msgid "**A**" +msgstr "" + +#: library/functions.rst:0 msgid ":func:`abs`" msgstr ":func:`abs`" -#: library/functions.rst:13 -msgid ":func:`delattr`" -msgstr ":func:`delattr`" +#: library/functions.rst:0 +msgid ":func:`aiter`" +msgstr ":func:`aiter`" -#: library/functions.rst:13 -msgid ":func:`hash`" -msgstr ":func:`hash`" +#: library/functions.rst:0 +msgid ":func:`all`" +msgstr ":func:`all`" -#: library/functions.rst:13 -msgid "|func-memoryview|_" -msgstr "|func-memoryview|_" +#: library/functions.rst:0 +msgid ":func:`any`" +msgstr ":func:`any`" -#: library/functions.rst:13 -msgid "|func-set|_" -msgstr "|func-set|_" +#: library/functions.rst:0 +msgid ":func:`anext`" +msgstr ":func:`anext`" -#: library/functions.rst:14 -msgid ":func:`all`" -msgstr ":func:`all`" +#: library/functions.rst:0 +msgid ":func:`ascii`" +msgstr ":func:`ascii`" -#: library/functions.rst:14 -msgid "|func-dict|_" -msgstr "|func-dict|_" +#: library/functions.rst:0 +msgid "**B**" +msgstr "" -#: library/functions.rst:14 -msgid ":func:`help`" -msgstr ":func:`help`" +#: library/functions.rst:0 +msgid ":func:`bin`" +msgstr ":func:`bin`" -#: library/functions.rst:14 -msgid ":func:`min`" -msgstr ":func:`min`" +#: library/functions.rst:0 +msgid ":func:`bool`" +msgstr ":func:`bool`" -#: library/functions.rst:14 -msgid ":func:`setattr`" -msgstr ":func:`setattr`" +#: library/functions.rst:0 +msgid ":func:`breakpoint`" +msgstr ":func:`breakpoint`" -#: library/functions.rst:15 -msgid ":func:`any`" -msgstr ":func:`any`" +#: library/functions.rst:0 +msgid "|func-bytearray|_" +msgstr "|func-bytearray|_" -#: library/functions.rst:15 -msgid ":func:`dir`" -msgstr ":func:`dir`" +#: library/functions.rst:0 +msgid "|func-bytes|_" +msgstr "|func-bytes|_" -#: library/functions.rst:15 -msgid ":func:`hex`" -msgstr ":func:`hex`" +#: library/functions.rst:0 +msgid "**C**" +msgstr "" -#: library/functions.rst:15 -msgid ":func:`next`" -msgstr ":func:`next`" +#: library/functions.rst:0 +msgid ":func:`callable`" +msgstr ":func:`callable`" -#: library/functions.rst:15 -msgid ":func:`slice`" -msgstr ":func:`slice`" +#: library/functions.rst:0 +msgid ":func:`chr`" +msgstr ":func:`chr`" -#: library/functions.rst:16 -msgid ":func:`ascii`" -msgstr ":func:`ascii`" +#: library/functions.rst:0 +msgid ":func:`classmethod`" +msgstr ":func:`classmethod`" -#: library/functions.rst:16 -msgid ":func:`divmod`" -msgstr ":func:`divmod`" +#: library/functions.rst:0 +msgid ":func:`compile`" +msgstr ":func:`compile`" -#: library/functions.rst:16 -msgid ":func:`id`" -msgstr ":func:`id`" +#: library/functions.rst:0 +msgid ":func:`complex`" +msgstr ":func:`complex`" -#: library/functions.rst:16 -msgid ":func:`object`" -msgstr ":func:`object`" +#: library/functions.rst:0 +msgid "**D**" +msgstr "" -#: library/functions.rst:16 -msgid ":func:`sorted`" -msgstr ":func:`sorted`" +#: library/functions.rst:0 +msgid ":func:`delattr`" +msgstr ":func:`delattr`" -#: library/functions.rst:17 -msgid ":func:`bin`" -msgstr ":func:`bin`" +#: library/functions.rst:0 +msgid "|func-dict|_" +msgstr "|func-dict|_" + +#: library/functions.rst:0 +msgid ":func:`dir`" +msgstr ":func:`dir`" + +#: library/functions.rst:0 +msgid ":func:`divmod`" +msgstr ":func:`divmod`" -#: library/functions.rst:17 +#: library/functions.rst:0 +msgid "**E**" +msgstr "" + +#: library/functions.rst:0 msgid ":func:`enumerate`" msgstr ":func:`enumerate`" -#: library/functions.rst:17 -msgid ":func:`input`" -msgstr ":func:`input`" +#: library/functions.rst:0 +msgid ":func:`eval`" +msgstr ":func:`eval`" -#: library/functions.rst:17 -msgid ":func:`oct`" -msgstr ":func:`oct`" +#: library/functions.rst:0 +msgid ":func:`exec`" +msgstr ":func:`exec`" -#: library/functions.rst:17 -msgid ":func:`staticmethod`" -msgstr ":func:`staticmethod`" +#: library/functions.rst:0 +msgid "**F**" +msgstr "" -#: library/functions.rst:18 -msgid ":func:`bool`" -msgstr ":func:`bool`" +#: library/functions.rst:0 +msgid ":func:`filter`" +msgstr ":func:`filter`" -#: library/functions.rst:18 -msgid ":func:`eval`" -msgstr ":func:`eval`" +#: library/functions.rst:0 +msgid ":func:`float`" +msgstr ":func:`float`" -#: library/functions.rst:18 -msgid ":func:`int`" -msgstr ":func:`int`" +#: library/functions.rst:0 +msgid ":func:`format`" +msgstr ":func:`format`" -#: library/functions.rst:18 -msgid ":func:`open`" -msgstr ":func:`open`" +#: library/functions.rst:0 +msgid "|func-frozenset|_" +msgstr "|func-frozenset|_" -#: library/functions.rst:18 -msgid "|func-str|_" -msgstr "|func-str|_" +#: library/functions.rst:0 +msgid "**G**" +msgstr "" -#: library/functions.rst:19 -msgid ":func:`breakpoint`" -msgstr ":func:`breakpoint`" +#: library/functions.rst:0 +msgid ":func:`getattr`" +msgstr ":func:`getattr`" -#: library/functions.rst:19 -msgid ":func:`exec`" -msgstr ":func:`exec`" +#: library/functions.rst:0 +msgid ":func:`globals`" +msgstr ":func:`globals`" -#: library/functions.rst:19 -msgid ":func:`isinstance`" -msgstr ":func:`isinstance`" +#: library/functions.rst:0 +msgid "**H**" +msgstr "" -#: library/functions.rst:19 -msgid ":func:`ord`" -msgstr ":func:`ord`" +#: library/functions.rst:0 +msgid ":func:`hasattr`" +msgstr ":func:`hasattr`" -#: library/functions.rst:19 -msgid ":func:`sum`" -msgstr ":func:`sum`" +#: library/functions.rst:0 +msgid ":func:`hash`" +msgstr ":func:`hash`" -#: library/functions.rst:20 -msgid "|func-bytearray|_" -msgstr "|func-bytearray|_" +#: library/functions.rst:0 +msgid ":func:`help`" +msgstr ":func:`help`" -#: library/functions.rst:20 -msgid ":func:`filter`" -msgstr ":func:`filter`" +#: library/functions.rst:0 +msgid ":func:`hex`" +msgstr ":func:`hex`" -#: library/functions.rst:20 -msgid ":func:`issubclass`" -msgstr ":func:`issubclass`" +#: library/functions.rst:0 +msgid "**I**" +msgstr "" -#: library/functions.rst:20 -msgid ":func:`pow`" -msgstr ":func:`pow`" +#: library/functions.rst:0 +msgid ":func:`id`" +msgstr ":func:`id`" -#: library/functions.rst:20 -msgid ":func:`super`" -msgstr ":func:`super`" +#: library/functions.rst:0 +msgid ":func:`input`" +msgstr ":func:`input`" -#: library/functions.rst:21 -msgid "|func-bytes|_" -msgstr "|func-bytes|_" +#: library/functions.rst:0 +msgid ":func:`int`" +msgstr ":func:`int`" -#: library/functions.rst:21 -msgid ":func:`float`" -msgstr ":func:`float`" +#: library/functions.rst:0 +msgid ":func:`isinstance`" +msgstr ":func:`isinstance`" + +#: library/functions.rst:0 +msgid ":func:`issubclass`" +msgstr ":func:`issubclass`" -#: library/functions.rst:21 +#: library/functions.rst:0 msgid ":func:`iter`" msgstr ":func:`iter`" -#: library/functions.rst:21 -msgid ":func:`print`" -msgstr ":func:`print`" +#: library/functions.rst:0 +msgid "**L**" +msgstr "" -#: library/functions.rst:21 -msgid "|func-tuple|_" -msgstr "|func-tuple|_" +#: library/functions.rst:0 +msgid ":func:`len`" +msgstr ":func:`len`" -#: library/functions.rst:22 -msgid ":func:`callable`" -msgstr ":func:`callable`" +#: library/functions.rst:0 +msgid "|func-list|_" +msgstr "|func-list|_" -#: library/functions.rst:22 -msgid ":func:`format`" -msgstr ":func:`format`" +#: library/functions.rst:0 +msgid ":func:`locals`" +msgstr ":func:`locals`" -#: library/functions.rst:22 -msgid ":func:`len`" -msgstr ":func:`len`" +#: library/functions.rst:0 +msgid "**M**" +msgstr "" -#: library/functions.rst:22 -msgid ":func:`property`" -msgstr ":func:`property`" +#: library/functions.rst:0 +msgid ":func:`map`" +msgstr ":func:`map`" -#: library/functions.rst:22 -msgid ":func:`type`" -msgstr ":func:`type`" +#: library/functions.rst:0 +msgid ":func:`max`" +msgstr ":func:`max`" -#: library/functions.rst:23 -msgid ":func:`chr`" -msgstr ":func:`chr`" +#: library/functions.rst:0 +msgid "|func-memoryview|_" +msgstr "|func-memoryview|_" -#: library/functions.rst:23 -msgid "|func-frozenset|_" -msgstr "|func-frozenset|_" +#: library/functions.rst:0 +msgid ":func:`min`" +msgstr ":func:`min`" -#: library/functions.rst:23 -msgid "|func-list|_" -msgstr "|func-list|_" +#: library/functions.rst:0 +msgid "**N**" +msgstr "" -#: library/functions.rst:23 -msgid "|func-range|_" -msgstr "|func-range|_" +#: library/functions.rst:0 +msgid ":func:`next`" +msgstr ":func:`next`" -#: library/functions.rst:23 -msgid ":func:`vars`" -msgstr ":func:`vars`" +#: library/functions.rst:0 +msgid "**O**" +msgstr "" -#: library/functions.rst:24 -msgid ":func:`classmethod`" -msgstr ":func:`classmethod`" +#: library/functions.rst:0 +msgid ":func:`object`" +msgstr ":func:`object`" -#: library/functions.rst:24 -msgid ":func:`getattr`" -msgstr ":func:`getattr`" +#: library/functions.rst:0 +msgid ":func:`oct`" +msgstr ":func:`oct`" -#: library/functions.rst:24 -msgid ":func:`locals`" -msgstr ":func:`locals`" +#: library/functions.rst:0 +msgid ":func:`open`" +msgstr ":func:`open`" -#: library/functions.rst:24 -msgid ":func:`repr`" -msgstr ":func:`repr`" +#: library/functions.rst:0 +msgid ":func:`ord`" +msgstr ":func:`ord`" -#: library/functions.rst:24 -msgid ":func:`zip`" -msgstr ":func:`zip`" +#: library/functions.rst:0 +msgid "**P**" +msgstr "" -#: library/functions.rst:25 -msgid ":func:`compile`" -msgstr ":func:`compile`" +#: library/functions.rst:0 +msgid ":func:`pow`" +msgstr ":func:`pow`" -#: library/functions.rst:25 -msgid ":func:`globals`" -msgstr ":func:`globals`" +#: library/functions.rst:0 +msgid ":func:`print`" +msgstr ":func:`print`" -#: library/functions.rst:25 -msgid ":func:`map`" -msgstr ":func:`map`" +#: library/functions.rst:0 +msgid ":func:`property`" +msgstr ":func:`property`" + +#: library/functions.rst:0 +msgid "**R**" +msgstr "" -#: library/functions.rst:25 +#: library/functions.rst:0 +msgid "|func-range|_" +msgstr "|func-range|_" + +#: library/functions.rst:0 +msgid ":func:`repr`" +msgstr ":func:`repr`" + +#: library/functions.rst:0 msgid ":func:`reversed`" msgstr ":func:`reversed`" -#: library/functions.rst:25 -msgid ":func:`__import__`" -msgstr ":func:`__import__`" +#: library/functions.rst:0 +msgid ":func:`round`" +msgstr ":func:`round`" -#: library/functions.rst:26 -msgid ":func:`complex`" -msgstr ":func:`complex`" +#: library/functions.rst:0 +msgid "**S**" +msgstr "" -#: library/functions.rst:26 -msgid ":func:`hasattr`" -msgstr ":func:`hasattr`" +#: library/functions.rst:0 +msgid "|func-set|_" +msgstr "|func-set|_" + +#: library/functions.rst:0 +msgid ":func:`setattr`" +msgstr ":func:`setattr`" + +#: library/functions.rst:0 +msgid ":func:`slice`" +msgstr ":func:`slice`" + +#: library/functions.rst:0 +msgid ":func:`sorted`" +msgstr ":func:`sorted`" + +#: library/functions.rst:0 +msgid ":func:`staticmethod`" +msgstr ":func:`staticmethod`" + +#: library/functions.rst:0 +msgid "|func-str|_" +msgstr "|func-str|_" + +#: library/functions.rst:0 +msgid ":func:`sum`" +msgstr ":func:`sum`" + +#: library/functions.rst:0 +msgid ":func:`super`" +msgstr ":func:`super`" + +#: library/functions.rst:0 +msgid "**T**" +msgstr "" + +#: library/functions.rst:0 +msgid "|func-tuple|_" +msgstr "|func-tuple|_" + +#: library/functions.rst:0 +msgid ":func:`type`" +msgstr ":func:`type`" + +#: library/functions.rst:0 +msgid "**V**" +msgstr "" + +#: library/functions.rst:0 +msgid ":func:`vars`" +msgstr ":func:`vars`" + +#: library/functions.rst:0 +msgid "**Z**" +msgstr "" + +#: library/functions.rst:0 +msgid ":func:`zip`" +msgstr ":func:`zip`" -#: library/functions.rst:26 -msgid ":func:`max`" -msgstr ":func:`max`" +#: library/functions.rst:0 +msgid "**_**" +msgstr "" -#: library/functions.rst:26 -msgid ":func:`round`" -msgstr ":func:`round`" +#: library/functions.rst:0 +msgid ":func:`__import__`" +msgstr ":func:`__import__`" -#: library/functions.rst:45 +#: library/functions.rst:59 msgid "" "Return the absolute value of a number. The argument may be an integer, a " "floating point number, or an object implementing :meth:`__abs__`. If the " @@ -314,7 +402,17 @@ msgstr "" "entier, un nombre à virgule flottante, ou tout objet définissant :meth:" "`__abs__`. Si l'argument est un nombre complexe, son module est renvoyé." -#: library/functions.rst:52 +#: library/functions.rst:66 +msgid "" +"Return an :term:`asynchronous iterator` for an :term:`asynchronous " +"iterable`. Equivalent to calling ``x.__aiter__()``." +msgstr "" + +#: library/functions.rst:69 +msgid "Note: Unlike :func:`iter`, :func:`aiter` has no 2-argument variant." +msgstr "" + +#: library/functions.rst:75 msgid "" "Return ``True`` if all elements of the *iterable* are true (or if the " "iterable is empty). Equivalent to::" @@ -322,7 +420,31 @@ msgstr "" "Renvoie ``True`` si tous les éléments de *iterable* sont vrais (ou s'il est " "vide). Équivaut à ::" -#: library/functions.rst:64 +#: library/functions.rst:87 +msgid "" +"When awaited, return the next item from the given :term:`asynchronous " +"iterator`, or *default* if given and the iterator is exhausted." +msgstr "" + +#: library/functions.rst:90 +msgid "" +"This is the async variant of the :func:`next` builtin, and behaves similarly." +msgstr "" + +#: library/functions.rst:93 +#, fuzzy +msgid "" +"This calls the :meth:`~object.__anext__` method of *async_iterator*, " +"returning an :term:`awaitable`. Awaiting this returns the next value of the " +"iterator. If *default* is given, it is returned if the iterator is " +"exhausted, otherwise :exc:`StopAsyncIteration` is raised." +msgstr "" +"Donne un :term:`awaitable` en appelant la méthode :meth:`~object.__anext__` " +"de *async_iterator*. Le fait d'attendre renvoie la prochaine valeur de " +"l'itérateur. Si *default* est fourni, il sera renvoyé si l'itérateur est " +"épuisé, sinon :exc:`StopAsyncIteration` est levée." + +#: library/functions.rst:102 msgid "" "Return ``True`` if any element of the *iterable* is true. If the iterable " "is empty, return ``False``. Equivalent to::" @@ -330,20 +452,21 @@ msgstr "" "Renvoie ``True`` si au moins un élément de *iterable* est vrai. ``False`` " "est renvoyé dans le cas où *iterable* est vide. Équivaut à ::" -#: library/functions.rst:76 +#: library/functions.rst:114 +#, fuzzy msgid "" "As :func:`repr`, return a string containing a printable representation of an " "object, but escape the non-ASCII characters in the string returned by :func:" -"`repr` using ``\\x``, ``\\u`` or ``\\U`` escapes. This generates a string " +"`repr` using ``\\x``, ``\\u``, or ``\\U`` escapes. This generates a string " "similar to that returned by :func:`repr` in Python 2." msgstr "" "Renvoie, tout comme :func:`repr`, une chaîne contenant une représentation " -"affichable d'un objet, en transformant les caractères non ASCII renvoyés " -"par :func:`repr` en utilisant des séquences d'échappement ``\\x``, ``\\u`` " -"ou ``\\U``. Cela génère une chaîne similaire à ce que renvoie :func:`repr` " -"dans Python 2." +"d'un objet destinée à l'affichage, mais en transformant les caractères non " +"ASCII renvoyés par :func:`repr` par l'utilisation de séquences d'échappement " +"``\\x``, ``\\u`` ou ``\\U``. Cela génère une chaîne similaire à ce que " +"renvoie :func:`repr` dans Python 2." -#: library/functions.rst:84 +#: library/functions.rst:122 msgid "" "Convert an integer number to a binary string prefixed with \"0b\". The " "result is a valid Python expression. If *x* is not a Python :class:`int` " @@ -355,39 +478,42 @@ msgstr "" "class:`int`, il doit définir une méthode :meth:`__index__` donnant un nombre " "entier. Voici quelques exemples :" -#: library/functions.rst:94 +#: library/functions.rst:132 +#, fuzzy msgid "" -"If prefix \"0b\" is desired or not, you can use either of the following ways." +"If the prefix \"0b\" is desired or not, you can use either of the following " +"ways." msgstr "" -"Pour contrôler l'affichage du préfixe ``0b``, vous pouvez utiliser les " -"moyens suivants." +"Vous pouvez contrôler l'affichage du préfixe ``0b`` à l'aide d'un des moyens " +"suivants." -#: library/functions.rst:757 library/functions.rst:1044 +#: library/functions.rst:818 library/functions.rst:1118 msgid "See also :func:`format` for more information." msgstr "Voir aussi :func:`format` pour plus d'informations." -#: library/functions.rst:106 +#: library/functions.rst:144 +#, fuzzy msgid "" "Return a Boolean value, i.e. one of ``True`` or ``False``. *x* is converted " "using the standard :ref:`truth testing procedure `. If *x* is false " -"or omitted, this returns ``False``; otherwise it returns ``True``. The :" +"or omitted, this returns ``False``; otherwise, it returns ``True``. The :" "class:`bool` class is a subclass of :class:`int` (see :ref:`typesnumeric`). " "It cannot be subclassed further. Its only instances are ``False`` and " "``True`` (see :ref:`bltin-boolean-values`)." msgstr "" "Renvoie une valeur booléenne, c'est-à-dire soit ``True``, soit ``False``. " "*x* est converti en utilisant la :ref:`procédure standard d'évaluation de " -"valeur de vérité`. Si *x* est faux, ou omis, elle renvoie ``False``, " +"valeur de vérité `. Si *x* est faux, ou omis, elle renvoie ``False``, " "sinon, elle renvoie ``True``. La classe :class:`bool` hérite de la classe :" "class:`int` (voir :ref:`typesnumeric`). Il n'est pas possible d'en hériter, " "ses seules instances sont ``False`` et ``True`` (voir :ref:`bltin-boolean-" "values`)." -#: library/functions.rst:625 library/functions.rst:841 +#: library/functions.rst:686 library/functions.rst:902 msgid "*x* is now a positional-only parameter." msgstr "*x* est désormais un argument exclusivement optionnel." -#: library/functions.rst:120 +#: library/functions.rst:158 msgid "" "This function drops you into the debugger at the call site. Specifically, " "it calls :func:`sys.breakpointhook`, passing ``args`` and ``kws`` straight " @@ -408,15 +534,15 @@ msgstr "" "`sys.breakpointhook`, que :func:`breakpoint` appellera automatiquement, vous " "permettant ainsi de basculer dans le débogueur de votre choix." -#: library/functions.rst:130 +#: library/functions.rst:168 msgid "" "Raises an :ref:`auditing event ` ``builtins.breakpoint`` with " "argument ``breakpointhook``." msgstr "" -"Lève un :ref:`auditing event ` ``builtins.breakpoint`` avec " +"Lève un :ref:`évènement d'audit ` ``builtins.breakpoint`` avec " "l'argument ``breakpointhook``." -#: library/functions.rst:138 +#: library/functions.rst:176 msgid "" "Return a new array of bytes. The :class:`bytearray` class is a mutable " "sequence of integers in the range 0 <= x < 256. It has most of the usual " @@ -429,7 +555,7 @@ msgstr "" "`typesseq-mutable`, ainsi que la plupart des méthodes de la classe :class:" "`bytes`, voir :ref:`bytes-methods`." -#: library/functions.rst:143 +#: library/functions.rst:181 msgid "" "The optional *source* parameter can be used to initialize the array in a few " "different ways:" @@ -437,7 +563,7 @@ msgstr "" "Le paramètre optionnel *source* peut être utilisé pour initialiser le " "tableau de plusieurs façons :" -#: library/functions.rst:146 +#: library/functions.rst:184 msgid "" "If it is a *string*, you must also give the *encoding* (and optionally, " "*errors*) parameters; :func:`bytearray` then converts the string to bytes " @@ -447,7 +573,7 @@ msgstr "" "l'encodage (et éventuellement *errors*). La fonction :func:`bytearray` " "convertit ensuite la chaîne en octets via la méthode :meth:`str.encode` ;" -#: library/functions.rst:150 +#: library/functions.rst:188 msgid "" "If it is an *integer*, the array will have that size and will be initialized " "with null bytes." @@ -455,36 +581,37 @@ msgstr "" "si c'est un *entier*, le tableau a cette taille et est initialisé d'octets " "*null* ;" -#: library/functions.rst:153 +#: library/functions.rst:191 #, fuzzy msgid "" "If it is an object conforming to the :ref:`buffer interface " "`, a read-only buffer of the object will be used to " "initialize the bytes array." msgstr "" -"si c'est un objet conforme au protocole tampon, un tampon en lecture seule " -"de l'objet est utilisé pour initialiser le tableau ;" +"si c'est un objet conforme à :ref:`l'interface tampon `, un " +"tampon en lecture seule de l'objet est utilisé pour initialiser le tableau ;" -#: library/functions.rst:156 +#: library/functions.rst:194 msgid "" "If it is an *iterable*, it must be an iterable of integers in the range ``0 " "<= x < 256``, which are used as the initial contents of the array." msgstr "" -"Si c'est un *itérable*, il doit itérer sur des nombres entier dans " +"si c'est un *itérable*, il doit itérer sur des nombres entier dans " "l'intervalle ``0 <= x < 256``, qui sont utilisés pour initialiser le contenu " "du tableau." -#: library/functions.rst:159 +#: library/functions.rst:197 msgid "Without an argument, an array of size 0 is created." msgstr "Sans argument, un tableau vide est créé." -#: library/functions.rst:161 +#: library/functions.rst:199 msgid "See also :ref:`binaryseq` and :ref:`typebytearray`." msgstr "Voir :ref:`binaryseq` et :ref:`typebytearray`." -#: library/functions.rst:168 +#: library/functions.rst:206 +#, fuzzy msgid "" -"Return a new \"bytes\" object, which is an immutable sequence of integers in " +"Return a new \"bytes\" object which is an immutable sequence of integers in " "the range ``0 <= x < 256``. :class:`bytes` is an immutable version of :" "class:`bytearray` -- it has the same non-mutating methods and the same " "indexing and slicing behavior." @@ -494,25 +621,25 @@ msgstr "" "version immuable de :class:`bytearray` — avec les mêmes méthodes d'accès, et " "le même comportement lors de l'indexation ou la découpe." -#: library/functions.rst:173 +#: library/functions.rst:211 msgid "" "Accordingly, constructor arguments are interpreted as for :func:`bytearray`." msgstr "" "En conséquence, les arguments du constructeur sont les mêmes que pour :func:" "`bytearray`." -#: library/functions.rst:175 +#: library/functions.rst:213 msgid "Bytes objects can also be created with literals, see :ref:`strings`." msgstr "" "Les objets *bytes* peuvent aussi être créés à partir de littéraux, voir :ref:" "`strings`." -#: library/functions.rst:177 +#: library/functions.rst:215 msgid "See also :ref:`binaryseq`, :ref:`typebytes`, and :ref:`bytes-methods`." msgstr "" "Voir aussi :ref:`binaryseq`, :ref:`typebytes`, et :ref:`bytes-methods`." -#: library/functions.rst:182 +#: library/functions.rst:220 msgid "" "Return :const:`True` if the *object* argument appears callable, :const:" "`False` if not. If this returns ``True``, it is still possible that a call " @@ -527,7 +654,7 @@ msgstr "" "(appeler une classe donne une nouvelle instance) ; une instance n'est " "appelable que si sa classe définit une méthode :meth:`__call__`." -#: library/functions.rst:188 +#: library/functions.rst:226 msgid "" "This function was first removed in Python 3.0 and then brought back in " "Python 3.2." @@ -535,7 +662,7 @@ msgstr "" "cette fonction a d'abord été supprimée avec Python 3.0 puis elle a été " "remise dans Python 3.2." -#: library/functions.rst:195 +#: library/functions.rst:233 msgid "" "Return the string representing a character whose Unicode code point is the " "integer *i*. For example, ``chr(97)`` returns the string ``'a'``, while " @@ -546,7 +673,7 @@ msgstr "" "de caractères ``'a'``, tandis que ``chr(8364)`` renvoie ``'€'``. Il s'agit " "de l'inverse de :func:`ord`." -#: library/functions.rst:199 +#: library/functions.rst:237 msgid "" "The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in " "base 16). :exc:`ValueError` will be raised if *i* is outside that range." @@ -555,21 +682,22 @@ msgstr "" "(``0x10FFFF`` en base 16). Une exception :exc:`ValueError` est levée si *i* " "est en dehors de l'intervalle." -#: library/functions.rst:205 +#: library/functions.rst:243 msgid "Transform a method into a class method." msgstr "Transforme une méthode en méthode de classe." -#: library/functions.rst:207 +#: library/functions.rst:245 +#, fuzzy msgid "" -"A class method receives the class as implicit first argument, just like an " -"instance method receives the instance. To declare a class method, use this " -"idiom::" +"A class method receives the class as an implicit first argument, just like " +"an instance method receives the instance. To declare a class method, use " +"this idiom::" msgstr "" "Une méthode de classe reçoit implicitement la classe en premier argument, " "tout comme une méthode d'instance reçoit l'instance. Voici comment déclarer " "une méthode de classe ::" -#: library/functions.rst:215 +#: library/functions.rst:253 msgid "" "The ``@classmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." @@ -577,7 +705,7 @@ msgstr "" "La forme ``@classmethod`` est un :term:`décorateur ` de fonction " "— consultez :ref:`function` pour plus de détails." -#: library/functions.rst:218 +#: library/functions.rst:256 msgid "" "A class method can be called either on the class (such as ``C.f()``) or on " "an instance (such as ``C().f()``). The instance is ignored except for its " @@ -589,7 +717,7 @@ msgstr "" "sa classe. Si la méthode est appelée sur une instance de classe fille, c'est " "la classe fille qui sera donnée en premier argument implicite." -#: library/functions.rst:223 +#: library/functions.rst:261 msgid "" "Class methods are different than C++ or Java static methods. If you want " "those, see :func:`staticmethod` in this section. For more information on " @@ -599,7 +727,7 @@ msgstr "" "Java. Si ce sont elles dont vous avez besoin, regardez du côté de :func:" "`staticmethod` dans cette section. Voir aussi :ref:`types`." -#: library/functions.rst:227 +#: library/functions.rst:265 msgid "" "Class methods can now wrap other :term:`descriptors ` such as :" "func:`property`." @@ -607,7 +735,23 @@ msgstr "" "les méthodes de classe peuvent encapsuler d'autres :term:`descripteurs " "` comme :func:`property`." -#: library/functions.rst:233 +#: library/functions.rst:269 +msgid "" +"Class methods now inherit the method attributes (``__module__``, " +"``__name__``, ``__qualname__``, ``__doc__`` and ``__annotations__``) and " +"have a new ``__wrapped__`` attribute." +msgstr "" + +#: library/functions.rst:274 +#, fuzzy +msgid "" +"Class methods can no longer wrap other :term:`descriptors ` such " +"as :func:`property`." +msgstr "" +"les méthodes de classe peuvent encapsuler d'autres :term:`descripteurs " +"` comme :func:`property`." + +#: library/functions.rst:281 msgid "" "Compile the *source* into a code or AST object. Code objects can be " "executed by :func:`exec` or :func:`eval`. *source* can either be a normal " @@ -619,7 +763,7 @@ msgstr "" "une chaîne d'octets, ou un objet AST. Consultez la documentation du module :" "mod:`ast` pour des informations sur la manipulation d'objets AST." -#: library/functions.rst:238 +#: library/functions.rst:286 msgid "" "The *filename* argument should give the file from which the code was read; " "pass some recognizable value if it wasn't read from a file (``''`` " @@ -629,7 +773,7 @@ msgstr "" "lu. Donnez quelque chose de reconnaissable lorsqu'il n'a pas été lu depuis " "un fichier (typiquement ``\"\"``)." -#: library/functions.rst:242 +#: library/functions.rst:290 msgid "" "The *mode* argument specifies what kind of code must be compiled; it can be " "``'exec'`` if *source* consists of a sequence of statements, ``'eval'`` if " @@ -643,7 +787,7 @@ msgstr "" "(dans ce dernier cas, les résultats d'expressions donnant autre chose que " "``None`` sont affichés)." -#: library/functions.rst:248 +#: library/functions.rst:296 #, fuzzy msgid "" "The optional arguments *flags* and *dont_inherit* control which :ref:" @@ -658,16 +802,17 @@ msgid "" "in the surrounding code are ignored." msgstr "" "Les arguments optionnels *flags* et *dont_inherit* contrôlent quelles :ref:" -"`instructions future ` affectent la compilation de *source*. Si " -"aucun des deux n'est présent (ou que les deux sont à 0), le code est compilé " -"avec les mêmes instructions *future* que le code appelant :func:`compile`. " -"Si l'argument *flags* est fourni mais que *dont_inherit* ne l'est pas (ou " -"vaut 0), alors les instructions *futures* utilisées sont celles définies par " +"`options de compilation ` seront activées et quelles :" +"ref:`instructions future ` seront autorisées. Si aucun des deux " +"n'est présent (ou que les deux sont à 0), le code est compilé avec les mêmes " +"paramètres que le code appelant :func:`compile`. Si l'argument *flags* est " +"fourni alors que *dont_inherit* ne l'est pas (ou vaut 0), les options de " +"compilation et les instructions *futures* utilisées sont celles définies par " "*flags* en plus de celles qui auraient été utilisées. Si *dont_inherit* est " "un entier différent de zéro, *flags* est utilisé seul — les instructions " "futures déclarées autour de l'appel à *compile* sont ignorées." -#: library/functions.rst:259 +#: library/functions.rst:307 #, fuzzy msgid "" "Compiler options and future statements are specified by bits which can be " @@ -683,7 +828,7 @@ msgstr "" "l'attribut :attr:`~__future__._Feature.compiler_flag` de la classe :class:" "`~__future__.Feature` du module :mod:`__future__`." -#: library/functions.rst:267 +#: library/functions.rst:315 msgid "" "The argument *optimize* specifies the optimization level of the compiler; " "the default value of ``-1`` selects the optimization level of the " @@ -698,7 +843,7 @@ msgstr "" "``1`` (les ``assert`` sont supprimés, ``__debug__`` est ``False``) ou ``2`` " "(les *docstrings* sont également supprimées)." -#: library/functions.rst:273 +#: library/functions.rst:321 msgid "" "This function raises :exc:`SyntaxError` if the compiled source is invalid, " "and :exc:`ValueError` if the source contains null bytes." @@ -706,7 +851,7 @@ msgstr "" "Cette fonction lève une :exc:`SyntaxError` si la source n'est pas valide, " "et :exc:`ValueError` si la source contient des octets *null*." -#: library/functions.rst:276 +#: library/functions.rst:324 msgid "" "If you want to parse Python code into its AST representation, see :func:`ast." "parse`." @@ -714,16 +859,16 @@ msgstr "" "Si vous voulez transformer du code Python en sa représentation AST, voyez :" "func:`ast.parse`." -#: library/functions.rst:279 +#: library/functions.rst:327 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``compile`` with arguments " "``source``, ``filename``." msgstr "" -"Lève un :ref:`auditing event ` ``open`` avec les arguments " -"``file``, ``mode``, ``flags``." +"Lève un :ref:`évènement d'audit ` ``compile`` avec les arguments " +"``source`` et ``filename``." -#: library/functions.rst:281 +#: library/functions.rst:329 msgid "" "Raises an :ref:`auditing event ` ``compile`` with arguments " "``source`` and ``filename``. This event may also be raised by implicit " @@ -733,7 +878,7 @@ msgstr "" "``source`` et ``filename``. Cet événement peut également être levé par une " "compilation implicite." -#: library/functions.rst:287 +#: library/functions.rst:335 msgid "" "When compiling a string with multi-line code in ``'single'`` or ``'eval'`` " "mode, input must be terminated by at least one newline character. This is " @@ -745,7 +890,7 @@ msgstr "" "moins un retour à la ligne. Cela permet de faciliter la distinction entre " "les instructions complètes et incomplètes dans le module :mod:`code`." -#: library/functions.rst:294 +#: library/functions.rst:342 msgid "" "It is possible to crash the Python interpreter with a sufficiently large/" "complex string when compiling to an AST object due to stack depth " @@ -755,24 +900,25 @@ msgstr "" "suffisamment grandes ou complexes lors de la compilation d'un objet AST. " "Ceci est dû à limitation de la profondeur de la pile d'appels." -#: library/functions.rst:298 +#: library/functions.rst:346 +#, fuzzy msgid "" -"Allowed use of Windows and Mac newlines. Also input in ``'exec'`` mode does " -"not have to end in a newline anymore. Added the *optimize* parameter." +"Allowed use of Windows and Mac newlines. Also, input in ``'exec'`` mode " +"does not have to end in a newline anymore. Added the *optimize* parameter." msgstr "" "autorise l'utilisation de retours à la ligne Mac et Windows. Par ailleurs, " "la chaîne donnée à ``'exec'`` n'a plus besoin de terminer par un retour à la " "ligne. Ajout du paramètre *optimize*." -#: library/functions.rst:302 +#: library/functions.rst:350 msgid "" "Previously, :exc:`TypeError` was raised when null bytes were encountered in " "*source*." msgstr "" -"Précédemment, l'exception :exc:`TypeError` était levée quand un caractère " +"précédemment, l'exception :exc:`TypeError` était levée quand un caractère " "nul était rencontré dans *source*." -#: library/functions.rst:306 +#: library/functions.rst:354 msgid "" "``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` can now be passed in flags to enable " "support for top-level ``await``, ``async for``, and ``async with``." @@ -781,7 +927,7 @@ msgstr "" "pour permettre une gestion de ``await``, ``async for``, et ``async with`` de " "haut niveau." -#: library/functions.rst:313 +#: library/functions.rst:361 msgid "" "Return a complex number with the value *real* + *imag*\\*1j or convert a " "string or number to a complex number. If the first parameter is a string, " @@ -802,7 +948,7 @@ msgstr "" "class:`int` ou :class:`float`. Si aucun argument n'est fourni, renvoie " "``0j``." -#: library/functions.rst:322 +#: library/functions.rst:370 msgid "" "For a general Python object ``x``, ``complex(x)`` delegates to ``x." "__complex__()``. If ``__complex__()`` is not defined then it falls back to :" @@ -814,7 +960,7 @@ msgstr "" "meth:`__float__`. Si ``__float__()`` n'est pas défini, alors il délègue à :" "meth:`__index__`." -#: library/functions.rst:329 +#: library/functions.rst:377 msgid "" "When converting from a string, the string must not contain whitespace around " "the central ``+`` or ``-`` operator. For example, ``complex('1+2j')`` is " @@ -825,25 +971,25 @@ msgstr "" "``complex('1+2j')`` est correct, mais ``complex('1 + 2j')`` lève une :exc:" "`ValueError`." -#: library/functions.rst:334 +#: library/functions.rst:382 msgid "The complex type is described in :ref:`typesnumeric`." msgstr "Le type complexe est décrit dans :ref:`typesnumeric`." -#: library/functions.rst:622 library/functions.rst:838 +#: library/functions.rst:683 library/functions.rst:899 msgid "Grouping digits with underscores as in code literals is allowed." msgstr "" "les chiffres peuvent être groupés avec des tirets bas comme dans les " "expressions littérales." -#: library/functions.rst:339 +#: library/functions.rst:387 msgid "" "Falls back to :meth:`__index__` if :meth:`__complex__` and :meth:`__float__` " "are not defined." msgstr "" "revient à :meth:`__index__` si :meth:`__complex__` et :meth:`__float__` ne " -"sont pas définis." +"sont pas définies." -#: library/functions.rst:346 +#: library/functions.rst:394 msgid "" "This is a relative of :func:`setattr`. The arguments are an object and a " "string. The string must be the name of one of the object's attributes. The " @@ -855,7 +1001,7 @@ msgstr "" "fonction supprime l'attribut nommé, si l'objet l'y autorise. Par exemple " "``delattr(x, 'foobar')`` est l'équivalent de ``del x.foobar``." -#: library/functions.rst:358 +#: library/functions.rst:406 msgid "" "Create a new dictionary. The :class:`dict` object is the dictionary class. " "See :class:`dict` and :ref:`typesmapping` for documentation about this class." @@ -864,7 +1010,7 @@ msgstr "" "dictionnaire. Voir :class:`dict` et :ref:`typesmapping` pour vous documenter " "sur cette classe." -#: library/functions.rst:361 +#: library/functions.rst:409 msgid "" "For other containers see the built-in :class:`list`, :class:`set`, and :" "class:`tuple` classes, as well as the :mod:`collections` module." @@ -872,7 +1018,7 @@ msgstr "" "Pour les autres conteneurs, voir les classes natives :class:`list`, :class:" "`set`, et :class:`tuple`, ainsi que le module :mod:`collections`." -#: library/functions.rst:367 +#: library/functions.rst:415 msgid "" "Without arguments, return the list of names in the current local scope. " "With an argument, attempt to return a list of valid attributes for that " @@ -882,7 +1028,7 @@ msgstr "" "Avec un argument, elle essaye de donner une liste d'attributs valides pour " "cet objet." -#: library/functions.rst:370 +#: library/functions.rst:418 msgid "" "If the object has a method named :meth:`__dir__`, this method will be called " "and must return the list of attributes. This allows objects that implement a " @@ -894,21 +1040,22 @@ msgstr "" "`__getattr__` ou :func:`__getattribute__` de personnaliser ce que donnera :" "func:`dir`." -#: library/functions.rst:375 +#: library/functions.rst:423 +#, fuzzy msgid "" "If the object does not provide :meth:`__dir__`, the function tries its best " "to gather information from the object's :attr:`~object.__dict__` attribute, " "if defined, and from its type object. The resulting list is not necessarily " -"complete, and may be inaccurate when the object has a custom :func:" +"complete and may be inaccurate when the object has a custom :func:" "`__getattr__`." msgstr "" "Si l'objet ne fournit pas de méthode :meth:`__dir__`, la fonction fait de " "son mieux en rassemblant les informations de l'attribut :attr:`~object." "__dict__` de l'objet, si défini, et depuis son type. La liste résultante " -"n'est pas nécessairement complète, et peut être inadaptée quand l'objet a " -"un :func:`__getattr__` personnalisé." +"n'est pas nécessairement complète, et peut être erronée quand l'objet a un :" +"func:`__getattr__` personnalisé." -#: library/functions.rst:380 +#: library/functions.rst:428 msgid "" "The default :func:`dir` mechanism behaves differently with different types " "of objects, as it attempts to produce the most relevant, rather than " @@ -918,7 +1065,7 @@ msgstr "" "différents types d'objets, car elle préfère donner une information " "pertinente plutôt qu'exhaustive :" -#: library/functions.rst:384 +#: library/functions.rst:432 msgid "" "If the object is a module object, the list contains the names of the " "module's attributes." @@ -926,7 +1073,7 @@ msgstr "" "si l'objet est un module, la liste contiendra les noms des attributs du " "module ;" -#: library/functions.rst:387 +#: library/functions.rst:435 msgid "" "If the object is a type or class object, the list contains the names of its " "attributes, and recursively of the attributes of its bases." @@ -934,7 +1081,7 @@ msgstr "" "si l'objet est un type ou une classe, la liste contiendra les noms de ses " "attributs et, récursivement, des attributs de ses parents ;" -#: library/functions.rst:390 +#: library/functions.rst:438 msgid "" "Otherwise, the list contains the object's attributes' names, the names of " "its class's attributes, and recursively of the attributes of its class's " @@ -944,11 +1091,11 @@ msgstr "" "attributs de la classe, et récursivement des attributs des parents de la " "classe." -#: library/functions.rst:394 +#: library/functions.rst:442 msgid "The resulting list is sorted alphabetically. For example:" msgstr "La liste donnée est triée par ordre alphabétique, par exemple :" -#: library/functions.rst:413 +#: library/functions.rst:461 msgid "" "Because :func:`dir` is supplied primarily as a convenience for use at an " "interactive prompt, it tries to supply an interesting set of names more than " @@ -962,9 +1109,10 @@ msgstr "" "peut aussi changer d'une version à l'autre. Par exemple, les attributs de " "méta-classes ne sont pas donnés lorsque l'argument est une classe." -#: library/functions.rst:423 +#: library/functions.rst:471 +#, fuzzy msgid "" -"Take two (non complex) numbers as arguments and return a pair of numbers " +"Take two (non-complex) numbers as arguments and return a pair of numbers " "consisting of their quotient and remainder when using integer division. " "With mixed operand types, the rules for binary arithmetic operators apply. " "For integers, the result is the same as ``(a // b, a % b)``. For floating " @@ -973,16 +1121,17 @@ msgid "" "is very close to *a*, if ``a % b`` is non-zero it has the same sign as *b*, " "and ``0 <= abs(a % b) < abs(b)``." msgstr "" -"Prend deux nombres (non complexes) et donne leur quotient et reste de leur " -"division entière sous forme d'une paire de nombres. Avec des opérandes de " -"types différents, les règles des opérateurs binaires s'appliquent. Pour deux " -"entiers le résultat est le même que ``(a // b, a % b)``. Pour des nombres à " -"virgule flottante le résultat est ``(q, a % b)``, où *q* est généralement " -"``math.floor(a / b)`` mais peut valoir un de moins. Dans tous les cas ``q * " -"b + a % b`` est très proche de *a*. Si ``a % b`` est différent de zéro, il a " -"le même signe que *b*, et ``0 <= abs(a % b) < abs(b)``." +"Prend deux nombres (qui ne sont pas des nombres complexes) et renvoie leur " +"quotient et reste de leur division entière sous forme d'une paire de " +"nombres. Avec des opérandes de types différents, les règles des opérateurs " +"binaires s'appliquent. Pour deux entiers le résultat est le même que ``(a // " +"b, a % b)``. Pour des nombres à virgule flottante le résultat est ``(q, a % " +"b)``, où *q* est généralement ``math.floor(a / b)`` mais peut valoir 1 de " +"moins. Dans tous les cas ``q * b + a % b`` est très proche de *a*. Si ``a % " +"b`` est différent de zéro, il a le même signe que *b*, et ``0 <= abs(a % b) " +"< abs(b)``." -#: library/functions.rst:435 +#: library/functions.rst:483 msgid "" "Return an enumerate object. *iterable* must be a sequence, an :term:" "`iterator`, or some other object which supports iteration. The :meth:" @@ -996,11 +1145,11 @@ msgstr "" "`enumerate` renvoie un *n*-uplet contenant un compte (démarrant à *start*, 0 " "par défaut) et les valeurs obtenues de l'itération sur *iterable*." -#: library/functions.rst:447 +#: library/functions.rst:495 msgid "Equivalent to::" msgstr "Équivalent à ::" -#: library/functions.rst:458 +#: library/functions.rst:507 msgid "" "The arguments are a string and optional globals and locals. If provided, " "*globals* must be a dictionary. If provided, *locals* can be any mapping " @@ -1010,21 +1159,22 @@ msgstr "" "globales. S'il est fourni, *globals* doit être un dictionnaire. S'il est " "fourni, *locals* peut être n'importe quel objet *mapping*." -#: library/functions.rst:462 +#: library/functions.rst:511 +#, fuzzy msgid "" "The *expression* argument is parsed and evaluated as a Python expression " "(technically speaking, a condition list) using the *globals* and *locals* " "dictionaries as global and local namespace. If the *globals* dictionary is " "present and does not contain a value for the key ``__builtins__``, a " "reference to the dictionary of the built-in module :mod:`builtins` is " -"inserted under that key before *expression* is parsed. This means that " -"*expression* normally has full access to the standard :mod:`builtins` module " -"and restricted environments are propagated. If the *locals* dictionary is " -"omitted it defaults to the *globals* dictionary. If both dictionaries are " -"omitted, the expression is executed with the *globals* and *locals* in the " -"environment where :func:`eval` is called. Note, *eval()* does not have " -"access to the :term:`nested scopes ` (non-locals) in the " -"enclosing environment." +"inserted under that key before *expression* is parsed. That way you can " +"control what builtins are available to the executed code by inserting your " +"own ``__builtins__`` dictionary into *globals* before passing it to :func:" +"`eval`. If the *locals* dictionary is omitted it defaults to the *globals* " +"dictionary. If both dictionaries are omitted, the expression is executed " +"with the *globals* and *locals* in the environment where :func:`eval` is " +"called. Note, *eval()* does not have access to the :term:`nested scopes " +"` (non-locals) in the enclosing environment." msgstr "" "L'argument *expression* est analysé et évalué comme une expression Python " "(techniquement, une *condition list*) en utilisant les dictionnaires " @@ -1040,7 +1190,7 @@ msgstr "" "`eval` est appelée. Note, *eval()* n'a pas accès aux :term:`portées " "imbriquées ` (non locales) dans l'environnement englobant." -#: library/functions.rst:476 +#: library/functions.rst:526 msgid "" "The return value is the result of the evaluated expression. Syntax errors " "are reported as exceptions. Example:" @@ -1048,10 +1198,11 @@ msgstr "" "La valeur de retour est le résultat de l'expression évaluée. Les erreurs de " "syntaxe sont signalées comme des exceptions. Exemple :" -#: library/functions.rst:483 +#: library/functions.rst:533 +#, fuzzy msgid "" "This function can also be used to execute arbitrary code objects (such as " -"those created by :func:`compile`). In this case pass a code object instead " +"those created by :func:`compile`). In this case, pass a code object instead " "of a string. If the code object has been compiled with ``'exec'`` as the " "*mode* argument, :func:`eval`\\'s return value will be ``None``." msgstr "" @@ -1060,19 +1211,26 @@ msgstr "" "code plutôt qu'une chaîne. Si l'objet code a été compilé avec l'argument " "*mode* à ``'exec'``, :func:`eval` donnera ``None``." -#: library/functions.rst:488 +#: library/functions.rst:538 +#, fuzzy msgid "" "Hints: dynamic execution of statements is supported by the :func:`exec` " -"function. The :func:`globals` and :func:`locals` functions returns the " +"function. The :func:`globals` and :func:`locals` functions return the " "current global and local dictionary, respectively, which may be useful to " "pass around for use by :func:`eval` or :func:`exec`." msgstr "" -"Conseils : L'exécution dynamique d'instructions est gérée par la fonction :" +"Conseils : l'exécution dynamique d'instructions est gérée par la fonction :" "func:`exec`. Les fonctions :func:`globals` et :func:`locals` renvoient " "respectivement les dictionnaires globaux et locaux, qui peuvent être utiles " "lors de l'usage de :func:`eval` et :func:`exec`." -#: library/functions.rst:493 +#: library/functions.rst:543 +msgid "" +"If the given source is a string, then leading and trailing spaces and tabs " +"are stripped." +msgstr "" + +#: library/functions.rst:546 msgid "" "See :func:`ast.literal_eval` for a function that can safely evaluate strings " "with expressions containing only literals." @@ -1081,16 +1239,16 @@ msgstr "" "peut évaluer en toute sécurité des chaînes avec des expressions ne contenant " "que des valeurs littérales." -#: library/functions.rst:532 +#: library/functions.rst:590 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``exec`` with argument " "``code_object``." msgstr "" -"Lève un :ref:`auditing event ` ``open`` avec les arguments " -"``file``, ``mode``, ``flags``." +"Lève un :ref:`évènement d'audit ` ``exec`` avec l'argument " +"``code_object``." -#: library/functions.rst:534 +#: library/functions.rst:592 msgid "" "Raises an :ref:`auditing event ` ``exec`` with the code object as " "the argument. Code compilation events may also be raised." @@ -1099,7 +1257,7 @@ msgstr "" "comme argument. Les événements de compilation de code peuvent également être " "levés." -#: library/functions.rst:505 +#: library/functions.rst:558 #, fuzzy msgid "" "This function supports dynamic execution of Python code. *object* must be " @@ -1107,7 +1265,7 @@ msgid "" "as a suite of Python statements which is then executed (unless a syntax " "error occurs). [#]_ If it is a code object, it is simply executed. In all " "cases, the code that's executed is expected to be valid as file input (see " -"the section \"File input\" in the Reference Manual). Be aware that the :" +"the section :ref:`file-input` in the Reference Manual). Be aware that the :" "keyword:`nonlocal`, :keyword:`yield`, and :keyword:`return` statements may " "not be used outside of function definitions even within the context of code " "passed to the :func:`exec` function. The return value is ``None``." @@ -1118,20 +1276,21 @@ msgstr "" "exécutés (sauf erreur de syntaxe). [#]_ Si c'est un objet code, il est " "simplement exécuté. Dans tous les cas, le code fourni doit être valide selon " "les mêmes critères que s'il était un script dans un fichier (voir la section " -"« Fichier d'entrée » dans le manuel de référence du langage). Gardez en tête " +"« Fichier d'entrée » dans le manuel de référence du langage). Gardez en tête " "que les mots clés :keyword:`return` et :keyword:`yield` ne peuvent pas être " "utilisés en dehors d'une fonction, même dans du code passé à :func:`exec`. " "La fonction renvoie ``None``." -#: library/functions.rst:516 +#: library/functions.rst:569 +#, fuzzy msgid "" "In all cases, if the optional parts are omitted, the code is executed in the " "current scope. If only *globals* is provided, it must be a dictionary (and " "not a subclass of dictionary), which will be used for both the global and " "the local variables. If *globals* and *locals* are given, they are used for " "the global and local variables, respectively. If provided, *locals* can be " -"any mapping object. Remember that at module level, globals and locals are " -"the same dictionary. If exec gets two separate objects as *globals* and " +"any mapping object. Remember that at the module level, globals and locals " +"are the same dictionary. If exec gets two separate objects as *globals* and " "*locals*, the code will be executed as if it were embedded in a class " "definition." msgstr "" @@ -1145,7 +1304,7 @@ msgstr "" "``exec`` reçoit deux objets distincts dans *globals* et *locals*, le code " "est exécuté comme s'il était inclus dans une définition de classe." -#: library/functions.rst:526 +#: library/functions.rst:579 msgid "" "If the *globals* dictionary does not contain a value for the key " "``__builtins__``, a reference to the dictionary of the built-in module :mod:" @@ -1159,7 +1318,15 @@ msgstr "" "exposées au code exécuté en insérant votre propre dictionnaire " "``__builtins__`` dans *globals* avant de le donner à :func:`exec`." -#: library/functions.rst:539 +#: library/functions.rst:585 +msgid "" +"The *closure* argument specifies a closure--a tuple of cellvars. It's only " +"valid when the *object* is a code object containing free variables. The " +"length of the tuple must exactly match the number of free variables " +"referenced by the code object." +msgstr "" + +#: library/functions.rst:597 msgid "" "The built-in functions :func:`globals` and :func:`locals` return the current " "global and local dictionary, respectively, which may be useful to pass " @@ -1169,7 +1336,7 @@ msgstr "" "respectivement les dictionnaires globaux et locaux, qui peuvent être utiles " "en deuxième et troisième argument de :func:`exec`." -#: library/functions.rst:545 +#: library/functions.rst:603 msgid "" "The default *locals* act as described for function :func:`locals` below: " "modifications to the default *locals* dictionary should not be attempted. " @@ -1182,7 +1349,12 @@ msgstr "" "observer l'effet du code sur les variables locales, après que :func:`exec` " "soit terminée." -#: library/functions.rst:553 +#: library/functions.rst:608 +#, fuzzy +msgid "Added the *closure* parameter." +msgstr "ajout de l'argument nommé *flush*." + +#: library/functions.rst:614 msgid "" "Construct an iterator from those elements of *iterable* for which *function* " "returns true. *iterable* may be either a sequence, a container which " @@ -1196,7 +1368,7 @@ msgstr "" "est ``None``, la fonction identité est prise, c'est-à-dire que tous les " "éléments faux d'*iterable* sont supprimés." -#: library/functions.rst:559 +#: library/functions.rst:620 msgid "" "Note that ``filter(function, iterable)`` is equivalent to the generator " "expression ``(item for item in iterable if function(item))`` if function is " @@ -1208,7 +1380,7 @@ msgstr "" "``None``, et de ``(item for item in iterable if item)`` si *function* est " "``None``." -#: library/functions.rst:564 +#: library/functions.rst:625 msgid "" "See :func:`itertools.filterfalse` for the complementary function that " "returns elements of *iterable* for which *function* returns false." @@ -1216,18 +1388,19 @@ msgstr "" "Voir :func:`itertools.filterfalse` pour la fonction complémentaire qui donne " "les éléments d'*iterable* pour lesquels *function* renvoie ``False``." -#: library/functions.rst:574 +#: library/functions.rst:635 msgid "Return a floating point number constructed from a number or string *x*." msgstr "" "Renvoie un nombre a virgule flottante depuis un nombre ou une chaîne *x*." -#: library/functions.rst:576 +#: library/functions.rst:637 +#, fuzzy msgid "" "If the argument is a string, it should contain a decimal number, optionally " "preceded by a sign, and optionally embedded in whitespace. The optional " "sign may be ``'+'`` or ``'-'``; a ``'+'`` sign has no effect on the value " "produced. The argument may also be a string representing a NaN (not-a-" -"number), or a positive or negative infinity. More precisely, the input must " +"number), or positive or negative infinity. More precisely, the input must " "conform to the following grammar after leading and trailing whitespace " "characters are removed:" msgstr "" @@ -1240,19 +1413,20 @@ msgstr "" "conformer à la grammaire suivante, après que les espaces en début et fin de " "chaîne aient été retirées :" -#: library/functions.rst:591 +#: library/functions.rst:652 +#, fuzzy msgid "" "Here ``floatnumber`` is the form of a Python floating-point literal, " "described in :ref:`floating`. Case is not significant, so, for example, " -"\"inf\", \"Inf\", \"INFINITY\" and \"iNfINity\" are all acceptable spellings " -"for positive infinity." +"\"inf\", \"Inf\", \"INFINITY\", and \"iNfINity\" are all acceptable " +"spellings for positive infinity." msgstr "" "Ici ``floatnumber`` est un nombre a virgule flottante littéral Python, " "décrit dans :ref:`floating`. La casse n'y est pas significative, donc, par " "exemple, ``\"inf\"``, ``\" Inf\"``, ``\"INFINITY\"``, et ``\" iNfiNity\"`` " "sont tous des orthographes valides pour un infini positif." -#: library/functions.rst:596 +#: library/functions.rst:657 msgid "" "Otherwise, if the argument is an integer or a floating point number, a " "floating point number with the same value (within Python's floating point " @@ -1265,7 +1439,7 @@ msgstr "" "dehors de l'intervalle d'un nombre a virgule flottante pour Python, :exc:" "`OverflowError` est levée." -#: library/functions.rst:601 +#: library/functions.rst:662 msgid "" "For a general Python object ``x``, ``float(x)`` delegates to ``x." "__float__()``. If ``__float__()`` is not defined then it falls back to :" @@ -1275,27 +1449,28 @@ msgstr "" "__float__()``. Si ``__float__()`` n'est pas défini alors il est délégué à :" "meth:`__index__`." -#: library/functions.rst:605 +#: library/functions.rst:666 msgid "If no argument is given, ``0.0`` is returned." msgstr "Sans argument, ``0.0`` est renvoyé." -#: library/functions.rst:607 +#: library/functions.rst:668 msgid "Examples::" msgstr "Exemples ::" -#: library/functions.rst:620 +#: library/functions.rst:681 msgid "The float type is described in :ref:`typesnumeric`." msgstr "Le type *float* est décrit dans :ref:`typesnumeric`." -#: library/functions.rst:628 +#: library/functions.rst:689 msgid "Falls back to :meth:`__index__` if :meth:`__float__` is not defined." -msgstr "revient à :meth:`__index__` si :meth:`__float__` n'est pas défini." +msgstr "revient à :meth:`__index__` si :meth:`__float__` n'est pas définie." -#: library/functions.rst:638 +#: library/functions.rst:699 +#, fuzzy msgid "" "Convert a *value* to a \"formatted\" representation, as controlled by " "*format_spec*. The interpretation of *format_spec* will depend on the type " -"of the *value* argument, however there is a standard formatting syntax that " +"of the *value* argument; however, there is a standard formatting syntax that " "is used by most built-in types: :ref:`formatspec`." msgstr "" "Convertit une valeur en sa représentation « formatée », contrôlée par " @@ -1303,7 +1478,7 @@ msgstr "" "valeur, cependant il existe une syntaxe standard utilisée par la plupart des " "types natifs : :ref:`formatspec`." -#: library/functions.rst:643 +#: library/functions.rst:704 msgid "" "The default *format_spec* is an empty string which usually gives the same " "effect as calling :func:`str(value) `." @@ -1311,7 +1486,7 @@ msgstr "" "Par défaut, *format_spec* est une chaîne vide. Dans ce cas, appeler cette " "fonction a généralement le même effet qu'appeler :func:`str(value) `." -#: library/functions.rst:646 +#: library/functions.rst:707 msgid "" "A call to ``format(value, format_spec)`` is translated to ``type(value)." "__format__(value, format_spec)`` which bypasses the instance dictionary when " @@ -1327,7 +1502,7 @@ msgstr "" "mod:`object` et que *format_spec* n'est pas vide, ou si *format_spec* ou le " "résultat ne sont pas des chaînes de caractères." -#: library/functions.rst:653 +#: library/functions.rst:714 msgid "" "``object().__format__(format_spec)`` raises :exc:`TypeError` if " "*format_spec* is not an empty string." @@ -1335,7 +1510,7 @@ msgstr "" "``object().__format__(format_spec)`` lève :exc:`TypeError` si *format_spec* " "n'est pas une chaîne vide." -#: library/functions.rst:662 +#: library/functions.rst:723 msgid "" "Return a new :class:`frozenset` object, optionally with elements taken from " "*iterable*. ``frozenset`` is a built-in class. See :class:`frozenset` and :" @@ -1345,7 +1520,7 @@ msgstr "" "tirés d'*iterable*. ``frozenset`` est une classe native. Voir :class:" "`frozenset` et :ref:`types-set` pour la documentation sur cette classe." -#: library/functions.rst:666 +#: library/functions.rst:727 msgid "" "For other containers see the built-in :class:`set`, :class:`list`, :class:" "`tuple`, and :class:`dict` classes, as well as the :mod:`collections` module." @@ -1354,7 +1529,7 @@ msgstr "" "`list`, :class:`tuple`, et :class:`dict`, ainsi que le module :mod:" "`collections`." -#: library/functions.rst:673 +#: library/functions.rst:734 msgid "" "Return the value of the named attribute of *object*. *name* must be a " "string. If the string is the name of one of the object's attributes, the " @@ -1370,7 +1545,7 @@ msgstr "" "que *default* est fourni, celui-ci est renvoyé. Sinon l'exception :exc:" "`AttributeError` est levée." -#: library/functions.rst:681 +#: library/functions.rst:742 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " @@ -1378,19 +1553,19 @@ msgid "" "`getattr`." msgstr "" -#: library/functions.rst:689 +#: library/functions.rst:750 +#, fuzzy msgid "" -"Return a dictionary representing the current global symbol table. This is " -"always the dictionary of the current module (inside a function or method, " -"this is the module where it is defined, not the module from which it is " -"called)." +"Return the dictionary implementing the current module namespace. For code " +"within functions, this is set when the function is defined and remains the " +"same regardless of where the function is called." msgstr "" "Renvoie une représentation de la table de symboles globaux sous forme d'un " "dictionnaire. C'est toujours le dictionnaire du module courant (dans une " "fonction ou méthode, c'est le module où elle est définie, et non le module " "d'où elle est appelée)." -#: library/functions.rst:696 +#: library/functions.rst:757 msgid "" "The arguments are an object and a string. The result is ``True`` if the " "string is the name of one of the object's attributes, ``False`` if not. " @@ -1402,7 +1577,7 @@ msgstr "" "``False`` (l'implémentation appelle ``getattr(object, name)`` et regarde si " "une exception :exc:`AttributeError` a été levée)." -#: library/functions.rst:704 +#: library/functions.rst:765 msgid "" "Return the hash value of the object (if it has one). Hash values are " "integers. They are used to quickly compare dictionary keys during a " @@ -1415,7 +1590,7 @@ msgstr "" "ont la même valeur de hachage (même si leurs types sont différents, comme " "pour ``1`` et ``1.0``)." -#: library/functions.rst:711 +#: library/functions.rst:772 msgid "" "For objects with custom :meth:`__hash__` methods, note that :func:`hash` " "truncates the return value based on the bit width of the host machine. See :" @@ -1425,7 +1600,7 @@ msgstr "" "func:`hash` tronque la valeur donnée en fonction du nombre de bits de la " "machine hôte. Voir :meth:`__hash__` pour plus d'information." -#: library/functions.rst:717 +#: library/functions.rst:778 msgid "" "Invoke the built-in help system. (This function is intended for interactive " "use.) If no argument is given, the interactive help system starts on the " @@ -1442,27 +1617,28 @@ msgstr "" "la console. Si l'argument est d'un autre type, une page d'aide sur cet objet " "est générée." -#: library/functions.rst:724 +#: library/functions.rst:785 +#, fuzzy msgid "" -"Note that if a slash(/) appears in the parameter list of a function, when " +"Note that if a slash(/) appears in the parameter list of a function when " "invoking :func:`help`, it means that the parameters prior to the slash are " "positional-only. For more info, see :ref:`the FAQ entry on positional-only " "parameters `." msgstr "" "Notez que si une barre oblique (/) apparaît dans la liste des paramètres " -"d'une fonction, lorsque vous appelez :func:`help`, cela signifie que les " -"paramètres placés avant la barre oblique sont uniquement positionnels. Pour " +"d'une fonction lorsque vous appelez :func:`help`, cela signifie que les " +"paramètres placés avant la barre oblique sont strictement positionnels. Pour " "plus d'informations, voir :ref:`La FAQ sur les arguments positionnels `." -#: library/functions.rst:729 +#: library/functions.rst:790 msgid "" "This function is added to the built-in namespace by the :mod:`site` module." msgstr "" "Cette fonction est ajoutée à l'espace de nommage natif par le module :mod:" "`site`." -#: library/functions.rst:731 +#: library/functions.rst:792 msgid "" "Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported signatures " "for callables are now more comprehensive and consistent." @@ -1470,7 +1646,7 @@ msgstr "" "les changements aux modules :mod:`pydoc` et :mod:`inspect` rendent les " "signatures des appelables plus compréhensibles et cohérentes." -#: library/functions.rst:738 +#: library/functions.rst:799 msgid "" "Convert an integer number to a lowercase hexadecimal string prefixed with " "\"0x\". If *x* is not a Python :class:`int` object, it has to define an :" @@ -1480,7 +1656,7 @@ msgstr "" "pas un :class:`int`, il doit définir une méthode :meth:`__index__` qui " "renvoie un entier. Quelques exemples :" -#: library/functions.rst:747 +#: library/functions.rst:808 msgid "" "If you want to convert an integer number to an uppercase or lower " "hexadecimal string with prefix or not, you can use either of the following " @@ -1490,7 +1666,7 @@ msgstr "" "majuscule ou non, préfixée ou non, vous pouvez utiliser l'une des méthodes " "suivantes :" -#: library/functions.rst:759 +#: library/functions.rst:820 msgid "" "See also :func:`int` for converting a hexadecimal string to an integer using " "a base of 16." @@ -1498,7 +1674,7 @@ msgstr "" "Voir aussi :func:`int` pour convertir une chaîne hexadécimale en un entier " "(en affectant 16 à l'argument *base*)." -#: library/functions.rst:764 +#: library/functions.rst:825 msgid "" "To obtain a hexadecimal string representation for a float, use the :meth:" "`float.hex` method." @@ -1506,7 +1682,7 @@ msgstr "" "Pour obtenir une représentation hexadécimale sous forme de chaîne d'un " "nombre à virgule flottante, utilisez la méthode :meth:`float.hex`." -#: library/functions.rst:770 +#: library/functions.rst:831 msgid "" "Return the \"identity\" of an object. This is an integer which is " "guaranteed to be unique and constant for this object during its lifetime. " @@ -1517,16 +1693,16 @@ msgstr "" "constant pour cet objet durant sa durée de vie. Deux objets dont les durées " "de vie ne se chevauchent pas peuvent partager le même :func:`id`." -#: library/functions.rst:777 +#: library/functions.rst:838 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``builtins.id`` with argument " "``id``." msgstr "" -"Lève un :ref:`auditing event ` ``builtins.breakpoint`` avec " -"l'argument ``breakpointhook``." +"Lève un :ref:`évènement d'audit ` ``builtins.id`` avec l'argument " +"``id``." -#: library/functions.rst:782 +#: library/functions.rst:843 msgid "" "If the *prompt* argument is present, it is written to standard output " "without a trailing newline. The function then reads a line from input, " @@ -1538,7 +1714,7 @@ msgstr "" "standard et la convertit en chaîne (supprimant le retour à la ligne final) " "quelle renvoie. Lorsque EOF est lu, :exc:`EOFError` est levée. Exemple ::" -#: library/functions.rst:792 +#: library/functions.rst:853 msgid "" "If the :mod:`readline` module was loaded, then :func:`input` will use it to " "provide elaborate line editing and history features." @@ -1546,16 +1722,16 @@ msgstr "" "Si le module :mod:`readline` est chargé, :func:`input` l'utilisera pour " "fournir des fonctionnalités d'édition et d'historique élaborées." -#: library/functions.rst:795 +#: library/functions.rst:856 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt``." msgstr "" "Lève un :ref:`auditing event ` ``builtins.input`` avec l'argument " -"``prompt`` avant de lire l'entrée." +"``prompt``." -#: library/functions.rst:797 +#: library/functions.rst:858 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt`` before reading input" @@ -1563,24 +1739,25 @@ msgstr "" "Lève un :ref:`auditing event ` ``builtins.input`` avec l'argument " "``prompt`` avant de lire l'entrée." -#: library/functions.rst:800 +#: library/functions.rst:861 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "argument ``result``." msgstr "" -"Lève un :ref:`auditing event ` ``builtins.breakpoint`` avec " -"l'argument ``breakpointhook``." +"Lève un :ref:`auditing event ` ``builtins.input/result`` avec " +"l'argument ``result``." -#: library/functions.rst:802 +#: library/functions.rst:863 +#, fuzzy msgid "" -"Raises an auditing event ``builtins.input/result`` with the result after " -"successfully reading input." +"Raises an :ref:`auditing event ` ``builtins.input/result`` with " +"the result after successfully reading input." msgstr "" "Lève un événement d'audit ``builtins.input/result`` avec le résultat après " "avoir lu avec succès l'entrée." -#: library/functions.rst:809 +#: library/functions.rst:870 msgid "" "Return an integer object constructed from a number or string *x*, or return " "``0`` if no arguments are given. If *x* defines :meth:`__int__`, ``int(x)`` " @@ -1595,7 +1772,7 @@ msgstr "" "``int(x)`` renvoie ``x.__trunc__()``. Les nombres à virgule flottante sont " "tronqués vers zéro." -#: library/functions.rst:816 +#: library/functions.rst:877 msgid "" "If *x* is not a number or if *base* is given, then *x* must be a string, :" "class:`bytes`, or :class:`bytearray` instance representing an :ref:`integer " @@ -1624,11 +1801,11 @@ msgstr "" "0)`` n'est pas légal, alors que ``int('010')`` l'est tout comme ``int('010', " "8)``." -#: library/functions.rst:829 +#: library/functions.rst:890 msgid "The integer type is described in :ref:`typesnumeric`." msgstr "Le type des entiers est décrit dans :ref:`typesnumeric`." -#: library/functions.rst:831 +#: library/functions.rst:892 msgid "" "If *base* is not an instance of :class:`int` and the *base* object has a :" "meth:`base.__index__ ` method, that method is called to " @@ -1641,19 +1818,26 @@ msgstr "" "meth:`base.__int__ ` au lieu de :meth:`base.__index__ " "`." -#: library/functions.rst:844 +#: library/functions.rst:905 msgid "Falls back to :meth:`__index__` if :meth:`__int__` is not defined." -msgstr "revient à :meth:`__index__` si :meth:`__int__` n'est pas défini." +msgstr "Revient à :meth:`__index__` si :meth:`__int__` n'est pas définie." -#: library/functions.rst:850 +#: library/functions.rst:908 +msgid "The delegation to :meth:`__trunc__` is deprecated." +msgstr "" + +#: library/functions.rst:914 +#, fuzzy msgid "" "Return ``True`` if the *object* argument is an instance of the *classinfo* " -"argument, or of a (direct, indirect or :term:`virtual `) subclass thereof. If *object* is not an object of the given type, " "the function always returns ``False``. If *classinfo* is a tuple of type " -"objects (or recursively, other such tuples), return ``True`` if *object* is " -"an instance of any of the types. If *classinfo* is not a type or tuple of " -"types and such tuples, a :exc:`TypeError` exception is raised." +"objects (or recursively, other such tuples) or a :ref:`types-union` of " +"multiple types, return ``True`` if *object* is an instance of any of the " +"types. If *classinfo* is not a type or tuple of types and such tuples, a :" +"exc:`TypeError` exception is raised. :exc:`TypeError` may not be raised for " +"an invalid type if an earlier check succeeds." msgstr "" "Renvoie ``True`` si *object* est une instance de *classinfo*, ou d'une de " "ses classes filles, directe, indirecte, ou :term:`abstraite `) of *classinfo*. A class is considered a subclass of " -"itself. *classinfo* may be a tuple of class objects, in which case every " -"entry in *classinfo* will be checked. In any other case, a :exc:`TypeError` " -"exception is raised." +"Return ``True`` if *class* is a subclass (direct, indirect, or :term:" +"`virtual `) of *classinfo*. A class is considered a " +"subclass of itself. *classinfo* may be a tuple of class objects (or " +"recursively, other such tuples) or a :ref:`types-union`, in which case " +"return ``True`` if *class* is a subclass of any entry in *classinfo*. In " +"any other case, a :exc:`TypeError` exception is raised." msgstr "" "Renvoie ``True`` si *class* est une classe fille (directe, indirecte ou :" "term:`abstraite `) de *classinfo*. Une classe est " @@ -1678,13 +1868,14 @@ msgstr "" "classes, dans ce cas la vérification sera faite pour chaque classe de " "*classinfo*. Dans tous les autres cas, :exc:`TypeError` est levée." -#: library/functions.rst:871 +#: library/functions.rst:945 +#, fuzzy msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " "differently depending on the presence of the second argument. Without a " -"second argument, *object* must be a collection object which supports the " -"iteration protocol (the :meth:`__iter__` method), or it must support the " -"sequence protocol (the :meth:`__getitem__` method with integer arguments " +"second argument, *object* must be a collection object which supports the :" +"term:`iterable` protocol (the :meth:`__iter__` method), or it must support " +"the sequence protocol (the :meth:`__getitem__` method with integer arguments " "starting at ``0``). If it does not support either of those protocols, :exc:" "`TypeError` is raised. If the second argument, *sentinel*, is given, then " "*object* must be a callable object. The iterator created in this case will " @@ -1703,11 +1894,11 @@ msgstr "" "de :meth:`~iterator.__next__`. Si la valeur reçue est égale à *sentinel* :" "exc:`StopIteration` est levée, sinon la valeur est renvoyée." -#: library/functions.rst:884 +#: library/functions.rst:958 msgid "See also :ref:`typeiter`." msgstr "Voir aussi :ref:`typeiter`." -#: library/functions.rst:886 +#: library/functions.rst:960 msgid "" "One useful application of the second form of :func:`iter` is to build a " "block-reader. For example, reading fixed-width blocks from a binary database " @@ -1717,7 +1908,7 @@ msgstr "" "construire un lecteur par blocs. Par exemple, lire des blocs de taille fixe " "d'une base de donnée binaire jusqu'à ce que la fin soit atteinte ::" -#: library/functions.rst:898 +#: library/functions.rst:972 msgid "" "Return the length (the number of items) of an object. The argument may be a " "sequence (such as a string, bytes, tuple, list, or range) or a collection " @@ -1728,13 +1919,13 @@ msgstr "" "liste ou un intervalle) ou une collection (telle qu'un dictionnaire, un " "ensemble ou un ensemble figé)." -#: library/functions.rst:904 +#: library/functions.rst:978 msgid "" "``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." "maxsize`, such as :class:`range(2 ** 100) `." msgstr "" -#: library/functions.rst:912 +#: library/functions.rst:986 msgid "" "Rather than being a function, :class:`list` is actually a mutable sequence " "type, as documented in :ref:`typesseq-list` and :ref:`typesseq`." @@ -1743,7 +1934,7 @@ msgstr "" "type séquentiel muable, comme décrit dans :ref:`typesseq-list` et :ref:" "`typesseq`." -#: library/functions.rst:918 +#: library/functions.rst:992 msgid "" "Update and return a dictionary representing the current local symbol table. " "Free variables are returned by :func:`locals` when it is called in function " @@ -1756,7 +1947,7 @@ msgstr "" "corps d'une classe. Notez qu’au niveau d’un module, :func:`locals` et :func:" "`globals` sont le même dictionnaire." -#: library/functions.rst:924 +#: library/functions.rst:998 msgid "" "The contents of this dictionary should not be modified; changes may not " "affect the values of local and free variables used by the interpreter." @@ -1765,7 +1956,7 @@ msgstr "" "n'affectent pas les valeurs des variables locales ou libres utilisées par " "l'interpréteur." -#: library/functions.rst:929 +#: library/functions.rst:1003 msgid "" "Return an iterator that applies *function* to every item of *iterable*, " "yielding the results. If additional *iterable* arguments are passed, " @@ -1782,7 +1973,7 @@ msgstr "" "où les arguments sont déjà rangés sous forme de *n*-uplets, voir :func:" "`itertools.starmap`." -#: library/functions.rst:940 +#: library/functions.rst:1014 msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." @@ -1790,7 +1981,7 @@ msgstr "" "Renvoie le plus grand élément d'un itérable, ou l'argument le plus grand " "parmi au moins deux arguments." -#: library/functions.rst:943 +#: library/functions.rst:1017 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The largest item in the iterable is returned. If two or more positional " @@ -1801,7 +1992,7 @@ msgstr "" "deux arguments positionnels sont fournis, l'argument le plus grand sera " "renvoyé." -#: library/functions.rst:985 +#: library/functions.rst:1059 msgid "" "There are two optional keyword-only arguments. The *key* argument specifies " "a one-argument ordering function like that used for :meth:`list.sort`. The " @@ -1815,7 +2006,7 @@ msgstr "" "fourni est vide. Si l'itérable est vide et que *default* n'est pas fourni, :" "exc:`ValueError` est levée." -#: library/functions.rst:954 +#: library/functions.rst:1028 msgid "" "If multiple items are maximal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1827,15 +2018,15 @@ msgstr "" "stabilité lors du tri, tels que ``sorted(iterable, key=keyfunc, reverse=True)" "[0]`` et ``heapq.nlargest(1, iterable, key=keyfunc)``." -#: library/functions.rst:996 +#: library/functions.rst:1070 msgid "The *default* keyword-only argument." msgstr "L'argument nommé (et seulement donné par son nom) *default*." -#: library/functions.rst:999 +#: library/functions.rst:1073 msgid "The *key* can be ``None``." msgstr "l'argument *key* peut être ``None``." -#: library/functions.rst:970 +#: library/functions.rst:1044 msgid "" "Return a \"memory view\" object created from the given argument. See :ref:" "`typememoryview` for more information." @@ -1843,7 +2034,7 @@ msgstr "" "Renvoie une « vue mémoire » (*memory view*) créée depuis l'argument. Voir :" "ref:`typememoryview` pour plus d'informations." -#: library/functions.rst:977 +#: library/functions.rst:1051 msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." @@ -1851,7 +2042,7 @@ msgstr "" "Renvoie le plus petit élément d'un itérable ou le plus petit d'au moins deux " "arguments." -#: library/functions.rst:980 +#: library/functions.rst:1054 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The smallest item in the iterable is returned. If two or more positional " @@ -1861,7 +2052,7 @@ msgstr "" "plus petit élément de l'itérable est renvoyé. Si au moins deux arguments " "positionnels sont fournis, le plus petit argument positionnel est renvoyé." -#: library/functions.rst:991 +#: library/functions.rst:1065 msgid "" "If multiple items are minimal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1873,27 +2064,29 @@ msgstr "" "du tri, tels que ``sorted(iterable, key=keyfunc)[0]`` et ``heapq." "nsmallest(1, iterable, key=keyfunc)``." -#: library/functions.rst:1005 +#: library/functions.rst:1079 +#, fuzzy msgid "" -"Retrieve the next item from the *iterator* by calling its :meth:`~iterator." -"__next__` method. If *default* is given, it is returned if the iterator is " -"exhausted, otherwise :exc:`StopIteration` is raised." +"Retrieve the next item from the :term:`iterator` by calling its :meth:" +"`~iterator.__next__` method. If *default* is given, it is returned if the " +"iterator is exhausted, otherwise :exc:`StopIteration` is raised." msgstr "" "Donne l'élément suivant d'*iterator* en appelant sa méthode :meth:`~iterator." "__next__`. Si *default* est fourni, il sera renvoyé si l'itérateur est " "épuisé, sinon :exc:`StopIteration` est levée." -#: library/functions.rst:1012 +#: library/functions.rst:1086 +#, fuzzy msgid "" "Return a new featureless object. :class:`object` is a base for all classes. " -"It has the methods that are common to all instances of Python classes. This " +"It has methods that are common to all instances of Python classes. This " "function does not accept any arguments." msgstr "" "Renvoie un objet vide. :class:`object` est la classe parente de toutes les " "classes. C'est elle qui porte les méthodes communes à toutes les instances " "de classes en Python. Cette fonction n'accepte aucun argument." -#: library/functions.rst:1018 +#: library/functions.rst:1092 msgid "" ":class:`object` does *not* have a :attr:`~object.__dict__`, so you can't " "assign arbitrary attributes to an instance of the :class:`object` class." @@ -1902,7 +2095,7 @@ msgstr "" "pouvez donc pas assigner d'attributs arbitraires à une instance d':class:" "`object`." -#: library/functions.rst:1024 +#: library/functions.rst:1098 msgid "" "Convert an integer number to an octal string prefixed with \"0o\". The " "result is a valid Python expression. If *x* is not a Python :class:`int` " @@ -1914,15 +2107,16 @@ msgstr "" "objet :class:`int`, il doit définir une méthode :meth:`__index__` qui donne " "un entier, par exemple :" -#: library/functions.rst:1034 +#: library/functions.rst:1108 +#, fuzzy msgid "" -"If you want to convert an integer number to octal string either with prefix " -"\"0o\" or not, you can use either of the following ways." +"If you want to convert an integer number to an octal string either with the " +"prefix \"0o\" or not, you can use either of the following ways." msgstr "" "Si vous voulez convertir un nombre entier en chaîne octale, avec ou sans le " "préfixe ``0o``, vous pouvez utiliser l'une des méthodes suivantes." -#: library/functions.rst:1051 +#: library/functions.rst:1125 msgid "" "Open *file* and return a corresponding :term:`file object`. If the file " "cannot be opened, an :exc:`OSError` is raised. See :ref:`tut-files` for more " @@ -1932,12 +2126,13 @@ msgstr "" "Si le fichier ne peut pas être ouvert, une :exc:`OSError` est levée. Voir :" "ref:`tut-files` pour plus d'exemple d'utilisation de cette fonction." -#: library/functions.rst:1055 +#: library/functions.rst:1129 +#, fuzzy msgid "" "*file* is a :term:`path-like object` giving the pathname (absolute or " "relative to the current working directory) of the file to be opened or an " "integer file descriptor of the file to be wrapped. (If a file descriptor is " -"given, it is closed when the returned I/O object is closed, unless *closefd* " +"given, it is closed when the returned I/O object is closed unless *closefd* " "is set to ``False``.)" msgstr "" "*file* est un :term:`objet simili-chemin ` donnant le " @@ -1946,18 +2141,19 @@ msgstr "" "descripteur de fichier est donné, il sera fermé en même temps que l'objet " "d'entrée-sortie renvoyé, sauf si *closefd* est mis à ``False``)." -#: library/functions.rst:1061 +#: library/functions.rst:1135 +#, fuzzy msgid "" "*mode* is an optional string that specifies the mode in which the file is " "opened. It defaults to ``'r'`` which means open for reading in text mode. " "Other common values are ``'w'`` for writing (truncating the file if it " -"already exists), ``'x'`` for exclusive creation and ``'a'`` for appending " +"already exists), ``'x'`` for exclusive creation, and ``'a'`` for appending " "(which on *some* Unix systems, means that *all* writes append to the end of " "the file regardless of the current seek position). In text mode, if " -"*encoding* is not specified the encoding used is platform dependent: " -"``locale.getpreferredencoding(False)`` is called to get the current locale " -"encoding. (For reading and writing raw bytes use binary mode and leave " -"*encoding* unspecified.) The available modes are:" +"*encoding* is not specified the encoding used is platform-dependent: :func:" +"`locale.getencoding()` is called to get the current locale encoding. (For " +"reading and writing raw bytes use binary mode and leave *encoding* " +"unspecified.) The available modes are:" msgstr "" "*mode* est une chaîne optionnelle permettant de spécifier dans quel mode le " "fichier est ouvert. Par défaut, *mode* vaut ``'r'`` qui signifie « ouvrir en " @@ -1973,73 +2169,75 @@ msgstr "" "mode binaire sans préciser *encoding* non spécifié). Les modes disponibles " "sont :" -#: library/functions.rst:1078 +#: library/functions.rst:1152 msgid "Character" msgstr "Caractère" -#: library/functions.rst:1078 +#: library/functions.rst:1152 msgid "Meaning" msgstr "Signification" -#: library/functions.rst:1080 +#: library/functions.rst:1154 msgid "``'r'``" msgstr "``'r'``" -#: library/functions.rst:1080 +#: library/functions.rst:1154 msgid "open for reading (default)" msgstr "ouvre en lecture (par défaut)" -#: library/functions.rst:1081 +#: library/functions.rst:1155 msgid "``'w'``" msgstr "``'w'``" -#: library/functions.rst:1081 +#: library/functions.rst:1155 msgid "open for writing, truncating the file first" msgstr "ouvre en écriture, en effaçant le contenu du fichier" -#: library/functions.rst:1082 +#: library/functions.rst:1156 msgid "``'x'``" msgstr "``'x'``" -#: library/functions.rst:1082 +#: library/functions.rst:1156 msgid "open for exclusive creation, failing if the file already exists" msgstr "ouvre pour une création exclusive, échouant si le fichier existe déjà" -#: library/functions.rst:1083 +#: library/functions.rst:1157 msgid "``'a'``" msgstr "``'a'``" -#: library/functions.rst:1083 -msgid "open for writing, appending to the end of the file if it exists" +#: library/functions.rst:1157 +#, fuzzy +msgid "open for writing, appending to the end of file if it exists" msgstr "ouvre en écriture, ajoutant à la fin du fichier s'il existe" -#: library/functions.rst:1084 +#: library/functions.rst:1158 msgid "``'b'``" msgstr "``'b'``" -#: library/functions.rst:1084 +#: library/functions.rst:1158 msgid "binary mode" msgstr "mode binaire" -#: library/functions.rst:1085 +#: library/functions.rst:1159 msgid "``'t'``" msgstr "``'t'``" -#: library/functions.rst:1085 +#: library/functions.rst:1159 msgid "text mode (default)" msgstr "mode texte (par défaut)" -#: library/functions.rst:1086 +#: library/functions.rst:1160 msgid "``'+'``" msgstr "``'+'``" -#: library/functions.rst:1086 +#: library/functions.rst:1160 msgid "open for updating (reading and writing)" msgstr "ouvre en modification (lecture et écriture)" -#: library/functions.rst:1089 +#: library/functions.rst:1163 +#, fuzzy msgid "" -"The default mode is ``'r'`` (open for reading text, synonym of ``'rt'``). " +"The default mode is ``'r'`` (open for reading text, a synonym of ``'rt'``). " "Modes ``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and " "``'r+b'`` open the file with no truncation." msgstr "" @@ -2047,7 +2245,7 @@ msgstr "" "``'rt'``). Les modes ``'w+'`` et ``'w+b'`` ouvrent et vident le fichier. Les " "modes ``'r+'`` et ``'r+b'`` ouvrent le fichier sans le vider." -#: library/functions.rst:1093 +#: library/functions.rst:1167 msgid "" "As mentioned in the :ref:`io-overview`, Python distinguishes between binary " "and text I/O. Files opened in binary mode (including ``'b'`` in the *mode* " @@ -2065,22 +2263,7 @@ msgstr "" "octets ayant été décodés au préalable en utilisant un encodage déduit de " "l'environnement ou *encoding* s'il est donné." -#: library/functions.rst:1101 -msgid "" -"There is an additional mode character permitted, ``'U'``, which no longer " -"has any effect, and is considered deprecated. It previously enabled :term:" -"`universal newlines` in text mode, which became the default behaviour in " -"Python 3.0. Refer to the documentation of the :ref:`newline ` parameter for further details." -msgstr "" -"Il y a un mode « caractères » supplémentaire autorisé, ``’U’``, qui n'a plus " -"d'effet, et est considéré comme obsolète. Auparavant, il activait les :term:" -"`retours à la ligne universels ` en mode texte, qui est " -"devenu le comportement par défaut dans Python 3.0. Référez-vous à la " -"documentation du paramètre :ref:`newline ` pour plus " -"de détails." - -#: library/functions.rst:1109 +#: library/functions.rst:1177 msgid "" "Python doesn't depend on the underlying operating system's notion of text " "files; all the processing is done by Python itself, and is therefore " @@ -2090,12 +2273,17 @@ msgstr "" "jacent. Tout le traitement est effectué par Python lui-même, et est ainsi " "indépendant de la plate-forme." -#: library/functions.rst:1113 +#: library/functions.rst:1181 +#, fuzzy msgid "" "*buffering* is an optional integer used to set the buffering policy. Pass 0 " "to switch buffering off (only allowed in binary mode), 1 to select line " "buffering (only usable in text mode), and an integer > 1 to indicate the " -"size in bytes of a fixed-size chunk buffer. When no *buffering* argument is " +"size in bytes of a fixed-size chunk buffer. Note that specifying a buffer " +"size this way applies for binary buffered I/O, but ``TextIOWrapper`` (i.e., " +"files opened with ``mode='r+'``) would have another buffering. To disable " +"buffering in ``TextIOWrapper``, consider using the ``write_through`` flag " +"for :func:`io.TextIOWrapper.reconfigure`. When no *buffering* argument is " "given, the default buffering policy works as follows:" msgstr "" "*buffering* est un entier optionnel permettant de configurer l'espace " @@ -2105,7 +2293,7 @@ msgstr "" "en octets d'un tampon de taille fixe. Sans l'argument *buffering*, les " "comportements par défaut sont les suivants :" -#: library/functions.rst:1119 +#: library/functions.rst:1191 msgid "" "Binary files are buffered in fixed-size chunks; the size of the buffer is " "chosen using a heuristic trying to determine the underlying device's \"block " @@ -2118,7 +2306,7 @@ msgstr "" "DEFAULT_BUFFER_SIZE`. Sur de nombreux systèmes, le tampon sera de 4096 ou " "8192 octets." -#: library/functions.rst:1124 +#: library/functions.rst:1196 msgid "" "\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` " "returns ``True``) use line buffering. Other text files use the policy " @@ -2128,13 +2316,14 @@ msgstr "" "isatty` renvoie ``True``) utilisent un tampon par lignes. Les autres " "fichiers texte sont traités comme les fichiers binaires." -#: library/functions.rst:1128 +#: library/functions.rst:1200 +#, fuzzy msgid "" "*encoding* is the name of the encoding used to decode or encode the file. " "This should only be used in text mode. The default encoding is platform " -"dependent (whatever :func:`locale.getpreferredencoding` returns), but any :" -"term:`text encoding` supported by Python can be used. See the :mod:`codecs` " -"module for the list of supported encodings." +"dependent (whatever :func:`locale.getencoding` returns), but any :term:`text " +"encoding` supported by Python can be used. See the :mod:`codecs` module for " +"the list of supported encodings." msgstr "" "*encoding* est le nom de l'encodage utilisé pour encoder ou décoder le " "fichier. Il doit seulement être utilisé en mode texte. L'encodage par défaut " @@ -2143,7 +2332,7 @@ msgstr "" "par Python peut être utilisé. Voir :mod:`codecs` pour une liste des " "encodages pris en charge." -#: library/functions.rst:1135 +#: library/functions.rst:1206 msgid "" "*errors* is an optional string that specifies how encoding and decoding " "errors are to be handled—this cannot be used in binary mode. A variety of " @@ -2158,7 +2347,7 @@ msgstr "" "d'erreur enregistré avec :func:`codecs.register_error` est aussi un argument " "valide. Les noms standards sont :" -#: library/functions.rst:1143 +#: library/functions.rst:1214 msgid "" "``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding " "error. The default value of ``None`` has the same effect." @@ -2166,7 +2355,7 @@ msgstr "" "``'strict'`` pour lever une :exc:`ValueError` si une erreur d'encodage est " "rencontrée. La valeur par défaut, ``None``, a le même effet." -#: library/functions.rst:1147 +#: library/functions.rst:1218 msgid "" "``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to " "data loss." @@ -2174,7 +2363,7 @@ msgstr "" "``'ignore'`` ignore les erreurs. Notez qu'ignorer les erreurs d'encodage " "peut mener à des pertes de données." -#: library/functions.rst:1150 +#: library/functions.rst:1221 msgid "" "``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted " "where there is malformed data." @@ -2182,13 +2371,14 @@ msgstr "" "``'replace'`` insère un marqueur de substitution (tel que ``'?'``) en place " "des données mal formées." -#: library/functions.rst:1153 +#: library/functions.rst:1224 +#, fuzzy msgid "" -"``'surrogateescape'`` will represent any incorrect bytes as code points in " -"the Unicode Private Use Area ranging from U+DC80 to U+DCFF. These private " -"code points will then be turned back into the same bytes when the " -"``surrogateescape`` error handler is used when writing data. This is useful " -"for processing files in an unknown encoding." +"``'surrogateescape'`` will represent any incorrect bytes as low surrogate " +"code units ranging from U+DC80 to U+DCFF. These surrogate code units will " +"then be turned back into the same bytes when the ``surrogateescape`` error " +"handler is used when writing data. This is useful for processing files in " +"an unknown encoding." msgstr "" "``'surrogateescape'`` représente chaque octet incorrect par un code " "caractère de la zone *Private Use Area* d'Unicode, de *U+DC80* à *U+DCFF*. " @@ -2197,7 +2387,7 @@ msgstr "" "l'écriture de la donnée. C'est utile pour traiter des fichiers d'un encodage " "inconnu." -#: library/functions.rst:1160 +#: library/functions.rst:1231 msgid "" "``'xmlcharrefreplace'`` is only supported when writing to a file. Characters " "not supported by the encoding are replaced with the appropriate XML " @@ -2207,7 +2397,7 @@ msgstr "" "fichier. Les caractères non gérés par l'encodage sont remplacés par une " "entité XML de la forme ``&#nnn;``." -#: library/functions.rst:1164 +#: library/functions.rst:1235 msgid "" "``'backslashreplace'`` replaces malformed data by Python's backslashed " "escape sequences." @@ -2215,7 +2405,7 @@ msgstr "" "``'backslashreplace'`` remplace les données mal formées par des séquences " "d'échappement Python (utilisant des barres obliques inverses)." -#: library/functions.rst:1167 +#: library/functions.rst:1238 msgid "" "``'namereplace'`` (also only supported when writing) replaces unsupported " "characters with ``\\N{...}`` escape sequences." @@ -2223,7 +2413,7 @@ msgstr "" "``'namereplace'`` (aussi supporté lors de l'écriture) remplace les " "caractères non gérés par des séquences d'échappement ``\\N{...}``." -#: library/functions.rst:1175 +#: library/functions.rst:1246 msgid "" "*newline* controls how :term:`universal newlines` mode works (it only " "applies to text mode). It can be ``None``, ``''``, ``'\\n'``, ``'\\r'``, " @@ -2234,7 +2424,7 @@ msgstr "" "``None``, ``''``, ``'\\n'``, ``'\\r'``, et ``'\\r\\n'``. Il fonctionne comme " "suit :" -#: library/functions.rst:1179 +#: library/functions.rst:1250 msgid "" "When reading input from the stream, if *newline* is ``None``, universal " "newlines mode is enabled. Lines in the input can end in ``'\\n'``, " @@ -2247,12 +2437,12 @@ msgstr "" "Lors de la lecture, si *newline* est ``None``, le mode *universal newlines* " "est activé. Les lignes lues peuvent se terminer par ``'\\n'``, ``'\\r'``, ou " "``'\\r\\n'``, et sont remplacées par ``'\\n'``, avant d'être renvoyées à " -"l'appelant. S'il vaut ``'*'``, le mode *universal newline* est activé mais " +"l'appelant. S'il vaut ``''``, le mode *universal newline* est activé mais " "les fins de ligne ne sont pas remplacées. S'il a n'importe quelle autre " "valeur autorisée, les lignes sont seulement terminées par la chaîne donnée, " "qui est rendue telle quelle." -#: library/functions.rst:1187 +#: library/functions.rst:1258 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -2262,23 +2452,24 @@ msgid "" msgstr "" "Lors de l'écriture, si *newline* est ``None``, chaque ``'\\n'`` est remplacé " "par le séparateur de lignes par défaut du système :data:`os.linesep`. Si " -"*newline* est ``*`` ou ``'\\n'`` aucun remplacement n'est effectué. Si " +"*newline* est ``''`` ou ``'\\n'`` aucun remplacement n'est effectué. Si " "*newline* est un autre caractère valide, chaque ``'\\n'`` sera remplacé par " "la chaîne donnée." -#: library/functions.rst:1193 +#: library/functions.rst:1264 +#, fuzzy msgid "" "If *closefd* is ``False`` and a file descriptor rather than a filename was " "given, the underlying file descriptor will be kept open when the file is " -"closed. If a filename is given *closefd* must be ``True`` (the default) " -"otherwise an error will be raised." +"closed. If a filename is given *closefd* must be ``True`` (the default); " +"otherwise, an error will be raised." msgstr "" "Si *closefd* est ``False`` et qu'un descripteur de fichier est fourni plutôt " "qu'un nom de fichier, le descripteur de fichier sera laissé ouvert lorsque " "le fichier sera fermé. Si un nom de fichier est donné, *closefd* doit rester " "``True`` (la valeur par défaut) sans quoi une erreur est levée." -#: library/functions.rst:1198 +#: library/functions.rst:1269 msgid "" "A custom opener can be used by passing a callable as *opener*. The " "underlying file descriptor for the file object is then obtained by calling " @@ -2292,13 +2483,13 @@ msgstr "" "descripteur de fichier ouvert (fournir :mod:`os.open` en tant qu'*opener* " "aura le même effet que donner ``None``)." -#: library/functions.rst:1204 +#: library/functions.rst:1275 msgid "The newly created file is :ref:`non-inheritable `." msgstr "" "Il n'est :ref:`pas possible d'hériter du fichier ` " "nouvellement créé." -#: library/functions.rst:1206 +#: library/functions.rst:1277 msgid "" "The following example uses the :ref:`dir_fd ` parameter of the :func:" "`os.open` function to open a file relative to a given directory::" @@ -2306,7 +2497,7 @@ msgstr "" "L'exemple suivant utilise le paramètre :ref:`dir_fd ` de la " "fonction :func:`os.open` pour ouvrir un fichier relatif au dossier courant ::" -#: library/functions.rst:1219 +#: library/functions.rst:1290 msgid "" "The type of :term:`file object` returned by the :func:`open` function " "depends on the mode. When :func:`open` is used to open a file in a text " @@ -2332,9 +2523,10 @@ msgstr "" "BufferedRandom`. Lorsque le tampon est désactivé, le flux brut, une classe " "fille de :class:`io.RawIOBase`, :class:`io.FileIO` est renvoyée." -#: library/functions.rst:1240 +#: library/functions.rst:1311 +#, fuzzy msgid "" -"See also the file handling modules, such as, :mod:`fileinput`, :mod:`io` " +"See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " "(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:" "`tempfile`, and :mod:`shutil`." msgstr "" @@ -2342,15 +2534,15 @@ msgstr "" "`fileinput`, :mod:`io` (où :func:`open` est déclarée), :mod:`os`, :mod:`os." "path`, :mod:`tmpfile`, et :mod:`shutil`." -#: library/functions.rst:1244 +#: library/functions.rst:1315 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``file``, " "``mode``, ``flags``." msgstr "" -"Lève un :ref:`auditing event ` ``open`` avec les arguments " -"``file``, ``mode``, ``flags``." +"Lève un :ref:`évènement d'audit ` ``open`` avec les arguments " +"``file``, ``mode`` et ``flags``." -#: library/functions.rst:1246 +#: library/functions.rst:1317 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." @@ -2358,21 +2550,21 @@ msgstr "" "Les arguments ``mode`` et ``flags`` peuvent avoir été modifiés ou déduits de " "l'appel original." -#: library/functions.rst:1252 +#: library/functions.rst:1322 msgid "The *opener* parameter was added." msgstr "ajout du paramètre *opener*." -#: library/functions.rst:1253 +#: library/functions.rst:1323 msgid "The ``'x'`` mode was added." msgstr "ajout du mode ``'x'``." -#: library/functions.rst:1254 +#: library/functions.rst:1324 msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "" ":exc:`IOError` était normalement levée, elle est maintenant un alias de :exc:" "`OSError`." -#: library/functions.rst:1255 +#: library/functions.rst:1325 msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " "creation mode (``'x'``) already exists." @@ -2380,15 +2572,11 @@ msgstr "" ":exc:`FileExistsError` est maintenant levée si le fichier ouvert en mode " "création exclusive (``'x'``) existe déjà." -#: library/functions.rst:1261 +#: library/functions.rst:1330 msgid "The file is now non-inheritable." msgstr "Il n'est plus possible d'hériter de *file*." -#: library/functions.rst:1265 -msgid "The ``'U'`` mode." -msgstr "Le mode ``'U'``." - -#: library/functions.rst:1270 +#: library/functions.rst:1334 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the function now retries the system call instead of raising an :" @@ -2398,15 +2586,15 @@ msgstr "" "aucune exception, la fonction réessaye l'appel système au lieu de lever une :" "exc:`InterruptedError` (voir la :pep:`475` pour la justification)." -#: library/functions.rst:1273 +#: library/functions.rst:1337 msgid "The ``'namereplace'`` error handler was added." msgstr "ajout du gestionnaire d'erreurs ``'namereplace'``." -#: library/functions.rst:1278 +#: library/functions.rst:1341 msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "prise en charge des objets implémentant :class:`os.PathLike`." -#: library/functions.rst:1279 +#: library/functions.rst:1342 msgid "" "On Windows, opening a console buffer may return a subclass of :class:`io." "RawIOBase` other than :class:`io.FileIO`." @@ -2414,7 +2602,12 @@ msgstr "" "Sous Windows, ouvrir un *buffer* du terminal peut renvoyer une sous-classe " "de :class:`io.RawIOBase` autre que :class:`io.FileIO`." -#: library/functions.rst:1284 +#: library/functions.rst:1345 +#, fuzzy +msgid "The ``'U'`` mode has been removed." +msgstr "ajout du mode ``'x'``." + +#: library/functions.rst:1350 msgid "" "Given a string representing one Unicode character, return an integer " "representing the Unicode code point of that character. For example, " @@ -2426,7 +2619,7 @@ msgstr "" "entier ``97`` et ``ord('€')`` (symbole euro) renvoie ``8364``. Il s'agit de " "l'inverse de :func:`chr`." -#: library/functions.rst:1292 +#: library/functions.rst:1358 msgid "" "Return *base* to the power *exp*; if *mod* is present, return *base* to the " "power *exp*, modulo *mod* (computed more efficiently than ``pow(base, exp) % " @@ -2438,14 +2631,18 @@ msgstr "" "``pow(base, exp) % mod``). La forme à deux arguments ``pow(base, exp)`` est " "équivalente à l'opérateur puissance : ``base**exp``." -#: library/functions.rst:1297 +#: library/functions.rst:1363 +#, fuzzy msgid "" "The arguments must have numeric types. With mixed operand types, the " "coercion rules for binary arithmetic operators apply. For :class:`int` " "operands, the result has the same type as the operands (after coercion) " "unless the second argument is negative; in that case, all arguments are " -"converted to float and a float result is delivered. For example, ``10**2`` " -"returns ``100``, but ``10**-2`` returns ``0.01``." +"converted to float and a float result is delivered. For example, ``pow(10, " +"2)`` returns ``100``, but ``pow(10, -2)`` returns ``0.01``. For a negative " +"base of type :class:`int` or :class:`float` and a non-integral exponent, a " +"complex result is delivered. For example, ``pow(-9, 0.5)`` returns a value " +"close to ``3j``." msgstr "" "Les arguments doivent être de types numériques. Avec des opérandes de " "différents types, les mêmes règles de coercition que celles des opérateurs " @@ -2455,7 +2652,7 @@ msgstr "" "convertis en ``float``, et le résultat sera un ``float`` aussi. Par exemple, " "``10**2`` donne ``100``, alors que ``10**-2`` donne ``0.01``." -#: library/functions.rst:1304 +#: library/functions.rst:1373 msgid "" "For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must " "also be of integer type and *mod* must be nonzero. If *mod* is present and " @@ -2469,11 +2666,11 @@ msgstr "" "être premiers entre eux. Dans ce cas, ``pow(inv_base, -exp, mod)`` est " "renvoyé, où *inv_base* est un inverse de *base* modulo *mod*." -#: library/functions.rst:1310 +#: library/functions.rst:1379 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "Voici un exemple de calcul d'un inverse de ``38`` modulo ``97`` ::" -#: library/functions.rst:1317 +#: library/functions.rst:1386 msgid "" "For :class:`int` operands, the three-argument form of ``pow`` now allows the " "second argument to be negative, permitting computation of modular inverses." @@ -2482,24 +2679,25 @@ msgstr "" "permet maintenant au deuxième argument d'être négatif, permettant le calcul " "des inverses modulaires." -#: library/functions.rst:1322 +#: library/functions.rst:1391 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" "Autorise les arguments par mots-clés. Auparavant, seuls les arguments " "positionnels étaient autorisés." -#: library/functions.rst:1329 +#: library/functions.rst:1398 +#, fuzzy msgid "" "Print *objects* to the text stream *file*, separated by *sep* and followed " -"by *end*. *sep*, *end*, *file* and *flush*, if present, must be given as " +"by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as " "keyword arguments." msgstr "" "Écrit *objects* dans le flux texte *file*, séparés par *sep* et suivis de " "*end*. Les arguments *sep*, *end*, *file*, et *flush*, s'ils sont présents, " "doivent être nommés." -#: library/functions.rst:1333 +#: library/functions.rst:1402 msgid "" "All non-keyword arguments are converted to strings like :func:`str` does and " "written to the stream, separated by *sep* and followed by *end*. Both *sep* " @@ -2513,7 +2711,7 @@ msgstr "" "les valeurs par défaut. Si aucun *objects* n'est donné :func:`print` écris " "seulement *end*." -#: library/functions.rst:1339 +#: library/functions.rst:1408 msgid "" "The *file* argument must be an object with a ``write(string)`` method; if it " "is not present or ``None``, :data:`sys.stdout` will be used. Since printed " @@ -2526,23 +2724,24 @@ msgstr "" "peut pas être utilisé avec des fichiers ouverts en mode binaire. Pour ceux-" "ci utilisez plutôt ``file.write(...)``." -#: library/functions.rst:1344 +#: library/functions.rst:1413 +#, fuzzy msgid "" -"Whether output is buffered is usually determined by *file*, but if the " +"Whether the output is buffered is usually determined by *file*, but if the " "*flush* keyword argument is true, the stream is forcibly flushed." msgstr "" "Que la sortie utilise un *buffer* ou non est souvent décidé par *file*, mais " "si l'argument *flush* est vrai, le tampon du flux est vidé explicitement." -#: library/functions.rst:1347 +#: library/functions.rst:1416 msgid "Added the *flush* keyword argument." msgstr "ajout de l'argument nommé *flush*." -#: library/functions.rst:1353 +#: library/functions.rst:1422 msgid "Return a property attribute." msgstr "Renvoie un attribut propriété." -#: library/functions.rst:1355 +#: library/functions.rst:1424 msgid "" "*fget* is a function for getting an attribute value. *fset* is a function " "for setting an attribute value. *fdel* is a function for deleting an " @@ -2553,20 +2752,21 @@ msgstr "" "supprimer la valeur d'un attribut, et *doc* créé une *docstring* pour " "l'attribut." -#: library/functions.rst:1359 +#: library/functions.rst:1428 msgid "A typical use is to define a managed attribute ``x``::" msgstr "Une utilisation courante : définir un attribut managé ``x`` ::" -#: library/functions.rst:1376 +#: library/functions.rst:1445 +#, fuzzy msgid "" "If *c* is an instance of *C*, ``c.x`` will invoke the getter, ``c.x = " -"value`` will invoke the setter and ``del c.x`` the deleter." +"value`` will invoke the setter, and ``del c.x`` the deleter." msgstr "" "Si *c* est une instance de *C*, ``c.x`` appelle l'accesseur (*getter* en " "anglais), ``c.x = value`` invoque le mutateur (*setter*), et ``del x`` le " "destructeur (*deleter*)." -#: library/functions.rst:1379 +#: library/functions.rst:1448 msgid "" "If given, *doc* will be the docstring of the property attribute. Otherwise, " "the property will copy *fget*'s docstring (if it exists). This makes it " @@ -2578,17 +2778,17 @@ msgstr "" "création de propriétés en lecture seule en utilisant simplement :func:" "`property` comme un :term:`décorateur ` ::" -#: library/functions.rst:1392 +#: library/functions.rst:1461 msgid "" -"The ``@property`` decorator turns the :meth:`voltage` method into a \"getter" -"\" for a read-only attribute with the same name, and it sets the docstring " -"for *voltage* to \"Get the current voltage.\"" +"The ``@property`` decorator turns the :meth:`voltage` method into a " +"\"getter\" for a read-only attribute with the same name, and it sets the " +"docstring for *voltage* to \"Get the current voltage.\"" msgstr "" "Le décorateur ``@property`` transforme la méthode :meth:`voltage` en un " "*getter* d'un attribut du même nom, et donne *\"Get the current voltage\"* " "comme *docstring* de *voltage*." -#: library/functions.rst:1396 +#: library/functions.rst:1465 msgid "" "A property object has :attr:`~property.getter`, :attr:`~property.setter`, " "and :attr:`~property.deleter` methods usable as decorators that create a " @@ -2600,7 +2800,7 @@ msgstr "" "une copie de la propriété avec les accesseurs correspondants définis par la " "fonction de décoration. C'est plus clair avec un exemple ::" -#: library/functions.rst:1418 +#: library/functions.rst:1487 msgid "" "This code is exactly equivalent to the first example. Be sure to give the " "additional functions the same name as the original property (``x`` in this " @@ -2610,7 +2810,7 @@ msgstr "" "donner aux fonctions additionnelles le même nom que la propriété (``x`` dans " "ce cas)." -#: library/functions.rst:1422 +#: library/functions.rst:1491 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." @@ -2618,11 +2818,11 @@ msgstr "" "L'objet propriété renvoyé à aussi les attributs ``fget``, ``fset`` et " "``fdel`` correspondants aux arguments du constructeur." -#: library/functions.rst:1425 +#: library/functions.rst:1494 msgid "The docstrings of property objects are now writeable." msgstr "Les *docstrings* des objets propriété peuvent maintenant être écrits." -#: library/functions.rst:1434 +#: library/functions.rst:1503 msgid "" "Rather than being a function, :class:`range` is actually an immutable " "sequence type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." @@ -2631,11 +2831,12 @@ msgstr "" "type de séquence immuable, comme décrit dans :ref:`typesseq-range` et :ref:" "`typesseq`." -#: library/functions.rst:1440 +#: library/functions.rst:1509 +#, fuzzy msgid "" "Return a string containing a printable representation of an object. For " "many types, this function makes an attempt to return a string that would " -"yield an object with the same value when passed to :func:`eval`, otherwise " +"yield an object with the same value when passed to :func:`eval`; otherwise, " "the representation is a string enclosed in angle brackets that contains the " "name of the type of the object together with additional information often " "including the name and address of the object. A class can control what this " @@ -2649,7 +2850,7 @@ msgstr "" "l'adresse de l'objet. Une classe peut contrôler ce que cette fonction " "renvoie pour ses instances en définissant une méthode :meth:`__repr__`." -#: library/functions.rst:1451 +#: library/functions.rst:1520 msgid "" "Return a reverse :term:`iterator`. *seq* must be an object which has a :" "meth:`__reversed__` method or supports the sequence protocol (the :meth:" @@ -2661,7 +2862,7 @@ msgstr "" "séquence (la méthode :meth:`__len__` et la méthode :meth:`__getitem__` avec " "des arguments entiers commençant à zéro)." -#: library/functions.rst:1459 +#: library/functions.rst:1528 msgid "" "Return *number* rounded to *ndigits* precision after the decimal point. If " "*ndigits* is omitted or is ``None``, it returns the nearest integer to its " @@ -2671,7 +2872,8 @@ msgstr "" "virgule. Si *ndigits* est omis (ou est ``None``), l'entier le plus proche " "est renvoyé." -#: library/functions.rst:1463 +#: library/functions.rst:1532 +#, fuzzy msgid "" "For the built-in types supporting :func:`round`, values are rounded to the " "closest multiple of 10 to the power minus *ndigits*; if two multiples are " @@ -2679,7 +2881,7 @@ msgid "" "both ``round(0.5)`` and ``round(-0.5)`` are ``0``, and ``round(1.5)`` is " "``2``). Any integer value is valid for *ndigits* (positive, zero, or " "negative). The return value is an integer if *ndigits* is omitted or " -"``None``. Otherwise the return value has the same type as *number*." +"``None``. Otherwise, the return value has the same type as *number*." msgstr "" "Pour les types natifs supportant :func:`round`, les valeurs sont arrondies " "au multiple de 10 puissance moins *ndigits*, si deux multiples sont " @@ -2689,7 +2891,7 @@ msgstr "" "zéro, ou négatif). La valeur renvoyée est un entier si *ndigits* n'est pas " "donné, (ou est ``None``). Sinon elle est du même type que *number*." -#: library/functions.rst:1472 +#: library/functions.rst:1541 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." @@ -2697,7 +2899,7 @@ msgstr "" "Pour tout autre objet Python ``number``, ``round`` délègue à ``number." "__round__``." -#: library/functions.rst:1477 +#: library/functions.rst:1546 msgid "" "The behavior of :func:`round` for floats can be surprising: for example, " "``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``. This is " @@ -2711,7 +2913,7 @@ msgstr "" "fractions de décimaux ne peuvent pas être représentés exactement en nombre a " "virgule flottante. Voir :ref:`tut-fp-issues` pour plus d'information." -#: library/functions.rst:1488 +#: library/functions.rst:1557 msgid "" "Return a new :class:`set` object, optionally with elements taken from " "*iterable*. ``set`` is a built-in class. See :class:`set` and :ref:`types-" @@ -2721,7 +2923,7 @@ msgstr "" "d'*iterable*. ``set`` est une classe native. Voir :class:`set` et :ref:" "`types-set` pour la documentation de cette classe." -#: library/functions.rst:1492 +#: library/functions.rst:1561 msgid "" "For other containers see the built-in :class:`frozenset`, :class:`list`, :" "class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` " @@ -2730,13 +2932,14 @@ msgstr "" "D'autres conteneurs existent, comme : :class:`frozenset`, :class:`list`, :" "class:`tuple`, et :class:`dict`, ainsi que le module :mod:`collections`." -#: library/functions.rst:1499 +#: library/functions.rst:1568 +#, fuzzy msgid "" "This is the counterpart of :func:`getattr`. The arguments are an object, a " -"string and an arbitrary value. The string may name an existing attribute or " -"a new attribute. The function assigns the value to the attribute, provided " -"the object allows it. For example, ``setattr(x, 'foobar', 123)`` is " -"equivalent to ``x.foobar = 123``." +"string, and an arbitrary value. The string may name an existing attribute " +"or a new attribute. The function assigns the value to the attribute, " +"provided the object allows it. For example, ``setattr(x, 'foobar', 123)`` " +"is equivalent to ``x.foobar = 123``." msgstr "" "C'est le complément de :func:`getattr`. Les arguments sont : un objet, une " "chaîne, et une valeur de type arbitraire. La chaîne peut nommer un attribut " @@ -2744,25 +2947,25 @@ msgstr "" "si l'objet l'autorise. Par exemple, ``setattr(x, 'foobar', 123)`` équivaut à " "``x.foobar = 123``." -#: library/functions.rst:1507 +#: library/functions.rst:1576 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " "with two leading underscores) name in order to set it with :func:`setattr`." msgstr "" -#: library/functions.rst:1518 +#: library/functions.rst:1585 +#, fuzzy msgid "" "Return a :term:`slice` object representing the set of indices specified by " "``range(start, stop, step)``. The *start* and *step* arguments default to " "``None``. Slice objects have read-only data attributes :attr:`~slice." -"start`, :attr:`~slice.stop` and :attr:`~slice.step` which merely return the " +"start`, :attr:`~slice.stop`, and :attr:`~slice.step` which merely return the " "argument values (or their default). They have no other explicit " -"functionality; however they are used by Numerical Python and other third " -"party extensions. Slice objects are also generated when extended indexing " -"syntax is used. For example: ``a[start:stop:step]`` or ``a[start:stop, " -"i]``. See :func:`itertools.islice` for an alternate version that returns an " -"iterator." +"functionality; however, they are used by NumPy and other third-party " +"packages. Slice objects are also generated when extended indexing syntax is " +"used. For example: ``a[start:stop:step]`` or ``a[start:stop, i]``. See :" +"func:`itertools.islice` for an alternate version that returns an iterator." msgstr "" "Renvoie une :term:`tranche ` représentant un ensemble d'indices " "spécifiés par ``range(start, stop, step)``. Les arguments *start* et *step* " @@ -2776,16 +2979,16 @@ msgstr "" "Voir :func:`itertools.islice` pour une version alternative renvoyant un " "itérateur." -#: library/functions.rst:1531 +#: library/functions.rst:1598 msgid "Return a new sorted list from the items in *iterable*." msgstr "Renvoie une nouvelle liste triée depuis les éléments d'*iterable*." -#: library/functions.rst:1533 +#: library/functions.rst:1600 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "A deux arguments optionnels qui doivent être nommés." -#: library/functions.rst:1535 +#: library/functions.rst:1602 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each element in *iterable* (for example, ``key=str." @@ -2796,7 +2999,7 @@ msgstr "" "lower``). La valeur par défaut est ``None`` (compare les éléments " "directement)." -#: library/functions.rst:1539 +#: library/functions.rst:1606 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." @@ -2804,7 +3007,7 @@ msgstr "" "*reverse*, une valeur booléenne. Si elle est ``True``, la liste d'éléments " "est triée comme si toutes les comparaisons étaient inversées." -#: library/functions.rst:1542 +#: library/functions.rst:1609 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." @@ -2812,7 +3015,7 @@ msgstr "" "Utilisez :func:`functools.cmp_to_key` pour convertir l'ancienne notation " "*cmp* en une fonction *key*." -#: library/functions.rst:1545 +#: library/functions.rst:1612 msgid "" "The built-in :func:`sorted` function is guaranteed to be stable. A sort is " "stable if it guarantees not to change the relative order of elements that " @@ -2824,17 +3027,29 @@ msgstr "" "eux. C'est utile pour trier en plusieurs passes (par exemple par département " "puis par salaire)." -#: library/functions.rst:1550 +#: library/functions.rst:1617 +msgid "" +"The sort algorithm uses only ``<`` comparisons between items. While " +"defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " +"recommends that all six :ref:`rich comparisons ` be " +"implemented. This will help avoid bugs when using the same data with other " +"ordering tools such as :func:`max` that rely on a different underlying " +"method. Implementing all six comparisons also helps avoid confusion for " +"mixed type comparisons which can call reflected the :meth:`~object.__gt__` " +"method." +msgstr "" + +#: library/functions.rst:1626 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" "Pour des exemples de tris et un bref tutoriel, consultez :ref:`sortinghowto`." -#: library/functions.rst:1554 +#: library/functions.rst:1630 msgid "Transform a method into a static method." msgstr "Transforme une méthode en méthode statique." -#: library/functions.rst:1556 +#: library/functions.rst:1632 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" @@ -2842,7 +3057,7 @@ msgstr "" "Une méthode statique ne reçoit pas de premier argument implicitement. Voilà " "comment déclarer une méthode statique ::" -#: library/functions.rst:1563 +#: library/functions.rst:1639 msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." @@ -2850,17 +3065,21 @@ msgstr "" "La forme ``@staticmethod`` est un :term:`décorateur ` de " "fonction. Consultez :ref:`function` pour plus de détails." -#: library/functions.rst:1566 +#: library/functions.rst:1642 +#, fuzzy msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " -"an instance (such as ``C().f()``)." +"an instance (such as ``C().f()``). Moreover, they can be called as regular " +"functions (such as ``f()``)." msgstr "" "Une méthode statique peut être appelée sur une classe (par exemple, ``C." -"f()``) comme sur une instance (par exemple, ``C().f()``)." +"f()``) comme sur une instance (par exemple, ``C().f()``). De plus, elles " +"peuvent être appelées comme des fonctions régulières (comme ``f()``)." -#: library/functions.rst:1569 +#: library/functions.rst:1646 +#, fuzzy msgid "" -"Static methods in Python are similar to those found in Java or C++. Also " +"Static methods in Python are similar to those found in Java or C++. Also, " "see :func:`classmethod` for a variant that is useful for creating alternate " "class constructors." msgstr "" @@ -2868,7 +3087,7 @@ msgstr "" "ou en C++. Consultez :func:`classmethod` pour une variante utile pour créer " "des constructeurs alternatifs." -#: library/functions.rst:1573 +#: library/functions.rst:1650 msgid "" "Like all decorators, it is also possible to call ``staticmethod`` as a " "regular function and do something with its result. This is needed in some " @@ -2882,19 +3101,26 @@ msgstr "" "depuis le corps d'une classe, et souhaiteriez éviter sa transformation en " "méthode d'instance. Pour ces cas, faites comme suit ::" -#: library/functions.rst:1582 +#: library/functions.rst:1662 msgid "For more information on static methods, see :ref:`types`." msgstr "" "Pour plus d'informations sur les méthodes statiques, consultez :ref:`types`." -#: library/functions.rst:1593 +#: library/functions.rst:1664 +msgid "" +"Static methods now inherit the method attributes (``__module__``, " +"``__name__``, ``__qualname__``, ``__doc__`` and ``__annotations__``), have a " +"new ``__wrapped__`` attribute, and are now callable as regular functions." +msgstr "" + +#: library/functions.rst:1679 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" "Renvoie une version d'*object* sous forme de :class:`str`. Voir :func:`str` " "pour plus de détails." -#: library/functions.rst:1595 +#: library/functions.rst:1681 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." @@ -2902,7 +3128,7 @@ msgstr "" "``str`` est la :term:`classe ` native des chaînes de caractères. Pour " "des informations générales à propos des chaînes, consultez :ref:`textseq`." -#: library/functions.rst:1601 +#: library/functions.rst:1687 msgid "" "Sums *start* and the items of an *iterable* from left to right and returns " "the total. The *iterable*'s items are normally numbers, and the start value " @@ -2912,7 +3138,7 @@ msgstr "" "donne le total. Les éléments de l'*iterable* sont normalement des nombres, " "et la valeur de *start* ne peut pas être une chaîne de caractères." -#: library/functions.rst:1605 +#: library/functions.rst:1691 msgid "" "For some use cases, there are good alternatives to :func:`sum`. The " "preferred, fast way to concatenate a sequence of strings is by calling ``''." @@ -2926,11 +3152,11 @@ msgstr "" "meilleure précision, voir :func:`math.fsum`. Pour concaténer une série " "d'itérables, utilisez plutôt :func:`itertools.chain`." -#: library/functions.rst:1611 +#: library/functions.rst:1697 msgid "The *start* parameter can be specified as a keyword argument." msgstr "le paramètre *start* peut être passé comme un argument nommé." -#: library/functions.rst:1616 +#: library/functions.rst:1702 msgid "" "Return a proxy object that delegates method calls to a parent or sibling " "class of *type*. This is useful for accessing inherited methods that have " @@ -2940,7 +3166,7 @@ msgstr "" "de méthode à une classe parente ou sœur de *type*. C'est utile pour accéder " "aux méthodes héritées qui ont été remplacées dans une classe." -#: library/functions.rst:1620 +#: library/functions.rst:1706 msgid "" "The *object-or-type* determines the :term:`method resolution order` to be " "searched. The search starts from the class right after the *type*." @@ -2949,7 +3175,7 @@ msgstr "" "` est utilisé pour la recherche. La recherche " "commence à partir de la classe qui suit immédiatement le *type*." -#: library/functions.rst:1624 +#: library/functions.rst:1710 msgid "" "For example, if :attr:`~class.__mro__` of *object-or-type* is ``D -> B -> C -" "> A -> object`` and the value of *type* is ``B``, then :func:`super` " @@ -2959,7 +3185,7 @@ msgstr "" "-> A -> object`` et la valeur de *type* est ``B``, alors :func:`super` " "recherche ``C -> A -> object``." -#: library/functions.rst:1628 +#: library/functions.rst:1714 msgid "" "The :attr:`~class.__mro__` attribute of the *object-or-type* lists the " "method resolution search order used by both :func:`getattr` and :func:" @@ -2971,7 +3197,7 @@ msgstr "" "`super`. L'attribut est dynamique et peut changer lorsque la hiérarchie " "d'héritage est modifiée." -#: library/functions.rst:1633 +#: library/functions.rst:1719 msgid "" "If the second argument is omitted, the super object returned is unbound. If " "the second argument is an object, ``isinstance(obj, type)`` must be true. " @@ -2983,7 +3209,7 @@ msgstr "" "le second argument est un type, ``issubclass(type2, type)`` doit être vrai " "(c'est utile pour les méthodes de classe)." -#: library/functions.rst:1638 +#: library/functions.rst:1724 msgid "" "There are two typical use cases for *super*. In a class hierarchy with " "single inheritance, *super* can be used to refer to parent classes without " @@ -2996,7 +3222,7 @@ msgstr "" "maintenable. Cet usage se rapproche de l'usage de *super* dans d'autres " "langages de programmation." -#: library/functions.rst:1643 +#: library/functions.rst:1729 #, fuzzy msgid "" "The second use case is to support cooperative multiple inheritance in a " @@ -3020,12 +3246,12 @@ msgstr "" "dans la hiérarchie, et parce que l'ordre peut inclure des classes sœurs " "inconnues avant l'exécution)." -#: library/functions.rst:1653 +#: library/functions.rst:1739 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" "Dans tous les cas, un appel typique à une classe parente ressemble à ::" -#: library/functions.rst:1660 +#: library/functions.rst:1746 msgid "" "In addition to method lookups, :func:`super` also works for attribute " "lookups. One possible use case for this is calling :term:`descriptors " @@ -3035,7 +3261,7 @@ msgstr "" "la recherche d'attributs. Un cas d'utilisation possible est l'appel d'un :" "term:`descripteur ` d'une classe parente ou sœur." -#: library/functions.rst:1664 +#: library/functions.rst:1750 msgid "" "Note that :func:`super` is implemented as part of the binding process for " "explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " @@ -3052,7 +3278,7 @@ msgstr "" "n'est pas défini pour les recherches implicites via des instructions ou des " "opérateurs tels que ``super()[name]``." -#: library/functions.rst:1671 +#: library/functions.rst:1757 msgid "" "Also note that, aside from the zero argument form, :func:`super` is not " "limited to use inside methods. The two argument form specifies the " @@ -3069,7 +3295,7 @@ msgstr "" "propos de la classe en cours de définition, ainsi qu'accéder à l'instance " "courante pour les méthodes ordinaires." -#: library/functions.rst:1678 +#: library/functions.rst:1764 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." -#: library/functions.rst:1687 +#: library/functions.rst:1773 msgid "" "Rather than being a function, :class:`tuple` is actually an immutable " "sequence type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." @@ -3087,7 +3313,7 @@ msgstr "" "Plutôt qu'être une fonction, :class:`tuple` est en fait un type de séquence " "immuable, comme documenté dans :ref:`typesseq-tuple` et :ref:`typesseq`." -#: library/functions.rst:1696 +#: library/functions.rst:1782 msgid "" "With one argument, return the type of an *object*. The return value is a " "type object and generally the same object as returned by :attr:`object." @@ -3097,7 +3323,7 @@ msgstr "" "objet type et généralement la même que la valeur de l'attribut :attr:`object." "__class__ `." -#: library/functions.rst:1700 +#: library/functions.rst:1786 msgid "" "The :func:`isinstance` built-in function is recommended for testing the type " "of an object, because it takes subclasses into account." @@ -3105,7 +3331,7 @@ msgstr "" "La fonction native :func:`isinstance` est recommandée pour tester le type " "d'un objet, car elle prend en compte l'héritage." -#: library/functions.rst:1704 +#: library/functions.rst:1790 #, fuzzy msgid "" "With three arguments, return a new type object. This is essentially a " @@ -3122,17 +3348,18 @@ msgstr "" "forme dynamique de l'instruction :keyword:`class`. La chaîne *name* est le " "nom de la classe et deviendra l'attribut :attr:`~definition.__name__` ; le " "*n*-uplet *bases* contient les classes mères et deviendra l'attribut :attr:" -"`~class.__bases__` ; et le dictionnaire *dict* est l'espace de nommage " -"contenant les définitions du corps de la classe, il est copié vers un " -"dictionnaire standard pour devenir l'attribut :attr:`~object.__dict__`. Par " -"exemple, les deux instructions suivantes créent deux instances identiques " -"de :class:`type` :" - -#: library/functions.rst:1719 +"`~class.__bases__`. S'il est vide, :class:`object`, la classe mère ultime de " +"toutes les classes, est ajoutée. Le dictionnaire *dict* est l'espace de " +"nommage contenant les définitions du corps de la classe, il est copié ou " +"encapsulé vers un dictionnaire standard pour devenir l'attribut :attr:" +"`~object.__dict__`. Par exemple, les deux instructions suivantes créent deux " +"instances identiques de :class:`type` :" + +#: library/functions.rst:1805 msgid "See also :ref:`bltin-type-objects`." msgstr "Voir aussi :ref:`bltin-type-objects`." -#: library/functions.rst:1721 +#: library/functions.rst:1807 msgid "" "Keyword arguments provided to the three argument form are passed to the " "appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " @@ -3140,12 +3367,12 @@ msgid "" "would." msgstr "" -#: library/functions.rst:1726 +#: library/functions.rst:1812 #, fuzzy msgid "See also :ref:`class-customization`." -msgstr "Voir aussi :ref:`typeiter`." +msgstr "Voir aussi :ref:`class-customization`." -#: library/functions.rst:1728 +#: library/functions.rst:1814 msgid "" "Subclasses of :class:`type` which don't override ``type.__new__`` may no " "longer use the one-argument form to get the type of an object." @@ -3154,7 +3381,7 @@ msgstr "" "ne doivent plus utiliser la forme à un argument pour récupérer le type d'un " "objet." -#: library/functions.rst:1734 +#: library/functions.rst:1820 msgid "" "Return the :attr:`~object.__dict__` attribute for a module, class, instance, " "or any other object with a :attr:`~object.__dict__` attribute." @@ -3163,7 +3390,7 @@ msgstr "" "instance ou de n'importe quel objet avec un attribut :attr:`~object." "__dict__`." -#: library/functions.rst:1737 +#: library/functions.rst:1823 msgid "" "Objects such as modules and instances have an updateable :attr:`~object." "__dict__` attribute; however, other objects may have write restrictions on " @@ -3176,7 +3403,7 @@ msgstr "" "exemple, les classes utilisent un :class:`types.MappingProxyType` pour " "éviter les modifications directes du dictionnaire)." -#: library/functions.rst:1742 +#: library/functions.rst:1828 msgid "" "Without an argument, :func:`vars` acts like :func:`locals`. Note, the " "locals dictionary is only useful for reads since updates to the locals " @@ -3186,58 +3413,113 @@ msgstr "" "dictionnaire des variables locales n'est utile qu'en lecture, car ses " "écritures sont ignorées." -#: library/functions.rst:1746 +#: library/functions.rst:1832 msgid "" "A :exc:`TypeError` exception is raised if an object is specified but it " "doesn't have a :attr:`~object.__dict__` attribute (for example, if its class " "defines the :attr:`~object.__slots__` attribute)." msgstr "" -#: library/functions.rst:1752 -msgid "Make an iterator that aggregates elements from each of the iterables." -msgstr "Construit un itérateur agrégeant les éléments de tous les itérables." +#: library/functions.rst:1838 +msgid "" +"Iterate over several iterables in parallel, producing tuples with an item " +"from each one." +msgstr "" + +#: library/functions.rst:1841 +#, fuzzy +msgid "Example::" +msgstr "Exemple ::" -#: library/functions.rst:1754 +#: library/functions.rst:1850 msgid "" -"Returns an iterator of tuples, where the *i*-th tuple contains the *i*-th " -"element from each of the argument sequences or iterables. The iterator " -"stops when the shortest input iterable is exhausted. With a single iterable " -"argument, it returns an iterator of 1-tuples. With no arguments, it returns " -"an empty iterator. Equivalent to::" +"More formally: :func:`zip` returns an iterator of tuples, where the *i*-th " +"tuple contains the *i*-th element from each of the argument iterables." msgstr "" -"Renvoie un itérateur de *n*-uplets, où le *i*\\ :sup:`e` *n*-uplet contient " -"le *i*\\ :sup:`e` élément de chacune des séquences ou itérables fournis. " -"L'itérateur s'arrête lorsque le plus petit itérable fourni est épuisé. Avec " -"un seul argument itérable, elle renvoie un itérateur sur des *n*-uplets d'un " -"élément. Sans argument, elle renvoie un itérateur vide. Équivalent à ::" -#: library/functions.rst:1773 +#: library/functions.rst:1853 +msgid "" +"Another way to think of :func:`zip` is that it turns rows into columns, and " +"columns into rows. This is similar to `transposing a matrix `_." +msgstr "" + +#: library/functions.rst:1857 +msgid "" +":func:`zip` is lazy: The elements won't be processed until the iterable is " +"iterated on, e.g. by a :keyword:`!for` loop or by wrapping in a :class:" +"`list`." +msgstr "" + +#: library/functions.rst:1861 +msgid "" +"One thing to consider is that the iterables passed to :func:`zip` could have " +"different lengths; sometimes by design, and sometimes because of a bug in " +"the code that prepared these iterables. Python offers three different " +"approaches to dealing with this issue:" +msgstr "" + +#: library/functions.rst:1866 +msgid "" +"By default, :func:`zip` stops when the shortest iterable is exhausted. It " +"will ignore the remaining items in the longer iterables, cutting off the " +"result to the length of the shortest iterable::" +msgstr "" + +#: library/functions.rst:1873 +msgid "" +":func:`zip` is often used in cases where the iterables are assumed to be of " +"equal length. In such cases, it's recommended to use the ``strict=True`` " +"option. Its output is the same as regular :func:`zip`::" +msgstr "" + +#: library/functions.rst:1880 +msgid "" +"Unlike the default behavior, it checks that the lengths of iterables are " +"identical, raising a :exc:`ValueError` if they aren't:" +msgstr "" + +#: library/functions.rst:1888 +msgid "" +"Without the ``strict=True`` argument, any bug that results in iterables of " +"different lengths will be silenced, possibly manifesting as a hard-to-find " +"bug in another part of the program." +msgstr "" + +#: library/functions.rst:1892 +msgid "" +"Shorter iterables can be padded with a constant value to make all the " +"iterables have the same length. This is done by :func:`itertools." +"zip_longest`." +msgstr "" + +#: library/functions.rst:1896 +msgid "" +"Edge cases: With a single iterable argument, :func:`zip` returns an iterator " +"of 1-tuples. With no arguments, it returns an empty iterator." +msgstr "" + +#: library/functions.rst:1899 +msgid "Tips and tricks:" +msgstr "" + +#: library/functions.rst:1901 +#, fuzzy msgid "" "The left-to-right evaluation order of the iterables is guaranteed. This " "makes possible an idiom for clustering a data series into n-length groups " -"using ``zip(*[iter(s)]*n)``. This repeats the *same* iterator ``n`` times " -"so that each output tuple has the result of ``n`` calls to the iterator. " -"This has the effect of dividing the input into n-length chunks." +"using ``zip(*[iter(s)]*n, strict=True)``. This repeats the *same* iterator " +"``n`` times so that each output tuple has the result of ``n`` calls to the " +"iterator. This has the effect of dividing the input into n-length chunks." msgstr "" "Il est garanti que les itérables soient évalués de gauche à droite. Cela " "rend possible de grouper une séquence de données en groupes de taille *n* " -"via ``zip(*[iter(s)]*n)``. Cela duplique le *même* itérateur ``n`` fois ; " -"par conséquent le *n*-uplet obtenu contient le résultat de ``n`` appels à " -"l'itérateur. Cela a pour effet de diviser la séquence en morceaux de taille " -"*n*." +"via ``zip(*[iter(s)]*n, strict=True)``. Cela duplique le *même* itérateur " +"``n`` fois ; par conséquent le *n*-uplet obtenu contient le résultat de " +"``n`` appels à l'itérateur. Cela a pour effet de diviser la séquence en " +"morceaux de taille *n*." -#: library/functions.rst:1779 -msgid "" -":func:`zip` should only be used with unequal length inputs when you don't " -"care about trailing, unmatched values from the longer iterables. If those " -"values are important, use :func:`itertools.zip_longest` instead." -msgstr "" -":func:`zip` ne doit être utilisée avec des itérables de longueurs " -"différentes que lorsque les dernières données des itérables les plus longs " -"peuvent être ignorées. Si ces valeurs sont importantes, utilisez plutôt :" -"func:`itertools.zip_longest`." - -#: library/functions.rst:1783 +#: library/functions.rst:1907 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" @@ -3245,7 +3527,12 @@ msgstr "" ":func:`zip` peut être utilisée conjointement avec l'opérateur ``*`` pour " "dézipper une liste ::" -#: library/functions.rst:1804 +#: library/functions.rst:1918 +#, fuzzy +msgid "Added the ``strict`` argument." +msgstr "ajout de l'argument ``strict``." + +#: library/functions.rst:1930 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." @@ -3253,7 +3540,7 @@ msgstr "" "C'est une fonction avancée qui n'est pas fréquemment nécessaire, " "contrairement à :func:`importlib.import_module`." -#: library/functions.rst:1807 +#: library/functions.rst:1933 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -3273,13 +3560,14 @@ msgstr "" "à trouver l'implémentation par défaut. L'usage direct de :func:`__import__` " "est aussi déconseillé en faveur de :func:`importlib.import_module`." -#: library/functions.rst:1816 +#: library/functions.rst:1942 +#, fuzzy msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " "context. The *fromlist* gives the names of objects or submodules that should " "be imported from the module given by *name*. The standard implementation " -"does not use its *locals* argument at all, and uses its *globals* only to " +"does not use its *locals* argument at all and uses its *globals* only to " "determine the package context of the :keyword:`import` statement." msgstr "" "La fonction importe le module *name*, utilisant potentiellement *globals* et " @@ -3289,7 +3577,7 @@ msgstr "" "l'argument *locals* et n'utilise *globals* que pour déterminer le contexte " "du paquet de l'instruction :keyword:`import`." -#: library/functions.rst:1823 +#: library/functions.rst:1949 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -3302,7 +3590,7 @@ msgstr "" "positive indique le nombre de dossiers parents relativement au dossier du " "module appelant :func:`__import__` (voir la :pep:`328`)." -#: library/functions.rst:1829 +#: library/functions.rst:1955 msgid "" "When the *name* variable is of the form ``package.module``, normally, the " "top-level package (the name up till the first dot) is returned, *not* the " @@ -3314,7 +3602,7 @@ msgstr "" "et *pas* le module nommé par *name*. Cependant, lorsqu'un argument " "*fromlist* est fourni, le module nommé par *name* est renvoyé." -#: library/functions.rst:1834 +#: library/functions.rst:1960 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" @@ -3322,11 +3610,11 @@ msgstr "" "Par exemple, l'instruction ``import spam`` renvoie un code intermédiaire " "(*bytecode* en anglais) ressemblant au code suivant ::" -#: library/functions.rst:1839 +#: library/functions.rst:1965 msgid "The statement ``import spam.ham`` results in this call::" msgstr "L'instruction ``import spam.ham`` appelle ::" -#: library/functions.rst:1843 +#: library/functions.rst:1969 msgid "" "Note how :func:`__import__` returns the toplevel module here because this is " "the object that is bound to a name by the :keyword:`import` statement." @@ -3334,7 +3622,7 @@ msgstr "" "Notez comment :func:`__import__` renvoie ici le module de plus haut niveau " "parce que c'est l'objet lié à un nom par l'instruction :keyword:`import`." -#: library/functions.rst:1846 +#: library/functions.rst:1972 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" @@ -3342,7 +3630,7 @@ msgstr "" "En revanche, l'instruction ``from spam.ham import eggs, sausage as saus`` " "donne ::" -#: library/functions.rst:1853 +#: library/functions.rst:1979 msgid "" "Here, the ``spam.ham`` module is returned from :func:`__import__`. From " "this object, the names to import are retrieved and assigned to their " @@ -3351,7 +3639,7 @@ msgstr "" "Ici le module ``spam.ham`` est renvoyé par :func:`__import__`. De cet objet, " "les noms à importer sont récupérés et assignés à leurs noms respectifs." -#: library/functions.rst:1857 +#: library/functions.rst:1983 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." @@ -3359,7 +3647,7 @@ msgstr "" "Si vous voulez simplement importer un module (potentiellement dans un " "paquet) par son nom, utilisez :func:`importlib.import_module`." -#: library/functions.rst:1860 +#: library/functions.rst:1986 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." @@ -3367,19 +3655,19 @@ msgstr "" "les valeurs négatives pour *level* ne sont plus prises en charge (et sa " "valeur par défaut est 0)." -#: library/functions.rst:1864 +#: library/functions.rst:1990 msgid "" "When the command line options :option:`-E` or :option:`-I` are being used, " "the environment variable :envvar:`PYTHONCASEOK` is now ignored." msgstr "" -"quand les options :option:`-E` ou :option:`-I` sont précisées dans la ligne " +"Quand les options :option:`-E` ou :option:`-I` sont précisées dans la ligne " "de commande, la variable d'environnement :envvar:`PYTHONCASEOK` est ignorée." -#: library/functions.rst:1869 +#: library/functions.rst:1995 msgid "Footnotes" msgstr "Notes" -#: library/functions.rst:1870 +#: library/functions.rst:1996 msgid "" "Note that the parser only accepts the Unix-style end of line convention. If " "you are reading the code from a file, make sure to use newline conversion " @@ -3389,6 +3677,53 @@ msgstr "" "lisez le code depuis un fichier, assurez-vous d'utiliser la conversion de " "retours à la ligne pour convertir les fin de lignes Windows et Mac." +#, fuzzy +#~ msgid "" +#~ "There is an additional mode character permitted, ``'U'``, which no longer " +#~ "has any effect, and is considered deprecated. It previously enabled :term:" +#~ "`universal newlines` in text mode, which became the default behavior in " +#~ "Python 3.0. Refer to the documentation of the :ref:`newline ` parameter for further details." +#~ msgstr "" +#~ "Il y a un mode « caractères » supplémentaire autorisé, ``’U’``, qui n'a " +#~ "plus d'effet, et est considéré comme obsolète. Auparavant, il activait " +#~ "les :term:`retours à la ligne universels ` en mode " +#~ "texte, qui est devenu le comportement par défaut dans Python 3.0. Référez-" +#~ "vous à la documentation du paramètre :ref:`newline ` pour plus de détails." + +#~ msgid "The ``'U'`` mode." +#~ msgstr "Le mode ``'U'``." + +#~ msgid "" +#~ "Make an iterator that aggregates elements from each of the iterables." +#~ msgstr "" +#~ "Construit un itérateur agrégeant les éléments de tous les itérables." + +#~ msgid "" +#~ "Returns an iterator of tuples, where the *i*-th tuple contains the *i*-th " +#~ "element from each of the argument sequences or iterables. The iterator " +#~ "stops when the shortest input iterable is exhausted. With a single " +#~ "iterable argument, it returns an iterator of 1-tuples. With no " +#~ "arguments, it returns an empty iterator. Equivalent to::" +#~ msgstr "" +#~ "Renvoie un itérateur de *n*-uplets, où le *i*\\ :sup:`e` *n*-uplet " +#~ "contient le *i*\\ :sup:`e` élément de chacune des séquences ou itérables " +#~ "fournis. L'itérateur s'arrête lorsque le plus petit itérable fourni est " +#~ "épuisé. Avec un seul argument itérable, elle renvoie un itérateur sur des " +#~ "*n*-uplets d'un élément. Sans argument, elle renvoie un itérateur vide. " +#~ "Équivalent à ::" + +#~ msgid "" +#~ ":func:`zip` should only be used with unequal length inputs when you don't " +#~ "care about trailing, unmatched values from the longer iterables. If " +#~ "those values are important, use :func:`itertools.zip_longest` instead." +#~ msgstr "" +#~ ":func:`zip` ne doit être utilisée avec des itérables de longueurs " +#~ "différentes que lorsque les dernières données des itérables les plus " +#~ "longs peuvent être ignorées. Si ces valeurs sont importantes, utilisez " +#~ "plutôt :func:`itertools.zip_longest`." + #~ msgid "" #~ "The optional argument *flags* also controls whether the compiled source " #~ "is allowed to contain top-level ``await``, ``async for`` and ``async " diff --git a/library/functools.po b/library/functools.po index 2d8057a933..132b66231a 100644 --- a/library/functools.po +++ b/library/functools.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" -"PO-Revision-Date: 2021-02-06 18:15+0100\n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 15:58+0200\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -48,8 +48,8 @@ msgid "" "`_." msgstr "" "Fonction de cache très simple et sans limite de taille. Cette technique est " -"parfois appelée `« mémoïsation » `_." +"parfois appelée `« mémoïsation » `_." #: library/functools.rst:34 msgid "" @@ -63,7 +63,7 @@ msgstr "" "Comme elle ne nettoie jamais les anciennes entrées, elle est plus simple et " "plus rapide que :func:`lru_cache()` avec une limite." -#: library/functools.rst:255 +#: library/functools.rst:264 msgid "For example::" msgstr "Par exemple ::" @@ -75,7 +75,7 @@ msgid "" "computed properties of instances that are otherwise effectively immutable." msgstr "" -#: library/functools.rst:127 library/functools.rst:340 +#: library/functools.rst:127 library/functools.rst:356 msgid "Example::" msgstr "Exemple ::" @@ -187,8 +187,8 @@ msgid "" msgstr "" "Des agencements différents des arguments peuvent être considérés comme des " "appels différents avec chacun leur propre entrée dans le cache. Par exemple, " -"`f(a=1, b=2)` et `f(b=2, a=1)` n'ont pas leurs arguments dans le même ordre " -"et peuvent donc avoir des entrées distinctes dans le cache." +"``f(a=1, b=2)`` et ``f(b=2, a=1)`` n'ont pas leurs arguments dans le même " +"ordre et peuvent donc avoir des entrées distinctes dans le cache." #: library/functools.rst:151 msgid "" @@ -200,7 +200,7 @@ msgstr "" "*lru_cache* d'être appliqué directement sur une fonction de l'utilisateur, " "sans préciser *maxsize* (qui est alors défini à sa valeur par défaut, 128) ::" -#: library/functools.rst:160 +#: library/functools.rst:159 msgid "" "If *maxsize* is set to ``None``, the LRU feature is disabled and the cache " "can grow without bound." @@ -208,17 +208,28 @@ msgstr "" "Si *maxsize* est à ``None``, la fonctionnalité LRU est désactivée et le " "cache peut grossir sans limite." -#: library/functools.rst:163 +#: library/functools.rst:162 +#, fuzzy msgid "" "If *typed* is set to true, function arguments of different types will be " -"cached separately. For example, ``f(3)`` and ``f(3.0)`` will be treated as " -"distinct calls with distinct results." +"cached separately. If *typed* is false, the implementation will usually " +"regard them as equivalent calls and only cache a single result. (Some types " +"such as *str* and *int* may be cached separately even when *typed* is false.)" msgstr "" "Si *typed* est vrai, les arguments de différents types seront mis en cache " "séparément. Par exemple, ``f(3)`` et ``f(3.0)`` seront considérés comme des " "appels distincts avec des résultats distincts." -#: library/functools.rst:167 +#: library/functools.rst:168 +msgid "" +"Note, type specificity applies only to the function's immediate arguments " +"rather than their contents. The scalar arguments, ``Decimal(42)`` and " +"``Fraction(42)`` are be treated as distinct calls with distinct results. In " +"contrast, the tuple arguments ``('answer', Decimal(42))`` and ``('answer', " +"Fraction(42))`` are treated as equivalent." +msgstr "" + +#: library/functools.rst:174 msgid "" "The wrapped function is instrumented with a :func:`cache_parameters` " "function that returns a new :class:`dict` showing the values for *maxsize* " @@ -230,13 +241,13 @@ msgstr "" "*maxsize* et de *typed*. Cela ne sert qu'au débogage, changer ces valeurs " "n'a pas d'incidence." -#: library/functools.rst:172 +#: library/functools.rst:179 +#, fuzzy msgid "" "To help measure the effectiveness of the cache and tune the *maxsize* " "parameter, the wrapped function is instrumented with a :func:`cache_info` " "function that returns a :term:`named tuple` showing *hits*, *misses*, " -"*maxsize* and *currsize*. In a multi-threaded environment, the hits and " -"misses are approximate." +"*maxsize* and *currsize*." msgstr "" "Pour aider à mesurer l'efficacité du cache et ajuster le paramètre " "*maxsize*, la fonction englobée est surveillée avec une fonction :func:" @@ -244,7 +255,7 @@ msgstr "" "*misses*, *maxsize* et *currsize*. Dans un environnement *multithread*, les " "succès et échecs d'appel du cache sont approximatifs." -#: library/functools.rst:178 +#: library/functools.rst:184 msgid "" "The decorator also provides a :func:`cache_clear` function for clearing or " "invalidating the cache." @@ -252,7 +263,7 @@ msgstr "" "Le décorateur fournit également une fonction :func:`cache_clear` pour vider " "ou invalider le cache." -#: library/functools.rst:181 +#: library/functools.rst:187 msgid "" "The original underlying function is accessible through the :attr:" "`__wrapped__` attribute. This is useful for introspection, for bypassing " @@ -262,7 +273,13 @@ msgstr "" "`__wrapped__`. Ceci est utile pour l'introspection, pour outrepasser le " "cache, ou pour ré-englober la fonction avec un cache différent." -#: library/functools.rst:185 +#: library/functools.rst:191 +msgid "" +"The cache keeps references to the arguments and return values until they age " +"out of the cache or until the cache is cleared." +msgstr "" + +#: library/functools.rst:194 msgid "" "An `LRU (least recently used) cache `_ works best when the " @@ -279,7 +296,7 @@ msgstr "" "taille limite du cache permet de s'assurer que le cache ne grossisse pas " "sans limite dans les processus à longue durée de vie comme les serveurs Web." -#: library/functools.rst:192 +#: library/functools.rst:201 msgid "" "In general, the LRU cache should only be used when you want to reuse " "previously computed values. Accordingly, it doesn't make sense to cache " @@ -292,11 +309,11 @@ msgstr "" "mutable distinct à chaque appel ou des fonctions *impures* telles que ``!" "time()`` ou ``!random()``." -#: library/functools.rst:197 +#: library/functools.rst:206 msgid "Example of an LRU cache for static web content::" msgstr "Exemple d'un cache LRU pour du contenu web statique ::" -#: library/functools.rst:216 +#: library/functools.rst:225 msgid "" "Example of efficiently computing `Fibonacci numbers `_ using a cache to implement a `dynamic " @@ -307,19 +324,19 @@ msgstr "" "technique de `programmation dynamique `_ ::" -#: library/functools.rst:236 +#: library/functools.rst:245 msgid "Added the *typed* option." msgstr "L'option *typed* a été ajoutée." -#: library/functools.rst:239 +#: library/functools.rst:248 msgid "Added the *user_function* option." msgstr "Ajout de l'option *user_function*." -#: library/functools.rst:242 +#: library/functools.rst:251 msgid "Added the function :func:`cache_parameters`" msgstr "Ajout de la fonction :func:`cache_parameters`" -#: library/functools.rst:247 +#: library/functools.rst:256 msgid "" "Given a class defining one or more rich comparison ordering methods, this " "class decorator supplies the rest. This simplifies the effort involved in " @@ -329,7 +346,7 @@ msgstr "" "riches, ce décorateur de classe fournit le reste. Ceci simplifie l'effort à " "fournir dans la spécification de toutes les opérations de comparaison riche :" -#: library/functools.rst:251 +#: library/functools.rst:260 msgid "" "The class must define one of :meth:`__lt__`, :meth:`__le__`, :meth:`__gt__`, " "or :meth:`__ge__`. In addition, the class should supply an :meth:`__eq__` " @@ -339,7 +356,7 @@ msgstr "" "`__le__`, :meth:`__gt__`, or :meth:`__ge__`. De plus, la classe doit fournir " "une méthode :meth:`__eq__`." -#: library/functools.rst:275 +#: library/functools.rst:284 msgid "" "While this decorator makes it easy to create well behaved totally ordered " "types, it *does* come at the cost of slower execution and more complex stack " @@ -354,7 +371,15 @@ msgstr "" "méthodes de comparaison riches résoudra normalement vos problèmes de " "rapidité." -#: library/functools.rst:284 +#: library/functools.rst:293 +msgid "" +"This decorator makes no attempt to override methods that have been declared " +"in the class *or its superclasses*. Meaning that if a superclass defines a " +"comparison operator, *total_ordering* will not implement it again, even if " +"the original method is abstract." +msgstr "" + +#: library/functools.rst:300 msgid "" "Returning NotImplemented from the underlying comparison function for " "unrecognised types is now supported." @@ -362,7 +387,7 @@ msgstr "" "Retourner NotImplemented dans les fonction de comparaison sous-jacentes pour " "les types non reconnus est maintenant supporté." -#: library/functools.rst:290 +#: library/functools.rst:306 msgid "" "Return a new :ref:`partial object` which when called will " "behave like *func* called with the positional arguments *args* and keyword " @@ -376,13 +401,13 @@ msgstr "" "à l'appel, ils sont ajoutés à *args*. Si plus d'arguments nommés sont " "fournis, ils étendent et surchargent *keywords*. À peu près équivalent à ::" -#: library/functools.rst:306 +#: library/functools.rst:322 msgid "" -"The :func:`partial` is used for partial function application which \"freezes" -"\" some portion of a function's arguments and/or keywords resulting in a new " -"object with a simplified signature. For example, :func:`partial` can be " -"used to create a callable that behaves like the :func:`int` function where " -"the *base* argument defaults to two:" +"The :func:`partial` is used for partial function application which " +"\"freezes\" some portion of a function's arguments and/or keywords resulting " +"in a new object with a simplified signature. For example, :func:`partial` " +"can be used to create a callable that behaves like the :func:`int` function " +"where the *base* argument defaults to two:" msgstr "" ":func:`partial` est utilisé pour une application de fonction partielle qui " "\"gèle\" une portion des arguments et/ou mots-clés d'une fonction donnant un " @@ -390,7 +415,7 @@ msgstr "" "peut être utilisé pour créer un appelable qui se comporte comme la fonction :" "func:`int` ou l'argument *base* est deux par défaut :" -#: library/functools.rst:321 +#: library/functools.rst:337 msgid "" "Return a new :class:`partialmethod` descriptor which behaves like :class:" "`partial` except that it is designed to be used as a method definition " @@ -400,7 +425,7 @@ msgstr "" "comme :class:`partial` sauf qu'il est fait pour être utilisé comme une " "définition de méthode plutôt que d'être appelé directement." -#: library/functools.rst:325 +#: library/functools.rst:341 msgid "" "*func* must be a :term:`descriptor` or a callable (objects which are both, " "like normal functions, are handled as descriptors)." @@ -408,7 +433,7 @@ msgstr "" "*func* doit être un :term:`descriptor` ou un appelable (les objets qui sont " "les deux, comme les fonction normales, sont gérés comme des descripteurs)." -#: library/functools.rst:328 +#: library/functools.rst:344 msgid "" "When *func* is a descriptor (such as a normal Python function, :func:" "`classmethod`, :func:`staticmethod`, :func:`abstractmethod` or another " @@ -422,7 +447,7 @@ msgstr "" "au descripteur sous-jacent, et un :ref:`objet partiel ` " "approprié est renvoyé comme résultat." -#: library/functools.rst:334 +#: library/functools.rst:350 msgid "" "When *func* is a non-descriptor callable, an appropriate bound method is " "created dynamically. This behaves like a normal Python function when used as " @@ -436,7 +461,7 @@ msgstr "" "premier argument positionnel, avant les *args* et *keywords* fournis au " "constructeur :class:`partialmethod`." -#: library/functools.rst:365 +#: library/functools.rst:381 msgid "" "Apply *function* of two arguments cumulatively to the items of *iterable*, " "from left to right, so as to reduce the iterable to a single value. For " @@ -458,11 +483,11 @@ msgstr "" "la séquence est vide. Si *initializer* n'est pas renseigné et que *iterable* " "ne contient qu'un élément, le premier élément est renvoyé." -#: library/functools.rst:374 +#: library/functools.rst:390 msgid "Roughly equivalent to::" msgstr "À peu près équivalent à ::" -#: library/functools.rst:386 +#: library/functools.rst:402 msgid "" "See :func:`itertools.accumulate` for an iterator that yields all " "intermediate values." @@ -470,7 +495,7 @@ msgstr "" "Voir :func:`itertools.accumulate` pour un itérateur qui génère toutes les " "valeurs intermédiaires." -#: library/functools.rst:391 +#: library/functools.rst:407 msgid "" "Transform a function into a :term:`single-dispatch ` :term:" "`generic function`." @@ -478,29 +503,35 @@ msgstr "" "Transforme une fonction en une :term:`fonction générique ` :term:`single-dispatch `." -#: library/functools.rst:394 +#: library/functools.rst:410 +#, fuzzy msgid "" "To define a generic function, decorate it with the ``@singledispatch`` " -"decorator. Note that the dispatch happens on the type of the first argument, " -"create your function accordingly::" +"decorator. When defining a function using ``@singledispatch``, note that the " +"dispatch happens on the type of the first argument::" msgstr "" "Pour définir une fonction générique, il faut la décorer avec le décorateur " "``@singledispatch``. Noter que la distribution est effectuée sur le type du " "premier argument, donc la fonction doit être créée en conséquence ::" -#: library/functools.rst:405 +#: library/functools.rst:421 +#, fuzzy msgid "" "To add overloaded implementations to the function, use the :func:`register` " -"attribute of the generic function. It is a decorator. For functions " -"annotated with types, the decorator will infer the type of the first " -"argument automatically::" +"attribute of the generic function, which can be used as a decorator. For " +"functions annotated with types, the decorator will infer the type of the " +"first argument automatically::" msgstr "" "Pour ajouter des surcharges d'implémentation à la fonction, utiliser " "l'attribut :func:`register` de la fonction générique. C'est un décorateur. " "Pour les fonctions annotées avec des types, le décorateur infère le type du " "premier argument automatiquement ::" -#: library/functools.rst:423 +#: library/functools.rst:439 +msgid ":data:`types.UnionType` and :data:`typing.Union` can also be used::" +msgstr "" + +#: library/functools.rst:456 msgid "" "For code which doesn't use type annotations, the appropriate type argument " "can be passed explicitly to the decorator itself::" @@ -508,25 +539,27 @@ msgstr "" "Pour le code qui n’utilise pas les indications de type, le type souhaité " "peut être passé explicitement en argument au décorateur ::" -#: library/functools.rst:434 +#: library/functools.rst:467 +#, fuzzy msgid "" -"To enable registering lambdas and pre-existing functions, the :func:" -"`register` attribute can be used in a functional form::" +"To enable registering :term:`lambdas` and pre-existing functions, " +"the :func:`register` attribute can also be used in a functional form::" msgstr "" "Pour permettre l'enregistrement de *lambdas* et de fonctions pré-existantes, " "l'attribut :func:`register` peut être utilisé sous forme fonctionnelle ::" -#: library/functools.rst:442 +#: library/functools.rst:475 +#, fuzzy msgid "" -"The :func:`register` attribute returns the undecorated function which " -"enables decorator stacking, pickling, as well as creating unit tests for " -"each variant independently::" +"The :func:`register` attribute returns the undecorated function. This " +"enables decorator stacking, :mod:`pickling`, and the creation of " +"unit tests for each variant independently::" msgstr "" "L'attribut :func:`register` renvoie la fonction non décorée ce qui permet " "d'empiler les décorateurs, la sérialisation, et la création de tests " "unitaires pour chaque variante indépendamment ::" -#: library/functools.rst:456 +#: library/functools.rst:489 msgid "" "When called, the generic function dispatches on the type of the first " "argument::" @@ -534,12 +567,14 @@ msgstr "" "Quand elle est appelée, la fonction générique distribue sur le type du " "premier argument ::" -#: library/functools.rst:476 +#: library/functools.rst:509 +#, fuzzy msgid "" "Where there is no registered implementation for a specific type, its method " "resolution order is used to find a more generic implementation. The original " -"function decorated with ``@singledispatch`` is registered for the base " -"``object`` type, which means it is used if no better implementation is found." +"function decorated with ``@singledispatch`` is registered for the base :" +"class:`object` type, which means it is used if no better implementation is " +"found." msgstr "" "Quand il n'y a pas d'implémentation enregistrée pour un type spécifique, son " "ordre de résolution de méthode est utilisé pour trouver une implémentation " @@ -547,21 +582,23 @@ msgstr "" "est enregistrée pour le type d'``object``, et elle sera utilisée si aucune " "implémentation n'est trouvée." -#: library/functools.rst:482 +#: library/functools.rst:515 msgid "" -"If an implementation registered to :term:`abstract base class`, virtual " -"subclasses will be dispatched to that implementation::" +"If an implementation is registered to an :term:`abstract base class`, " +"virtual subclasses of the base class will be dispatched to that " +"implementation::" msgstr "" -#: library/functools.rst:496 +#: library/functools.rst:530 +#, fuzzy msgid "" -"To check which implementation will the generic function choose for a given " +"To check which implementation the generic function will choose for a given " "type, use the ``dispatch()`` attribute::" msgstr "" "Pour vérifier quelle implémentation la fonction générique choisira pour un " "type donné, utiliser l'attribut ``dispatch()`` ::" -#: library/functools.rst:504 +#: library/functools.rst:538 msgid "" "To access all registered implementations, use the read-only ``registry`` " "attribute::" @@ -569,12 +606,21 @@ msgstr "" "Pour accéder à toutes les implémentations enregistrées, utiliser l'attribut " "en lecture seule ``registry`` ::" -#: library/functools.rst:518 -msgid "The :func:`register` attribute supports using type annotations." +#: library/functools.rst:552 +#, fuzzy +msgid "The :func:`register` attribute now supports using type annotations." +msgstr "" +"L’attribut :func:`register` gère l’utilisation des indications de type." + +#: library/functools.rst:555 +#, fuzzy +msgid "" +"The :func:`register` attribute now supports :data:`types.UnionType` and :" +"data:`typing.Union` as type annotations." msgstr "" "L’attribut :func:`register` gère l’utilisation des indications de type." -#: library/functools.rst:524 +#: library/functools.rst:562 msgid "" "Transform a method into a :term:`single-dispatch ` :term:" "`generic function`." @@ -582,32 +628,36 @@ msgstr "" "Transforme une méthode en une :term:`fonction générique ` :" "term:`single-dispatch `." -#: library/functools.rst:527 +#: library/functools.rst:565 +#, fuzzy msgid "" "To define a generic method, decorate it with the ``@singledispatchmethod`` " -"decorator. Note that the dispatch happens on the type of the first non-self " -"or non-cls argument, create your function accordingly::" +"decorator. When defining a function using ``@singledispatchmethod``, note " +"that the dispatch happens on the type of the first non-*self* or non-*cls* " +"argument::" msgstr "" "Pour définir une fonction générique, il faut la décorer avec le décorateur " "``@singledispatchmethod``. Notez que la distribution est effectuée sur le " "type du premier argument non *self* ni *cls*, donc la fonction doit être " "conçue en conséquence ::" -#: library/functools.rst:544 +#: library/functools.rst:583 msgid "" -"``@singledispatchmethod`` supports nesting with other decorators such as " -"``@classmethod``. Note that to allow for ``dispatcher.register``, " -"``singledispatchmethod`` must be the *outer most* decorator. Here is the " -"``Negator`` class with the ``neg`` methods being class bound::" +"``@singledispatchmethod`` supports nesting with other decorators such as :" +"func:`@classmethod`. Note that to allow for ``dispatcher." +"register``, ``singledispatchmethod`` must be the *outer most* decorator. " +"Here is the ``Negator`` class with the ``neg`` methods bound to the class, " +"rather than an instance of the class::" msgstr "" -#: library/functools.rst:565 +#: library/functools.rst:605 msgid "" -"The same pattern can be used for other similar decorators: ``staticmethod``, " -"``abstractmethod``, and others." +"The same pattern can be used for other similar decorators: :func:" +"`@staticmethod`, :func:`@abstractmethod`, " +"and others." msgstr "" -#: library/functools.rst:573 +#: library/functools.rst:614 msgid "" "Update a *wrapper* function to look like the *wrapped* function. The " "optional arguments are tuples to specify which attributes of the original " @@ -632,7 +682,7 @@ msgstr "" "met à jour le ``__dict__`` de la fonction englobante, c'est-à-dire le " "dictionnaire de l'instance)." -#: library/functools.rst:583 +#: library/functools.rst:624 msgid "" "To allow access to the original function for introspection and other " "purposes (e.g. bypassing a caching decorator such as :func:`lru_cache`), " @@ -644,7 +694,7 @@ msgstr "" "func:`lru_cache`), cette fonction ajoute automatiquement un attribut " "``__wrapped__`` qui référence la fonction englobée." -#: library/functools.rst:588 +#: library/functools.rst:629 msgid "" "The main intended use for this function is in :term:`decorator` functions " "which wrap the decorated function and return the wrapper. If the wrapper " @@ -658,7 +708,7 @@ msgstr "" "décorateur, au lieu de la définition originale, métadonnées souvent bien " "moins utiles." -#: library/functools.rst:594 +#: library/functools.rst:635 msgid "" ":func:`update_wrapper` may be used with callables other than functions. Any " "attributes named in *assigned* or *updated* that are missing from the object " @@ -672,20 +722,20 @@ msgstr "" "dans la fonction englobante). :exc:`AttributeError` est toujours levée si le " "fonction englobante elle même a des attributs non existants dans *updated*." -#: library/functools.rst:600 +#: library/functools.rst:641 msgid "Automatic addition of the ``__wrapped__`` attribute." msgstr "Ajout automatique de l'attribut ``__wrapped__``." -#: library/functools.rst:603 +#: library/functools.rst:644 msgid "Copying of the ``__annotations__`` attribute by default." msgstr "Copie de l'attribut ``__annotations__`` par défaut." -#: library/functools.rst:606 +#: library/functools.rst:647 msgid "Missing attributes no longer trigger an :exc:`AttributeError`." msgstr "" "Les attributs manquants ne lèvent plus d'exception :exc:`AttributeError`." -#: library/functools.rst:609 +#: library/functools.rst:650 msgid "" "The ``__wrapped__`` attribute now always refers to the wrapped function, " "even if that function defined a ``__wrapped__`` attribute. (see :issue:" @@ -694,7 +744,7 @@ msgstr "" "L'attribut ``__wrapped__`` renvoie toujours la fonction englobée, même si " "cette fonction définit un attribut ``__wrapped__``. (voir :issue:`17482`)" -#: library/functools.rst:617 +#: library/functools.rst:658 msgid "" "This is a convenience function for invoking :func:`update_wrapper` as a " "function decorator when defining a wrapper function. It is equivalent to " @@ -706,7 +756,7 @@ msgstr "" "C'est équivalent à ``partial(update_wrapper, wrapped=wrapped, " "assigned=assigned, updated=updated)``. Par exemple ::" -#: library/functools.rst:643 +#: library/functools.rst:684 msgid "" "Without the use of this decorator factory, the name of the example function " "would have been ``'wrapper'``, and the docstring of the original :func:" @@ -716,11 +766,11 @@ msgstr "" "d'exemple aurait été ``'wrapper'``, et la chaîne de documentation de la " "fonction :func:`example` originale aurait été perdue." -#: library/functools.rst:651 +#: library/functools.rst:692 msgid ":class:`partial` Objects" msgstr "Objets :class:`partial`" -#: library/functools.rst:653 +#: library/functools.rst:694 msgid "" ":class:`partial` objects are callable objects created by :func:`partial`. " "They have three read-only attributes:" @@ -728,7 +778,7 @@ msgstr "" "Les objets :class:`partial` sont des objets appelables créés par :func:" "`partial`. Ils ont trois attributs en lecture seule :" -#: library/functools.rst:659 +#: library/functools.rst:700 msgid "" "A callable object or function. Calls to the :class:`partial` object will be " "forwarded to :attr:`func` with new arguments and keywords." @@ -736,7 +786,7 @@ msgstr "" "Un objet ou une fonction appelable. Les appels à l'objet :class:`partial` " "seront transmis à :attr:`func` avec les nouveaux arguments et mots-clés." -#: library/functools.rst:665 +#: library/functools.rst:706 msgid "" "The leftmost positional arguments that will be prepended to the positional " "arguments provided to a :class:`partial` object call." @@ -744,7 +794,7 @@ msgstr "" "Les arguments positionnels qui seront ajoutés avant les arguments fournis " "lors de l'appel d'un objet :class:`partial`." -#: library/functools.rst:671 +#: library/functools.rst:712 msgid "" "The keyword arguments that will be supplied when the :class:`partial` object " "is called." @@ -752,7 +802,7 @@ msgstr "" "Les arguments nommés qui seront fournis quand l'objet :class:`partial` est " "appelé." -#: library/functools.rst:674 +#: library/functools.rst:715 msgid "" ":class:`partial` objects are like :class:`function` objects in that they are " "callable, weak referencable, and can have attributes. There are some " diff --git a/library/gc.po b/library/gc.po index 6d62e2a70e..84a6f0356f 100644 --- a/library/gc.po +++ b/library/gc.po @@ -5,18 +5,19 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-09-07 00:51+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.1\n" #: library/gc.rst:2 msgid ":mod:`gc` --- Garbage Collector interface" -msgstr "" +msgstr ":mod:`gc` — Interface du ramasse-miettes" #: library/gc.rst:12 msgid "" @@ -31,23 +32,34 @@ msgid "" "this includes ``gc.DEBUG_SAVEALL``, causing garbage-collected objects to be " "saved in gc.garbage for inspection." msgstr "" +"Ce module constitue une interface au ramasse-miettes facultatif. Il permet " +"de désactiver le ramasse-miettes ou de régler la fréquence des passages. Il " +"fournit des options de débogage, et donne aussi accès aux objets qui ne " +"peuvent pas être détruits bien qu'ils aient été détectés comme non " +"référencés. Le ramasse-miettes vient en complément du système de comptage de " +"références, et peut donc être désactivé pour du code qui ne crée aucun cycle " +"de références. On le désactive avec ``gc.disable()``. Pour remonter à la " +"source d'une fuite de mémoire, utilisez ``gc.set_debug(gc.DEBUG_LEAK)``. " +"Notez que ``gc.DEBUG_LEAK`` inclut ``gc.DEBUG_SAVEALL``. Cette dernière " +"option fait que les objets inatteignables, au lieu d'être détruits, sont " +"placés dans la liste ``gc.garbage`` pour pouvoir y être examinés." #: library/gc.rst:23 -#, fuzzy msgid "The :mod:`gc` module provides the following functions:" -msgstr "Le module :mod:`abc` fournit également la fonction suivante :" +msgstr "Le module :mod:`gc` contient les fonctions suivantes :" #: library/gc.rst:28 msgid "Enable automatic garbage collection." -msgstr "" +msgstr "Active le ramasse-miettes." #: library/gc.rst:33 msgid "Disable automatic garbage collection." -msgstr "" +msgstr "Désactive le ramasse-miettes." #: library/gc.rst:38 msgid "Return ``True`` if automatic collection is enabled." msgstr "" +"Renvoie ``True`` ou ``False`` selon que le ramasse-miettes est activé ou non." #: library/gc.rst:43 msgid "" @@ -56,6 +68,11 @@ msgid "" "0 to 2). A :exc:`ValueError` is raised if the generation number is " "invalid. The number of unreachable objects found is returned." msgstr "" +"Déclenche un passage du ramasse-miettes. En l'absence d'argument, un passage " +"complet est effectué. Le paramètre *generation* permet de le limiter à une " +"génération entre 0 et 2. Une exception :exc:`ValueError` est levée si le " +"numéro de la génération n'est pas valide. Cette fonction renvoie le nombre " +"d'objets inatteignables qui ont été détectés." #: library/gc.rst:48 msgid "" @@ -71,10 +88,13 @@ msgid "" "written to ``sys.stderr``. See below for a list of debugging flags which " "can be combined using bit operations to control debugging." msgstr "" +"Change les options de débogage du ramasse-miettes, qui activent l'écriture " +"d'informations sur ``sys.stderr``. Une liste d'options se trouve plus bas. " +"Les options peuvent se combiner par les opérateurs bit à bit." #: library/gc.rst:63 msgid "Return the debugging flags currently set." -msgstr "" +msgstr "Renvoie les options de débogage actives." #: library/gc.rst:68 msgid "" @@ -82,16 +102,21 @@ msgid "" "returned. If *generation* is not None, return only the objects tracked by " "the collector that are in that generation." msgstr "" +"Renvoie la liste des objets suivis par le ramasse-miettes, à l'exclusion de " +"cette liste elle-même. Le paramètre facultatif *generation* restreint la " +"liste aux objets d'une génération particulière." #: library/gc.rst:72 msgid "New *generation* parameter." -msgstr "" +msgstr "ajout du paramètre *generation*." #: library/gc.rst:75 msgid "" "Raises an :ref:`auditing event ` ``gc.get_objects`` with argument " "``generation``." msgstr "" +"Lève un :ref:`événement d'audit ` ``gc.get_objects`` avec " +"l'argument ``generation``." #: library/gc.rst:79 msgid "" @@ -99,16 +124,24 @@ msgid "" "statistics since interpreter start. The number of keys may change in the " "future, but currently each dictionary will contain the following items:" msgstr "" +"Renvoie une liste de trois dictionnaires, un par génération. Ils contiennent " +"des statistiques sur l'action du ramasse-miettes depuis le lancement de " +"l'interpréteur. Les clés actuellement présentes sont les suivantes (d'autres " +"pourraient être ajoutées dans des versions ultérieures) :" #: library/gc.rst:84 msgid "``collections`` is the number of times this generation was collected;" msgstr "" +"``collections``, le nombre de fois où cette génération a été examinée par le " +"ramasse-miettes ;" #: library/gc.rst:86 msgid "" "``collected`` is the total number of objects collected inside this " "generation;" msgstr "" +"``collected``, le nombre total d'objets qui ont été détruits alors qu'ils " +"étaient dans cette génération ;" #: library/gc.rst:89 msgid "" @@ -116,12 +149,18 @@ msgid "" "uncollectable (and were therefore moved to the :data:`garbage` list) inside " "this generation." msgstr "" +"``uncollectable``, le nombre total d'objets qui ont été identifiés comme " +"indestructibles (et donc ajoutés à la liste :data:`garbage`) au sein de " +"cette génération." #: library/gc.rst:98 msgid "" "Set the garbage collection thresholds (the collection frequency). Setting " "*threshold0* to zero disables collection." msgstr "" +"Règle les seuils de déclenchement du ramasse-miettes, qui déterminent sa " +"fréquence de passage. Si *threshold0* est mis à zéro, le ramasse-miettes ne " +"passe jamais." #: library/gc.rst:101 msgid "" @@ -141,18 +180,36 @@ msgid "" "org/garbage_collector/#collecting-the-oldest-generation>`_ for more " "information." msgstr "" +"Les objets sont répartis en trois générations en fonction du nombre de " +"passages du ramasse-miettes qui les ont laissés intacts. Les objets " +"fraîchement créés sont placés dans la génération la plus jeune, numéro 0. À " +"chaque fois qu'un objet persiste à la suite d'un passage du ramasse-miettes, " +"il monte d'une génération, ceci jusqu'à la génération 2, la plus âgée. Le " +"ramasse-miettes se déclenche en fonction du nombre d'allocations et de " +"destructions depuis le passage précédent : lorsque les allocations moins les " +"destructions font plus que *threshold0*, un passage est initié. Lors des " +"premiers passages, seule la génération 0 est inspectée. La génération 1 est " +"examinée périodiquement, lorsque le nombre de passages sur la génération 0 " +"depuis le dernier passage ayant aussi examiné la génération 1 vient à " +"excéder *threshold1*. Les règles pour la génération 2 sont plus complexes. " +"Pour avoir des détails, voir `Collecting the oldest generation `_ " +"(dans le guide du développeur, en anglais)." #: library/gc.rst:118 msgid "" "Return the current collection counts as a tuple of ``(count0, count1, " "count2)``." msgstr "" +"Renvoie un triplet des nombres totaux de passages effectués par génération." #: library/gc.rst:124 msgid "" "Return the current collection thresholds as a tuple of ``(threshold0, " "threshold1, threshold2)``." msgstr "" +"Renvoie les seuils de passage sous la forme du triplet ``(threshold0, " +"threshold1, threshold2)``." #: library/gc.rst:130 msgid "" @@ -161,6 +218,11 @@ msgid "" "extension types which do refer to other objects but do not support garbage " "collection will not be found." msgstr "" +"Renvoie la liste des objets qui contiennent directement une référence à l'un " +"quelconque des arguments. Il est à noter que cette fonction prend uniquement " +"en compte les objets suivis par le ramasse-miettes, ce qui exclut les " +"instances de certains types d'extension qui contiennent bien des références " +"sans pour autant prendre en charge le ramassage des miettes." #: library/gc.rst:135 msgid "" @@ -169,6 +231,9 @@ msgid "" "listed among the resulting referrers. To get only currently live objects, " "call :func:`collect` before calling :func:`get_referrers`." msgstr "" +"La liste renvoyée peut contenir des objets déjà isolés, mais maintenus en " +"mémoire à cause d'un cycle. Pour les exclure, appelez :func:`collect` juste " +"avant :func:`get_referrers`." #: library/gc.rst:141 msgid "" @@ -177,12 +242,18 @@ msgid "" "temporarily invalid state. Avoid using :func:`get_referrers` for any purpose " "other than debugging." msgstr "" +"La manipulation des objets renvoyés par :func:`get_referrers` est hasardeuse " +"car ils risquent d'être encore en cours d'initialisation, donc dans un état " +"temporairement instable. Mieux vaut réserver :func:`get_referrers` au " +"débogage." #: library/gc.rst:146 msgid "" "Raises an :ref:`auditing event ` ``gc.get_referrers`` with " "argument ``objs``." msgstr "" +"Lève un :ref:`événement d'audit ` ``gc.get_referrers`` avec " +"l'argument ``objs``." #: library/gc.rst:151 msgid "" @@ -195,12 +266,25 @@ msgid "" "example, if an integer is directly reachable from an argument, that integer " "object may or may not appear in the result list." msgstr "" +"Renvoie une liste des objets pointés par les références que contiennent les " +"arguments. Ils sont déterminés en appelant, si présente, la méthode C :c:" +"member:`~PyTypeObject.tp_traverse` de chaque argument, qui visite les objets " +"auxquels cet argument fait référence. Il est à noter que :c:member:" +"`~PyTypeObject.tp_traverse` n'est définie que par les objets qui gèrent le " +"ramassage des miettes, et n'a l'obligation de visiter que les objets qui " +"peuvent potentiellement faire partie d'un cycle. Ainsi, la liste renvoyée " +"par cette fonction ne contient par forcément tous les objets qu'il est " +"possible d'atteindre à partir des arguments. Par exemple, si l'un des " +"arguments contient un entier, ce dernier objet peut être présent ou non dans " +"la liste." #: library/gc.rst:159 msgid "" "Raises an :ref:`auditing event ` ``gc.get_referents`` with " "argument ``objs``." msgstr "" +"Lève un :ref:`événement d'audit ` ``gc.get_referents`` avec " +"l'argument ``objs``." #: library/gc.rst:163 msgid "" @@ -211,12 +295,21 @@ msgid "" "present in order to suppress the garbage collector footprint of simple " "instances (e.g. dicts containing only atomic keys and values)::" msgstr "" +"Renvoie ``True`` ou ``False`` selon que l'argument est suivi ou non par le " +"ramasse-miettes. En règle générale, les objets atomiques ne sont pas suivis, " +"tandis que les objets non-atomiques, tels que les conteneurs et instances de " +"classes définies par l'utilisateur, le sont. Cependant, certains types " +"présentent des optimisations qui permettent de se passer avantageusement du " +"ramasse-miettes dans les cas simples, comme les dictionnaires dont toutes " +"les clés et valeurs sont atomiques :" #: library/gc.rst:188 msgid "" "Returns ``True`` if the given object has been finalized by the garbage " "collector, ``False`` otherwise. ::" msgstr "" +"Renvoie ``True`` ou ``False`` selon que l'argument a été finalisé par le " +"ramasse-miettes." #: library/gc.rst:209 msgid "" @@ -243,6 +336,8 @@ msgid "" "The following variables are provided for read-only access (you can mutate " "the values but should not rebind them):" msgstr "" +"Les variables suivantes sont publiques, mais elles ne sont pas censées être " +"modifiées (vous pouvez les muter, mais pas les redéfinir)." #: library/gc.rst:239 msgid "" @@ -251,12 +346,19 @@ msgid "" "should be empty most of the time, except when using instances of C extension " "types with a non-``NULL`` ``tp_del`` slot." msgstr "" +"Liste des objets indestructibles, que le ramasse-miettes n'a pas pu éliminer " +"bien qu'ils soient inatteignables. Depuis Python 3.4, cette liste demeure la " +"plupart du temps vide. Elle peut se remplir si le programme fait appel à des " +"types d'extension définis en C avec un champ ``tp_del`` différent de " +"``NULL``." #: library/gc.rst:244 msgid "" "If :const:`DEBUG_SAVEALL` is set, then all unreachable objects will be added " "to this list rather than freed." msgstr "" +"Si :const:`DEBUG_SAVEALL` est actif, tous les objets inatteignables sont " +"ajoutés à cette liste au lieu d'être détruits." #: library/gc.rst:247 msgid "" @@ -265,12 +367,19 @@ msgid "" "`DEBUG_UNCOLLECTABLE` is set, in addition all uncollectable objects are " "printed." msgstr "" +"Si cette liste n'est pas vide lors de l':term:`arrêt de l'interpréteur " +"`, un :exc:`ResourceWarning` est émis (les " +"avertissements de ce type sont silencieux par défaut). De plus, si :const:" +"`DEBUG_UNCOLLECTABLE` est actif, tous les objets indestructibles sont " +"affichés." #: library/gc.rst:253 msgid "" "Following :pep:`442`, objects with a :meth:`__del__` method don't end up in :" "attr:`gc.garbage` anymore." msgstr "" +"en application de la :pep:`442`, les objets qui définissent une méthode :" +"meth:`__del__` ne finissent plus dans :attr:`gc.garbage`." #: library/gc.rst:259 msgid "" @@ -278,72 +387,92 @@ msgid "" "after collection. The callbacks will be called with two arguments, *phase* " "and *info*." msgstr "" +"Liste de fonctions de rappel lancées par le ramasse-miettes avant et après " +"un passage. Elles prennent deux arguments, *phase* et *info*." #: library/gc.rst:263 msgid "*phase* can be one of two values:" -msgstr "" +msgstr "*phase* peut prendre deux valeurs :" #: library/gc.rst:265 msgid "\"start\": The garbage collection is about to start." -msgstr "" +msgstr "``\"start\"`` lorsque le passage du ramasse-miettes est imminent." #: library/gc.rst:267 msgid "\"stop\": The garbage collection has finished." msgstr "" +"``\"stop\"`` lorsque le passage du ramasse-miettes vient de se terminer." #: library/gc.rst:269 msgid "" "*info* is a dict providing more information for the callback. The following " "keys are currently defined:" msgstr "" +"*info* est un dictionnaire qui donne plus d'informations à la fonction de " +"rappel. Les clés suivantes sont actuellement présentes :" #: library/gc.rst:272 msgid "\"generation\": The oldest generation being collected." -msgstr "" +msgstr "``\"generation\"``, la génération la plus âgée intégrée à ce passage ;" #: library/gc.rst:274 msgid "" "\"collected\": When *phase* is \"stop\", the number of objects successfully " "collected." msgstr "" +"``\"collected\"`` : si *phase* vaut ``\"stop\"``, le nombre d'objets " +"détruits avec succès ;" #: library/gc.rst:277 msgid "" "\"uncollectable\": When *phase* is \"stop\", the number of objects that " "could not be collected and were put in :data:`garbage`." msgstr "" +"``\"uncollectable\"`` : si *phase* vaut ``\"stop\"``, le nombre d'objets " +"indestructibles ajoutés à :data:`garbage`." #: library/gc.rst:280 msgid "" "Applications can add their own callbacks to this list. The primary use " "cases are:" msgstr "" +"Toute application peut ajouter ses propres fonctions de rappel à cette " +"liste. Voici les principales applications :" #: library/gc.rst:283 msgid "" "Gathering statistics about garbage collection, such as how often various " "generations are collected, and how long the collection takes." msgstr "" +"Faire des statistiques sur le passage du ramasse-miettes, par exemple la " +"fréquence à laquelle chaque génération est examinée, ou bien le temps d'un " +"passage ;" #: library/gc.rst:287 msgid "" "Allowing applications to identify and clear their own uncollectable types " "when they appear in :data:`garbage`." msgstr "" +"Identifier les types définis par une application dont les instances " +"s'ajoutent à :data:`garbage` car elles sont indestructibles." #: library/gc.rst:293 msgid "The following constants are provided for use with :func:`set_debug`:" msgstr "" +"Les constantes suivantes définissent les options de débogage que l'on peut " +"passer à :func:`set_debug` :" #: library/gc.rst:298 msgid "" "Print statistics during collection. This information can be useful when " "tuning the collection frequency." msgstr "" +"Affiche des statistiques durant les passages du ramasse-miettes. Utile pour " +"pouvoir régler la fréquence des passages." #: library/gc.rst:304 msgid "Print information on collectable objects found." -msgstr "" +msgstr "Affiche des informations sur les objets détruits." #: library/gc.rst:309 msgid "" @@ -351,18 +480,27 @@ msgid "" "reachable but cannot be freed by the collector). These objects will be " "added to the ``garbage`` list." msgstr "" +"Affiche des informations sur les objets indestructibles (ceux qui sont " +"ajoutés à la liste ``garbage``, qui sont inatteignables mais dont la mémoire " +"ne peut pas être libérée)." #: library/gc.rst:313 msgid "" "Also print the contents of the :data:`garbage` list at :term:`interpreter " "shutdown`, if it isn't empty." msgstr "" +"Affiche également le contenu de :data:`garbage` à l':term:`arrêt de " +"l'interpréteur `, pour peu que cette liste ne soit pas " +"vide." #: library/gc.rst:319 msgid "" "When set, all unreachable objects found will be appended to *garbage* rather " "than being freed. This can be useful for debugging a leaking program." msgstr "" +"Lorsque cette option est active, les objets inatteignables sont ajoutés à la " +"liste *garbage* au lieu d'être supprimés. Ceci est utile pour déboguer une " +"fuite de mémoire." #: library/gc.rst:325 msgid "" @@ -370,3 +508,5 @@ msgid "" "leaking program (equal to ``DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | " "DEBUG_SAVEALL``)." msgstr "" +"Combinaison des options utiles au débogage d'une fuite de mémoire. Il s'agit " +"d'un raccourci pour ``DEBUG_COLLECTABLE|DEBUG_UNCOLLECTABLE|DEBUG_SAVEALL``." diff --git a/library/gettext.po b/library/gettext.po index c7eccb6fdb..4b5466d277 100644 --- a/library/gettext.po +++ b/library/gettext.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: 2021-05-23 15:53-0400\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -97,18 +97,6 @@ msgstr "" #: library/gettext.rst:51 msgid "" -"Bind the *domain* to *codeset*, changing the encoding of byte strings " -"returned by the :func:`lgettext`, :func:`ldgettext`, :func:`lngettext` and :" -"func:`ldngettext` functions. If *codeset* is omitted, then the current " -"binding is returned." -msgstr "" -"Lie *domain* à *codeset*, en changeant l'encodage des chaînes d'octets " -"retournées par les fonctions :func:`lgettext`, :func:`ldgettext`, :func:" -"`lngettext` et :func:`ldngettext`. Si *codeset* n'est pas renseigné, alors " -"le lien actuel est renvoyé." - -#: library/gettext.rst:61 -msgid "" "Change or query the current global domain. If *domain* is ``None``, then " "the current global domain is returned, otherwise the global domain is set to " "*domain*, which is returned." @@ -117,7 +105,7 @@ msgstr "" "alors le domaine global actuel est renvoyé. Sinon, le domaine global est " "positionné à *domain*, puis renvoyé." -#: library/gettext.rst:69 +#: library/gettext.rst:59 msgid "" "Return the localized translation of *message*, based on the current global " "domain, language, and locale directory. This function is usually aliased " @@ -128,13 +116,13 @@ msgstr "" "est typiquement renommée :func:`_` dans le namespace courant (voir les " "exemples ci-dessous)." -#: library/gettext.rst:76 +#: library/gettext.rst:66 msgid "" "Like :func:`.gettext`, but look the message up in the specified *domain*." msgstr "" "Comme :func:`gettext`, mais cherche le message dans le domaine spécifié." -#: library/gettext.rst:81 +#: library/gettext.rst:71 msgid "" "Like :func:`.gettext`, but consider plural forms. If a translation is found, " "apply the plural formula to *n*, and return the resulting message (some " @@ -147,7 +135,7 @@ msgstr "" "pluriel). Si aucune traduction n'a été trouvée, renvoie *singular* si *n* " "vaut 1, *plural* sinon." -#: library/gettext.rst:86 +#: library/gettext.rst:76 msgid "" "The Plural formula is taken from the catalog header. It is a C or Python " "expression that has a free variable *n*; the expression evaluates to the " @@ -163,13 +151,13 @@ msgstr "" "gettext.html>`__ pour la syntaxe précise à utiliser dans les fichiers :file:" "`.po` et pour les formules dans différents langues." -#: library/gettext.rst:96 +#: library/gettext.rst:86 msgid "" "Like :func:`ngettext`, but look the message up in the specified *domain*." msgstr "" "Comme :func:`ngettext`, mais cherche le message dans le domaine spécifié." -#: library/gettext.rst:104 +#: library/gettext.rst:94 msgid "" "Similar to the corresponding functions without the ``p`` in the prefix (that " "is, :func:`gettext`, :func:`dgettext`, :func:`ngettext`, :func:`dngettext`), " @@ -179,37 +167,7 @@ msgstr "" "à-dire :func:`gettext`, :func:`dgettext`, :func:`ngettext` et :func:" "`dngettext`), mais la traduction est limitée au *context* du message donné." -#: library/gettext.rst:116 -msgid "" -"Equivalent to the corresponding functions without the ``l`` prefix (:func:`." -"gettext`, :func:`dgettext`, :func:`ngettext` and :func:`dngettext`), but the " -"translation is returned as a byte string encoded in the preferred system " -"encoding if no other encoding was explicitly set with :func:" -"`bind_textdomain_codeset`." -msgstr "" -"Équivalent aux fonctions correspondantes non préfixées par ``l`` (:func:`." -"gettext`, :func:`dgettext`, :func:`ngettext` et :func:`dngettext`), mais la " -"traduction est retournée en tant que chaîne d'octets, encodée avec " -"l'encodage du système si aucun autre n'a été explicitement défini avec :func:" -"`bind_textdomain_codeset`." - -#: library/gettext.rst:124 -msgid "" -"These functions should be avoided in Python 3, because they return encoded " -"bytes. It's much better to use alternatives which return Unicode strings " -"instead, since most Python applications will want to manipulate human " -"readable text as strings instead of bytes. Further, it's possible that you " -"may get unexpected Unicode-related exceptions if there are encoding problems " -"with the translated strings." -msgstr "" -"Ces fonctions sont à éviter en Python 3 car elles renvoient des octets " -"encodés. Il est préférable d'utiliser des alternatives qui renvoient de " -"l'Unicode, puisque beaucoup d'applications Python voudront manipuler du " -"texte lisible par des humains plutôt que des octets. En outre, il est " -"possible que vous obteniez des exceptions non prévues liées à Unicode s'il y " -"a des soucis d'encodage avec les chaînes de caractères traduites." - -#: library/gettext.rst:134 +#: library/gettext.rst:101 msgid "" "Note that GNU :program:`gettext` also defines a :func:`dcgettext` method, " "but this was deemed not useful and so it is currently unimplemented." @@ -218,15 +176,15 @@ msgstr "" "elle a été considérée comme inutile et donc actuellement marquée comme non " "implémentée." -#: library/gettext.rst:137 +#: library/gettext.rst:104 msgid "Here's an example of typical usage for this API::" msgstr "Voici un exemple classique d'utilisation de cette API ::" -#: library/gettext.rst:148 +#: library/gettext.rst:115 msgid "Class-based API" msgstr "API basée sur les classes" -#: library/gettext.rst:150 +#: library/gettext.rst:117 msgid "" "The class-based API of the :mod:`gettext` module gives you more flexibility " "and greater convenience than the GNU :program:`gettext` API. It is the " @@ -245,7 +203,7 @@ msgstr "" "de cette classe \"translations\" peuvent également s'installer dans l'espace " "de nommage natif en tant que fonction :func:`_`." -#: library/gettext.rst:160 +#: library/gettext.rst:127 msgid "" "This function implements the standard :file:`.mo` file search algorithm. It " "takes a *domain*, identical to what :func:`textdomain` takes. Optional " @@ -258,7 +216,7 @@ msgstr "" "func:`bindtextdomain`. Le paramètre optionnel *langages* est une liste de " "chaînes de caractères correspondants au code d'une langue." -#: library/gettext.rst:165 +#: library/gettext.rst:132 msgid "" "If *localedir* is not given, then the default system locale directory is " "used. [#]_ If *languages* is not given, then the following environment " @@ -277,7 +235,7 @@ msgstr "" "langues, séparées par des deux-points, qui sera utilisée pour générer la " "liste des codes de langues attendue." -#: library/gettext.rst:173 +#: library/gettext.rst:140 msgid "" ":func:`find` then expands and normalizes the languages, and then iterates " "through them, searching for an existing file built of these components:" @@ -286,11 +244,11 @@ msgstr "" "sur la liste obtenue afin de trouver un fichier de traduction existant et " "correspondant :" -#: library/gettext.rst:176 +#: library/gettext.rst:143 msgid ":file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo`" msgstr ":file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo`" -#: library/gettext.rst:178 +#: library/gettext.rst:145 msgid "" "The first such file name that exists is returned by :func:`find`. If no such " "file is found, then ``None`` is returned. If *all* is given, it returns a " @@ -298,11 +256,11 @@ msgid "" "list or the environment variables." msgstr "" "Le premier nom de fichier trouvé est renvoyé par :func:`find`. Si aucun " -"fichier n'a été trouvé, alors `None` est renvoyé. Si *all* est vrai, est " +"fichier n'a été trouvé, alors ``None`` est renvoyé. Si *all* est vrai, est " "renvoyée la liste de tous les noms de fichiers, dans l'ordre dans lequel ils " "apparaissent dans *languages* ou dans les variables d'environnement." -#: library/gettext.rst:186 +#: library/gettext.rst:153 msgid "" "Return a :class:`*Translations` instance based on the *domain*, *localedir*, " "and *languages*, which are first passed to :func:`find` to get a list of the " @@ -324,7 +282,7 @@ msgstr "" "chaînes de caractères traduites, dans les méthodes :meth:`~NullTranslations." "lgettext` et :meth:`~NullTranslations.lngettext`." -#: library/gettext.rst:196 +#: library/gettext.rst:163 msgid "" "If multiple files are found, later files are used as fallbacks for earlier " "ones. To allow setting the fallback, :func:`copy.copy` is used to clone each " @@ -336,7 +294,7 @@ msgstr "" "`copy.copy` est utilisé pour copier chaque objet traduit depuis le cache ; " "les vraies données de l'instance étant toujours recopiées dans le cache." -#: library/gettext.rst:201 +#: library/gettext.rst:168 msgid "" "If no :file:`.mo` file is found, this function raises :exc:`OSError` if " "*fallback* is false (which is the default), and returns a :class:" @@ -347,27 +305,29 @@ msgstr "" "*fallback* vaut *True* et une instance :class:`NullTranslations` est " "renvoyée." -#: library/gettext.rst:205 +#: library/gettext.rst:172 msgid ":exc:`IOError` used to be raised instead of :exc:`OSError`." msgstr "" "Avant, c'était l'exception :exc:`IOError` qui était levée, au lieu de :exc:" "`OSError`." -#: library/gettext.rst:232 -msgid "The *codeset* parameter." +#: library/gettext.rst:175 +#, fuzzy +msgid "*codeset* parameter is removed." msgstr "Le paramètre *codeset*." -#: library/gettext.rst:214 +#: library/gettext.rst:180 +#, fuzzy msgid "" "This installs the function :func:`_` in Python's builtins namespace, based " -"on *domain*, *localedir*, and *codeset* which are passed to the function :" -"func:`translation`." +"on *domain* and *localedir* which are passed to the function :func:" +"`translation`." msgstr "" "Positionne la fonction :func:`_` dans l'espace de nommage natif de Python, " "en se basant sur *domain*, *localedir* et *codeset*, qui sont passés en " "argument de la fonction :func:`translation`." -#: library/gettext.rst:218 +#: library/gettext.rst:183 msgid "" "For the *names* parameter, please see the description of the translation " "object's :meth:`~NullTranslations.install` method." @@ -375,7 +335,7 @@ msgstr "" "Concernant le paramètre *names*, se référer à la description de la méthode :" "meth:`~NullTranslations.install`." -#: library/gettext.rst:221 +#: library/gettext.rst:186 msgid "" "As seen below, you usually mark the strings in your application that are " "candidates for translation, by wrapping them in a call to the :func:`_` " @@ -384,7 +344,7 @@ msgstr "" "Habituellement, la fonction :func:`_` est appliquée aux chaînes de " "caractères qui doivent être traduites comme suit ::" -#: library/gettext.rst:227 +#: library/gettext.rst:192 msgid "" "For convenience, you want the :func:`_` function to be installed in Python's " "builtins namespace, so it is easily accessible in all modules of your " @@ -394,11 +354,15 @@ msgstr "" "l'espace de nommage natif de Python pour la rendre plus accessible dans tous " "les modules de votre application." -#: library/gettext.rst:236 +#: library/gettext.rst:196 +msgid "*names* is now a keyword-only parameter." +msgstr "" + +#: library/gettext.rst:200 msgid "The :class:`NullTranslations` class" msgstr "La classe :class:`NullTranslations`" -#: library/gettext.rst:238 +#: library/gettext.rst:202 msgid "" "Translation classes are what actually implement the translation of original " "source file message strings to translated message strings. The base class " @@ -413,7 +377,7 @@ msgstr "" "spécifiques à la traduction. Voici les méthodes de :class:`!" "NullTranslations` :" -#: library/gettext.rst:247 +#: library/gettext.rst:211 msgid "" "Takes an optional :term:`file object` *fp*, which is ignored by the base " "class. Initializes \"protected\" instance variables *_info* and *_charset* " @@ -427,7 +391,7 @@ msgstr "" "*_fallback* qui est définie au travers de :meth:`add_fallback`. Puis " "appelle ``self._parse(fp)`` si *fp* ne vaut pas ``None``." -#: library/gettext.rst:255 +#: library/gettext.rst:219 msgid "" "No-op in the base class, this method takes file object *fp*, and reads the " "data from the file, initializing its message catalog. If you have an " @@ -439,7 +403,7 @@ msgstr "" "catalogue de messages dont le format n'est pas pris en charge, vous devriez " "surcharger cette méthode pour analyser votre format." -#: library/gettext.rst:263 +#: library/gettext.rst:227 msgid "" "Add *fallback* as the fallback object for the current translation object. A " "translation object should consult the fallback if it cannot provide a " @@ -449,7 +413,7 @@ msgstr "" "courant. Un objet de traduction devrait interroger cet objet de " "substitution s'il ne peut fournir une traduction pour un message donné." -#: library/gettext.rst:270 +#: library/gettext.rst:234 msgid "" "If a fallback has been set, forward :meth:`!gettext` to the fallback. " "Otherwise, return *message*. Overridden in derived classes." @@ -457,7 +421,7 @@ msgstr "" "Si un objet de substitution a été défini, transmet :meth:`!gettext` à celui-" "ci. Sinon, renvoie *message*. Surchargé dans les classes dérivées." -#: library/gettext.rst:276 +#: library/gettext.rst:240 msgid "" "If a fallback has been set, forward :meth:`!ngettext` to the fallback. " "Otherwise, return *singular* if *n* is 1; return *plural* otherwise. " @@ -467,7 +431,7 @@ msgstr "" "ci. Sinon, renvoie *singular* si *n* vaut 1, *plural* sinon. Surchargé " "dans les classes dérivées." -#: library/gettext.rst:283 +#: library/gettext.rst:247 msgid "" "If a fallback has been set, forward :meth:`pgettext` to the fallback. " "Otherwise, return the translated message. Overridden in derived classes." @@ -475,7 +439,7 @@ msgstr "" "Si un objet de substitution a été défini, transmet :meth:`pgettext` à celui-" "ci. Sinon, renvoie le message traduit. Surchargé dans les classes dérivées." -#: library/gettext.rst:291 +#: library/gettext.rst:255 msgid "" "If a fallback has been set, forward :meth:`npgettext` to the fallback. " "Otherwise, return the translated message. Overridden in derived classes." @@ -483,27 +447,7 @@ msgstr "" "Si un objet de substitution a été défini, transmet :meth:`npgettext` à celui-" "ci. Sinon, renvoie le message traduit. Surchargé dans les classes dérivées." -#: library/gettext.rst:300 -msgid "" -"Equivalent to :meth:`.gettext` and :meth:`.ngettext`, but the translation is " -"returned as a byte string encoded in the preferred system encoding if no " -"encoding was explicitly set with :meth:`set_output_charset`. Overridden in " -"derived classes." -msgstr "" -"Équivalent de :meth:`.gettext` et :meth:`.ngettext`, mais la traduction est " -"renvoyée sous la forme d'une chaîne d'octets, encodée avec l'encodage du " -"système si aucun autre n'a été défini avec :meth:`set_output_charset`. " -"Surchargé dans les classes dérivées." - -#: library/gettext.rst:463 -msgid "" -"These methods should be avoided in Python 3. See the warning for the :func:" -"`lgettext` function." -msgstr "" -"L'utilisation de ces méthodes doivent être évitée en Python 3. Voir " -"l'avertissement de la fonction :func:`lgettext`." - -#: library/gettext.rst:315 +#: library/gettext.rst:263 msgid "" "Return the \"protected\" :attr:`_info` variable, a dictionary containing the " "metadata found in the message catalog file." @@ -511,23 +455,11 @@ msgstr "" "Renvoie l'attribut \"protégé\" :attr:`_info`, dictionnaire contenant les " "métadonnées trouvées dans le fichier de catalogue de messages." -#: library/gettext.rst:321 +#: library/gettext.rst:269 msgid "Return the encoding of the message catalog file." msgstr "Renvoie l'encodage du fichier du catalogue de messages." -#: library/gettext.rst:326 -msgid "" -"Return the encoding used to return translated messages in :meth:`.lgettext` " -"and :meth:`.lngettext`." -msgstr "" -"Renvoie l'encodage utilisé par :meth:`.lgettext` et :meth:`.lngettext` pour " -"la traduction des messages." - -#: library/gettext.rst:334 -msgid "Change the encoding used to return translated messages." -msgstr "Modifie l'encodage utilisé pour la traduction des messages." - -#: library/gettext.rst:341 +#: library/gettext.rst:274 msgid "" "This method installs :meth:`.gettext` into the built-in namespace, binding " "it to ``_``." @@ -535,7 +467,7 @@ msgstr "" "Cette méthode positionne :meth:`.gettext` dans l'espace de nommage natif, en " "le liant à ``_``." -#: library/gettext.rst:344 +#: library/gettext.rst:277 msgid "" "If the *names* parameter is given, it must be a sequence containing the " "names of functions you want to install in the builtins namespace in addition " @@ -548,7 +480,7 @@ msgstr "" "sont ``'gettext'``, ``'ngettext'``, ``'pgettext'``, ``'npgettext'``, " "``'lgettext'`` et ``'lngettext'``." -#: library/gettext.rst:349 +#: library/gettext.rst:282 msgid "" "Note that this is only one way, albeit the most convenient way, to make the :" "func:`_` function available to your application. Because it affects the " @@ -563,7 +495,7 @@ msgstr "" "`_`. Au lieu de cela, ces derniers doivent plutôt utiliser le code suivant " "pour rendre :func:`_` accessible par leurs modules ::" -#: library/gettext.rst:359 +#: library/gettext.rst:292 msgid "" "This puts :func:`_` only in the module's global namespace and so only " "affects calls within this module." @@ -571,15 +503,15 @@ msgstr "" "Cela met :func:`_` dans l'espace de nommage global du module uniquement et " "donc n'affectera ses appels que dans ce module." -#: library/gettext.rst:362 +#: library/gettext.rst:295 msgid "Added ``'pgettext'`` and ``'npgettext'``." msgstr "Ajout de ``'pgettext'`` et ``'npgettext'``." -#: library/gettext.rst:367 +#: library/gettext.rst:300 msgid "The :class:`GNUTranslations` class" msgstr "La classe :class:`GNUTranslations`" -#: library/gettext.rst:369 +#: library/gettext.rst:302 msgid "" "The :mod:`gettext` module provides one additional class derived from :class:" "`NullTranslations`: :class:`GNUTranslations`. This class overrides :meth:" @@ -591,7 +523,7 @@ msgstr "" "surcharge :meth:`_parse` pour permettre de lire les fichiers GNU :program:" "`gettext` :file:`.mo` au format petit et gros-boutiste." -#: library/gettext.rst:374 +#: library/gettext.rst:307 msgid "" ":class:`GNUTranslations` parses optional metadata out of the translation " "catalog. It is convention with GNU :program:`gettext` to include metadata as " @@ -609,14 +541,14 @@ msgstr "" "paires de la forme ``clef: valeur`` comme définie par la :rfc:`822`, et doit " "contenir la clef ``Project-Id-Version``. Si la clef ``Content-Type`` est " "trouvée dans une métadonnée, alors la propriété ``charset`` (jeu de " -"caractères) est utilisée pour initialiser la variable d'instance \"protégée" -"\" :attr:`_charset`, sinon cette dernière est positionnée à ``None``. Si " -"l'encodage du jeu de caractères est spécifié, tous les messages " +"caractères) est utilisée pour initialiser la variable d'instance " +"\"protégée\" :attr:`_charset`, sinon cette dernière est positionnée à " +"``None``. Si l'encodage du jeu de caractères est spécifié, tous les messages " "(identifiants et chaînes de caractères) lus depuis le catalogue sont " "convertis en chaînes Unicode via cet encodage, ou via l'encodage ASCII si " "non renseigné." -#: library/gettext.rst:384 +#: library/gettext.rst:317 msgid "" "Since message ids are read as Unicode strings too, all :meth:`*gettext` " "methods will assume message ids as Unicode strings, not byte strings." @@ -625,7 +557,7 @@ msgstr "" "chaînes Unicode, toutes les méthodes :meth:`*gettext` les considéreront " "ainsi, et pas comme des chaînes d'octets." -#: library/gettext.rst:387 +#: library/gettext.rst:320 msgid "" "The entire set of key/value pairs are placed into a dictionary and set as " "the \"protected\" :attr:`_info` instance variable." @@ -633,7 +565,7 @@ msgstr "" "La totalité des paires clef / valeur est insérée dans un dictionnaire et " "représente la variable d'instance \"protégée\" :attr:`_info`." -#: library/gettext.rst:390 +#: library/gettext.rst:323 msgid "" "If the :file:`.mo` file's magic number is invalid, the major version number " "is unexpected, or if other problems occur while reading the file, " @@ -644,14 +576,14 @@ msgstr "" "lecture du fichier, instancier une classe :class:`GNUTranslations` peut " "lever une exception :exc:`OSError`." -#: library/gettext.rst:396 +#: library/gettext.rst:329 msgid "" "The following methods are overridden from the base class implementation:" msgstr "" "Les méthodes suivantes, provenant de l'implémentation de la classe de base, " "ont été surchargée :" -#: library/gettext.rst:400 +#: library/gettext.rst:333 msgid "" "Look up the *message* id in the catalog and return the corresponding message " "string, as a Unicode string. If there is no entry in the catalog for the " @@ -665,7 +597,7 @@ msgstr "" "défini, la recherche est transmise à la méthode :meth:`~NullTranslations." "gettext` du substitut. Sinon, l'identifiant de *message* est renvoyé." -#: library/gettext.rst:409 +#: library/gettext.rst:342 msgid "" "Do a plural-forms lookup of a message id. *singular* is used as the message " "id for purposes of lookup in the catalog, while *n* is used to determine " @@ -676,7 +608,7 @@ msgstr "" "catalogue, alors que *n* permet de savoir quelle forme plurielle utiliser. " "La chaîne de caractère du message renvoyée est une chaîne Unicode." -#: library/gettext.rst:413 +#: library/gettext.rst:346 msgid "" "If the message id is not found in the catalog, and a fallback is specified, " "the request is forwarded to the fallback's :meth:`~NullTranslations." @@ -688,11 +620,11 @@ msgstr "" "`~NullTranslations.ngettext` du substitut. Sinon, est renvoyé *singular* " "lorsque *n* vaut 1, *plural* dans tous les autres cas." -#: library/gettext.rst:418 +#: library/gettext.rst:351 msgid "Here is an example::" msgstr "Voici un exemple ::" -#: library/gettext.rst:430 +#: library/gettext.rst:363 msgid "" "Look up the *context* and *message* id in the catalog and return the " "corresponding message string, as a Unicode string. If there is no entry in " @@ -707,7 +639,7 @@ msgstr "" "transmise à la méthode :meth:`pgettext` du substitut. Sinon, l'identifiant " "de *message* est renvoyé." -#: library/gettext.rst:441 +#: library/gettext.rst:374 msgid "" "Do a plural-forms lookup of a message id. *singular* is used as the message " "id for purposes of lookup in the catalog, while *n* is used to determine " @@ -717,7 +649,7 @@ msgstr "" "message. *singular* est utilisé pour la recherche de l'identifiant dans le " "catalogue, alors que *n* permet de savoir quelle forme plurielle utiliser." -#: library/gettext.rst:445 +#: library/gettext.rst:378 msgid "" "If the message id for *context* is not found in the catalog, and a fallback " "is specified, the request is forwarded to the fallback's :meth:`npgettext` " @@ -729,23 +661,11 @@ msgstr "" "méthode :meth:`npgettext` du substitut. Sinon, est renvoyé *singular* " "lorsque *n* vaut 1, *plural* dans tous les autres cas." -#: library/gettext.rst:456 -msgid "" -"Equivalent to :meth:`.gettext` and :meth:`.ngettext`, but the translation is " -"returned as a byte string encoded in the preferred system encoding if no " -"encoding was explicitly set with :meth:`~NullTranslations." -"set_output_charset`." -msgstr "" -"Équivalent de :meth:`.gettext` et :meth:`.ngettext`, mais la traduction est " -"renvoyée sous la forme d'une chaîne d'octets, encodée avec l'encodage du " -"système si aucun autre n'a été défini avec :meth:`~NullTranslations." -"set_output_charset`." - -#: library/gettext.rst:470 +#: library/gettext.rst:387 msgid "Solaris message catalog support" msgstr "Support du catalogue de message de Solaris" -#: library/gettext.rst:472 +#: library/gettext.rst:389 msgid "" "The Solaris operating system defines its own binary :file:`.mo` file format, " "but since no documentation can be found on this format, it is not supported " @@ -755,11 +675,11 @@ msgstr "" "binaire :file:`.mo`, mais pour l'heure, puisqu'on ne peut trouver de " "documentation sur ce format, il n'est pas géré." -#: library/gettext.rst:478 +#: library/gettext.rst:395 msgid "The Catalog constructor" msgstr "Le constructeur *Catalog*" -#: library/gettext.rst:482 +#: library/gettext.rst:399 msgid "" "GNOME uses a version of the :mod:`gettext` module by James Henstridge, but " "this version has a slightly different API. Its documented usage was::" @@ -768,7 +688,7 @@ msgstr "" "qui a une API légèrement différente. D'après la documentation, elle " "s'utilise ainsi ::" -#: library/gettext.rst:490 +#: library/gettext.rst:407 msgid "" "For compatibility with this older module, the function :func:`Catalog` is an " "alias for the :func:`translation` function described above." @@ -776,7 +696,7 @@ msgstr "" "Pour des raisons de compatibilité avec cet ancien module, la fonction :func:" "`Catalog` est un alias de la fonction :func:`translation` décrite ci-dessous." -#: library/gettext.rst:493 +#: library/gettext.rst:410 msgid "" "One difference between this module and Henstridge's: his catalog objects " "supported access through a mapping API, but this appears to be unused and so " @@ -786,11 +706,11 @@ msgstr "" "catalogue étaient accessibles depuis un schéma de l'API, mais cela semblait " "ne pas être utilisé et donc n'est pas pris en charge." -#: library/gettext.rst:499 +#: library/gettext.rst:416 msgid "Internationalizing your programs and modules" msgstr "Internationaliser vos programmes et modules" -#: library/gettext.rst:501 +#: library/gettext.rst:418 msgid "" "Internationalization (I18N) refers to the operation by which a program is " "made aware of multiple languages. Localization (L10N) refers to the " @@ -804,33 +724,33 @@ msgstr "" "locales, une fois celui-ci internationalisé. Afin de fournir du texte " "multilingue à votre programme Python, les étapes suivantes sont nécessaires :" -#: library/gettext.rst:507 +#: library/gettext.rst:424 msgid "" "prepare your program or module by specially marking translatable strings" msgstr "" "préparer votre programme ou module en marquant spécifiquement les chaînes à " "traduire" -#: library/gettext.rst:509 +#: library/gettext.rst:426 msgid "" "run a suite of tools over your marked files to generate raw messages catalogs" msgstr "" "lancer une suite d'outils sur les fichiers contenant des chaînes à traduire " "pour générer des catalogues de messages brut" -#: library/gettext.rst:511 +#: library/gettext.rst:428 msgid "create language-specific translations of the message catalogs" msgstr "" "créer les traductions spécifiques à une langue des catalogues de messages" -#: library/gettext.rst:513 +#: library/gettext.rst:430 msgid "" "use the :mod:`gettext` module so that message strings are properly translated" msgstr "" "utiliser le module :mod:`gettext` pour que les chaînes de caractères soient " "bien traduites" -#: library/gettext.rst:515 +#: library/gettext.rst:432 msgid "" "In order to prepare your code for I18N, you need to look at all the strings " "in your files. Any string that needs to be translated should be marked by " @@ -842,7 +762,7 @@ msgstr "" "caractères à traduire doit être appliqué le marqueur ``_('...')`` --- c'est-" "à-dire en appelant la fonction :func:`_`. Par exemple ::" -#: library/gettext.rst:524 +#: library/gettext.rst:441 msgid "" "In this example, the string ``'writing a log message'`` is marked as a " "candidate for translation, while the strings ``'mylog.txt'`` and ``'w'`` are " @@ -851,7 +771,7 @@ msgstr "" "Dans cet exemple, la chaîne ``'writing a log message'`` est maquée comme " "traduite, contrairement aux chaînes ``'mylog.txt'`` et ``'w'``." -#: library/gettext.rst:527 +#: library/gettext.rst:444 msgid "" "There are a few tools to extract the strings meant for translation. The " "original GNU :program:`gettext` only supported C or C++ source code but its " @@ -874,7 +794,7 @@ msgstr "" "François Pinard, nommé :program:`xpot`, fait de même et est disponible dans " "son `paquet po-utils `__." -#: library/gettext.rst:537 +#: library/gettext.rst:454 msgid "" "(Python also includes pure-Python versions of these programs, called :" "program:`pygettext.py` and :program:`msgfmt.py`; some Python distributions " @@ -898,7 +818,7 @@ msgstr "" "besoin du paquet GNU :program:`gettext` pour internationaliser vos " "applications en Python.)" -#: library/gettext.rst:549 +#: library/gettext.rst:466 msgid "" ":program:`xgettext`, :program:`pygettext`, and similar tools generate :file:" "`.po` files that are message catalogs. They are structured human-readable " @@ -911,7 +831,7 @@ msgstr "" "contiennent toutes les chaînes du code source marquées comme traduisible, " "ainsi que leur traduction à utiliser." -#: library/gettext.rst:555 +#: library/gettext.rst:472 msgid "" "Copies of these :file:`.po` files are then handed over to the individual " "human translators who write translations for every supported natural " @@ -930,7 +850,7 @@ msgstr "" "fichiers :file:`.mo` sont utilisés par le module :mod:`gettext` pour la " "traduction lors de l'exécution." -#: library/gettext.rst:564 +#: library/gettext.rst:481 msgid "" "How you use the :mod:`gettext` module in your code depends on whether you " "are internationalizing a single module or your entire application. The next " @@ -940,11 +860,11 @@ msgstr "" "de si vous internationalisez un seul module ou l'ensemble de votre " "application. Les deux sections suivantes traitent chacune des cas." -#: library/gettext.rst:570 +#: library/gettext.rst:487 msgid "Localizing your module" msgstr "Localiser votre module" -#: library/gettext.rst:572 +#: library/gettext.rst:489 msgid "" "If you are localizing your module, you must take care not to make global " "changes, e.g. to the built-in namespace. You should not use the GNU :program:" @@ -954,7 +874,7 @@ msgstr "" "globaux, e.g. dans l'espace de nommage natif. Vous ne devriez pas utiliser " "l’API GNU :program:`gettext` mais plutôt celle basée sur les classes." -#: library/gettext.rst:576 +#: library/gettext.rst:493 msgid "" "Let's say your module is called \"spam\" and the module's various natural " "language translation :file:`.mo` files reside in :file:`/usr/share/locale` " @@ -966,11 +886,11 @@ msgstr "" "usr/share/locale` au format GNU :program:`gettext`. Voici ce que vous " "pouvez alors mettre en haut de votre module ::" -#: library/gettext.rst:587 +#: library/gettext.rst:504 msgid "Localizing your application" msgstr "Localiser votre application" -#: library/gettext.rst:589 +#: library/gettext.rst:506 msgid "" "If you are localizing your application, you can install the :func:`_` " "function globally into the built-in namespace, usually in the main driver " @@ -983,7 +903,7 @@ msgstr "" "fichiers de votre application de n'utiliser que ``_('...')`` sans devoir le " "redéfinir explicitement dans chaque fichier." -#: library/gettext.rst:594 +#: library/gettext.rst:511 msgid "" "In the simple case then, you need only add the following bit of code to the " "main driver file of your application::" @@ -991,7 +911,7 @@ msgstr "" "Dans ce cas, vous n'aurez à ajouter que le bout de code suivant au fichier " "principal de votre application ::" -#: library/gettext.rst:600 +#: library/gettext.rst:517 msgid "" "If you need to set the locale directory, you can pass it into the :func:" "`install` function::" @@ -999,11 +919,11 @@ msgstr "" "Si vous avez besoin de définir le dossier des localisations, vous pouvez le " "mettre en argument de la fonction :func:`install` ::" -#: library/gettext.rst:608 +#: library/gettext.rst:525 msgid "Changing languages on the fly" msgstr "Changer de langue à la volée" -#: library/gettext.rst:610 +#: library/gettext.rst:527 msgid "" "If your program needs to support many languages at the same time, you may " "want to create multiple translation instances and then switch between them " @@ -1013,11 +933,11 @@ msgstr "" "temps, vous pouvez créer plusieurs instances de traduction, puis basculer " "entre elles de façon explicite, comme ceci ::" -#: library/gettext.rst:631 +#: library/gettext.rst:548 msgid "Deferred translations" msgstr "Traductions différées" -#: library/gettext.rst:633 +#: library/gettext.rst:550 msgid "" "In most coding situations, strings are translated where they are coded. " "Occasionally however, you need to mark strings for translation, but defer " @@ -1028,7 +948,7 @@ msgstr "" "ayez besoin de traduire une chaîne de caractères un peu plus loin. Un " "exemple classique est ::" -#: library/gettext.rst:646 +#: library/gettext.rst:563 msgid "" "Here, you want to mark the strings in the ``animals`` list as being " "translatable, but you don't actually want to translate them until they are " @@ -1037,11 +957,11 @@ msgstr "" "Ici, vous voulez marquer les chaînes de caractères de la liste ``animals`` " "comme étant traduisibles, mais ne les traduire qu'au moment de les afficher." -#: library/gettext.rst:650 +#: library/gettext.rst:567 msgid "Here is one way you can handle this situation::" msgstr "Voici un moyen de gérer ce cas ::" -#: library/gettext.rst:666 +#: library/gettext.rst:583 msgid "" "This works because the dummy definition of :func:`_` simply returns the " "string unchanged. And this dummy definition will temporarily override any " @@ -1056,7 +976,7 @@ msgstr "" "Attention toutefois si vous avez déjà une autre définition de :func:`_` dans " "l'espace de nommage local." -#: library/gettext.rst:672 +#: library/gettext.rst:589 msgid "" "Note that the second use of :func:`_` will not identify \"a\" as being " "translatable to the :program:`gettext` program, because the parameter is not " @@ -1066,11 +986,11 @@ msgstr "" "comme traduisible par le programme :program:`gettext` car ce n'est pas un " "chaîne au sens propre." -#: library/gettext.rst:676 +#: library/gettext.rst:593 msgid "Another way to handle this is with the following example::" msgstr "Voici une autre solution ::" -#: library/gettext.rst:690 +#: library/gettext.rst:607 msgid "" "In this case, you are marking translatable strings with the function :func:" "`N_`, which won't conflict with any definition of :func:`_`. However, you " @@ -1090,11 +1010,11 @@ msgstr "" "commande :option:`!-k`. Le choix du nom :func:`N_` ici est totalement " "arbitraire et aurait très bien pu être :func:`MarqueurDeTraduction`." -#: library/gettext.rst:701 +#: library/gettext.rst:618 msgid "Acknowledgements" msgstr "Remerciements" -#: library/gettext.rst:703 +#: library/gettext.rst:620 msgid "" "The following people contributed code, feedback, design suggestions, " "previous implementations, and valuable experience to the creation of this " @@ -1104,43 +1024,43 @@ msgstr "" "participé aux suggestions de conception et aux implémentations précédentes, " "et ont partagé leur expérience précieuse pour la création de ce module :" -#: library/gettext.rst:706 +#: library/gettext.rst:623 msgid "Peter Funk" msgstr "Peter Funk" -#: library/gettext.rst:708 +#: library/gettext.rst:625 msgid "James Henstridge" msgstr "James Henstridge" -#: library/gettext.rst:710 +#: library/gettext.rst:627 msgid "Juan David Ibáñez Palomar" msgstr "Juan David Ibáñez Palomar" -#: library/gettext.rst:712 +#: library/gettext.rst:629 msgid "Marc-André Lemburg" msgstr "Marc-André Lemburg" -#: library/gettext.rst:714 +#: library/gettext.rst:631 msgid "Martin von Löwis" msgstr "Martin von Löwis" -#: library/gettext.rst:716 +#: library/gettext.rst:633 msgid "François Pinard" msgstr "François Pinard" -#: library/gettext.rst:718 +#: library/gettext.rst:635 msgid "Barry Warsaw" msgstr "Barry Warsaw" -#: library/gettext.rst:720 +#: library/gettext.rst:637 msgid "Gustavo Niemeyer" msgstr "Gustavo Niemeyer" -#: library/gettext.rst:723 +#: library/gettext.rst:640 msgid "Footnotes" msgstr "Notes" -#: library/gettext.rst:724 +#: library/gettext.rst:641 msgid "" "The default locale directory is system dependent; for example, on RedHat " "Linux it is :file:`/usr/share/locale`, but on Solaris it is :file:`/usr/lib/" @@ -1159,6 +1079,84 @@ msgstr "" "d'appeler :func:`bindtextdomain` en donnant explicitement un chemin absolu " "au début de votre application." -#: library/gettext.rst:732 +#: library/gettext.rst:649 msgid "See the footnote for :func:`bindtextdomain` above." msgstr "Voir la note de :func:`bindtextdomain` ci-dessus." + +#~ msgid "" +#~ "Bind the *domain* to *codeset*, changing the encoding of byte strings " +#~ "returned by the :func:`lgettext`, :func:`ldgettext`, :func:`lngettext` " +#~ "and :func:`ldngettext` functions. If *codeset* is omitted, then the " +#~ "current binding is returned." +#~ msgstr "" +#~ "Lie *domain* à *codeset*, en changeant l'encodage des chaînes d'octets " +#~ "retournées par les fonctions :func:`lgettext`, :func:`ldgettext`, :func:" +#~ "`lngettext` et :func:`ldngettext`. Si *codeset* n'est pas renseigné, " +#~ "alors le lien actuel est renvoyé." + +#~ msgid "" +#~ "Equivalent to the corresponding functions without the ``l`` prefix (:func:" +#~ "`.gettext`, :func:`dgettext`, :func:`ngettext` and :func:`dngettext`), " +#~ "but the translation is returned as a byte string encoded in the preferred " +#~ "system encoding if no other encoding was explicitly set with :func:" +#~ "`bind_textdomain_codeset`." +#~ msgstr "" +#~ "Équivalent aux fonctions correspondantes non préfixées par ``l`` (:func:`." +#~ "gettext`, :func:`dgettext`, :func:`ngettext` et :func:`dngettext`), mais " +#~ "la traduction est retournée en tant que chaîne d'octets, encodée avec " +#~ "l'encodage du système si aucun autre n'a été explicitement défini avec :" +#~ "func:`bind_textdomain_codeset`." + +#~ msgid "" +#~ "These functions should be avoided in Python 3, because they return " +#~ "encoded bytes. It's much better to use alternatives which return Unicode " +#~ "strings instead, since most Python applications will want to manipulate " +#~ "human readable text as strings instead of bytes. Further, it's possible " +#~ "that you may get unexpected Unicode-related exceptions if there are " +#~ "encoding problems with the translated strings." +#~ msgstr "" +#~ "Ces fonctions sont à éviter en Python 3 car elles renvoient des octets " +#~ "encodés. Il est préférable d'utiliser des alternatives qui renvoient de " +#~ "l'Unicode, puisque beaucoup d'applications Python voudront manipuler du " +#~ "texte lisible par des humains plutôt que des octets. En outre, il est " +#~ "possible que vous obteniez des exceptions non prévues liées à Unicode " +#~ "s'il y a des soucis d'encodage avec les chaînes de caractères traduites." + +#~ msgid "" +#~ "Equivalent to :meth:`.gettext` and :meth:`.ngettext`, but the translation " +#~ "is returned as a byte string encoded in the preferred system encoding if " +#~ "no encoding was explicitly set with :meth:`set_output_charset`. " +#~ "Overridden in derived classes." +#~ msgstr "" +#~ "Équivalent de :meth:`.gettext` et :meth:`.ngettext`, mais la traduction " +#~ "est renvoyée sous la forme d'une chaîne d'octets, encodée avec l'encodage " +#~ "du système si aucun autre n'a été défini avec :meth:" +#~ "`set_output_charset`. Surchargé dans les classes dérivées." + +#~ msgid "" +#~ "These methods should be avoided in Python 3. See the warning for the :" +#~ "func:`lgettext` function." +#~ msgstr "" +#~ "L'utilisation de ces méthodes doivent être évitée en Python 3. Voir " +#~ "l'avertissement de la fonction :func:`lgettext`." + +#~ msgid "" +#~ "Return the encoding used to return translated messages in :meth:`." +#~ "lgettext` and :meth:`.lngettext`." +#~ msgstr "" +#~ "Renvoie l'encodage utilisé par :meth:`.lgettext` et :meth:`.lngettext` " +#~ "pour la traduction des messages." + +#~ msgid "Change the encoding used to return translated messages." +#~ msgstr "Modifie l'encodage utilisé pour la traduction des messages." + +#~ msgid "" +#~ "Equivalent to :meth:`.gettext` and :meth:`.ngettext`, but the translation " +#~ "is returned as a byte string encoded in the preferred system encoding if " +#~ "no encoding was explicitly set with :meth:`~NullTranslations." +#~ "set_output_charset`." +#~ msgstr "" +#~ "Équivalent de :meth:`.gettext` et :meth:`.ngettext`, mais la traduction " +#~ "est renvoyée sous la forme d'une chaîne d'octets, encodée avec l'encodage " +#~ "du système si aucun autre n'a été défini avec :meth:`~NullTranslations." +#~ "set_output_charset`." diff --git a/library/glob.po b/library/glob.po index f3d3484182..b1adb909aa 100644 --- a/library/glob.po +++ b/library/glob.po @@ -5,36 +5,33 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2018-09-28 12:40+0200\n" -"Last-Translator: Julien VITARD \n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" +"PO-Revision-Date: 2022-02-11 13:53+0100\n" +"Last-Translator: Arnaud Fréalle \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.11\n" +"X-Generator: Poedit 3.0\n" #: library/glob.rst:2 msgid ":mod:`glob` --- Unix style pathname pattern expansion" -msgstr "" -":mod:`glob` --- Recherche de chemins de style Unix selon certains motifs" +msgstr ":mod:`glob` — Recherche de chemins de style Unix selon certains motifs" #: library/glob.rst:7 msgid "**Source code:** :source:`Lib/glob.py`" msgstr "**Code source :** :source:`Lib/glob.py`" #: library/glob.rst:21 +#, fuzzy msgid "" "The :mod:`glob` module finds all the pathnames matching a specified pattern " "according to the rules used by the Unix shell, although results are returned " "in arbitrary order. No tilde expansion is done, but ``*``, ``?``, and " "character ranges expressed with ``[]`` will be correctly matched. This is " "done by using the :func:`os.scandir` and :func:`fnmatch.fnmatch` functions " -"in concert, and not by actually invoking a subshell. Note that unlike :func:" -"`fnmatch.fnmatch`, :mod:`glob` treats filenames beginning with a dot (``.``) " -"as special cases. (For tilde and shell variable expansion, use :func:`os." -"path.expanduser` and :func:`os.path.expandvars`.)" +"in concert, and not by actually invoking a subshell." msgstr "" "Le module :mod:`glob` recherche tous les chemins correspondant à un motif " "particulier selon les règles utilisées par le shell Unix, les résultats sont " @@ -48,7 +45,15 @@ msgstr "" "remplacer le tilde et les variables shell, nous vous conseillons d'utiliser " "les fonctions :func:`os.path.expanduser` et :func:`os.path.expandvars`.)" -#: library/glob.rst:31 +#: library/glob.rst:28 +msgid "" +"Note that files beginning with a dot (``.``) can only be matched by patterns " +"that also start with a dot, unlike :func:`fnmatch.fnmatch` or :func:`pathlib." +"Path.glob`. (For tilde and shell variable expansion, use :func:`os.path." +"expanduser` and :func:`os.path.expandvars`.)" +msgstr "" + +#: library/glob.rst:34 msgid "" "For a literal match, wrap the meta-characters in brackets. For example, " "``'[?]'`` matches the character ``'?'``." @@ -56,13 +61,13 @@ msgstr "" "Pour une correspondance littérale, il faut entourer le métacaractère par des " "crochets. Par exemple, ``'[?]'`` reconnaît le caractère ``'?'``." -#: library/glob.rst:36 +#: library/glob.rst:39 msgid "The :mod:`pathlib` module offers high-level path objects." msgstr "" "Le module :mod:`pathlib` offre une représentation objet de haut niveau des " "chemins." -#: library/glob.rst:41 +#: library/glob.rst:45 #, fuzzy msgid "" "Return a possibly-empty list of path names that match *pathname*, which must " @@ -80,28 +85,65 @@ msgstr "" "src/Python-1.5/Makefile`) soit relatif (comme :file:`../../Tools/\\*/\\*." "gif`), et contenir un caractère de remplacement de style shell. Les liens " "symboliques cassés sont aussi inclus dans les résultats (comme pour le " -"shell)." +"shell). Le fait que les résultats soient triés ou non dépend du système de " +"fichiers." -#: library/glob.rst:53 -#, fuzzy +#: library/glob.rst:54 +msgid "" +"If *root_dir* is not ``None``, it should be a :term:`path-like object` " +"specifying the root directory for searching. It has the same effect on :" +"func:`glob` as changing the current directory before calling it. If " +"*pathname* is relative, the result will contain paths relative to *root_dir*." +msgstr "" +"Si *root_dir* n'est pas ``None``, cela doit être un :term:`objet simili-" +"chemin ` spécifiant le dossier racine de la recherche. " +"Cela a le même effet sur :func:`glob` que de changer le dossier courant " +"avant l'appel de la fonction. Si *pathname* est relatif, les chemins du " +"résultat seront relatifs au *root_dir* ." + +#: library/glob.rst:60 +msgid "" +"This function can support :ref:`paths relative to directory descriptors " +"` with the *dir_fd* parameter." +msgstr "" +"Cette fonction prend en charge les :ref:`chemins relatifs aux descripteurs " +"de dossier ` avec le paramètre *dir_fd*." + +#: library/glob.rst:66 msgid "" "If *recursive* is true, the pattern \"``**``\" will match any files and zero " "or more directories, subdirectories and symbolic links to directories. If " "the pattern is followed by an :data:`os.sep` or :data:`os.altsep` then files " "will not match." msgstr "" -"Si *recursive* est vrai, le motif \"``**``\" reconnaît tous les fichiers et, " -"zéro ou plus répertoires et sous-répertoires. Si le motif est suivi par un " -"caractère de séparation ``os.sep``, seuls les répertoires et sous-" -"répertoires sont reconnus." +"Si *recursive* est vrai, le motif \"``**``\" reconnaît tous les fichiers, " +"aucun ou plusieurs répertoires, sous-répertoires et liens symboliques aux " +"répertoires. Si le motif est suivi par :data:`os.sep` ou :data:`os.altsep` " +"alors les fichiers ne sont pas inclus dans le résultat." -#: library/glob.rst:73 +#: library/glob.rst:71 +msgid "" +"If *include_hidden* is true, \"``**``\" pattern will match hidden " +"directories." +msgstr "" + +#: library/glob.rst:96 msgid "" "Raises an :ref:`auditing event ` ``glob.glob`` with arguments " "``pathname``, ``recursive``." msgstr "" +"Lève un :ref:`évènement d'audit ` ``glob.glob`` avec les arguments " +"``pathname``, ``recursive``." + +#: library/glob.rst:97 +msgid "" +"Raises an :ref:`auditing event ` ``glob.glob/2`` with arguments " +"``pathname``, ``recursive``, ``root_dir``, ``dir_fd``." +msgstr "" +"Lève un :ref:`évènement d'audit ` ``glob.glob/2`` avec les " +"arguments ``pathname``, ``recursive``, ``root_dir``, ``dir_fd``." -#: library/glob.rst:61 +#: library/glob.rst:77 msgid "" "Using the \"``**``\" pattern in large directory trees may consume an " "inordinate amount of time." @@ -109,19 +151,27 @@ msgstr "" "Utiliser le motif \"``**``\" dans de grandes arborescences de dossier peut " "consommer une quantité de temps démesurée." -#: library/glob.rst:64 +#: library/glob.rst:99 msgid "Support for recursive globs using \"``**``\"." -msgstr "Gestion des chemins récursifs utilisant le motif \"``**``\"." +msgstr "Prise en charge des chemins récursifs utilisant le motif \"``**``\"." + +#: library/glob.rst:102 +msgid "Added the *root_dir* and *dir_fd* parameters." +msgstr "Paramètres *root_dir* et *dir_fd* ajoutés." + +#: library/glob.rst:105 +msgid "Added the *include_hidden* parameter." +msgstr "" -#: library/glob.rst:70 +#: library/glob.rst:93 msgid "" "Return an :term:`iterator` which yields the same values as :func:`glob` " "without actually storing them all simultaneously." msgstr "" -"Renvoie un :term:`iterator` qui produit les mêmes valeurs que :func:`glob`, " -"sans toutes les charger en mémoire simultanément." +"Renvoie un :term:`itérateur ` qui produit les mêmes valeurs que :" +"func:`glob`, sans toutes les charger en mémoire simultanément." -#: library/glob.rst:78 +#: library/glob.rst:111 msgid "" "Escape all special characters (``'?'``, ``'*'`` and ``'['``). This is useful " "if you want to match an arbitrary literal string that may have special " @@ -136,7 +186,7 @@ msgstr "" "Windows ``escape('//?/c:/Quo vadis?.txt')`` renvoie ``'//?/c:/Quo vadis[?]." "txt'``." -#: library/glob.rst:87 +#: library/glob.rst:120 msgid "" "For example, consider a directory containing the following files: :file:`1." "gif`, :file:`2.txt`, :file:`card.gif` and a subdirectory :file:`sub` which " @@ -150,7 +200,7 @@ msgstr "" "les résultats suivants. Notons que les composantes principales des chemins " "sont préservées. ::" -#: library/glob.rst:105 +#: library/glob.rst:138 msgid "" "If the directory contains files starting with ``.`` they won't be matched by " "default. For example, consider a directory containing :file:`card.gif` and :" @@ -160,11 +210,11 @@ msgstr "" "reconnus par défaut. Par exemple, considérons un répertoire contenant :file:" "`card.gif` et :file:`.card.gif` ::" -#: library/glob.rst:117 +#: library/glob.rst:150 msgid "Module :mod:`fnmatch`" msgstr "Module :mod:`fnmatch`" -#: library/glob.rst:118 +#: library/glob.rst:151 msgid "Shell-style filename (not path) expansion" msgstr "" "Recherche de noms de fichiers de style shell (ne concerne pas les chemins)" diff --git a/library/graphlib.po b/library/graphlib.po index ade7c95914..f02f4d0edf 100644 --- a/library/graphlib.po +++ b/library/graphlib.po @@ -5,9 +5,9 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2022-11-17 10:01+0100\n" +"Last-Translator: Jeffd \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -17,14 +17,18 @@ msgstr "" #: library/graphlib.rst:2 msgid ":mod:`graphlib` --- Functionality to operate with graph-like structures" msgstr "" +":mod:`graphlib` — Fonctionnalités pour travailler avec des structures de " +"type graphe" #: library/graphlib.rst:8 msgid "**Source code:** :source:`Lib/graphlib.py`" -msgstr "" +msgstr "**Code source:** :source:`Lib/graphlib.py`" #: library/graphlib.rst:20 msgid "Provides functionality to topologically sort a graph of hashable nodes." msgstr "" +"Fournit les fonctionnalités pour trier topologiquement un graphe de nœuds " +"hachables." #: library/graphlib.rst:22 msgid "" @@ -37,6 +41,14 @@ msgid "" "topological ordering is possible if and only if the graph has no directed " "cycles, that is, if it is a directed acyclic graph." msgstr "" +"L'ordre topologique est un ordre linéaire des sommets d'un graphe afin que " +"pour chaque arête u → v d'un sommet u à un sommet v, cet ordre va placer le " +"sommet u avant le sommet v. Par exemple, les sommets d'un graphe peuvent " +"représenter une tâche à faire et une arête peut représenter la contrainte " +"comme quoi telle tâche doit être réalisée avant telle autre. Dans cet " +"exemple, un ordre topologique est simplement une séquence valide pour ces " +"tâches. Cet ordre n'est possible que si le graphe n'a pas de circuit, c'est-" +"à-dire si c'est un graphe orienté acyclique." #: library/graphlib.rst:31 msgid "" @@ -46,26 +58,35 @@ msgid "" "nodes that have edges that point to the value in the key). Additional nodes " "can be added to the graph using the :meth:`~TopologicalSorter.add` method." msgstr "" +"Si l'argument optionnel *graph* est fourni, cela doit être un dictionnaire " +"représentant un graphe acyclique avec comme clés les nœuds et comme valeurs " +"des itérables sur les prédécesseurs de ces nœuds dans le graphe (les nœuds " +"qui ont des arêtes qui pointent vers la valeur de la clé). Les nœuds " +"s'ajoutent en utilisant la méthode :meth:`~TopologicalSorter.add`" #: library/graphlib.rst:37 msgid "" "In the general case, the steps required to perform the sorting of a given " "graph are as follows:" msgstr "" +"De manière générale, les étapes nécessaires pour trier un graphe donné sont " +"les suivantes :" #: library/graphlib.rst:40 msgid "" "Create an instance of the :class:`TopologicalSorter` with an optional " "initial graph." msgstr "" +"créer une instance de la classe :class:`TopologicalSorter` avec " +"éventuellement un graphe initial ;" #: library/graphlib.rst:42 msgid "Add additional nodes to the graph." -msgstr "" +msgstr "ajouter d'autres nœuds au graphe ;" #: library/graphlib.rst:43 msgid "Call :meth:`~TopologicalSorter.prepare` on the graph." -msgstr "" +msgstr "appeler :meth:`~TopologicalSorter.prepare` sur le graphe ;" #: library/graphlib.rst:44 msgid "" @@ -73,6 +94,10 @@ msgid "" "nodes returned by :meth:`~TopologicalSorter.get_ready` and process them. " "Call :meth:`~TopologicalSorter.done` on each node as it finishes processing." msgstr "" +"tant que :meth:`~TopologicalSorter.is_active` est à ``True``, itérer sur les " +"nœuds renvoyés par :meth:`~TopologicalSorter.get_ready` pour les traiter. " +"Appeler :meth:`~TopologicalSorter.done` sur chaque nœud une fois le " +"traitement terminé." #: library/graphlib.rst:49 msgid "" @@ -80,24 +105,34 @@ msgid "" "no parallelism is involved, the convenience method :meth:`TopologicalSorter." "static_order` can be used directly:" msgstr "" +"Si vous souhaitez simplement trier des nœuds du graphe sans parallélisme, la " +"méthode :meth:`TopologicalSorter.static_order` peut être utilisée " +"directement :" #: library/graphlib.rst:60 msgid "" "The class is designed to easily support parallel processing of the nodes as " "they become ready. For instance::" msgstr "" +"La classe est conçue pour prendre facilement en charge le traitement en " +"parallèle des nœuds quand ils deviennent disponibles. Par exemple ::" #: library/graphlib.rst:87 msgid "" "Add a new node and its predecessors to the graph. Both the *node* and all " "elements in *predecessors* must be hashable." msgstr "" +"Ajoute un nouveau nœud et son prédécesseur dans le graphe. Le *node* ainsi " +"que tous les éléments dans *predecessors* doivent être hachables." #: library/graphlib.rst:90 msgid "" "If called multiple times with the same node argument, the set of " "dependencies will be the union of all dependencies passed in." msgstr "" +"S'il est appelé plusieurs fois avec le même nœud en tant qu'argument, " +"l'ensemble des dépendances sera l'union de toutes les dépendances qui auront " +"été transmises." #: library/graphlib.rst:93 msgid "" @@ -106,11 +141,17 @@ msgid "" "provided before is included among *predecessors* it will be automatically " "added to the graph with no predecessors of its own." msgstr "" +"Il est possible d'ajouter un nœud sans dépendance (*predecessors* n'est pas " +"fourni) ou de fournir une dépendance deux fois. Si un nœud qui n'a jamais " +"été fourni auparavant est inclus dans *predecessors* il sera automatiquement " +"ajouté au graphe sans prédécesseur lui-même." #: library/graphlib.rst:98 msgid "" "Raises :exc:`ValueError` if called after :meth:`~TopologicalSorter.prepare`." msgstr "" +"Lève une :exc:`ValueError` si appelée après :meth:`~TopologicalSorter." +"prepare`." #: library/graphlib.rst:102 msgid "" @@ -121,6 +162,12 @@ msgid "" "be modified, and therefore no more nodes can be added using :meth:" "`~TopologicalSorter.add`." msgstr "" +"Indique que le graphe est terminé et vérifie les circuits du graphe. Si un " +"circuit est détecté, une :exc:`CycleError` est levée mais :meth:" +"`~TopologicalSorter.get_ready` peut encore être utilisée pour obtenir autant " +"de nœuds que possible avant que les circuits ne bloquent la progression. " +"Après un appel de cette fonction, le graphe ne peut pas être modifié, et " +"donc aucun nœud ne peut être ajouté avec :meth:`~TopologicalSorter.add`." #: library/graphlib.rst:111 msgid "" @@ -131,22 +178,32 @@ msgid "" "`TopologicalSorter.done` is less than the number that have been returned by :" "meth:`TopologicalSorter.get_ready`." msgstr "" +"Renvoie ``True`` si une progression peut être faite et ``False`` dans le cas " +"contraire. La progression est possible si des circuits ne bloquent pas la " +"résolution ou qu'il reste des nœuds prêts qui n'ont pas encore été renvoyés " +"par :meth:`TopologicalSorter.get_ready` ou que le nombre de nœuds marqués :" +"meth:`TopologicalSorter.done` est inférieur au nombre qui a été renvoyé par :" +"meth:`TopologicalSorter.get_ready`." #: library/graphlib.rst:118 msgid "" "The :meth:`~TopologicalSorter.__bool__` method of this class defers to this " "function, so instead of::" msgstr "" +"La méthode :meth:`~TopologicalSorter.__bool__` de cette classe renvoie à " +"cette fonction donc au lieu de ::" #: library/graphlib.rst:124 msgid "it is possible to simply do::" -msgstr "" +msgstr "il est plus simple de faire ::" #: library/graphlib.rst:152 msgid "" "Raises :exc:`ValueError` if called without calling :meth:`~TopologicalSorter." "prepare` previously." msgstr "" +"Lève une :exc:`ValueError` si l'appel à :meth:`~TopologicalSorter.prepare` " +"n'a pas été fait au préalable." #: library/graphlib.rst:134 msgid "" @@ -154,6 +211,9 @@ msgid "" "processed, unblocking any successor of each node in *nodes* for being " "returned in the future by a call to :meth:`TopologicalSorter.get_ready`." msgstr "" +"Marque un ensemble de nœuds renvoyé par :meth:`TopologicalSorter.get_ready` " +"comme traités, permettant aux successeurs de chaque nœud de *nodes* d'être " +"renvoyés lors d'un prochain appel à :meth:`~TopologicalSorter.get_ready`." #: library/graphlib.rst:138 msgid "" @@ -163,6 +223,11 @@ msgid "" "meth:`~TopologicalSorter.prepare` or if node has not yet been returned by :" "meth:`~TopologicalSorter.get_ready`." msgstr "" +"Lève une :exc:`ValueError` si n'importe quel nœud dans *nodes* a déjà été " +"marqué comme traité par un précédent appel à cette méthode ou si un nœud n'a " +"pas été ajouté au graphe en utilisant :meth:`TopologicalSorter.add`, si " +"l'appel est fait sans appel à :meth:`~TopologicalSorter.prepare` ou si le " +"nœud n'a pas encore été renvoyé par :meth:`~TopologicalSorter.get_ready`." #: library/graphlib.rst:146 msgid "" @@ -172,48 +237,68 @@ msgid "" "nodes that have all their predecessors already processed. Once no more " "progress can be made, empty tuples are returned." msgstr "" +"Renvoie un *n*-uplet avec tous les nœuds prêts. Renvoie d'abord tous les " +"nœuds sans prédécesseurs, et une fois marqués comme traités avec un appel " +"de :meth:`TopologicalSorter.done`, les autres appels renvoient tous les " +"nouveaux nœuds dont tous les prédécesseurs sont traités. Une fois que la " +"progression n'est plus possible, des tuples vides sont renvoyés." #: library/graphlib.rst:157 +#, fuzzy msgid "" -"Returns an iterable of nodes in a topological order. Using this method does " -"not require to call :meth:`TopologicalSorter.prepare` or :meth:" -"`TopologicalSorter.done`. This method is equivalent to::" +"Returns an iterator object which will iterate over nodes in a topological " +"order. When using this method, :meth:`~TopologicalSorter.prepare` and :meth:" +"`~TopologicalSorter.done` should not be called. This method is equivalent " +"to::" msgstr "" +"Renvoie un itérable contenant les nœuds dans un ordre topologique. " +"L'utilisation de cette méthode permet d'éviter l'appel à :meth:" +"`TopologicalSorter.prepare` ou :meth:`TopologicalSorter.done` Cette méthode " +"est équivalente à ::" -#: library/graphlib.rst:168 +#: library/graphlib.rst:169 msgid "" "The particular order that is returned may depend on the specific order in " "which the items were inserted in the graph. For example:" msgstr "" +"Le tri obtenu peut dépendre de l'ordre dans lequel les éléments ont été " +"ajoutés dans le graphe. Par exemple :" -#: library/graphlib.rst:185 +#: library/graphlib.rst:186 msgid "" "This is due to the fact that \"0\" and \"2\" are in the same level in the " "graph (they would have been returned in the same call to :meth:" "`~TopologicalSorter.get_ready`) and the order between them is determined by " "the order of insertion." msgstr "" +"Ceci est dû au fait que \"0\" et \"2\" sont au même niveau dans le graphe " +"(ils auraient été renvoyés dans le même appel à :meth:`~TopologicalSorter." +"get_ready`) et l'ordre entre eux est déterminé par l'ordre lors de " +"l'insertion." -#: library/graphlib.rst:191 +#: library/graphlib.rst:192 msgid "If any cycle is detected, :exc:`CycleError` will be raised." -msgstr "" +msgstr "Si un circuit est détecté alors une :exc:`CycleError` est levée." -#: library/graphlib.rst:197 +#: library/graphlib.rst:198 msgid "Exceptions" msgstr "Exceptions" -#: library/graphlib.rst:198 +#: library/graphlib.rst:199 msgid "The :mod:`graphlib` module defines the following exception classes:" -msgstr "" +msgstr "Le module :mod:`graphlib` définit les classes d'exceptions suivantes :" -#: library/graphlib.rst:202 +#: library/graphlib.rst:203 msgid "" "Subclass of :exc:`ValueError` raised by :meth:`TopologicalSorter.prepare` if " "cycles exist in the working graph. If multiple cycles exist, only one " "undefined choice among them will be reported and included in the exception." msgstr "" +"Une classe héritant de :exc:`ValueError` levée par :meth:`TopologicalSorter." +"prepare` si un circuit existe dans le graphe courant. Si plusieurs circuits " +"existent, un seul est inclus dans l'exception." -#: library/graphlib.rst:206 +#: library/graphlib.rst:207 msgid "" "The detected cycle can be accessed via the second element in the :attr:" "`~CycleError.args` attribute of the exception instance and consists in a " @@ -221,3 +306,8 @@ msgid "" "predecessor of the next node in the list. In the reported list, the first " "and the last node will be the same, to make it clear that it is cyclic." msgstr "" +"On accède au circuit détecté via le second élément de l'attribut :attr:" +"`~CycleError.args` de l'instance de l'exception. Cet attribut est une liste " +"de nœuds où chaque nœud est, dans le graphe, un prédécesseur immédiat du " +"nœud suivant de la liste. Dans la liste renvoyée, le premier et le dernier " +"nœud sont les mêmes afin de bien indiquer que c'est un circuit." diff --git a/library/grp.po b/library/grp.po index 11f4cf86f2..0d3e8d215f 100644 --- a/library/grp.po +++ b/library/grp.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -28,7 +28,7 @@ msgstr "" msgid "" "Group database entries are reported as a tuple-like object, whose attributes " "correspond to the members of the ``group`` structure (Attribute field below, " -"see ````):" +"see ````):" msgstr "" #: library/grp.rst:18 diff --git a/library/gzip.po b/library/gzip.po index 0fa5187d6a..c25ff2b3d9 100644 --- a/library/gzip.po +++ b/library/gzip.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: 2018-10-07 15:03+0200\n" "Last-Translator: Lomanic \n" "Language-Team: FRENCH \n" @@ -216,7 +216,7 @@ msgid "" "is no compression. The default is ``9``." msgstr "" "L'argument *compresslevel* est un entier de ``0`` à ``9`` contrôlant le " -"niveau de compression,``1`` est le plus rapide et produit la compression la " +"niveau de compression, ``1`` est le plus rapide et produit la compression la " "plus faible et ``9`` est le plus rapide et produit la compression la plus " "élevée. ``0`` désactive la compression. Par défaut à ``9``." @@ -352,52 +352,68 @@ msgstr "" msgid "" "Compress the *data*, returning a :class:`bytes` object containing the " "compressed data. *compresslevel* and *mtime* have the same meaning as in " -"the :class:`GzipFile` constructor above." +"the :class:`GzipFile` constructor above. When *mtime* is set to ``0``, this " +"function is equivalent to :func:`zlib.compress` with *wbits* set to ``31``. " +"The zlib function is faster." msgstr "" "Compresse les données *data*, renvoie un objet :class:`bytes` contenant les " "données compressées. L'argument *compresslevel* a la même signification que " "dans le constructeur de la classe :class:`GzipFile` ci-dessus." -#: library/gzip.rst:180 +#: library/gzip.rst:182 msgid "Added the *mtime* parameter for reproducible output." msgstr "" -#: library/gzip.rst:185 +#: library/gzip.rst:184 +msgid "" +"Speed is improved by compressing all data at once instead of in a streamed " +"fashion. Calls with *mtime* set to ``0`` are delegated to :func:`zlib." +"compress` for better speed." +msgstr "" + +#: library/gzip.rst:191 msgid "" "Decompress the *data*, returning a :class:`bytes` object containing the " -"uncompressed data." +"uncompressed data. This function is capable of decompressing multi-member " +"gzip data (multiple gzip blocks concatenated together). When the data is " +"certain to contain only one member the :func:`zlib.decompress` function with " +"*wbits* set to 31 is faster." msgstr "" -"Décompresse les données *data*, retourne un objet :class:`bytes` contenant " -"les données décompressées." -#: library/gzip.rst:194 +#: library/gzip.rst:198 +msgid "" +"Speed is improved by decompressing members at once in memory instead of in a " +"streamed fashion." +msgstr "" + +#: library/gzip.rst:205 msgid "Examples of usage" msgstr "Exemples d'utilisation" -#: library/gzip.rst:196 +#: library/gzip.rst:207 msgid "Example of how to read a compressed file::" msgstr "Exemple montrant comment lire un fichier compressé ::" -#: library/gzip.rst:202 +#: library/gzip.rst:213 msgid "Example of how to create a compressed GZIP file::" msgstr "Exemple montrant comment créer un fichier GZIP ::" -#: library/gzip.rst:209 +#: library/gzip.rst:220 msgid "Example of how to GZIP compress an existing file::" msgstr "" "Exemple montrant comment compresser dans un GZIP un fichier existant ::" -#: library/gzip.rst:217 +#: library/gzip.rst:228 msgid "Example of how to GZIP compress a binary string::" msgstr "" "Exemple montrant comment compresser dans un GZIP un binaire dans une " "chaîne ::" -#: library/gzip.rst:226 +#: library/gzip.rst:237 msgid "Module :mod:`zlib`" msgstr "Module :mod:`zlib`" -#: library/gzip.rst:226 +#: library/gzip.rst:237 msgid "" "The basic data compression module needed to support the :program:`gzip` file " "format." @@ -405,46 +421,53 @@ msgstr "" "Le module de compression de données de base nécessaire pour gérer le format " "de fichier :program:`gzip`." -#: library/gzip.rst:233 +#: library/gzip.rst:244 msgid "Command Line Interface" msgstr "Interface en ligne de commande" -#: library/gzip.rst:235 +#: library/gzip.rst:246 msgid "" "The :mod:`gzip` module provides a simple command line interface to compress " "or decompress files." msgstr "" -#: library/gzip.rst:238 +#: library/gzip.rst:249 msgid "Once executed the :mod:`gzip` module keeps the input file(s)." msgstr "" -#: library/gzip.rst:242 +#: library/gzip.rst:253 msgid "" "Add a new command line interface with a usage. By default, when you will " "execute the CLI, the default compression level is 6." msgstr "" -#: library/gzip.rst:246 +#: library/gzip.rst:257 msgid "Command line options" msgstr "Options de la ligne de commande" -#: library/gzip.rst:250 +#: library/gzip.rst:261 msgid "If *file* is not specified, read from :attr:`sys.stdin`." msgstr "" -#: library/gzip.rst:254 +#: library/gzip.rst:265 msgid "Indicates the fastest compression method (less compression)." msgstr "" -#: library/gzip.rst:258 +#: library/gzip.rst:269 msgid "Indicates the slowest compression method (best compression)." msgstr "" -#: library/gzip.rst:262 +#: library/gzip.rst:273 msgid "Decompress the given file." msgstr "" -#: library/gzip.rst:266 +#: library/gzip.rst:277 msgid "Show the help message." msgstr "Affiche le message d'aide." + +#~ msgid "" +#~ "Decompress the *data*, returning a :class:`bytes` object containing the " +#~ "uncompressed data." +#~ msgstr "" +#~ "Décompresse les données *data*, retourne un objet :class:`bytes` " +#~ "contenant les données décompressées." diff --git a/library/hashlib.po b/library/hashlib.po index dffb1ebd6d..a7a47add3d 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2020-04-27 22:47+0200\n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 15:55+0200\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -29,7 +29,7 @@ msgid "" "This module implements a common interface to many different secure hash and " "message digest algorithms. Included are the FIPS secure hash algorithms " "SHA1, SHA224, SHA256, SHA384, and SHA512 (defined in FIPS 180-2) as well as " -"RSA's MD5 algorithm (defined in Internet :rfc:`1321`). The terms \"secure " +"RSA's MD5 algorithm (defined in internet :rfc:`1321`). The terms \"secure " "hash\" and \"message digest\" are interchangeable. Older algorithms were " "called message digests. The modern term is secure hash." msgstr "" @@ -135,7 +135,7 @@ msgstr "" msgid ":func:`blake2b` and :func:`blake2s` were added." msgstr "Les fonctions :func:`blake2b` et :func:`blake2s` ont été ajoutées." -#: library/hashlib.rst:83 +#: library/hashlib.rst:85 msgid "" "All hashlib constructors take a keyword-only argument *usedforsecurity* with " "default value ``True``. A false value allows the use of insecure and blocked " @@ -144,14 +144,15 @@ msgid "" "cryptographic one-way compression function." msgstr "" -#: library/hashlib.rst:90 +#: library/hashlib.rst:92 msgid "Hashlib now uses SHA3 and SHAKE from OpenSSL 1.1.1 and newer." msgstr "" -#: library/hashlib.rst:92 +#: library/hashlib.rst:94 +#, fuzzy msgid "" -"For example, to obtain the digest of the byte string ``b'Nobody inspects the " -"spammish repetition'``::" +"For example, to obtain the digest of the byte string ``b\"Nobody inspects " +"the spammish repetition\"``::" msgstr "" "Par exemple, pour obtenir l'empreinte de la chaîne ``b'Nobody inspects the " "spammish repetition'`` ::" @@ -330,10 +331,48 @@ msgstr "" "l'intervalle 0 à 255." #: library/hashlib.rst:230 +#, fuzzy +msgid "File hashing" +msgstr "Hachage simple" + +#: library/hashlib.rst:232 +msgid "" +"The hashlib module provides a helper function for efficient hashing of a " +"file or file-like object." +msgstr "" + +#: library/hashlib.rst:237 +msgid "" +"Return a digest object that has been updated with contents of file object." +msgstr "" + +#: library/hashlib.rst:239 +msgid "" +"*fileobj* must be a file-like object opened for reading in binary mode. It " +"accepts file objects from builtin :func:`open`, :class:`~io.BytesIO` " +"instances, SocketIO objects from :meth:`socket.socket.makefile`, and " +"similar. The function may bypass Python's I/O and use the file descriptor " +"from :meth:`~io.IOBase.fileno` directly. *fileobj* must be assumed to be in " +"an unknown state after this function returns or raises. It is up to the " +"caller to close *fileobj*." +msgstr "" + +#: library/hashlib.rst:247 +msgid "" +"*digest* must either be a hash algorithm name as a *str*, a hash " +"constructor, or a callable that returns a hash object." +msgstr "" + +#: library/hashlib.rst:250 +#, fuzzy +msgid "Example:" +msgstr "Exemples" + +#: library/hashlib.rst:273 msgid "Key derivation" msgstr "Dérivation de clé" -#: library/hashlib.rst:232 +#: library/hashlib.rst:275 msgid "" "Key derivation and key stretching algorithms are designed for secure " "password hashing. Naive algorithms such as ``sha1(password)`` are not " @@ -347,7 +386,7 @@ msgstr "" "bonne fonction de hachage doit être paramétrable, lente, et inclure un `sel " "`_." -#: library/hashlib.rst:240 +#: library/hashlib.rst:283 msgid "" "The function provides PKCS#5 password-based key derivation function 2. It " "uses HMAC as pseudorandom function." @@ -356,7 +395,7 @@ msgstr "" "Cryptographic Standards #5 v2.0*). Elle utilise HMAC comme fonction de " "pseudo-aléatoire." -#: library/hashlib.rst:243 +#: library/hashlib.rst:286 msgid "" "The string *hash_name* is the desired name of the hash digest algorithm for " "HMAC, e.g. 'sha1' or 'sha256'. *password* and *salt* are interpreted as " @@ -371,17 +410,16 @@ msgstr "" "``1024``). *salt* doit être de 16 octets ou plus provenant d'une source " "correcte, e.g. :func:`os.urandom`." -#: library/hashlib.rst:249 +#: library/hashlib.rst:292 msgid "" "The number of *iterations* should be chosen based on the hash algorithm and " -"computing power. As of 2013, at least 100,000 iterations of SHA-256 are " -"suggested." +"computing power. As of 2022, hundreds of thousands of iterations of SHA-256 " +"are suggested. For rationale as to why and how to choose what is best for " +"your application, read *Appendix A.2.2* of NIST-SP-800-132_. The answers on " +"the `stackexchange pbkdf2 iterations question`_ explain in detail." msgstr "" -"Le nombre d'*iterations* doit être choisi sur la base de l'algorithme de " -"hachage et de la puissance de calcul. En 2013, au moins 100000 itérations de " -"SHA-256 sont recommandées." -#: library/hashlib.rst:253 +#: library/hashlib.rst:298 msgid "" "*dklen* is the length of the derived key. If *dklen* is ``None`` then the " "digest size of the hash algorithm *hash_name* is used, e.g. 64 for SHA-512." @@ -390,7 +428,7 @@ msgstr "" "taille du message de l'algorithme de hachage *hash_name* est utilisé, e.g. " "64 pour SHA-512." -#: library/hashlib.rst:265 +#: library/hashlib.rst:311 msgid "" "A fast implementation of *pbkdf2_hmac* is available with OpenSSL. The " "Python implementation uses an inline version of :mod:`hmac`. It is about " @@ -400,7 +438,13 @@ msgstr "" "L'implémentation Python utilise une version anonyme de :mod:`hmac`. Elle est " "trois fois plus lente et ne libère pas le GIL." -#: library/hashlib.rst:271 +#: library/hashlib.rst:317 +msgid "" +"Slow Python implementation of *pbkdf2_hmac* is deprecated. In the future the " +"function will only be available when Python is compiled with OpenSSL." +msgstr "" + +#: library/hashlib.rst:323 msgid "" "The function provides scrypt password-based key derivation function as " "defined in :rfc:`7914`." @@ -408,7 +452,7 @@ msgstr "" "La fonction fournit la fonction de dérivation de clé *scrypt* comme définie " "dans :rfc:`7914`." -#: library/hashlib.rst:274 +#: library/hashlib.rst:326 msgid "" "*password* and *salt* must be :term:`bytes-like objects `. Applications and libraries should limit *password* to a sensible " @@ -420,7 +464,7 @@ msgstr "" "longueur raisonnable (e.g. 1024). *salt* doit être de 16 octets ou plus " "provenant d'une source correcte, e.g. :func:`os.urandom`." -#: library/hashlib.rst:279 +#: library/hashlib.rst:331 msgid "" "*n* is the CPU/Memory cost factor, *r* the block size, *p* parallelization " "factor and *maxmem* limits memory (OpenSSL 1.1.0 defaults to 32 MiB). " @@ -430,15 +474,11 @@ msgstr "" "facteur de parallélisation et *maxmem* limite la mémoire (OpenSSL 1.1.0 " "limite à 32 MB par défaut). *dklen* est la longueur de la clé dérivée." -#: library/hashlib.rst:284 -msgid ":ref:`Availability `: OpenSSL 1.1+." -msgstr ":ref:`Disponibilité ` : OpenSSL 1.1+." - -#: library/hashlib.rst:289 +#: library/hashlib.rst:339 msgid "BLAKE2" msgstr "BLAKE2" -#: library/hashlib.rst:296 +#: library/hashlib.rst:346 msgid "" "BLAKE2_ is a cryptographic hash function defined in :rfc:`7693` that comes " "in two flavors:" @@ -446,7 +486,7 @@ msgstr "" "BLAKE2_ est une fonction de hachage cryptographique définie dans la :rfc:" "`7693` et disponible en deux versions ::" -#: library/hashlib.rst:299 +#: library/hashlib.rst:349 msgid "" "**BLAKE2b**, optimized for 64-bit platforms and produces digests of any size " "between 1 and 64 bytes," @@ -454,7 +494,7 @@ msgstr "" "**BLAKE2b**, optimisée pour les plates-formes 64-bit et produisant des " "messages de toutes tailles entre 1 et 64 octets," -#: library/hashlib.rst:302 +#: library/hashlib.rst:352 msgid "" "**BLAKE2s**, optimized for 8- to 32-bit platforms and produces digests of " "any size between 1 and 32 bytes." @@ -462,7 +502,7 @@ msgstr "" "**BLAKE2s**, optimisée pour les plates-formes de 8 à 32-bit et produisant " "des messages de toutes tailles entre 1 et 32 octets." -#: library/hashlib.rst:305 +#: library/hashlib.rst:355 msgid "" "BLAKE2 supports **keyed mode** (a faster and simpler replacement for HMAC_), " "**salted hashing**, **personalization**, and **tree hashing**." @@ -471,7 +511,7 @@ msgstr "" "rapide et plus simple pour HMAC_), **salted hashing**, **personalization**, " "et **tree hashing**." -#: library/hashlib.rst:308 +#: library/hashlib.rst:358 msgid "" "Hash objects from this module follow the API of standard library's :mod:" "`hashlib` objects." @@ -479,15 +519,15 @@ msgstr "" "Les objets hachés de ce module suivent l'API des objets du module :mod:" "`hashlib` de la librairie standard." -#: library/hashlib.rst:313 +#: library/hashlib.rst:363 msgid "Creating hash objects" msgstr "Création d'objets hachés" -#: library/hashlib.rst:315 +#: library/hashlib.rst:365 msgid "New hash objects are created by calling constructor functions:" msgstr "Les nouveaux objets hachés sont créés en appelant les constructeurs ::" -#: library/hashlib.rst:329 +#: library/hashlib.rst:379 msgid "" "These functions return the corresponding hash objects for calculating " "BLAKE2b or BLAKE2s. They optionally take these general parameters:" @@ -495,7 +535,7 @@ msgstr "" "Ces fonctions produisent l'objet haché correspondant aux calculs de BLAKE2b " "ou BLAKE2s. Elles prennent ces paramètres optionnels ::" -#: library/hashlib.rst:332 +#: library/hashlib.rst:382 msgid "" "*data*: initial chunk of data to hash, which must be :term:`bytes-like " "object`. It can be passed only as positional argument." @@ -503,11 +543,11 @@ msgstr "" "*data*: morceau initial de données à hacher, qui doit être un objet de type :" "term:`bytes-like object`. Il peut être passé comme argument positionnel." -#: library/hashlib.rst:335 +#: library/hashlib.rst:385 msgid "*digest_size*: size of output digest in bytes." msgstr "*digest_size*: taille en sortie du message en octets." -#: library/hashlib.rst:337 +#: library/hashlib.rst:387 msgid "" "*key*: key for keyed hashing (up to 64 bytes for BLAKE2b, up to 32 bytes for " "BLAKE2s)." @@ -515,7 +555,7 @@ msgstr "" "*key*: clé pour les code d'authentification de message *keyed hashing* " "(jusqu'à 64 octets pour BLAKE2b, jusqu'à 32 octets pour BLAKE2s)." -#: library/hashlib.rst:340 +#: library/hashlib.rst:390 msgid "" "*salt*: salt for randomized hashing (up to 16 bytes for BLAKE2b, up to 8 " "bytes for BLAKE2s)." @@ -523,7 +563,7 @@ msgstr "" "*salt*: sel pour le hachage randomisé *randomized hashing* (jusqu'à 16 " "octets pour BLAKE2b, jusqu'à 8 octets pour BLAKE2s)." -#: library/hashlib.rst:343 +#: library/hashlib.rst:393 msgid "" "*person*: personalization string (up to 16 bytes for BLAKE2b, up to 8 bytes " "for BLAKE2s)." @@ -531,57 +571,57 @@ msgstr "" "*person*: chaîne de personnalisation (jusqu'à 16 octets pour BLAKE2b, " "jusqu'à 8 octets pour BLAKE2s)." -#: library/hashlib.rst:346 +#: library/hashlib.rst:396 msgid "The following table shows limits for general parameters (in bytes):" msgstr "" "Le tableau suivant présente les limites des paramètres généraux (en " "octets) ::" -#: library/hashlib.rst:349 +#: library/hashlib.rst:399 msgid "Hash" msgstr "Hash" -#: library/hashlib.rst:349 +#: library/hashlib.rst:399 msgid "digest_size" msgstr "digest_size" -#: library/hashlib.rst:349 +#: library/hashlib.rst:399 msgid "len(key)" msgstr "len(key)" -#: library/hashlib.rst:349 +#: library/hashlib.rst:399 msgid "len(salt)" msgstr "len(salt)" -#: library/hashlib.rst:349 +#: library/hashlib.rst:399 msgid "len(person)" msgstr "len(person)" -#: library/hashlib.rst:351 +#: library/hashlib.rst:401 msgid "BLAKE2b" msgstr "BLAKE2b" -#: library/hashlib.rst:351 +#: library/hashlib.rst:401 msgid "64" msgstr "64" -#: library/hashlib.rst:351 +#: library/hashlib.rst:401 msgid "16" msgstr "16" -#: library/hashlib.rst:352 +#: library/hashlib.rst:402 msgid "BLAKE2s" msgstr "BLAKE2s" -#: library/hashlib.rst:352 +#: library/hashlib.rst:402 msgid "32" msgstr "32" -#: library/hashlib.rst:352 +#: library/hashlib.rst:402 msgid "8" msgstr "8" -#: library/hashlib.rst:357 +#: library/hashlib.rst:407 msgid "" "BLAKE2 specification defines constant lengths for salt and personalization " "parameters, however, for convenience, this implementation accepts byte " @@ -598,24 +638,24 @@ msgstr "" "``b'salt'`` et ``b'salt\\x00'`` sont la même valeur (Ce n'est pas le cas " "pour *key*.)" -#: library/hashlib.rst:364 +#: library/hashlib.rst:414 msgid "These sizes are available as module `constants`_ described below." msgstr "" "Ces tailles sont disponibles comme `constants`_ du module et décrites ci-" "dessous." -#: library/hashlib.rst:366 +#: library/hashlib.rst:416 msgid "" "Constructor functions also accept the following tree hashing parameters:" msgstr "" "Les fonctions constructeur acceptent aussi les paramètres suivants pour le " "*tree hashing* ::" -#: library/hashlib.rst:368 +#: library/hashlib.rst:418 msgid "*fanout*: fanout (0 to 255, 0 if unlimited, 1 in sequential mode)." msgstr "*fanout*: *fanout* (0 à 255, 0 si illimité, 1 en mode séquentiel)." -#: library/hashlib.rst:370 +#: library/hashlib.rst:420 msgid "" "*depth*: maximal depth of tree (1 to 255, 255 if unlimited, 1 in sequential " "mode)." @@ -623,30 +663,32 @@ msgstr "" "*depth*: profondeur maximale de l'arbre (1 à 255, 255 si illimité, 1 en mode " "séquentiel)." -#: library/hashlib.rst:373 +#: library/hashlib.rst:423 +#, fuzzy msgid "" -"*leaf_size*: maximal byte length of leaf (0 to 2**32-1, 0 if unlimited or in " -"sequential mode)." +"*leaf_size*: maximal byte length of leaf (0 to ``2**32-1``, 0 if unlimited " +"or in sequential mode)." msgstr "" "*leaf_size*: taille maximale en octets d'une feuille (0 à 2**32-1, 0 si " "illimité ou en mode séquentiel)." -#: library/hashlib.rst:376 +#: library/hashlib.rst:426 +#, fuzzy msgid "" -"*node_offset*: node offset (0 to 2**64-1 for BLAKE2b, 0 to 2**48-1 for " -"BLAKE2s, 0 for the first, leftmost, leaf, or in sequential mode)." +"*node_offset*: node offset (0 to ``2**64-1`` for BLAKE2b, 0 to ``2**48-1`` " +"for BLAKE2s, 0 for the first, leftmost, leaf, or in sequential mode)." msgstr "" "*node_offset*: décalage de nœud (0 à 2**64-1 pour BLAKE2b, 0 à 2**48-1 pour " "BLAKE2s, 0 pour la première feuille la plus à gauche, ou en mode séquentiel)." -#: library/hashlib.rst:379 +#: library/hashlib.rst:429 msgid "" "*node_depth*: node depth (0 to 255, 0 for leaves, or in sequential mode)." msgstr "" "*node_depth*: profondeur de nœuds (0 à 255, 0 pour les feuilles, ou en mode " "séquentiel)." -#: library/hashlib.rst:381 +#: library/hashlib.rst:431 msgid "" "*inner_size*: inner digest size (0 to 64 for BLAKE2b, 0 to 32 for BLAKE2s, 0 " "in sequential mode)." @@ -654,15 +696,19 @@ msgstr "" "*inner_size*: taille interne du message (0 à 64 pour BLAKE2b, 0 à 32 pour " "BLAKE2s, 0 en mode séquentiel)." -#: library/hashlib.rst:384 +#: library/hashlib.rst:434 msgid "" "*last_node*: boolean indicating whether the processed node is the last one " "(`False` for sequential mode)." msgstr "" -"*last_node*: booléen indiquant si le nœud traité est le dernier (`False` " +"*last_node*: booléen indiquant si le nœud traité est le dernier (``False`` " "pour le mode séquentiel)." -#: library/hashlib.rst:390 +#: library/hashlib.rst:None +msgid "Explanation of tree mode parameters." +msgstr "" + +#: library/hashlib.rst:440 msgid "" "See section 2.10 in `BLAKE2 specification `_ for comprehensive review of tree hashing." @@ -670,38 +716,38 @@ msgstr "" "Voir section 2.10 dans `BLAKE2 specification `_ pour une approche compréhensive du *tree hashing*." -#: library/hashlib.rst:396 +#: library/hashlib.rst:446 msgid "Constants" msgstr "Constantes" -#: library/hashlib.rst:401 +#: library/hashlib.rst:451 msgid "Salt length (maximum length accepted by constructors)." msgstr "Longueur du sel (longueur maximale acceptée par les constructeurs)." -#: library/hashlib.rst:407 +#: library/hashlib.rst:457 msgid "" "Personalization string length (maximum length accepted by constructors)." msgstr "" "Longueur de la chaîne de personnalisation (longueur maximale acceptée par " "les constructeurs)." -#: library/hashlib.rst:413 +#: library/hashlib.rst:463 msgid "Maximum key size." msgstr "Taille maximale de clé." -#: library/hashlib.rst:419 +#: library/hashlib.rst:469 msgid "Maximum digest size that the hash function can output." msgstr "Taille maximale du message que peut fournir la fonction de hachage." -#: library/hashlib.rst:423 +#: library/hashlib.rst:473 msgid "Examples" msgstr "Exemples" -#: library/hashlib.rst:426 +#: library/hashlib.rst:476 msgid "Simple hashing" msgstr "Hachage simple" -#: library/hashlib.rst:428 +#: library/hashlib.rst:478 msgid "" "To calculate hash of some data, you should first construct a hash object by " "calling the appropriate constructor function (:func:`blake2b` or :func:" @@ -716,7 +762,7 @@ msgstr "" "l'empreinte du message en appelant la méthode :meth:`digest` (ou :meth:" "`hexdigest` pour les chaînes hexadécimales)." -#: library/hashlib.rst:441 +#: library/hashlib.rst:491 msgid "" "As a shortcut, you can pass the first chunk of data to update directly to " "the constructor as the positional argument:" @@ -724,7 +770,7 @@ msgstr "" "Pour raccourcir, vous pouvez passer directement au constructeur, comme " "argument positionnel, le premier morceau du message à mettre à jour ::" -#: library/hashlib.rst:448 +#: library/hashlib.rst:498 msgid "" "You can call :meth:`hash.update` as many times as you need to iteratively " "update the hash:" @@ -732,11 +778,11 @@ msgstr "" "Vous pouvez appeler la méthode :meth:`hash.update` autant de fois que " "nécessaire pour mettre à jour le *hash* de manière itérative ::" -#: library/hashlib.rst:461 +#: library/hashlib.rst:511 msgid "Using different digest sizes" msgstr "Usage de tailles d'empreintes différentes" -#: library/hashlib.rst:463 +#: library/hashlib.rst:513 msgid "" "BLAKE2 has configurable size of digests up to 64 bytes for BLAKE2b and up to " "32 bytes for BLAKE2s. For example, to replace SHA-1 with BLAKE2b without " @@ -747,7 +793,7 @@ msgstr "" "par BLAKE2b sans changer la taille de la sortie, nous pouvons dire à BLAKE2b " "de produire une empreinte de 20 octets ::" -#: library/hashlib.rst:477 +#: library/hashlib.rst:527 msgid "" "Hash objects with different digest sizes have completely different outputs " "(shorter hashes are *not* prefixes of longer hashes); BLAKE2b and BLAKE2s " @@ -758,17 +804,17 @@ msgstr "" "de *hash* plus longs); BLAKE2b et BLAKE2s produisent des sorties différentes " "même si les longueurs des sorties sont les mêmes ::" -#: library/hashlib.rst:493 +#: library/hashlib.rst:543 msgid "Keyed hashing" msgstr "Code d'authentification de message" -#: library/hashlib.rst:495 +#: library/hashlib.rst:545 +#, fuzzy msgid "" "Keyed hashing can be used for authentication as a faster and simpler " "replacement for `Hash-based message authentication code `_ (HMAC). BLAKE2 " -"can be securely used in prefix-MAC mode thanks to the indifferentiability " -"property inherited from BLAKE." +"wikipedia.org/wiki/HMAC>`_ (HMAC). BLAKE2 can be securely used in prefix-MAC " +"mode thanks to the indifferentiability property inherited from BLAKE." msgstr "" "Le hachage avec clé (*keyed hashing* en anglais) est une alternative plus " "simple et plus rapide à un `code d’authentification d’une empreinte " @@ -777,7 +823,7 @@ msgstr "" "manière sécurisée dans le mode préfixe MAC grâce à la propriété " "d'indifférentiabilité héritée de BLAKE." -#: library/hashlib.rst:501 +#: library/hashlib.rst:551 msgid "" "This example shows how to get a (hex-encoded) 128-bit authentication code " "for message ``b'message data'`` with key ``b'pseudorandom key'``::" @@ -786,7 +832,7 @@ msgstr "" "128-bit (en hexadécimal) pour un message ``b'message data'`` avec la clé " "``b'pseudorandom key'`` ::" -#: library/hashlib.rst:511 +#: library/hashlib.rst:561 msgid "" "As a practical example, a web application can symmetrically sign cookies " "sent to users and later verify them to make sure they weren't tampered with::" @@ -795,7 +841,7 @@ msgstr "" "*cookies* envoyés aux utilisateurs et les vérifier plus tard pour être " "certaine qu'ils n'aient pas été altérés ::" -#: library/hashlib.rst:540 +#: library/hashlib.rst:590 msgid "" "Even though there's a native keyed hashing mode, BLAKE2 can, of course, be " "used in HMAC construction with :mod:`hmac` module::" @@ -804,11 +850,11 @@ msgstr "" "(MAC), BLAKE2 peut, bien sûr, être utilisé pour construire un HMAC en " "combinaison du module :mod:`hmac` ::" -#: library/hashlib.rst:551 +#: library/hashlib.rst:601 msgid "Randomized hashing" msgstr "Hachage randomisé" -#: library/hashlib.rst:553 +#: library/hashlib.rst:603 msgid "" "By setting *salt* parameter users can introduce randomization to the hash " "function. Randomized hashing is useful for protecting against collision " @@ -819,7 +865,7 @@ msgstr "" "se protéger des attaques par collisions sur les fonctions de hachage " "utilisées dans les signatures numériques." -#: library/hashlib.rst:557 +#: library/hashlib.rst:607 msgid "" "Randomized hashing is designed for situations where one party, the message " "preparer, generates all or part of a message to be signed by a second party, " @@ -859,7 +905,7 @@ msgstr "" "par une signature numérique lorsque tous les morceaux du message sont " "préparés par le signataire." -#: library/hashlib.rst:576 +#: library/hashlib.rst:626 msgid "" "(`NIST SP-800-106 \"Randomized Hashing for Digital Signatures\" `_)" @@ -867,7 +913,7 @@ msgstr "" "(`NIST SP-800-106 \"Randomized Hashing for Digital Signatures\" `_, article en anglais)" -#: library/hashlib.rst:579 +#: library/hashlib.rst:629 msgid "" "In BLAKE2 the salt is processed as a one-time input to the hash function " "during initialization, rather than as an input to each compression function." @@ -875,7 +921,7 @@ msgstr "" "Dans BLAKE2, le sel est passé une seule fois lors de l'initialisation de la " "fonction de hachage, plutôt qu'à chaque appel d'une fonction de compression." -#: library/hashlib.rst:584 +#: library/hashlib.rst:634 msgid "" "*Salted hashing* (or just hashing) with BLAKE2 or any other general-purpose " "cryptographic hash function, such as SHA-256, is not suitable for hashing " @@ -886,11 +932,11 @@ msgstr "" "mots de passe. Voir `BLAKE2 FAQ `_ pour plus " "d'informations." -#: library/hashlib.rst:607 +#: library/hashlib.rst:657 msgid "Personalization" msgstr "Personnalisation" -#: library/hashlib.rst:609 +#: library/hashlib.rst:659 msgid "" "Sometimes it is useful to force hash function to produce different digests " "for the same input for different purposes. Quoting the authors of the Skein " @@ -900,7 +946,7 @@ msgstr "" "différentes empreintes de message d'une même entrée pour différentes " "utilisations. Pour citer les auteurs de la fonction de hachage Skein  ::" -#: library/hashlib.rst:613 +#: library/hashlib.rst:663 msgid "" "We recommend that all application designers seriously consider doing this; " "we have seen many protocols where a hash that is computed in one part of the " @@ -917,7 +963,7 @@ msgstr "" "prendre en entrée le même *hash*. Personnaliser chaque fonction de hachage " "utilisée dans le protocole stoppe immédiatement ce genre d'attaque." -#: library/hashlib.rst:620 +#: library/hashlib.rst:670 msgid "" "(`The Skein Hash Function Family `_, p. 21)" @@ -925,12 +971,12 @@ msgstr "" "(`The Skein Hash Function Family `_, p. 21, article en anglais)" -#: library/hashlib.rst:624 +#: library/hashlib.rst:674 msgid "BLAKE2 can be personalized by passing bytes to the *person* argument::" msgstr "" "BLAKE2 peut être personnalisé en passant des *bytes* à l'argument *person* ::" -#: library/hashlib.rst:638 +#: library/hashlib.rst:688 msgid "" "Personalization together with the keyed mode can also be used to derive " "different keys from a single one." @@ -938,17 +984,17 @@ msgstr "" "La personnalisation et le *keyed mode* peuvent être utilisés ensemble pour " "dériver différentes clés à partir d'une seule." -#: library/hashlib.rst:652 +#: library/hashlib.rst:702 msgid "Tree mode" msgstr "Mode Arbre" -#: library/hashlib.rst:654 +#: library/hashlib.rst:704 msgid "Here's an example of hashing a minimal tree with two leaf nodes::" msgstr "" "L'exemple ci-dessous présente comment hacher un arbre minimal avec deux " "nœuds terminaux ::" -#: library/hashlib.rst:660 +#: library/hashlib.rst:710 msgid "" "This example uses 64-byte internal digests, and returns the 32-byte final " "digest::" @@ -956,11 +1002,11 @@ msgstr "" "Cet exemple utilise en interne des empreintes de 64 octets, et produit " "finalement des empreintes 32 octets ::" -#: library/hashlib.rst:690 +#: library/hashlib.rst:740 msgid "Credits" msgstr "Crédits" -#: library/hashlib.rst:692 +#: library/hashlib.rst:742 msgid "" "BLAKE2_ was designed by *Jean-Philippe Aumasson*, *Samuel Neves*, *Zooko " "Wilcox-O'Hearn*, and *Christian Winnerlein* based on SHA-3_ finalist BLAKE_ " @@ -972,7 +1018,7 @@ msgstr "" "créé par *Jean-Philippe Aumasson*, *Luca Henzen*, *Willi Meier*, et *Raphael " "C.-W. Phan*." -#: library/hashlib.rst:697 +#: library/hashlib.rst:747 msgid "" "It uses core algorithm from ChaCha_ cipher designed by *Daniel J. " "Bernstein*." @@ -980,7 +1026,7 @@ msgstr "" "Il utilise le cœur de l'algorithme de chiffrement de ChaCha_ conçu par " "*Daniel J. Bernstein*." -#: library/hashlib.rst:699 +#: library/hashlib.rst:749 msgid "" "The stdlib implementation is based on pyblake2_ module. It was written by " "*Dmitry Chestnykh* based on C implementation written by *Samuel Neves*. The " @@ -991,12 +1037,12 @@ msgstr "" "l'implémentation C écrite par *Samuel Neves*. La documentation a été copiée " "depuis pyblake2_ et écrite par *Dmitry Chestnykh*." -#: library/hashlib.rst:703 +#: library/hashlib.rst:753 msgid "The C code was partly rewritten for Python by *Christian Heimes*." msgstr "" "Le code C a été partiellement réécrit pour Python par *Christian Heimes*." -#: library/hashlib.rst:705 +#: library/hashlib.rst:755 msgid "" "The following public domain dedication applies for both C hash function " "implementation, extension code, and this documentation:" @@ -1004,7 +1050,7 @@ msgstr "" "Le transfert dans le domaine publique s'applique pour l'implémentation C de " "la fonction de hachage, ses extensions et cette documentation ::" -#: library/hashlib.rst:708 +#: library/hashlib.rst:758 msgid "" "To the extent possible under law, the author(s) have dedicated all copyright " "and related and neighboring rights to this software to the public domain " @@ -1015,7 +1061,7 @@ msgstr "" "domaine public dans le monde entier. Ce logiciel est distribué sans aucune " "garantie." -#: library/hashlib.rst:712 +#: library/hashlib.rst:762 msgid "" "You should have received a copy of the CC0 Public Domain Dedication along " "with this software. If not, see https://creativecommons.org/publicdomain/" @@ -1025,7 +1071,7 @@ msgstr "" "Domain Dedication*. Sinon, voir https://creativecommons.org/publicdomain/" "zero/1.0/." -#: library/hashlib.rst:716 +#: library/hashlib.rst:766 msgid "" "The following people have helped with development or contributed their " "changes to the project and the public domain according to the Creative " @@ -1035,38 +1081,38 @@ msgstr "" "modification du projet et au domaine public selon la licence Creative " "Commons Public Domain Dedication 1.0 Universal ::" -#: library/hashlib.rst:720 +#: library/hashlib.rst:770 msgid "*Alexandr Sokolovskiy*" msgstr "*Alexandr Sokolovskiy*" -#: library/hashlib.rst:734 +#: library/hashlib.rst:785 msgid "Module :mod:`hmac`" msgstr "Module :mod:`hmac`" -#: library/hashlib.rst:734 +#: library/hashlib.rst:785 msgid "A module to generate message authentication codes using hashes." msgstr "" "Un module pour générer des codes d'authentification utilisant des *hash*." -#: library/hashlib.rst:737 +#: library/hashlib.rst:788 msgid "Module :mod:`base64`" msgstr "Module :mod:`base64`" -#: library/hashlib.rst:737 +#: library/hashlib.rst:788 msgid "Another way to encode binary hashes for non-binary environments." msgstr "" "Un autre moyen d'encoder des *hash* binaires dans des environnements non " "binaires." -#: library/hashlib.rst:740 +#: library/hashlib.rst:791 msgid "https://blake2.net" msgstr "https://blake2.net" -#: library/hashlib.rst:740 +#: library/hashlib.rst:791 msgid "Official BLAKE2 website." msgstr "Site officiel de BLAKE2." -#: library/hashlib.rst:743 +#: library/hashlib.rst:794 msgid "" "https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/2002-08-01/" "documents/fips180-2.pdf" @@ -1074,11 +1120,11 @@ msgstr "" "https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/2002-08-01/" "documents/fips180-2.pdf" -#: library/hashlib.rst:743 +#: library/hashlib.rst:794 msgid "The FIPS 180-2 publication on Secure Hash Algorithms." msgstr "La publication FIPS 180-2 sur les algorithmes de hachage sécurisés." -#: library/hashlib.rst:747 +#: library/hashlib.rst:798 msgid "" "https://en.wikipedia.org/wiki/" "Cryptographic_hash_function#Cryptographic_hash_algorithms" @@ -1086,7 +1132,7 @@ msgstr "" "https://en.wikipedia.org/wiki/" "Cryptographic_hash_function#Cryptographic_hash_algorithms" -#: library/hashlib.rst:746 +#: library/hashlib.rst:797 msgid "" "Wikipedia article with information on which algorithms have known issues and " "what that means regarding their use." @@ -1094,10 +1140,33 @@ msgstr "" "Article Wikipedia contenant les informations relatives aux algorithmes ayant " "des problèmes et leur interprétation au regard de leur utilisation." -#: library/hashlib.rst:749 -msgid "https://www.ietf.org/rfc/rfc2898.txt" +#: library/hashlib.rst:801 +#, fuzzy +msgid "https://www.ietf.org/rfc/rfc8018.txt" msgstr "https://www.ietf.org/rfc/rfc2898.txt" -#: library/hashlib.rst:750 -msgid "PKCS #5: Password-Based Cryptography Specification Version 2.0" +#: library/hashlib.rst:801 +#, fuzzy +msgid "PKCS #5: Password-Based Cryptography Specification Version 2.1" msgstr "PKCS #5: Password-Based Cryptography Specification Version 2.0" + +#: library/hashlib.rst:803 +msgid "" +"https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf" +msgstr "" + +#: library/hashlib.rst:804 +msgid "NIST Recommendation for Password-Based Key Derivation." +msgstr "" + +#~ msgid "" +#~ "The number of *iterations* should be chosen based on the hash algorithm " +#~ "and computing power. As of 2013, at least 100,000 iterations of SHA-256 " +#~ "are suggested." +#~ msgstr "" +#~ "Le nombre d'*iterations* doit être choisi sur la base de l'algorithme de " +#~ "hachage et de la puissance de calcul. En 2013, au moins 100000 itérations " +#~ "de SHA-256 sont recommandées." + +#~ msgid ":ref:`Availability `: OpenSSL 1.1+." +#~ msgstr ":ref:`Disponibilité ` : OpenSSL 1.1+." diff --git a/library/heapq.po b/library/heapq.po index d37c5df78a..1b0118ad66 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" "PO-Revision-Date: 2021-05-10 23:09+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -295,9 +295,9 @@ msgid "" "A `priority queue `_ is common " "use for a heap, and it presents several implementation challenges:" msgstr "" -"Une `file de priorité `_ est une application courante des tas et présente plusieurs défis " -"d'implémentation :" +"Une `file de priorité `_ est une application courante des tas et présente " +"plusieurs défis d'implémentation :" #: library/heapq.rst:172 msgid "" @@ -415,17 +415,17 @@ msgid "" "two cells it tops contain three different items, but the top cell \"wins\" " "over the two topped cells." msgstr "" -"Dans l'arbre ci-dessus, chaque nœud *k* a pour enfants ``2*k+1`` et ``2*k" -"+2``. Dans les tournois binaires habituels dans les compétitions sportives, " -"chaque nœud est le vainqueur des deux nœuds inférieurs et nous pouvons " -"tracer le chemin du vainqueur le long de l'arbre afin de voir qui étaient " -"ses adversaires. Cependant, dans de nombreuses applications informatiques de " -"ces tournois, nous n'avons pas besoin de produire l'historique du vainqueur. " -"Afin d'occuper moins de mémoire, on remplace le vainqueur lors de sa " -"promotion par un autre élément à un plus bas niveau. La règle devient alors " -"qu'un nœud et les deux nœuds qu'il chapeaute contiennent trois éléments " -"différents, mais le nœud supérieur « gagne » contre les deux nœuds " -"inférieurs." +"Dans l'arbre ci-dessus, chaque nœud *k* a pour enfants ``2*k+1`` et " +"``2*k+2``. Dans les tournois binaires habituels dans les compétitions " +"sportives, chaque nœud est le vainqueur des deux nœuds inférieurs et nous " +"pouvons tracer le chemin du vainqueur le long de l'arbre afin de voir qui " +"étaient ses adversaires. Cependant, dans de nombreuses applications " +"informatiques de ces tournois, nous n'avons pas besoin de produire " +"l'historique du vainqueur. Afin d'occuper moins de mémoire, on remplace le " +"vainqueur lors de sa promotion par un autre élément à un plus bas niveau. La " +"règle devient alors qu'un nœud et les deux nœuds qu'il chapeaute contiennent " +"trois éléments différents, mais le nœud supérieur « gagne » contre les deux " +"nœuds inférieurs." #: library/heapq.rst:268 msgid "" @@ -450,13 +450,13 @@ msgstr "" #: library/heapq.rst:275 msgid "" "A nice feature of this sort is that you can efficiently insert new items " -"while the sort is going on, provided that the inserted items are not \"better" -"\" than the last 0'th element you extracted. This is especially useful in " -"simulation contexts, where the tree holds all incoming events, and the \"win" -"\" condition means the smallest scheduled time. When an event schedules " -"other events for execution, they are scheduled into the future, so they can " -"easily go into the heap. So, a heap is a good structure for implementing " -"schedulers (this is what I used for my MIDI sequencer :-)." +"while the sort is going on, provided that the inserted items are not " +"\"better\" than the last 0'th element you extracted. This is especially " +"useful in simulation contexts, where the tree holds all incoming events, and " +"the \"win\" condition means the smallest scheduled time. When an event " +"schedules other events for execution, they are scheduled into the future, so " +"they can easily go into the heap. So, a heap is a good structure for " +"implementing schedulers (this is what I used for my MIDI sequencer :-)." msgstr "" "Une propriété agréable de cet algorithme est qu'il est possible d'insérer " "efficacement de nouveaux éléments en cours de classement, du moment que les " diff --git a/library/html.entities.po b/library/html.entities.po index bf2279fcfe..1c5ffd39b7 100644 --- a/library/html.entities.po +++ b/library/html.entities.po @@ -5,14 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2018-09-27 15:05+0200\n" -"Last-Translator: Bruno Inec \n" +"POT-Creation-Date: 2021-10-21 15:04+0200\n" +"PO-Revision-Date: 2021-11-06 21:41+0100\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0\n" #: library/html.entities.rst:2 msgid ":mod:`html.entities` --- Definitions of HTML general entities" @@ -71,6 +72,9 @@ msgid "Footnotes" msgstr "Notes" #: library/html.entities.rst:47 -msgid "See https://www.w3.org/TR/html5/syntax.html#named-character-references" +msgid "" +"See https://html.spec.whatwg.org/multipage/syntax.html#named-character-" +"references" msgstr "" -"Voir https://www.w3.org/TR/html5/syntax.html#named-character-references" +"Voir https://html.spec.whatwg.org/multipage/syntax.html#named-character-" +"references" diff --git a/library/html.parser.po b/library/html.parser.po index 286c674277..cc13493d1d 100644 --- a/library/html.parser.po +++ b/library/html.parser.po @@ -5,23 +5,23 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2022-03-23 18:39+0100\n" +"PO-Revision-Date: 2022-05-08 09:48+0200\n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Last-Translator: Thierry Pellé \n" +"X-Generator: Poedit 2.2.1\n" #: library/html.parser.rst:2 msgid ":mod:`html.parser` --- Simple HTML and XHTML parser" -msgstr "" +msgstr ":mod:`html.parser`— Un analyseur syntaxique simple pour HTML et XHTML" #: library/html.parser.rst:7 -#, fuzzy msgid "**Source code:** :source:`Lib/html/parser.py`" -msgstr "**Code source :** :source:`Lib/email/parser.py`" +msgstr "**Code source :** :source:`Lib/html/parser.py`" #: library/html.parser.rst:15 msgid "" @@ -29,10 +29,17 @@ msgid "" "for parsing text files formatted in HTML (HyperText Mark-up Language) and " "XHTML." msgstr "" +"Ce module définit une classe :class:`HTMLParser` qui sert de base pour " +"l'analyse syntaxique de fichiers texte formatés HTML (*HyperText Mark-up " +"Language*, le « langage de balisage hypertexte ») et XHTML (*EXtensible " +"HyperText Markup Language*, le « langage extensible de balisage " +"hypertexte »)." #: library/html.parser.rst:20 msgid "Create a parser instance able to parse invalid markup." msgstr "" +"Crée une instance d'analyseur capable de traiter tout balisage, même " +"invalide." #: library/html.parser.rst:22 msgid "" @@ -40,6 +47,9 @@ msgid "" "(except the ones in ``script``/``style`` elements) are automatically " "converted to the corresponding Unicode characters." msgstr "" +"Si *convert_charrefs* est ``True`` (valeur par défaut), toute référence de " +"caractère (sauf ceux enchâssés dans des éléments ``script``/``style``) est " +"automatiquement convertie en son caractère Unicode." #: library/html.parser.rst:26 msgid "" @@ -48,6 +58,11 @@ msgid "" "encountered. The user should subclass :class:`.HTMLParser` and override its " "methods to implement the desired behavior." msgstr "" +"Une instance de :class:`.HTMLParser` est alimentée par des données HTML. " +"Elle fait appel à des méthodes offrant un traitement spécifique quand est " +"rencontré un élément de balisage : balise ouvrante ou fermante, textes, " +"commentaires… Pour implémenter le comportement désiré, l'utilisateur crée " +"une sous-classe de :class:`.HTMLParser` en surchargeant ses méthodes." #: library/html.parser.rst:31 msgid "" @@ -55,18 +70,22 @@ msgid "" "tag handler for elements which are closed implicitly by closing an outer " "element." msgstr "" +"Cet analyseur ne vérifie ni que les balises fermantes correspondent aux " +"balises ouvrantes, ni n'invoque le gestionnaire de balises fermantes pour " +"les éléments implicitement fermés par un élément extérieur." #: library/html.parser.rst:34 msgid "*convert_charrefs* keyword argument added." -msgstr "" +msgstr "L'argument *convert_charrefs* a été ajouté." #: library/html.parser.rst:37 msgid "The default value for argument *convert_charrefs* is now ``True``." msgstr "" +"La valeur par défaut de l'argument *convert_charrefs* est désormais ``True``." #: library/html.parser.rst:42 msgid "Example HTML Parser Application" -msgstr "" +msgstr "Exemple d'application de l'analyseur HTML" #: library/html.parser.rst:44 msgid "" @@ -74,20 +93,22 @@ msgid "" "`HTMLParser` class to print out start tags, end tags, and data as they are " "encountered::" msgstr "" +"Comme exemple simple, un analyseur HTML minimal qui utilise la classe :class:" +"`HTMLParser` pour afficher les balises ouvrantes, les balises fermantes " +"ainsi que les données quand elles apparaissent ::" #: library/html.parser.rst:64 msgid "The output will then be:" -msgstr "" +msgstr "La sortie est alors :" #: library/html.parser.rst:83 msgid ":class:`.HTMLParser` Methods" -msgstr "" +msgstr "Méthodes de la classe :class:`.HTMLParser`" #: library/html.parser.rst:85 -#, fuzzy msgid ":class:`HTMLParser` instances have the following methods:" msgstr "" -"Les instances de :class:`!HTMLCalendar` utilisent les méthodes suivantes :" +"Les instances de :class:`HTMLParser` disposent des méthodes suivantes :" #: library/html.parser.rst:90 msgid "" @@ -95,6 +116,11 @@ msgid "" "complete elements; incomplete data is buffered until more data is fed or :" "meth:`close` is called. *data* must be :class:`str`." msgstr "" +"Alimente l'analyseur avec du texte. Ce texte est traité dans la mesure où il " +"constitue des éléments complets ; les données incomplètes sont mises dans un " +"tampon jusqu'à ce que d'autres données soient fournies ou que la méthode :" +"meth:`close` soit appelée. L'argument *data* doit être de classe :class:" +"`str`." #: library/html.parser.rst:97 msgid "" @@ -103,24 +129,39 @@ msgid "" "additional processing at the end of the input, but the redefined version " "should always call the :class:`HTMLParser` base class method :meth:`close`." msgstr "" +"Force le traitement de toutes les données du tampon comme si elles étaient " +"suivies par un caractère *fin de fichier*. Cette méthode peut-être redéfinie " +"par une classe dérivée pour ajouter des traitements supplémentaires à la fin " +"de l'entrée, mais la version redéfinie devra impérativement appeler la " +"méthode :meth:`close` de la classe de base :class:`HTMLParser`." #: library/html.parser.rst:105 msgid "" "Reset the instance. Loses all unprocessed data. This is called implicitly " "at instantiation time." msgstr "" +"Réinitialise l'instance. Toutes les données non traitées sont perdues. Cette " +"méthode est appelée implicitement lors de l'instanciation." #: library/html.parser.rst:111 msgid "Return current line number and offset." msgstr "" +"Renvoie le numéro de ligne et le numéro du caractère dans la ligne où le " +"curseur est positionné." #: library/html.parser.rst:116 +#, fuzzy msgid "" "Return the text of the most recently opened start tag. This should not " "normally be needed for structured processing, but may be useful in dealing " "with HTML \"as deployed\" or for re-generating input with minimal changes " "(whitespace between attributes can be preserved, etc.)." msgstr "" +"Renvoie le texte de la dernière balise ouverte. Pour un traitement " +"structuré, ce ne devrait jamais être nécessaire, mais peut s'avérer utile " +"pour traiter un code HTML de mauvaise qualité (tel qu'on en trouve souvent) " +"ou pour ré-générer la balise avec des changements mineurs (les espaces entre " +"les attributs pouvant être préservés, etc. …)." #: library/html.parser.rst:122 msgid "" @@ -129,12 +170,18 @@ msgid "" "class implementations do nothing (except for :meth:`~HTMLParser." "handle_startendtag`):" msgstr "" +"Les méthodes suivantes sont appelées lors de la rencontre de données ou " +"d'éléments de balisage ; elles sont destinées à être surchargées par la sous-" +"classe. L'implémentation de la classe de base ne fait rien (sauf pour ce qui " +"est de :meth:`~HTMLParser.handle_startendtag`) :" #: library/html.parser.rst:129 msgid "" -"This method is called to handle the start of a tag (e.g. ``
``)." +"This method is called to handle the start tag of an element (e.g. ``
``)." msgstr "" +"Cette méthode est appelée pour traiter une balise ouvrante (p. ex. ``
``)." #: library/html.parser.rst:131 msgid "" @@ -144,6 +191,12 @@ msgid "" "translated to lower case, and quotes in the *value* have been removed, and " "character and entity references have been replaced." msgstr "" +"L'argument *tag* contient le nom de la balise en minuscules. L'argument " +"*attrs* contient une liste de *n-uplets* ``(name, value)`` regroupant les " +"attributs présents entre les symboles ``<`` et ``>`` de la balise. Le " +"paramètre *name* est converti en minuscule ; les guillemets sont supprimés " +"du paramètre *value* et toute entité de référence ou de caractère est " +"remplacée." #: library/html.parser.rst:137 msgid "" @@ -151,21 +204,28 @@ msgid "" "would be called as ``handle_starttag('a', [('href', 'https://www.cwi." "nl/')])``." msgstr "" +"Par exemple, pour la balise ````, cette " +"méthode est appelée par ``handle_starttag('a', [('href', 'https://www.cwi." +"nl/')])``." #: library/html.parser.rst:140 msgid "" "All entity references from :mod:`html.entities` are replaced in the " "attribute values." msgstr "" +"Toute référence d'entité présente dans :mod:`html.entities` est remplacée " +"dans la valeur des attributs." #: library/html.parser.rst:146 msgid "" "This method is called to handle the end tag of an element (e.g. ``
``)." msgstr "" +"Cette méthode est appelée pour traiter les balises fermantes (p. ex. ````)." #: library/html.parser.rst:148 msgid "The *tag* argument is the name of the tag converted to lower case." -msgstr "" +msgstr "L'argument *tag* est le nom de la balise en minuscules." #: library/html.parser.rst:153 msgid "" @@ -175,12 +235,20 @@ msgid "" "implementation simply calls :meth:`handle_starttag` and :meth:" "`handle_endtag`." msgstr "" +"Traitée de façon similaire à :meth:`handle_starttag`, mais appelée quand " +"l'analyseur rencontre une balise vide de type *XHTML* (p. ex. ````). Cette méthode peut-être surchargée par les sous-classes demandant " +"cette information lexicale ; l'implémentation par défaut appelle simplement :" +"meth:`handle_starttag` et :meth:`handle_endtag`." #: library/html.parser.rst:161 msgid "" "This method is called to process arbitrary data (e.g. text nodes and the " "content of ```` and ````)." msgstr "" +"Cette méthode est appelée pour traiter toute donnée arbitraire (p. ex. les " +"nœuds textuels ou les contenus de ```` et ``