From e88d9a77c489f0404f025a54b43c5bb98515de66 Mon Sep 17 00:00:00 2001 From: ltdrobot Date: Mon, 20 Jul 2026 11:50:09 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20pot(main):=20update=20.pot=20fro?= =?UTF-8?q?m=20Sphinx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated .pot files for 'main' version from Sphinx. Before: { "branch": "main", "commit": { "date": "2026-06-22 15:11:24 +0100", "hash": "f928475886ee36f0b6d10300a79578d2750590be", "title": "gh-151866: Remove unneeded `zlib` dependency in `test_zipfile.test_core` (#135631)" } } After: { "branch": "main", "commit": { "date": "2026-07-20 12:28:06 +0100", "hash": "85ab1125f47a05ae3c43bee917e086761784ad4d", "title": "gh-152433: Alternate implementation of _winapi.GetVersion for modern API sets (GH-152694)" } } Created by the GitHub Workflow: - File: https://github.com/localizethedocs/python-docs-l10n/actions/workflows/ci-sphinx-update-pot.yml - Run: https://github.com/localizethedocs/python-docs-l10n/actions/runs/29737349024 - Job: https://github.com/localizethedocs/python-docs-l10n/actions/runs/29737349024/job/88340696075 --- main/locale/pot/LC_MESSAGES/c-api/bytes.pot | 125 +- main/locale/pot/LC_MESSAGES/c-api/dict.pot | 6 +- .../pot/LC_MESSAGES/c-api/exceptions.pot | 461 +-- .../LC_MESSAGES/c-api/extension-modules.pot | 129 +- main/locale/pot/LC_MESSAGES/c-api/float.pot | 22 +- main/locale/pot/LC_MESSAGES/c-api/frame.pot | 50 +- main/locale/pot/LC_MESSAGES/c-api/gen.pot | 26 +- main/locale/pot/LC_MESSAGES/c-api/import.pot | 49 +- main/locale/pot/LC_MESSAGES/c-api/intro.pot | 166 +- .../pot/LC_MESSAGES/c-api/lifecycle.pot | 84 +- main/locale/pot/LC_MESSAGES/c-api/list.pot | 53 +- main/locale/pot/LC_MESSAGES/c-api/module.pot | 21 +- .../locale/pot/LC_MESSAGES/c-api/sequence.pot | 6 +- main/locale/pot/LC_MESSAGES/c-api/threads.pot | 383 +- main/locale/pot/LC_MESSAGES/c-api/tuple.pot | 77 +- main/locale/pot/LC_MESSAGES/c-api/type.pot | 7 +- main/locale/pot/LC_MESSAGES/c-api/typeobj.pot | 4 +- main/locale/pot/LC_MESSAGES/c-api/unicode.pot | 500 +-- .../locale/pot/LC_MESSAGES/c-api/veryhigh.pot | 139 +- .../pot/LC_MESSAGES/deprecations/index.pot | 45 +- .../deprecations/pending-removal-in-3.16.pot | 14 +- .../deprecations/pending-removal-in-3.17.pot | 15 +- .../deprecations/pending-removal-in-3.19.pot | 14 +- .../deprecations/pending-removal-in-3.21.pot | 23 +- .../pot/LC_MESSAGES/extending/extending.pot | 211 +- main/locale/pot/LC_MESSAGES/faq/design.pot | 192 +- main/locale/pot/LC_MESSAGES/glossary.pot | 134 +- .../pot/LC_MESSAGES/howto/abi3t-migration.pot | 250 +- main/locale/pot/LC_MESSAGES/howto/curses.pot | 7 +- main/locale/pot/LC_MESSAGES/howto/mro.pot | 4 +- main/locale/pot/LC_MESSAGES/library/ast.pot | 4 +- .../LC_MESSAGES/library/asyncio-eventloop.pot | 973 ++--- .../pot/LC_MESSAGES/library/asyncio-graph.pot | 65 +- .../library/asyncio-llapi-index.pot | 46 +- .../LC_MESSAGES/library/asyncio-platforms.pot | 56 +- .../pot/LC_MESSAGES/library/asyncio-queue.pot | 70 +- .../LC_MESSAGES/library/asyncio-runner.pot | 74 +- .../pot/LC_MESSAGES/library/asyncio-task.pot | 219 +- .../pot/LC_MESSAGES/library/asyncio-tools.pot | 115 + .../pot/LC_MESSAGES/library/asyncio.pot | 49 +- .../pot/LC_MESSAGES/library/calendar.pot | 4 +- .../locale/pot/LC_MESSAGES/library/codecs.pot | 747 ++-- .../LC_MESSAGES/library/compression.zstd.pot | 6 +- .../library/concurrent.futures.pot | 30 +- .../library/concurrent.interpreters.pot | 6 +- main/locale/pot/LC_MESSAGES/library/csv.pot | 206 +- .../locale/pot/LC_MESSAGES/library/ctypes.pot | 942 ++--- .../pot/LC_MESSAGES/library/curses.ascii.pot | 51 +- .../pot/LC_MESSAGES/library/curses.panel.pot | 67 +- .../locale/pot/LC_MESSAGES/library/curses.pot | 3078 +++++++++------ .../pot/LC_MESSAGES/library/datatypes.pot | 13 +- .../locale/pot/LC_MESSAGES/library/dialog.pot | 221 +- .../pot/LC_MESSAGES/library/difflib.pot | 242 +- main/locale/pot/LC_MESSAGES/library/dis.pot | 768 ++-- .../pot/LC_MESSAGES/library/email.utils.pot | 53 +- .../pot/LC_MESSAGES/library/filecmp.pot | 6 +- .../pot/LC_MESSAGES/library/functions.pot | 669 ++-- .../locale/pot/LC_MESSAGES/library/getopt.pot | 45 +- main/locale/pot/LC_MESSAGES/library/glob.pot | 62 +- .../pot/LC_MESSAGES/library/hashlib.pot | 323 +- .../pot/LC_MESSAGES/library/http.client.pot | 74 +- .../LC_MESSAGES/library/http.cookiejar.pot | 398 +- .../pot/LC_MESSAGES/library/http.server.pot | 308 +- .../pot/LC_MESSAGES/library/imaplib.pot | 518 ++- .../pot/LC_MESSAGES/library/inspect.pot | 474 +-- main/locale/pot/LC_MESSAGES/library/io.pot | 235 +- .../pot/LC_MESSAGES/library/ipaddress.pot | 115 +- .../pot/LC_MESSAGES/library/itertools.pot | 146 +- .../locale/pot/LC_MESSAGES/library/locale.pot | 144 +- main/locale/pot/LC_MESSAGES/library/lzma.pot | 316 +- .../pot/LC_MESSAGES/library/mimetypes.pot | 97 +- .../pot/LC_MESSAGES/library/numbers.pot | 29 +- main/locale/pot/LC_MESSAGES/library/os.pot | 1982 +++++----- main/locale/pot/LC_MESSAGES/library/queue.pot | 10 +- main/locale/pot/LC_MESSAGES/library/re.pot | 873 +++-- .../pot/LC_MESSAGES/library/secrets.pot | 8 +- .../locale/pot/LC_MESSAGES/library/shutil.pot | 355 +- .../pot/LC_MESSAGES/library/stdtypes.pot | 1965 +++++----- .../locale/pot/LC_MESSAGES/library/string.pot | 22 +- .../locale/pot/LC_MESSAGES/library/struct.pot | 436 ++- .../pot/LC_MESSAGES/library/symtable.pot | 137 +- main/locale/pot/LC_MESSAGES/library/sys.pot | 76 +- .../pot/LC_MESSAGES/library/tarfile.pot | 118 +- .../pot/LC_MESSAGES/library/tempfile.pot | 209 +- .../pot/LC_MESSAGES/library/tkinter.dnd.pot | 47 +- .../pot/LC_MESSAGES/library/tkinter.font.pot | 111 +- .../library/tkinter.fontchooser.pot | 150 + .../library/tkinter.messagebox.pot | 89 +- .../pot/LC_MESSAGES/library/tkinter.pot | 3337 +++++++++-------- .../library/tkinter.scrolledtext.pot | 21 +- .../LC_MESSAGES/library/tkinter.systray.pot | 106 + .../pot/LC_MESSAGES/library/tkinter.ttk.pot | 1179 +++--- .../pot/LC_MESSAGES/library/unittest.mock.pot | 6 +- .../pot/LC_MESSAGES/library/urllib.parse.pot | 350 +- .../LC_MESSAGES/library/urllib.request.pot | 55 +- .../library/urllib.robotparser.pot | 39 +- main/locale/pot/LC_MESSAGES/library/uu.pot | 9 +- main/locale/pot/LC_MESSAGES/library/wave.pot | 86 +- .../pot/LC_MESSAGES/library/weakref.pot | 154 +- .../LC_MESSAGES/reference/compound_stmts.pot | 13 +- .../pot/LC_MESSAGES/reference/expressions.pot | 1132 +++--- .../pot/LC_MESSAGES/reference/import.pot | 136 +- .../pot/LC_MESSAGES/tutorial/introduction.pot | 19 +- .../pot/LC_MESSAGES/using/configure.pot | 387 +- main/locale/pot/LC_MESSAGES/using/windows.pot | 1059 +++--- main/locale/pot/LC_MESSAGES/whatsnew/2.4.pot | 708 ++-- main/locale/pot/LC_MESSAGES/whatsnew/2.5.pot | 960 ++--- main/locale/pot/LC_MESSAGES/whatsnew/3.12.pot | 57 +- main/locale/pot/LC_MESSAGES/whatsnew/3.13.pot | 57 +- main/locale/pot/LC_MESSAGES/whatsnew/3.14.pot | 167 +- main/locale/pot/LC_MESSAGES/whatsnew/3.15.pot | 787 ++-- main/locale/pot/LC_MESSAGES/whatsnew/3.16.pot | 730 +++- main/references.json | 6 +- 113 files changed, 18729 insertions(+), 14700 deletions(-) create mode 100644 main/locale/pot/LC_MESSAGES/library/asyncio-tools.pot create mode 100644 main/locale/pot/LC_MESSAGES/library/tkinter.fontchooser.pot create mode 100644 main/locale/pot/LC_MESSAGES/library/tkinter.systray.pot diff --git a/main/locale/pot/LC_MESSAGES/c-api/bytes.pot b/main/locale/pot/LC_MESSAGES/c-api/bytes.pot index 504ceb6e401..fb716a009ca 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/bytes.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/bytes.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -312,55 +312,56 @@ msgstr "" #: ../../../c-api/bytes.rst:186 msgid "" "Create a new bytes object in *\\*bytes* containing the contents of *newpart* " -"appended to *bytes*; the caller will own the new reference. The reference " -"to the old value of *bytes* will be stolen. If the new object cannot be " -"created, the old reference to *bytes* will still be discarded and the value " -"of *\\*bytes* will be set to ``NULL``; the appropriate exception will be set." +"appended to *bytes*; the caller will own the new reference. The reference to " +"the old value of *bytes* will be \":term:`stolen `\". If the new " +"object cannot be created, the old reference to *bytes* will still be " +"\"stolen\", the value of *\\*bytes* will be set to ``NULL``, and the " +"appropriate exception will be set." msgstr "" -#: ../../../c-api/bytes.rst:193 ../../../c-api/bytes.rst:203 +#: ../../../c-api/bytes.rst:194 ../../../c-api/bytes.rst:204 msgid "" "If *newpart* implements the buffer protocol, then the buffer must not be " "mutated while the new bytes object is being created." msgstr "" -#: ../../../c-api/bytes.rst:198 +#: ../../../c-api/bytes.rst:199 msgid "" "Create a new bytes object in *\\*bytes* containing the contents of *newpart* " "appended to *bytes*. This version releases the :term:`strong reference` to " "*newpart* (i.e. decrements its reference count)." msgstr "" -#: ../../../c-api/bytes.rst:209 +#: ../../../c-api/bytes.rst:210 msgid "Similar to ``sep.join(iterable)`` in Python." msgstr "" -#: ../../../c-api/bytes.rst:211 +#: ../../../c-api/bytes.rst:212 msgid "" "*sep* must be Python :class:`bytes` object. (Note that :c:func:" "`PyUnicode_Join` accepts ``NULL`` separator and treats it as a space, " "whereas :c:func:`PyBytes_Join` doesn't accept ``NULL`` separator.)" msgstr "" -#: ../../../c-api/bytes.rst:216 +#: ../../../c-api/bytes.rst:217 msgid "" "*iterable* must be an iterable object yielding objects that implement the :" "ref:`buffer protocol `." msgstr "" -#: ../../../c-api/bytes.rst:219 +#: ../../../c-api/bytes.rst:220 msgid "" "On success, return a new :class:`bytes` object. On error, set an exception " "and return ``NULL``." msgstr "" -#: ../../../c-api/bytes.rst:225 +#: ../../../c-api/bytes.rst:226 msgid "" "If *iterable* objects implement the buffer protocol, then the buffers must " "not be mutated while the new bytes object is being created." msgstr "" -#: ../../../c-api/bytes.rst:230 +#: ../../../c-api/bytes.rst:231 msgid "" "Resize a bytes object. *newsize* will be the new length of the bytes object. " "You can think of it as creating a new bytes object and destroying the old " @@ -372,23 +373,23 @@ msgid "" "``NULL``, :exc:`MemoryError` is set, and ``-1`` is returned." msgstr "" -#: ../../../c-api/bytes.rst:241 +#: ../../../c-api/bytes.rst:242 msgid "Use the :c:type:`PyBytesWriter` API instead." msgstr "" -#: ../../../c-api/bytes.rst:247 +#: ../../../c-api/bytes.rst:248 msgid "" "Get the string representation of *bytes*. This function is currently used to " "implement :meth:`!bytes.__repr__` in Python." msgstr "" -#: ../../../c-api/bytes.rst:250 +#: ../../../c-api/bytes.rst:251 msgid "" "This function does not do type checking; it is undefined behavior to pass " "*bytes* as a non-bytes object or ``NULL``." msgstr "" -#: ../../../c-api/bytes.rst:253 +#: ../../../c-api/bytes.rst:254 msgid "" "If *smartquotes* is true, the representation will use a double-quoted string " "instead of single-quoted string when single-quotes are present in *bytes*. " @@ -397,234 +398,234 @@ msgid "" "is false." msgstr "" -#: ../../../c-api/bytes.rst:259 +#: ../../../c-api/bytes.rst:260 msgid "" "On success, this function returns a :term:`strong reference` to a :class:" "`str` object containing the representation. On failure, this returns " "``NULL`` with an exception set." msgstr "" -#: ../../../c-api/bytes.rst:266 +#: ../../../c-api/bytes.rst:267 msgid "" "Unescape a backslash-escaped string *s*. *s* must not be ``NULL``. *len* " "must be the size of *s*." msgstr "" -#: ../../../c-api/bytes.rst:269 +#: ../../../c-api/bytes.rst:270 msgid "" "*errors* must be one of ``\"strict\"``, ``\"replace\"``, or ``\"ignore\"``. " "If *errors* is ``NULL``, then ``\"strict\"`` is used by default." msgstr "" -#: ../../../c-api/bytes.rst:272 +#: ../../../c-api/bytes.rst:273 msgid "" "On success, this function returns a :term:`strong reference` to a Python :" "class:`bytes` object containing the unescaped string. On failure, this " "function returns ``NULL`` with an exception set." msgstr "" -#: ../../../c-api/bytes.rst:276 +#: ../../../c-api/bytes.rst:277 msgid "*unicode* and *recode_encoding* are now unused." msgstr "" -#: ../../../c-api/bytes.rst:283 +#: ../../../c-api/bytes.rst:284 msgid "PyBytesWriter" msgstr "" -#: ../../../c-api/bytes.rst:285 +#: ../../../c-api/bytes.rst:286 msgid "" "The :c:type:`PyBytesWriter` API can be used to create a Python :class:" "`bytes` object." msgstr "" -#: ../../../c-api/bytes.rst:292 +#: ../../../c-api/bytes.rst:293 msgid "A bytes writer instance." msgstr "" -#: ../../../c-api/bytes.rst:294 +#: ../../../c-api/bytes.rst:295 msgid "" "The API is **not thread safe**: a writer should only be used by a single " "thread at the same time." msgstr "" -#: ../../../c-api/bytes.rst:297 +#: ../../../c-api/bytes.rst:298 msgid "" "The instance must be destroyed by :c:func:`PyBytesWriter_Finish` on success, " "or :c:func:`PyBytesWriter_Discard` on error." msgstr "" -#: ../../../c-api/bytes.rst:302 +#: ../../../c-api/bytes.rst:303 msgid "Create, Finish, Discard" msgstr "" -#: ../../../c-api/bytes.rst:306 +#: ../../../c-api/bytes.rst:307 msgid "Create a :c:type:`PyBytesWriter` to write *size* bytes." msgstr "" -#: ../../../c-api/bytes.rst:308 +#: ../../../c-api/bytes.rst:309 msgid "" "If *size* is greater than zero, allocate *size* bytes, and set the writer " "size to *size*. The caller is responsible to write *size* bytes using :c:" "func:`PyBytesWriter_GetData`. This function does not overallocate." msgstr "" -#: ../../../c-api/bytes.rst:313 ../../../c-api/bytes.rst:442 +#: ../../../c-api/bytes.rst:314 ../../../c-api/bytes.rst:443 msgid "On error, set an exception and return ``NULL``." msgstr "" -#: ../../../c-api/bytes.rst:315 ../../../c-api/bytes.rst:418 +#: ../../../c-api/bytes.rst:316 ../../../c-api/bytes.rst:419 msgid "*size* must be positive or zero." msgstr "" -#: ../../../c-api/bytes.rst:319 +#: ../../../c-api/bytes.rst:320 msgid "" "Finish a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`." msgstr "" -#: ../../../c-api/bytes.rst:322 +#: ../../../c-api/bytes.rst:323 msgid "" "On success, return a Python :class:`bytes` object. On error, set an " "exception and return ``NULL``." msgstr "" -#: ../../../c-api/bytes.rst:325 +#: ../../../c-api/bytes.rst:326 msgid "" "The writer instance is invalid after the call in any case. No API can be " "called on the writer after :c:func:`PyBytesWriter_Finish`." msgstr "" -#: ../../../c-api/bytes.rst:330 +#: ../../../c-api/bytes.rst:331 msgid "" "Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer to *size* " "bytes before creating the :class:`bytes` object." msgstr "" -#: ../../../c-api/bytes.rst:335 +#: ../../../c-api/bytes.rst:336 msgid "" "Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer using *buf* " "pointer before creating the :class:`bytes` object." msgstr "" -#: ../../../c-api/bytes.rst:338 +#: ../../../c-api/bytes.rst:339 msgid "" "Set an exception and return ``NULL`` if *buf* pointer is outside the " "internal buffer bounds." msgstr "" -#: ../../../c-api/bytes.rst:341 ../../../c-api/bytes.rst:446 +#: ../../../c-api/bytes.rst:342 ../../../c-api/bytes.rst:447 msgid "Function pseudo-code::" msgstr "" -#: ../../../c-api/bytes.rst:348 +#: ../../../c-api/bytes.rst:349 msgid "" "Discard a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`." msgstr "" -#: ../../../c-api/bytes.rst:350 +#: ../../../c-api/bytes.rst:351 msgid "Do nothing if *writer* is ``NULL``." msgstr "" -#: ../../../c-api/bytes.rst:352 +#: ../../../c-api/bytes.rst:353 msgid "" "The writer instance is invalid after the call. No API can be called on the " "writer after :c:func:`PyBytesWriter_Discard`." msgstr "" -#: ../../../c-api/bytes.rst:356 +#: ../../../c-api/bytes.rst:357 msgid "High-level API" msgstr "" -#: ../../../c-api/bytes.rst:360 +#: ../../../c-api/bytes.rst:361 msgid "" "Grow the *writer* internal buffer by *size* bytes, write *size* bytes of " "*bytes* at the *writer* end, and add *size* to the *writer* size." msgstr "" -#: ../../../c-api/bytes.rst:364 +#: ../../../c-api/bytes.rst:365 msgid "" "If *size* is equal to ``-1``, call ``strlen(bytes)`` to get the string " "length." msgstr "" -#: ../../../c-api/bytes.rst:367 ../../../c-api/bytes.rst:376 -#: ../../../c-api/bytes.rst:415 ../../../c-api/bytes.rst:428 +#: ../../../c-api/bytes.rst:368 ../../../c-api/bytes.rst:377 +#: ../../../c-api/bytes.rst:416 ../../../c-api/bytes.rst:429 msgid "On success, return ``0``. On error, set an exception and return ``-1``." msgstr "" -#: ../../../c-api/bytes.rst:372 +#: ../../../c-api/bytes.rst:373 msgid "" "Similar to :c:func:`PyBytes_FromFormat`, but write the output directly at " "the writer end. Grow the writer internal buffer on demand. Then add the " "written size to the writer size." msgstr "" -#: ../../../c-api/bytes.rst:381 +#: ../../../c-api/bytes.rst:382 msgid "Getters" msgstr "" -#: ../../../c-api/bytes.rst:385 +#: ../../../c-api/bytes.rst:386 msgid "Get the writer size." msgstr "" -#: ../../../c-api/bytes.rst:387 +#: ../../../c-api/bytes.rst:388 msgid "" "The function does not invalidate pointers returned by :c:func:" "`PyBytesWriter_GetData`." msgstr "" -#: ../../../c-api/bytes.rst:390 ../../../c-api/bytes.rst:400 +#: ../../../c-api/bytes.rst:391 ../../../c-api/bytes.rst:401 msgid "The function cannot fail." msgstr "" -#: ../../../c-api/bytes.rst:394 +#: ../../../c-api/bytes.rst:395 msgid "Get the writer data: start of the internal buffer." msgstr "" -#: ../../../c-api/bytes.rst:396 +#: ../../../c-api/bytes.rst:397 msgid "" "The pointer remains valid until a :c:type:`PyBytesWriter` function other " "than :c:func:`PyBytesWriter_GetData` or :c:func:`PyBytesWriter_GetSize` is " "called on *writer*." msgstr "" -#: ../../../c-api/bytes.rst:404 +#: ../../../c-api/bytes.rst:405 msgid "Low-level API" msgstr "" -#: ../../../c-api/bytes.rst:408 +#: ../../../c-api/bytes.rst:409 msgid "" "Resize the writer to *size* bytes. It can be used to enlarge or to shrink " "the writer. This function typically overallocates to achieve amortized " "performance when resizing multiple times." msgstr "" -#: ../../../c-api/bytes.rst:413 ../../../c-api/bytes.rst:426 +#: ../../../c-api/bytes.rst:414 ../../../c-api/bytes.rst:427 msgid "Newly allocated bytes are left uninitialized." msgstr "" -#: ../../../c-api/bytes.rst:422 +#: ../../../c-api/bytes.rst:423 msgid "" "Resize the writer by adding *grow* bytes to the current writer size. This " "function typically overallocates to achieve amortized performance when " "resizing multiple times." msgstr "" -#: ../../../c-api/bytes.rst:431 +#: ../../../c-api/bytes.rst:432 msgid "*size* can be negative to shrink the writer." msgstr "" -#: ../../../c-api/bytes.rst:435 +#: ../../../c-api/bytes.rst:436 msgid "" "Similar to :c:func:`PyBytesWriter_Grow`, but update also the *buf* pointer." msgstr "" -#: ../../../c-api/bytes.rst:438 +#: ../../../c-api/bytes.rst:439 msgid "" "The *buf* pointer is moved if the internal buffer is moved in memory. The " "*buf* relative position within the internal buffer is left unchanged." msgstr "" -#: ../../../c-api/bytes.rst:444 +#: ../../../c-api/bytes.rst:445 msgid "*buf* must not be ``NULL``." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/dict.pot b/main/locale/pot/LC_MESSAGES/c-api/dict.pot index 3ce4a22506d..d63a270ce63 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/dict.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/dict.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -129,8 +129,8 @@ msgstr "" msgid "" "Insert *val* into the dictionary *p* with a key of *key*. *key* must be :" "term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return ``0`` " -"on success or ``-1`` on failure. This function *does not* steal a reference " -"to *val*." +"on success or ``-1`` on failure. This function *does not* \":term:`steal`\" " +"a reference to *val*." msgstr "" #: ../../../c-api/dict.rst:121 diff --git a/main/locale/pot/LC_MESSAGES/c-api/exceptions.pot b/main/locale/pot/LC_MESSAGES/c-api/exceptions.pot index 318290872e1..966dc00aae1 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/exceptions.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/exceptions.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -504,7 +504,7 @@ msgid "" "needs to save and restore the error indicator temporarily." msgstr "" -#: ../../../c-api/exceptions.rst:483 ../../../c-api/exceptions.rst:527 +#: ../../../c-api/exceptions.rst:483 ../../../c-api/exceptions.rst:528 msgid "For example::" msgstr "" @@ -517,18 +517,23 @@ msgstr "" #: ../../../c-api/exceptions.rst:501 msgid "" "Set *exc* as the exception currently being raised, clearing the existing " -"exception if one is set." +"exception if one is set. If *exc* is ``NULL``, just clear the existing " +"exception." +msgstr "" + +#: ../../../c-api/exceptions.rst:505 +msgid "*exc* must be a valid exception or ``NULL``." msgstr "" -#: ../../../c-api/exceptions.rst:506 -msgid "This call steals a reference to *exc*, which must be a valid exception." +#: ../../../c-api/exceptions.rst:507 +msgid "This call \":term:`steals `\" a reference to *exc*." msgstr "" -#: ../../../c-api/exceptions.rst:515 +#: ../../../c-api/exceptions.rst:516 msgid "Use :c:func:`PyErr_GetRaisedException` instead." msgstr "" -#: ../../../c-api/exceptions.rst:517 +#: ../../../c-api/exceptions.rst:518 msgid "" "Retrieve the error indicator into three variables whose addresses are " "passed. If the error indicator is not set, set all three variables to " @@ -537,17 +542,17 @@ msgid "" "the type object is not." msgstr "" -#: ../../../c-api/exceptions.rst:524 +#: ../../../c-api/exceptions.rst:525 msgid "" "This function is normally only used by legacy code that needs to catch " "exceptions or save and restore the error indicator temporarily." msgstr "" -#: ../../../c-api/exceptions.rst:543 +#: ../../../c-api/exceptions.rst:544 msgid "Use :c:func:`PyErr_SetRaisedException` instead." msgstr "" -#: ../../../c-api/exceptions.rst:545 +#: ../../../c-api/exceptions.rst:546 msgid "" "Set the error indicator from the three objects, *type*, *value*, and " "*traceback*, clearing the existing exception if one is set. If the objects " @@ -560,20 +565,20 @@ msgid "" "don't use this function. I warned you.)" msgstr "" -#: ../../../c-api/exceptions.rst:559 +#: ../../../c-api/exceptions.rst:560 msgid "" "This function is normally only used by legacy 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:568 +#: ../../../c-api/exceptions.rst:569 msgid "" "Use :c:func:`PyErr_GetRaisedException` instead, to avoid any possible de-" "normalization." msgstr "" -#: ../../../c-api/exceptions.rst:571 +#: ../../../c-api/exceptions.rst:572 msgid "" "Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` " "below can be \"unnormalized\", meaning that ``*exc`` is a class object but " @@ -583,14 +588,14 @@ msgid "" "improve performance." msgstr "" -#: ../../../c-api/exceptions.rst:579 +#: ../../../c-api/exceptions.rst:580 msgid "" "This function *does not* implicitly set the :attr:`~BaseException." "__traceback__` attribute on the exception value. If setting the traceback " "appropriately is desired, the following additional snippet is needed::" msgstr "" -#: ../../../c-api/exceptions.rst:591 +#: ../../../c-api/exceptions.rst:592 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 " @@ -598,7 +603,7 @@ msgid "" "or ``NULL``. Does not modify the interpreter's exception state." msgstr "" -#: ../../../c-api/exceptions.rst:598 +#: ../../../c-api/exceptions.rst:599 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 " @@ -606,14 +611,14 @@ msgid "" "clear the exception state." msgstr "" -#: ../../../c-api/exceptions.rst:607 +#: ../../../c-api/exceptions.rst:608 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:614 +#: ../../../c-api/exceptions.rst:615 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 " @@ -621,7 +626,7 @@ msgid "" "exception state." msgstr "" -#: ../../../c-api/exceptions.rst:623 +#: ../../../c-api/exceptions.rst:624 msgid "" "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*, " @@ -631,7 +636,7 @@ msgid "" "using :c:func:`PyErr_GetHandledException`." msgstr "" -#: ../../../c-api/exceptions.rst:632 +#: ../../../c-api/exceptions.rst:633 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 " @@ -639,17 +644,17 @@ msgid "" "exception state." msgstr "" -#: ../../../c-api/exceptions.rst:642 +#: ../../../c-api/exceptions.rst:643 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. This function is " -"kept for backwards compatibility. Prefer using :c:func:" -"`PyErr_SetHandledException`." +"raised. This function \":term:`steals `\" the references of the " +"arguments. To clear the 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:651 +#: ../../../c-api/exceptions.rst:653 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 " @@ -657,25 +662,26 @@ msgid "" "state." msgstr "" -#: ../../../c-api/exceptions.rst:658 +#: ../../../c-api/exceptions.rst:660 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." +"argument). The function still \":term:`steals `\" references of all " +"three arguments." msgstr "" -#: ../../../c-api/exceptions.rst:666 +#: ../../../c-api/exceptions.rst:668 msgid "Signal Handling" msgstr "" -#: ../../../c-api/exceptions.rst:676 +#: ../../../c-api/exceptions.rst:678 msgid "" "Handle external interruptions, such as signals or activating a debugger, " "whose processing has been delayed until it is safe to run Python code and/or " "raise exceptions." msgstr "" -#: ../../../c-api/exceptions.rst:680 +#: ../../../c-api/exceptions.rst:682 msgid "" "For example, pressing :kbd:`Ctrl-C` causes a terminal to send the :py:data:" "`signal.SIGINT` signal. This function executes the corresponding Python " @@ -683,92 +689,92 @@ msgid "" "exception." msgstr "" -#: ../../../c-api/exceptions.rst:685 +#: ../../../c-api/exceptions.rst:687 msgid "" ":c:func:`!PyErr_CheckSignals` should be called by long-running C code " "frequently enough so that the response appears immediate to humans." msgstr "" -#: ../../../c-api/exceptions.rst:688 +#: ../../../c-api/exceptions.rst:690 msgid "Handlers invoked by this function currently include:" msgstr "" -#: ../../../c-api/exceptions.rst:690 +#: ../../../c-api/exceptions.rst:692 msgid "" "Signal handlers, including Python functions registered using the :mod:" "`signal` module." msgstr "" -#: ../../../c-api/exceptions.rst:693 +#: ../../../c-api/exceptions.rst:695 msgid "" "Signal handlers are only run in the main thread of the main interpreter." msgstr "" -#: ../../../c-api/exceptions.rst:695 +#: ../../../c-api/exceptions.rst:697 msgid "" "(This is where the function got the name: originally, signals were the only " "way to interrupt the interpreter.)" msgstr "" -#: ../../../c-api/exceptions.rst:698 +#: ../../../c-api/exceptions.rst:700 msgid "Running the garbage collector, if necessary." msgstr "" -#: ../../../c-api/exceptions.rst:700 +#: ../../../c-api/exceptions.rst:702 msgid "Executing a pending :ref:`remote debugger ` script." msgstr "" -#: ../../../c-api/exceptions.rst:702 +#: ../../../c-api/exceptions.rst:704 msgid "Raise the exception set by :c:func:`PyThreadState_SetAsyncExc`." msgstr "" -#: ../../../c-api/exceptions.rst:704 +#: ../../../c-api/exceptions.rst:706 msgid "" "If any handler raises an exception, immediately return ``-1`` with that " "exception set. Any remaining interruptions are left to be processed on the " "next :c:func:`PyErr_CheckSignals()` invocation, if appropriate." msgstr "" -#: ../../../c-api/exceptions.rst:709 +#: ../../../c-api/exceptions.rst:711 msgid "" "If all handlers finish successfully, or there are no handlers to run, return " "``0``." msgstr "" -#: ../../../c-api/exceptions.rst:712 +#: ../../../c-api/exceptions.rst:714 msgid "This function may now invoke the garbage collector." msgstr "" -#: ../../../c-api/exceptions.rst:715 +#: ../../../c-api/exceptions.rst:717 msgid "" "This function may now execute a remote debugger script, if remote debugging " "is enabled." msgstr "" -#: ../../../c-api/exceptions.rst:719 +#: ../../../c-api/exceptions.rst:721 msgid "The exception set by :c:func:`PyThreadState_SetAsyncExc` is now raised." msgstr "" -#: ../../../c-api/exceptions.rst:730 +#: ../../../c-api/exceptions.rst:732 msgid "" "Simulate the effect of a :c:macro:`!SIGINT` signal arriving. This is " "equivalent to ``PyErr_SetInterruptEx(SIGINT)``." msgstr "" -#: ../../../c-api/exceptions.rst:734 ../../../c-api/exceptions.rst:761 +#: ../../../c-api/exceptions.rst:736 ../../../c-api/exceptions.rst:763 msgid "" "This function is async-signal-safe. It can be called without an :term:" "`attached thread state` and from a C signal handler." msgstr "" -#: ../../../c-api/exceptions.rst:744 +#: ../../../c-api/exceptions.rst:746 msgid "" "Simulate the effect of a signal arriving. The next time :c:func:" "`PyErr_CheckSignals` is called, the Python signal handler for the given " "signal number will be called." msgstr "" -#: ../../../c-api/exceptions.rst:748 +#: ../../../c-api/exceptions.rst:750 msgid "" "This function can be called by C code that sets up its own signal handling " "and wants Python signal handlers to be invoked as expected when an " @@ -776,27 +782,27 @@ msgid "" "interrupt an operation)." msgstr "" -#: ../../../c-api/exceptions.rst:753 +#: ../../../c-api/exceptions.rst:755 msgid "" "If the given signal isn't handled by Python (it was set to :py:const:`signal." "SIG_DFL` or :py:const:`signal.SIG_IGN`), it will be ignored." msgstr "" -#: ../../../c-api/exceptions.rst:756 +#: ../../../c-api/exceptions.rst:758 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:769 +#: ../../../c-api/exceptions.rst:771 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:773 +#: ../../../c-api/exceptions.rst:775 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 " @@ -804,15 +810,15 @@ msgid "" "be called from the main thread." msgstr "" -#: ../../../c-api/exceptions.rst:778 +#: ../../../c-api/exceptions.rst:780 msgid "On Windows, the function now also supports socket handles." msgstr "" -#: ../../../c-api/exceptions.rst:783 +#: ../../../c-api/exceptions.rst:785 msgid "Exception Classes" msgstr "" -#: ../../../c-api/exceptions.rst:787 +#: ../../../c-api/exceptions.rst:789 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 " @@ -821,7 +827,7 @@ msgid "" "(accessible in C as :c:data:`PyExc_Exception`)." msgstr "" -#: ../../../c-api/exceptions.rst:793 +#: ../../../c-api/exceptions.rst:795 msgid "" "The :attr:`~type.__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 " @@ -831,28 +837,28 @@ msgid "" "variables and methods." msgstr "" -#: ../../../c-api/exceptions.rst:802 +#: ../../../c-api/exceptions.rst:804 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:811 +#: ../../../c-api/exceptions.rst:813 msgid "" "Return non-zero if *ob* is an exception class, zero otherwise. This function " "always succeeds." msgstr "" -#: ../../../c-api/exceptions.rst:816 +#: ../../../c-api/exceptions.rst:818 msgid "Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*." msgstr "" -#: ../../../c-api/exceptions.rst:821 +#: ../../../c-api/exceptions.rst:823 msgid "This is a macro including the base fields for an exception object." msgstr "" -#: ../../../c-api/exceptions.rst:824 +#: ../../../c-api/exceptions.rst:826 msgid "" "This was included in Python's C API by mistake and is not designed for use " "in extensions. For creating custom exception objects, use :c:func:" @@ -860,34 +866,34 @@ msgid "" "`PyExc_BaseException`." msgstr "" -#: ../../../c-api/exceptions.rst:833 +#: ../../../c-api/exceptions.rst:835 msgid "Exception Objects" msgstr "" -#: ../../../c-api/exceptions.rst:837 +#: ../../../c-api/exceptions.rst:839 msgid "" "Return true if *op* is an instance of :class:`BaseException`, false " "otherwise. This function always succeeds." msgstr "" -#: ../../../c-api/exceptions.rst:843 +#: ../../../c-api/exceptions.rst:845 msgid "Equivalent to :c:func:`Py_TYPE(op) `." msgstr "" -#: ../../../c-api/exceptions.rst:848 +#: ../../../c-api/exceptions.rst:850 msgid "" "Return the traceback associated with the exception as a new reference, as " "accessible from Python through the :attr:`~BaseException.__traceback__` " "attribute. If there is no traceback associated, this returns ``NULL``." msgstr "" -#: ../../../c-api/exceptions.rst:856 +#: ../../../c-api/exceptions.rst:858 msgid "" "Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " "clear it." msgstr "" -#: ../../../c-api/exceptions.rst:862 +#: ../../../c-api/exceptions.rst:864 msgid "" "Return the context (another exception instance during whose handling *ex* " "was raised) associated with the exception as a new reference, as accessible " @@ -895,14 +901,14 @@ msgid "" "there is no context associated, this returns ``NULL``." msgstr "" -#: ../../../c-api/exceptions.rst:870 +#: ../../../c-api/exceptions.rst:872 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*." +"instance. This \":term:`steals `\" a reference to *ctx*." msgstr "" -#: ../../../c-api/exceptions.rst:877 +#: ../../../c-api/exceptions.rst:879 msgid "" "Return the cause (either an exception instance, or ``None``, set by " "``raise ... from ...``) associated with the exception as a new reference, as " @@ -910,28 +916,29 @@ msgid "" "attribute." msgstr "" -#: ../../../c-api/exceptions.rst:885 +#: ../../../c-api/exceptions.rst:887 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 ``None``. This steals a reference to *cause*." +"exception instance or ``None``. This \":term:`steals `\" a reference " +"to *cause*." msgstr "" -#: ../../../c-api/exceptions.rst:889 +#: ../../../c-api/exceptions.rst:892 msgid "" "The :attr:`~BaseException.__suppress_context__` attribute is implicitly set " "to ``True`` by this function." msgstr "" -#: ../../../c-api/exceptions.rst:895 +#: ../../../c-api/exceptions.rst:898 msgid "Return :attr:`~BaseException.args` of exception *ex*." msgstr "" -#: ../../../c-api/exceptions.rst:900 +#: ../../../c-api/exceptions.rst:903 msgid "Set :attr:`~BaseException.args` of exception *ex* to *args*." msgstr "" -#: ../../../c-api/exceptions.rst:904 +#: ../../../c-api/exceptions.rst:907 msgid "" "Implement part of the interpreter's implementation of :keyword:`!except*`. " "*orig* is the original exception that was caught, and *excs* is the list of " @@ -943,98 +950,98 @@ msgid "" "if there is nothing to reraise." msgstr "" -#: ../../../c-api/exceptions.rst:918 +#: ../../../c-api/exceptions.rst:921 msgid "Unicode Exception Objects" msgstr "" -#: ../../../c-api/exceptions.rst:920 +#: ../../../c-api/exceptions.rst:923 msgid "" "The following functions are used to create and modify Unicode exceptions " "from C." msgstr "" -#: ../../../c-api/exceptions.rst:924 +#: ../../../c-api/exceptions.rst:927 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:931 +#: ../../../c-api/exceptions.rst:934 msgid "Return the *encoding* attribute of the given exception object." msgstr "" -#: ../../../c-api/exceptions.rst:937 +#: ../../../c-api/exceptions.rst:940 msgid "Return the *object* attribute of the given exception object." msgstr "" -#: ../../../c-api/exceptions.rst:943 +#: ../../../c-api/exceptions.rst:946 msgid "" "Get the *start* attribute of the given exception object and place it into " "*\\*start*. *start* must not be ``NULL``. Return ``0`` on success, ``-1`` " "on failure." msgstr "" -#: ../../../c-api/exceptions.rst:947 +#: ../../../c-api/exceptions.rst:950 msgid "" "If the :attr:`UnicodeError.object` is an empty sequence, the resulting " "*start* is ``0``. Otherwise, it is clipped to ``[0, len(object) - 1]``." msgstr "" -#: ../../../c-api/exceptions.rst:950 +#: ../../../c-api/exceptions.rst:953 msgid ":attr:`UnicodeError.start`" msgstr "" -#: ../../../c-api/exceptions.rst:956 +#: ../../../c-api/exceptions.rst:959 msgid "" "Set the *start* attribute of the given exception object to *start*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: ../../../c-api/exceptions.rst:961 +#: ../../../c-api/exceptions.rst:964 msgid "" "While passing a negative *start* does not raise an exception, the " "corresponding getters will not consider it as a relative offset." msgstr "" -#: ../../../c-api/exceptions.rst:969 +#: ../../../c-api/exceptions.rst:972 msgid "" "Get the *end* attribute of the given exception object and place it into " "*\\*end*. *end* must not be ``NULL``. Return ``0`` on success, ``-1`` on " "failure." msgstr "" -#: ../../../c-api/exceptions.rst:973 +#: ../../../c-api/exceptions.rst:976 msgid "" "If the :attr:`UnicodeError.object` is an empty sequence, the resulting *end* " "is ``0``. Otherwise, it is clipped to ``[1, len(object)]``." msgstr "" -#: ../../../c-api/exceptions.rst:980 +#: ../../../c-api/exceptions.rst:983 msgid "" "Set the *end* attribute of the given exception object to *end*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: ../../../c-api/exceptions.rst:983 +#: ../../../c-api/exceptions.rst:986 msgid ":attr:`UnicodeError.end`" msgstr "" -#: ../../../c-api/exceptions.rst:989 +#: ../../../c-api/exceptions.rst:992 msgid "Return the *reason* attribute of the given exception object." msgstr "" -#: ../../../c-api/exceptions.rst:995 +#: ../../../c-api/exceptions.rst:998 msgid "" "Set the *reason* attribute of the given exception object to *reason*. " "Return ``0`` on success, ``-1`` on failure." msgstr "" -#: ../../../c-api/exceptions.rst:1002 +#: ../../../c-api/exceptions.rst:1005 msgid "Recursion Control" msgstr "" -#: ../../../c-api/exceptions.rst:1004 +#: ../../../c-api/exceptions.rst:1007 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 " @@ -1044,41 +1051,41 @@ msgid "" "recursion handling." msgstr "" -#: ../../../c-api/exceptions.rst:1013 +#: ../../../c-api/exceptions.rst:1016 msgid "Marks a point where a recursive C-level call is about to be performed." msgstr "" -#: ../../../c-api/exceptions.rst:1015 +#: ../../../c-api/exceptions.rst:1018 msgid "" "The function then checks if the stack 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:1019 +#: ../../../c-api/exceptions.rst:1022 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:1024 +#: ../../../c-api/exceptions.rst:1027 msgid "The :c:func:`PyUnstable_ThreadState_SetStackProtection` function." msgstr "" -#: ../../../c-api/exceptions.rst:1026 ../../../c-api/exceptions.rst:1034 +#: ../../../c-api/exceptions.rst:1029 ../../../c-api/exceptions.rst:1037 msgid "" "This function is now also available in the :ref:`limited API `." msgstr "" -#: ../../../c-api/exceptions.rst:1031 +#: ../../../c-api/exceptions.rst:1034 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:1037 +#: ../../../c-api/exceptions.rst:1040 msgid "" "Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " "requires special recursion handling. In addition to protecting the stack, :" @@ -1087,13 +1094,13 @@ msgid "" "Effectively, these are the C equivalent to :deco:`reprlib.recursive_repr`." msgstr "" -#: ../../../c-api/exceptions.rst:1045 +#: ../../../c-api/exceptions.rst:1048 msgid "" "Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " "implementation to detect cycles." msgstr "" -#: ../../../c-api/exceptions.rst:1048 +#: ../../../c-api/exceptions.rst:1051 msgid "" "If the object has already been processed, the function returns a positive " "integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " @@ -1101,305 +1108,305 @@ msgid "" "`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``." msgstr "" -#: ../../../c-api/exceptions.rst:1054 +#: ../../../c-api/exceptions.rst:1057 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:1058 +#: ../../../c-api/exceptions.rst:1061 msgid "" "Otherwise, the function returns zero and the :c:member:`~PyTypeObject." "tp_repr` implementation can continue normally." msgstr "" -#: ../../../c-api/exceptions.rst:1063 +#: ../../../c-api/exceptions.rst:1066 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:1068 +#: ../../../c-api/exceptions.rst:1071 msgid "" "Get the recursion limit for the current interpreter. It can be set with :c:" "func:`Py_SetRecursionLimit`. The recursion limit prevents the Python " "interpreter stack from growing infinitely." msgstr "" -#: ../../../c-api/exceptions.rst:1072 ../../../c-api/exceptions.rst:1082 +#: ../../../c-api/exceptions.rst:1075 ../../../c-api/exceptions.rst:1085 msgid "" "This function cannot fail, and the caller must hold an :term:`attached " "thread state`." msgstr "" -#: ../../../c-api/exceptions.rst:1076 +#: ../../../c-api/exceptions.rst:1079 msgid ":py:func:`sys.getrecursionlimit`" msgstr "" -#: ../../../c-api/exceptions.rst:1080 +#: ../../../c-api/exceptions.rst:1083 msgid "Set the recursion limit for the current interpreter." msgstr "" -#: ../../../c-api/exceptions.rst:1086 +#: ../../../c-api/exceptions.rst:1089 msgid ":py:func:`sys.setrecursionlimit`" msgstr "" -#: ../../../c-api/exceptions.rst:1091 +#: ../../../c-api/exceptions.rst:1094 msgid "Exception and warning types" msgstr "" -#: ../../../c-api/exceptions.rst:1093 +#: ../../../c-api/exceptions.rst:1096 msgid "" "All standard Python exceptions and warning categories are available as " "global variables whose names are ``PyExc_`` followed by the Python exception " "name. These have the type :c:expr:`PyObject*`; they are all class objects." msgstr "" -#: ../../../c-api/exceptions.rst:1097 +#: ../../../c-api/exceptions.rst:1100 msgid "For completeness, here are all the variables:" msgstr "" -#: ../../../c-api/exceptions.rst:1100 +#: ../../../c-api/exceptions.rst:1103 msgid "Exception types" msgstr "" -#: ../../../c-api/exceptions.rst:1107 ../../../c-api/exceptions.rst:1255 -#: ../../../c-api/exceptions.rst:1285 +#: ../../../c-api/exceptions.rst:1110 ../../../c-api/exceptions.rst:1258 +#: ../../../c-api/exceptions.rst:1288 msgid "C name" msgstr "" -#: ../../../c-api/exceptions.rst:1108 ../../../c-api/exceptions.rst:1256 -#: ../../../c-api/exceptions.rst:1286 +#: ../../../c-api/exceptions.rst:1111 ../../../c-api/exceptions.rst:1259 +#: ../../../c-api/exceptions.rst:1289 msgid "Python name" msgstr "" -#: ../../../c-api/exceptions.rst:1110 +#: ../../../c-api/exceptions.rst:1113 msgid ":exc:`BaseException`" msgstr "" -#: ../../../c-api/exceptions.rst:1112 +#: ../../../c-api/exceptions.rst:1115 msgid ":exc:`BaseExceptionGroup`" msgstr "" -#: ../../../c-api/exceptions.rst:1114 +#: ../../../c-api/exceptions.rst:1117 msgid ":exc:`Exception`" msgstr "" -#: ../../../c-api/exceptions.rst:1116 +#: ../../../c-api/exceptions.rst:1119 msgid ":exc:`ArithmeticError`" msgstr "" -#: ../../../c-api/exceptions.rst:1118 +#: ../../../c-api/exceptions.rst:1121 msgid ":exc:`AssertionError`" msgstr "" -#: ../../../c-api/exceptions.rst:1120 +#: ../../../c-api/exceptions.rst:1123 msgid ":exc:`AttributeError`" msgstr "" -#: ../../../c-api/exceptions.rst:1122 +#: ../../../c-api/exceptions.rst:1125 msgid ":exc:`BlockingIOError`" msgstr "" -#: ../../../c-api/exceptions.rst:1124 +#: ../../../c-api/exceptions.rst:1127 msgid ":exc:`BrokenPipeError`" msgstr "" -#: ../../../c-api/exceptions.rst:1126 +#: ../../../c-api/exceptions.rst:1129 msgid ":exc:`BufferError`" msgstr "" -#: ../../../c-api/exceptions.rst:1128 +#: ../../../c-api/exceptions.rst:1131 msgid ":exc:`ChildProcessError`" msgstr "" -#: ../../../c-api/exceptions.rst:1130 +#: ../../../c-api/exceptions.rst:1133 msgid ":exc:`ConnectionAbortedError`" msgstr "" -#: ../../../c-api/exceptions.rst:1132 +#: ../../../c-api/exceptions.rst:1135 msgid ":exc:`ConnectionError`" msgstr "" -#: ../../../c-api/exceptions.rst:1134 +#: ../../../c-api/exceptions.rst:1137 msgid ":exc:`ConnectionRefusedError`" msgstr "" -#: ../../../c-api/exceptions.rst:1136 +#: ../../../c-api/exceptions.rst:1139 msgid ":exc:`ConnectionResetError`" msgstr "" -#: ../../../c-api/exceptions.rst:1138 +#: ../../../c-api/exceptions.rst:1141 msgid ":exc:`EOFError`" msgstr "" -#: ../../../c-api/exceptions.rst:1140 +#: ../../../c-api/exceptions.rst:1143 msgid ":exc:`FileExistsError`" msgstr "" -#: ../../../c-api/exceptions.rst:1142 +#: ../../../c-api/exceptions.rst:1145 msgid ":exc:`FileNotFoundError`" msgstr "" -#: ../../../c-api/exceptions.rst:1144 +#: ../../../c-api/exceptions.rst:1147 msgid ":exc:`FloatingPointError`" msgstr "" -#: ../../../c-api/exceptions.rst:1146 +#: ../../../c-api/exceptions.rst:1149 msgid ":exc:`GeneratorExit`" msgstr "" -#: ../../../c-api/exceptions.rst:1148 +#: ../../../c-api/exceptions.rst:1151 msgid ":exc:`ImportCycleError`" msgstr "" -#: ../../../c-api/exceptions.rst:1150 +#: ../../../c-api/exceptions.rst:1153 msgid ":exc:`ImportError`" msgstr "" -#: ../../../c-api/exceptions.rst:1152 +#: ../../../c-api/exceptions.rst:1155 msgid ":exc:`IndentationError`" msgstr "" -#: ../../../c-api/exceptions.rst:1154 +#: ../../../c-api/exceptions.rst:1157 msgid ":exc:`IndexError`" msgstr "" -#: ../../../c-api/exceptions.rst:1156 +#: ../../../c-api/exceptions.rst:1159 msgid ":exc:`InterruptedError`" msgstr "" -#: ../../../c-api/exceptions.rst:1158 +#: ../../../c-api/exceptions.rst:1161 msgid ":exc:`IsADirectoryError`" msgstr "" -#: ../../../c-api/exceptions.rst:1160 +#: ../../../c-api/exceptions.rst:1163 msgid ":exc:`KeyError`" msgstr "" -#: ../../../c-api/exceptions.rst:1162 +#: ../../../c-api/exceptions.rst:1165 msgid ":exc:`KeyboardInterrupt`" msgstr "" -#: ../../../c-api/exceptions.rst:1164 +#: ../../../c-api/exceptions.rst:1167 msgid ":exc:`LookupError`" msgstr "" -#: ../../../c-api/exceptions.rst:1166 +#: ../../../c-api/exceptions.rst:1169 msgid ":exc:`MemoryError`" msgstr "" -#: ../../../c-api/exceptions.rst:1168 +#: ../../../c-api/exceptions.rst:1171 msgid ":exc:`ModuleNotFoundError`" msgstr "" -#: ../../../c-api/exceptions.rst:1170 +#: ../../../c-api/exceptions.rst:1173 msgid ":exc:`NameError`" msgstr "" -#: ../../../c-api/exceptions.rst:1172 +#: ../../../c-api/exceptions.rst:1175 msgid ":exc:`NotADirectoryError`" msgstr "" -#: ../../../c-api/exceptions.rst:1174 +#: ../../../c-api/exceptions.rst:1177 msgid ":exc:`NotImplementedError`" msgstr "" -#: ../../../c-api/exceptions.rst:1176 ../../../c-api/exceptions.rst:1259 -#: ../../../c-api/exceptions.rst:1262 ../../../c-api/exceptions.rst:1265 +#: ../../../c-api/exceptions.rst:1179 ../../../c-api/exceptions.rst:1262 +#: ../../../c-api/exceptions.rst:1265 ../../../c-api/exceptions.rst:1268 msgid ":exc:`OSError`" msgstr "" -#: ../../../c-api/exceptions.rst:1178 +#: ../../../c-api/exceptions.rst:1181 msgid ":exc:`OverflowError`" msgstr "" -#: ../../../c-api/exceptions.rst:1180 +#: ../../../c-api/exceptions.rst:1183 msgid ":exc:`PermissionError`" msgstr "" -#: ../../../c-api/exceptions.rst:1182 +#: ../../../c-api/exceptions.rst:1185 msgid ":exc:`ProcessLookupError`" msgstr "" -#: ../../../c-api/exceptions.rst:1184 +#: ../../../c-api/exceptions.rst:1187 msgid ":exc:`PythonFinalizationError`" msgstr "" -#: ../../../c-api/exceptions.rst:1186 +#: ../../../c-api/exceptions.rst:1189 msgid ":exc:`RecursionError`" msgstr "" -#: ../../../c-api/exceptions.rst:1188 +#: ../../../c-api/exceptions.rst:1191 msgid ":exc:`ReferenceError`" msgstr "" -#: ../../../c-api/exceptions.rst:1190 +#: ../../../c-api/exceptions.rst:1193 msgid ":exc:`RuntimeError`" msgstr "" -#: ../../../c-api/exceptions.rst:1192 +#: ../../../c-api/exceptions.rst:1195 msgid ":exc:`StopAsyncIteration`" msgstr "" -#: ../../../c-api/exceptions.rst:1194 +#: ../../../c-api/exceptions.rst:1197 msgid ":exc:`StopIteration`" msgstr "" -#: ../../../c-api/exceptions.rst:1196 +#: ../../../c-api/exceptions.rst:1199 msgid ":exc:`SyntaxError`" msgstr "" -#: ../../../c-api/exceptions.rst:1198 +#: ../../../c-api/exceptions.rst:1201 msgid ":exc:`SystemError`" msgstr "" -#: ../../../c-api/exceptions.rst:1200 +#: ../../../c-api/exceptions.rst:1203 msgid ":exc:`SystemExit`" msgstr "" -#: ../../../c-api/exceptions.rst:1202 +#: ../../../c-api/exceptions.rst:1205 msgid ":exc:`TabError`" msgstr "" -#: ../../../c-api/exceptions.rst:1204 +#: ../../../c-api/exceptions.rst:1207 msgid ":exc:`TimeoutError`" msgstr "" -#: ../../../c-api/exceptions.rst:1206 +#: ../../../c-api/exceptions.rst:1209 msgid ":exc:`TypeError`" msgstr "" -#: ../../../c-api/exceptions.rst:1208 +#: ../../../c-api/exceptions.rst:1211 msgid ":exc:`UnboundLocalError`" msgstr "" -#: ../../../c-api/exceptions.rst:1210 +#: ../../../c-api/exceptions.rst:1213 msgid ":exc:`UnicodeDecodeError`" msgstr "" -#: ../../../c-api/exceptions.rst:1212 +#: ../../../c-api/exceptions.rst:1215 msgid ":exc:`UnicodeEncodeError`" msgstr "" -#: ../../../c-api/exceptions.rst:1214 +#: ../../../c-api/exceptions.rst:1217 msgid ":exc:`UnicodeError`" msgstr "" -#: ../../../c-api/exceptions.rst:1216 +#: ../../../c-api/exceptions.rst:1219 msgid ":exc:`UnicodeTranslateError`" msgstr "" -#: ../../../c-api/exceptions.rst:1218 +#: ../../../c-api/exceptions.rst:1221 msgid ":exc:`ValueError`" msgstr "" -#: ../../../c-api/exceptions.rst:1220 +#: ../../../c-api/exceptions.rst:1223 msgid ":exc:`ZeroDivisionError`" msgstr "" -#: ../../../c-api/exceptions.rst:1222 +#: ../../../c-api/exceptions.rst:1225 msgid "" ":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" "`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" @@ -1411,151 +1418,151 @@ msgid "" "`PyExc_TimeoutError` were introduced following :pep:`3151`." msgstr "" -#: ../../../c-api/exceptions.rst:1232 +#: ../../../c-api/exceptions.rst:1235 msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." msgstr "" -#: ../../../c-api/exceptions.rst:1235 +#: ../../../c-api/exceptions.rst:1238 msgid ":c:data:`PyExc_ModuleNotFoundError`." msgstr "" -#: ../../../c-api/exceptions.rst:1238 +#: ../../../c-api/exceptions.rst:1241 msgid ":c:data:`PyExc_BaseExceptionGroup`." msgstr "" -#: ../../../c-api/exceptions.rst:1243 +#: ../../../c-api/exceptions.rst:1246 msgid "OSError aliases" msgstr "" -#: ../../../c-api/exceptions.rst:1245 +#: ../../../c-api/exceptions.rst:1248 msgid "The following are a compatibility aliases to :c:data:`PyExc_OSError`." msgstr "" -#: ../../../c-api/exceptions.rst:1247 +#: ../../../c-api/exceptions.rst:1250 msgid "These aliases used to be separate exception types." msgstr "" -#: ../../../c-api/exceptions.rst:1257 +#: ../../../c-api/exceptions.rst:1260 msgid "Notes" msgstr "" -#: ../../../c-api/exceptions.rst:1266 +#: ../../../c-api/exceptions.rst:1269 msgid "[win]_" msgstr "" -#: ../../../c-api/exceptions.rst:1268 +#: ../../../c-api/exceptions.rst:1271 msgid "Notes:" msgstr "" -#: ../../../c-api/exceptions.rst:1271 +#: ../../../c-api/exceptions.rst:1274 msgid "" ":c:var:`!PyExc_WindowsError` is only defined on Windows; protect code that " "uses this by testing that the preprocessor macro ``MS_WINDOWS`` is defined." msgstr "" -#: ../../../c-api/exceptions.rst:1278 +#: ../../../c-api/exceptions.rst:1281 msgid "Warning types" msgstr "" -#: ../../../c-api/exceptions.rst:1288 +#: ../../../c-api/exceptions.rst:1291 msgid ":exc:`Warning`" msgstr "" -#: ../../../c-api/exceptions.rst:1290 +#: ../../../c-api/exceptions.rst:1293 msgid ":exc:`BytesWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1292 +#: ../../../c-api/exceptions.rst:1295 msgid ":exc:`DeprecationWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1294 +#: ../../../c-api/exceptions.rst:1297 msgid ":exc:`EncodingWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1296 +#: ../../../c-api/exceptions.rst:1299 msgid ":exc:`FutureWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1298 +#: ../../../c-api/exceptions.rst:1301 msgid ":exc:`ImportWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1300 +#: ../../../c-api/exceptions.rst:1303 msgid ":exc:`PendingDeprecationWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1302 +#: ../../../c-api/exceptions.rst:1305 msgid ":exc:`ResourceWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1304 +#: ../../../c-api/exceptions.rst:1307 msgid ":exc:`RuntimeWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1306 +#: ../../../c-api/exceptions.rst:1309 msgid ":exc:`SyntaxWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1308 +#: ../../../c-api/exceptions.rst:1311 msgid ":exc:`UnicodeWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1310 +#: ../../../c-api/exceptions.rst:1313 msgid ":exc:`UserWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1312 +#: ../../../c-api/exceptions.rst:1315 msgid ":c:data:`PyExc_ResourceWarning`." msgstr "" -#: ../../../c-api/exceptions.rst:1315 +#: ../../../c-api/exceptions.rst:1318 msgid ":c:data:`PyExc_EncodingWarning`." msgstr "" -#: ../../../c-api/exceptions.rst:1320 +#: ../../../c-api/exceptions.rst:1323 msgid "Tracebacks" msgstr "" -#: ../../../c-api/exceptions.rst:1324 +#: ../../../c-api/exceptions.rst:1327 msgid "" "Type object for traceback objects. This is available as :class:`types." "TracebackType` in the Python layer." msgstr "" -#: ../../../c-api/exceptions.rst:1330 +#: ../../../c-api/exceptions.rst:1333 msgid "" "Return true if *op* is a traceback object, false otherwise. This function " "does not account for subtypes." msgstr "" -#: ../../../c-api/exceptions.rst:1336 +#: ../../../c-api/exceptions.rst:1339 msgid "" "Replace the :attr:`~BaseException.__traceback__` attribute on the current " "exception with a new traceback prepending *f* to the existing chain." msgstr "" -#: ../../../c-api/exceptions.rst:1339 +#: ../../../c-api/exceptions.rst:1342 msgid "Calling this function without an exception set is undefined behavior." msgstr "" -#: ../../../c-api/exceptions.rst:1341 ../../../c-api/exceptions.rst:1349 +#: ../../../c-api/exceptions.rst:1344 ../../../c-api/exceptions.rst:1352 msgid "" "This function returns ``0`` on success, and returns ``-1`` with an exception " "set on failure." msgstr "" -#: ../../../c-api/exceptions.rst:1347 +#: ../../../c-api/exceptions.rst:1350 msgid "Write the traceback *tb* into the file *f*." msgstr "" -#: ../../../c-api/exceptions.rst:1354 +#: ../../../c-api/exceptions.rst:1357 msgid "" "Write a trace of the Python stack in *tstate* into the file *fd*. The " "format looks like::" msgstr "" -#: ../../../c-api/exceptions.rst:1363 +#: ../../../c-api/exceptions.rst:1366 msgid "" "This function is meant to debug situations such as segfaults, fatal errors, " "and similar. The file and function names it outputs are encoded to ASCII " @@ -1563,12 +1570,12 @@ msgid "" "first 100 frames; further frames are truncated with the line ``...``." msgstr "" -#: ../../../c-api/exceptions.rst:1368 ../../../c-api/exceptions.rst:1393 +#: ../../../c-api/exceptions.rst:1371 ../../../c-api/exceptions.rst:1396 msgid "" "This function will return ``NULL`` on success, or an error message on error." msgstr "" -#: ../../../c-api/exceptions.rst:1370 ../../../c-api/exceptions.rst:1401 +#: ../../../c-api/exceptions.rst:1373 ../../../c-api/exceptions.rst:1404 msgid "" "This function is intended for use in crash scenarios such as signal handlers " "for SIGSEGV, where the interpreter may be in an inconsistent state. Given " @@ -1576,24 +1583,24 @@ msgid "" "the function might produce incomplete output or it may even crash itself." msgstr "" -#: ../../../c-api/exceptions.rst:1375 +#: ../../../c-api/exceptions.rst:1378 msgid "" "The caller does not need to hold an :term:`attached thread state`, nor does " "*tstate* need to be attached." msgstr "" -#: ../../../c-api/exceptions.rst:1382 +#: ../../../c-api/exceptions.rst:1385 msgid "Write the traces of all Python threads in *interp* into the file *fd*." msgstr "" -#: ../../../c-api/exceptions.rst:1384 +#: ../../../c-api/exceptions.rst:1387 msgid "" "If *interp* is ``NULL`` then this function will try to identify the current " "interpreter using thread-specific storage. If it cannot, it will return an " "error." msgstr "" -#: ../../../c-api/exceptions.rst:1388 +#: ../../../c-api/exceptions.rst:1391 msgid "" "If *current_tstate* is not ``NULL`` then it will be used to identify what " "the current thread is in the written output. If it is ``NULL`` then this " @@ -1602,7 +1609,7 @@ msgid "" "state." msgstr "" -#: ../../../c-api/exceptions.rst:1395 +#: ../../../c-api/exceptions.rst:1398 msgid "" "This function is meant to debug situations such as segfaults, fatal errors, " "and similar. It calls :c:func:`PyUnstable_DumpTraceback` for each thread. It " @@ -1611,13 +1618,13 @@ msgid "" "function will use a default value of 100 for the argument." msgstr "" -#: ../../../c-api/exceptions.rst:1406 +#: ../../../c-api/exceptions.rst:1409 msgid "" "The caller does not need to hold an :term:`attached thread state`, nor does " "*current_tstate* need to be attached." msgstr "" -#: ../../../c-api/exceptions.rst:1410 +#: ../../../c-api/exceptions.rst:1413 msgid "" "On the :term:`free-threaded build`, this function is not thread-safe. If " "another thread deletes its :term:`thread state` while this function is being " @@ -1628,21 +1635,21 @@ msgstr "" msgid "strerror (C function)" msgstr "" -#: ../../../c-api/exceptions.rst:671 ../../../c-api/exceptions.rst:725 -#: ../../../c-api/exceptions.rst:740 +#: ../../../c-api/exceptions.rst:673 ../../../c-api/exceptions.rst:727 +#: ../../../c-api/exceptions.rst:742 msgid "module" msgstr "" -#: ../../../c-api/exceptions.rst:671 ../../../c-api/exceptions.rst:725 -#: ../../../c-api/exceptions.rst:740 +#: ../../../c-api/exceptions.rst:673 ../../../c-api/exceptions.rst:727 +#: ../../../c-api/exceptions.rst:742 msgid "signal" msgstr "" -#: ../../../c-api/exceptions.rst:671 ../../../c-api/exceptions.rst:725 +#: ../../../c-api/exceptions.rst:673 ../../../c-api/exceptions.rst:727 msgid "SIGINT (C macro)" msgstr "" -#: ../../../c-api/exceptions.rst:671 ../../../c-api/exceptions.rst:725 -#: ../../../c-api/exceptions.rst:740 +#: ../../../c-api/exceptions.rst:673 ../../../c-api/exceptions.rst:727 +#: ../../../c-api/exceptions.rst:742 msgid "KeyboardInterrupt (built-in exception)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/extension-modules.pot b/main/locale/pot/LC_MESSAGES/c-api/extension-modules.pot index 8148147a672..03b7c3ce311 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/extension-modules.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/extension-modules.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -110,17 +110,17 @@ msgid "specifies the :c:expr:`PySlot*` return type," msgstr "" #: ../../../c-api/extension-modules.rst:79 -#: ../../../c-api/extension-modules.rst:224 +#: ../../../c-api/extension-modules.rst:248 msgid "adds any special linkage declarations required by the platform, and" msgstr "" #: ../../../c-api/extension-modules.rst:80 -#: ../../../c-api/extension-modules.rst:225 +#: ../../../c-api/extension-modules.rst:249 msgid "for C++, declares the function as ``extern \"C\"``." msgstr "" #: ../../../c-api/extension-modules.rst:82 -#: ../../../c-api/extension-modules.rst:255 +#: ../../../c-api/extension-modules.rst:279 msgid "For example, a module called ``spam`` would be defined like this::" msgstr "" @@ -130,16 +130,39 @@ msgid "" "module's C source." msgstr "" -#: ../../../c-api/extension-modules.rst:103 +#: ../../../c-api/extension-modules.rst:105 msgid "" -"The hook should be kept short -- ideally, one line as above. If you do need " -"to use Python C API in this function, it is recommended to call " -"``PyABIInfo_Check(&abi_info, \"modulename\")`` first to raise an exception, " -"rather than crash, in common cases of ABI mismatch." +"The hook should be kept short. If it does more than ``return`` a static " +"array, several caveats apply:" +msgstr "" + +#: ../../../c-api/extension-modules.rst:108 +msgid "" +"If you need to use any Python C API, it is recommended to call :c:func:" +"`PyABIInfo_Check` first to raise an exception, rather than crash, in common " +"cases of ABI mismatch." msgstr "" #: ../../../c-api/extension-modules.rst:111 msgid "" +"Code in the export hook must never rely on the :term:`GIL`: :term:`free-" +"threaded builds ` of Python can only check the :c:macro:" +"`Py_mod_gil` slot (or the lack of it) after the hook returns," +msgstr "" + +#: ../../../c-api/extension-modules.rst:114 +msgid "" +"Similarly, the hook may be called in any subinterpreter, since the :c:macro:" +"`Py_mod_multiple_interpreters` slot (or lack of it) is only checked after " +"the hook returns." +msgstr "" + +#: ../../../c-api/extension-modules.rst:118 +msgid "For example::" +msgstr "" + +#: ../../../c-api/extension-modules.rst:135 +msgid "" "It is possible to export multiple modules from a single shared library by " "defining multiple export hooks. However, importing them requires a custom " "importer or suitably named copies/links of the extension file, because " @@ -149,21 +172,21 @@ msgid "" "details." msgstr "" -#: ../../../c-api/extension-modules.rst:123 +#: ../../../c-api/extension-modules.rst:147 msgid "Multi-phase initialization" msgstr "" -#: ../../../c-api/extension-modules.rst:125 +#: ../../../c-api/extension-modules.rst:149 msgid "The process of creating an extension module follows several phases:" msgstr "" -#: ../../../c-api/extension-modules.rst:127 +#: ../../../c-api/extension-modules.rst:151 msgid "" "Python finds and calls the export hook to get information on how to create " "the module." msgstr "" -#: ../../../c-api/extension-modules.rst:129 +#: ../../../c-api/extension-modules.rst:153 msgid "" "Before any substantial code is executed, Python can determine which " "capabilities the module supports, and it can adjust the environment or " @@ -172,21 +195,21 @@ msgid "" "this step." msgstr "" -#: ../../../c-api/extension-modules.rst:134 +#: ../../../c-api/extension-modules.rst:158 msgid "" "By default, Python itself then creates the module object -- that is, it does " "the equivalent of calling :py:meth:`~object.__new__` when creating an " "object. This step can be overridden using the :c:data:`Py_mod_create` slot." msgstr "" -#: ../../../c-api/extension-modules.rst:137 +#: ../../../c-api/extension-modules.rst:161 msgid "" "Python sets initial module attributes like :attr:`~module.__package__` and :" "attr:`~module.__loader__`, and inserts the module object into :py:attr:`sys." "modules`." msgstr "" -#: ../../../c-api/extension-modules.rst:140 +#: ../../../c-api/extension-modules.rst:164 msgid "" "Afterwards, the module object is initialized in an extension-specific way -- " "the equivalent of :py:meth:`~object.__init__` when creating an object, or of " @@ -194,7 +217,7 @@ msgid "" "specified using the :c:data:`Py_mod_exec` slot." msgstr "" -#: ../../../c-api/extension-modules.rst:145 +#: ../../../c-api/extension-modules.rst:169 msgid "" "This is called *multi-phase initialization* to distinguish it from the " "legacy (but still supported) :ref:`single-phase initialization ` or after Python runtime reinitialization (:c:func:" @@ -228,7 +251,7 @@ msgid "" "behavior." msgstr "" -#: ../../../c-api/extension-modules.rst:171 +#: ../../../c-api/extension-modules.rst:195 msgid "" "To avoid such issues, each instance of an extension module should be " "*isolated*: changes to one instance should not implicitly affect the others, " @@ -237,13 +260,13 @@ msgid "" "extensions-howto` for more details and a practical guide." msgstr "" -#: ../../../c-api/extension-modules.rst:177 +#: ../../../c-api/extension-modules.rst:201 msgid "" "A simpler way to avoid these issues is :ref:`raising an error on repeated " "initialization `." msgstr "" -#: ../../../c-api/extension-modules.rst:180 +#: ../../../c-api/extension-modules.rst:204 msgid "" "All modules are expected to support :ref:`sub-interpreters `, or otherwise explicitly signal a lack of support. This is usually " @@ -252,23 +275,23 @@ msgid "" "`Py_mod_multiple_interpreters` slot." msgstr "" -#: ../../../c-api/extension-modules.rst:192 +#: ../../../c-api/extension-modules.rst:216 msgid "``PyInit`` function" msgstr "" -#: ../../../c-api/extension-modules.rst:196 +#: ../../../c-api/extension-modules.rst:220 msgid "" "This functionality will not get new features, but there are no plans to " "remove it." msgstr "" -#: ../../../c-api/extension-modules.rst:199 +#: ../../../c-api/extension-modules.rst:223 msgid "" "Instead of :c:func:`PyModExport_modulename`, an extension module can define " "an older-style :dfn:`initialization function` with the signature:" msgstr "" -#: ../../../c-api/extension-modules.rst:204 +#: ../../../c-api/extension-modules.rst:228 msgid "" "Its name should be :samp:`PyInit_{}`, with ```` replaced by the " "name of the module. For non-ASCII module names, use :samp:`PyInitU_{}` " @@ -276,27 +299,27 @@ msgid "" "hook ` (that is, using Punycode with underscores)." msgstr "" -#: ../../../c-api/extension-modules.rst:211 +#: ../../../c-api/extension-modules.rst:235 msgid "" "If a module exports both :samp:`PyInit_{}` and :samp:" "`PyModExport_{}`, the :samp:`PyInit_{}` function is ignored." msgstr "" -#: ../../../c-api/extension-modules.rst:215 +#: ../../../c-api/extension-modules.rst:239 msgid "" "Like with :c:macro:`PyMODEXPORT_FUNC`, it is recommended to define the " "initialization function using a helper macro:" msgstr "" -#: ../../../c-api/extension-modules.rst:220 +#: ../../../c-api/extension-modules.rst:244 msgid "Declare an extension module initialization function. This macro:" msgstr "" -#: ../../../c-api/extension-modules.rst:223 +#: ../../../c-api/extension-modules.rst:247 msgid "specifies the :c:expr:`PyObject*` return type," msgstr "" -#: ../../../c-api/extension-modules.rst:228 +#: ../../../c-api/extension-modules.rst:252 msgid "" "Normally, the initialization function (``PyInit_modulename``) returns a :c:" "type:`PyModuleDef` instance with non-``NULL`` :c:member:`~PyModuleDef." @@ -304,52 +327,52 @@ msgid "" "phase-initialization>`." msgstr "" -#: ../../../c-api/extension-modules.rst:233 +#: ../../../c-api/extension-modules.rst:257 msgid "" "Before it is returned, the ``PyModuleDef`` instance must be initialized " "using the following function:" msgstr "" -#: ../../../c-api/extension-modules.rst:238 +#: ../../../c-api/extension-modules.rst:262 msgid "" "Ensure a module definition is a properly initialized Python object that " "correctly reports its type and a reference count." msgstr "" -#: ../../../c-api/extension-modules.rst:241 +#: ../../../c-api/extension-modules.rst:265 msgid "Return *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." msgstr "" -#: ../../../c-api/extension-modules.rst:243 +#: ../../../c-api/extension-modules.rst:267 msgid "" "Calling this function is required before returning a :c:type:`PyModuleDef` " "from a module initialization function. It should not be used in other " "contexts." msgstr "" -#: ../../../c-api/extension-modules.rst:247 +#: ../../../c-api/extension-modules.rst:271 msgid "" "Note that Python assumes that ``PyModuleDef`` structures are statically " "allocated. This function may return either a new reference or a borrowed " "one; this reference must not be released." msgstr "" -#: ../../../c-api/extension-modules.rst:273 +#: ../../../c-api/extension-modules.rst:297 msgid "Legacy single-phase initialization" msgstr "" -#: ../../../c-api/extension-modules.rst:277 +#: ../../../c-api/extension-modules.rst:301 msgid "" "Single-phase initialization is a legacy mechanism to initialize extension " "modules, with known drawbacks and design flaws. Extension module authors are " "encouraged to use multi-phase initialization instead." msgstr "" -#: ../../../c-api/extension-modules.rst:281 +#: ../../../c-api/extension-modules.rst:305 msgid "However, there are no plans to remove support for it." msgstr "" -#: ../../../c-api/extension-modules.rst:283 +#: ../../../c-api/extension-modules.rst:307 msgid "" "In single-phase initialization, the old-style :ref:`initialization function " "` (``PyInit_modulename``) should create, populate and " @@ -357,23 +380,23 @@ msgid "" "`PyModule_Create` and functions like :c:func:`PyModule_AddObjectRef`." msgstr "" -#: ../../../c-api/extension-modules.rst:289 +#: ../../../c-api/extension-modules.rst:313 msgid "" "Single-phase initialization differs from the :ref:`default ` in the following ways:" msgstr "" -#: ../../../c-api/extension-modules.rst:292 +#: ../../../c-api/extension-modules.rst:316 msgid "Single-phase modules are, or rather *contain*, “singletons”." msgstr "" -#: ../../../c-api/extension-modules.rst:294 +#: ../../../c-api/extension-modules.rst:318 msgid "" "When the module is first initialized, Python saves the contents of the " "module's ``__dict__`` (that is, typically, the module's functions and types)." msgstr "" -#: ../../../c-api/extension-modules.rst:298 +#: ../../../c-api/extension-modules.rst:322 msgid "" "For subsequent imports, Python does not call the initialization function " "again. Instead, it creates a new module object with a new ``__dict__``, and " @@ -382,12 +405,12 @@ msgid "" "an exception class ``error``:" msgstr "" -#: ../../../c-api/extension-modules.rst:321 +#: ../../../c-api/extension-modules.rst:345 msgid "" "The exact behavior should be considered a CPython implementation detail." msgstr "" -#: ../../../c-api/extension-modules.rst:323 +#: ../../../c-api/extension-modules.rst:347 msgid "" "To work around the fact that ``PyInit_modulename`` does not take a *spec* " "argument, some state of the import machinery is saved and applied to the " @@ -396,27 +419,27 @@ msgid "" "parent package name to the name of the module." msgstr "" -#: ../../../c-api/extension-modules.rst:329 +#: ../../../c-api/extension-modules.rst:353 msgid "" "A single-phase ``PyInit_modulename`` function should create “its” module " "object as soon as possible, before any other module objects can be created." msgstr "" -#: ../../../c-api/extension-modules.rst:332 +#: ../../../c-api/extension-modules.rst:356 msgid "Non-ASCII module names (``PyInitU_modulename``) are not supported." msgstr "" -#: ../../../c-api/extension-modules.rst:334 +#: ../../../c-api/extension-modules.rst:358 msgid "" "Single-phase modules support module lookup functions like :c:func:" "`PyState_FindModule`." msgstr "" -#: ../../../c-api/extension-modules.rst:337 +#: ../../../c-api/extension-modules.rst:361 msgid "The module's :c:member:`PyModuleDef.m_slots` must be NULL." msgstr "" -#: ../../../c-api/extension-modules.rst:339 +#: ../../../c-api/extension-modules.rst:363 msgid "" "``_testsinglephase`` is an internal module used in CPython's self-test " "suite; your installation may or may not include it." diff --git a/main/locale/pot/LC_MESSAGES/c-api/float.pot b/main/locale/pot/LC_MESSAGES/c-api/float.pot index 8fa4ac434b9..69b7dbc3f90 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/float.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/float.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-04-27 10:55+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -273,15 +273,11 @@ msgstr "" msgid "Pack a C double as the IEEE 754 binary64 double precision format." msgstr "" -#: ../../../c-api/float.rst:237 -msgid "This function always succeeds in CPython." -msgstr "" - -#: ../../../c-api/float.rst:241 +#: ../../../c-api/float.rst:238 msgid "Unpack functions" msgstr "" -#: ../../../c-api/float.rst:243 +#: ../../../c-api/float.rst:240 msgid "" "The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is an :c:" "expr:`int` argument, non-zero if the bytes string is in little-endian format " @@ -291,26 +287,22 @@ msgid "" "processor, or ``1`` on little endian processor." msgstr "" -#: ../../../c-api/float.rst:250 +#: ../../../c-api/float.rst:247 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:255 -msgid "These functions always succeed in CPython." -msgstr "" - -#: ../../../c-api/float.rst:259 +#: ../../../c-api/float.rst:253 msgid "Unpack the IEEE 754 binary16 half-precision format as a C double." msgstr "" -#: ../../../c-api/float.rst:263 +#: ../../../c-api/float.rst:257 msgid "Unpack the IEEE 754 binary32 single precision format as a C double." msgstr "" -#: ../../../c-api/float.rst:267 +#: ../../../c-api/float.rst:261 msgid "Unpack the IEEE 754 binary64 double precision format as a C double." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/frame.pot b/main/locale/pot/LC_MESSAGES/c-api/frame.pot index 5a896a4fec4..d2157e90e59 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/frame.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/frame.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-04-27 10:55+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -264,3 +264,51 @@ msgstr "" msgid "" "Return the currently executing line number, or -1 if there is no line number." msgstr "" + +#: ../../../c-api/frame.rst:250 +msgid "" +"An array of executable kinds (executor types) for frames, used for internal " +"debugging and tracing." +msgstr "" + +#: ../../../c-api/frame.rst:253 +msgid "" +"Tools like debuggers and profilers can use this to identify the type of " +"execution context associated with a frame (such as to filter out internal " +"frames). The entries are indexed by the following constants:" +msgstr "" + +#: ../../../c-api/frame.rst:261 +msgid "Constant" +msgstr "" + +#: ../../../c-api/frame.rst:262 +msgid "Description" +msgstr "" + +#: ../../../c-api/frame.rst:264 +msgid "" +"The frame is internal (For example: inlined) and should be skipped by tools." +msgstr "" + +#: ../../../c-api/frame.rst:266 +msgid "The frame corresponds to a standard Python function." +msgstr "" + +#: ../../../c-api/frame.rst:268 +msgid "The frame corresponds to a function defined in native code." +msgstr "" + +#: ../../../c-api/frame.rst:270 +msgid "The frame corresponds to a method on a class instance." +msgstr "" + +#: ../../../c-api/frame.rst:272 +msgid "" +"However, Python's C API lacks a function to read the executable kind from a " +"frame. Instead, use this recipe:" +msgstr "" + +#: ../../../c-api/frame.rst:301 +msgid "The number of entries in :c:data:`PyUnstable_ExecutableKinds`." +msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/gen.pot b/main/locale/pot/LC_MESSAGES/c-api/gen.pot index fb0941a88f0..2f2f0c847a3 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/gen.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/gen.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -52,12 +52,12 @@ msgstr "" #: ../../../c-api/gen.rst:37 msgid "" "Create and return a new generator object based on the *frame* object. A " -"reference to *frame* is stolen by this function. The argument must not be " -"``NULL``." +"reference to *frame* is \":term:`stolen `\" by this function (even on " +"error). The argument must not be ``NULL``." msgstr "" #: ../../../c-api/gen.rst:43 ../../../c-api/gen.rst:56 -#: ../../../c-api/gen.rst:94 +#: ../../../c-api/gen.rst:95 msgid "" "This function has not been used since 3.10. It is also impossible to " "construct a proper *frame* object to call this function." @@ -67,8 +67,8 @@ msgstr "" msgid "" "Create and return a new generator object based on the *frame* object, with " "``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference " -"to *frame* is stolen by this function. The *frame* argument must not be " -"``NULL``." +"to *frame* is \":term:`stolen `\" by this function (even on error). " +"The *frame* argument must not be ``NULL``." msgstr "" #: ../../../c-api/gen.rst:63 @@ -94,31 +94,31 @@ msgstr "" #: ../../../c-api/gen.rst:82 msgid "" "Create a new asynchronous generator wrapping *frame*, with ``__name__`` and " -"``__qualname__`` set to *name* and *qualname*. *frame* is stolen by this " -"function and must not be ``NULL``." +"``__qualname__`` set to *name* and *qualname*. *frame* is \":term:`stolen " +"`\" by this function (even on error) and must not be ``NULL``." msgstr "" -#: ../../../c-api/gen.rst:86 +#: ../../../c-api/gen.rst:87 msgid "" "On success, this function returns a :term:`strong reference` to the new " "asynchronous generator. On failure, this function returns ``NULL`` with an " "exception set." msgstr "" -#: ../../../c-api/gen.rst:100 +#: ../../../c-api/gen.rst:101 msgid "" "Return true if *op* is an asynchronous generator object, false otherwise. " "This function always succeeds." msgstr "" -#: ../../../c-api/gen.rst:107 +#: ../../../c-api/gen.rst:108 msgid "Deprecated API" msgstr "" -#: ../../../c-api/gen.rst:111 +#: ../../../c-api/gen.rst:112 msgid "This is an API that was included in Python's C API by mistake." msgstr "" -#: ../../../c-api/gen.rst:114 +#: ../../../c-api/gen.rst:115 msgid "It is solely here for completeness; do not use this API." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/import.pot b/main/locale/pot/LC_MESSAGES/c-api/import.pot index a703a87e800..738cc566adf 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/import.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/import.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -336,7 +336,14 @@ msgstr "" msgid "Initialization function for a module built into the interpreter." msgstr "" -#: ../../../c-api/import.rst:310 +#: ../../../c-api/import.rst:307 +msgid "" +"Note that the inittab uses \"``PyInit``\" :ref:`initialization functions " +"`; there is currently no way to include " +"\"``PyModExport_``\" :ref:`export hooks `." +msgstr "" + +#: ../../../c-api/import.rst:315 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 :c:" @@ -347,29 +354,29 @@ msgid "" "before :c:func:`Py_Initialize`." msgstr "" -#: ../../../c-api/import.rst:317 +#: ../../../c-api/import.rst:322 msgid "" "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/import.rst:324 +#: ../../../c-api/import.rst:329 msgid "" "The table of built-in modules used by Python initialization. Do not use this " "directly; use :c:func:`PyImport_AppendInittab` and :c:func:" "`PyImport_ExtendInittab` instead." msgstr "" -#: ../../../c-api/import.rst:331 +#: ../../../c-api/import.rst:336 msgid "Import the module *mod_name* and get its attribute *attr_name*." msgstr "" -#: ../../../c-api/import.rst:333 +#: ../../../c-api/import.rst:338 msgid "Names must be Python :class:`str` objects." msgstr "" -#: ../../../c-api/import.rst:335 +#: ../../../c-api/import.rst:340 msgid "" "Helper function combining :c:func:`PyImport_Import` and :c:func:" "`PyObject_GetAttr`. For example, it can raise :exc:`ImportError` if the " @@ -377,27 +384,27 @@ msgid "" "exist." msgstr "" -#: ../../../c-api/import.rst:344 ../../../c-api/import.rst:364 +#: ../../../c-api/import.rst:349 ../../../c-api/import.rst:369 msgid "" "Similar to :c:func:`PyImport_ImportModuleAttr`, but names are UTF-8 encoded " "strings instead of Python :class:`str` objects." msgstr "" -#: ../../../c-api/import.rst:351 +#: ../../../c-api/import.rst:356 msgid "Gets the current lazy imports mode." msgstr "" -#: ../../../c-api/import.rst:357 +#: ../../../c-api/import.rst:362 msgid "" "Return a :term:`strong reference` to the current lazy imports filter, or " "``NULL`` if none exists. This function always succeeds." msgstr "" -#: ../../../c-api/import.rst:367 +#: ../../../c-api/import.rst:372 msgid "This function always returns ``0``." msgstr "" -#: ../../../c-api/import.rst:373 +#: ../../../c-api/import.rst:378 msgid "" "Sets the current lazy imports filter. The *filter* should be a callable that " "will receive ``(importing_module_name, imported_module_name, [fromlist])`` " @@ -407,40 +414,40 @@ msgid "" "lazy and ``False`` otherwise." msgstr "" -#: ../../../c-api/import.rst:380 +#: ../../../c-api/import.rst:385 msgid "Return ``0`` on success and ``-1`` with an exception set otherwise." msgstr "" -#: ../../../c-api/import.rst:386 +#: ../../../c-api/import.rst:391 msgid "Enumeration of possible lazy import modes." msgstr "" -#: ../../../c-api/import.rst:390 +#: ../../../c-api/import.rst:395 msgid "Respect the ``lazy`` keyword in source code. This is the default mode." msgstr "" -#: ../../../c-api/import.rst:394 +#: ../../../c-api/import.rst:399 msgid "Make all imports lazy by default." msgstr "" -#: ../../../c-api/import.rst:400 +#: ../../../c-api/import.rst:405 msgid "" "This function is a building block that enables embedders to implement the :" "py:meth:`~importlib.abc.Loader.create_module` step of custom static " "extension importers (e.g. of statically-linked extensions)." msgstr "" -#: ../../../c-api/import.rst:404 +#: ../../../c-api/import.rst:409 msgid "*spec* must be a :class:`~importlib.machinery.ModuleSpec` object." msgstr "" -#: ../../../c-api/import.rst:406 +#: ../../../c-api/import.rst:411 msgid "" "*initfunc* must be an :ref:`initialization function `, the same as for :c:func:`PyImport_AppendInittab`." msgstr "" -#: ../../../c-api/import.rst:409 +#: ../../../c-api/import.rst:414 msgid "" "On success, create and return a module object. This module will not be " "initialized; call :c:func:`PyModule_Exec` to initialize it. (Custom " @@ -448,7 +455,7 @@ msgid "" "exec_module` method.)" msgstr "" -#: ../../../c-api/import.rst:415 +#: ../../../c-api/import.rst:420 msgid "On error, return NULL with an exception set." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/intro.pot b/main/locale/pot/LC_MESSAGES/c-api/intro.pot index a194eb5d582..17abf67efa3 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/intro.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/intro.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-04-27 10:55+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -898,12 +898,18 @@ msgstr "" msgid "" "Conversely, when a calling function passes in a reference to an object, " "there are two possibilities: the function *steals* a reference to the " -"object, or it does not. *Stealing a reference* means that when you pass a " -"reference to a function, that function assumes that it now owns that " -"reference, and you are not responsible for it any longer." +"object, or it does not." msgstr "" -#: ../../../c-api/intro.rst:748 +#: ../../../c-api/intro.rst:742 +msgid "" +"*Stealing a reference* means that when you pass a reference to a function, " +"that function assumes that it now owns that reference. Since the new owner " +"can use :c:func:`!Py_DECREF` at its discretion, you (the caller) must not " +"use that reference after the call." +msgstr "" + +#: ../../../c-api/intro.rst:751 msgid "" "Few functions steal references; the two notable exceptions are :c:func:" "`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a reference to " @@ -915,7 +921,7 @@ msgid "" "below)::" msgstr "" -#: ../../../c-api/intro.rst:763 +#: ../../../c-api/intro.rst:766 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 " @@ -923,7 +929,7 @@ msgid "" "another reference before calling the reference-stealing function." msgstr "" -#: ../../../c-api/intro.rst:768 +#: ../../../c-api/intro.rst:771 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 " @@ -931,13 +937,13 @@ msgid "" "func:`PyTuple_SetItem` for tuples that you are creating yourself." msgstr "" -#: ../../../c-api/intro.rst:773 +#: ../../../c-api/intro.rst:776 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:776 +#: ../../../c-api/intro.rst:779 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:" @@ -946,7 +952,7 @@ msgid "" "be replaced by the following (which also takes care of the error checking)::" msgstr "" -#: ../../../c-api/intro.rst:787 +#: ../../../c-api/intro.rst:790 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 " @@ -957,7 +963,7 @@ msgid "" "sequence) to a given item::" msgstr "" -#: ../../../c-api/intro.rst:817 +#: ../../../c-api/intro.rst:820 msgid "" "The situation is slightly different for function return values. While " "passing a reference to most functions does not change your ownership " @@ -970,7 +976,7 @@ msgid "" "becomes the owner of the reference)." msgstr "" -#: ../../../c-api/intro.rst:826 +#: ../../../c-api/intro.rst:829 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 " @@ -981,18 +987,18 @@ msgid "" "the same arguments), you do own a reference to the returned object." msgstr "" -#: ../../../c-api/intro.rst:838 +#: ../../../c-api/intro.rst:841 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:902 +#: ../../../c-api/intro.rst:905 msgid "Types" msgstr "" -#: ../../../c-api/intro.rst:904 +#: ../../../c-api/intro.rst:907 msgid "" "There are few other data types that play a significant role in the Python/C " "API; most are simple C types such as :c:expr:`int`, :c:expr:`long`, :c:expr:" @@ -1003,7 +1009,7 @@ msgid "" "that use them." msgstr "" -#: ../../../c-api/intro.rst:914 +#: ../../../c-api/intro.rst:917 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 " @@ -1011,11 +1017,11 @@ msgid "" "positive value of type :c:type:`Py_ssize_t`." msgstr "" -#: ../../../c-api/intro.rst:923 +#: ../../../c-api/intro.rst:926 msgid "Exceptions" msgstr "" -#: ../../../c-api/intro.rst:925 +#: ../../../c-api/intro.rst:928 msgid "" "The Python programmer only needs to deal with exceptions if specific error " "handling is required; unhandled exceptions are automatically propagated to " @@ -1024,7 +1030,7 @@ msgid "" "stack traceback." msgstr "" -#: ../../../c-api/intro.rst:933 +#: ../../../c-api/intro.rst:936 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 " @@ -1039,7 +1045,7 @@ msgid "" "explicitly documented." msgstr "" -#: ../../../c-api/intro.rst:948 +#: ../../../c-api/intro.rst:951 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 " @@ -1052,7 +1058,7 @@ msgid "" "clears the exception state." msgstr "" -#: ../../../c-api/intro.rst:958 +#: ../../../c-api/intro.rst:961 msgid "" "The full exception state consists of three objects (all of which can be " "``NULL``): the exception type, the corresponding exception value, and the " @@ -1065,7 +1071,7 @@ msgid "" "``sys.exc_info()`` and friends." msgstr "" -#: ../../../c-api/intro.rst:970 +#: ../../../c-api/intro.rst:973 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." @@ -1079,7 +1085,7 @@ msgid "" "referenced by the stack frames in the traceback." msgstr "" -#: ../../../c-api/intro.rst:981 +#: ../../../c-api/intro.rst:984 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 " @@ -1090,7 +1096,7 @@ msgid "" "of the error." msgstr "" -#: ../../../c-api/intro.rst:990 +#: ../../../c-api/intro.rst:993 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 " @@ -1099,11 +1105,11 @@ msgid "" "why you like Python, we show the equivalent Python code::" msgstr "" -#: ../../../c-api/intro.rst:1005 +#: ../../../c-api/intro.rst:1008 msgid "Here is the corresponding C code, in all its glory::" msgstr "" -#: ../../../c-api/intro.rst:1057 +#: ../../../c-api/intro.rst:1060 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:" @@ -1116,11 +1122,11 @@ msgid "" "success after the final call made is successful." msgstr "" -#: ../../../c-api/intro.rst:1071 +#: ../../../c-api/intro.rst:1074 msgid "Embedding Python" msgstr "" -#: ../../../c-api/intro.rst:1073 +#: ../../../c-api/intro.rst:1076 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 " @@ -1128,7 +1134,7 @@ msgid "" "the interpreter can only be used after the interpreter has been initialized." msgstr "" -#: ../../../c-api/intro.rst:1086 +#: ../../../c-api/intro.rst:1089 msgid "" "The basic initialization function is :c:func:`Py_Initialize`. This " "initializes the table of loaded modules, and creates the fundamental " @@ -1136,7 +1142,7 @@ msgid "" "initializes the module search path (``sys.path``)." msgstr "" -#: ../../../c-api/intro.rst:1091 +#: ../../../c-api/intro.rst:1094 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 " @@ -1144,7 +1150,7 @@ msgid "" "must be set: see :ref:`Python Initialization Configuration `." msgstr "" -#: ../../../c-api/intro.rst:1096 +#: ../../../c-api/intro.rst:1099 msgid "" "On most systems (in particular, on Unix and Windows, although the details " "are slightly different), :c:func:`Py_Initialize` calculates the module " @@ -1156,7 +1162,7 @@ msgid "" "on the shell command search path (the environment variable :envvar:`PATH`)." msgstr "" -#: ../../../c-api/intro.rst:1105 +#: ../../../c-api/intro.rst:1108 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/" @@ -1167,7 +1173,7 @@ msgid "" "in front of the standard path by setting :envvar:`PYTHONPATH`." msgstr "" -#: ../../../c-api/intro.rst:1113 +#: ../../../c-api/intro.rst:1116 msgid "" "The embedding application can steer the search by setting :c:member:" "`PyConfig.program_name` *before* calling :c:func:`Py_InitializeFromConfig`. " @@ -1175,7 +1181,7 @@ msgid "" "is still inserted in front of the standard path." msgstr "" -#: ../../../c-api/intro.rst:1121 +#: ../../../c-api/intro.rst:1124 msgid "" "Sometimes, it is desirable to \"uninitialize\" Python. For instance, the " "application may want to start over (make another call to :c:func:" @@ -1189,18 +1195,18 @@ msgid "" "released." msgstr "" -#: ../../../c-api/intro.rst:1135 +#: ../../../c-api/intro.rst:1138 msgid "Debugging Builds" msgstr "" -#: ../../../c-api/intro.rst:1137 +#: ../../../c-api/intro.rst:1140 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:1141 +#: ../../../c-api/intro.rst:1144 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 " @@ -1210,21 +1216,21 @@ msgid "" "section." msgstr "" -#: ../../../c-api/intro.rst:1149 +#: ../../../c-api/intro.rst:1152 msgid "" "Compiling the interpreter with the :c:macro:`!Py_DEBUG` macro defined " "produces what is generally meant by :ref:`a debug build of Python `." msgstr "" -#: ../../../c-api/intro.rst:1152 +#: ../../../c-api/intro.rst:1155 msgid "" "On Unix, :c:macro:`!Py_DEBUG` can be enabled by adding :option:`--with-" "pydebug` to the :file:`./configure` command. This will also disable compiler " "optimization." msgstr "" -#: ../../../c-api/intro.rst:1155 +#: ../../../c-api/intro.rst:1158 msgid "" "On Windows, selecting a debug build (e.g., by passing the :option:`-d` " "option to :file:`PCbuild/build.bat`) automatically enables :c:macro:`!" @@ -1233,13 +1239,13 @@ msgid "" "macro:`!Py_DEBUG`." msgstr "" -#: ../../../c-api/intro.rst:1160 +#: ../../../c-api/intro.rst:1163 msgid "" "In addition to the reference count debugging described below, extra checks " "are performed. See :ref:`Python Debug Build ` for more details." msgstr "" -#: ../../../c-api/intro.rst:1163 +#: ../../../c-api/intro.rst:1166 msgid "" "Defining :c:macro:`Py_TRACE_REFS` enables reference tracing (see the :option:" "`configure --with-trace-refs option <--with-trace-refs>`). When defined, a " @@ -1249,55 +1255,55 @@ msgid "" "this happens after every statement run by the interpreter.)" msgstr "" -#: ../../../c-api/intro.rst:1170 +#: ../../../c-api/intro.rst:1173 msgid "" "Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source " "distribution for more detailed information." msgstr "" -#: ../../../c-api/intro.rst:1177 +#: ../../../c-api/intro.rst:1180 msgid "Recommended third party tools" msgstr "" -#: ../../../c-api/intro.rst:1179 +#: ../../../c-api/intro.rst:1182 msgid "" "The following third party tools offer both simpler and more sophisticated " "approaches to creating C, C++ and Rust extensions for Python:" msgstr "" -#: ../../../c-api/intro.rst:1182 +#: ../../../c-api/intro.rst:1185 msgid "`Cython `_" msgstr "" -#: ../../../c-api/intro.rst:1183 +#: ../../../c-api/intro.rst:1186 msgid "`cffi `_" msgstr "" -#: ../../../c-api/intro.rst:1184 +#: ../../../c-api/intro.rst:1187 msgid "`HPy `_" msgstr "" -#: ../../../c-api/intro.rst:1185 +#: ../../../c-api/intro.rst:1188 msgid "`nanobind `_ (C++)" msgstr "" -#: ../../../c-api/intro.rst:1186 +#: ../../../c-api/intro.rst:1189 msgid "`Numba `_" msgstr "" -#: ../../../c-api/intro.rst:1187 +#: ../../../c-api/intro.rst:1190 msgid "`pybind11 `_ (C++)" msgstr "" -#: ../../../c-api/intro.rst:1188 +#: ../../../c-api/intro.rst:1191 msgid "`PyO3 `_ (Rust)" msgstr "" -#: ../../../c-api/intro.rst:1189 +#: ../../../c-api/intro.rst:1192 msgid "`SWIG `_" msgstr "" -#: ../../../c-api/intro.rst:1191 +#: ../../../c-api/intro.rst:1194 msgid "" "Using tools such as these can help avoid writing code that is tightly bound " "to a particular version of CPython, avoid reference counting errors, and " @@ -1308,7 +1314,7 @@ msgid "" "sources." msgstr "" -#: ../../../c-api/intro.rst:1198 +#: ../../../c-api/intro.rst:1201 msgid "" "These projects are not supported by the same people who maintain Python, and " "issues need to be raised with the projects directly. Remember to check that " @@ -1316,13 +1322,13 @@ msgid "" "outdated." msgstr "" -#: ../../../c-api/intro.rst:1205 +#: ../../../c-api/intro.rst:1208 msgid "" "`Python Packaging User Guide: Binary Extensions `_" msgstr "" -#: ../../../c-api/intro.rst:1206 +#: ../../../c-api/intro.rst:1209 msgid "" "The Python Packaging User Guide not only covers several available tools that " "simplify the creation of binary extensions, but also discusses the various " @@ -1345,94 +1351,94 @@ msgstr "" msgid "Py_DECREF (C function)" msgstr "" -#: ../../../c-api/intro.rst:744 +#: ../../../c-api/intro.rst:747 msgid "PyList_SetItem (C function)" msgstr "" -#: ../../../c-api/intro.rst:744 +#: ../../../c-api/intro.rst:747 msgid "PyTuple_SetItem (C function)" msgstr "" -#: ../../../c-api/intro.rst:815 +#: ../../../c-api/intro.rst:818 msgid "set_all()" msgstr "" -#: ../../../c-api/intro.rst:834 +#: ../../../c-api/intro.rst:837 msgid "PyList_GetItem (C function)" msgstr "" -#: ../../../c-api/intro.rst:834 +#: ../../../c-api/intro.rst:837 msgid "PySequence_GetItem (C function)" msgstr "" -#: ../../../c-api/intro.rst:864 +#: ../../../c-api/intro.rst:867 msgid "sum_list()" msgstr "" -#: ../../../c-api/intro.rst:896 ../../../c-api/intro.rst:988 +#: ../../../c-api/intro.rst:899 ../../../c-api/intro.rst:991 msgid "sum_sequence()" msgstr "" -#: ../../../c-api/intro.rst:931 +#: ../../../c-api/intro.rst:934 msgid "PyErr_Occurred (C function)" msgstr "" -#: ../../../c-api/intro.rst:944 +#: ../../../c-api/intro.rst:947 msgid "PyErr_SetString (C function)" msgstr "" -#: ../../../c-api/intro.rst:944 ../../../c-api/intro.rst:1052 +#: ../../../c-api/intro.rst:947 ../../../c-api/intro.rst:1055 msgid "PyErr_Clear (C function)" msgstr "" -#: ../../../c-api/intro.rst:968 +#: ../../../c-api/intro.rst:971 msgid "exc_info (in module sys)" msgstr "" -#: ../../../c-api/intro.rst:1003 ../../../c-api/intro.rst:1050 +#: ../../../c-api/intro.rst:1006 ../../../c-api/intro.rst:1053 msgid "incr_item()" msgstr "" -#: ../../../c-api/intro.rst:1052 +#: ../../../c-api/intro.rst:1055 msgid "PyErr_ExceptionMatches (C function)" msgstr "" -#: ../../../c-api/intro.rst:1052 +#: ../../../c-api/intro.rst:1055 msgid "Py_XDECREF (C function)" msgstr "" -#: ../../../c-api/intro.rst:1078 +#: ../../../c-api/intro.rst:1081 msgid "Py_Initialize (C function)" msgstr "" -#: ../../../c-api/intro.rst:1078 +#: ../../../c-api/intro.rst:1081 msgid "module" msgstr "" -#: ../../../c-api/intro.rst:1078 +#: ../../../c-api/intro.rst:1081 msgid "builtins" msgstr "" -#: ../../../c-api/intro.rst:1078 +#: ../../../c-api/intro.rst:1081 msgid "__main__" msgstr "" -#: ../../../c-api/intro.rst:1078 +#: ../../../c-api/intro.rst:1081 msgid "sys" msgstr "" -#: ../../../c-api/intro.rst:1078 +#: ../../../c-api/intro.rst:1081 msgid "search" msgstr "" -#: ../../../c-api/intro.rst:1078 +#: ../../../c-api/intro.rst:1081 msgid "path" msgstr "" -#: ../../../c-api/intro.rst:1078 +#: ../../../c-api/intro.rst:1081 msgid "path (in module sys)" msgstr "" -#: ../../../c-api/intro.rst:1119 +#: ../../../c-api/intro.rst:1122 msgid "Py_IsInitialized (C function)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/lifecycle.pot b/main/locale/pot/LC_MESSAGES/c-api/lifecycle.pot index 7f4690cec3b..37121a6aa81 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/lifecycle.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/lifecycle.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -653,29 +653,29 @@ msgid "" "" msgstr "" -#: ../../../c-api/lifecycle.rst:55 ../../../c-api/lifecycle.rst:62 +#: ../../../c-api/lifecycle.rst:55 msgid "Diagram showing events in an object's life. Explained in detail below." msgstr "" -#: ../../../c-api/lifecycle.rst:70 +#: ../../../c-api/lifecycle.rst:63 msgid "Explanation:" msgstr "" -#: ../../../c-api/lifecycle.rst:72 +#: ../../../c-api/lifecycle.rst:65 msgid "When a new object is constructed by calling its type:" msgstr "" -#: ../../../c-api/lifecycle.rst:74 +#: ../../../c-api/lifecycle.rst:67 msgid ":c:member:`~PyTypeObject.tp_new` is called to create a new object." msgstr "" -#: ../../../c-api/lifecycle.rst:75 +#: ../../../c-api/lifecycle.rst:68 msgid "" ":c:member:`~PyTypeObject.tp_alloc` is directly called by :c:member:" "`~PyTypeObject.tp_new` to allocate the memory for the new object." msgstr "" -#: ../../../c-api/lifecycle.rst:78 +#: ../../../c-api/lifecycle.rst:71 msgid "" ":c:member:`~PyTypeObject.tp_init` initializes the newly created object. :c:" "member:`!tp_init` can be called again to re-initialize an object, if " @@ -683,15 +683,15 @@ msgid "" "example by Python code calling :py:meth:`~object.__new__`." msgstr "" -#: ../../../c-api/lifecycle.rst:83 +#: ../../../c-api/lifecycle.rst:76 msgid "After :c:member:`!tp_init` completes, the object is ready to use." msgstr "" -#: ../../../c-api/lifecycle.rst:84 +#: ../../../c-api/lifecycle.rst:77 msgid "Some time after the last reference to an object is removed:" msgstr "" -#: ../../../c-api/lifecycle.rst:86 +#: ../../../c-api/lifecycle.rst:79 msgid "" "If an object is not marked as *finalized*, it might be finalized by marking " "it as *finalized* and calling its :c:member:`~PyTypeObject.tp_finalize` " @@ -700,21 +700,21 @@ msgid "" "that :c:member:`~PyTypeObject.tp_finalize` is always called." msgstr "" -#: ../../../c-api/lifecycle.rst:92 +#: ../../../c-api/lifecycle.rst:85 msgid "" "If the object is marked as finalized, :c:member:`~PyTypeObject.tp_clear` " "might be called by the garbage collector to clear references held by the " "object. It is *not* called when the object's reference count reaches zero." msgstr "" -#: ../../../c-api/lifecycle.rst:96 +#: ../../../c-api/lifecycle.rst:89 msgid "" ":c:member:`~PyTypeObject.tp_dealloc` is called to destroy the object. To " "avoid code duplication, :c:member:`~PyTypeObject.tp_dealloc` typically calls " "into :c:member:`~PyTypeObject.tp_clear` to free up the object's references." msgstr "" -#: ../../../c-api/lifecycle.rst:100 +#: ../../../c-api/lifecycle.rst:93 msgid "" "When :c:member:`~PyTypeObject.tp_dealloc` finishes object destruction, it " "directly calls :c:member:`~PyTypeObject.tp_free` (usually set to :c:func:" @@ -722,7 +722,7 @@ msgid "" "for the type) to deallocate the memory." msgstr "" -#: ../../../c-api/lifecycle.rst:105 +#: ../../../c-api/lifecycle.rst:98 msgid "" "The :c:member:`~PyTypeObject.tp_finalize` function is permitted to add a " "reference to the object if desired. If it does, the object is " @@ -737,7 +737,7 @@ msgid "" "both of these behaviors may change in the future." msgstr "" -#: ../../../c-api/lifecycle.rst:118 +#: ../../../c-api/lifecycle.rst:111 msgid "" ":c:member:`~PyTypeObject.tp_dealloc` can optionally call :c:member:" "`~PyTypeObject.tp_finalize` via :c:func:`PyObject_CallFinalizerFromDealloc` " @@ -747,7 +747,7 @@ msgid "" "documentation for example code." msgstr "" -#: ../../../c-api/lifecycle.rst:125 +#: ../../../c-api/lifecycle.rst:118 msgid "" "If the object is a member of a :term:`cyclic isolate` and either :c:member:" "`~PyTypeObject.tp_clear` fails to break the reference cycle or the cyclic " @@ -757,20 +757,20 @@ msgid "" "\"leak\"). See :data:`gc.garbage`." msgstr "" -#: ../../../c-api/lifecycle.rst:132 +#: ../../../c-api/lifecycle.rst:125 msgid "" "If the object is marked as supporting garbage collection (the :c:macro:" "`Py_TPFLAGS_HAVE_GC` flag is set in :c:member:`~PyTypeObject.tp_flags`), the " "following events are also possible:" msgstr "" -#: ../../../c-api/lifecycle.rst:136 +#: ../../../c-api/lifecycle.rst:129 msgid "" "The garbage collector occasionally calls :c:member:`~PyTypeObject." "tp_traverse` to identify :term:`cyclic isolates `." msgstr "" -#: ../../../c-api/lifecycle.rst:139 +#: ../../../c-api/lifecycle.rst:132 msgid "" "When the garbage collector discovers a :term:`cyclic isolate`, it finalizes " "one of the objects in the group by marking it as *finalized* and calling " @@ -779,7 +779,7 @@ msgid "" "been finalized." msgstr "" -#: ../../../c-api/lifecycle.rst:144 +#: ../../../c-api/lifecycle.rst:137 msgid "" ":c:member:`~PyTypeObject.tp_finalize` is permitted to resurrect the object " "by adding a reference from outside the :term:`cyclic isolate`. The new " @@ -788,7 +788,7 @@ msgid "" "longer isolated)." msgstr "" -#: ../../../c-api/lifecycle.rst:149 +#: ../../../c-api/lifecycle.rst:142 msgid "" "When the garbage collector discovers a :term:`cyclic isolate` and all of the " "objects in the group have already been marked as *finalized*, the garbage " @@ -798,11 +798,11 @@ msgid "" "all of the objects have been cleared." msgstr "" -#: ../../../c-api/lifecycle.rst:158 +#: ../../../c-api/lifecycle.rst:151 msgid "Cyclic Isolate Destruction" msgstr "" -#: ../../../c-api/lifecycle.rst:160 +#: ../../../c-api/lifecycle.rst:153 msgid "" "Listed below are the stages of life of a hypothetical :term:`cyclic isolate` " "that continues to exist after each member object is finalized or cleared. " @@ -813,14 +813,14 @@ msgid "" "(see :c:member:`~PyTypeObject.tp_finalize`)." msgstr "" -#: ../../../c-api/lifecycle.rst:168 +#: ../../../c-api/lifecycle.rst:161 msgid "" "**Reachable** (not yet a cyclic isolate): All objects are in their normal, " "reachable state. A reference cycle could exist, but an external reference " "means the objects are not yet isolated." msgstr "" -#: ../../../c-api/lifecycle.rst:171 +#: ../../../c-api/lifecycle.rst:164 msgid "" "**Unreachable but consistent:** The final reference from outside the cyclic " "group of objects has been removed, causing the objects to become isolated " @@ -830,7 +830,7 @@ msgid "" "because the next run might not scan every object)." msgstr "" -#: ../../../c-api/lifecycle.rst:177 +#: ../../../c-api/lifecycle.rst:170 msgid "" "**Mix of finalized and not finalized:** Objects in a cyclic isolate are " "finalized one at a time, which means that there is a period of time when the " @@ -841,13 +841,13 @@ msgid "" "an arbitrary subset of its referents." msgstr "" -#: ../../../c-api/lifecycle.rst:184 +#: ../../../c-api/lifecycle.rst:177 msgid "" "**All finalized:** All objects in a cyclic isolate are finalized before any " "of them are cleared." msgstr "" -#: ../../../c-api/lifecycle.rst:186 +#: ../../../c-api/lifecycle.rst:179 msgid "" "**Mix of finalized and cleared:** The objects can be cleared serially or " "concurrently (but with the :term:`GIL` held); either way, some will finish " @@ -855,7 +855,7 @@ msgid "" "a subset of its referents. :pep:`442` calls this stage \"cyclic trash\"." msgstr "" -#: ../../../c-api/lifecycle.rst:190 +#: ../../../c-api/lifecycle.rst:183 msgid "" "**Leaked:** If a cyclic isolate still exists after all objects in the group " "have been finalized and cleared, then the objects remain indefinitely " @@ -865,7 +865,7 @@ msgid "" "required." msgstr "" -#: ../../../c-api/lifecycle.rst:197 +#: ../../../c-api/lifecycle.rst:190 msgid "" "If :c:member:`~PyTypeObject.tp_clear` did not exist, then Python would have " "no way to safely break a reference cycle. Simply destroying an object in a " @@ -877,7 +877,7 @@ msgid "" "`~PyTypeObject.tp_dealloc` is called to complete the destruction." msgstr "" -#: ../../../c-api/lifecycle.rst:206 +#: ../../../c-api/lifecycle.rst:199 msgid "" "Unlike clearing, finalization is not a phase of destruction. A finalized " "object must still behave properly by continuing to fulfill its design " @@ -889,7 +889,7 @@ msgid "" "`~PyTypeObject.tp_dealloc`." msgstr "" -#: ../../../c-api/lifecycle.rst:214 +#: ../../../c-api/lifecycle.rst:207 msgid "" "The finalization step is not necessary to safely reclaim the objects in a " "cyclic isolate, but its existence makes it easier to design types that " @@ -901,29 +901,29 @@ msgid "" "only non-cleared (but potentially finalized) objects." msgstr "" -#: ../../../c-api/lifecycle.rst:223 +#: ../../../c-api/lifecycle.rst:216 msgid "To summarize the possible interactions:" msgstr "" -#: ../../../c-api/lifecycle.rst:225 +#: ../../../c-api/lifecycle.rst:218 msgid "" "A non-finalized object might have references to or from non-finalized and " "finalized objects, but not to or from cleared objects." msgstr "" -#: ../../../c-api/lifecycle.rst:227 +#: ../../../c-api/lifecycle.rst:220 msgid "" "A finalized object might have references to or from non-finalized, " "finalized, and cleared objects." msgstr "" -#: ../../../c-api/lifecycle.rst:229 +#: ../../../c-api/lifecycle.rst:222 msgid "" "A cleared object might have references to or from finalized and cleared " "objects, but not to or from non-finalized objects." msgstr "" -#: ../../../c-api/lifecycle.rst:232 +#: ../../../c-api/lifecycle.rst:225 msgid "" "Without any reference cycles, an object can be simply destroyed once its " "last reference is deleted; the finalization and clearing steps are not " @@ -937,15 +937,15 @@ msgid "" "change in a future version." msgstr "" -#: ../../../c-api/lifecycle.rst:244 +#: ../../../c-api/lifecycle.rst:237 msgid "Functions" msgstr "" -#: ../../../c-api/lifecycle.rst:246 +#: ../../../c-api/lifecycle.rst:239 msgid "To allocate and free memory, see :ref:`allocating-objects`." msgstr "" -#: ../../../c-api/lifecycle.rst:251 +#: ../../../c-api/lifecycle.rst:244 msgid "" "Finalizes the object as described in :c:member:`~PyTypeObject.tp_finalize`. " "Call this function (or :c:func:`PyObject_CallFinalizerFromDealloc`) instead " @@ -956,7 +956,7 @@ msgid "" "change in the future." msgstr "" -#: ../../../c-api/lifecycle.rst:264 +#: ../../../c-api/lifecycle.rst:257 msgid "" "Same as :c:func:`PyObject_CallFinalizer` but meant to be called at the " "beginning of the object's destructor (:c:member:`~PyTypeObject.tp_dealloc`). " @@ -966,6 +966,6 @@ msgid "" "continue normally." msgstr "" -#: ../../../c-api/lifecycle.rst:275 +#: ../../../c-api/lifecycle.rst:268 msgid ":c:member:`~PyTypeObject.tp_dealloc` for example code." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/list.pot b/main/locale/pot/LC_MESSAGES/c-api/list.pot index eafe2544f5c..3182d1dcb4d 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/list.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/list.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-23 09:36+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -102,30 +102,31 @@ msgstr "" #: ../../../c-api/list.rst:105 msgid "" -"This function \"steals\" a reference to *item* and discards a reference to " -"an item already in the list at the affected position." +"This function \":term:`steals `\" a reference to *item*, even on " +"error. On success, it discards a reference to an item already in the list at " +"the affected position (unless it was ``NULL``)." msgstr "" -#: ../../../c-api/list.rst:111 +#: ../../../c-api/list.rst:113 msgid "" "Macro form of :c:func:`PyList_SetItem` without error checking. This is " "normally only used to fill in new lists where there is no previous content." msgstr "" -#: ../../../c-api/list.rst:114 +#: ../../../c-api/list.rst:116 msgid "" "Bounds checking is performed as an assertion if Python is built in :ref:" "`debug mode ` or :option:`with assertions <--with-assertions>`." msgstr "" -#: ../../../c-api/list.rst:120 +#: ../../../c-api/list.rst:122 msgid "" -"This macro \"steals\" a reference to *item*, and, unlike :c:func:" -"`PyList_SetItem`, does *not* discard a reference to any item that is being " -"replaced; any reference in *list* at position *i* will be leaked." +"This macro \":term:`steals `\" a reference to *item*, and, unlike :c:" +"func:`PyList_SetItem`, does *not* discard a reference to any item that is " +"being replaced; any reference in *list* at position *i* will be leaked." msgstr "" -#: ../../../c-api/list.rst:127 +#: ../../../c-api/list.rst:129 msgid "" "In the :term:`free-threaded build`, this macro has no internal " "synchronization. It is normally only used to fill in new lists where no " @@ -133,21 +134,21 @@ msgid "" "func:`PyList_SetItem` instead, which uses a :term:`per-object lock`." msgstr "" -#: ../../../c-api/list.rst:136 +#: ../../../c-api/list.rst:138 msgid "" "Insert the item *item* into list *list* in front of index *index*. Return " "``0`` if successful; return ``-1`` and set an exception if unsuccessful. " "Analogous to ``list.insert(index, item)``." msgstr "" -#: ../../../c-api/list.rst:143 +#: ../../../c-api/list.rst:145 msgid "" "Append the object *item* at the end of list *list*. Return ``0`` if " "successful; return ``-1`` and set an exception if unsuccessful. Analogous " "to ``list.append(item)``." msgstr "" -#: ../../../c-api/list.rst:150 +#: ../../../c-api/list.rst:152 msgid "" "Return a list of the objects in *list* containing the objects *between* " "*low* and *high*. Return ``NULL`` and set an exception if unsuccessful. " @@ -155,7 +156,7 @@ msgid "" "supported." msgstr "" -#: ../../../c-api/list.rst:157 +#: ../../../c-api/list.rst:159 msgid "" "Set the slice of *list* between *low* and *high* to the contents of " "*itemlist*. Analogous to ``list[low:high] = itemlist``. The *itemlist* may " @@ -164,27 +165,27 @@ msgid "" "list is not supported." msgstr "" -#: ../../../c-api/list.rst:165 +#: ../../../c-api/list.rst:167 msgid "" "In the :term:`free-threaded build`, when *itemlist* is a :class:`list`, both " "*list* and *itemlist* are locked for the duration of the operation. For " "other iterables (or ``NULL``), only *list* is locked." msgstr "" -#: ../../../c-api/list.rst:172 +#: ../../../c-api/list.rst:174 msgid "" "Extend *list* with the contents of *iterable*. This is the same as " "``PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable)`` and " "analogous to ``list.extend(iterable)`` or ``list += iterable``." msgstr "" -#: ../../../c-api/list.rst:176 +#: ../../../c-api/list.rst:178 msgid "" "Raise an exception and return ``-1`` if *list* is not a :class:`list` " "object. Return 0 on success." msgstr "" -#: ../../../c-api/list.rst:183 +#: ../../../c-api/list.rst:185 msgid "" "In the :term:`free-threaded build`, when *iterable* is a :class:`list`, :" "class:`set`, :class:`dict`, or dict view, both *list* and *iterable* (or its " @@ -193,26 +194,26 @@ msgid "" "another thread." msgstr "" -#: ../../../c-api/list.rst:192 +#: ../../../c-api/list.rst:194 msgid "" "Remove all items from *list*. This is the same as ``PyList_SetSlice(list, " "0, PY_SSIZE_T_MAX, NULL)`` and analogous to ``list.clear()`` or ``del " "list[:]``." msgstr "" -#: ../../../c-api/list.rst:196 +#: ../../../c-api/list.rst:198 msgid "" "Raise an exception and return ``-1`` if *list* is not a :class:`list` " "object. Return 0 on success." msgstr "" -#: ../../../c-api/list.rst:204 +#: ../../../c-api/list.rst:206 msgid "" "Sort the items of *list* in place. Return ``0`` on success, ``-1`` on " "failure. This is equivalent to ``list.sort()``." msgstr "" -#: ../../../c-api/list.rst:209 +#: ../../../c-api/list.rst:211 msgid "" "In the :term:`free-threaded build`, element comparison via :meth:`~object." "__lt__` can execute arbitrary Python code, during which the :term:`per-" @@ -220,13 +221,13 @@ msgid "" "class:`int`, :class:`float`), the lock is not released during comparison." msgstr "" -#: ../../../c-api/list.rst:218 +#: ../../../c-api/list.rst:220 msgid "" "Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on " "failure. This is the equivalent of ``list.reverse()``." msgstr "" -#: ../../../c-api/list.rst:226 +#: ../../../c-api/list.rst:228 msgid "" "Return a new tuple object containing the contents of *list*; equivalent to " "``tuple(list)``." @@ -240,7 +241,7 @@ msgstr "" msgid "list" msgstr "" -#: ../../../c-api/list.rst:51 ../../../c-api/list.rst:224 +#: ../../../c-api/list.rst:51 ../../../c-api/list.rst:226 msgid "built-in function" msgstr "" @@ -248,6 +249,6 @@ msgstr "" msgid "len" msgstr "" -#: ../../../c-api/list.rst:224 +#: ../../../c-api/list.rst:226 msgid "tuple" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/module.pot b/main/locale/pot/LC_MESSAGES/c-api/module.pot index 6b24bf72b03..d2629c7af7c 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/module.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/module.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -547,7 +547,7 @@ msgid "" "Use :c:func:`PyModule_GetStateSize` to retrieve the size of a given module." msgstr "" -#: ../../../c-api/module.rst:468 ../../../c-api/module.rst:491 +#: ../../../c-api/module.rst:468 msgid "" "Use :c:member:`PyModuleDef.m_size` instead to support previous versions." msgstr "" @@ -575,6 +575,11 @@ msgid "" "c:func:`PyModule_GetState`) is ``NULL``." msgstr "" +#: ../../../c-api/module.rst:491 +msgid "" +"Use :c:member:`PyModuleDef.m_traverse` instead to support previous versions." +msgstr "" + #: ../../../c-api/module.rst:495 msgid "" ":c:member:`Slot ID ` for a clear function to call during GC " @@ -1080,16 +1085,16 @@ msgstr "" #: ../../../c-api/module.rst:977 msgid "" -"Similar to :c:func:`PyModule_AddObjectRef`, but \"steals\" a reference to " -"*value*. It can be called with a result of function that returns a new " -"reference without bothering to check its result or even saving it to a " -"variable." +"Similar to :c:func:`PyModule_AddObjectRef`, but \":term:`steals `\" a " +"reference to *value* (even on error). It can be called with a result of " +"function that returns a new reference without bothering to check its result " +"or even saving it to a variable." msgstr "" #: ../../../c-api/module.rst:993 msgid "" -"Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to " -"*value* on success (if it returns ``0``)." +"Similar to :c:func:`PyModule_AddObjectRef`, but :term:`steals ` a " +"reference to *value* on success (if it returns ``0``)." msgstr "" #: ../../../c-api/module.rst:996 diff --git a/main/locale/pot/LC_MESSAGES/c-api/sequence.pot b/main/locale/pot/LC_MESSAGES/c-api/sequence.pot index d21ba97acae..31c9cf3e188 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/sequence.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/sequence.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-04-27 10:55+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -79,8 +79,8 @@ msgstr "" msgid "" "Assign object *v* to the *i*\\ th element of *o*. Raise an exception and " "return ``-1`` on failure; return ``0`` on success. This is the equivalent " -"of the Python statement ``o[i] = v``. This function *does not* steal a " -"reference to *v*." +"of the Python statement ``o[i] = v``. This function *does not* \":term:" +"`steal`\" a reference to *v*." msgstr "" #: ../../../c-api/sequence.rst:72 diff --git a/main/locale/pot/LC_MESSAGES/c-api/threads.pot b/main/locale/pot/LC_MESSAGES/c-api/threads.pot index fdfddee5d3f..cac6c0f652a 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/threads.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/threads.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -271,16 +271,83 @@ msgid ":pep:`788`" msgstr "" #: ../../../c-api/threads.rst:248 +msgid "Reusing a thread state across repeated calls" +msgstr "" + +#: ../../../c-api/threads.rst:250 +msgid "" +"Creating and destroying a :c:type:`PyThreadState` is not free, and is more " +"expensive on a :term:`free-threaded build`. A foreign thread that calls " +"into the interpreter many times -- for example, a worker thread in a native " +"thread pool -- should avoid creating a fresh thread state on every entry and " +"destroying it on every exit. Instead, set up one thread state when the " +"thread starts (or lazily on its first call into Python), attach and detach " +"it around each call, and tear it down once when the thread exits." +msgstr "" + +#: ../../../c-api/threads.rst:258 +msgid "" +"Manage the thread state explicitly with :c:func:`PyThreadState_New`, " +"attaching and detaching it with :c:func:`PyEval_RestoreThread` and :c:func:" +"`PyEval_SaveThread`. This happens in three distinct phases, at different " +"points in the thread's life." +msgstr "" + +#: ../../../c-api/threads.rst:263 +msgid "" +"When the thread starts, create one thread state for it. ``interp`` is the " +"target interpreter, captured by the code that created this thread while it " +"held an attached thread state (for example via :c:func:" +"`PyInterpreterState_Get`)::" +msgstr "" + +#: ../../../c-api/threads.rst:269 +msgid "" +"Then, on each call into Python -- which may happen many times over the " +"thread's life -- attach the thread state, make the Python C API calls that " +"require it, and detach again so the thread does not hold the GIL while off " +"doing non-Python work::" +msgstr "" + +#: ../../../c-api/threads.rst:278 +msgid "" +"When the thread is finished calling into Python, destroy the thread state " +"once::" +msgstr "" + +#: ../../../c-api/threads.rst:284 +msgid "" +"The general-purpose entry points for calling in from a foreign thread -- :c:" +"func:`PyThreadState_Ensure` and the older :c:func:`PyGILState_Ensure` -- do " +"*not* guarantee a persistent thread state: their thread-state lifetime is " +"deliberately implementation-defined, so a matched acquire/release pair may " +"create and destroy a thread state each time. Use :c:func:" +"`PyThreadState_New`, as shown here, whenever you specifically want to reuse " +"one thread state across calls." +msgstr "" + +#: ../../../c-api/threads.rst:292 +msgid "" +"The code that created the foreign thread must arrange for the shutdown " +"sequence to run before the thread exits, and before :c:func:`Py_FinalizeEx` " +"is called. If interpreter finalization begins first, the shutdown :c:func:" +"`PyEval_RestoreThread` call will hang the thread rather than return (see :" +"ref:`cautions-regarding-runtime-finalization`). If the thread exits without " +"running the shutdown sequence, the thread state is leaked for the remainder " +"of the process." +msgstr "" + +#: ../../../c-api/threads.rst:303 msgid "Attaching/detaching thread states" msgstr "" -#: ../../../c-api/threads.rst:252 +#: ../../../c-api/threads.rst:307 msgid "" "Ensure that the thread has an attached thread state for the interpreter " "protected by *guard*, and thus can safely invoke that interpreter." msgstr "" -#: ../../../c-api/threads.rst:256 +#: ../../../c-api/threads.rst:311 msgid "" "It is OK to call this function if the thread already has an attached thread " "state, as long as there is a subsequent call to :c:func:" @@ -288,25 +355,25 @@ msgid "" "to this function are permitted)." msgstr "" -#: ../../../c-api/threads.rst:261 +#: ../../../c-api/threads.rst:316 msgid "" "The function's effect (if any) will be reversed by the matching call to :c:" "func:`PyThreadState_Release`." msgstr "" -#: ../../../c-api/threads.rst:264 +#: ../../../c-api/threads.rst:319 msgid "" "On error, this function returns ``NULL`` *without* an exception set. Do not " "call :c:func:`!PyThreadState_Release` in this case." msgstr "" -#: ../../../c-api/threads.rst:267 +#: ../../../c-api/threads.rst:322 msgid "" "On success, this function returns a pointer value that must be passed to the " "matching call to :c:func:`!PyThreadState_Release`." msgstr "" -#: ../../../c-api/threads.rst:270 +#: ../../../c-api/threads.rst:325 msgid "" "The conditions in which this function creates a new :term:`thread state` are " "considered unstable and implementation-dependent. If you need to control the " @@ -318,13 +385,13 @@ msgid "" "similar state will be retained across Python versions." msgstr "" -#: ../../../c-api/threads.rst:281 +#: ../../../c-api/threads.rst:336 msgid "" "The exact behavior of whether this function creates a new thread state is " "described below, but be aware that this may change in the future." msgstr "" -#: ../../../c-api/threads.rst:284 +#: ../../../c-api/threads.rst:339 msgid "" "First, this function checks if an attached thread state is present. If there " "is, this function then checks if the interpreter of that thread state " @@ -333,7 +400,7 @@ msgid "" "``PyThreadState_Ensure`` call and returns." msgstr "" -#: ../../../c-api/threads.rst:290 +#: ../../../c-api/threads.rst:345 msgid "" "If there is no attached thread state, then this function checks if any " "thread state has been used by the current OS thread. (This is returned by :c:" @@ -342,18 +409,18 @@ msgid "" "re-attached and marked as used." msgstr "" -#: ../../../c-api/threads.rst:296 +#: ../../../c-api/threads.rst:351 msgid "" "Otherwise, if both of the above cases fail, a new thread state is created " "for *guard*. It is then attached and marked as owned by " "``PyThreadState_Ensure``." msgstr "" -#: ../../../c-api/threads.rst:304 +#: ../../../c-api/threads.rst:359 msgid "Get an attached thread state for the interpreter referenced by *view*." msgstr "" -#: ../../../c-api/threads.rst:306 +#: ../../../c-api/threads.rst:361 msgid "" "The behavior and return value are the same as for :c:func:" "`PyThreadState_Ensure`; additionally, if the function succeeds, the " @@ -361,38 +428,38 @@ msgid "" "be released upon the corresponding :c:func:`PyThreadState_Release` call." msgstr "" -#: ../../../c-api/threads.rst:316 +#: ../../../c-api/threads.rst:371 msgid "" "Undo a :c:func:`PyThreadState_Ensure` or :c:func:" "`PyThreadState_EnsureFromView` call." msgstr "" -#: ../../../c-api/threads.rst:319 +#: ../../../c-api/threads.rst:374 msgid "" "This must be called exactly once for each successful *Ensure* call, with " "*token* set to that call's return value." msgstr "" -#: ../../../c-api/threads.rst:322 +#: ../../../c-api/threads.rst:377 msgid "" "The state that was attached before the corresponding *Ensure* call (if any) " "will be attached when :c:func:`PyThreadState_Release` returns." msgstr "" -#: ../../../c-api/threads.rst:325 +#: ../../../c-api/threads.rst:380 msgid "" "The exact behavior of whether this function deletes a thread state is " "considered unstable and implementation-dependent." msgstr "" -#: ../../../c-api/threads.rst:330 +#: ../../../c-api/threads.rst:385 msgid "" "Currently, this function will decrement an internal counter on the attached " "thread state. If this counter ever reaches below zero, this function emits a " "fatal error (via :c:func:`Py_FatalError`)." msgstr "" -#: ../../../c-api/threads.rst:334 +#: ../../../c-api/threads.rst:389 msgid "" "If the attached thread state is owned by ``PyThreadState_Ensure``, then the " "attached thread state will be deallocated and deleted upon the internal " @@ -400,17 +467,17 @@ msgid "" "zero." msgstr "" -#: ../../../c-api/threads.rst:342 +#: ../../../c-api/threads.rst:397 msgid "" "An opaque token retrieved from a :c:func:`PyThreadState_Ensure` call and " "passed to a corresponding :c:func:`PyThreadState_Release` call." msgstr "" -#: ../../../c-api/threads.rst:350 +#: ../../../c-api/threads.rst:405 msgid "GIL-state APIs" msgstr "" -#: ../../../c-api/threads.rst:352 +#: ../../../c-api/threads.rst:407 msgid "" "The following APIs are generally not compatible with subinterpreters and " "will hang the process during interpreter finalization (see :ref:`cautions-" @@ -419,21 +486,21 @@ msgid "" "threads>`." msgstr "" -#: ../../../c-api/threads.rst:361 +#: ../../../c-api/threads.rst:416 msgid "" "The type of the value returned by :c:func:`PyGILState_Ensure` and passed to :" "c:func:`PyGILState_Release`." msgstr "" -#: ../../../c-api/threads.rst:366 +#: ../../../c-api/threads.rst:421 msgid "The GIL was already held when :c:func:`PyGILState_Ensure` was called." msgstr "" -#: ../../../c-api/threads.rst:370 +#: ../../../c-api/threads.rst:425 msgid "The GIL was not held when :c:func:`PyGILState_Ensure` was called." msgstr "" -#: ../../../c-api/threads.rst:375 +#: ../../../c-api/threads.rst:430 msgid "" "Ensure that the current thread is ready to call the Python C API regardless " "of the current state of Python, or of the :term:`attached thread state`. " @@ -446,7 +513,7 @@ msgid "" "is acceptable." msgstr "" -#: ../../../c-api/threads.rst:385 +#: ../../../c-api/threads.rst:440 msgid "" "The return value is an opaque \"handle\" to the :term:`attached thread " "state` when :c:func:`PyGILState_Ensure` was called, and must be passed to :c:" @@ -456,13 +523,13 @@ msgid "" "to :c:func:`PyGILState_Release`." msgstr "" -#: ../../../c-api/threads.rst:392 +#: ../../../c-api/threads.rst:447 msgid "" "When the function returns, there will be an :term:`attached thread state` " "and the thread will be able to call arbitrary Python code." msgstr "" -#: ../../../c-api/threads.rst:395 +#: ../../../c-api/threads.rst:450 msgid "" "This function has no way to return an error. As such, errors are either " "fatal (that is, they send ``SIGABRT`` and crash the process; see :c:func:" @@ -470,14 +537,14 @@ msgid "" "interpreter finalization)." msgstr "" -#: ../../../c-api/threads.rst:401 +#: ../../../c-api/threads.rst:456 msgid "" "Calling this function when the interpreter is finalizing will infinitely " "hang the thread, which may cause deadlocks. :ref:`cautions-regarding-runtime-" "finalization` for more details." msgstr "" -#: ../../../c-api/threads.rst:405 +#: ../../../c-api/threads.rst:460 msgid "" "In addition, this function generally does not work with subinterpreters when " "used from foreign threads, because this function has no way of knowing which " @@ -485,20 +552,20 @@ msgid "" "interpreter)." msgstr "" -#: ../../../c-api/threads.rst:410 ../../../c-api/threads.rst:570 -#: ../../../c-api/threads.rst:764 +#: ../../../c-api/threads.rst:465 ../../../c-api/threads.rst:625 +#: ../../../c-api/threads.rst:819 msgid "" "Hangs the current thread, rather than terminating it, if called while the " "interpreter is finalizing." msgstr "" -#: ../../../c-api/threads.rst:414 +#: ../../../c-api/threads.rst:469 msgid "" "Use :c:func:`PyThreadState_Ensure` or :c:func:`PyThreadState_EnsureFromView` " "instead." msgstr "" -#: ../../../c-api/threads.rst:421 +#: ../../../c-api/threads.rst:476 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:" @@ -506,45 +573,45 @@ msgid "" "caller, hence the use of the GIL-state API)." msgstr "" -#: ../../../c-api/threads.rst:426 +#: ../../../c-api/threads.rst:481 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/threads.rst:429 +#: ../../../c-api/threads.rst:484 msgid "Use :c:func:`PyThreadState_Release` instead." msgstr "" -#: ../../../c-api/threads.rst:435 +#: ../../../c-api/threads.rst:490 msgid "" "Get the :term:`thread state` that was most recently :term:`attached " "` for this thread. (If the most recent thread state " "has been deleted, this returns ``NULL``.)" msgstr "" -#: ../../../c-api/threads.rst:439 +#: ../../../c-api/threads.rst:494 msgid "If the caller has an attached thread state, it is returned." msgstr "" -#: ../../../c-api/threads.rst:441 +#: ../../../c-api/threads.rst:496 msgid "" "In other terms, this function returns the thread state that will be used by :" "c:func:`PyGILState_Ensure`. If this returns ``NULL``, then " "``PyGILState_Ensure`` will create a new thread state." msgstr "" -#: ../../../c-api/threads.rst:445 +#: ../../../c-api/threads.rst:500 msgid "This function cannot fail." msgstr "" -#: ../../../c-api/threads.rst:447 +#: ../../../c-api/threads.rst:502 msgid "" "Use :c:func:`PyThreadState_Get` or :c:func:`PyThreadState_GetUnchecked` " "instead." msgstr "" -#: ../../../c-api/threads.rst:454 +#: ../../../c-api/threads.rst:509 msgid "" "Return ``1`` if the current thread has an :term:`attached thread state` that " "matches the thread state returned by :c:func:" @@ -552,25 +619,25 @@ msgid "" "or it otherwise doesn't match, then this returns ``0``." msgstr "" -#: ../../../c-api/threads.rst:459 +#: ../../../c-api/threads.rst:514 msgid "" "If the current Python process has ever created a subinterpreter, this " "function will *always* return ``1``." msgstr "" -#: ../../../c-api/threads.rst:462 +#: ../../../c-api/threads.rst:517 msgid "This is mainly a helper/diagnostic function." msgstr "" -#: ../../../c-api/threads.rst:466 +#: ../../../c-api/threads.rst:521 msgid "Use ``PyThreadState_GetUnchecked() != NULL`` instead." msgstr "" -#: ../../../c-api/threads.rst:473 +#: ../../../c-api/threads.rst:528 msgid "Cautions about fork()" msgstr "" -#: ../../../c-api/threads.rst:475 +#: ../../../c-api/threads.rst:530 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 " @@ -579,7 +646,7 @@ msgid "" "CPython's runtime." msgstr "" -#: ../../../c-api/threads.rst:481 +#: ../../../c-api/threads.rst:536 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` " @@ -596,7 +663,7 @@ msgid "" "locks, but is not always able to." msgstr "" -#: ../../../c-api/threads.rst:496 +#: ../../../c-api/threads.rst:551 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 " @@ -609,64 +676,64 @@ msgid "" "called immediately after." msgstr "" -#: ../../../c-api/threads.rst:509 +#: ../../../c-api/threads.rst:564 msgid "High-level APIs" msgstr "" -#: ../../../c-api/threads.rst:511 +#: ../../../c-api/threads.rst:566 msgid "" "These are the most commonly used types and functions when writing multi-" "threaded C extensions." msgstr "" -#: ../../../c-api/threads.rst:517 +#: ../../../c-api/threads.rst:572 msgid "" "This data structure represents the state of a single thread. The only " "public data member is:" msgstr "" -#: ../../../c-api/threads.rst:522 +#: ../../../c-api/threads.rst:577 msgid "This thread's interpreter state." msgstr "" -#: ../../../c-api/threads.rst:533 +#: ../../../c-api/threads.rst:588 msgid "Deprecated function which does nothing." msgstr "" -#: ../../../c-api/threads.rst:535 +#: ../../../c-api/threads.rst:590 msgid "" "In Python 3.6 and older, this function created the GIL if it didn't exist." msgstr "" -#: ../../../c-api/threads.rst:537 +#: ../../../c-api/threads.rst:592 msgid "The function now does nothing." msgstr "" -#: ../../../c-api/threads.rst:540 +#: ../../../c-api/threads.rst:595 msgid "" "This function is now called by :c:func:`Py_Initialize()`, so you don't have " "to call it yourself anymore." msgstr "" -#: ../../../c-api/threads.rst:544 +#: ../../../c-api/threads.rst:599 msgid "" "This function cannot be called before :c:func:`Py_Initialize()` anymore." msgstr "" -#: ../../../c-api/threads.rst:554 +#: ../../../c-api/threads.rst:609 msgid "" "Detach the :term:`attached thread state` and return it. The thread will have " "no :term:`thread state` upon returning." msgstr "" -#: ../../../c-api/threads.rst:560 +#: ../../../c-api/threads.rst:615 msgid "" "Set the :term:`attached thread state` to *tstate*. The passed :term:`thread " "state` **should not** be :term:`attached `, otherwise " "deadlock ensues. *tstate* will be attached upon returning." msgstr "" -#: ../../../c-api/threads.rst:565 ../../../c-api/threads.rst:754 +#: ../../../c-api/threads.rst:620 ../../../c-api/threads.rst:809 msgid "" "Calling this function from a thread when the runtime is finalizing will hang " "the thread until the program exits, even if the thread was not created by " @@ -674,7 +741,7 @@ msgid "" "details." msgstr "" -#: ../../../c-api/threads.rst:576 +#: ../../../c-api/threads.rst:631 msgid "" "Return the :term:`attached thread state`. If the thread has no attached " "thread state, (such as when inside of :c:macro:`Py_BEGIN_ALLOW_THREADS` " @@ -682,152 +749,152 @@ msgid "" "``NULL``)." msgstr "" -#: ../../../c-api/threads.rst:581 +#: ../../../c-api/threads.rst:636 msgid "See also :c:func:`PyThreadState_GetUnchecked`." msgstr "" -#: ../../../c-api/threads.rst:585 +#: ../../../c-api/threads.rst:640 msgid "" "Similar to :c:func:`PyThreadState_Get`, but don't kill the process with a " "fatal error if it is NULL. The caller is responsible to check if the result " "is NULL." msgstr "" -#: ../../../c-api/threads.rst:589 +#: ../../../c-api/threads.rst:644 msgid "" "In Python 3.5 to 3.12, the function was private and known as " "``_PyThreadState_UncheckedGet()``." msgstr "" -#: ../../../c-api/threads.rst:596 +#: ../../../c-api/threads.rst:651 msgid "" "Set the :term:`attached thread state` to *tstate*, and return the :term:" "`thread state` that was attached prior to calling." msgstr "" -#: ../../../c-api/threads.rst:599 +#: ../../../c-api/threads.rst:654 msgid "" "This function is safe to call without an :term:`attached thread state`; it " "will simply return ``NULL`` indicating that there was no prior thread state." msgstr "" -#: ../../../c-api/threads.rst:603 +#: ../../../c-api/threads.rst:658 msgid ":c:func:`PyEval_ReleaseThread`" msgstr "" -#: ../../../c-api/threads.rst:606 +#: ../../../c-api/threads.rst:661 msgid "" "Similar to :c:func:`PyGILState_Ensure`, this function will hang the thread " "if the runtime is finalizing." msgstr "" -#: ../../../c-api/threads.rst:611 +#: ../../../c-api/threads.rst:666 msgid "Low-level APIs" msgstr "" -#: ../../../c-api/threads.rst:615 +#: ../../../c-api/threads.rst:670 msgid "" "Create a new thread state object belonging to the given interpreter object. " "An :term:`attached thread state` is not needed." msgstr "" -#: ../../../c-api/threads.rst:620 +#: ../../../c-api/threads.rst:675 msgid "" "Reset all information in a :term:`thread state` object. *tstate* must be :" "term:`attached `" msgstr "" -#: ../../../c-api/threads.rst:623 +#: ../../../c-api/threads.rst:678 msgid "" "This function now calls the :c:member:`!PyThreadState.on_delete` callback. " "Previously, that happened in :c:func:`PyThreadState_Delete`." msgstr "" -#: ../../../c-api/threads.rst:627 +#: ../../../c-api/threads.rst:682 msgid "The :c:member:`!PyThreadState.on_delete` callback was removed." msgstr "" -#: ../../../c-api/threads.rst:633 +#: ../../../c-api/threads.rst:688 msgid "" "Destroy a :term:`thread state` object. *tstate* should not be :term:" "`attached ` to any thread. *tstate* must have been " "reset with a previous call to :c:func:`PyThreadState_Clear`." msgstr "" -#: ../../../c-api/threads.rst:641 +#: ../../../c-api/threads.rst:696 msgid "" "Detach the :term:`attached thread state` (which must have been reset with a " "previous call to :c:func:`PyThreadState_Clear`) and then destroy it." msgstr "" -#: ../../../c-api/threads.rst:644 +#: ../../../c-api/threads.rst:699 msgid "" "No :term:`thread state` will be :term:`attached ` " "upon returning." msgstr "" -#: ../../../c-api/threads.rst:649 +#: ../../../c-api/threads.rst:704 msgid "Get the current frame of the Python thread state *tstate*." msgstr "" -#: ../../../c-api/threads.rst:651 +#: ../../../c-api/threads.rst:706 msgid "" "Return a :term:`strong reference`. Return ``NULL`` if no frame is currently " "executing." msgstr "" -#: ../../../c-api/threads.rst:654 +#: ../../../c-api/threads.rst:709 msgid "See also :c:func:`PyEval_GetFrame`." msgstr "" -#: ../../../c-api/threads.rst:656 ../../../c-api/threads.rst:665 -#: ../../../c-api/threads.rst:674 +#: ../../../c-api/threads.rst:711 ../../../c-api/threads.rst:720 +#: ../../../c-api/threads.rst:729 msgid "" "*tstate* must not be ``NULL``, and must be :term:`attached `." msgstr "" -#: ../../../c-api/threads.rst:663 +#: ../../../c-api/threads.rst:718 msgid "" "Get the unique :term:`thread state` identifier of the Python thread state " "*tstate*." msgstr "" -#: ../../../c-api/threads.rst:672 +#: ../../../c-api/threads.rst:727 msgid "Get the interpreter of the Python thread state *tstate*." msgstr "" -#: ../../../c-api/threads.rst:681 +#: ../../../c-api/threads.rst:736 msgid "Suspend tracing and profiling in the Python thread state *tstate*." msgstr "" -#: ../../../c-api/threads.rst:683 +#: ../../../c-api/threads.rst:738 msgid "Resume them using the :c:func:`PyThreadState_LeaveTracing` function." msgstr "" -#: ../../../c-api/threads.rst:690 +#: ../../../c-api/threads.rst:745 msgid "" "Resume tracing and profiling in the Python thread state *tstate* suspended " "by the :c:func:`PyThreadState_EnterTracing` function." msgstr "" -#: ../../../c-api/threads.rst:693 +#: ../../../c-api/threads.rst:748 msgid "" "See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions." msgstr "" -#: ../../../c-api/threads.rst:701 +#: ../../../c-api/threads.rst:756 msgid "" "Set the stack protection start address and stack protection size of a Python " "thread state." msgstr "" -#: ../../../c-api/threads.rst:704 +#: ../../../c-api/threads.rst:759 msgid "" "On success, return ``0``. On failure, set an exception and return ``-1``." msgstr "" -#: ../../../c-api/threads.rst:707 +#: ../../../c-api/threads.rst:762 msgid "" "CPython implements :ref:`recursion control ` for C code by " "raising :py:exc:`RecursionError` when it notices that the machine execution " @@ -840,31 +907,31 @@ msgid "" "change." msgstr "" -#: ../../../c-api/threads.rst:716 +#: ../../../c-api/threads.rst:771 msgid "" "Call :c:func:`~PyUnstable_ThreadState_SetStackProtection` either before or " "after changing the stack. Do not call any other Python C API between the " "call and the stack change." msgstr "" -#: ../../../c-api/threads.rst:721 +#: ../../../c-api/threads.rst:776 msgid "" "See :c:func:`PyUnstable_ThreadState_ResetStackProtection` for undoing this " "operation." msgstr "" -#: ../../../c-api/threads.rst:728 +#: ../../../c-api/threads.rst:783 msgid "" "Reset the stack protection start address and stack protection size of a " "Python thread state to the operating system defaults." msgstr "" -#: ../../../c-api/threads.rst:731 +#: ../../../c-api/threads.rst:786 msgid "" "See :c:func:`PyUnstable_ThreadState_SetStackProtection` for an explanation." msgstr "" -#: ../../../c-api/threads.rst:738 +#: ../../../c-api/threads.rst:793 msgid "" "Return a dictionary in which extensions can store thread-specific state " "information. Each extension should use a unique key to store a state in the " @@ -874,62 +941,62 @@ msgid "" "thread state is attached." msgstr "" -#: ../../../c-api/threads.rst:748 +#: ../../../c-api/threads.rst:803 msgid "" ":term:`Attach ` *tstate* to the current thread, which " "must not be ``NULL`` or already :term:`attached `." msgstr "" -#: ../../../c-api/threads.rst:751 +#: ../../../c-api/threads.rst:806 msgid "" "The calling thread must not already have an :term:`attached thread state`." msgstr "" -#: ../../../c-api/threads.rst:759 +#: ../../../c-api/threads.rst:814 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/threads.rst:768 +#: ../../../c-api/threads.rst:823 msgid "" ":c:func:`PyEval_RestoreThread` is a higher-level function which is always " "available (even when threads have not been initialized)." msgstr "" -#: ../../../c-api/threads.rst:774 +#: ../../../c-api/threads.rst:829 msgid "" "Detach the :term:`attached thread state`. The *tstate* argument, which must " "not be ``NULL``, is only used to check that it represents the :term:" "`attached thread state` --- if it isn't, a fatal error is reported." msgstr "" -#: ../../../c-api/threads.rst:779 +#: ../../../c-api/threads.rst:834 msgid "" ":c:func:`PyEval_SaveThread` is a higher-level function which is always " "available (even when threads have not been initialized)." msgstr "" -#: ../../../c-api/threads.rst:784 +#: ../../../c-api/threads.rst:839 msgid "Asynchronous notifications" msgstr "" -#: ../../../c-api/threads.rst:786 +#: ../../../c-api/threads.rst:841 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/threads.rst:793 +#: ../../../c-api/threads.rst:848 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/threads.rst:797 +#: ../../../c-api/threads.rst:852 msgid "" "When successfully queued, *func* will be *eventually* called from the main " "interpreter thread with the argument *arg*. It will be called " @@ -937,17 +1004,17 @@ msgid "" "these conditions met:" msgstr "" -#: ../../../c-api/threads.rst:802 +#: ../../../c-api/threads.rst:857 msgid "on a :term:`bytecode` boundary;" msgstr "" -#: ../../../c-api/threads.rst:803 +#: ../../../c-api/threads.rst:858 msgid "" "with the main thread holding an :term:`attached thread state` (*func* can " "therefore use the full C API)." msgstr "" -#: ../../../c-api/threads.rst:806 +#: ../../../c-api/threads.rst:861 msgid "" "*func* must return ``0`` on success, or ``-1`` on failure with an exception " "set. *func* won't be interrupted to perform another asynchronous " @@ -955,7 +1022,7 @@ msgid "" "if the :term:`thread state ` is detached." msgstr "" -#: ../../../c-api/threads.rst:811 +#: ../../../c-api/threads.rst:866 msgid "" "This function doesn't need an :term:`attached thread state`. However, to " "call this function in a subinterpreter, the caller must have an :term:" @@ -963,7 +1030,7 @@ msgid "" "be called from the wrong interpreter." msgstr "" -#: ../../../c-api/threads.rst:816 +#: ../../../c-api/threads.rst:871 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 " @@ -973,7 +1040,7 @@ msgid "" "`PyThreadState_EnsureFromView`." msgstr "" -#: ../../../c-api/threads.rst:825 +#: ../../../c-api/threads.rst:880 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 " @@ -981,48 +1048,48 @@ msgid "" "scheduled calls." msgstr "" -#: ../../../c-api/threads.rst:831 +#: ../../../c-api/threads.rst:886 msgid "" "This function now always schedules *func* to be run in the main interpreter." msgstr "" -#: ../../../c-api/threads.rst:838 +#: ../../../c-api/threads.rst:893 msgid "" "Execute all pending calls. This is usually executed automatically by the " "interpreter." msgstr "" -#: ../../../c-api/threads.rst:841 +#: ../../../c-api/threads.rst:896 msgid "" "This function returns ``0`` on success, and returns ``-1`` with an exception " "set on failure." msgstr "" -#: ../../../c-api/threads.rst:844 +#: ../../../c-api/threads.rst:899 msgid "" "If this is not called in the main thread of the main interpreter, this " "function does nothing and returns ``0``. The caller must hold an :term:" "`attached thread state`." msgstr "" -#: ../../../c-api/threads.rst:850 +#: ../../../c-api/threads.rst:905 msgid "This function only runs pending calls in the main interpreter." msgstr "" -#: ../../../c-api/threads.rst:856 +#: ../../../c-api/threads.rst:911 msgid "" "Schedule an exception to be raised asynchronously in a thread. If the thread " "has a previously scheduled exception, it is overwritten." msgstr "" -#: ../../../c-api/threads.rst:859 +#: ../../../c-api/threads.rst:914 msgid "" "The *id* argument is the thread id of the target thread, as returned by :c:" "func:`PyThread_get_thread_ident`. *exc* is the class of the exception to be " "raised, or ``NULL`` to clear the pending exception (if any)." msgstr "" -#: ../../../c-api/threads.rst:864 +#: ../../../c-api/threads.rst:919 msgid "" "Return the number of affected thread states. This is normally ``1`` if *id* " "is found, even when no change was made (the given *exc* was already pending, " @@ -1030,119 +1097,119 @@ msgid "" "found, return ``0``. This raises no exceptions." msgstr "" -#: ../../../c-api/threads.rst:870 +#: ../../../c-api/threads.rst:925 msgid "" "To prevent naive misuse, you must write your own C extension to call this. " "This function must be called with an :term:`attached thread state`. This " -"function does not steal any references to *exc*. This function does not " -"necessarily interrupt system calls such as :py:func:`~time.sleep`." +"function does not :term:`steal` any references to *exc*. This function does " +"not necessarily interrupt system calls such as :py:func:`~time.sleep`." msgstr "" -#: ../../../c-api/threads.rst:876 +#: ../../../c-api/threads.rst:931 msgid "" "The type of the *id* parameter changed from :c:expr:`long` to :c:expr:" "`unsigned long`." msgstr "" -#: ../../../c-api/threads.rst:882 +#: ../../../c-api/threads.rst:937 msgid "Operating system thread APIs" msgstr "" -#: ../../../c-api/threads.rst:886 +#: ../../../c-api/threads.rst:941 msgid "Sentinel value for an invalid thread ID." msgstr "" -#: ../../../c-api/threads.rst:888 +#: ../../../c-api/threads.rst:943 msgid "This is currently equivalent to ``(unsigned long)-1``." msgstr "" -#: ../../../c-api/threads.rst:893 +#: ../../../c-api/threads.rst:948 msgid "" "Start function *func* in a new thread with argument *arg*. The resulting " "thread is not intended to be joined." msgstr "" -#: ../../../c-api/threads.rst:896 +#: ../../../c-api/threads.rst:951 msgid "*func* must not be ``NULL``, but *arg* may be ``NULL``." msgstr "" -#: ../../../c-api/threads.rst:898 +#: ../../../c-api/threads.rst:953 msgid "" "On success, this function returns the identifier of the new thread; on " "failure, this returns :c:macro:`PYTHREAD_INVALID_THREAD_ID`." msgstr "" -#: ../../../c-api/threads.rst:901 ../../../c-api/threads.rst:986 -#: ../../../c-api/threads.rst:994 +#: ../../../c-api/threads.rst:956 ../../../c-api/threads.rst:1041 +#: ../../../c-api/threads.rst:1049 msgid "The caller does not need to hold an :term:`attached thread state`." msgstr "" -#: ../../../c-api/threads.rst:906 +#: ../../../c-api/threads.rst:961 msgid "Return the identifier of the current thread, which will never be zero." msgstr "" -#: ../../../c-api/threads.rst:908 ../../../c-api/threads.rst:941 +#: ../../../c-api/threads.rst:963 ../../../c-api/threads.rst:996 msgid "" "This function cannot fail, and the caller does not need to hold an :term:" "`attached thread state`." msgstr "" -#: ../../../c-api/threads.rst:912 +#: ../../../c-api/threads.rst:967 msgid "" ":py:func:`threading.get_ident` and :py:attr:`threading.Thread.ident` expose " "this identifier to Python." msgstr "" -#: ../../../c-api/threads.rst:918 +#: ../../../c-api/threads.rst:973 msgid "" "Get general information about the current thread in the form of a :ref:" "`struct sequence ` object. This information is " "accessible as :py:attr:`sys.thread_info` in Python." msgstr "" -#: ../../../c-api/threads.rst:922 +#: ../../../c-api/threads.rst:977 msgid "" "On success, this returns a new :term:`strong reference` to the thread " "information; on failure, this returns ``NULL`` with an exception set." msgstr "" -#: ../../../c-api/threads.rst:925 +#: ../../../c-api/threads.rst:980 msgid "The caller must hold an :term:`attached thread state`." msgstr "" -#: ../../../c-api/threads.rst:930 +#: ../../../c-api/threads.rst:985 msgid "This macro is defined when the system supports native thread IDs." msgstr "" -#: ../../../c-api/threads.rst:935 +#: ../../../c-api/threads.rst:990 msgid "" "Get the native identifier of the current thread as it was assigned by the " "operating system's kernel, which will never be less than zero." msgstr "" -#: ../../../c-api/threads.rst:938 +#: ../../../c-api/threads.rst:993 msgid "" "This function is only available when :c:macro:`PY_HAVE_THREAD_NATIVE_ID` is " "defined." msgstr "" -#: ../../../c-api/threads.rst:945 +#: ../../../c-api/threads.rst:1000 msgid ":py:func:`threading.get_native_id`" msgstr "" -#: ../../../c-api/threads.rst:950 +#: ../../../c-api/threads.rst:1005 msgid "" "Terminate the current thread. This function is generally considered unsafe " "and should be avoided. It is kept solely for backwards compatibility." msgstr "" -#: ../../../c-api/threads.rst:953 +#: ../../../c-api/threads.rst:1008 msgid "" "This function is only safe to call if all functions in the full call stack " "are written to safely allow it." msgstr "" -#: ../../../c-api/threads.rst:958 +#: ../../../c-api/threads.rst:1013 msgid "" "If the current system uses POSIX threads (also known as \"pthreads\"), this " "calls :manpage:`pthread_exit(3)`, which attempts to unwind the stack and " @@ -1151,34 +1218,34 @@ msgid "" "systems, such as macOS, do unwinding." msgstr "" -#: ../../../c-api/threads.rst:964 +#: ../../../c-api/threads.rst:1019 msgid "" "On Windows, this function calls ``_endthreadex()``, which kills the thread " "without calling C++ destructors." msgstr "" -#: ../../../c-api/threads.rst:967 +#: ../../../c-api/threads.rst:1022 msgid "In any case, there is a risk of corruption on the thread's stack." msgstr "" -#: ../../../c-api/threads.rst:974 +#: ../../../c-api/threads.rst:1029 msgid "" "Initialize ``PyThread*`` APIs. Python executes this function automatically, " "so there's little need to call it from an extension module." msgstr "" -#: ../../../c-api/threads.rst:980 +#: ../../../c-api/threads.rst:1035 msgid "Set the stack size of the current thread to *size* bytes." msgstr "" -#: ../../../c-api/threads.rst:982 +#: ../../../c-api/threads.rst:1037 msgid "" "This function returns ``0`` on success, ``-1`` if *size* is invalid, or " "``-2`` if the system does not support changing the stack size. This function " "does not set exceptions." msgstr "" -#: ../../../c-api/threads.rst:991 +#: ../../../c-api/threads.rst:1046 msgid "" "Return the stack size of the current thread in bytes, or ``0`` if the " "system's default stack size is in use." @@ -1220,26 +1287,26 @@ msgstr "" msgid "PyEval_SaveThread (C function)" msgstr "" -#: ../../../c-api/threads.rst:527 +#: ../../../c-api/threads.rst:582 msgid "PyEval_AcquireThread()" msgstr "" -#: ../../../c-api/threads.rst:527 +#: ../../../c-api/threads.rst:582 msgid "PyEval_ReleaseThread()" msgstr "" -#: ../../../c-api/threads.rst:527 +#: ../../../c-api/threads.rst:582 msgid "PyEval_SaveThread()" msgstr "" -#: ../../../c-api/threads.rst:527 +#: ../../../c-api/threads.rst:582 msgid "PyEval_RestoreThread()" msgstr "" -#: ../../../c-api/threads.rst:549 +#: ../../../c-api/threads.rst:604 msgid "module" msgstr "" -#: ../../../c-api/threads.rst:549 +#: ../../../c-api/threads.rst:604 msgid "_thread" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/tuple.pot b/main/locale/pot/LC_MESSAGES/c-api/tuple.pot index 804df2d8c02..5b20d6066bd 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/tuple.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/tuple.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-04-13 10:56+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -124,39 +124,40 @@ msgstr "" #: ../../../c-api/tuple.rst:107 msgid "" -"This function \"steals\" a reference to *o* and discards a reference to an " -"item already in the tuple at the affected position." +"This function \":term:`steals `\" a reference to *o* and discards a " +"reference to an item already in the tuple at the affected position (unless " +"it was NULL)." msgstr "" -#: ../../../c-api/tuple.rst:113 +#: ../../../c-api/tuple.rst:114 msgid "" "Like :c:func:`PyTuple_SetItem`, but does no error checking, and should " "*only* be used to fill in brand new tuples, using it on an existing tuple is " "thread-unsafe." msgstr "" -#: ../../../c-api/tuple.rst:116 ../../../c-api/tuple.rst:243 -#: ../../../c-api/tuple.rst:261 +#: ../../../c-api/tuple.rst:117 ../../../c-api/tuple.rst:244 +#: ../../../c-api/tuple.rst:262 msgid "" "Bounds checking is performed as an assertion if Python is built in :ref:" "`debug mode ` or :option:`with assertions <--with-assertions>`." msgstr "" -#: ../../../c-api/tuple.rst:121 +#: ../../../c-api/tuple.rst:122 msgid "" -"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." +"This function \":term:`steals `\" a reference to *o*, and, unlike :c:" +"func:`PyTuple_SetItem`, does *not* discard a reference to any item that is " +"being replaced; any reference in the tuple at position *pos* will be leaked." msgstr "" -#: ../../../c-api/tuple.rst:128 +#: ../../../c-api/tuple.rst:129 msgid "" "This macro should *only* be used on tuples that are newly created. Using " "this macro on a tuple that is already in use (or in other words, has a " "refcount > 1) could lead to undefined behavior." msgstr "" -#: ../../../c-api/tuple.rst:135 +#: ../../../c-api/tuple.rst:136 msgid "" "Can be used to resize a tuple. *newsize* will be the new length of the " "tuple. Because tuples are *supposed* to be immutable, this should only be " @@ -171,67 +172,67 @@ msgid "" "`SystemError`." msgstr "" -#: ../../../c-api/tuple.rst:150 +#: ../../../c-api/tuple.rst:151 msgid "Struct Sequence Objects" msgstr "" -#: ../../../c-api/tuple.rst:152 +#: ../../../c-api/tuple.rst:153 msgid "" "A struct sequence object is a :term:`named tuple`, that is, a sequence whose " "items can also be accessed through attributes. It is similar to :func:" "`collections.namedtuple`, but provides a slightly different interface." msgstr "" -#: ../../../c-api/tuple.rst:157 +#: ../../../c-api/tuple.rst:158 msgid "" "To create a struct sequence, you first have to create a specific struct " "sequence type." msgstr "" -#: ../../../c-api/tuple.rst:162 +#: ../../../c-api/tuple.rst:163 msgid "" "Create a new struct sequence type from the data in *desc*, described below. " "Instances of the resulting type can be created with :c:func:" "`PyStructSequence_New`." msgstr "" -#: ../../../c-api/tuple.rst:165 ../../../c-api/tuple.rst:234 +#: ../../../c-api/tuple.rst:166 ../../../c-api/tuple.rst:235 msgid "Return ``NULL`` with an exception set on failure." msgstr "" -#: ../../../c-api/tuple.rst:170 +#: ../../../c-api/tuple.rst:171 msgid "Initializes a struct sequence type *type* from *desc* in place." msgstr "" -#: ../../../c-api/tuple.rst:175 +#: ../../../c-api/tuple.rst:176 msgid "" "Like :c:func:`PyStructSequence_InitType`, but returns ``0`` on success and " "``-1`` with an exception set on failure." msgstr "" -#: ../../../c-api/tuple.rst:183 +#: ../../../c-api/tuple.rst:184 msgid "Contains the meta information of a struct sequence type to create." msgstr "" -#: ../../../c-api/tuple.rst:187 +#: ../../../c-api/tuple.rst:188 msgid "" "Fully qualified name of the type; null-terminated UTF-8 encoded. The name " "must contain the module name." msgstr "" -#: ../../../c-api/tuple.rst:192 +#: ../../../c-api/tuple.rst:193 msgid "Pointer to docstring for the type or ``NULL`` to omit." msgstr "" -#: ../../../c-api/tuple.rst:196 +#: ../../../c-api/tuple.rst:197 msgid "Pointer to ``NULL``-terminated array with field names of the new type." msgstr "" -#: ../../../c-api/tuple.rst:200 +#: ../../../c-api/tuple.rst:201 msgid "Number of fields visible to the Python side (if used as tuple)." msgstr "" -#: ../../../c-api/tuple.rst:205 +#: ../../../c-api/tuple.rst:206 msgid "" "Describes a field of a struct sequence. As a struct sequence is modeled as a " "tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :c:" @@ -240,61 +241,61 @@ msgid "" "described." msgstr "" -#: ../../../c-api/tuple.rst:213 +#: ../../../c-api/tuple.rst:214 msgid "" "Name for the field or ``NULL`` to end the list of named fields, set to :c:" "data:`PyStructSequence_UnnamedField` to leave unnamed." msgstr "" -#: ../../../c-api/tuple.rst:218 +#: ../../../c-api/tuple.rst:219 msgid "Field docstring or ``NULL`` to omit." msgstr "" -#: ../../../c-api/tuple.rst:223 +#: ../../../c-api/tuple.rst:224 msgid "Special value for a field name to leave it unnamed." msgstr "" -#: ../../../c-api/tuple.rst:225 +#: ../../../c-api/tuple.rst:226 msgid "The type was changed from ``char *``." msgstr "" -#: ../../../c-api/tuple.rst:231 +#: ../../../c-api/tuple.rst:232 msgid "" "Creates an instance of *type*, which must have been created with :c:func:" "`PyStructSequence_NewType`." msgstr "" -#: ../../../c-api/tuple.rst:239 +#: ../../../c-api/tuple.rst:240 msgid "" "Return the object at position *pos* in the struct sequence pointed to by " "*p*. The returned reference is borrowed from the struct sequence *p* (that " "is: it is only valid as long as you hold a reference to *p*)." msgstr "" -#: ../../../c-api/tuple.rst:249 +#: ../../../c-api/tuple.rst:250 msgid "Alias to :c:func:`PyStructSequence_GetItem`." msgstr "" -#: ../../../c-api/tuple.rst:251 +#: ../../../c-api/tuple.rst:252 msgid "Now implemented as an alias to :c:func:`PyStructSequence_GetItem`." msgstr "" -#: ../../../c-api/tuple.rst:257 +#: ../../../c-api/tuple.rst:258 msgid "" "Sets the field at index *pos* of the struct sequence *p* to value *o*. " "Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand " "new instances." msgstr "" -#: ../../../c-api/tuple.rst:266 -msgid "This function \"steals\" a reference to *o*." +#: ../../../c-api/tuple.rst:267 +msgid "This function \":term:`steals `\" a reference to *o*." msgstr "" -#: ../../../c-api/tuple.rst:271 +#: ../../../c-api/tuple.rst:272 msgid "Alias to :c:func:`PyStructSequence_SetItem`." msgstr "" -#: ../../../c-api/tuple.rst:273 +#: ../../../c-api/tuple.rst:274 msgid "Now implemented as an alias to :c:func:`PyStructSequence_SetItem`." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/type.pot b/main/locale/pot/LC_MESSAGES/c-api/type.pot index 3cd5a29c4d6..a983f00a29e 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/type.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/type.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -811,7 +811,8 @@ msgstr "" #: ../../../c-api/type.rst:641 msgid "" -"The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize`)." +"The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize` is " +"zero)." msgstr "" #: ../../../c-api/type.rst:643 @@ -889,7 +890,7 @@ msgstr "" #: ../../../c-api/type.rst:702 msgid "" -"When not targetting older Python versions, pefer :c:macro:`!Py_tp_bases`." +"When not targeting older Python versions, prefer :c:macro:`!Py_tp_bases`." msgstr "" #: ../../../c-api/type.rst:704 diff --git a/main/locale/pot/LC_MESSAGES/c-api/typeobj.pot b/main/locale/pot/LC_MESSAGES/c-api/typeobj.pot index ac7a264aa27..34592128a6b 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/typeobj.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/typeobj.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -3880,7 +3880,7 @@ msgstr "" msgid "" "Resource cleanup when the counter reaches zero must be done atomically, as " "the final release may race with concurrent releases from other threads and " -"dellocation must only happen once." +"deallocation must only happen once." msgstr "" #: ../../../c-api/typeobj.rst:3056 diff --git a/main/locale/pot/LC_MESSAGES/c-api/unicode.pot b/main/locale/pot/LC_MESSAGES/c-api/unicode.pot index 35c626544e6..e05b8215661 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/unicode.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/unicode.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -931,24 +931,24 @@ msgstr "" msgid "" "Append the string *right* to the end of *p_left*. *p_left* must point to a :" "term:`strong reference` to a Unicode object; :c:func:`!PyUnicode_Append` " -"releases (\"steals\") this reference." +"releases (\":term:`steals `\") this reference." msgstr "" -#: ../../../c-api/unicode.rst:681 +#: ../../../c-api/unicode.rst:682 msgid "On error, set *\\*p_left* to ``NULL`` and set an exception." msgstr "" -#: ../../../c-api/unicode.rst:683 +#: ../../../c-api/unicode.rst:684 msgid "On success, set *\\*p_left* to a new strong reference to the result." msgstr "" -#: ../../../c-api/unicode.rst:688 +#: ../../../c-api/unicode.rst:689 msgid "" "The function is similar to :c:func:`PyUnicode_Append`, with the only " "difference being that it decrements the reference count of *right* by one." msgstr "" -#: ../../../c-api/unicode.rst:694 +#: ../../../c-api/unicode.rst:695 msgid "" "Return a mapping suitable for decoding a custom single-byte encoding. Given " "a Unicode string *string* of up to 256 characters representing an encoding " @@ -957,27 +957,27 @@ msgid "" "return ``NULL`` on invalid input." msgstr "" -#: ../../../c-api/unicode.rst:705 +#: ../../../c-api/unicode.rst:706 msgid "" "Return the name of the default string encoding, ``\"utf-8\"``. See :func:" "`sys.getdefaultencoding`." msgstr "" -#: ../../../c-api/unicode.rst:708 +#: ../../../c-api/unicode.rst:709 msgid "" "The returned string does not need to be freed, and is valid until " "interpreter shutdown." msgstr "" -#: ../../../c-api/unicode.rst:714 +#: ../../../c-api/unicode.rst:715 msgid "Return the length of the Unicode object, in code points." msgstr "" -#: ../../../c-api/unicode.rst:716 +#: ../../../c-api/unicode.rst:717 msgid "On error, set an exception and return ``-1``." msgstr "" -#: ../../../c-api/unicode.rst:727 +#: ../../../c-api/unicode.rst:728 msgid "" "Copy characters from one Unicode object into another. This function " "performs character conversion when necessary and falls back to :c:func:`!" @@ -985,62 +985,62 @@ msgid "" "otherwise returns the number of copied characters." msgstr "" -#: ../../../c-api/unicode.rst:732 ../../../c-api/unicode.rst:762 -#: ../../../c-api/unicode.rst:782 +#: ../../../c-api/unicode.rst:733 ../../../c-api/unicode.rst:763 +#: ../../../c-api/unicode.rst:783 msgid "" "The string must not have been “used” yet. See :c:func:`PyUnicode_New` for " "details." msgstr "" -#: ../../../c-api/unicode.rst:740 +#: ../../../c-api/unicode.rst:741 msgid "" "Resize a Unicode object *\\*unicode* to the new *length* in code points." msgstr "" -#: ../../../c-api/unicode.rst:742 +#: ../../../c-api/unicode.rst:743 msgid "" "Try to resize the string in place (which is usually faster than allocating a " "new string and copying characters), or create a new string." msgstr "" -#: ../../../c-api/unicode.rst:745 +#: ../../../c-api/unicode.rst:746 msgid "" "*\\*unicode* is modified to point to the new (resized) object and ``0`` is " "returned on success. Otherwise, ``-1`` is returned and an exception is set, " "and *\\*unicode* is left untouched." msgstr "" -#: ../../../c-api/unicode.rst:749 +#: ../../../c-api/unicode.rst:750 msgid "" "The function doesn't check string content, the result may not be a string in " "canonical representation." msgstr "" -#: ../../../c-api/unicode.rst:756 +#: ../../../c-api/unicode.rst:757 msgid "" "Fill a string with a character: write *fill_char* into ``unicode[start:" "start+length]``." msgstr "" -#: ../../../c-api/unicode.rst:759 +#: ../../../c-api/unicode.rst:760 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:765 +#: ../../../c-api/unicode.rst:766 msgid "" "Return the number of written characters, or return ``-1`` and raise an " "exception on error." msgstr "" -#: ../../../c-api/unicode.rst:774 +#: ../../../c-api/unicode.rst:775 msgid "" "Write a *character* to the string *unicode* at the zero-based *index*. " "Return ``0`` on success, ``-1`` on error with an exception set." msgstr "" -#: ../../../c-api/unicode.rst:777 +#: ../../../c-api/unicode.rst:778 msgid "" "This function checks that *unicode* is a Unicode object, that the index is " "not out of bounds, and that the object's reference count is one. See :c:func:" @@ -1048,25 +1048,25 @@ msgid "" "responsibility." msgstr "" -#: ../../../c-api/unicode.rst:790 +#: ../../../c-api/unicode.rst:791 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 :c:func:" "`PyUnicode_READ_CHAR`, which performs no error checking." msgstr "" -#: ../../../c-api/unicode.rst:794 +#: ../../../c-api/unicode.rst:795 msgid "Return character on success, ``-1`` on error with an exception set." msgstr "" -#: ../../../c-api/unicode.rst:802 +#: ../../../c-api/unicode.rst:803 msgid "" "Return a substring of *unicode*, from character index *start* (included) to " "character index *end* (excluded). Negative indices are not supported. On " "error, set an exception and return ``NULL``." msgstr "" -#: ../../../c-api/unicode.rst:812 +#: ../../../c-api/unicode.rst:813 msgid "" "Copy the string *unicode* into a UCS4 buffer, including a null character, if " "*copy_null* is set. Returns ``NULL`` and sets an exception on error (in " @@ -1074,7 +1074,7 @@ msgid "" "*unicode*). *buffer* is returned on success." msgstr "" -#: ../../../c-api/unicode.rst:822 +#: ../../../c-api/unicode.rst:823 msgid "" "Copy the string *unicode* into a new UCS4 buffer that is allocated using :c:" "func:`PyMem_Malloc`. If this fails, ``NULL`` is returned with a :exc:" @@ -1082,17 +1082,17 @@ msgid "" "appended." msgstr "" -#: ../../../c-api/unicode.rst:831 +#: ../../../c-api/unicode.rst:832 msgid "Locale Encoding" msgstr "" -#: ../../../c-api/unicode.rst:833 +#: ../../../c-api/unicode.rst:834 msgid "" "The current locale encoding can be used to decode text from the operating " "system." msgstr "" -#: ../../../c-api/unicode.rst:840 +#: ../../../c-api/unicode.rst:841 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 " @@ -1101,21 +1101,21 @@ msgid "" "null character but cannot contain embedded null characters." msgstr "" -#: ../../../c-api/unicode.rst:847 +#: ../../../c-api/unicode.rst:848 msgid "" "Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from the :" "term:`filesystem encoding and error handler`." msgstr "" -#: ../../../c-api/unicode.rst:850 ../../../c-api/unicode.rst:885 +#: ../../../c-api/unicode.rst:851 ../../../c-api/unicode.rst:886 msgid "This function ignores the :ref:`Python UTF-8 Mode `." msgstr "" -#: ../../../c-api/unicode.rst:854 ../../../c-api/unicode.rst:970 +#: ../../../c-api/unicode.rst:855 ../../../c-api/unicode.rst:971 msgid "The :c:func:`Py_DecodeLocale` function." msgstr "" -#: ../../../c-api/unicode.rst:858 +#: ../../../c-api/unicode.rst:859 msgid "" "The function now also uses the current locale encoding for the " "``surrogateescape`` error handler, except on Android. Previously, :c:func:" @@ -1123,13 +1123,13 @@ msgid "" "locale encoding was used for ``strict``." msgstr "" -#: ../../../c-api/unicode.rst:867 +#: ../../../c-api/unicode.rst:868 msgid "" "Similar to :c:func:`PyUnicode_DecodeLocaleAndSize`, but compute the string " "length using :c:func:`!strlen`." msgstr "" -#: ../../../c-api/unicode.rst:875 +#: ../../../c-api/unicode.rst:876 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 " @@ -1138,17 +1138,17 @@ msgid "" "`bytes` object. *unicode* cannot contain embedded null characters." msgstr "" -#: ../../../c-api/unicode.rst:882 +#: ../../../c-api/unicode.rst:883 msgid "" "Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to the :term:" "`filesystem encoding and error handler`." msgstr "" -#: ../../../c-api/unicode.rst:889 ../../../c-api/unicode.rst:1001 +#: ../../../c-api/unicode.rst:890 ../../../c-api/unicode.rst:1002 msgid "The :c:func:`Py_EncodeLocale` function." msgstr "" -#: ../../../c-api/unicode.rst:893 +#: ../../../c-api/unicode.rst:894 msgid "" "The function now also uses the current locale encoding for the " "``surrogateescape`` error handler, except on Android. Previously, :c:func:" @@ -1156,24 +1156,24 @@ msgid "" "locale encoding was used for ``strict``." msgstr "" -#: ../../../c-api/unicode.rst:902 +#: ../../../c-api/unicode.rst:903 msgid "File System Encoding" msgstr "" -#: ../../../c-api/unicode.rst:904 +#: ../../../c-api/unicode.rst:905 msgid "" "Functions encoding to and decoding from the :term:`filesystem encoding and " "error handler` (:pep:`383` and :pep:`529`)." msgstr "" -#: ../../../c-api/unicode.rst:907 +#: ../../../c-api/unicode.rst:908 msgid "" "To encode file names to :class:`bytes` during argument parsing, the " "``\"O&\"`` converter should be used, passing :c:func:`!" "PyUnicode_FSConverter` as the conversion function:" msgstr "" -#: ../../../c-api/unicode.rst:913 +#: ../../../c-api/unicode.rst:914 msgid "" ":ref:`PyArg_Parse\\* converter `: encode :class:`str` objects " "-- obtained directly or through the :class:`os.PathLike` interface -- to :" @@ -1186,24 +1186,24 @@ msgid "" "not allowed in the result. On failure, return ``0`` with an exception set." msgstr "" -#: ../../../c-api/unicode.rst:925 +#: ../../../c-api/unicode.rst:926 msgid "" "If *obj* is ``NULL``, the function releases a strong reference stored in the " "variable referred by *result* and returns ``1``." msgstr "" -#: ../../../c-api/unicode.rst:930 ../../../c-api/unicode.rst:957 +#: ../../../c-api/unicode.rst:931 ../../../c-api/unicode.rst:958 msgid "Accepts a :term:`path-like object`." msgstr "" -#: ../../../c-api/unicode.rst:933 +#: ../../../c-api/unicode.rst:934 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:939 +#: ../../../c-api/unicode.rst:940 msgid "" ":ref:`PyArg_Parse\\* converter `: decode :class:`bytes` objects " "-- obtained either directly or indirectly through the :class:`os.PathLike` " @@ -1217,63 +1217,63 @@ msgid "" "result. On failure, return ``0`` with an exception set." msgstr "" -#: ../../../c-api/unicode.rst:952 +#: ../../../c-api/unicode.rst:953 msgid "" "If *obj* is ``NULL``, release the strong reference to the object referred to " "by *result* and return ``1``." msgstr "" -#: ../../../c-api/unicode.rst:963 +#: ../../../c-api/unicode.rst:964 msgid "Decode a string from the :term:`filesystem encoding and error handler`." msgstr "" -#: ../../../c-api/unicode.rst:965 +#: ../../../c-api/unicode.rst:966 msgid "" "If you need to decode a string from the current locale encoding, use :c:func:" "`PyUnicode_DecodeLocaleAndSize`." msgstr "" -#: ../../../c-api/unicode.rst:972 ../../../c-api/unicode.rst:985 -#: ../../../c-api/unicode.rst:1005 +#: ../../../c-api/unicode.rst:973 ../../../c-api/unicode.rst:986 +#: ../../../c-api/unicode.rst:1006 msgid "" "The :term:`filesystem error handler ` " "is now used." msgstr "" -#: ../../../c-api/unicode.rst:979 +#: ../../../c-api/unicode.rst:980 msgid "" "Decode a null-terminated string from the :term:`filesystem encoding and " "error handler`." msgstr "" -#: ../../../c-api/unicode.rst:982 +#: ../../../c-api/unicode.rst:983 msgid "" "If the string length is known, use :c:func:" "`PyUnicode_DecodeFSDefaultAndSize`." msgstr "" -#: ../../../c-api/unicode.rst:992 +#: ../../../c-api/unicode.rst:993 msgid "" "Encode a Unicode object to the :term:`filesystem encoding and error " "handler`, and return :class:`bytes`. Note that the resulting :class:`bytes` " "object can contain null bytes." msgstr "" -#: ../../../c-api/unicode.rst:996 +#: ../../../c-api/unicode.rst:997 msgid "" "If you need to encode a string to the current locale encoding, use :c:func:" "`PyUnicode_EncodeLocale`." msgstr "" -#: ../../../c-api/unicode.rst:1010 +#: ../../../c-api/unicode.rst:1011 msgid "wchar_t Support" msgstr "" -#: ../../../c-api/unicode.rst:1012 +#: ../../../c-api/unicode.rst:1013 msgid ":c:type:`wchar_t` support for platforms which support it:" msgstr "" -#: ../../../c-api/unicode.rst:1016 +#: ../../../c-api/unicode.rst:1017 msgid "" "Create a Unicode object from the :c:type:`wchar_t` buffer *wstr* of the " "given *size*. Passing ``-1`` as the *size* indicates that the function must " @@ -1281,7 +1281,7 @@ msgid "" "failure." msgstr "" -#: ../../../c-api/unicode.rst:1024 +#: ../../../c-api/unicode.rst:1025 msgid "" "Copy the Unicode object contents into the :c:type:`wchar_t` buffer *wstr*. " "At most *size* :c:type:`wchar_t` characters are copied (excluding a possibly " @@ -1289,13 +1289,13 @@ msgid "" "`wchar_t` characters copied or ``-1`` in case of an error." msgstr "" -#: ../../../c-api/unicode.rst:1029 +#: ../../../c-api/unicode.rst:1030 msgid "" "When *wstr* is ``NULL``, instead return the *size* that would be required to " "store all of *unicode* including a terminating null." msgstr "" -#: ../../../c-api/unicode.rst:1032 +#: ../../../c-api/unicode.rst:1033 msgid "" "Note that the resulting :c:expr:`wchar_t*` string may or may not be null-" "terminated. It is the responsibility of the caller to make sure that the :c:" @@ -1305,7 +1305,7 @@ msgid "" "most C functions." msgstr "" -#: ../../../c-api/unicode.rst:1042 +#: ../../../c-api/unicode.rst:1043 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 " @@ -1316,37 +1316,37 @@ msgid "" "`wchar_t*` string contains null characters a :exc:`ValueError` is raised." msgstr "" -#: ../../../c-api/unicode.rst:1050 +#: ../../../c-api/unicode.rst:1051 msgid "" "Returns a buffer allocated by :c:macro:`PyMem_New` (use :c:func:`PyMem_Free` " "to free it) on success. On error, returns ``NULL`` and *\\*size* is " "undefined. Raises a :exc:`MemoryError` if memory allocation is failed." msgstr "" -#: ../../../c-api/unicode.rst:1057 +#: ../../../c-api/unicode.rst:1058 msgid "" "Raises a :exc:`ValueError` if *size* is ``NULL`` and the :c:expr:`wchar_t*` " "string contains null characters." msgstr "" -#: ../../../c-api/unicode.rst:1065 +#: ../../../c-api/unicode.rst:1066 msgid "Built-in Codecs" msgstr "" -#: ../../../c-api/unicode.rst:1067 +#: ../../../c-api/unicode.rst:1068 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:1070 +#: ../../../c-api/unicode.rst:1071 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:1074 +#: ../../../c-api/unicode.rst:1075 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 " @@ -1354,42 +1354,42 @@ msgid "" "handler` internally." msgstr "" -#: ../../../c-api/unicode.rst:1079 +#: ../../../c-api/unicode.rst:1080 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:1083 +#: ../../../c-api/unicode.rst:1084 msgid "" "The codecs all use a similar interface. Only deviations from the following " "generic ones are documented for simplicity." msgstr "" -#: ../../../c-api/unicode.rst:1088 +#: ../../../c-api/unicode.rst:1089 msgid "Generic Codecs" msgstr "" -#: ../../../c-api/unicode.rst:1090 +#: ../../../c-api/unicode.rst:1091 msgid "The following macro is provided:" msgstr "" -#: ../../../c-api/unicode.rst:1095 +#: ../../../c-api/unicode.rst:1096 msgid "The Unicode code point ``U+FFFD`` (replacement character)." msgstr "" -#: ../../../c-api/unicode.rst:1097 +#: ../../../c-api/unicode.rst:1098 msgid "" "This Unicode character is used as the replacement character during decoding " "if the *errors* argument is set to \"replace\"." msgstr "" -#: ../../../c-api/unicode.rst:1101 +#: ../../../c-api/unicode.rst:1102 msgid "These are the generic codec APIs:" msgstr "" -#: ../../../c-api/unicode.rst:1107 +#: ../../../c-api/unicode.rst:1108 msgid "" "Create a Unicode object by decoding *size* bytes of the encoded string " "*str*. *encoding* and *errors* have the same meaning as the parameters of " @@ -1398,7 +1398,7 @@ msgid "" "was raised by the codec." msgstr "" -#: ../../../c-api/unicode.rst:1117 +#: ../../../c-api/unicode.rst:1118 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 " @@ -1407,21 +1407,21 @@ msgid "" "was raised by the codec." msgstr "" -#: ../../../c-api/unicode.rst:1125 +#: ../../../c-api/unicode.rst:1126 msgid "UTF-8 Codecs" msgstr "" -#: ../../../c-api/unicode.rst:1127 +#: ../../../c-api/unicode.rst:1128 msgid "These are the UTF-8 codec APIs:" msgstr "" -#: ../../../c-api/unicode.rst:1132 +#: ../../../c-api/unicode.rst:1133 msgid "" "Create a Unicode object by decoding *size* bytes of the UTF-8 encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: ../../../c-api/unicode.rst:1139 +#: ../../../c-api/unicode.rst:1140 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF8`. If " "*consumed* is not ``NULL``, trailing incomplete UTF-8 byte sequences will " @@ -1429,20 +1429,20 @@ msgid "" "of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: ../../../c-api/unicode.rst:1147 +#: ../../../c-api/unicode.rst:1148 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:1151 ../../../c-api/unicode.rst:1166 +#: ../../../c-api/unicode.rst:1152 ../../../c-api/unicode.rst:1167 msgid "" "The function fails if the string contains surrogate code points (``U+D800`` " "- ``U+DFFF``)." msgstr "" -#: ../../../c-api/unicode.rst:1157 +#: ../../../c-api/unicode.rst:1158 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* " @@ -1451,13 +1451,13 @@ msgid "" "regardless of whether there are any other null code points." msgstr "" -#: ../../../c-api/unicode.rst:1163 +#: ../../../c-api/unicode.rst:1164 msgid "" "On error, set an exception, set *size* to ``-1`` (if it's not NULL) and " "return ``NULL``." msgstr "" -#: ../../../c-api/unicode.rst:1169 +#: ../../../c-api/unicode.rst:1170 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 " @@ -1466,19 +1466,19 @@ msgid "" "collected." msgstr "" -#: ../../../c-api/unicode.rst:1176 ../../../c-api/unicode.rst:1198 +#: ../../../c-api/unicode.rst:1177 ../../../c-api/unicode.rst:1199 msgid "The return type is now ``const char *`` rather than ``char *``." msgstr "" -#: ../../../c-api/unicode.rst:1179 +#: ../../../c-api/unicode.rst:1180 msgid "This function is a part of the :ref:`limited API `." msgstr "" -#: ../../../c-api/unicode.rst:1185 +#: ../../../c-api/unicode.rst:1186 msgid "As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size." msgstr "" -#: ../../../c-api/unicode.rst:1189 +#: ../../../c-api/unicode.rst:1190 msgid "" "This function does not have any special behavior for `null characters " "`_ embedded within *unicode*. " @@ -1488,28 +1488,28 @@ msgid "" "c:func:`PyUnicode_AsUTF8AndSize` instead." msgstr "" -#: ../../../c-api/unicode.rst:1203 +#: ../../../c-api/unicode.rst:1204 msgid "UTF-32 Codecs" msgstr "" -#: ../../../c-api/unicode.rst:1205 +#: ../../../c-api/unicode.rst:1206 msgid "These are the UTF-32 codec APIs:" msgstr "" -#: ../../../c-api/unicode.rst:1211 +#: ../../../c-api/unicode.rst:1212 msgid "" "Decode *size* bytes from a UTF-32 encoded buffer string and return the " "corresponding Unicode object. *errors* (if non-``NULL``) defines the error " "handling. It defaults to \"strict\"." msgstr "" -#: ../../../c-api/unicode.rst:1215 ../../../c-api/unicode.rst:1265 +#: ../../../c-api/unicode.rst:1216 ../../../c-api/unicode.rst:1266 msgid "" "If *byteorder* is non-``NULL``, the decoder starts decoding using the given " "byte order::" msgstr "" -#: ../../../c-api/unicode.rst:1222 +#: ../../../c-api/unicode.rst:1223 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 " @@ -1517,21 +1517,21 @@ msgid "" "``-1`` or ``1``, any byte order mark is copied to the output." msgstr "" -#: ../../../c-api/unicode.rst:1227 +#: ../../../c-api/unicode.rst:1228 msgid "" "After completion, *\\*byteorder* is set to the current byte order at the end " "of input data." msgstr "" -#: ../../../c-api/unicode.rst:1230 ../../../c-api/unicode.rst:1281 +#: ../../../c-api/unicode.rst:1231 ../../../c-api/unicode.rst:1282 msgid "If *byteorder* is ``NULL``, the codec starts in native order mode." msgstr "" -#: ../../../c-api/unicode.rst:1232 ../../../c-api/unicode.rst:1283 +#: ../../../c-api/unicode.rst:1233 ../../../c-api/unicode.rst:1284 msgid "Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: ../../../c-api/unicode.rst:1238 +#: ../../../c-api/unicode.rst:1239 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF32`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF32Stateful` will not " @@ -1540,29 +1540,29 @@ msgid "" "number of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: ../../../c-api/unicode.rst:1247 +#: ../../../c-api/unicode.rst:1248 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:1253 +#: ../../../c-api/unicode.rst:1254 msgid "UTF-16 Codecs" msgstr "" -#: ../../../c-api/unicode.rst:1255 +#: ../../../c-api/unicode.rst:1256 msgid "These are the UTF-16 codec APIs:" msgstr "" -#: ../../../c-api/unicode.rst:1261 +#: ../../../c-api/unicode.rst:1262 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:1272 +#: ../../../c-api/unicode.rst:1273 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 " @@ -1571,13 +1571,13 @@ msgid "" "result in either a ``\\ufeff`` or a ``\\ufffe`` character)." msgstr "" -#: ../../../c-api/unicode.rst:1278 +#: ../../../c-api/unicode.rst:1279 msgid "" "After completion, ``*byteorder`` is set to the current byte order at the end " "of input data." msgstr "" -#: ../../../c-api/unicode.rst:1289 +#: ../../../c-api/unicode.rst:1290 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF16`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF16Stateful` will not " @@ -1587,28 +1587,28 @@ msgid "" "*consumed*." msgstr "" -#: ../../../c-api/unicode.rst:1298 +#: ../../../c-api/unicode.rst:1299 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:1304 +#: ../../../c-api/unicode.rst:1305 msgid "UTF-7 Codecs" msgstr "" -#: ../../../c-api/unicode.rst:1306 +#: ../../../c-api/unicode.rst:1307 msgid "These are the UTF-7 codec APIs:" msgstr "" -#: ../../../c-api/unicode.rst:1311 +#: ../../../c-api/unicode.rst:1312 msgid "" "Create a Unicode object by decoding *size* bytes of the UTF-7 encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: ../../../c-api/unicode.rst:1318 +#: ../../../c-api/unicode.rst:1319 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF7`. If " "*consumed* is not ``NULL``, trailing incomplete UTF-7 base-64 sections will " @@ -1616,101 +1616,101 @@ msgid "" "of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: ../../../c-api/unicode.rst:1325 +#: ../../../c-api/unicode.rst:1326 msgid "Unicode-Escape Codecs" msgstr "" -#: ../../../c-api/unicode.rst:1327 +#: ../../../c-api/unicode.rst:1328 msgid "These are the \"Unicode Escape\" codec APIs:" msgstr "" -#: ../../../c-api/unicode.rst:1333 +#: ../../../c-api/unicode.rst:1334 msgid "" "Create a Unicode object by decoding *size* bytes of the Unicode-Escape " "encoded string *str*. Return ``NULL`` if an exception was raised by the " "codec." msgstr "" -#: ../../../c-api/unicode.rst:1339 +#: ../../../c-api/unicode.rst:1340 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:1345 +#: ../../../c-api/unicode.rst:1346 msgid "Raw-Unicode-Escape Codecs" msgstr "" -#: ../../../c-api/unicode.rst:1347 +#: ../../../c-api/unicode.rst:1348 msgid "These are the \"Raw Unicode Escape\" codec APIs:" msgstr "" -#: ../../../c-api/unicode.rst:1353 +#: ../../../c-api/unicode.rst:1354 msgid "" "Create a Unicode object by decoding *size* bytes of the Raw-Unicode-Escape " "encoded string *str*. Return ``NULL`` if an exception was raised by the " "codec." msgstr "" -#: ../../../c-api/unicode.rst:1359 +#: ../../../c-api/unicode.rst:1360 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:1365 +#: ../../../c-api/unicode.rst:1366 msgid "Latin-1 Codecs" msgstr "" -#: ../../../c-api/unicode.rst:1367 +#: ../../../c-api/unicode.rst:1368 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:1373 +#: ../../../c-api/unicode.rst:1374 msgid "" "Create a Unicode object by decoding *size* bytes of the Latin-1 encoded " "string *str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: ../../../c-api/unicode.rst:1379 +#: ../../../c-api/unicode.rst:1380 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:1385 +#: ../../../c-api/unicode.rst:1386 msgid "ASCII Codecs" msgstr "" -#: ../../../c-api/unicode.rst:1387 +#: ../../../c-api/unicode.rst:1388 msgid "" "These are the ASCII codec APIs. Only 7-bit ASCII data is accepted. All " "other codes generate errors." msgstr "" -#: ../../../c-api/unicode.rst:1393 +#: ../../../c-api/unicode.rst:1394 msgid "" "Create a Unicode object by decoding *size* bytes of the ASCII encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: ../../../c-api/unicode.rst:1399 +#: ../../../c-api/unicode.rst:1400 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:1405 +#: ../../../c-api/unicode.rst:1406 msgid "Character Map Codecs" msgstr "" -#: ../../../c-api/unicode.rst:1407 +#: ../../../c-api/unicode.rst:1408 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 " @@ -1720,18 +1720,18 @@ msgid "" "sequences work well." msgstr "" -#: ../../../c-api/unicode.rst:1413 +#: ../../../c-api/unicode.rst:1414 msgid "These are the mapping codec APIs:" msgstr "" -#: ../../../c-api/unicode.rst:1418 +#: ../../../c-api/unicode.rst:1419 msgid "" "Create a Unicode object by decoding *size* bytes of the encoded string *str* " "using the given *mapping* object. Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: ../../../c-api/unicode.rst:1422 +#: ../../../c-api/unicode.rst:1423 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 " @@ -1741,14 +1741,14 @@ msgid "" "treated as undefined mappings and cause an error." msgstr "" -#: ../../../c-api/unicode.rst:1433 +#: ../../../c-api/unicode.rst:1434 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:1437 +#: ../../../c-api/unicode.rst:1438 msgid "" "The *mapping* object must map Unicode ordinal integers to bytes objects, " "integers in the range from 0 to 255 or ``None``. Unmapped character " @@ -1756,41 +1756,41 @@ msgid "" "``None`` are treated as \"undefined mapping\" and cause an error." msgstr "" -#: ../../../c-api/unicode.rst:1443 +#: ../../../c-api/unicode.rst:1444 msgid "The following codec API is special in that maps Unicode to Unicode." msgstr "" -#: ../../../c-api/unicode.rst:1447 +#: ../../../c-api/unicode.rst:1448 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:1451 +#: ../../../c-api/unicode.rst:1452 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:1454 +#: ../../../c-api/unicode.rst:1455 msgid "" "Mapping tables need only provide the :meth:`~object.__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:1458 +#: ../../../c-api/unicode.rst:1459 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:1463 +#: ../../../c-api/unicode.rst:1464 msgid "MBCS codecs for Windows" msgstr "" -#: ../../../c-api/unicode.rst:1465 +#: ../../../c-api/unicode.rst:1466 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 " @@ -1798,13 +1798,13 @@ msgid "" "is defined by the user settings on the machine running the codec." msgstr "" -#: ../../../c-api/unicode.rst:1472 +#: ../../../c-api/unicode.rst:1473 msgid "" "Create a Unicode object by decoding *size* bytes of the MBCS encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: ../../../c-api/unicode.rst:1479 +#: ../../../c-api/unicode.rst:1480 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeMBCS`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeMBCSStateful` will not " @@ -1812,46 +1812,46 @@ msgid "" "will be stored in *consumed*." msgstr "" -#: ../../../c-api/unicode.rst:1488 +#: ../../../c-api/unicode.rst:1489 msgid "" "Similar to :c:func:`PyUnicode_DecodeMBCSStateful`, except uses the code page " "specified by *code_page*." msgstr "" -#: ../../../c-api/unicode.rst:1494 +#: ../../../c-api/unicode.rst:1495 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:1501 +#: ../../../c-api/unicode.rst:1502 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:macro:`!CP_ACP` code page to get the MBCS encoder." msgstr "" -#: ../../../c-api/unicode.rst:1511 +#: ../../../c-api/unicode.rst:1512 msgid "Methods and Slot Functions" msgstr "" -#: ../../../c-api/unicode.rst:1513 +#: ../../../c-api/unicode.rst:1514 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:1517 +#: ../../../c-api/unicode.rst:1518 msgid "They all return ``NULL`` or ``-1`` if an exception occurs." msgstr "" -#: ../../../c-api/unicode.rst:1522 +#: ../../../c-api/unicode.rst:1523 msgid "Concat two strings giving a new Unicode string." msgstr "" -#: ../../../c-api/unicode.rst:1527 +#: ../../../c-api/unicode.rst:1528 msgid "" "Split a string giving a list of Unicode strings. If *sep* is ``NULL``, " "splitting will be done at all whitespace substrings. Otherwise, splits " @@ -1860,33 +1860,33 @@ msgid "" "list." msgstr "" -#: ../../../c-api/unicode.rst:1532 ../../../c-api/unicode.rst:1542 -#: ../../../c-api/unicode.rst:1563 ../../../c-api/unicode.rst:1576 +#: ../../../c-api/unicode.rst:1533 ../../../c-api/unicode.rst:1543 +#: ../../../c-api/unicode.rst:1564 ../../../c-api/unicode.rst:1577 msgid "On error, return ``NULL`` with an exception set." msgstr "" -#: ../../../c-api/unicode.rst:1534 +#: ../../../c-api/unicode.rst:1535 msgid "Equivalent to :py:meth:`str.split`." msgstr "" -#: ../../../c-api/unicode.rst:1539 +#: ../../../c-api/unicode.rst:1540 msgid "" "Similar to :c:func:`PyUnicode_Split`, but splitting will be done beginning " "at the end of the string." msgstr "" -#: ../../../c-api/unicode.rst:1544 +#: ../../../c-api/unicode.rst:1545 msgid "Equivalent to :py:meth:`str.rsplit`." msgstr "" -#: ../../../c-api/unicode.rst:1549 +#: ../../../c-api/unicode.rst:1550 msgid "" "Split a Unicode string at line breaks, returning a list of Unicode strings. " "CRLF is considered to be one line break. If *keepends* is ``0``, the Line " "break characters are not included in the resulting strings." msgstr "" -#: ../../../c-api/unicode.rst:1556 +#: ../../../c-api/unicode.rst:1557 msgid "" "Split a Unicode string at the first occurrence of *sep*, and return a 3-" "tuple containing the part before the separator, the separator itself, and " @@ -1894,39 +1894,39 @@ msgid "" "tuple containing the string itself, followed by two empty strings." msgstr "" -#: ../../../c-api/unicode.rst:1561 ../../../c-api/unicode.rst:1574 +#: ../../../c-api/unicode.rst:1562 ../../../c-api/unicode.rst:1575 msgid "*sep* must not be empty." msgstr "" -#: ../../../c-api/unicode.rst:1565 +#: ../../../c-api/unicode.rst:1566 msgid "Equivalent to :py:meth:`str.partition`." msgstr "" -#: ../../../c-api/unicode.rst:1570 +#: ../../../c-api/unicode.rst:1571 msgid "" "Similar to :c:func:`PyUnicode_Partition`, but split a Unicode string at the " "last occurrence of *sep*. If the separator is not found, return a 3-tuple " "containing two empty strings, followed by the string itself." msgstr "" -#: ../../../c-api/unicode.rst:1578 +#: ../../../c-api/unicode.rst:1579 msgid "Equivalent to :py:meth:`str.rpartition`." msgstr "" -#: ../../../c-api/unicode.rst:1583 +#: ../../../c-api/unicode.rst:1584 msgid "" "Join a sequence of strings using the given *separator* and return the " "resulting Unicode string." msgstr "" -#: ../../../c-api/unicode.rst:1590 +#: ../../../c-api/unicode.rst:1591 msgid "" "Return ``1`` if *substr* matches ``unicode[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:1598 +#: ../../../c-api/unicode.rst:1599 msgid "" "Return the first position of *substr* in ``unicode[start:end]`` using the " "given *direction* (*direction* == ``1`` means to do a forward search, " @@ -1935,7 +1935,7 @@ msgid "" "``-2`` indicates that an error occurred and an exception has been set." msgstr "" -#: ../../../c-api/unicode.rst:1608 +#: ../../../c-api/unicode.rst:1609 msgid "" "Return the first position of the character *ch* in ``unicode[start:end]`` " "using the given *direction* (*direction* == ``1`` means to do a forward " @@ -1945,73 +1945,73 @@ msgid "" "set." msgstr "" -#: ../../../c-api/unicode.rst:1616 +#: ../../../c-api/unicode.rst:1617 msgid "" "*start* and *end* are now adjusted to behave like ``unicode[start:end]``." msgstr "" -#: ../../../c-api/unicode.rst:1623 +#: ../../../c-api/unicode.rst:1624 msgid "" "Return the number of non-overlapping occurrences of *substr* in " "``unicode[start:end]``. Return ``-1`` if an error occurred." msgstr "" -#: ../../../c-api/unicode.rst:1630 +#: ../../../c-api/unicode.rst:1631 msgid "" "Replace at most *maxcount* occurrences of *substr* in *unicode* with " "*replstr* and return the resulting Unicode object. *maxcount* == ``-1`` " "means replace all occurrences." msgstr "" -#: ../../../c-api/unicode.rst:1637 +#: ../../../c-api/unicode.rst:1638 msgid "" "Compare two strings and return ``-1``, ``0``, ``1`` for less than, equal, " "and greater than, respectively." msgstr "" -#: ../../../c-api/unicode.rst:1640 +#: ../../../c-api/unicode.rst:1641 msgid "" "This function returns ``-1`` upon failure, so one should call :c:func:" "`PyErr_Occurred` to check for errors." msgstr "" -#: ../../../c-api/unicode.rst:1645 +#: ../../../c-api/unicode.rst:1646 msgid "The :c:func:`PyUnicode_Equal` function." msgstr "" -#: ../../../c-api/unicode.rst:1650 +#: ../../../c-api/unicode.rst:1651 msgid "Test if two strings are equal:" msgstr "" -#: ../../../c-api/unicode.rst:1652 +#: ../../../c-api/unicode.rst:1653 msgid "Return ``1`` if *a* is equal to *b*." msgstr "" -#: ../../../c-api/unicode.rst:1653 +#: ../../../c-api/unicode.rst:1654 msgid "Return ``0`` if *a* is not equal to *b*." msgstr "" -#: ../../../c-api/unicode.rst:1654 +#: ../../../c-api/unicode.rst:1655 msgid "" "Set a :exc:`TypeError` exception and return ``-1`` if *a* or *b* is not a :" "class:`str` object." msgstr "" -#: ../../../c-api/unicode.rst:1657 +#: ../../../c-api/unicode.rst:1658 msgid "The function always succeeds if *a* and *b* are :class:`str` objects." msgstr "" -#: ../../../c-api/unicode.rst:1659 +#: ../../../c-api/unicode.rst:1660 msgid "" "The function works for :class:`str` subclasses, but does not honor custom " "``__eq__()`` method." msgstr "" -#: ../../../c-api/unicode.rst:1664 +#: ../../../c-api/unicode.rst:1665 msgid "The :c:func:`PyUnicode_Compare` function." msgstr "" -#: ../../../c-api/unicode.rst:1671 +#: ../../../c-api/unicode.rst:1672 msgid "" "Compare a Unicode object with a char buffer which is interpreted as being " "UTF-8 or ASCII encoded and return true (``1``) if they are equal, or false " @@ -2020,18 +2020,18 @@ msgid "" "is returned." msgstr "" -#: ../../../c-api/unicode.rst:1678 ../../../c-api/unicode.rst:1699 +#: ../../../c-api/unicode.rst:1679 ../../../c-api/unicode.rst:1700 msgid "This function does not raise exceptions." msgstr "" -#: ../../../c-api/unicode.rst:1685 +#: ../../../c-api/unicode.rst:1686 msgid "" "Similar to :c:func:`PyUnicode_EqualToUTF8AndSize`, but compute *string* " "length using :c:func:`!strlen`. If the Unicode object contains null " "characters, false (``0``) is returned." msgstr "" -#: ../../../c-api/unicode.rst:1694 +#: ../../../c-api/unicode.rst:1695 msgid "" "Compare a Unicode object, *unicode*, with *string* and return ``-1``, ``0``, " "``1`` for less than, equal, and greater than, respectively. It is best to " @@ -2039,47 +2039,47 @@ msgid "" "string as ISO-8859-1 if it contains non-ASCII characters." msgstr "" -#: ../../../c-api/unicode.rst:1704 +#: ../../../c-api/unicode.rst:1705 msgid "Rich compare two Unicode strings and return one of the following:" msgstr "" -#: ../../../c-api/unicode.rst:1706 +#: ../../../c-api/unicode.rst:1707 msgid "``NULL`` in case an exception was raised" msgstr "" -#: ../../../c-api/unicode.rst:1707 +#: ../../../c-api/unicode.rst:1708 msgid ":c:data:`Py_True` or :c:data:`Py_False` for successful comparisons" msgstr "" -#: ../../../c-api/unicode.rst:1708 +#: ../../../c-api/unicode.rst:1709 msgid ":c:data:`Py_NotImplemented` in case the type combination is unknown" msgstr "" -#: ../../../c-api/unicode.rst:1710 +#: ../../../c-api/unicode.rst:1711 msgid "" "Possible values for *op* are :c:macro:`Py_GT`, :c:macro:`Py_GE`, :c:macro:" "`Py_EQ`, :c:macro:`Py_NE`, :c:macro:`Py_LT`, and :c:macro:`Py_LE`." msgstr "" -#: ../../../c-api/unicode.rst:1716 +#: ../../../c-api/unicode.rst:1717 msgid "" "Return a new string object from *format* and *args*; this is analogous to " "``format % args``." msgstr "" -#: ../../../c-api/unicode.rst:1722 +#: ../../../c-api/unicode.rst:1723 msgid "" "Check whether *substr* is contained in *unicode* and return true or false " "accordingly." msgstr "" -#: ../../../c-api/unicode.rst:1725 +#: ../../../c-api/unicode.rst:1726 msgid "" "*substr* has to coerce to a one element Unicode string. ``-1`` is returned " "if there was an error." msgstr "" -#: ../../../c-api/unicode.rst:1731 +#: ../../../c-api/unicode.rst:1732 msgid "" "Intern the argument :c:expr:`*p_unicode` in place. The argument must be the " "address of a pointer variable pointing to a Python Unicode string object. " @@ -2090,7 +2090,7 @@ msgid "" "interns it." msgstr "" -#: ../../../c-api/unicode.rst:1738 +#: ../../../c-api/unicode.rst:1739 msgid "" "(Clarification: even though there is a lot of talk about references, think " "of this function as reference-neutral. You must own the object you pass in; " @@ -2098,39 +2098,39 @@ msgid "" "the result.)" msgstr "" -#: ../../../c-api/unicode.rst:1743 +#: ../../../c-api/unicode.rst:1744 msgid "" "This function never raises an exception. On error, it leaves its argument " "unchanged without interning it." msgstr "" -#: ../../../c-api/unicode.rst:1746 +#: ../../../c-api/unicode.rst:1747 msgid "" "Instances of subclasses of :py:class:`str` may not be interned, that is, :c:" "expr:`PyUnicode_CheckExact(*p_unicode)` must be true. If it is not, then -- " "as with any other error -- the argument is left unchanged." msgstr "" -#: ../../../c-api/unicode.rst:1750 +#: ../../../c-api/unicode.rst:1751 msgid "" "Note that interned strings are not “immortal”. You must keep a reference to " "the result to benefit from interning." msgstr "" -#: ../../../c-api/unicode.rst:1756 +#: ../../../c-api/unicode.rst:1757 msgid "" "A combination of :c:func:`PyUnicode_FromString` and :c:func:" "`PyUnicode_InternInPlace`, meant for statically allocated strings." msgstr "" -#: ../../../c-api/unicode.rst:1759 +#: ../../../c-api/unicode.rst:1760 msgid "" "Return a new (\"owned\") reference to either a new Unicode string object " "that has been interned, or an earlier interned string object with the same " "value." msgstr "" -#: ../../../c-api/unicode.rst:1763 +#: ../../../c-api/unicode.rst:1764 msgid "" "Python may keep a reference to the result, or make it :term:`immortal`, " "preventing it from being garbage-collected promptly. For interning an " @@ -2139,14 +2139,14 @@ msgid "" "`PyUnicode_InternInPlace` directly." msgstr "" -#: ../../../c-api/unicode.rst:1772 +#: ../../../c-api/unicode.rst:1773 msgid "" "Return a non-zero value if *str* is interned, zero if not. The *str* " "argument must be a string; this is not checked. This function always " "succeeds." msgstr "" -#: ../../../c-api/unicode.rst:1778 +#: ../../../c-api/unicode.rst:1779 msgid "" "A non-zero return value may carry additional information about *how* the " "string is interned. The meaning of such non-zero values, as well as each " @@ -2154,227 +2154,227 @@ msgid "" "versions." msgstr "" -#: ../../../c-api/unicode.rst:1785 +#: ../../../c-api/unicode.rst:1786 msgid "PyUnicodeWriter" msgstr "" -#: ../../../c-api/unicode.rst:1787 +#: ../../../c-api/unicode.rst:1788 msgid "" "The :c:type:`PyUnicodeWriter` API can be used to create a Python :class:" "`str` object." msgstr "" -#: ../../../c-api/unicode.rst:1794 +#: ../../../c-api/unicode.rst:1795 msgid "A Unicode writer instance." msgstr "" -#: ../../../c-api/unicode.rst:1796 +#: ../../../c-api/unicode.rst:1797 msgid "" "The instance must be destroyed by :c:func:`PyUnicodeWriter_Finish` on " "success, or :c:func:`PyUnicodeWriter_Discard` on error." msgstr "" -#: ../../../c-api/unicode.rst:1801 +#: ../../../c-api/unicode.rst:1802 msgid "Create a Unicode writer instance." msgstr "" -#: ../../../c-api/unicode.rst:1803 +#: ../../../c-api/unicode.rst:1804 msgid "*length* must be greater than or equal to ``0``." msgstr "" -#: ../../../c-api/unicode.rst:1805 +#: ../../../c-api/unicode.rst:1806 msgid "" "If *length* is greater than ``0``, preallocate an internal buffer of " "*length* characters." msgstr "" -#: ../../../c-api/unicode.rst:1808 ../../../c-api/unicode.rst:1814 +#: ../../../c-api/unicode.rst:1809 ../../../c-api/unicode.rst:1815 msgid "Set an exception and return ``NULL`` on error." msgstr "" -#: ../../../c-api/unicode.rst:1812 +#: ../../../c-api/unicode.rst:1813 msgid "" "Return the final Python :class:`str` object and destroy the writer instance." msgstr "" -#: ../../../c-api/unicode.rst:1816 ../../../c-api/unicode.rst:1824 +#: ../../../c-api/unicode.rst:1817 ../../../c-api/unicode.rst:1825 msgid "The writer instance is invalid after this call." msgstr "" -#: ../../../c-api/unicode.rst:1820 +#: ../../../c-api/unicode.rst:1821 msgid "Discard the internal Unicode buffer and destroy the writer instance." msgstr "" -#: ../../../c-api/unicode.rst:1822 +#: ../../../c-api/unicode.rst:1823 msgid "If *writer* is ``NULL``, no operation is performed." msgstr "" -#: ../../../c-api/unicode.rst:1828 +#: ../../../c-api/unicode.rst:1829 msgid "Write the single Unicode character *ch* into *writer*." msgstr "" -#: ../../../c-api/unicode.rst:1830 ../../../c-api/unicode.rst:1840 -#: ../../../c-api/unicode.rst:1855 ../../../c-api/unicode.rst:1865 -#: ../../../c-api/unicode.rst:1874 ../../../c-api/unicode.rst:1881 -#: ../../../c-api/unicode.rst:1894 ../../../c-api/unicode.rst:1909 -#: ../../../c-api/unicode.rst:1916 ../../../c-api/unicode.rst:1935 +#: ../../../c-api/unicode.rst:1831 ../../../c-api/unicode.rst:1841 +#: ../../../c-api/unicode.rst:1856 ../../../c-api/unicode.rst:1866 +#: ../../../c-api/unicode.rst:1875 ../../../c-api/unicode.rst:1882 +#: ../../../c-api/unicode.rst:1895 ../../../c-api/unicode.rst:1910 +#: ../../../c-api/unicode.rst:1917 ../../../c-api/unicode.rst:1936 msgid "" "On success, return ``0``. On error, set an exception, leave the writer " "unchanged, and return ``-1``." msgstr "" -#: ../../../c-api/unicode.rst:1835 +#: ../../../c-api/unicode.rst:1836 msgid "" "Decode the string *str* from UTF-8 in strict mode and write the output into " "*writer*." msgstr "" -#: ../../../c-api/unicode.rst:1837 ../../../c-api/unicode.rst:1849 -#: ../../../c-api/unicode.rst:1924 +#: ../../../c-api/unicode.rst:1838 ../../../c-api/unicode.rst:1850 +#: ../../../c-api/unicode.rst:1925 msgid "" "*size* is the string length in bytes. If *size* is equal to ``-1``, call " "``strlen(str)`` to get the string length." msgstr "" -#: ../../../c-api/unicode.rst:1843 +#: ../../../c-api/unicode.rst:1844 msgid "See also :c:func:`PyUnicodeWriter_DecodeUTF8Stateful`." msgstr "" -#: ../../../c-api/unicode.rst:1847 +#: ../../../c-api/unicode.rst:1848 msgid "Write the ASCII string *str* into *writer*." msgstr "" -#: ../../../c-api/unicode.rst:1852 +#: ../../../c-api/unicode.rst:1853 msgid "" "*str* must only contain ASCII characters. The behavior is undefined if *str* " "contains non-ASCII characters." msgstr "" -#: ../../../c-api/unicode.rst:1860 +#: ../../../c-api/unicode.rst:1861 msgid "Write the wide string *str* into *writer*." msgstr "" -#: ../../../c-api/unicode.rst:1862 +#: ../../../c-api/unicode.rst:1863 msgid "" "*size* is a number of wide characters. If *size* is equal to ``-1``, call " "``wcslen(str)`` to get the string length." msgstr "" -#: ../../../c-api/unicode.rst:1870 +#: ../../../c-api/unicode.rst:1871 msgid "Writer the UCS4 string *str* into *writer*." msgstr "" -#: ../../../c-api/unicode.rst:1872 +#: ../../../c-api/unicode.rst:1873 msgid "*size* is a number of UCS4 characters." msgstr "" -#: ../../../c-api/unicode.rst:1879 +#: ../../../c-api/unicode.rst:1880 msgid "" "Call :c:func:`PyObject_Str` on *obj* and write the output into *writer*." msgstr "" -#: ../../../c-api/unicode.rst:1884 +#: ../../../c-api/unicode.rst:1885 msgid "" "To write a :class:`str` subclass which overrides the :meth:`~object.__str__` " "method, :c:func:`PyUnicode_FromObject` can be used to get the original " "string." msgstr "" -#: ../../../c-api/unicode.rst:1890 +#: ../../../c-api/unicode.rst:1891 msgid "" "Call :c:func:`PyObject_Repr` on *obj* and write the output into *writer*." msgstr "" -#: ../../../c-api/unicode.rst:1892 +#: ../../../c-api/unicode.rst:1893 msgid "If *obj* is ``NULL``, write the string ``\"\"`` into *writer*." msgstr "" -#: ../../../c-api/unicode.rst:1899 +#: ../../../c-api/unicode.rst:1900 msgid "Added support for ``NULL``." msgstr "" -#: ../../../c-api/unicode.rst:1903 +#: ../../../c-api/unicode.rst:1904 msgid "Write the substring ``str[start:end]`` into *writer*." msgstr "" -#: ../../../c-api/unicode.rst:1905 +#: ../../../c-api/unicode.rst:1906 msgid "" "*str* must be Python :class:`str` object. *start* must be greater than or " "equal to 0, and less than or equal to *end*. *end* must be less than or " "equal to *str* length." msgstr "" -#: ../../../c-api/unicode.rst:1914 +#: ../../../c-api/unicode.rst:1915 msgid "" "Similar to :c:func:`PyUnicode_FromFormat`, but write the output directly " "into *writer*." msgstr "" -#: ../../../c-api/unicode.rst:1921 +#: ../../../c-api/unicode.rst:1922 msgid "" "Decode the string *str* from UTF-8 with *errors* error handler and write the " "output into *writer*." msgstr "" -#: ../../../c-api/unicode.rst:1927 +#: ../../../c-api/unicode.rst:1928 msgid "" "*errors* is an :ref:`error handler ` name, such as " "``\"replace\"``. If *errors* is ``NULL``, use the strict error handler." msgstr "" -#: ../../../c-api/unicode.rst:1930 +#: ../../../c-api/unicode.rst:1931 msgid "" "If *consumed* is not ``NULL``, set *\\*consumed* to the number of decoded " "bytes on success. If *consumed* is ``NULL``, treat trailing incomplete UTF-8 " "byte sequences as an error." msgstr "" -#: ../../../c-api/unicode.rst:1938 +#: ../../../c-api/unicode.rst:1939 msgid "See also :c:func:`PyUnicodeWriter_WriteUTF8`." msgstr "" -#: ../../../c-api/unicode.rst:1941 +#: ../../../c-api/unicode.rst:1942 msgid "Deprecated API" msgstr "" -#: ../../../c-api/unicode.rst:1943 +#: ../../../c-api/unicode.rst:1944 msgid "The following API is deprecated." msgstr "" -#: ../../../c-api/unicode.rst:1947 +#: ../../../c-api/unicode.rst:1948 msgid "" "This is a typedef of :c:type:`wchar_t`, which is a 16-bit type or 32-bit " "type depending on the platform. Please use :c:type:`wchar_t` directly " "instead." msgstr "" -#: ../../../c-api/unicode.rst:1951 +#: ../../../c-api/unicode.rst:1952 msgid "" "In previous versions, this was a 16-bit type or a 32-bit type depending on " "whether you selected a \"narrow\" or \"wide\" Unicode version of Python at " "build time." msgstr "" -#: ../../../c-api/unicode.rst:1961 +#: ../../../c-api/unicode.rst:1962 msgid "" "Do nothing and return ``0``. This API is kept only for backward " "compatibility, but there are no plans to remove it." msgstr "" -#: ../../../c-api/unicode.rst:1967 +#: ../../../c-api/unicode.rst:1968 msgid "" "This API does nothing since Python 3.12. Previously, this needed to be " "called for each string created using the old API (:c:func:`!" "PyUnicode_FromUnicode` or similar)." msgstr "" -#: ../../../c-api/unicode.rst:1975 +#: ../../../c-api/unicode.rst:1976 msgid "" "Do nothing and return ``1``. This API is kept only for backward " "compatibility, but there are no plans to remove it." msgstr "" -#: ../../../c-api/unicode.rst:1981 +#: ../../../c-api/unicode.rst:1982 msgid "" "This API does nothing since Python 3.12. Previously, this could be called to " "check if :c:func:`PyUnicode_READY` is necessary." diff --git a/main/locale/pot/LC_MESSAGES/c-api/veryhigh.pot b/main/locale/pot/LC_MESSAGES/c-api/veryhigh.pot index eac9f9e4ad2..7a863cd151e 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/veryhigh.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/veryhigh.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -387,7 +387,75 @@ msgid "" "mod:`!ast` Python module, which exports these constants under the same names." msgstr "" -#: ../../../c-api/veryhigh.rst:346 +#: ../../../c-api/veryhigh.rst:347 +msgid "Low-level flags" +msgstr "" + +#: ../../../c-api/veryhigh.rst:348 +msgid "" +"The following flags and masks serve narrow needs of the standard library and " +"interactive interpreters. Code outside the standard library rarely has a " +"reason to use them. They are considered implementation details and may " +"change at any time." +msgstr "" + +#: ../../../c-api/veryhigh.rst:355 +msgid "" +"This flag is a private interface between the compiler and the :mod:`codeop` " +"module. Do not use it; its behavior is unsupported and may change without " +"warning." +msgstr "" + +#: ../../../c-api/veryhigh.rst:359 +msgid "" +"With this flag set, when compilation fails because the source text ends " +"where more input is expected, for example in the middle of an indented block " +"or an unterminated string literal, the error raised is the undocumented " +"``_IncompleteInputError``, a subclass of :exc:`SyntaxError`. The :mod:" +"`codeop` module sets this flag, together with :c:macro:" +"`PyCF_DONT_IMPLY_DEDENT`, to tell input that is incomplete apart from input " +"with a real syntax error, so that interactive interpreters know when to " +"prompt for another line instead of reporting an error." +msgstr "" + +#: ../../../c-api/veryhigh.rst:373 +msgid "" +"By default, when compiling with the :c:var:`Py_single_input` start symbol, " +"reaching the end of the source text implicitly closes any open indented " +"blocks. With this flag set, open blocks are only closed if the last line of " +"the source ends with a newline; otherwise, compilation fails with a :exc:" +"`SyntaxError`:" +msgstr "" + +#: ../../../c-api/veryhigh.rst:396 +msgid "" +"The :mod:`codeop` module uses this flag to detect incomplete interactive " +"input. While the user is still typing inside an indented block, the source " +"does not yet end with a newline, so it fails to compile and the user is " +"prompted for another line." +msgstr "" + +#: ../../../c-api/veryhigh.rst:403 +msgid "" +"Read the source text as UTF-8, ignoring its :pep:`263` encoding declaration " +"(\"coding cookie\"), if any:" +msgstr "" + +#: ../../../c-api/veryhigh.rst:423 +msgid "" +"The :func:`compile`, :func:`eval` and :func:`exec` built-in functions set " +"this flag when the source is a :class:`str` object, because they pass the " +"text to the parser encoded as UTF-8." +msgstr "" + +#: ../../../c-api/veryhigh.rst:429 +msgid "" +"Mark the source text as known to be UTF-8 encoded. The :func:`compile`, :" +"func:`eval` and :func:`exec` built-in functions set this flag, but it " +"currently has no effect." +msgstr "" + +#: ../../../c-api/veryhigh.rst:433 msgid "" "The \"``PyCF``\" flags above can be combined with \"``CO_FUTURE``\" flags " "such as :c:macro:`CO_FUTURE_ANNOTATIONS` to enable features normally " @@ -395,88 +463,119 @@ msgid "" "`c_codeobject_flags` for a complete list." msgstr "" -#: ../../../c-api/veryhigh.rst:355 +#: ../../../c-api/veryhigh.rst:438 +msgid "The following masks combine several flags:" +msgstr "" + +#: ../../../c-api/veryhigh.rst:442 +msgid "" +"Bitmask of all ``CO_FUTURE`` flags (see :ref:`c_codeobject_flags`), which " +"select features normally enabled by :ref:`future statements `. When " +"code compiled with a ``PyCompilerFlags *flags`` argument contains a ``from " +"__future__ import`` statement, the flag for the imported feature is added to " +"*flags*, so that code executed later in the same context inherits it." +msgstr "" + +#: ../../../c-api/veryhigh.rst:452 +msgid "" +"Do not use this mask in new code. It is kept only so that old code passing " +"its flags to :func:`compile` keeps working." +msgstr "" + +#: ../../../c-api/veryhigh.rst:455 +msgid "" +"Bitmask of flags for obsolete future features that no longer have any effect." +msgstr "" + +#: ../../../c-api/veryhigh.rst:460 +msgid "" +"Bitmask of all ``PyCF`` flags that change how the source is compiled, such " +"as :c:macro:`PyCF_ONLY_AST`. The :func:`compile` built-in function uses this " +"mask to validate its *flags* argument." +msgstr "" + +#: ../../../c-api/veryhigh.rst:469 msgid "Available start symbols" msgstr "" -#: ../../../c-api/veryhigh.rst:362 +#: ../../../c-api/veryhigh.rst:476 msgid "" "The start symbol from the Python grammar for isolated expressions; for use " "with :c:func:`Py_CompileString`." msgstr "" -#: ../../../c-api/veryhigh.rst:370 +#: ../../../c-api/veryhigh.rst:484 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:379 +#: ../../../c-api/veryhigh.rst:493 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:388 +#: ../../../c-api/veryhigh.rst:502 msgid "" "The start symbol from the Python grammar for a function type; for use with :" "c:func:`Py_CompileString`. This is used to parse \"signature type comments\" " "from :pep:`484`." msgstr "" -#: ../../../c-api/veryhigh.rst:392 +#: ../../../c-api/veryhigh.rst:506 msgid "This requires the :c:macro:`PyCF_ONLY_AST` flag to be set." msgstr "" -#: ../../../c-api/veryhigh.rst:395 +#: ../../../c-api/veryhigh.rst:509 msgid ":py:class:`ast.FunctionType`" msgstr "" -#: ../../../c-api/veryhigh.rst:396 +#: ../../../c-api/veryhigh.rst:510 msgid ":pep:`484`" msgstr "" -#: ../../../c-api/veryhigh.rst:402 +#: ../../../c-api/veryhigh.rst:516 msgid "Stack Effects" msgstr "" -#: ../../../c-api/veryhigh.rst:405 +#: ../../../c-api/veryhigh.rst:519 msgid ":py:func:`dis.stack_effect`" msgstr "" -#: ../../../c-api/veryhigh.rst:410 +#: ../../../c-api/veryhigh.rst:524 msgid "Sentinel value representing an invalid stack effect." msgstr "" -#: ../../../c-api/veryhigh.rst:412 +#: ../../../c-api/veryhigh.rst:526 msgid "This is currently equivalent to ``INT_MAX``." msgstr "" -#: ../../../c-api/veryhigh.rst:419 +#: ../../../c-api/veryhigh.rst:533 msgid "Compute the stack effect of *opcode* with argument *oparg*." msgstr "" -#: ../../../c-api/veryhigh.rst:421 ../../../c-api/veryhigh.rst:435 +#: ../../../c-api/veryhigh.rst:535 ../../../c-api/veryhigh.rst:549 msgid "" "On success, this function returns the stack effect; on failure, this " "returns :c:macro:`PY_INVALID_STACK_EFFECT`." msgstr "" -#: ../../../c-api/veryhigh.rst:429 +#: ../../../c-api/veryhigh.rst:543 msgid "" "Similar to :c:func:`PyCompile_OpcodeStackEffect`, but don't include the " "stack effect of jumping if *jump* is zero." msgstr "" -#: ../../../c-api/veryhigh.rst:432 +#: ../../../c-api/veryhigh.rst:546 msgid "" "If *jump* is ``0``, this will not include the stack effect of jumping, but " "if *jump* is ``1`` or ``-1``, this will include it." msgstr "" -#: ../../../c-api/veryhigh.rst:360 ../../../c-api/veryhigh.rst:368 -#: ../../../c-api/veryhigh.rst:377 ../../../c-api/veryhigh.rst:386 +#: ../../../c-api/veryhigh.rst:474 ../../../c-api/veryhigh.rst:482 +#: ../../../c-api/veryhigh.rst:491 ../../../c-api/veryhigh.rst:500 msgid "Py_CompileString (C function)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/deprecations/index.pot b/main/locale/pot/LC_MESSAGES/deprecations/index.pot index f67e350acbb..8897ce78467 100644 --- a/main/locale/pot/LC_MESSAGES/deprecations/index.pot +++ b/main/locale/pot/LC_MESSAGES/deprecations/index.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -116,6 +116,20 @@ msgid "" "removal in Python 3.17." msgstr "" +#: ../../../deprecations/pending-removal-in-3.17.rst:72 +#: ../../../deprecations/pending-removal-in-3.19.rst:44 +msgid ":mod:`tkinter`:" +msgstr "" + +#: ../../../deprecations/pending-removal-in-3.17.rst:74 +msgid "" +"The :class:`!tkinter.Variable` methods :meth:`!trace_variable`, :meth:`!" +"trace` (an alias of :meth:`!trace_variable`), :meth:`!trace_vdelete` and :" +"meth:`!trace_vinfo`, deprecated since Python 3.14, are scheduled for removal " +"in Python 3.17. Use :meth:`!trace_add`, :meth:`!trace_remove` and :meth:`!" +"trace_info` instead. (Contributed by Serhiy Storchaka in :gh:`120220`.)" +msgstr "" + #: ../../../deprecations/c-api-pending-removal-in-3.18.rst:2 #: ../../../deprecations/pending-removal-in-3.18.rst:2 msgid "Pending removal in Python 3.18" @@ -230,6 +244,14 @@ msgid "" "is no longer the case since then." msgstr "" +#: ../../../deprecations/pending-removal-in-3.19.rst:46 +msgid "" +":func:`tkinter.filedialog.askopenfiles` has been deprecated since Python " +"3.16. Iterate over the names returned by :func:`~tkinter.filedialog." +"askopenfilenames` and open them one by one instead. (Contributed by Serhiy " +"Storchaka in :gh:`152638`.)" +msgstr "" + #: ../../../deprecations/c-api-pending-removal-in-3.20.rst:2 #: ../../../deprecations/pending-removal-in-3.20.rst:2 msgid "Pending removal in Python 3.20" @@ -407,6 +429,27 @@ msgid "" "the ``ast.Tuple.elts`` property instead." msgstr "" +#: ../../../deprecations/pending-removal-in-3.21.rst:21 +msgid ":mod:`struct`:" +msgstr "" + +#: ../../../deprecations/pending-removal-in-3.21.rst:23 +msgid "" +"Soft-deprecated since Python 3.15, using ``'F'`` and ``'D'`` type codes are " +"now deprecated. These codes will be removed in Python 3.21. Use instead " +"two-letter forms ``'Zf'`` and ``'Zd'``." +msgstr "" + +#: ../../../deprecations/pending-removal-in-3.21.rst:27 +msgid ":mod:`tempfile`:" +msgstr "" + +#: ../../../deprecations/pending-removal-in-3.21.rst:29 +msgid "" +"``tempfile._TemporaryFileWrapper`` will be removed in Python 3.21. Use the " +"public :class:`tempfile.TemporaryFileWrapper` instead." +msgstr "" + #: ../../../deprecations/c-api-pending-removal-in-future.rst:2 #: ../../../deprecations/pending-removal-in-future.rst:2 msgid "Pending removal in future versions" diff --git a/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.16.pot b/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.16.pot index 049d6643228..ca1a534788c 100644 --- a/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.16.pot +++ b/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.16.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -74,27 +74,27 @@ msgid "" msgstr "" #: ../../../deprecations/pending-removal-in-3.16.rst:36 -msgid ":class:`asyncio.AbstractEventLoopPolicy`" +msgid ":class:`!asyncio.AbstractEventLoopPolicy`" msgstr "" #: ../../../deprecations/pending-removal-in-3.16.rst:37 -msgid ":class:`asyncio.DefaultEventLoopPolicy`" +msgid ":class:`!asyncio.DefaultEventLoopPolicy`" msgstr "" #: ../../../deprecations/pending-removal-in-3.16.rst:38 -msgid ":class:`asyncio.WindowsSelectorEventLoopPolicy`" +msgid ":class:`!asyncio.WindowsSelectorEventLoopPolicy`" msgstr "" #: ../../../deprecations/pending-removal-in-3.16.rst:39 -msgid ":class:`asyncio.WindowsProactorEventLoopPolicy`" +msgid ":class:`!asyncio.WindowsProactorEventLoopPolicy`" msgstr "" #: ../../../deprecations/pending-removal-in-3.16.rst:40 -msgid ":func:`asyncio.get_event_loop_policy`" +msgid ":func:`!asyncio.get_event_loop_policy`" msgstr "" #: ../../../deprecations/pending-removal-in-3.16.rst:41 -msgid ":func:`asyncio.set_event_loop_policy`" +msgid ":func:`!asyncio.set_event_loop_policy`" msgstr "" #: ../../../deprecations/pending-removal-in-3.16.rst:43 diff --git a/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.17.pot b/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.17.pot index f2f1ebdde66..c68187212d2 100644 --- a/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.17.pot +++ b/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.17.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -110,3 +110,16 @@ msgid "" ":class:`typing.ByteString`, deprecated since Python 3.9, is scheduled for " "removal in Python 3.17." msgstr "" + +#: ../../../deprecations/pending-removal-in-3.17.rst:72 +msgid ":mod:`tkinter`:" +msgstr "" + +#: ../../../deprecations/pending-removal-in-3.17.rst:74 +msgid "" +"The :class:`!tkinter.Variable` methods :meth:`!trace_variable`, :meth:`!" +"trace` (an alias of :meth:`!trace_variable`), :meth:`!trace_vdelete` and :" +"meth:`!trace_vinfo`, deprecated since Python 3.14, are scheduled for removal " +"in Python 3.17. Use :meth:`!trace_add`, :meth:`!trace_remove` and :meth:`!" +"trace_info` instead. (Contributed by Serhiy Storchaka in :gh:`120220`.)" +msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.19.pot b/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.19.pot index b7c7d060a01..a52a652956e 100644 --- a/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.19.pot +++ b/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.19.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -92,3 +92,15 @@ msgid "" "``read()`` and ``readline()`` methods for :class:`~imaplib.IMAP4` but this " "is no longer the case since then." msgstr "" + +#: ../../../deprecations/pending-removal-in-3.19.rst:44 +msgid ":mod:`tkinter`:" +msgstr "" + +#: ../../../deprecations/pending-removal-in-3.19.rst:46 +msgid "" +":func:`tkinter.filedialog.askopenfiles` has been deprecated since Python " +"3.16. Iterate over the names returned by :func:`~tkinter.filedialog." +"askopenfilenames` and open them one by one instead. (Contributed by Serhiy " +"Storchaka in :gh:`152638`.)" +msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.21.pot b/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.21.pot index 9893e06cec9..2d81b61ed46 100644 --- a/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.21.pot +++ b/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.21.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -50,3 +50,24 @@ msgid "" "The ``dims`` property of ``ast.Tuple`` will be removed in Python 3.21. Use " "the ``ast.Tuple.elts`` property instead." msgstr "" + +#: ../../../deprecations/pending-removal-in-3.21.rst:21 +msgid ":mod:`struct`:" +msgstr "" + +#: ../../../deprecations/pending-removal-in-3.21.rst:23 +msgid "" +"Soft-deprecated since Python 3.15, using ``'F'`` and ``'D'`` type codes are " +"now deprecated. These codes will be removed in Python 3.21. Use instead " +"two-letter forms ``'Zf'`` and ``'Zd'``." +msgstr "" + +#: ../../../deprecations/pending-removal-in-3.21.rst:27 +msgid ":mod:`tempfile`:" +msgstr "" + +#: ../../../deprecations/pending-removal-in-3.21.rst:29 +msgid "" +"``tempfile._TemporaryFileWrapper`` will be removed in Python 3.21. Use the " +"public :class:`tempfile.TemporaryFileWrapper` instead." +msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/extending/extending.pot b/main/locale/pot/LC_MESSAGES/extending/extending.pot index d48c8737bf2..a083fa3b085 100644 --- a/main/locale/pot/LC_MESSAGES/extending/extending.pot +++ b/main/locale/pot/LC_MESSAGES/extending/extending.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -258,13 +258,12 @@ msgstr "" #: ../../../extending/extending.rst:233 msgid "" "Fortunately, the Python interpreter is easily called recursively, and there " -"is a standard interface to call a Python function. (I won't dwell on how to " -"call the Python parser with a particular string as input --- if you're " -"interested, have a look at the implementation of the :option:`-c` command " -"line option in :file:`Modules/main.c` from the Python source code.)" +"is a standard interface to call a Python function. (If you're interested in " +"how to call the Python parser with a particular string as input, see :ref:" +"`veryhigh`.)" msgstr "" -#: ../../../extending/extending.rst:239 +#: ../../../extending/extending.rst:237 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 " @@ -274,7 +273,7 @@ msgid "" "function might be part of a module definition::" msgstr "" -#: ../../../extending/extending.rst:269 +#: ../../../extending/extending.rst:267 msgid "" "This function must be registered with the interpreter using the :c:macro:" "`METH_VARARGS` flag in :c:type:`PyMethodDef.ml_flags`. The :c:func:" @@ -282,7 +281,7 @@ msgid "" "`parsetuple`." msgstr "" -#: ../../../extending/extending.rst:274 +#: ../../../extending/extending.rst:272 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`` " @@ -290,7 +289,7 @@ msgid "" "info on them in section :ref:`refcounts`." msgstr "" -#: ../../../extending/extending.rst:281 +#: ../../../extending/extending.rst:279 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 " @@ -302,7 +301,7 @@ msgid "" "or more format codes between parentheses. For example::" msgstr "" -#: ../../../extending/extending.rst:301 +#: ../../../extending/extending.rst:299 msgid "" ":c:func:`PyObject_CallObject` returns a Python object pointer: this is the " "return value of the Python function. :c:func:`PyObject_CallObject` is " @@ -311,7 +310,7 @@ msgid "" "`Py_DECREF`\\ -ed immediately after the :c:func:`PyObject_CallObject` call." msgstr "" -#: ../../../extending/extending.rst:308 +#: ../../../extending/extending.rst:306 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 " @@ -320,7 +319,7 @@ msgid "" "not interested in its value." msgstr "" -#: ../../../extending/extending.rst:314 +#: ../../../extending/extending.rst:312 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 " @@ -331,7 +330,7 @@ msgid "" "should be cleared by calling :c:func:`PyErr_Clear`. For example::" msgstr "" -#: ../../../extending/extending.rst:327 +#: ../../../extending/extending.rst:325 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 " @@ -343,7 +342,7 @@ msgid "" "you want to pass an integral event code, you might use the following code::" msgstr "" -#: ../../../extending/extending.rst:346 +#: ../../../extending/extending.rst:344 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 " @@ -351,18 +350,18 @@ msgid "" "checked." msgstr "" -#: ../../../extending/extending.rst:350 +#: ../../../extending/extending.rst:348 msgid "" "You may also call a function with keyword arguments by using :c:func:" "`PyObject_Call`, which supports arguments and keyword arguments. As in the " "above example, we use :c:func:`Py_BuildValue` to construct the dictionary. ::" msgstr "" -#: ../../../extending/extending.rst:370 +#: ../../../extending/extending.rst:368 msgid "Extracting Parameters in Extension Functions" msgstr "" -#: ../../../extending/extending.rst:372 +#: ../../../extending/extending.rst:370 msgid "" "The :ref:`tutorial ` uses a \":c:data:`METH_O`\" " "function, which is limited to a single Python argument. If you want more, " @@ -370,13 +369,13 @@ msgid "" "will receive a :py:class:`tuple` of arguments instead of a single object." msgstr "" -#: ../../../extending/extending.rst:378 +#: ../../../extending/extending.rst:376 msgid "" "For unpacking the tuple, CPython provides the :c:func:`PyArg_ParseTuple` " "function, declared as follows::" msgstr "" -#: ../../../extending/extending.rst:383 +#: ../../../extending/extending.rst:381 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, " @@ -385,13 +384,13 @@ msgid "" "whose type is determined by the format string." msgstr "" -#: ../../../extending/extending.rst:389 +#: ../../../extending/extending.rst:387 msgid "" "For example, to receive a single Python :py:class:`str` object and turn it " "into a C buffer, you would use ``\"s\"`` as the format string::" msgstr "" -#: ../../../extending/extending.rst:397 +#: ../../../extending/extending.rst:395 msgid "" "If an error is detected in the argument list, :c:func:`!PyArg_ParseTuple` " "returns ``NULL`` (the error indicator for functions returning object " @@ -399,7 +398,7 @@ msgid "" "by :c:func:`PyArg_ParseTuple`." msgstr "" -#: ../../../extending/extending.rst:402 +#: ../../../extending/extending.rst:400 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 " @@ -407,21 +406,21 @@ msgid "" "probably crash or at least overwrite random bits in memory. So be careful!" msgstr "" -#: ../../../extending/extending.rst:407 +#: ../../../extending/extending.rst:405 msgid "" "Note that any Python object references which are provided to the caller are " "*borrowed* references; do not decrement their reference count!" msgstr "" -#: ../../../extending/extending.rst:410 +#: ../../../extending/extending.rst:408 msgid "Some example calls::" msgstr "" -#: ../../../extending/extending.rst:479 +#: ../../../extending/extending.rst:477 msgid "Keyword Parameters for Extension Functions" msgstr "" -#: ../../../extending/extending.rst:481 +#: ../../../extending/extending.rst:479 msgid "" "If you also want your function to accept :term:`keyword arguments `, use the :c:data:`METH_KEYWORDS` flag in combination with :c:data:" @@ -429,19 +428,19 @@ msgid "" "see its documentation for the allowed combinations.)" msgstr "" -#: ../../../extending/extending.rst:487 +#: ../../../extending/extending.rst:485 msgid "" "In this case, the C function should accept a third ``PyObject *`` parameter " "which will be a dictionary of keywords. Use :c:func:" "`PyArg_ParseTupleAndKeywords` to parse the arguments to such a function." msgstr "" -#: ../../../extending/extending.rst:494 +#: ../../../extending/extending.rst:492 msgid "" "The :c:func:`PyArg_ParseTupleAndKeywords` function is declared as follows::" msgstr "" -#: ../../../extending/extending.rst:499 +#: ../../../extending/extending.rst:497 msgid "" "The *arg* and *format* parameters are identical to those of the :c:func:" "`PyArg_ParseTuple` function. The *kwdict* parameter is the dictionary of " @@ -453,30 +452,30 @@ msgid "" "raises an appropriate exception." msgstr "" -#: ../../../extending/extending.rst:509 +#: ../../../extending/extending.rst:507 msgid "" "Nested tuples cannot be parsed when using keyword arguments! Keyword " "parameters passed in which are not present in the *kwlist* will cause :exc:" "`TypeError` to be raised." msgstr "" -#: ../../../extending/extending.rst:515 +#: ../../../extending/extending.rst:513 msgid "" "Here is an example module which uses keywords, based on an example by Geoff " "Philbrick (philbrick@hks.com)::" msgstr "" -#: ../../../extending/extending.rst:556 +#: ../../../extending/extending.rst:554 msgid "Building Arbitrary Values" msgstr "" -#: ../../../extending/extending.rst:558 +#: ../../../extending/extending.rst:556 msgid "" "This function is the counterpart to :c:func:`PyArg_ParseTuple`. It is " "declared as follows::" msgstr "" -#: ../../../extending/extending.rst:563 +#: ../../../extending/extending.rst:561 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, " @@ -484,7 +483,7 @@ msgid "" "object, suitable for returning from a C function called from Python." msgstr "" -#: ../../../extending/extending.rst:568 +#: ../../../extending/extending.rst:566 msgid "" "One difference with :c:func:`PyArg_ParseTuple`: while the latter requires " "its first argument to be a tuple (since Python argument lists are always " @@ -496,16 +495,16 @@ msgid "" "parenthesize the format string." msgstr "" -#: ../../../extending/extending.rst:576 +#: ../../../extending/extending.rst:574 msgid "" "Examples (to the left the call, to the right the resulting Python value):" msgstr "" -#: ../../../extending/extending.rst:602 +#: ../../../extending/extending.rst:600 msgid "Reference Counts" msgstr "" -#: ../../../extending/extending.rst:604 +#: ../../../extending/extending.rst:602 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 " @@ -514,7 +513,7 @@ msgid "" "restrict the following discussion to the C case." msgstr "" -#: ../../../extending/extending.rst:610 +#: ../../../extending/extending.rst:608 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:" @@ -529,7 +528,7 @@ msgid "" "crashes." msgstr "" -#: ../../../extending/extending.rst:621 +#: ../../../extending/extending.rst:619 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, " @@ -546,7 +545,7 @@ msgid "" "of errors." msgstr "" -#: ../../../extending/extending.rst:634 +#: ../../../extending/extending.rst:632 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. " @@ -557,11 +556,11 @@ msgid "" "reference to the object has been deleted and the object is freed." msgstr "" -#: ../../../extending/extending.rst:642 +#: ../../../extending/extending.rst:640 msgid "" "An alternative strategy is called :dfn:`automatic garbage collection`. " "(Sometimes, reference counting is also referred to as a garbage collection " -"strategy, hence my use of \"automatic\" to distinguish the two.) The big " +"strategy, hence the use of \"automatic\" to distinguish the two.) The big " "advantage of automatic garbage collection is that the user doesn't need to " "call :c:func:`free` explicitly. (Another claimed advantage is an " "improvement in speed or memory usage --- this is no hard fact however.) The " @@ -573,7 +572,7 @@ msgid "" "with reference counts." msgstr "" -#: ../../../extending/extending.rst:654 +#: ../../../extending/extending.rst:652 msgid "" "While Python uses the traditional reference counting implementation, it also " "offers a cycle detector that works to detect reference cycles. This allows " @@ -587,7 +586,7 @@ msgid "" "though there are no further references to the cycle itself." msgstr "" -#: ../../../extending/extending.rst:665 +#: ../../../extending/extending.rst:663 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." @@ -595,11 +594,11 @@ msgid "" "disable the detector at runtime." msgstr "" -#: ../../../extending/extending.rst:674 +#: ../../../extending/extending.rst:672 msgid "Reference Counting in Python" msgstr "" -#: ../../../extending/extending.rst:676 +#: ../../../extending/extending.rst:674 msgid "" "There are two macros, ``Py_INCREF(x)`` and ``Py_DECREF(x)``, which handle " "the incrementing and decrementing of the reference count. :c:func:" @@ -610,7 +609,7 @@ msgid "" "object." msgstr "" -#: ../../../extending/extending.rst:683 +#: ../../../extending/extending.rst:681 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 " @@ -623,7 +622,7 @@ msgid "" "reference creates a memory leak." msgstr "" -#: ../../../extending/extending.rst:692 +#: ../../../extending/extending.rst:690 msgid "" "It is also possible to :dfn:`borrow` [#borrow]_ a reference to an object. " "The borrower of a reference should not call :c:func:`Py_DECREF`. The " @@ -633,7 +632,7 @@ msgid "" "refcount]_." msgstr "" -#: ../../../extending/extending.rst:698 +#: ../../../extending/extending.rst:696 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 " @@ -644,7 +643,7 @@ msgid "" "borrowed has in fact disposed of it." msgstr "" -#: ../../../extending/extending.rst:706 +#: ../../../extending/extending.rst:704 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 " @@ -653,18 +652,18 @@ msgid "" "properly, as well as the previous owner)." msgstr "" -#: ../../../extending/extending.rst:716 +#: ../../../extending/extending.rst:714 msgid "Ownership Rules" msgstr "" -#: ../../../extending/extending.rst:718 +#: ../../../extending/extending.rst:716 msgid "" "Whenever an object reference is passed into or out of a function, it is part " "of the function's interface specification whether ownership is transferred " "with the reference or not." msgstr "" -#: ../../../extending/extending.rst:722 +#: ../../../extending/extending.rst:720 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 " @@ -675,7 +674,7 @@ msgid "" "reference to a cached item." msgstr "" -#: ../../../extending/extending.rst:730 +#: ../../../extending/extending.rst:728 msgid "" "Many functions that extract objects from other objects also transfer " "ownership with the reference, for instance :c:func:" @@ -686,14 +685,14 @@ msgid "" "list or dictionary." msgstr "" -#: ../../../extending/extending.rst:737 +#: ../../../extending/extending.rst:735 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:741 +#: ../../../extending/extending.rst:739 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 " @@ -704,7 +703,7 @@ msgid "" "don't take over ownership --- they are \"normal.\")" msgstr "" -#: ../../../extending/extending.rst:749 +#: ../../../extending/extending.rst:747 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 " @@ -713,18 +712,18 @@ msgid "" "turned into an owned reference by calling :c:func:`Py_INCREF`." msgstr "" -#: ../../../extending/extending.rst:755 +#: ../../../extending/extending.rst:753 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:763 +#: ../../../extending/extending.rst:761 msgid "Thin Ice" msgstr "" -#: ../../../extending/extending.rst:765 +#: ../../../extending/extending.rst:763 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 " @@ -732,21 +731,21 @@ msgid "" "dispose of it." msgstr "" -#: ../../../extending/extending.rst:769 +#: ../../../extending/extending.rst:767 msgid "" "The first and most important case to know about is using :c:func:`Py_DECREF` " "on an unrelated object while borrowing a reference to a list item. For " "instance::" msgstr "" -#: ../../../extending/extending.rst:781 +#: ../../../extending/extending.rst:779 msgid "" "This function first borrows a reference to ``list[0]``, then replaces " "``list[1]`` with the value ``0``, and finally prints the borrowed reference. " "Looks harmless, right? But it's not!" msgstr "" -#: ../../../extending/extending.rst:785 +#: ../../../extending/extending.rst:783 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 " @@ -763,7 +762,7 @@ msgid "" "`PyList_SetItem` call." msgstr "" -#: ../../../extending/extending.rst:799 +#: ../../../extending/extending.rst:797 msgid "" "Since it is written in Python, the :meth:`!__del__` method can execute " "arbitrary Python code. Could it perhaps do something to invalidate the " @@ -774,20 +773,20 @@ msgid "" "associated with it, thereby invalidating ``item``." msgstr "" -#: ../../../extending/extending.rst:807 +#: ../../../extending/extending.rst:805 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:821 +#: ../../../extending/extending.rst:819 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:825 +#: ../../../extending/extending.rst:823 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 " @@ -800,11 +799,11 @@ msgid "" "Obviously, the following function has the same problem as the previous one::" msgstr "" -#: ../../../extending/extending.rst:849 +#: ../../../extending/extending.rst:847 msgid "NULL Pointers" msgstr "" -#: ../../../extending/extending.rst:851 +#: ../../../extending/extending.rst:849 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 " @@ -816,21 +815,21 @@ msgid "" "more slowly." msgstr "" -#: ../../../extending/extending.rst:859 +#: ../../../extending/extending.rst:857 msgid "" "It is better to test for ``NULL`` only at the \"source:\" when a pointer " "that may be ``NULL`` is received, for example, from :c:func:`malloc` or from " "a function that may raise an exception." msgstr "" -#: ../../../extending/extending.rst:863 +#: ../../../extending/extending.rst:861 msgid "" "The macros :c:func:`Py_INCREF` and :c:func:`Py_DECREF` do not check for " "``NULL`` pointers --- however, their variants :c:func:`Py_XINCREF` and :c:" "func:`Py_XDECREF` do." msgstr "" -#: ../../../extending/extending.rst:867 +#: ../../../extending/extending.rst:865 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 " @@ -839,24 +838,24 @@ msgid "" "variants with ``NULL`` checking." msgstr "" -#: ../../../extending/extending.rst:873 +#: ../../../extending/extending.rst:871 msgid "" "The C function calling mechanism guarantees that the argument list passed to " "C functions (``args`` in the examples) is never ``NULL`` --- in fact it " "guarantees that it is always a tuple [#old-calling-convention]_." msgstr "" -#: ../../../extending/extending.rst:877 +#: ../../../extending/extending.rst:875 msgid "" "It is a severe error to ever let a ``NULL`` pointer \"escape\" to the Python " "user." msgstr "" -#: ../../../extending/extending.rst:888 +#: ../../../extending/extending.rst:886 msgid "Writing Extensions in C++" msgstr "" -#: ../../../extending/extending.rst:890 +#: ../../../extending/extending.rst:888 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 " @@ -869,11 +868,11 @@ msgid "" "(all recent C++ compilers define this symbol)." msgstr "" -#: ../../../extending/extending.rst:904 +#: ../../../extending/extending.rst:902 msgid "Providing a C API for an Extension Module" msgstr "" -#: ../../../extending/extending.rst:906 +#: ../../../extending/extending.rst:904 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 " @@ -884,7 +883,7 @@ msgid "" "functions for direct manipulation from other extension modules." msgstr "" -#: ../../../extending/extending.rst:914 +#: ../../../extending/extending.rst:912 msgid "" "At first sight this seems easy: just write the functions (without declaring " "them ``static``, of course), provide an appropriate header file, and " @@ -900,7 +899,7 @@ msgid "" "call might not have been loaded yet!" msgstr "" -#: ../../../extending/extending.rst:926 +#: ../../../extending/extending.rst:924 msgid "" "Portability therefore requires not to make any assumptions about symbol " "visibility. This means that all symbols in extension modules should be " @@ -910,7 +909,7 @@ msgid "" "exported in a different way." msgstr "" -#: ../../../extending/extending.rst:933 +#: ../../../extending/extending.rst:931 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 " @@ -922,7 +921,7 @@ msgid "" "the Capsule." msgstr "" -#: ../../../extending/extending.rst:941 +#: ../../../extending/extending.rst:939 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 " @@ -932,7 +931,7 @@ msgid "" "client modules." msgstr "" -#: ../../../extending/extending.rst:947 +#: ../../../extending/extending.rst:945 msgid "" "Whichever method you choose, it's important to name your Capsules properly. " "The function :c:func:`PyCapsule_New` takes a name parameter (:c:expr:`const " @@ -942,13 +941,13 @@ msgid "" "from another." msgstr "" -#: ../../../extending/extending.rst:954 +#: ../../../extending/extending.rst:952 msgid "" "In particular, Capsules used to expose C APIs should be given a name " "following this convention::" msgstr "" -#: ../../../extending/extending.rst:959 +#: ../../../extending/extending.rst:957 msgid "" "The convenience function :c:func:`PyCapsule_Import` makes it easy to load a " "C API provided via a Capsule, but only if the Capsule's name matches this " @@ -956,7 +955,7 @@ msgid "" "the Capsule they load contains the correct C API." msgstr "" -#: ../../../extending/extending.rst:964 +#: ../../../extending/extending.rst:962 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 " @@ -967,7 +966,7 @@ msgid "" "modules only have to call this macro before accessing the C API." msgstr "" -#: ../../../extending/extending.rst:972 +#: ../../../extending/extending.rst:970 msgid "" "The exporting module is a modification of the :mod:`!spam` module from the :" "ref:`tutorial `. The function :func:`!spam.system` " @@ -978,25 +977,25 @@ msgid "" "modules." msgstr "" -#: ../../../extending/extending.rst:980 +#: ../../../extending/extending.rst:978 msgid "" "The function :c:func:`!PySpam_System` is a plain C function, declared " "``static`` like everything else::" msgstr "" -#: ../../../extending/extending.rst:989 +#: ../../../extending/extending.rst:987 msgid "The function :c:func:`!spam_system` is modified in a trivial way::" msgstr "" -#: ../../../extending/extending.rst:1003 +#: ../../../extending/extending.rst:1001 msgid "In the beginning of the module, right after the line ::" msgstr "" -#: ../../../extending/extending.rst:1007 +#: ../../../extending/extending.rst:1005 msgid "two more lines must be added::" msgstr "" -#: ../../../extending/extending.rst:1012 +#: ../../../extending/extending.rst:1010 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 :c:data:" @@ -1004,33 +1003,33 @@ msgid "" "pointer array::" msgstr "" -#: ../../../extending/extending.rst:1035 +#: ../../../extending/extending.rst:1033 msgid "" "Note that ``PySpam_API`` is declared ``static``; otherwise the pointer array " "would disappear when :c:func:`!PyInit_spam` terminates!" msgstr "" -#: ../../../extending/extending.rst:1038 +#: ../../../extending/extending.rst:1036 msgid "" "The bulk of the work is in the header file :file:`spammodule.h`, which looks " "like this::" msgstr "" -#: ../../../extending/extending.rst:1089 +#: ../../../extending/extending.rst:1087 msgid "" "All that a client module must do in order to have access to the function :c:" "func:`!PySpam_System` is to call the function (or rather macro) :c:func:`!" "import_spam` in its :c:data:`mod_exec ` function::" msgstr "" -#: ../../../extending/extending.rst:1103 +#: ../../../extending/extending.rst:1101 msgid "" "The main disadvantage of this approach is that the file :file:`spammodule.h` " "is rather complicated. However, the basic structure is the same for each " "function that is exported, so it has to be learned only once." msgstr "" -#: ../../../extending/extending.rst:1107 +#: ../../../extending/extending.rst:1105 msgid "" "Finally it should be mentioned that Capsules offer additional functionality, " "which is especially useful for memory allocation and deallocation of the " @@ -1040,41 +1039,41 @@ msgid "" "in the Python source code distribution)." msgstr "" -#: ../../../extending/extending.rst:1115 +#: ../../../extending/extending.rst:1113 msgid "Footnotes" msgstr "" -#: ../../../extending/extending.rst:1116 +#: ../../../extending/extending.rst:1114 msgid "" "The metaphor of \"borrowing\" a reference is not completely correct: the " "owner still has a copy of the reference." msgstr "" -#: ../../../extending/extending.rst:1119 +#: ../../../extending/extending.rst:1117 msgid "" "Checking that the reference count is at least 1 **does not work** --- the " "reference count itself could be in freed memory and may thus be reused for " "another object!" msgstr "" -#: ../../../extending/extending.rst:1124 +#: ../../../extending/extending.rst:1122 msgid "" "These guarantees don't hold when you use the \"old\" style calling " "convention --- this is still found in much existing code." msgstr "" -#: ../../../extending/extending.rst:279 +#: ../../../extending/extending.rst:277 msgid "PyObject_CallObject (C function)" msgstr "" -#: ../../../extending/extending.rst:365 +#: ../../../extending/extending.rst:363 msgid "PyArg_ParseTuple (C function)" msgstr "" -#: ../../../extending/extending.rst:492 +#: ../../../extending/extending.rst:490 msgid "PyArg_ParseTupleAndKeywords (C function)" msgstr "" -#: ../../../extending/extending.rst:513 +#: ../../../extending/extending.rst:511 msgid "Philbrick, Geoff" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/faq/design.pot b/main/locale/pot/LC_MESSAGES/faq/design.pot index 93955c32b10..53e81a5596d 100644 --- a/main/locale/pot/LC_MESSAGES/faq/design.pot +++ b/main/locale/pot/LC_MESSAGES/faq/design.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-09-08 08:37+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -349,24 +349,26 @@ msgid "" "In general, structured switch statements execute one block of code when an " "expression has a particular value or set of values. Since Python 3.10 one " "can easily match literal values, or constants within a namespace, with a " -"``match ... case`` statement. An older alternative is a sequence of ``if... " -"elif... elif... else``." +"``match ... case`` statement. See :ref:`the specification ` and :ref:" +"`the tutorial ` for more information about :keyword:`match` " +"statements. An older alternative is a sequence of ``if... elif... elif... " +"else``." msgstr "" -#: ../../../faq/design.rst:268 +#: ../../../faq/design.rst:270 msgid "" "For cases where you need to choose from a very large number of " "possibilities, you can create a dictionary mapping case values to functions " "to call. For example::" msgstr "" -#: ../../../faq/design.rst:279 +#: ../../../faq/design.rst:281 msgid "" "For calling methods on objects, you can simplify yet further by using the :" "func:`getattr` built-in to retrieve methods with a particular name::" msgstr "" -#: ../../../faq/design.rst:291 +#: ../../../faq/design.rst:293 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 " @@ -374,19 +376,19 @@ msgid "" "your object." msgstr "" -#: ../../../faq/design.rst:295 +#: ../../../faq/design.rst:297 msgid "" "Imitating switch with fallthrough, as with C's switch-case-default, is " "possible, much harder, and less needed." msgstr "" -#: ../../../faq/design.rst:300 +#: ../../../faq/design.rst:302 msgid "" "Can't you emulate threads in the interpreter instead of relying on an OS-" "specific thread implementation?" msgstr "" -#: ../../../faq/design.rst:302 +#: ../../../faq/design.rst:304 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 " @@ -394,18 +396,18 @@ msgid "" "requires thread support for C." msgstr "" -#: ../../../faq/design.rst:307 +#: ../../../faq/design.rst:309 msgid "" "Answer 2: Fortunately, there is `Stackless Python `_, which has a completely redesigned " "interpreter loop that avoids the C stack." msgstr "" -#: ../../../faq/design.rst:312 +#: ../../../faq/design.rst:314 msgid "Why can't lambda expressions contain statements?" msgstr "" -#: ../../../faq/design.rst:314 +#: ../../../faq/design.rst:316 msgid "" "Python lambda expressions cannot contain statements because Python's " "syntactic framework can't handle statements nested inside expressions. " @@ -414,7 +416,7 @@ msgid "" "shorthand notation if you're too lazy to define a function." msgstr "" -#: ../../../faq/design.rst:320 +#: ../../../faq/design.rst:322 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 " @@ -424,11 +426,11 @@ msgid "" "is assigned!" msgstr "" -#: ../../../faq/design.rst:328 +#: ../../../faq/design.rst:330 msgid "Can Python be compiled to machine code, C or some other language?" msgstr "" -#: ../../../faq/design.rst:330 +#: ../../../faq/design.rst:332 msgid "" "`Cython `_ compiles a modified version of Python with " "optional annotations into C extensions. `Nuitka `_ is " @@ -436,11 +438,11 @@ msgid "" "full Python language." msgstr "" -#: ../../../faq/design.rst:337 +#: ../../../faq/design.rst:339 msgid "How does Python manage memory?" msgstr "" -#: ../../../faq/design.rst:339 +#: ../../../faq/design.rst:341 msgid "" "The details of Python memory management depend on the implementation. The " "standard implementation of Python, :term:`CPython`, uses reference counting " @@ -451,7 +453,7 @@ msgid "" "statistics, and tune the collector's parameters." msgstr "" -#: ../../../faq/design.rst:347 +#: ../../../faq/design.rst:349 msgid "" "Other implementations (such as `Jython `_ or `PyPy " "`_), however, can rely on a different mechanism such as a " @@ -460,13 +462,13 @@ msgid "" "counting implementation." msgstr "" -#: ../../../faq/design.rst:353 +#: ../../../faq/design.rst:355 msgid "" "In some Python implementations, the following code (which is fine in " "CPython) will probably run out of file descriptors::" msgstr "" -#: ../../../faq/design.rst:360 +#: ../../../faq/design.rst:362 msgid "" "Indeed, using CPython's reference counting and destructor scheme, each new " "assignment to ``f`` closes the previous file. With a traditional GC, " @@ -474,18 +476,18 @@ msgid "" "and possibly long intervals." msgstr "" -#: ../../../faq/design.rst:365 +#: ../../../faq/design.rst:367 msgid "" "If you want to write code that will work with any Python implementation, you " "should explicitly close the file or use the :keyword:`with` statement; this " "will work regardless of memory management scheme::" msgstr "" -#: ../../../faq/design.rst:375 +#: ../../../faq/design.rst:377 msgid "Why doesn't CPython use a more traditional garbage collection scheme?" msgstr "" -#: ../../../faq/design.rst:377 +#: ../../../faq/design.rst:379 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 " @@ -494,7 +496,7 @@ msgid "" "Python to work with it.)" msgstr "" -#: ../../../faq/design.rst:383 +#: ../../../faq/design.rst:385 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 " @@ -505,11 +507,11 @@ msgid "" "``free()`` properly." msgstr "" -#: ../../../faq/design.rst:392 +#: ../../../faq/design.rst:394 msgid "Why isn't all memory freed when CPython exits?" msgstr "" -#: ../../../faq/design.rst:394 +#: ../../../faq/design.rst:396 msgid "" "Objects referenced from the global namespaces of Python modules are not " "always deallocated when Python exits. This may happen if there are circular " @@ -519,17 +521,17 @@ msgid "" "exit and does try to destroy every single object." msgstr "" -#: ../../../faq/design.rst:401 +#: ../../../faq/design.rst:403 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 "" -#: ../../../faq/design.rst:406 +#: ../../../faq/design.rst:408 msgid "Why are there separate tuple and list data types?" msgstr "" -#: ../../../faq/design.rst:408 +#: ../../../faq/design.rst:410 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 " @@ -539,7 +541,7 @@ msgid "" "two or three numbers." msgstr "" -#: ../../../faq/design.rst:415 +#: ../../../faq/design.rst:417 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 " @@ -549,7 +551,7 @@ msgid "" "if you added another file or two to the directory." msgstr "" -#: ../../../faq/design.rst:423 +#: ../../../faq/design.rst:425 msgid "" "Tuples are :term:`immutable`, meaning that once a tuple has been created, " "you can't replace any of its elements with a new value. Lists are :term:" @@ -559,11 +561,11 @@ msgid "" "however, that a tuple is only hashable if all of its elements are hashable." msgstr "" -#: ../../../faq/design.rst:432 +#: ../../../faq/design.rst:434 msgid "How are lists implemented in CPython?" msgstr "" -#: ../../../faq/design.rst:434 +#: ../../../faq/design.rst:436 msgid "" "CPython's lists are really variable-length arrays, not Lisp-style linked " "lists. The implementation uses a contiguous array of references to other " @@ -571,13 +573,13 @@ msgid "" "head structure." msgstr "" -#: ../../../faq/design.rst:438 +#: ../../../faq/design.rst:440 msgid "" "This makes indexing a list ``a[i]`` an operation whose cost is independent " "of the size of the list or the value of the index." msgstr "" -#: ../../../faq/design.rst:441 +#: ../../../faq/design.rst:443 msgid "" "When items are appended or inserted, the array of references is resized. " "Some cleverness is applied to improve the performance of appending items " @@ -585,11 +587,11 @@ msgid "" "the next few times don't require an actual resize." msgstr "" -#: ../../../faq/design.rst:448 +#: ../../../faq/design.rst:450 msgid "How are dictionaries implemented in CPython?" msgstr "" -#: ../../../faq/design.rst:450 +#: ../../../faq/design.rst:452 msgid "" "CPython's dictionaries are implemented as resizable hash tables. Compared " "to B-trees, this gives better performance for lookup (the most common " @@ -597,7 +599,7 @@ msgid "" "simpler." msgstr "" -#: ../../../faq/design.rst:454 +#: ../../../faq/design.rst:456 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 " @@ -610,11 +612,11 @@ msgid "" "O notation -- to retrieve a key." msgstr "" -#: ../../../faq/design.rst:465 +#: ../../../faq/design.rst:467 msgid "Why must dictionary keys be immutable?" msgstr "" -#: ../../../faq/design.rst:467 +#: ../../../faq/design.rst:469 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 " @@ -627,7 +629,7 @@ msgid "" "would be different." msgstr "" -#: ../../../faq/design.rst:476 +#: ../../../faq/design.rst:478 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 " @@ -635,17 +637,17 @@ msgid "" "dictionary keys." msgstr "" -#: ../../../faq/design.rst:480 +#: ../../../faq/design.rst:482 msgid "Some unacceptable solutions that have been proposed:" msgstr "" -#: ../../../faq/design.rst:482 +#: ../../../faq/design.rst:484 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 "" -#: ../../../faq/design.rst:488 +#: ../../../faq/design.rst:490 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 " @@ -653,14 +655,14 @@ msgid "" "`is`." msgstr "" -#: ../../../faq/design.rst:492 +#: ../../../faq/design.rst:494 msgid "" "Make a copy when using a list as a key. This doesn't work because the list, " "being a mutable object, could contain a reference to itself, and then the " "copying code would run into an infinite loop." msgstr "" -#: ../../../faq/design.rst:496 +#: ../../../faq/design.rst:498 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 " @@ -668,7 +670,7 @@ msgid "" "every value in ``d.keys()`` is usable as a key of the dictionary." msgstr "" -#: ../../../faq/design.rst:501 +#: ../../../faq/design.rst:503 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 " @@ -678,7 +680,7 @@ msgid "" "loop." msgstr "" -#: ../../../faq/design.rst:507 +#: ../../../faq/design.rst:509 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 " @@ -688,14 +690,14 @@ msgid "" "the object is in the dictionary (or other structure). ::" msgstr "" -#: ../../../faq/design.rst:532 +#: ../../../faq/design.rst:534 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 "" -#: ../../../faq/design.rst:536 +#: ../../../faq/design.rst:538 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__() == " @@ -704,7 +706,7 @@ msgid "" "based structures will misbehave." msgstr "" -#: ../../../faq/design.rst:541 +#: ../../../faq/design.rst:543 msgid "" "In the case of :class:`!ListWrapper`, whenever the wrapper object is in a " "dictionary the wrapped list must not change to avoid anomalies. Don't do " @@ -712,11 +714,11 @@ msgid "" "consequences of not meeting them correctly. Consider yourself warned." msgstr "" -#: ../../../faq/design.rst:548 +#: ../../../faq/design.rst:550 msgid "Why doesn't list.sort() return the sorted list?" msgstr "" -#: ../../../faq/design.rst:550 +#: ../../../faq/design.rst:552 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 " @@ -726,7 +728,7 @@ msgid "" "around." msgstr "" -#: ../../../faq/design.rst:556 +#: ../../../faq/design.rst:558 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 " @@ -734,11 +736,11 @@ msgid "" "dictionary in sorted order::" msgstr "" -#: ../../../faq/design.rst:566 +#: ../../../faq/design.rst:568 msgid "How do you specify and enforce an interface spec in Python?" msgstr "" -#: ../../../faq/design.rst:568 +#: ../../../faq/design.rst:570 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 " @@ -746,7 +748,7 @@ msgid "" "helps in the construction of large programs." msgstr "" -#: ../../../faq/design.rst:573 +#: ../../../faq/design.rst:575 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` " @@ -756,13 +758,13 @@ msgid "" "`~collections.abc.MutableMapping`." msgstr "" -#: ../../../faq/design.rst:580 +#: ../../../faq/design.rst:582 msgid "" "For Python, many of the advantages of interface specifications can be " "obtained by an appropriate test discipline for components." msgstr "" -#: ../../../faq/design.rst:583 +#: ../../../faq/design.rst:585 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 " @@ -774,7 +776,7 @@ msgid "" "in a module." msgstr "" -#: ../../../faq/design.rst:591 +#: ../../../faq/design.rst:593 msgid "" "An appropriate testing discipline can help build large complex applications " "in Python as well as having interface specifications would. In fact, it can " @@ -786,7 +788,7 @@ msgid "" "test suite." msgstr "" -#: ../../../faq/design.rst:599 +#: ../../../faq/design.rst:601 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 " @@ -795,11 +797,11 @@ msgid "" "not write test cases at all." msgstr "" -#: ../../../faq/design.rst:607 +#: ../../../faq/design.rst:609 msgid "Why is there no goto?" msgstr "" -#: ../../../faq/design.rst:609 +#: ../../../faq/design.rst:611 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 " @@ -810,7 +812,7 @@ msgid "" "`continue` and :keyword:`break`)." msgstr "" -#: ../../../faq/design.rst:616 +#: ../../../faq/design.rst:618 msgid "" "One can also use exceptions to provide a \"structured goto\" that works even " "across function calls. Many feel that exceptions can conveniently emulate " @@ -818,24 +820,24 @@ msgid "" "other languages. For example::" msgstr "" -#: ../../../faq/design.rst:632 +#: ../../../faq/design.rst:634 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 "" -#: ../../../faq/design.rst:637 +#: ../../../faq/design.rst:639 msgid "Why can't raw strings (r-strings) end with a backslash?" msgstr "" -#: ../../../faq/design.rst:639 +#: ../../../faq/design.rst:641 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 "" -#: ../../../faq/design.rst:643 +#: ../../../faq/design.rst:645 msgid "" "Raw strings were designed to ease creating input for processors (chiefly " "regular expression engines) that want to do their own backslash escape " @@ -845,33 +847,33 @@ msgid "" "rules work well when r-strings are used for their intended purpose." msgstr "" -#: ../../../faq/design.rst:650 +#: ../../../faq/design.rst:652 msgid "" "If you're trying to build Windows pathnames, note that all Windows system " "calls accept forward slashes too::" msgstr "" -#: ../../../faq/design.rst:655 +#: ../../../faq/design.rst:657 msgid "" "If you're trying to build a pathname for a DOS command, try e.g. one of ::" msgstr "" -#: ../../../faq/design.rst:663 +#: ../../../faq/design.rst:665 msgid "Why doesn't Python have a \"with\" statement for attribute assignments?" msgstr "" -#: ../../../faq/design.rst:665 +#: ../../../faq/design.rst:667 msgid "" "Python has a :keyword:`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 "" -#: ../../../faq/design.rst:673 +#: ../../../faq/design.rst:675 msgid "In Python, such a construct would be ambiguous." msgstr "" -#: ../../../faq/design.rst:675 +#: ../../../faq/design.rst:677 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 " @@ -879,7 +881,7 @@ msgid "" "*always* knows the scope of every variable at compile time." msgstr "" -#: ../../../faq/design.rst:680 +#: ../../../faq/design.rst:682 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 " @@ -888,11 +890,11 @@ msgid "" "one, or a member attribute?" msgstr "" -#: ../../../faq/design.rst:686 +#: ../../../faq/design.rst:688 msgid "For instance, take the following incomplete snippet::" msgstr "" -#: ../../../faq/design.rst:692 +#: ../../../faq/design.rst:694 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 " @@ -901,36 +903,36 @@ msgid "" "you see, the dynamic nature of Python makes such choices much harder." msgstr "" -#: ../../../faq/design.rst:698 +#: ../../../faq/design.rst:700 msgid "" "The primary benefit of :keyword:`with` and similar language features " "(reduction of code volume) can, however, easily be achieved in Python by " "assignment. Instead of::" msgstr "" -#: ../../../faq/design.rst:705 +#: ../../../faq/design.rst:707 msgid "write this::" msgstr "" -#: ../../../faq/design.rst:712 +#: ../../../faq/design.rst:714 msgid "" "This also has the side-effect of increasing execution speed because name " "bindings are resolved at run-time in Python, and the second version only " "needs to perform the resolution once." msgstr "" -#: ../../../faq/design.rst:716 +#: ../../../faq/design.rst:718 msgid "" "Similar proposals that would introduce syntax to further reduce code volume, " "such as using a 'leading dot', have been rejected in favour of explicitness " "(see https://mail.python.org/pipermail/python-ideas/2016-May/040070.html)." msgstr "" -#: ../../../faq/design.rst:722 +#: ../../../faq/design.rst:724 msgid "Why don't generators support the with statement?" msgstr "" -#: ../../../faq/design.rst:724 +#: ../../../faq/design.rst:726 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 " @@ -939,28 +941,28 @@ msgid "" "`with` statement." msgstr "" -#: ../../../faq/design.rst:732 +#: ../../../faq/design.rst:734 msgid "Why are colons required for the if/while/def/class statements?" msgstr "" -#: ../../../faq/design.rst:734 +#: ../../../faq/design.rst:736 msgid "" "The colon is required primarily to enhance readability (one of the results " "of the experimental ABC language). Consider this::" msgstr "" -#: ../../../faq/design.rst:740 +#: ../../../faq/design.rst:742 msgid "versus ::" msgstr "" -#: ../../../faq/design.rst:745 +#: ../../../faq/design.rst:747 msgid "" "Notice how the second one is slightly easier to read. Notice further how a " "colon sets off the example in this FAQ answer; it's a standard usage in " "English." msgstr "" -#: ../../../faq/design.rst:748 +#: ../../../faq/design.rst:750 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 " @@ -968,21 +970,21 @@ msgid "" "the program text." msgstr "" -#: ../../../faq/design.rst:754 +#: ../../../faq/design.rst:756 msgid "Why does Python allow commas at the end of lists and tuples?" msgstr "" -#: ../../../faq/design.rst:756 +#: ../../../faq/design.rst:758 msgid "" "Python lets you add a trailing comma at the end of lists, tuples, and " "dictionaries::" msgstr "" -#: ../../../faq/design.rst:767 +#: ../../../faq/design.rst:769 msgid "There are several reasons to allow this." msgstr "" -#: ../../../faq/design.rst:769 +#: ../../../faq/design.rst:771 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 " @@ -990,20 +992,20 @@ msgid "" "reordered without creating a syntax error." msgstr "" -#: ../../../faq/design.rst:774 +#: ../../../faq/design.rst:776 msgid "" "Accidentally omitting the comma can lead to errors that are hard to " "diagnose. For example::" msgstr "" -#: ../../../faq/design.rst:784 +#: ../../../faq/design.rst:786 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 "" -#: ../../../faq/design.rst:787 +#: ../../../faq/design.rst:789 msgid "" "Allowing the trailing comma may also make programmatic code generation " "easier." diff --git a/main/locale/pot/LC_MESSAGES/glossary.pot b/main/locale/pot/LC_MESSAGES/glossary.pot index f4930e83454..253da10e004 100644 --- a/main/locale/pot/LC_MESSAGES/glossary.pot +++ b/main/locale/pot/LC_MESSAGES/glossary.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2571,18 +2571,34 @@ msgid "An abbreviation of :term:`standard library`." msgstr "" #: ../../../glossary.rst:1517 -msgid "strong reference" +msgid "steal" msgstr "" #: ../../../glossary.rst:1519 msgid "" +"In Python's C API, \"*stealing*\" an argument means that ownership of the " +"argument is transferred to the called function. The caller must not use that " +"reference after the call. Generally, functions that \"steal\" an argument do " +"so even if they fail." +msgstr "" + +#: ../../../glossary.rst:1524 +msgid "See :ref:`api-refcountdetails` for a full explanation." +msgstr "" + +#: ../../../glossary.rst:1525 +msgid "strong reference" +msgstr "" + +#: ../../../glossary.rst:1527 +msgid "" "In Python's C API, a strong reference is a reference to an object which is " "owned by the code holding the reference. The strong reference is taken by " "calling :c:func:`Py_INCREF` when the reference is created and released with :" "c:func:`Py_DECREF` when the reference is deleted." msgstr "" -#: ../../../glossary.rst:1525 +#: ../../../glossary.rst:1533 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 " @@ -2590,15 +2606,15 @@ msgid "" "leaking one reference." msgstr "" -#: ../../../glossary.rst:1530 +#: ../../../glossary.rst:1538 msgid "See also :term:`borrowed reference`." msgstr "" -#: ../../../glossary.rst:1531 +#: ../../../glossary.rst:1539 msgid "subscript" msgstr "" -#: ../../../glossary.rst:1533 +#: ../../../glossary.rst:1541 msgid "" "The expression in square brackets of a :ref:`subscription expression " "`, for example, the ``3`` in ``items[3]``. Usually used to " @@ -2607,11 +2623,11 @@ msgid "" "term:`sequence`." msgstr "" -#: ../../../glossary.rst:1539 +#: ../../../glossary.rst:1547 msgid "synchronization primitive" msgstr "" -#: ../../../glossary.rst:1541 +#: ../../../glossary.rst:1549 msgid "" "A basic building block for coordinating (synchronizing) the execution of " "multiple threads to ensure :term:`thread-safe` access to shared resources. " @@ -2625,48 +2641,48 @@ msgid "" "term:`lock`." msgstr "" -#: ../../../glossary.rst:1551 +#: ../../../glossary.rst:1559 msgid "t-string" msgstr "" -#: ../../../glossary.rst:1552 +#: ../../../glossary.rst:1560 msgid "t-strings" msgstr "" -#: ../../../glossary.rst:1554 +#: ../../../glossary.rst:1562 msgid "" "String literals prefixed with ``t`` or ``T`` are commonly called \"t-" "strings\" which is short for :ref:`template string literals `." msgstr "" -#: ../../../glossary.rst:1557 +#: ../../../glossary.rst:1565 msgid "text encoding" msgstr "" -#: ../../../glossary.rst:1559 +#: ../../../glossary.rst:1567 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 "" -#: ../../../glossary.rst:1563 +#: ../../../glossary.rst:1571 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:1566 +#: ../../../glossary.rst:1574 msgid "" "There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." msgstr "" -#: ../../../glossary.rst:1569 +#: ../../../glossary.rst:1577 msgid "text file" msgstr "" -#: ../../../glossary.rst:1571 +#: ../../../glossary.rst:1579 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:" @@ -2675,38 +2691,38 @@ msgid "" "instances of :class:`io.StringIO`." msgstr "" -#: ../../../glossary.rst:1578 +#: ../../../glossary.rst:1586 msgid "" "See also :term:`binary file` for a file object able to read and write :term:" "`bytes-like objects `." msgstr "" -#: ../../../glossary.rst:1580 +#: ../../../glossary.rst:1588 msgid "thread state" msgstr "" -#: ../../../glossary.rst:1583 +#: ../../../glossary.rst:1591 msgid "" "The information used by the :term:`CPython` runtime to run in an OS thread. " "For example, this includes the current exception, if any, and the state of " "the bytecode interpreter." msgstr "" -#: ../../../glossary.rst:1587 +#: ../../../glossary.rst:1595 msgid "" "Each thread state is bound to a single OS thread, but threads may have many " "thread states available. At most, one of them may be :term:`attached " "` at once." msgstr "" -#: ../../../glossary.rst:1591 +#: ../../../glossary.rst:1599 msgid "" "An :term:`attached thread state` is required to call most of Python's C API, " "unless a function explicitly documents otherwise. The bytecode interpreter " "only runs under an attached thread state." msgstr "" -#: ../../../glossary.rst:1595 +#: ../../../glossary.rst:1603 msgid "" "Each thread state belongs to a single interpreter, but each interpreter may " "have many thread states, including multiple for the same OS thread. Thread " @@ -2715,17 +2731,17 @@ msgid "" "given moment." msgstr "" -#: ../../../glossary.rst:1601 +#: ../../../glossary.rst:1609 msgid "" "See :ref:`Thread State and the Global Interpreter Lock ` for more " "information." msgstr "" -#: ../../../glossary.rst:1603 +#: ../../../glossary.rst:1611 msgid "thread-safe" msgstr "" -#: ../../../glossary.rst:1605 +#: ../../../glossary.rst:1613 msgid "" "A module, function, or class that behaves correctly when used by multiple " "threads concurrently. Thread-safe code uses appropriate :term:" @@ -2739,28 +2755,28 @@ msgid "" "` when used in multi-threaded programs." msgstr "" -#: ../../../glossary.rst:1616 +#: ../../../glossary.rst:1624 msgid "token" msgstr "" -#: ../../../glossary.rst:1619 +#: ../../../glossary.rst:1627 msgid "" "A small unit of source code, generated by the :ref:`lexical analyzer " "` (also called the *tokenizer*). Names, numbers, strings, " "operators, newlines and similar are represented by tokens." msgstr "" -#: ../../../glossary.rst:1624 +#: ../../../glossary.rst:1632 msgid "" "The :mod:`tokenize` module exposes Python's lexical analyzer. The :mod:" "`token` module contains information on the various types of tokens." msgstr "" -#: ../../../glossary.rst:1627 +#: ../../../glossary.rst:1635 msgid "triple-quoted string" msgstr "" -#: ../../../glossary.rst:1629 +#: ../../../glossary.rst:1637 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 " @@ -2771,67 +2787,67 @@ msgid "" "docstrings." msgstr "" -#: ../../../glossary.rst:1636 +#: ../../../glossary.rst:1644 msgid "type" msgstr "" -#: ../../../glossary.rst:1638 +#: ../../../glossary.rst:1646 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:`~object." "__class__` attribute or can be retrieved with ``type(obj)``." msgstr "" -#: ../../../glossary.rst:1642 +#: ../../../glossary.rst:1650 msgid "type alias" msgstr "" -#: ../../../glossary.rst:1644 +#: ../../../glossary.rst:1652 msgid "A synonym for a type, created by assigning the type to an identifier." msgstr "" -#: ../../../glossary.rst:1646 +#: ../../../glossary.rst:1654 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" msgstr "" -#: ../../../glossary.rst:1653 +#: ../../../glossary.rst:1661 msgid "could be made more readable like this::" msgstr "" -#: ../../../glossary.rst:1660 ../../../glossary.rst:1674 +#: ../../../glossary.rst:1668 ../../../glossary.rst:1682 msgid "See :mod:`typing` and :pep:`484`, which describe this functionality." msgstr "" -#: ../../../glossary.rst:1661 +#: ../../../glossary.rst:1669 msgid "type hint" msgstr "" -#: ../../../glossary.rst:1663 +#: ../../../glossary.rst:1671 msgid "" "An :term:`annotation` that specifies the expected type for a variable, a " "class attribute, or a function parameter or return value." msgstr "" -#: ../../../glossary.rst:1666 +#: ../../../glossary.rst:1674 msgid "" "Type hints are optional and are not enforced by Python but they are useful " "to :term:`static type checkers `. They can also aid " "IDEs with code completion and refactoring." msgstr "" -#: ../../../glossary.rst:1670 +#: ../../../glossary.rst:1678 msgid "" "Type hints of global variables, class attributes, and functions, but not " "local variables, can be accessed using :func:`typing.get_type_hints`." msgstr "" -#: ../../../glossary.rst:1675 +#: ../../../glossary.rst:1683 msgid "universal newlines" msgstr "" -#: ../../../glossary.rst:1677 +#: ../../../glossary.rst:1685 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 " @@ -2840,41 +2856,41 @@ msgid "" "splitlines` for an additional use." msgstr "" -#: ../../../glossary.rst:1682 +#: ../../../glossary.rst:1690 msgid "variable annotation" msgstr "" -#: ../../../glossary.rst:1684 +#: ../../../glossary.rst:1692 msgid "An :term:`annotation` of a variable or a class attribute." msgstr "" -#: ../../../glossary.rst:1686 +#: ../../../glossary.rst:1694 msgid "" "When annotating a variable or a class attribute, assignment is optional::" msgstr "" -#: ../../../glossary.rst:1691 +#: ../../../glossary.rst:1699 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" msgstr "" -#: ../../../glossary.rst:1697 +#: ../../../glossary.rst:1705 msgid "Variable annotation syntax is explained in section :ref:`annassign`." msgstr "" -#: ../../../glossary.rst:1699 +#: ../../../glossary.rst:1707 msgid "" "See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " "this functionality. Also see :ref:`annotations-howto` for best practices on " "working with annotations." msgstr "" -#: ../../../glossary.rst:1703 +#: ../../../glossary.rst:1711 msgid "virtual environment" msgstr "" -#: ../../../glossary.rst:1705 +#: ../../../glossary.rst:1713 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " @@ -2882,36 +2898,36 @@ msgid "" "same system." msgstr "" -#: ../../../glossary.rst:1710 +#: ../../../glossary.rst:1718 msgid "See also :mod:`venv`." msgstr "" -#: ../../../glossary.rst:1711 +#: ../../../glossary.rst:1719 msgid "virtual machine" msgstr "" -#: ../../../glossary.rst:1713 +#: ../../../glossary.rst:1721 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." msgstr "" -#: ../../../glossary.rst:1715 +#: ../../../glossary.rst:1723 msgid "walrus operator" msgstr "" -#: ../../../glossary.rst:1717 +#: ../../../glossary.rst:1725 msgid "" "A light-hearted way to refer to the :ref:`assignment expression ` operator ``:=`` because it looks a bit like a walrus if you " "turn your head." msgstr "" -#: ../../../glossary.rst:1720 +#: ../../../glossary.rst:1728 msgid "Zen of Python" msgstr "" -#: ../../../glossary.rst:1722 +#: ../../../glossary.rst:1730 msgid "" "Listing of Python design principles and philosophies that are helpful in " "understanding and using the language. The listing can be found by typing " diff --git a/main/locale/pot/LC_MESSAGES/howto/abi3t-migration.pot b/main/locale/pot/LC_MESSAGES/howto/abi3t-migration.pot index aad95c20983..e7f61b3d26b 100644 --- a/main/locale/pot/LC_MESSAGES/howto/abi3t-migration.pot +++ b/main/locale/pot/LC_MESSAGES/howto/abi3t-migration.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -24,9 +24,9 @@ msgstr "" #: ../../../howto/abi3t-migration.rst:9 msgid "" "Starting with the 3.15 release, CPython supports a variant of the Stable ABI " -"that supports :term:`free-threaded ` Python: Stable ABI for " -"Free-Threaded Builds, or ``abi3t`` for short. This document describes how to " -"adapt C API extensions to support free threading." +"that supports :term:`free-threaded ` Python: the Stable ABI " +"for Free-Threaded Builds, or ``abi3t`` for short. This document describes " +"how to adapt C API extensions to support free threading." msgstr "" #: ../../../howto/abi3t-migration.rst:15 @@ -35,8 +35,9 @@ msgstr "" #: ../../../howto/abi3t-migration.rst:17 msgid "" -"The typical reason to use Stable ABI is to reduce the number of artifacts " -"that you need to build and distribute for each version of your library." +"The typical reason to use the Stable ABI is to reduce the number of " +"artifacts that you need to build and distribute for each version of your " +"library." msgstr "" #: ../../../howto/abi3t-migration.rst:20 @@ -186,12 +187,12 @@ msgid "Why *not* do this" msgstr "" #: ../../../howto/abi3t-migration.rst:90 -msgid "There are two main downsides to Stable ABI." +msgid "There are two main downsides to the Stable ABI." msgstr "" #: ../../../howto/abi3t-migration.rst:92 msgid "" -"First, you extension may become slower, since Stable ABI prioritizes " +"First, your extension may become slower, since the Stable ABI prioritizes " "compatibility over performance. The difference is usually not noticeable, " "and often can be mitigated by using the same source to build both a Stable " "ABI build and a few version-specific ones for \"tier 1\" CPython versions." @@ -200,7 +201,8 @@ msgstr "" #: ../../../howto/abi3t-migration.rst:98 msgid "" "Second, not all of the C API is available. Extensions need to be ported to " -"build for Stable ABI, which may be difficult or, in rare cases, impossible." +"build for the Stable ABI, which may be difficult or, in rare cases, " +"impossible." msgstr "" #: ../../../howto/abi3t-migration.rst:102 @@ -252,7 +254,7 @@ msgstr "" #: ../../../howto/abi3t-migration.rst:130 msgid "" -"If your extenstion uses a code generator (like Cython) or language binding " +"If your extension uses a code generator (like Cython) or language binding " "(like PyO3), it's best to wait until that tool has support for ``abi3t``. If " "you maintain such a tool, you might be able to adapt the instructions here " "for your tool." @@ -264,9 +266,9 @@ msgstr "" #: ../../../howto/abi3t-migration.rst:138 msgid "" -"Your extension should support the Stable ABI (``abi3t``). If not, either " -"port it first, or follow this guide but be prepared to fix issues it does " -"not mention." +"Your extension should support the non-free-threaded Stable ABI (``abi3``). " +"If not, either port it first, or follow this guide but be prepared to fix " +"issues it does not mention." msgstr "" #: ../../../howto/abi3t-migration.rst:143 @@ -326,7 +328,7 @@ msgstr "" #: ../../../howto/abi3t-migration.rst:186 msgid "" -"This should result in a different error than \"``abt3t`` define is not set\"." +"This should result in a different error than \"``abi3t`` define is not set\"." msgstr "" #: ../../../howto/abi3t-migration.rst:190 @@ -360,11 +362,11 @@ msgid "" "This will ensure that nothing breaks as you are porting." msgstr "" -#: ../../../howto/abi3t-migration.rst:214 +#: ../../../howto/abi3t-migration.rst:216 msgid "Module export hook" msgstr "" -#: ../../../howto/abi3t-migration.rst:216 +#: ../../../howto/abi3t-migration.rst:218 msgid "" "Unless you've done this step already, your extension module defines a :ref:" "`module initialization function ` named :samp:" @@ -373,74 +375,144 @@ msgid "" "feature added in CPython 3.15 in :pep:`793`." msgstr "" -#: ../../../howto/abi3t-migration.rst:223 +#: ../../../howto/abi3t-migration.rst:225 msgid "" "Your existing init function should look like this (with your own names for " "```` and ````):" msgstr "" -#: ../../../howto/abi3t-migration.rst:235 +#: ../../../howto/abi3t-migration.rst:237 msgid "" "If there is some code before the ``return``, move it to a :c:macro:" "`Py_mod_create` or :c:macro:`Py_mod_exec` slot function. See the :ref:" "`PyInit documentation ` for related information." msgstr "" -#: ../../../howto/abi3t-migration.rst:239 +#: ../../../howto/abi3t-migration.rst:241 msgid "" "The function references a ``PyModuleDef`` object (```` in the code " "above). Its definition should be similar to the following, with different " "values and perhaps some fields unnnamed or left out:" msgstr "" -#: ../../../howto/abi3t-migration.rst:259 +#: ../../../howto/abi3t-migration.rst:261 msgid "" "Remove this definition and the ``PyInit`` function (or put them in an " "``#ifndef Py_TARGET_ABI3T`` block, to retain backwards compatibility), and " "replace them with the following:" msgstr "" -#: ../../../howto/abi3t-migration.rst:287 +#: ../../../howto/abi3t-migration.rst:289 msgid "" "Leave out any fields that were missing (except the new :c:macro:" "`Py_mod_abi`), and substitute your own values." msgstr "" -#: ../../../howto/abi3t-migration.rst:290 +#: ../../../howto/abi3t-migration.rst:292 msgid "" "See the :c:type:`PySlot` and :c:ref:`export hook ` " "documentation for details on this API." msgstr "" -#: ../../../howto/abi3t-migration.rst:294 +#: ../../../howto/abi3t-migration.rst:295 +msgid "" +"As in the example, your ``PyModExport_`` function should *only* return a " +"pointer to static data. If you cannot avoid additional code, refer to the :" +"ref:`caveats in PyModExport documentation `." +msgstr "" + +#: ../../../howto/abi3t-migration.rst:302 +msgid "Existing slots" +msgstr "" + +#: ../../../howto/abi3t-migration.rst:304 +msgid "" +"If you have a ``Py_mod_slots`` slot, check the array it refers to. It should " +"be a :c:type:`PyModuleDef_Slot` array like the following:" +msgstr "" + +#: ../../../howto/abi3t-migration.rst:324 +msgid "``py_mod_create``" +msgstr "" + +#: ../../../howto/abi3t-migration.rst:327 +msgid "" +"If you have a :c:macro:`Py_mod_create` entry, make sure the function can be " +"called with ``NULL`` as its second argument (instead of the :c:type:" +"`PyModuleDef`, which you are removing). Often, this argument isn't used at " +"all; you can check by renaming it:" +msgstr "" + +#: ../../../howto/abi3t-migration.rst:337 +msgid "" +"If the argument is used, find a different way to pass in the data. Commonly, " +"the information is static and you can refer to it directly. (If you're " +"reusing a single function for several different modules, consider defining " +"several functions instead.)" +msgstr "" + +#: ../../../howto/abi3t-migration.rst:344 +msgid "Multiple ``py_mod_exec``" +msgstr "" + +#: ../../../howto/abi3t-migration.rst:346 +msgid "" +"If you have *more than one* :c:macro:`Py_mod_exec` entry, consolidate them: " +"create a new function that calls the others, and replace existing slots with " +"it." +msgstr "" + +#: ../../../howto/abi3t-migration.rst:366 +msgid "" +"If the functions aren't used elsewhere, you can combine their bodies instead." +msgstr "" + +#: ../../../howto/abi3t-migration.rst:370 +msgid "Merging slot arrays" +msgstr "" + +#: ../../../howto/abi3t-migration.rst:372 +msgid "" +"Optionally, when you break compatibility with Python 3.14, you may clean up " +"the code by moving slots into the :c:type:`PySlot` array, and converting the " +"definitions to :c:macro:`PySlot_DATA` and :c:macro:`PySlot_FUNC`:" +msgstr "" + +#: ../../../howto/abi3t-migration.rst:389 +msgid "" +"If you do this, delete the original :c:type:`PyModuleDef_Slot` array and its " +"``Py_mod_slots`` entry." +msgstr "" + +#: ../../../howto/abi3t-migration.rst:394 msgid "Associated ``PyModuleDef``" msgstr "" -#: ../../../howto/abi3t-migration.rst:296 +#: ../../../howto/abi3t-migration.rst:396 msgid "" "Since the new API does not use a :c:type:`!PyModuleDef` structure, a " "definition will not be associated with the resulting module. This changes " "the behavior of the following functions:" msgstr "" -#: ../../../howto/abi3t-migration.rst:300 +#: ../../../howto/abi3t-migration.rst:400 msgid ":c:func:`PyModule_GetDef`" msgstr "" -#: ../../../howto/abi3t-migration.rst:301 +#: ../../../howto/abi3t-migration.rst:401 msgid ":c:func:`PyType_GetModuleByDef`" msgstr "" -#: ../../../howto/abi3t-migration.rst:303 +#: ../../../howto/abi3t-migration.rst:403 msgid "" "Check your code for these. If you do not use them, you can skip this section." msgstr "" -#: ../../../howto/abi3t-migration.rst:306 +#: ../../../howto/abi3t-migration.rst:406 msgid "These functions are typically used for two purposes:" msgstr "" -#: ../../../howto/abi3t-migration.rst:308 +#: ../../../howto/abi3t-migration.rst:408 msgid "" "To get the definition the module was created with. This is no longer " "possible using the new API. Modules no longer keep a reference to the " @@ -448,7 +520,7 @@ msgid "" "relevant data around." msgstr "" -#: ../../../howto/abi3t-migration.rst:315 +#: ../../../howto/abi3t-migration.rst:415 msgid "" "To check if a given module object is “yours”. This use case is now served " "by :ref:`module tokens ` -- opaque pointers that identify " @@ -456,65 +528,65 @@ msgid "" "example:" msgstr "" -#: ../../../howto/abi3t-migration.rst:325 +#: ../../../howto/abi3t-migration.rst:425 msgid "" "and add a pointer to it in a new entry to your module's ``PySlot`` array:" msgstr "" -#: ../../../howto/abi3t-migration.rst:337 +#: ../../../howto/abi3t-migration.rst:437 msgid "Then, switch from :c:func:`PyModule_GetDef` calls such as:" msgstr "" -#: ../../../howto/abi3t-migration.rst:344 +#: ../../../howto/abi3t-migration.rst:444 msgid "" "to :c:func:`PyModule_GetToken` (which uses an output argument and may fail " "with an exception):" msgstr "" -#: ../../../howto/abi3t-migration.rst:355 +#: ../../../howto/abi3t-migration.rst:455 msgid "and from :c:func:`PyType_GetModuleByDef` calls such as:" msgstr "" -#: ../../../howto/abi3t-migration.rst:363 +#: ../../../howto/abi3t-migration.rst:463 msgid "" "to :c:func:`PyType_GetModuleByToken` (which returns a strong reference):" msgstr "" -#: ../../../howto/abi3t-migration.rst:373 +#: ../../../howto/abi3t-migration.rst:473 msgid "``PyObject`` opaqueness" msgstr "" -#: ../../../howto/abi3t-migration.rst:375 +#: ../../../howto/abi3t-migration.rst:475 msgid "" "The :c:type:`PyObject` and :c:type:`PyVarObject` structures are opaque in " "``abi3t``." msgstr "" -#: ../../../howto/abi3t-migration.rst:378 +#: ../../../howto/abi3t-migration.rst:478 msgid "" "Accessing their members is prohibited. If you do this, switch to getter/" "setter functions mentioned in their documentation:" msgstr "" -#: ../../../howto/abi3t-migration.rst:382 +#: ../../../howto/abi3t-migration.rst:482 msgid ":c:member:`PyObject.ob_type`" msgstr "" -#: ../../../howto/abi3t-migration.rst:383 +#: ../../../howto/abi3t-migration.rst:483 msgid ":c:member:`PyObject.ob_refcnt`" msgstr "" -#: ../../../howto/abi3t-migration.rst:384 +#: ../../../howto/abi3t-migration.rst:484 msgid ":c:member:`PyVarObject.ob_size`" msgstr "" -#: ../../../howto/abi3t-migration.rst:386 +#: ../../../howto/abi3t-migration.rst:486 msgid "" "Also, the *size* of the :c:type:`PyObject` structures is unknown to the " "compiler. It can -- and *does* -- change between different CPython builds." msgstr "" -#: ../../../howto/abi3t-migration.rst:392 +#: ../../../howto/abi3t-migration.rst:492 msgid "" "While the size is available at runtime (for example as ``sys." "getsizeof(object())`` in Python code), you should resist the temptation to " @@ -522,31 +594,31 @@ msgid "" "change in future ``abi3t`` implementations." msgstr "" -#: ../../../howto/abi3t-migration.rst:400 +#: ../../../howto/abi3t-migration.rst:500 msgid "Custom type definitions" msgstr "" -#: ../../../howto/abi3t-migration.rst:402 +#: ../../../howto/abi3t-migration.rst:502 msgid "" "Since :c:type:`!PyObject` is opaque, the traditional way of defining custom " "types no longer works:" msgstr "" -#: ../../../howto/abi3t-migration.rst:420 +#: ../../../howto/abi3t-migration.rst:520 msgid "" "Most likely, all your class definitions, *and* all code that accesses your " "classes' data, will need to be rewritten. This will probably be the biggest " "change you need to support ``abi3t``." msgstr "" -#: ../../../howto/abi3t-migration.rst:424 +#: ../../../howto/abi3t-migration.rst:524 msgid "" "For each such type, instead of defining a ``struct`` for the entire " "instance, define one with only the “additional” fields -- ones specific to " "your class, not its superclasses:" msgstr "" -#: ../../../howto/abi3t-migration.rst:435 +#: ../../../howto/abi3t-migration.rst:535 msgid "" "Change the name. Almost all code that uses the struct will need to change " "(notably, pointers to the new structure cannot be cast to/from " @@ -556,36 +628,36 @@ msgid "" "running tools to detect undefined behavior.)" msgstr "" -#: ../../../howto/abi3t-migration.rst:443 +#: ../../../howto/abi3t-migration.rst:543 msgid "" "Then, to create the class, use *negative* ``basicsize`` to indicate “extra” " "storage space rather than *total* instance size:" msgstr "" -#: ../../../howto/abi3t-migration.rst:455 +#: ../../../howto/abi3t-migration.rst:555 msgid "" "If you use :c:macro:`Py_tp_members`, set the :c:macro:`Py_RELATIVE_OFFSET` " "flag on each member and specify the :c:member:`~PyMemberDef.offset` relative " "to your new struct." msgstr "" -#: ../../../howto/abi3t-migration.rst:461 +#: ../../../howto/abi3t-migration.rst:561 msgid "Custom type data access" msgstr "" -#: ../../../howto/abi3t-migration.rst:463 +#: ../../../howto/abi3t-migration.rst:563 msgid "" "Then comes the hard part: in all code that needs to access this struct, you " "will need an additional :c:func:`PyObject_GetTypeData` call to retrieve a " "``CustomObjectData *`` pointer from ``PyObject *``:" msgstr "" -#: ../../../howto/abi3t-migration.rst:473 +#: ../../../howto/abi3t-migration.rst:573 msgid "" "Note that this call requires the *type object* for your class (``cls``)." msgstr "" -#: ../../../howto/abi3t-migration.rst:475 +#: ../../../howto/abi3t-migration.rst:575 msgid "" "If your class is not subclassable (that is, it does not use the :c:macro:" "`Py_TPFLAGS_BASETYPE` flag), ``cls`` will be ``Py_TYPE(obj)``. Otherwise, " @@ -594,47 +666,47 @@ msgid "" "makes a subclass like this:" msgstr "" -#: ../../../howto/abi3t-migration.rst:486 +#: ../../../howto/abi3t-migration.rst:586 msgid "" -"then ``Py_TYPE(obj)`` is ``YourCustomClass``, and the underlying memory may " -"look like this:" +"then ``Py_TYPE(obj)`` is ``Sub``, and the underlying memory may look like " +"this:" msgstr "" -#: ../../../howto/abi3t-migration.rst:499 +#: ../../../howto/abi3t-migration.rst:599 msgid "" "(Ellipses indicate possible padding. Note that this memory layout is not " "guaranteed: future versions of Python may add different padding or even " "switch the order of the structures.)" msgstr "" -#: ../../../howto/abi3t-migration.rst:503 +#: ../../../howto/abi3t-migration.rst:603 msgid "There are two main ways to get the right class:" msgstr "" -#: ../../../howto/abi3t-migration.rst:505 +#: ../../../howto/abi3t-migration.rst:605 msgid "" "In instance methods, your implementation may use the :c:type:`PyCMethod` " "signature (and the :c:macro:`METH_METHOD` bit in :c:member:`PyMethodDef." "ml_flags`), and get the class as the ``defining_class`` argument." msgstr "" -#: ../../../howto/abi3t-migration.rst:509 +#: ../../../howto/abi3t-migration.rst:609 msgid "" "Otherwise, give your class a unique static token using the :c:macro:" "`Py_tp_token` slot, and use:" msgstr "" -#: ../../../howto/abi3t-migration.rst:521 +#: ../../../howto/abi3t-migration.rst:621 msgid "" "Type tokens work similarly to module tokens covered :ref:`earlier in this " "guide `." msgstr "" -#: ../../../howto/abi3t-migration.rst:527 +#: ../../../howto/abi3t-migration.rst:627 msgid "Avoid build-time conditionals" msgstr "" -#: ../../../howto/abi3t-migration.rst:529 +#: ../../../howto/abi3t-migration.rst:629 msgid "" "Check your code for API that identifies the version of Python used to " "*build* your extension. This no longer corresponds to the Python your " @@ -642,23 +714,23 @@ msgid "" "The macros to check for are:" msgstr "" -#: ../../../howto/abi3t-migration.rst:535 +#: ../../../howto/abi3t-migration.rst:635 msgid "" ":c:macro:`PY_VERSION_HEX`, :c:macro:`PY_MAJOR_VERSION`, :c:macro:" "`PY_MINOR_VERSION`:" msgstr "" -#: ../../../howto/abi3t-migration.rst:538 +#: ../../../howto/abi3t-migration.rst:638 msgid "to get the run-time version, use :c:data:`Py_Version`;" msgstr "" -#: ../../../howto/abi3t-migration.rst:539 +#: ../../../howto/abi3t-migration.rst:639 msgid "" "to determine what C API is available, use :c:macro:`Py_TARGET_ABI3T`. This " "macro is set to the minimum supported version." msgstr "" -#: ../../../howto/abi3t-migration.rst:542 +#: ../../../howto/abi3t-migration.rst:642 msgid "" ":c:macro:`Py_GIL_DISABLED`: under ``abi3t``, this macro is always defined. " "Code that works with free-threaded Python *should* also work with the GIL " @@ -667,65 +739,65 @@ msgid "" "state ` at one time)." msgstr "" -#: ../../../howto/abi3t-migration.rst:550 +#: ../../../howto/abi3t-migration.rst:650 msgid "Further code changes" msgstr "" -#: ../../../howto/abi3t-migration.rst:552 +#: ../../../howto/abi3t-migration.rst:652 msgid "" "If you are still left with compiler errors or warnings, find a way to fix " "them. Alas, this guide is limited, and cannot cover all possible code " "changes extensions may need." msgstr "" -#: ../../../howto/abi3t-migration.rst:556 +#: ../../../howto/abi3t-migration.rst:656 msgid "" "If you find a problem that other extension authors might run into, consider :" "ref:`reporting an issue ` (or sending a pull " "request) for this guide." msgstr "" -#: ../../../howto/abi3t-migration.rst:560 +#: ../../../howto/abi3t-migration.rst:660 msgid "" "It is possible your issue cannot be fixed for the current version of " "``abi3t``. In that case, reporting it may help it get prioritized for the " "next version of CPython." msgstr "" -#: ../../../howto/abi3t-migration.rst:568 +#: ../../../howto/abi3t-migration.rst:668 msgid "Tagging and distribution" msgstr "" -#: ../../../howto/abi3t-migration.rst:570 +#: ../../../howto/abi3t-migration.rst:670 msgid "" "If you are using a build tool with ``abi3t`` support, your extension is " "ready, but you might want to check that it was built correctly." msgstr "" -#: ../../../howto/abi3t-migration.rst:573 +#: ../../../howto/abi3t-migration.rst:673 msgid "Extensions built with ``abi3t`` should have the following extension:" msgstr "" -#: ../../../howto/abi3t-migration.rst:575 +#: ../../../howto/abi3t-migration.rst:675 msgid "On Windows: ``.pyd`` (like any other extension);" msgstr "" -#: ../../../howto/abi3t-migration.rst:576 +#: ../../../howto/abi3t-migration.rst:676 msgid "" "Linux, macOS, and other systems that use the ``.so`` suffix: ``.abi3t.so`` " "(**not** ``.cpython-315t.so`` or ``.abi3.so``). Note that both free-threaded " "and non-free-threaded builds will load ``.abi3t.so`` extensions;" msgstr "" -#: ../../../howto/abi3t-migration.rst:580 +#: ../../../howto/abi3t-migration.rst:680 msgid "Other systems: consult your distributor, and perhaps update this guide." msgstr "" -#: ../../../howto/abi3t-migration.rst:582 +#: ../../../howto/abi3t-migration.rst:682 msgid "If you distribute the extension as a *wheel*, use the following tags:" msgstr "" -#: ../../../howto/abi3t-migration.rst:584 +#: ../../../howto/abi3t-migration.rst:684 msgid "" "Python tag: :samp:`cp3{XX}`, where *XX* is the minimum Python version the " "extension is built for. (For example, ``cp315`` if you set " @@ -733,46 +805,46 @@ msgid "" "values.)" msgstr "" -#: ../../../howto/abi3t-migration.rst:588 +#: ../../../howto/abi3t-migration.rst:688 msgid "" "ABI tag: ``abi3.abi3t``. This is a *compressed tag set* that indicates " "support for both non-free-threaded and free-threaded builds." msgstr "" -#: ../../../howto/abi3t-migration.rst:591 +#: ../../../howto/abi3t-migration.rst:691 msgid "For example, the wheel filename may look like this:" msgstr "" -#: ../../../howto/abi3t-migration.rst:597 +#: ../../../howto/abi3t-migration.rst:697 msgid "" "`Platform Compatibility Tags `__ in the PyPA package " "distribution metadata." msgstr "" -#: ../../../howto/abi3t-migration.rst:599 +#: ../../../howto/abi3t-migration.rst:699 msgid "If the filename or tags are incorrect, fix them." msgstr "" -#: ../../../howto/abi3t-migration.rst:603 +#: ../../../howto/abi3t-migration.rst:703 msgid "Testing" msgstr "" -#: ../../../howto/abi3t-migration.rst:605 +#: ../../../howto/abi3t-migration.rst:705 msgid "" "Note that when you build an extension compatible with multiple versions of " "CPython, you should always *test* it with each version it supports (for " -"example, 3.15, 3.16, and so on). Stable ABI only guarantees *ABI* " +"example, 3.15, 3.16, and so on). The Stable ABI only guarantees *ABI* " "compatibility; there may also be behavior changes -- both intentional ones " "(covered by :pep:`387`) and bugs." msgstr "" -#: ../../../howto/abi3t-migration.rst:611 +#: ../../../howto/abi3t-migration.rst:711 msgid "" "Be sure to run tests on both free-threaded and non-free-threaded builds of " "CPython." msgstr "" -#: ../../../howto/abi3t-migration.rst:614 +#: ../../../howto/abi3t-migration.rst:714 msgid "If they pass, congratulations! You have an ``abi3t`` extension." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/howto/curses.pot b/main/locale/pot/LC_MESSAGES/howto/curses.pot index 10be1a62800..3721fa18072 100644 --- a/main/locale/pot/LC_MESSAGES/howto/curses.pot +++ b/main/locale/pot/LC_MESSAGES/howto/curses.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -83,8 +83,9 @@ msgstr "" #: ../../../howto/curses.rst:55 msgid "" -"The Windows version of Python doesn't include the :mod:`curses` module. A " -"ported version called :pypi:`UniCurses` is available." +"The Windows version of Python doesn't include the :mod:`curses` module. The " +"third-party :pypi:`windows-curses` package provides the same interface on " +"Windows." msgstr "" #: ../../../howto/curses.rst:60 diff --git a/main/locale/pot/LC_MESSAGES/howto/mro.pot b/main/locale/pot/LC_MESSAGES/howto/mro.pot index 97db77cb45c..ec22a6bf497 100644 --- a/main/locale/pot/LC_MESSAGES/howto/mro.pot +++ b/main/locale/pot/LC_MESSAGES/howto/mro.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-11 08:40+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,7 +29,7 @@ msgid "" msgstr "" #: ../../../howto/mro.rst:13 -msgid "By `Michele Simionato `__." +msgid "By `Michele Simionato `__." msgstr "" #: ../../../howto/mro.rst:0 diff --git a/main/locale/pot/LC_MESSAGES/library/ast.pot b/main/locale/pot/LC_MESSAGES/library/ast.pot index f8b7669e7dc..31b1c33c257 100644 --- a/main/locale/pot/LC_MESSAGES/library/ast.pot +++ b/main/locale/pot/LC_MESSAGES/library/ast.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -782,7 +782,7 @@ msgstr "" 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``." +"``handlers`` are interpreted as ``except*`` blocks rather than ``except``." msgstr "" #: ../../../library/ast.rst:1396 diff --git a/main/locale/pot/LC_MESSAGES/library/asyncio-eventloop.pot b/main/locale/pot/LC_MESSAGES/library/asyncio-eventloop.pot index b4f5afa327f..688e3225b3d 100644 --- a/main/locale/pot/LC_MESSAGES/library/asyncio-eventloop.pot +++ b/main/locale/pot/LC_MESSAGES/library/asyncio-eventloop.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-04-13 10:56+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -81,15 +81,16 @@ msgstr "" #: ../../../library/asyncio-eventloop.rst:50 msgid "" -"If there is no running event loop set, the function will return the result " -"of the ``get_event_loop_policy().get_event_loop()`` call." +"If there is no running event loop set, the function will return the loop set " +"by :func:`set_event_loop`, or raise a :exc:`RuntimeError` if no loop has " +"been set." msgstr "" -#: ../../../library/asyncio-eventloop.rst:53 +#: ../../../library/asyncio-eventloop.rst:54 msgid "" -"Because this function has rather complex behavior (especially when custom " -"event loop policies are in use), using the :func:`get_running_loop` function " -"is preferred to :func:`get_event_loop` in coroutines and callbacks." +"Because this function has rather complex behavior, using the :func:" +"`get_running_loop` function is preferred to :func:`get_event_loop` in " +"coroutines and callbacks." msgstr "" #: ../../../library/asyncio-eventloop.rst:58 @@ -104,97 +105,82 @@ msgid "Raises a :exc:`RuntimeError` if there is no current event loop." msgstr "" #: ../../../library/asyncio-eventloop.rst:67 -msgid "" -"The :mod:`!asyncio` policy system is deprecated and will be removed in " -"Python 3.16; from there on, this function will return the current running " -"event loop if present else it will return the loop set by :func:" -"`set_event_loop`." -msgstr "" - -#: ../../../library/asyncio-eventloop.rst:74 msgid "Set *loop* as the current event loop for the current OS thread." msgstr "" -#: ../../../library/asyncio-eventloop.rst:78 +#: ../../../library/asyncio-eventloop.rst:71 msgid "Create and return a new event loop object." msgstr "" -#: ../../../library/asyncio-eventloop.rst:80 -msgid "" -"Note that the behaviour of :func:`get_event_loop`, :func:`set_event_loop`, " -"and :func:`new_event_loop` functions can be altered by :ref:`setting a " -"custom event loop policy `." -msgstr "" - -#: ../../../library/asyncio-eventloop.rst:86 +#: ../../../library/asyncio-eventloop.rst:75 msgid "Contents" msgstr "" -#: ../../../library/asyncio-eventloop.rst:87 +#: ../../../library/asyncio-eventloop.rst:76 msgid "This documentation page contains the following sections:" msgstr "" -#: ../../../library/asyncio-eventloop.rst:89 +#: ../../../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:92 +#: ../../../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:96 +#: ../../../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:99 +#: ../../../library/asyncio-eventloop.rst:88 msgid "" "The `Event Loop Implementations`_ section documents the :class:" "`SelectorEventLoop` and :class:`ProactorEventLoop` classes;" msgstr "" -#: ../../../library/asyncio-eventloop.rst:102 +#: ../../../library/asyncio-eventloop.rst:91 msgid "" "The `Examples`_ section showcases how to work with some event loop APIs." msgstr "" -#: ../../../library/asyncio-eventloop.rst:109 +#: ../../../library/asyncio-eventloop.rst:98 msgid "Event loop methods" msgstr "" -#: ../../../library/asyncio-eventloop.rst:111 +#: ../../../library/asyncio-eventloop.rst:100 msgid "Event loops have **low-level** APIs for the following:" msgstr "" -#: ../../../library/asyncio-eventloop.rst:119 +#: ../../../library/asyncio-eventloop.rst:108 msgid "Running and stopping the loop" msgstr "" -#: ../../../library/asyncio-eventloop.rst:123 +#: ../../../library/asyncio-eventloop.rst:112 msgid "Run until the *future* (an instance of :class:`Future`) has completed." msgstr "" -#: ../../../library/asyncio-eventloop.rst:126 +#: ../../../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:129 +#: ../../../library/asyncio-eventloop.rst:118 msgid "Return the Future's result or raise its exception." msgstr "" -#: ../../../library/asyncio-eventloop.rst:133 +#: ../../../library/asyncio-eventloop.rst:122 msgid "Run the event loop until :meth:`stop` is called." msgstr "" -#: ../../../library/asyncio-eventloop.rst:135 +#: ../../../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 " @@ -202,7 +188,7 @@ msgid "" "and then exit." msgstr "" -#: ../../../library/asyncio-eventloop.rst:140 +#: ../../../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 " @@ -211,41 +197,41 @@ msgid "" "called." msgstr "" -#: ../../../library/asyncio-eventloop.rst:148 +#: ../../../library/asyncio-eventloop.rst:137 msgid "Stop the event loop." msgstr "" -#: ../../../library/asyncio-eventloop.rst:152 +#: ../../../library/asyncio-eventloop.rst:141 msgid "Return ``True`` if the event loop is currently running." msgstr "" -#: ../../../library/asyncio-eventloop.rst:156 +#: ../../../library/asyncio-eventloop.rst:145 msgid "Return ``True`` if the event loop was closed." msgstr "" -#: ../../../library/asyncio-eventloop.rst:160 +#: ../../../library/asyncio-eventloop.rst:149 msgid "Close the event loop." msgstr "" -#: ../../../library/asyncio-eventloop.rst:162 +#: ../../../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:165 +#: ../../../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:168 +#: ../../../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:174 +#: ../../../library/asyncio-eventloop.rst:163 msgid "" "Schedule all currently open :term:`asynchronous generator` objects to close " "with an :meth:`~agen.aclose` call. After calling this method, the event " @@ -253,19 +239,19 @@ msgid "" "should be used to reliably finalize all scheduled asynchronous generators." msgstr "" -#: ../../../library/asyncio-eventloop.rst:180 +#: ../../../library/asyncio-eventloop.rst:169 msgid "" "Note that there is no need to call this function when :func:`asyncio.run` is " "used." msgstr "" -#: ../../../library/asyncio-eventloop.rst:183 -#: ../../../library/asyncio-eventloop.rst:1357 -#: ../../../library/asyncio-eventloop.rst:1819 +#: ../../../library/asyncio-eventloop.rst:172 +#: ../../../library/asyncio-eventloop.rst:1386 +#: ../../../library/asyncio-eventloop.rst:1848 msgid "Example::" msgstr "" -#: ../../../library/asyncio-eventloop.rst:196 +#: ../../../library/asyncio-eventloop.rst:185 msgid "" "Schedule the closure of the default executor and wait for it to join all of " "the threads in the :class:`~concurrent.futures.ThreadPoolExecutor`. Once " @@ -273,254 +259,254 @@ msgid "" "run_in_executor` will raise a :exc:`RuntimeError`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:202 +#: ../../../library/asyncio-eventloop.rst:191 msgid "" "The *timeout* parameter specifies the amount of time (in :class:`float` " "seconds) the executor will be given to finish joining. With the default, " "``None``, the executor is allowed an unlimited amount of time." msgstr "" -#: ../../../library/asyncio-eventloop.rst:207 +#: ../../../library/asyncio-eventloop.rst:196 msgid "" "If the *timeout* is reached, a :exc:`RuntimeWarning` is emitted and the " "default executor is terminated without waiting for its threads to finish " "joining." msgstr "" -#: ../../../library/asyncio-eventloop.rst:213 +#: ../../../library/asyncio-eventloop.rst:202 msgid "" "Do not call this method when using :func:`asyncio.run`, as the latter " "handles default executor shutdown automatically." msgstr "" -#: ../../../library/asyncio-eventloop.rst:218 +#: ../../../library/asyncio-eventloop.rst:207 msgid "Added the *timeout* parameter." msgstr "" -#: ../../../library/asyncio-eventloop.rst:222 +#: ../../../library/asyncio-eventloop.rst:211 msgid "Scheduling callbacks" msgstr "" -#: ../../../library/asyncio-eventloop.rst:226 +#: ../../../library/asyncio-eventloop.rst:215 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:229 +#: ../../../library/asyncio-eventloop.rst:218 msgid "" "Return an instance of :class:`asyncio.Handle`, which can be used later to " "cancel the callback." msgstr "" -#: ../../../library/asyncio-eventloop.rst:232 +#: ../../../library/asyncio-eventloop.rst:221 msgid "" "Callbacks are called in the order in which they are registered. Each " "callback will be called exactly once." msgstr "" -#: ../../../library/asyncio-eventloop.rst:235 +#: ../../../library/asyncio-eventloop.rst:224 msgid "" "The optional keyword-only *context* argument specifies a custom :class:" "`contextvars.Context` for the *callback* to run in. Callbacks use the " "current context when no *context* is provided." msgstr "" -#: ../../../library/asyncio-eventloop.rst:239 +#: ../../../library/asyncio-eventloop.rst:228 msgid "Unlike :meth:`call_soon_threadsafe`, this method is not thread-safe." msgstr "" -#: ../../../library/asyncio-eventloop.rst:243 +#: ../../../library/asyncio-eventloop.rst:232 msgid "" "A thread-safe variant of :meth:`call_soon`. When scheduling callbacks from " "another thread, this function *must* be used, since :meth:`call_soon` is not " "thread-safe." msgstr "" -#: ../../../library/asyncio-eventloop.rst:247 +#: ../../../library/asyncio-eventloop.rst:236 msgid "" "This function is safe to be called from a reentrant context or signal " "handler, however, it is not safe or fruitful to use the returned handle in " "such contexts." msgstr "" -#: ../../../library/asyncio-eventloop.rst:250 +#: ../../../library/asyncio-eventloop.rst:239 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:254 +#: ../../../library/asyncio-eventloop.rst:243 msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." msgstr "" -#: ../../../library/asyncio-eventloop.rst:257 -#: ../../../library/asyncio-eventloop.rst:314 -#: ../../../library/asyncio-eventloop.rst:340 +#: ../../../library/asyncio-eventloop.rst:246 +#: ../../../library/asyncio-eventloop.rst:303 +#: ../../../library/asyncio-eventloop.rst:329 msgid "" "The *context* keyword-only parameter was added. See :pep:`567` for more " "details." msgstr "" -#: ../../../library/asyncio-eventloop.rst:265 +#: ../../../library/asyncio-eventloop.rst:254 msgid "" "Most :mod:`asyncio` scheduling functions don't allow passing keyword " "arguments. To do that, use :func:`functools.partial`::" msgstr "" -#: ../../../library/asyncio-eventloop.rst:272 +#: ../../../library/asyncio-eventloop.rst:261 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:280 +#: ../../../library/asyncio-eventloop.rst:269 msgid "Scheduling delayed callbacks" msgstr "" -#: ../../../library/asyncio-eventloop.rst:282 +#: ../../../library/asyncio-eventloop.rst:271 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:289 +#: ../../../library/asyncio-eventloop.rst:278 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:292 -#: ../../../library/asyncio-eventloop.rst:331 +#: ../../../library/asyncio-eventloop.rst:281 +#: ../../../library/asyncio-eventloop.rst:320 msgid "" "An instance of :class:`asyncio.TimerHandle` is returned which can be used to " "cancel the callback." msgstr "" -#: ../../../library/asyncio-eventloop.rst:295 +#: ../../../library/asyncio-eventloop.rst:284 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:299 +#: ../../../library/asyncio-eventloop.rst:288 msgid "" "The optional positional *args* will be passed to the callback when it is " "called. Use :func:`functools.partial` :ref:`to pass keyword arguments " "` to *callback*." msgstr "" -#: ../../../library/asyncio-eventloop.rst:304 +#: ../../../library/asyncio-eventloop.rst:293 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:310 +#: ../../../library/asyncio-eventloop.rst:299 msgid "" "For performance, callbacks scheduled with :meth:`loop.call_later` may run up " "to one clock-resolution early (see ``time.get_clock_info('monotonic')." "resolution``)." msgstr "" -#: ../../../library/asyncio-eventloop.rst:318 +#: ../../../library/asyncio-eventloop.rst:307 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:325 +#: ../../../library/asyncio-eventloop.rst:314 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:329 +#: ../../../library/asyncio-eventloop.rst:318 msgid "This method's behavior is the same as :meth:`call_later`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:336 +#: ../../../library/asyncio-eventloop.rst:325 msgid "" "For performance, callbacks scheduled with :meth:`loop.call_at` may run up to " "one clock-resolution early (see ``time.get_clock_info('monotonic')." "resolution``)." msgstr "" -#: ../../../library/asyncio-eventloop.rst:344 +#: ../../../library/asyncio-eventloop.rst:333 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:351 +#: ../../../library/asyncio-eventloop.rst:340 msgid "" "Return the current time, as a :class:`float` value, according to the event " "loop's internal monotonic clock." msgstr "" -#: ../../../library/asyncio-eventloop.rst:355 +#: ../../../library/asyncio-eventloop.rst:344 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:361 +#: ../../../library/asyncio-eventloop.rst:350 msgid "The :func:`asyncio.sleep` function." msgstr "" -#: ../../../library/asyncio-eventloop.rst:365 +#: ../../../library/asyncio-eventloop.rst:354 msgid "Creating futures and tasks" msgstr "" -#: ../../../library/asyncio-eventloop.rst:369 +#: ../../../library/asyncio-eventloop.rst:358 msgid "Create an :class:`asyncio.Future` object attached to the event loop." msgstr "" -#: ../../../library/asyncio-eventloop.rst:371 +#: ../../../library/asyncio-eventloop.rst:360 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:379 +#: ../../../library/asyncio-eventloop.rst:368 msgid "" "Schedule the execution of :ref:`coroutine ` *coro*. Return a :" "class:`Task` object." msgstr "" -#: ../../../library/asyncio-eventloop.rst:382 +#: ../../../library/asyncio-eventloop.rst:371 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:386 +#: ../../../library/asyncio-eventloop.rst:375 msgid "" "The full function signature is largely the same as that of the :class:`Task` " "constructor (or factory) - all of the keyword arguments to this function are " "passed through to that interface." msgstr "" -#: ../../../library/asyncio-eventloop.rst:390 +#: ../../../library/asyncio-eventloop.rst:379 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:393 +#: ../../../library/asyncio-eventloop.rst:382 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:397 +#: ../../../library/asyncio-eventloop.rst:386 msgid "" "An optional keyword-only *eager_start* argument allows specifying if the " "task should execute eagerly during the call to create_task, or be scheduled " @@ -528,38 +514,38 @@ msgid "" "set_task_factory` will be used." msgstr "" -#: ../../../library/asyncio-eventloop.rst:402 +#: ../../../library/asyncio-eventloop.rst:391 msgid "Added the *name* parameter." msgstr "" -#: ../../../library/asyncio-eventloop.rst:405 +#: ../../../library/asyncio-eventloop.rst:394 msgid "Added the *context* parameter." msgstr "" -#: ../../../library/asyncio-eventloop.rst:408 +#: ../../../library/asyncio-eventloop.rst:397 msgid "" "Added ``kwargs`` which passes on arbitrary extra parameters, including " "``name`` and ``context``." msgstr "" -#: ../../../library/asyncio-eventloop.rst:411 +#: ../../../library/asyncio-eventloop.rst:400 msgid "" "Rolled back the change that passes on *name* and *context* (if it is None), " "while still passing on other arbitrary keyword arguments (to avoid breaking " "backwards compatibility with 3.13.3)." msgstr "" -#: ../../../library/asyncio-eventloop.rst:415 +#: ../../../library/asyncio-eventloop.rst:404 msgid "" "All *kwargs* are now passed on. The *eager_start* parameter works with eager " "task factories." msgstr "" -#: ../../../library/asyncio-eventloop.rst:420 +#: ../../../library/asyncio-eventloop.rst:409 msgid "Set a task factory that will be used by :meth:`loop.create_task`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:423 +#: ../../../library/asyncio-eventloop.rst:412 msgid "" "If *factory* is ``None`` the default task factory will be set. Otherwise, " "*factory* must be a *callable* with the signature matching ``(loop, coro, " @@ -568,98 +554,98 @@ msgid "" "return a :class:`asyncio.Task`-compatible object." msgstr "" -#: ../../../library/asyncio-eventloop.rst:429 +#: ../../../library/asyncio-eventloop.rst:418 msgid "Required that all *kwargs* are passed on to :class:`asyncio.Task`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:432 +#: ../../../library/asyncio-eventloop.rst:421 msgid "" "*name* is no longer passed to task factories. *context* is no longer passed " "to task factories if it is ``None``." msgstr "" -#: ../../../library/asyncio-eventloop.rst:436 +#: ../../../library/asyncio-eventloop.rst:425 msgid "" "*name* and *context* are now unconditionally passed on to task factories " "again." msgstr "" -#: ../../../library/asyncio-eventloop.rst:441 +#: ../../../library/asyncio-eventloop.rst:430 msgid "Return a task factory or ``None`` if the default one is in use." msgstr "" -#: ../../../library/asyncio-eventloop.rst:445 +#: ../../../library/asyncio-eventloop.rst:434 msgid "Opening network connections" msgstr "" -#: ../../../library/asyncio-eventloop.rst:457 +#: ../../../library/asyncio-eventloop.rst:446 msgid "" "Open a streaming transport connection to a given address specified by *host* " "and *port*." msgstr "" -#: ../../../library/asyncio-eventloop.rst:460 +#: ../../../library/asyncio-eventloop.rst:449 msgid "" "The socket family can be either :py:const:`~socket.AF_INET` or :py:const:" "`~socket.AF_INET6` depending on *host* (or the *family* argument, if " "provided)." msgstr "" -#: ../../../library/asyncio-eventloop.rst:464 +#: ../../../library/asyncio-eventloop.rst:453 msgid "The socket type will be :py:const:`~socket.SOCK_STREAM`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:466 -#: ../../../library/asyncio-eventloop.rst:1265 +#: ../../../library/asyncio-eventloop.rst:455 +#: ../../../library/asyncio-eventloop.rst:1263 #: ../../../library/asyncio-eventloop.rst:1282 msgid "" "*protocol_factory* must be a callable returning an :ref:`asyncio protocol " "` implementation." msgstr "" -#: ../../../library/asyncio-eventloop.rst:469 +#: ../../../library/asyncio-eventloop.rst:458 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:472 +#: ../../../library/asyncio-eventloop.rst:461 msgid "The chronological synopsis of the underlying operation is as follows:" msgstr "" -#: ../../../library/asyncio-eventloop.rst:474 +#: ../../../library/asyncio-eventloop.rst:463 msgid "" "The connection is established and a :ref:`transport ` is " "created for it." msgstr "" -#: ../../../library/asyncio-eventloop.rst:477 +#: ../../../library/asyncio-eventloop.rst:466 msgid "" "*protocol_factory* is called without arguments and is expected to return a :" "ref:`protocol ` instance." msgstr "" -#: ../../../library/asyncio-eventloop.rst:480 +#: ../../../library/asyncio-eventloop.rst:469 msgid "" "The protocol instance is coupled with the transport by calling its :meth:" "`~BaseProtocol.connection_made` method." msgstr "" -#: ../../../library/asyncio-eventloop.rst:483 +#: ../../../library/asyncio-eventloop.rst:472 msgid "A ``(transport, protocol)`` tuple is returned on success." msgstr "" -#: ../../../library/asyncio-eventloop.rst:485 +#: ../../../library/asyncio-eventloop.rst:474 msgid "" "The created transport is an implementation-dependent bidirectional stream." msgstr "" -#: ../../../library/asyncio-eventloop.rst:488 -#: ../../../library/asyncio-eventloop.rst:621 +#: ../../../library/asyncio-eventloop.rst:477 +#: ../../../library/asyncio-eventloop.rst:610 msgid "Other arguments:" msgstr "" -#: ../../../library/asyncio-eventloop.rst:490 +#: ../../../library/asyncio-eventloop.rst:479 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` " @@ -668,11 +654,11 @@ msgid "" "is used." msgstr "" -#: ../../../library/asyncio-eventloop.rst:496 +#: ../../../library/asyncio-eventloop.rst:485 msgid ":ref:`SSL/TLS security considerations `" msgstr "" -#: ../../../library/asyncio-eventloop.rst:498 +#: ../../../library/asyncio-eventloop.rst:487 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 " @@ -683,7 +669,7 @@ msgid "" "potential man-in-the-middle attacks)." msgstr "" -#: ../../../library/asyncio-eventloop.rst:506 +#: ../../../library/asyncio-eventloop.rst:495 msgid "" "*family*, *proto*, *flags* are the optional address family, protocol and " "flags to be passed through to getaddrinfo() for *host* resolution. If given, " @@ -691,7 +677,7 @@ msgid "" "constants." msgstr "" -#: ../../../library/asyncio-eventloop.rst:511 +#: ../../../library/asyncio-eventloop.rst:500 msgid "" "*happy_eyeballs_delay*, if given, enables Happy Eyeballs for this " "connection. It should be a floating-point number representing the amount of " @@ -701,7 +687,7 @@ msgid "" "the RFC is ``0.25`` (250 milliseconds)." msgstr "" -#: ../../../library/asyncio-eventloop.rst:519 +#: ../../../library/asyncio-eventloop.rst:508 msgid "" "*interleave* controls address reordering when a host name resolves to " "multiple IP addresses. If ``0`` or unspecified, no reordering is done, and " @@ -712,7 +698,7 @@ msgid "" "*happy_eyeballs_delay* is not specified, and ``1`` if it is." msgstr "" -#: ../../../library/asyncio-eventloop.rst:528 +#: ../../../library/asyncio-eventloop.rst:517 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 " @@ -720,41 +706,41 @@ msgid "" "*interleave* and *local_addr* should be specified." msgstr "" -#: ../../../library/asyncio-eventloop.rst:536 -#: ../../../library/asyncio-eventloop.rst:658 -#: ../../../library/asyncio-eventloop.rst:906 +#: ../../../library/asyncio-eventloop.rst:525 +#: ../../../library/asyncio-eventloop.rst:647 +#: ../../../library/asyncio-eventloop.rst:895 msgid "" "The *sock* argument transfers ownership of the socket to the transport " "created. To close the socket, call the transport's :meth:`~asyncio." "BaseTransport.close` method." msgstr "" -#: ../../../library/asyncio-eventloop.rst:540 +#: ../../../library/asyncio-eventloop.rst:529 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:544 -#: ../../../library/asyncio-eventloop.rst:1002 +#: ../../../library/asyncio-eventloop.rst:533 +#: ../../../library/asyncio-eventloop.rst:991 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:548 -#: ../../../library/asyncio-eventloop.rst:813 -#: ../../../library/asyncio-eventloop.rst:917 -#: ../../../library/asyncio-eventloop.rst:1006 +#: ../../../library/asyncio-eventloop.rst:537 +#: ../../../library/asyncio-eventloop.rst:802 +#: ../../../library/asyncio-eventloop.rst:906 +#: ../../../library/asyncio-eventloop.rst:995 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:552 +#: ../../../library/asyncio-eventloop.rst:541 msgid "" "*all_errors* determines what exceptions are raised when a connection cannot " "be created. By default, only a single ``Exception`` is raised: the first " @@ -764,27 +750,27 @@ msgid "" "(even if there is only one)." msgstr "" -#: ../../../library/asyncio-eventloop.rst:562 -#: ../../../library/asyncio-eventloop.rst:825 +#: ../../../library/asyncio-eventloop.rst:551 +#: ../../../library/asyncio-eventloop.rst:814 msgid "Added support for SSL/TLS in :class:`ProactorEventLoop`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:566 +#: ../../../library/asyncio-eventloop.rst:555 msgid "" "The socket option :ref:`socket.TCP_NODELAY ` is set " "by default for all TCP connections." msgstr "" -#: ../../../library/asyncio-eventloop.rst:571 -#: ../../../library/asyncio-eventloop.rst:927 +#: ../../../library/asyncio-eventloop.rst:560 +#: ../../../library/asyncio-eventloop.rst:916 msgid "Added the *ssl_handshake_timeout* parameter." msgstr "" -#: ../../../library/asyncio-eventloop.rst:575 +#: ../../../library/asyncio-eventloop.rst:564 msgid "Added the *happy_eyeballs_delay* and *interleave* parameters." msgstr "" -#: ../../../library/asyncio-eventloop.rst:577 +#: ../../../library/asyncio-eventloop.rst:566 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 " @@ -795,79 +781,79 @@ msgid "" "visible delay and provides an algorithm." msgstr "" -#: ../../../library/asyncio-eventloop.rst:586 +#: ../../../library/asyncio-eventloop.rst:575 msgid "For more information: https://datatracker.ietf.org/doc/html/rfc6555" msgstr "" -#: ../../../library/asyncio-eventloop.rst:590 -#: ../../../library/asyncio-eventloop.rst:722 -#: ../../../library/asyncio-eventloop.rst:839 -#: ../../../library/asyncio-eventloop.rst:879 -#: ../../../library/asyncio-eventloop.rst:931 -#: ../../../library/asyncio-eventloop.rst:1014 +#: ../../../library/asyncio-eventloop.rst:579 +#: ../../../library/asyncio-eventloop.rst:711 +#: ../../../library/asyncio-eventloop.rst:828 +#: ../../../library/asyncio-eventloop.rst:868 +#: ../../../library/asyncio-eventloop.rst:920 +#: ../../../library/asyncio-eventloop.rst:1003 msgid "Added the *ssl_shutdown_timeout* parameter." msgstr "" -#: ../../../library/asyncio-eventloop.rst:592 +#: ../../../library/asyncio-eventloop.rst:581 msgid "*all_errors* was added." msgstr "" -#: ../../../library/asyncio-eventloop.rst:597 +#: ../../../library/asyncio-eventloop.rst:586 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:608 +#: ../../../library/asyncio-eventloop.rst:597 msgid "Create a datagram connection." msgstr "" -#: ../../../library/asyncio-eventloop.rst:610 +#: ../../../library/asyncio-eventloop.rst:599 msgid "" "The socket family can be either :py:const:`~socket.AF_INET`, :py:const:" "`~socket.AF_INET6`, or :py:const:`~socket.AF_UNIX`, depending on *host* (or " "the *family* argument, if provided)." msgstr "" -#: ../../../library/asyncio-eventloop.rst:614 +#: ../../../library/asyncio-eventloop.rst:603 msgid "The socket type will be :py:const:`~socket.SOCK_DGRAM`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:616 -#: ../../../library/asyncio-eventloop.rst:749 -#: ../../../library/asyncio-eventloop.rst:898 +#: ../../../library/asyncio-eventloop.rst:605 +#: ../../../library/asyncio-eventloop.rst:738 +#: ../../../library/asyncio-eventloop.rst:887 msgid "" "*protocol_factory* must be a callable returning a :ref:`protocol ` implementation." msgstr "" -#: ../../../library/asyncio-eventloop.rst:619 -#: ../../../library/asyncio-eventloop.rst:704 +#: ../../../library/asyncio-eventloop.rst:608 +#: ../../../library/asyncio-eventloop.rst:693 msgid "A tuple of ``(transport, protocol)`` is returned on success." msgstr "" -#: ../../../library/asyncio-eventloop.rst:623 +#: ../../../library/asyncio-eventloop.rst:612 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:629 +#: ../../../library/asyncio-eventloop.rst:618 msgid "" "On Windows, when using the proactor event loop with ``local_addr=None``, an :" "exc:`OSError` with :attr:`!errno.WSAEINVAL` will be raised when running it." msgstr "" -#: ../../../library/asyncio-eventloop.rst:633 +#: ../../../library/asyncio-eventloop.rst:622 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:637 +#: ../../../library/asyncio-eventloop.rst:626 msgid "" "*family*, *proto*, *flags* are the optional address family, protocol and " "flags to be passed through to :meth:`getaddrinfo` for *host* resolution. If " @@ -875,7 +861,7 @@ msgid "" "module constants." msgstr "" -#: ../../../library/asyncio-eventloop.rst:642 +#: ../../../library/asyncio-eventloop.rst:631 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 " @@ -884,13 +870,13 @@ msgid "" "is not defined then this capability is unsupported." msgstr "" -#: ../../../library/asyncio-eventloop.rst:648 +#: ../../../library/asyncio-eventloop.rst:637 msgid "" "*allow_broadcast* tells the kernel to allow this endpoint to send messages " "to the broadcast address." msgstr "" -#: ../../../library/asyncio-eventloop.rst:651 +#: ../../../library/asyncio-eventloop.rst:640 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 " @@ -898,37 +884,37 @@ msgid "" "`None`)." msgstr "" -#: ../../../library/asyncio-eventloop.rst:662 +#: ../../../library/asyncio-eventloop.rst:651 msgid "" "See :ref:`UDP echo client protocol ` and :" "ref:`UDP echo server protocol ` examples." msgstr "" -#: ../../../library/asyncio-eventloop.rst:665 +#: ../../../library/asyncio-eventloop.rst:654 msgid "" "The *family*, *proto*, *flags*, *reuse_address*, *reuse_port*, " "*allow_broadcast*, and *sock* parameters were added." msgstr "" -#: ../../../library/asyncio-eventloop.rst:669 +#: ../../../library/asyncio-eventloop.rst:658 msgid "Added support for Windows." msgstr "" -#: ../../../library/asyncio-eventloop.rst:672 +#: ../../../library/asyncio-eventloop.rst:661 msgid "" "The *reuse_address* parameter is no longer supported, as using :ref:`socket." "SO_REUSEADDR ` poses a significant security concern " "for UDP. Explicitly passing ``reuse_address=True`` will raise an exception." msgstr "" -#: ../../../library/asyncio-eventloop.rst:678 +#: ../../../library/asyncio-eventloop.rst:667 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:682 +#: ../../../library/asyncio-eventloop.rst:671 msgid "" "For supported platforms, *reuse_port* can be used as a replacement for " "similar functionality. With *reuse_port*, :ref:`socket.SO_REUSEPORT ` is set by default " "for all TCP connections." msgstr "" -#: ../../../library/asyncio-eventloop.rst:843 +#: ../../../library/asyncio-eventloop.rst:832 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:855 +#: ../../../library/asyncio-eventloop.rst:844 msgid "" "Similar to :meth:`loop.create_server` but works with the :py:const:`~socket." "AF_UNIX` socket family." msgstr "" -#: ../../../library/asyncio-eventloop.rst:858 +#: ../../../library/asyncio-eventloop.rst:847 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:863 +#: ../../../library/asyncio-eventloop.rst:852 msgid "" "If *cleanup_socket* is true then the Unix socket will automatically be " "removed from the filesystem when the server is closed, unless the socket has " "been replaced after the server has been created." msgstr "" -#: ../../../library/asyncio-eventloop.rst:867 +#: ../../../library/asyncio-eventloop.rst:856 msgid "" "See the documentation of the :meth:`loop.create_server` method for " "information about arguments to this method." msgstr "" -#: ../../../library/asyncio-eventloop.rst:874 +#: ../../../library/asyncio-eventloop.rst:863 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:883 +#: ../../../library/asyncio-eventloop.rst:872 msgid "Added the *cleanup_socket* parameter." msgstr "" -#: ../../../library/asyncio-eventloop.rst:891 +#: ../../../library/asyncio-eventloop.rst:880 msgid "Wrap an already accepted connection into a transport/protocol pair." msgstr "" -#: ../../../library/asyncio-eventloop.rst:893 +#: ../../../library/asyncio-eventloop.rst:882 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:896 -#: ../../../library/asyncio-eventloop.rst:988 +#: ../../../library/asyncio-eventloop.rst:885 +#: ../../../library/asyncio-eventloop.rst:977 msgid "Parameters:" msgstr "" -#: ../../../library/asyncio-eventloop.rst:901 +#: ../../../library/asyncio-eventloop.rst:890 msgid "" "*sock* is a preexisting socket object returned from :meth:`socket.accept " "`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:910 +#: ../../../library/asyncio-eventloop.rst:899 msgid "" "*ssl* can be set to an :class:`~ssl.SSLContext` to enable SSL over the " "accepted connections." msgstr "" -#: ../../../library/asyncio-eventloop.rst:913 +#: ../../../library/asyncio-eventloop.rst:902 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:921 +#: ../../../library/asyncio-eventloop.rst:910 msgid "Returns a ``(transport, protocol)`` pair." msgstr "" -#: ../../../library/asyncio-eventloop.rst:935 +#: ../../../library/asyncio-eventloop.rst:924 msgid "Transferring files" msgstr "" -#: ../../../library/asyncio-eventloop.rst:941 +#: ../../../library/asyncio-eventloop.rst:930 msgid "" "Send a *file* over a *transport*. Return the total number of bytes sent." msgstr "" -#: ../../../library/asyncio-eventloop.rst:944 +#: ../../../library/asyncio-eventloop.rst:933 msgid "The method uses high-performance :meth:`os.sendfile` if available." msgstr "" -#: ../../../library/asyncio-eventloop.rst:946 +#: ../../../library/asyncio-eventloop.rst:935 msgid "*file* must be a regular file object opened in binary mode." msgstr "" -#: ../../../library/asyncio-eventloop.rst:948 -#: ../../../library/asyncio-eventloop.rst:1209 +#: ../../../library/asyncio-eventloop.rst:937 +#: ../../../library/asyncio-eventloop.rst:1207 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 " @@ -1223,35 +1209,35 @@ msgid "" "obtain the actual number of bytes sent." msgstr "" -#: ../../../library/asyncio-eventloop.rst:955 +#: ../../../library/asyncio-eventloop.rst:944 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:959 +#: ../../../library/asyncio-eventloop.rst:948 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support the " "*sendfile* syscall and *fallback* is ``False``." msgstr "" -#: ../../../library/asyncio-eventloop.rst:966 +#: ../../../library/asyncio-eventloop.rst:955 msgid "TLS upgrade" msgstr "" -#: ../../../library/asyncio-eventloop.rst:974 +#: ../../../library/asyncio-eventloop.rst:963 msgid "Upgrade an existing transport-based connection to TLS." msgstr "" -#: ../../../library/asyncio-eventloop.rst:976 +#: ../../../library/asyncio-eventloop.rst:965 msgid "" "Create a TLS coder/decoder instance and insert it between the *transport* " "and the *protocol*. The coder/decoder implements both *transport*-facing " "protocol and *protocol*-facing transport." msgstr "" -#: ../../../library/asyncio-eventloop.rst:980 +#: ../../../library/asyncio-eventloop.rst:969 msgid "" "Return the created two-interface instance. After *await*, the *protocol* " "must stop using the original *transport* and communicate with the returned " @@ -1259,88 +1245,88 @@ msgid "" "exchanges extra TLS session packets with *transport*." msgstr "" -#: ../../../library/asyncio-eventloop.rst:985 +#: ../../../library/asyncio-eventloop.rst:974 msgid "" "In some situations (e.g. when the passed transport is already closing) this " "may return ``None``." msgstr "" -#: ../../../library/asyncio-eventloop.rst:990 +#: ../../../library/asyncio-eventloop.rst:979 msgid "" "*transport* and *protocol* instances that methods like :meth:`~loop." "create_server` and :meth:`~loop.create_connection` return." msgstr "" -#: ../../../library/asyncio-eventloop.rst:994 +#: ../../../library/asyncio-eventloop.rst:983 msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:996 +#: ../../../library/asyncio-eventloop.rst:985 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:999 +#: ../../../library/asyncio-eventloop.rst:988 msgid "" "*server_hostname*: sets or overrides the host name that the target server's " "certificate will be matched against." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1019 +#: ../../../library/asyncio-eventloop.rst:1008 msgid "Watching file descriptors" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1023 +#: ../../../library/asyncio-eventloop.rst:1012 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:1027 -#: ../../../library/asyncio-eventloop.rst:1041 +#: ../../../library/asyncio-eventloop.rst:1016 +#: ../../../library/asyncio-eventloop.rst:1030 msgid "" "Any preexisting callback registered for *fd* is cancelled and replaced by " "*callback*." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1032 +#: ../../../library/asyncio-eventloop.rst:1021 msgid "" "Stop monitoring the *fd* file descriptor for read availability. Returns " "``True`` if *fd* was previously being monitored for reads." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1037 +#: ../../../library/asyncio-eventloop.rst:1026 msgid "" "Start monitoring the *fd* file descriptor for write availability and invoke " "*callback* with the specified arguments *args* once *fd* is available for " "writing." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1044 -#: ../../../library/asyncio-eventloop.rst:1323 +#: ../../../library/asyncio-eventloop.rst:1033 +#: ../../../library/asyncio-eventloop.rst:1352 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *callback*." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1049 +#: ../../../library/asyncio-eventloop.rst:1038 msgid "" "Stop monitoring the *fd* file descriptor for write availability. Returns " "``True`` if *fd* was previously being monitored for writes." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1052 +#: ../../../library/asyncio-eventloop.rst:1041 msgid "" "See also :ref:`Platform Support ` section for some " "limitations of these methods." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1057 +#: ../../../library/asyncio-eventloop.rst:1046 msgid "Working with socket objects directly" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1059 +#: ../../../library/asyncio-eventloop.rst:1048 msgid "" "In general, protocol implementations that use transport-based APIs such as :" "meth:`loop.create_connection` and :meth:`loop.create_server` are faster than " @@ -1349,72 +1335,72 @@ msgid "" "socket` objects directly is more convenient." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1069 +#: ../../../library/asyncio-eventloop.rst:1058 msgid "" "Receive up to *nbytes* from *sock*. Asynchronous version of :meth:`socket." "recv() `." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1072 +#: ../../../library/asyncio-eventloop.rst:1061 msgid "Return the received data as a bytes object." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1074 -#: ../../../library/asyncio-eventloop.rst:1089 -#: ../../../library/asyncio-eventloop.rst:1101 -#: ../../../library/asyncio-eventloop.rst:1114 -#: ../../../library/asyncio-eventloop.rst:1130 +#: ../../../library/asyncio-eventloop.rst:1063 +#: ../../../library/asyncio-eventloop.rst:1078 +#: ../../../library/asyncio-eventloop.rst:1090 +#: ../../../library/asyncio-eventloop.rst:1103 +#: ../../../library/asyncio-eventloop.rst:1119 +#: ../../../library/asyncio-eventloop.rst:1135 #: ../../../library/asyncio-eventloop.rst:1146 -#: ../../../library/asyncio-eventloop.rst:1157 -#: ../../../library/asyncio-eventloop.rst:1184 -#: ../../../library/asyncio-eventloop.rst:1223 +#: ../../../library/asyncio-eventloop.rst:1182 +#: ../../../library/asyncio-eventloop.rst:1221 msgid "*sock* must be a non-blocking socket." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1076 +#: ../../../library/asyncio-eventloop.rst:1065 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:1084 +#: ../../../library/asyncio-eventloop.rst:1073 msgid "" "Receive data from *sock* into the *buf* buffer. Modeled after the blocking :" "meth:`socket.recv_into() ` method." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1087 +#: ../../../library/asyncio-eventloop.rst:1076 msgid "Return the number of bytes written to the buffer." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1096 +#: ../../../library/asyncio-eventloop.rst:1085 msgid "" "Receive a datagram of up to *bufsize* from *sock*. Asynchronous version of :" "meth:`socket.recvfrom() `." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1099 +#: ../../../library/asyncio-eventloop.rst:1088 msgid "Return a tuple of (received data, remote address)." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1108 +#: ../../../library/asyncio-eventloop.rst:1097 msgid "" "Receive a datagram of up to *nbytes* from *sock* into *buf*. Asynchronous " "version of :meth:`socket.recvfrom_into() `." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1112 +#: ../../../library/asyncio-eventloop.rst:1101 msgid "Return a tuple of (number of bytes received, remote address)." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1121 +#: ../../../library/asyncio-eventloop.rst:1110 msgid "" "Send *data* to the *sock* socket. Asynchronous version of :meth:`socket." "sendall() `." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1124 +#: ../../../library/asyncio-eventloop.rst:1113 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 " @@ -1423,54 +1409,69 @@ msgid "" "the connection." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1132 -#: ../../../library/asyncio-eventloop.rst:1186 +#: ../../../library/asyncio-eventloop.rst:1121 +#: ../../../library/asyncio-eventloop.rst:1184 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:1140 +#: ../../../library/asyncio-eventloop.rst:1129 msgid "" "Send a datagram from *sock* to *address*. Asynchronous version of :meth:" "`socket.sendto() `." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1144 +#: ../../../library/asyncio-eventloop.rst:1133 msgid "Return the number of bytes sent." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1153 +#: ../../../library/asyncio-eventloop.rst:1142 msgid "Connect *sock* to a remote socket at *address*." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1155 +#: ../../../library/asyncio-eventloop.rst:1144 msgid "" "Asynchronous version of :meth:`socket.connect() `." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1159 +#: ../../../library/asyncio-eventloop.rst:1148 msgid "" -"``address`` no longer needs to be resolved. ``sock_connect`` will try to " -"check if the *address* is already resolved by calling :func:`socket." -"inet_pton`. If not, :meth:`loop.getaddrinfo` will be used to resolve the " -"*address*." +"With :class:`SelectorEventLoop`, *address* does not need to be resolved: " +"for :const:`~socket.AF_INET` and :const:`~socket.AF_INET6` sockets, " +"``sock_connect`` first checks whether *address* is already resolved by " +"calling :func:`socket.inet_pton`, and uses :meth:`loop.getaddrinfo` to " +"resolve it if it is not." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1168 +#: ../../../library/asyncio-eventloop.rst:1154 +msgid "" +":class:`ProactorEventLoop`, the default event loop on Windows, does not " +"resolve *address*. The host must already be a numeric IP address; passing a " +"host name raises :exc:`OSError`. Resolve the address with :meth:`loop." +"getaddrinfo` first, or use :meth:`loop.create_connection`, which resolves " +"the address on every platform." +msgstr "" + +#: ../../../library/asyncio-eventloop.rst:1160 +msgid "" +"With :class:`SelectorEventLoop`, ``address`` no longer needs to be resolved." +msgstr "" + +#: ../../../library/asyncio-eventloop.rst:1166 msgid "" ":meth:`loop.create_connection` and :func:`asyncio.open_connection() " "`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1175 +#: ../../../library/asyncio-eventloop.rst:1173 msgid "" "Accept a connection. Modeled after the blocking :meth:`socket.accept() " "` method." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1178 +#: ../../../library/asyncio-eventloop.rst:1176 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 " @@ -1478,57 +1479,57 @@ msgid "" "the address bound to the socket on the other end of the connection." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1193 +#: ../../../library/asyncio-eventloop.rst:1191 msgid ":meth:`loop.create_server` and :func:`start_server`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1199 +#: ../../../library/asyncio-eventloop.rst:1197 msgid "" "Send a file using high-performance :mod:`os.sendfile` if possible. Return " "the total number of bytes sent." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1202 +#: ../../../library/asyncio-eventloop.rst:1200 msgid "" "Asynchronous version of :meth:`socket.sendfile() `." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1204 +#: ../../../library/asyncio-eventloop.rst:1202 msgid "" "*sock* must be a non-blocking :const:`socket.SOCK_STREAM` :class:`~socket." "socket`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1207 +#: ../../../library/asyncio-eventloop.rst:1205 msgid "*file* must be a regular file object open in binary mode." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1216 +#: ../../../library/asyncio-eventloop.rst:1214 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:1220 +#: ../../../library/asyncio-eventloop.rst:1218 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support " "*sendfile* syscall and *fallback* is ``False``." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1229 +#: ../../../library/asyncio-eventloop.rst:1227 msgid "DNS" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1235 +#: ../../../library/asyncio-eventloop.rst:1233 msgid "Asynchronous version of :meth:`socket.getaddrinfo`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1240 +#: ../../../library/asyncio-eventloop.rst:1238 msgid "Asynchronous version of :meth:`socket.getnameinfo`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1243 +#: ../../../library/asyncio-eventloop.rst:1241 msgid "" "Both *getaddrinfo* and *getnameinfo* internally utilize their synchronous " "versions through the loop's default thread pool executor. When this executor " @@ -1538,7 +1539,7 @@ msgid "" "executor with a larger number of workers." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1250 +#: ../../../library/asyncio-eventloop.rst:1248 msgid "" "Both *getaddrinfo* and *getnameinfo* methods were always documented to " "return a coroutine, but prior to Python 3.7 they were, in fact, returning :" @@ -1546,16 +1547,19 @@ msgid "" "coroutines." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1258 +#: ../../../library/asyncio-eventloop.rst:1256 msgid "Working with pipes" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1263 +#: ../../../library/asyncio-eventloop.rst:1261 msgid "Register the read end of *pipe* in the event loop." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1268 -msgid "*pipe* is a :term:`file-like object `." +#: ../../../library/asyncio-eventloop.rst:1266 +#: ../../../library/asyncio-eventloop.rst:1285 +msgid "" +"*pipe* is a :term:`file-like object `. See :ref:`Supported " +"pipe objects ` for the objects supported as *pipe*." msgstr "" #: ../../../library/asyncio-eventloop.rst:1270 @@ -1566,7 +1570,7 @@ msgid "" msgstr "" #: ../../../library/asyncio-eventloop.rst:1274 -#: ../../../library/asyncio-eventloop.rst:1291 +#: ../../../library/asyncio-eventloop.rst:1293 msgid "" "With :class:`SelectorEventLoop` event loop, the *pipe* is set to non-" "blocking mode." @@ -1576,39 +1580,80 @@ msgstr "" msgid "Register the write end of *pipe* in the event loop." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1285 -msgid "*pipe* is :term:`file-like object `." -msgstr "" - -#: ../../../library/asyncio-eventloop.rst:1287 +#: ../../../library/asyncio-eventloop.rst:1289 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:1296 +#: ../../../library/asyncio-eventloop.rst:1299 +msgid "Supported pipe objects" +msgstr "" + +#: ../../../library/asyncio-eventloop.rst:1300 +msgid "" +"These methods only work with objects the operating system can poll for " +"readiness or perform overlapped I/O on. Regular files on disk are **not** " +"supported on any platform. There is no asynchronous file I/O in asyncio; " +"use :meth:`loop.run_in_executor` to read and write regular files without " +"blocking the event loop." +msgstr "" + +#: ../../../library/asyncio-eventloop.rst:1306 +msgid "" +"On Unix, with :class:`SelectorEventLoop`, *pipe* must wrap one of the " +"following:" +msgstr "" + +#: ../../../library/asyncio-eventloop.rst:1309 +msgid "" +"a pipe, such as an end of an :func:`os.pipe` pair or a FIFO created with :" +"func:`os.mkfifo`;" +msgstr "" + +#: ../../../library/asyncio-eventloop.rst:1311 +msgid "a socket;" +msgstr "" + +#: ../../../library/asyncio-eventloop.rst:1312 +msgid "a character device, such as a terminal." +msgstr "" + +#: ../../../library/asyncio-eventloop.rst:1314 +msgid "" +"On Windows, where only :class:`ProactorEventLoop` implements these methods, " +"*pipe* must wrap a handle opened for overlapped I/O (that is, created with " +"the ``FILE_FLAG_OVERLAPPED`` flag), since the handle has to be associated " +"with an I/O completion port. Handles that were not opened for overlapped I/" +"O are rejected. In particular, the standard streams (:data:`sys.stdin`, :" +"data:`sys.stdout` and :data:`sys.stderr`), console handles, and the pipes " +"created by :func:`os.pipe` are **not** opened for overlapped I/O and " +"therefore cannot be used with these methods." +msgstr "" + +#: ../../../library/asyncio-eventloop.rst:1325 msgid "" ":class:`SelectorEventLoop` does not support the above methods on Windows. " "Use :class:`ProactorEventLoop` instead for Windows." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1301 +#: ../../../library/asyncio-eventloop.rst:1330 msgid "" "The :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` methods." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1306 +#: ../../../library/asyncio-eventloop.rst:1335 msgid "Unix signals" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1312 +#: ../../../library/asyncio-eventloop.rst:1341 msgid "" "Set *callback* as the handler for the *signum* signal, passing *args* as " "positional arguments." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1315 +#: ../../../library/asyncio-eventloop.rst:1344 msgid "" "The callback will be invoked by *loop*, along with other queued callbacks " "and runnable coroutines of that event loop. Unlike signal handlers " @@ -1616,42 +1661,42 @@ msgid "" "function is allowed to interact with the event loop." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1320 +#: ../../../library/asyncio-eventloop.rst:1349 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:1326 +#: ../../../library/asyncio-eventloop.rst:1355 msgid "" "Like :func:`signal.signal`, this function must be invoked in the main thread." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1331 +#: ../../../library/asyncio-eventloop.rst:1360 msgid "Remove the handler for the *sig* signal." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1333 +#: ../../../library/asyncio-eventloop.rst:1362 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:1340 +#: ../../../library/asyncio-eventloop.rst:1369 msgid "The :mod:`signal` module." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1344 +#: ../../../library/asyncio-eventloop.rst:1373 msgid "Executing code in thread or process pools" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1348 +#: ../../../library/asyncio-eventloop.rst:1377 msgid "" "Arrange for *func* to be called in the specified executor passing *args* as " "positional arguments." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1351 +#: ../../../library/asyncio-eventloop.rst:1380 msgid "" "The *executor* argument should be an :class:`concurrent.futures.Executor` " "instance. The default executor is used if *executor* is ``None``. The " @@ -1660,7 +1705,7 @@ msgid "" "and used by :func:`run_in_executor` if needed." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1405 +#: ../../../library/asyncio-eventloop.rst:1434 msgid "" "Note that the entry point guard (``if __name__ == '__main__'``) is required " "for option 3 due to the peculiarities of :mod:`multiprocessing`, which is " @@ -1668,17 +1713,17 @@ msgid "" "importing of main module `." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1410 +#: ../../../library/asyncio-eventloop.rst:1439 msgid "This method returns a :class:`asyncio.Future` object." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1412 +#: ../../../library/asyncio-eventloop.rst:1441 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *func*." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1415 +#: ../../../library/asyncio-eventloop.rst:1444 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 " @@ -1686,7 +1731,7 @@ msgid "" "default." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1424 +#: ../../../library/asyncio-eventloop.rst:1453 msgid "" "Set *executor* as the default executor used by :meth:`run_in_executor`. " "*executor* must be an instance of :class:`~concurrent.futures." @@ -1694,25 +1739,25 @@ msgid "" "InterpreterPoolExecutor`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1429 +#: ../../../library/asyncio-eventloop.rst:1458 msgid "" "*executor* must be an instance of :class:`~concurrent.futures." "ThreadPoolExecutor`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1435 +#: ../../../library/asyncio-eventloop.rst:1464 msgid "Error handling API" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1437 +#: ../../../library/asyncio-eventloop.rst:1466 msgid "Allows customizing how exceptions are handled in the event loop." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1441 +#: ../../../library/asyncio-eventloop.rst:1470 msgid "Set *handler* as the new event loop exception handler." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1443 +#: ../../../library/asyncio-eventloop.rst:1472 msgid "" "If *handler* is ``None``, the default exception handler will be set. " "Otherwise, *handler* must be a callable with the signature matching ``(loop, " @@ -1721,190 +1766,190 @@ msgid "" "(see :meth:`call_exception_handler` documentation for details about context)." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1451 +#: ../../../library/asyncio-eventloop.rst:1480 msgid "" "If the handler is called on behalf of a :class:`~asyncio.Task` or :class:" "`~asyncio.Handle`, it is run in the :class:`contextvars.Context` of that " "task or callback handle." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1457 +#: ../../../library/asyncio-eventloop.rst:1486 msgid "" "The handler may be called in the :class:`~contextvars.Context` of the task " "or handle where the exception originated." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1462 +#: ../../../library/asyncio-eventloop.rst:1491 msgid "" "Return the current exception handler, or ``None`` if no custom exception " "handler was set." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1469 +#: ../../../library/asyncio-eventloop.rst:1498 msgid "Default exception handler." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1471 +#: ../../../library/asyncio-eventloop.rst:1500 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:1475 +#: ../../../library/asyncio-eventloop.rst:1504 msgid "" "*context* parameter has the same meaning as in :meth:" "`call_exception_handler`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1480 +#: ../../../library/asyncio-eventloop.rst:1509 msgid "Call the current event loop exception handler." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1482 +#: ../../../library/asyncio-eventloop.rst:1511 msgid "" "*context* is a ``dict`` object containing the following keys (new keys may " "be introduced in future Python versions):" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1485 +#: ../../../library/asyncio-eventloop.rst:1514 msgid "'message': Error message;" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1486 +#: ../../../library/asyncio-eventloop.rst:1515 msgid "'exception' (optional): Exception object;" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1487 +#: ../../../library/asyncio-eventloop.rst:1516 msgid "'future' (optional): :class:`asyncio.Future` instance;" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1488 +#: ../../../library/asyncio-eventloop.rst:1517 msgid "'task' (optional): :class:`asyncio.Task` instance;" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1489 +#: ../../../library/asyncio-eventloop.rst:1518 msgid "'handle' (optional): :class:`asyncio.Handle` instance;" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1490 +#: ../../../library/asyncio-eventloop.rst:1519 msgid "'protocol' (optional): :ref:`Protocol ` instance;" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1491 +#: ../../../library/asyncio-eventloop.rst:1520 msgid "'transport' (optional): :ref:`Transport ` instance;" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1492 +#: ../../../library/asyncio-eventloop.rst:1521 msgid "'socket' (optional): :class:`socket.socket` instance;" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1493 +#: ../../../library/asyncio-eventloop.rst:1522 msgid "'source_traceback' (optional): Traceback of the source;" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1494 +#: ../../../library/asyncio-eventloop.rst:1523 msgid "'handle_traceback' (optional): Traceback of the handle;" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1495 +#: ../../../library/asyncio-eventloop.rst:1524 msgid "'asyncgen' (optional): Asynchronous generator that caused" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1496 +#: ../../../library/asyncio-eventloop.rst:1525 msgid "the exception." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1500 +#: ../../../library/asyncio-eventloop.rst:1529 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:1505 +#: ../../../library/asyncio-eventloop.rst:1534 msgid "Enabling debug mode" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1509 +#: ../../../library/asyncio-eventloop.rst:1538 msgid "Get the debug mode (:class:`bool`) of the event loop." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1511 +#: ../../../library/asyncio-eventloop.rst:1540 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:1517 +#: ../../../library/asyncio-eventloop.rst:1546 msgid "Set the debug mode of the event loop." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1521 +#: ../../../library/asyncio-eventloop.rst:1550 msgid "" "The new :ref:`Python Development Mode ` can now also be used to " "enable the debug mode." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1526 +#: ../../../library/asyncio-eventloop.rst:1555 msgid "" "This attribute can be used to set the minimum execution duration in seconds " "that is considered \"slow\". When debug mode is enabled, \"slow\" callbacks " "are logged." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1530 +#: ../../../library/asyncio-eventloop.rst:1559 msgid "Default value is 100 milliseconds." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1534 +#: ../../../library/asyncio-eventloop.rst:1563 msgid "The :ref:`debug mode of asyncio `." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1538 +#: ../../../library/asyncio-eventloop.rst:1567 msgid "Running subprocesses" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1540 +#: ../../../library/asyncio-eventloop.rst:1569 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:1547 +#: ../../../library/asyncio-eventloop.rst:1576 msgid "" "On Windows, the default event loop :class:`ProactorEventLoop` supports " "subprocesses, whereas :class:`SelectorEventLoop` does not. See :ref:" "`Subprocess Support on Windows ` for details." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1559 +#: ../../../library/asyncio-eventloop.rst:1588 msgid "" "Create a subprocess from one or more string arguments specified by *args*." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1562 +#: ../../../library/asyncio-eventloop.rst:1591 msgid "*args* must be a list of strings represented by:" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1564 +#: ../../../library/asyncio-eventloop.rst:1593 msgid ":class:`str`;" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1565 +#: ../../../library/asyncio-eventloop.rst:1594 msgid "" "or :class:`bytes`, encoded to the :ref:`filesystem encoding `." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1568 +#: ../../../library/asyncio-eventloop.rst:1597 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:1572 +#: ../../../library/asyncio-eventloop.rst:1601 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 " @@ -1912,85 +1957,85 @@ msgid "" "which is list of strings, *subprocess_exec* takes multiple string arguments." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1578 +#: ../../../library/asyncio-eventloop.rst:1607 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`asyncio.SubprocessProtocol` class." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1581 +#: ../../../library/asyncio-eventloop.rst:1610 msgid "Other parameters:" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1583 +#: ../../../library/asyncio-eventloop.rst:1612 msgid "*stdin* can be any of these:" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1585 -#: ../../../library/asyncio-eventloop.rst:1596 -#: ../../../library/asyncio-eventloop.rst:1606 +#: ../../../library/asyncio-eventloop.rst:1614 +#: ../../../library/asyncio-eventloop.rst:1625 +#: ../../../library/asyncio-eventloop.rst:1635 msgid "a file-like object" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1586 +#: ../../../library/asyncio-eventloop.rst:1615 msgid "" "an existing file descriptor (a positive integer), for example those created " "with :meth:`os.pipe`" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1587 -#: ../../../library/asyncio-eventloop.rst:1597 -#: ../../../library/asyncio-eventloop.rst:1607 +#: ../../../library/asyncio-eventloop.rst:1616 +#: ../../../library/asyncio-eventloop.rst:1626 +#: ../../../library/asyncio-eventloop.rst:1636 msgid "" "the :const:`subprocess.PIPE` constant (default) which will create a new pipe " "and connect it," msgstr "" -#: ../../../library/asyncio-eventloop.rst:1589 -#: ../../../library/asyncio-eventloop.rst:1599 -#: ../../../library/asyncio-eventloop.rst:1609 +#: ../../../library/asyncio-eventloop.rst:1618 +#: ../../../library/asyncio-eventloop.rst:1628 +#: ../../../library/asyncio-eventloop.rst:1638 msgid "" "the value ``None`` which will make the subprocess inherit the file " "descriptor from this process" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1591 -#: ../../../library/asyncio-eventloop.rst:1601 -#: ../../../library/asyncio-eventloop.rst:1611 +#: ../../../library/asyncio-eventloop.rst:1620 +#: ../../../library/asyncio-eventloop.rst:1630 +#: ../../../library/asyncio-eventloop.rst:1640 msgid "" "the :const:`subprocess.DEVNULL` constant which indicates that the special :" "data:`os.devnull` file will be used" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1594 +#: ../../../library/asyncio-eventloop.rst:1623 msgid "*stdout* can be any of these:" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1604 +#: ../../../library/asyncio-eventloop.rst:1633 msgid "*stderr* can be any of these:" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1613 +#: ../../../library/asyncio-eventloop.rst:1642 msgid "" "the :const:`subprocess.STDOUT` constant which will connect the standard " "error stream to the process' standard output stream" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1616 +#: ../../../library/asyncio-eventloop.rst:1645 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:1621 +#: ../../../library/asyncio-eventloop.rst:1650 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:1625 +#: ../../../library/asyncio-eventloop.rst:1654 msgid "" "If a file-like object passed as *stdin*, *stdout* or *stderr* represents a " "pipe, then the other side of this pipe should be registered with :meth:" @@ -1998,59 +2043,59 @@ msgid "" "the event loop." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1630 +#: ../../../library/asyncio-eventloop.rst:1659 msgid "" "See the constructor of the :class:`subprocess.Popen` class for documentation " "on other arguments." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1633 +#: ../../../library/asyncio-eventloop.rst:1662 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:1637 -#: ../../../library/asyncio-eventloop.rst:1663 +#: ../../../library/asyncio-eventloop.rst:1666 +#: ../../../library/asyncio-eventloop.rst:1692 msgid "" "If the transport is closed or is garbage collected, the child process is " "killed if it is still running." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1645 +#: ../../../library/asyncio-eventloop.rst:1674 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:1650 +#: ../../../library/asyncio-eventloop.rst:1679 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=True``." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1653 +#: ../../../library/asyncio-eventloop.rst:1682 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`SubprocessProtocol` class." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1656 +#: ../../../library/asyncio-eventloop.rst:1685 msgid "" "See :meth:`~loop.subprocess_exec` for more details about the remaining " "arguments." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1659 +#: ../../../library/asyncio-eventloop.rst:1688 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:1667 +#: ../../../library/asyncio-eventloop.rst:1696 msgid "" "It is the application's responsibility to ensure that all whitespace and " "special characters are quoted appropriately to avoid `shell injection " @@ -2060,148 +2105,148 @@ msgid "" "used to construct shell commands." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1676 +#: ../../../library/asyncio-eventloop.rst:1705 msgid "Callback handles" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1680 +#: ../../../library/asyncio-eventloop.rst:1709 msgid "" "A callback wrapper object returned by :meth:`loop.call_soon`, :meth:`loop." "call_soon_threadsafe`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1685 +#: ../../../library/asyncio-eventloop.rst:1714 msgid "" "Return the :class:`contextvars.Context` object associated with the handle." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1692 +#: ../../../library/asyncio-eventloop.rst:1721 msgid "" "Cancel the callback. If the callback has already been canceled or executed, " "this method has no effect." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1697 +#: ../../../library/asyncio-eventloop.rst:1726 msgid "Return ``True`` if the callback was cancelled." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1703 +#: ../../../library/asyncio-eventloop.rst:1732 msgid "" "A callback wrapper object returned by :meth:`loop.call_later`, and :meth:" "`loop.call_at`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1706 +#: ../../../library/asyncio-eventloop.rst:1735 msgid "This class is a subclass of :class:`Handle`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1710 +#: ../../../library/asyncio-eventloop.rst:1739 msgid "Return a scheduled callback time as :class:`float` seconds." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1712 +#: ../../../library/asyncio-eventloop.rst:1741 msgid "" "The time is an absolute timestamp, using the same time reference as :meth:" "`loop.time`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1719 +#: ../../../library/asyncio-eventloop.rst:1748 msgid "Server objects" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1721 +#: ../../../library/asyncio-eventloop.rst:1750 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:1725 +#: ../../../library/asyncio-eventloop.rst:1754 msgid "Do not instantiate the :class:`Server` class directly." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1729 +#: ../../../library/asyncio-eventloop.rst:1758 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:1742 +#: ../../../library/asyncio-eventloop.rst:1771 msgid "Server object is an asynchronous context manager since Python 3.7." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1745 +#: ../../../library/asyncio-eventloop.rst:1774 msgid "" "This class was exposed publicly as ``asyncio.Server`` in Python 3.9.11, " "3.10.3 and 3.11." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1750 +#: ../../../library/asyncio-eventloop.rst:1779 msgid "" "Stop serving: close listening sockets and set the :attr:`sockets` attribute " "to ``None``." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1753 +#: ../../../library/asyncio-eventloop.rst:1782 msgid "" "The sockets that represent existing incoming client connections are left " "open." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1756 +#: ../../../library/asyncio-eventloop.rst:1785 msgid "" "The server is closed asynchronously; use the :meth:`wait_closed` coroutine " "to wait until the server is closed (and no more connections are active)." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1762 +#: ../../../library/asyncio-eventloop.rst:1791 msgid "Close all existing incoming client connections." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1764 +#: ../../../library/asyncio-eventloop.rst:1793 msgid "" "Calls :meth:`~asyncio.BaseTransport.close` on all associated transports." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1767 +#: ../../../library/asyncio-eventloop.rst:1796 msgid "" ":meth:`close` should be called before :meth:`close_clients` when closing the " "server to avoid races with new clients connecting." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1774 +#: ../../../library/asyncio-eventloop.rst:1803 msgid "" "Close all existing incoming client connections immediately, without waiting " "for pending operations to complete." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1777 +#: ../../../library/asyncio-eventloop.rst:1806 msgid "" "Calls :meth:`~asyncio.WriteTransport.abort` on all associated transports." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1780 +#: ../../../library/asyncio-eventloop.rst:1809 msgid "" ":meth:`close` should be called before :meth:`abort_clients` when closing the " "server to avoid races with new clients connecting." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1787 +#: ../../../library/asyncio-eventloop.rst:1816 msgid "Return the event loop associated with the server object." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1794 +#: ../../../library/asyncio-eventloop.rst:1823 msgid "Start accepting connections." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1796 +#: ../../../library/asyncio-eventloop.rst:1825 msgid "" "This method is idempotent, so it can be called when the server is already " "serving." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1799 +#: ../../../library/asyncio-eventloop.rst:1828 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 " @@ -2210,106 +2255,106 @@ msgid "" "accepting connections." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1811 +#: ../../../library/asyncio-eventloop.rst:1840 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:1815 +#: ../../../library/asyncio-eventloop.rst:1844 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:1837 +#: ../../../library/asyncio-eventloop.rst:1866 msgid "Return ``True`` if the server is accepting new connections." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1844 +#: ../../../library/asyncio-eventloop.rst:1873 msgid "" "Wait until the :meth:`close` method completes and all active connections " "have finished." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1849 +#: ../../../library/asyncio-eventloop.rst:1878 msgid "" "List of socket-like objects, ``asyncio.trsock.TransportSocket``, which the " "server is listening on." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1852 +#: ../../../library/asyncio-eventloop.rst:1881 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:1862 +#: ../../../library/asyncio-eventloop.rst:1891 msgid "Event loop implementations" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1864 +#: ../../../library/asyncio-eventloop.rst:1893 msgid "" "asyncio ships with two different event loop implementations: :class:" "`SelectorEventLoop` and :class:`ProactorEventLoop`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1867 +#: ../../../library/asyncio-eventloop.rst:1896 msgid "By default asyncio is configured to use :class:`EventLoop`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1872 +#: ../../../library/asyncio-eventloop.rst:1901 msgid "" "A subclass of :class:`AbstractEventLoop` based on the :mod:`selectors` " "module." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1875 +#: ../../../library/asyncio-eventloop.rst:1904 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:1894 +#: ../../../library/asyncio-eventloop.rst:1923 msgid "" "A subclass of :class:`AbstractEventLoop` for Windows that uses \"I/O " "Completion Ports\" (IOCP)." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1900 +#: ../../../library/asyncio-eventloop.rst:1929 msgid "" "`MSDN documentation on I/O Completion Ports `_." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1905 +#: ../../../library/asyncio-eventloop.rst:1934 msgid "" "An alias to the most efficient available subclass of :class:" "`AbstractEventLoop` for the given platform." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1908 +#: ../../../library/asyncio-eventloop.rst:1937 msgid "" "It is an alias to :class:`SelectorEventLoop` on Unix and :class:" "`ProactorEventLoop` on Windows." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1914 +#: ../../../library/asyncio-eventloop.rst:1943 msgid "Abstract base class for asyncio-compliant event loops." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1916 +#: ../../../library/asyncio-eventloop.rst:1945 msgid "" "The :ref:`asyncio-event-loop-methods` section lists all methods that an " "alternative implementation of ``AbstractEventLoop`` should have defined." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1922 +#: ../../../library/asyncio-eventloop.rst:1951 msgid "Examples" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1924 +#: ../../../library/asyncio-eventloop.rst:1953 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." @@ -2317,70 +2362,70 @@ msgid "" "consider using the high-level functions like :func:`asyncio.run`." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1934 +#: ../../../library/asyncio-eventloop.rst:1963 msgid "Hello World with call_soon()" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1936 +#: ../../../library/asyncio-eventloop.rst:1965 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:1960 +#: ../../../library/asyncio-eventloop.rst:1989 msgid "" "A similar :ref:`Hello World ` example created with a coroutine " "and the :func:`run` function." msgstr "" -#: ../../../library/asyncio-eventloop.rst:1967 +#: ../../../library/asyncio-eventloop.rst:1996 msgid "Display the current date with call_later()" msgstr "" -#: ../../../library/asyncio-eventloop.rst:1969 +#: ../../../library/asyncio-eventloop.rst:1998 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:1997 +#: ../../../library/asyncio-eventloop.rst:2026 msgid "" "A similar :ref:`current date ` example created with a " "coroutine and the :func:`run` function." msgstr "" -#: ../../../library/asyncio-eventloop.rst:2004 +#: ../../../library/asyncio-eventloop.rst:2033 msgid "Watch a file descriptor for read events" msgstr "" -#: ../../../library/asyncio-eventloop.rst:2006 +#: ../../../library/asyncio-eventloop.rst:2035 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:2044 +#: ../../../library/asyncio-eventloop.rst:2073 msgid "" "A similar :ref:`example ` using " "transports, protocols, and the :meth:`loop.create_connection` method." msgstr "" -#: ../../../library/asyncio-eventloop.rst:2048 +#: ../../../library/asyncio-eventloop.rst:2077 msgid "" "Another similar :ref:`example ` " "using the high-level :func:`asyncio.open_connection` function and streams." msgstr "" -#: ../../../library/asyncio-eventloop.rst:2056 +#: ../../../library/asyncio-eventloop.rst:2085 msgid "Set signal handlers for SIGINT and SIGTERM" msgstr "" -#: ../../../library/asyncio-eventloop.rst:2058 +#: ../../../library/asyncio-eventloop.rst:2087 msgid "(This ``signal`` example only works on Unix.)" msgstr "" -#: ../../../library/asyncio-eventloop.rst:2060 +#: ../../../library/asyncio-eventloop.rst:2089 msgid "" "Register handlers for signals :const:`~signal.SIGINT` and :const:`~signal." "SIGTERM` using the :meth:`loop.add_signal_handler` method::" diff --git a/main/locale/pot/LC_MESSAGES/library/asyncio-graph.pot b/main/locale/pot/LC_MESSAGES/library/asyncio-graph.pot index 8063f980346..05ac1c86345 100644 --- a/main/locale/pot/LC_MESSAGES/library/asyncio-graph.pot +++ b/main/locale/pot/LC_MESSAGES/library/asyncio-graph.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-11 08:40+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,7 +18,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: ../../../library/asyncio-graph.rst:8 -msgid "Call Graph Introspection" +msgid "Call graph introspection" msgstr "" #: ../../../library/asyncio-graph.rst:10 @@ -33,32 +33,41 @@ msgid "" "within a Python program or by external profilers and debuggers." msgstr "" -#: ../../../library/asyncio-graph.rst:25 +#: ../../../library/asyncio-graph.rst:22 +msgid ":ref:`asyncio-introspection-tools`" +msgstr "" + +#: ../../../library/asyncio-graph.rst:23 +msgid "" +"Command-line tools for inspecting tasks in another running Python process." +msgstr "" + +#: ../../../library/asyncio-graph.rst:31 msgid "" "Print the async call graph for the current task or the provided :class:" "`Task` or :class:`Future`." msgstr "" -#: ../../../library/asyncio-graph.rst:28 +#: ../../../library/asyncio-graph.rst:34 msgid "" "This function prints entries starting from the top frame and going down " "towards the invocation point." msgstr "" -#: ../../../library/asyncio-graph.rst:31 +#: ../../../library/asyncio-graph.rst:37 msgid "" "The function receives an optional *future* argument. If not passed, the " "current running task will be used." msgstr "" -#: ../../../library/asyncio-graph.rst:34 ../../../library/asyncio-graph.rst:93 +#: ../../../library/asyncio-graph.rst:40 ../../../library/asyncio-graph.rst:99 msgid "" "If the function is called on *the current task*, the optional keyword-only " "*depth* argument can be used to skip the specified number of frames from top " "of the stack." msgstr "" -#: ../../../library/asyncio-graph.rst:38 +#: ../../../library/asyncio-graph.rst:44 msgid "" "If the optional keyword-only *limit* argument is provided, each call stack " "in the resulting graph is truncated to include at most ``abs(limit)`` " @@ -69,80 +78,80 @@ msgid "" "is printed." msgstr "" -#: ../../../library/asyncio-graph.rst:46 +#: ../../../library/asyncio-graph.rst:52 msgid "" "If *file* is omitted or ``None``, the function will print to :data:`sys." "stdout`." msgstr "" -#: ../../../library/asyncio-graph.rst:49 +#: ../../../library/asyncio-graph.rst:55 msgid "**Example:**" msgstr "" -#: ../../../library/asyncio-graph.rst:51 +#: ../../../library/asyncio-graph.rst:57 msgid "The following Python code:" msgstr "" -#: ../../../library/asyncio-graph.rst:66 +#: ../../../library/asyncio-graph.rst:72 msgid "will print::" msgstr "" -#: ../../../library/asyncio-graph.rst:79 +#: ../../../library/asyncio-graph.rst:85 msgid "" "Like :func:`print_call_graph`, but returns a string. If *future* is ``None`` " "and there's no current task, the function returns an empty string." msgstr "" -#: ../../../library/asyncio-graph.rst:86 +#: ../../../library/asyncio-graph.rst:92 msgid "" "Capture the async call graph for the current task or the provided :class:" "`Task` or :class:`Future`." msgstr "" -#: ../../../library/asyncio-graph.rst:89 +#: ../../../library/asyncio-graph.rst:95 msgid "" "The function receives an optional *future* argument. If not passed, the " "current running task will be used. If there's no current task, the function " "returns ``None``." msgstr "" -#: ../../../library/asyncio-graph.rst:97 +#: ../../../library/asyncio-graph.rst:103 msgid "Returns a ``FutureCallGraph`` data class object:" msgstr "" -#: ../../../library/asyncio-graph.rst:99 +#: ../../../library/asyncio-graph.rst:105 msgid "``FutureCallGraph(future, call_stack, awaited_by)``" msgstr "" -#: ../../../library/asyncio-graph.rst:101 +#: ../../../library/asyncio-graph.rst:107 msgid "" "Where *future* is a reference to a :class:`Future` or a :class:`Task` (or " "their subclasses.)" msgstr "" -#: ../../../library/asyncio-graph.rst:104 +#: ../../../library/asyncio-graph.rst:110 msgid "``call_stack`` is a tuple of ``FrameCallGraphEntry`` objects." msgstr "" -#: ../../../library/asyncio-graph.rst:106 +#: ../../../library/asyncio-graph.rst:112 msgid "``awaited_by`` is a tuple of ``FutureCallGraph`` objects." msgstr "" -#: ../../../library/asyncio-graph.rst:108 +#: ../../../library/asyncio-graph.rst:114 msgid "``FrameCallGraphEntry(frame)``" msgstr "" -#: ../../../library/asyncio-graph.rst:110 +#: ../../../library/asyncio-graph.rst:116 msgid "" "Where *frame* is a frame object of a regular Python function in the call " "stack." msgstr "" -#: ../../../library/asyncio-graph.rst:115 +#: ../../../library/asyncio-graph.rst:121 msgid "Low level utility functions" msgstr "" -#: ../../../library/asyncio-graph.rst:117 +#: ../../../library/asyncio-graph.rst:123 msgid "" "To introspect an async call graph asyncio requires cooperation from control " "flow structures, such as :func:`shield` or :class:`TaskGroup`. Any time an " @@ -153,24 +162,24 @@ msgid "" "control." msgstr "" -#: ../../../library/asyncio-graph.rst:128 +#: ../../../library/asyncio-graph.rst:134 msgid "Record that *future* is awaited on by *waiter*." msgstr "" -#: ../../../library/asyncio-graph.rst:130 -#: ../../../library/asyncio-graph.rst:143 +#: ../../../library/asyncio-graph.rst:136 +#: ../../../library/asyncio-graph.rst:149 msgid "" "Both *future* and *waiter* must be instances of :class:`Future` or :class:" "`Task` or their subclasses, otherwise the call would have no effect." msgstr "" -#: ../../../library/asyncio-graph.rst:134 +#: ../../../library/asyncio-graph.rst:140 msgid "" "A call to ``future_add_to_awaited_by()`` must be followed by an eventual " "call to the :func:`future_discard_from_awaited_by` function with the same " "arguments." msgstr "" -#: ../../../library/asyncio-graph.rst:141 +#: ../../../library/asyncio-graph.rst:147 msgid "Record that *future* is no longer awaited on by *waiter*." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/asyncio-llapi-index.pot b/main/locale/pot/LC_MESSAGES/library/asyncio-llapi-index.pot index 82f145a73f6..dc460fb7e81 100644 --- a/main/locale/pot/LC_MESSAGES/library/asyncio-llapi-index.pot +++ b/main/locale/pot/LC_MESSAGES/library/asyncio-llapi-index.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-11 08:40+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -42,7 +42,8 @@ msgid ":func:`asyncio.get_event_loop`" msgstr "" #: ../../../library/asyncio-llapi-index.rst:22 -msgid "Get an event loop instance (running or current via the current policy)." +msgid "" +"Get the running event loop or the event loop set for the current thread." msgstr "" #: ../../../library/asyncio-llapi-index.rst:24 @@ -50,7 +51,7 @@ msgid ":func:`asyncio.set_event_loop`" msgstr "" #: ../../../library/asyncio-llapi-index.rst:25 -msgid "Set the event loop as current via the current policy." +msgid "Set the event loop for the current thread." msgstr "" #: ../../../library/asyncio-llapi-index.rst:27 @@ -977,42 +978,3 @@ msgid "" "`~SubprocessProtocol.pipe_data_received` and :meth:`~SubprocessProtocol." "pipe_connection_lost` methods." msgstr "" - -#: ../../../library/asyncio-llapi-index.rst:503 -msgid "Event Loop Policies" -msgstr "" - -#: ../../../library/asyncio-llapi-index.rst:505 -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:511 -msgid "Accessing Policies" -msgstr "" - -#: ../../../library/asyncio-llapi-index.rst:516 -msgid ":meth:`asyncio.get_event_loop_policy`" -msgstr "" - -#: ../../../library/asyncio-llapi-index.rst:517 -msgid "Return the current process-wide policy." -msgstr "" - -#: ../../../library/asyncio-llapi-index.rst:519 -msgid ":meth:`asyncio.set_event_loop_policy`" -msgstr "" - -#: ../../../library/asyncio-llapi-index.rst:520 -msgid "Set a new process-wide policy." -msgstr "" - -#: ../../../library/asyncio-llapi-index.rst:522 -msgid ":class:`AbstractEventLoopPolicy`" -msgstr "" - -#: ../../../library/asyncio-llapi-index.rst:523 -msgid "Base class for policy objects." -msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/asyncio-platforms.pot b/main/locale/pot/LC_MESSAGES/library/asyncio-platforms.pot index e57aced8c45..8fcbb11b873 100644 --- a/main/locale/pot/LC_MESSAGES/library/asyncio-platforms.pot +++ b/main/locale/pot/LC_MESSAGES/library/asyncio-platforms.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-11 08:40+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -38,76 +38,90 @@ msgid "" "monitor file I/O." msgstr "" -#: ../../../library/asyncio-platforms.rst:24 +#: ../../../library/asyncio-platforms.rst:22 +msgid "" +":meth:`loop.connect_read_pipe` and :meth:`loop.connect_write_pipe` cannot be " +"used with regular files. See :ref:`Supported pipe objects ` for the objects that are accepted on each platform." +msgstr "" + +#: ../../../library/asyncio-platforms.rst:29 msgid "Windows" msgstr "" -#: ../../../library/asyncio-platforms.rst:26 +#: ../../../library/asyncio-platforms.rst:31 msgid "" "**Source code:** :source:`Lib/asyncio/proactor_events.py`, :source:`Lib/" "asyncio/windows_events.py`, :source:`Lib/asyncio/windows_utils.py`" msgstr "" -#: ../../../library/asyncio-platforms.rst:34 +#: ../../../library/asyncio-platforms.rst:39 msgid "On Windows, :class:`ProactorEventLoop` is now the default event loop." msgstr "" -#: ../../../library/asyncio-platforms.rst:36 +#: ../../../library/asyncio-platforms.rst:41 msgid "All event loops on Windows do not support the following methods:" msgstr "" -#: ../../../library/asyncio-platforms.rst:38 +#: ../../../library/asyncio-platforms.rst:43 msgid "" ":meth:`loop.create_unix_connection` and :meth:`loop.create_unix_server` are " "not supported. The :const:`socket.AF_UNIX` socket family is specific to Unix." msgstr "" -#: ../../../library/asyncio-platforms.rst:42 +#: ../../../library/asyncio-platforms.rst:47 msgid "" ":meth:`loop.add_signal_handler` and :meth:`loop.remove_signal_handler` are " "not supported." msgstr "" -#: ../../../library/asyncio-platforms.rst:45 +#: ../../../library/asyncio-platforms.rst:50 msgid ":class:`SelectorEventLoop` has the following limitations:" msgstr "" -#: ../../../library/asyncio-platforms.rst:47 +#: ../../../library/asyncio-platforms.rst:52 msgid "" ":class:`~selectors.SelectSelector` is used to wait on socket events: it " "supports sockets and is limited to 512 sockets." msgstr "" -#: ../../../library/asyncio-platforms.rst:50 +#: ../../../library/asyncio-platforms.rst:55 msgid "" ":meth:`loop.add_reader` and :meth:`loop.add_writer` only accept socket " "handles (e.g. pipe file descriptors are not supported)." msgstr "" -#: ../../../library/asyncio-platforms.rst:53 +#: ../../../library/asyncio-platforms.rst:58 msgid "" "Pipes are not supported, so the :meth:`loop.connect_read_pipe` and :meth:" "`loop.connect_write_pipe` methods are not implemented." msgstr "" -#: ../../../library/asyncio-platforms.rst:56 +#: ../../../library/asyncio-platforms.rst:61 msgid "" ":ref:`Subprocesses ` are not supported, i.e. :meth:`loop." "subprocess_exec` and :meth:`loop.subprocess_shell` methods are not " "implemented." msgstr "" -#: ../../../library/asyncio-platforms.rst:60 +#: ../../../library/asyncio-platforms.rst:65 msgid ":class:`ProactorEventLoop` has the following limitations:" msgstr "" -#: ../../../library/asyncio-platforms.rst:62 +#: ../../../library/asyncio-platforms.rst:67 msgid "" "The :meth:`loop.add_reader` and :meth:`loop.add_writer` methods are not " "supported." msgstr "" -#: ../../../library/asyncio-platforms.rst:65 +#: ../../../library/asyncio-platforms.rst:70 +msgid "" +":meth:`loop.connect_read_pipe` and :meth:`loop.connect_write_pipe` only " +"accept a handle opened for overlapped I/O. See :ref:`Supported pipe objects " +"` for which objects are supported." +msgstr "" + +#: ../../../library/asyncio-platforms.rst:74 msgid "" "The resolution of the monotonic clock on Windows is usually around 15.6 " "milliseconds. The best resolution is 0.5 milliseconds. The resolution " @@ -115,29 +129,29 @@ msgid "" "wiki/High_Precision_Event_Timer>`_) and on the Windows configuration." msgstr "" -#: ../../../library/asyncio-platforms.rst:75 +#: ../../../library/asyncio-platforms.rst:84 msgid "Subprocess Support on Windows" msgstr "" -#: ../../../library/asyncio-platforms.rst:77 +#: ../../../library/asyncio-platforms.rst:86 msgid "" "On Windows, the default event loop :class:`ProactorEventLoop` supports " "subprocesses, whereas :class:`SelectorEventLoop` does not." msgstr "" -#: ../../../library/asyncio-platforms.rst:82 +#: ../../../library/asyncio-platforms.rst:91 msgid "macOS" msgstr "" -#: ../../../library/asyncio-platforms.rst:84 +#: ../../../library/asyncio-platforms.rst:93 msgid "Modern macOS versions are fully supported." msgstr "" -#: ../../../library/asyncio-platforms.rst:87 +#: ../../../library/asyncio-platforms.rst:96 msgid "macOS <= 10.8" msgstr "" -#: ../../../library/asyncio-platforms.rst:88 +#: ../../../library/asyncio-platforms.rst:97 msgid "" "On macOS 10.6, 10.7 and 10.8, the default event loop uses :class:`selectors." "KqueueSelector`, which does not support character devices on these " diff --git a/main/locale/pot/LC_MESSAGES/library/asyncio-queue.pot b/main/locale/pot/LC_MESSAGES/library/asyncio-queue.pot index 20f78295787..8ad57089253 100644 --- a/main/locale/pot/LC_MESSAGES/library/asyncio-queue.pot +++ b/main/locale/pot/LC_MESSAGES/library/asyncio-queue.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-22 09:03+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -106,11 +106,16 @@ msgid "" "Return an item if one is immediately available, else raise :exc:`QueueEmpty`." msgstr "" -#: ../../../library/asyncio-queue.rst:77 -msgid "Block until all items in the queue have been received and processed." +#: ../../../library/asyncio-queue.rst:74 +msgid "" +"Raises :exc:`QueueShutDown` if the queue has been shut down and is empty." msgstr "" #: ../../../library/asyncio-queue.rst:79 +msgid "Block until all items in the queue have been received and processed." +msgstr "" + +#: ../../../library/asyncio-queue.rst:81 msgid "" "The count of unfinished tasks goes up whenever an item is added to the " "queue. The count goes down whenever a consumer coroutine calls :meth:" @@ -119,58 +124,58 @@ msgid "" "unblocks." msgstr "" -#: ../../../library/asyncio-queue.rst:88 +#: ../../../library/asyncio-queue.rst:90 msgid "" "Put an item into the queue. If the queue is full, wait until a free slot is " "available before adding the item." msgstr "" -#: ../../../library/asyncio-queue.rst:91 +#: ../../../library/asyncio-queue.rst:93 ../../../library/asyncio-queue.rst:101 msgid "Raises :exc:`QueueShutDown` if the queue has been shut down." msgstr "" -#: ../../../library/asyncio-queue.rst:95 +#: ../../../library/asyncio-queue.rst:97 msgid "Put an item into the queue without blocking." msgstr "" -#: ../../../library/asyncio-queue.rst:97 +#: ../../../library/asyncio-queue.rst:99 msgid "If no free slot is immediately available, raise :exc:`QueueFull`." msgstr "" -#: ../../../library/asyncio-queue.rst:101 +#: ../../../library/asyncio-queue.rst:105 msgid "Return the number of items in the queue." msgstr "" -#: ../../../library/asyncio-queue.rst:105 +#: ../../../library/asyncio-queue.rst:109 msgid "Put a :class:`Queue` instance into a shutdown mode." msgstr "" -#: ../../../library/asyncio-queue.rst:107 +#: ../../../library/asyncio-queue.rst:111 msgid "" "The queue can no longer grow. Future calls to :meth:`~Queue.put` raise :exc:" "`QueueShutDown`. Currently blocked callers of :meth:`~Queue.put` will be " "unblocked and will raise :exc:`QueueShutDown` in the formerly awaiting task." msgstr "" -#: ../../../library/asyncio-queue.rst:112 +#: ../../../library/asyncio-queue.rst:116 msgid "" "If *immediate* is false (the default), the queue can be wound down normally " "with :meth:`~Queue.get` calls to extract tasks that have already been loaded." msgstr "" -#: ../../../library/asyncio-queue.rst:116 +#: ../../../library/asyncio-queue.rst:120 msgid "" "And if :meth:`~Queue.task_done` is called for each remaining task, a " "pending :meth:`~Queue.join` will be unblocked normally." msgstr "" -#: ../../../library/asyncio-queue.rst:119 +#: ../../../library/asyncio-queue.rst:123 msgid "" "Once the queue is empty, future calls to :meth:`~Queue.get` will raise :exc:" "`QueueShutDown`." msgstr "" -#: ../../../library/asyncio-queue.rst:122 +#: ../../../library/asyncio-queue.rst:126 msgid "" "If *immediate* is true, the queue is terminated immediately. The queue is " "drained to be completely empty and the count of unfinished tasks is reduced " @@ -180,88 +185,89 @@ msgid "" "empty." msgstr "" -#: ../../../library/asyncio-queue.rst:130 +#: ../../../library/asyncio-queue.rst:134 msgid "" "Use caution when using :meth:`~Queue.join` with *immediate* set to true. " "This unblocks the join even when no work has been done on the tasks, " "violating the usual invariant for joining a queue." msgstr "" -#: ../../../library/asyncio-queue.rst:138 +#: ../../../library/asyncio-queue.rst:142 msgid "Indicate that a formerly enqueued work item is complete." msgstr "" -#: ../../../library/asyncio-queue.rst:140 +#: ../../../library/asyncio-queue.rst:144 msgid "" "Used by queue consumers. For each :meth:`~Queue.get` used to fetch a work " "item, a subsequent call to :meth:`task_done` tells the queue that the " "processing on the work item is complete." msgstr "" -#: ../../../library/asyncio-queue.rst:144 +#: ../../../library/asyncio-queue.rst:148 msgid "" "If a :meth:`join` is currently blocking, it will resume when all items have " "been processed (meaning that a :meth:`task_done` call was received for every " "item that had been :meth:`~Queue.put` into the queue)." msgstr "" -#: ../../../library/asyncio-queue.rst:149 +#: ../../../library/asyncio-queue.rst:153 msgid "" "Raises :exc:`ValueError` if called more times than there were items placed " "in the queue." msgstr "" -#: ../../../library/asyncio-queue.rst:154 +#: ../../../library/asyncio-queue.rst:158 msgid "Priority Queue" msgstr "" -#: ../../../library/asyncio-queue.rst:158 +#: ../../../library/asyncio-queue.rst:162 msgid "" "A variant of :class:`Queue`; retrieves entries in priority order (lowest " "first)." msgstr "" -#: ../../../library/asyncio-queue.rst:161 +#: ../../../library/asyncio-queue.rst:165 msgid "Entries are typically tuples of the form ``(priority_number, data)``." msgstr "" -#: ../../../library/asyncio-queue.rst:166 +#: ../../../library/asyncio-queue.rst:170 msgid "LIFO Queue" msgstr "" -#: ../../../library/asyncio-queue.rst:170 +#: ../../../library/asyncio-queue.rst:174 msgid "" "A variant of :class:`Queue` that retrieves most recently added entries first " "(last in, first out)." msgstr "" -#: ../../../library/asyncio-queue.rst:175 +#: ../../../library/asyncio-queue.rst:179 msgid "Exceptions" msgstr "" -#: ../../../library/asyncio-queue.rst:179 +#: ../../../library/asyncio-queue.rst:183 msgid "" "This exception is raised when the :meth:`~Queue.get_nowait` method is called " "on an empty queue." msgstr "" -#: ../../../library/asyncio-queue.rst:185 +#: ../../../library/asyncio-queue.rst:189 msgid "" "Exception raised when the :meth:`~Queue.put_nowait` method is called on a " "queue that has reached its *maxsize*." msgstr "" -#: ../../../library/asyncio-queue.rst:191 +#: ../../../library/asyncio-queue.rst:195 msgid "" -"Exception raised when :meth:`~Queue.put` or :meth:`~Queue.get` is called on " -"a queue which has been shut down." +"Exception raised when :meth:`~Queue.put`, :meth:`~Queue.put_nowait`, :meth:" +"`~Queue.get` or :meth:`~Queue.get_nowait` is called on a queue which has " +"been shut down." msgstr "" -#: ../../../library/asyncio-queue.rst:198 +#: ../../../library/asyncio-queue.rst:203 msgid "Examples" msgstr "" -#: ../../../library/asyncio-queue.rst:202 +#: ../../../library/asyncio-queue.rst:207 msgid "" "Queues can be used to distribute workload between several concurrent tasks::" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/asyncio-runner.pot b/main/locale/pot/LC_MESSAGES/library/asyncio-runner.pot index de27a45a8f0..22457db711e 100644 --- a/main/locale/pot/LC_MESSAGES/library/asyncio-runner.pot +++ b/main/locale/pot/LC_MESSAGES/library/asyncio-runner.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-11 08:40+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -45,7 +45,7 @@ msgid "Execute *coro* in an asyncio event loop and return the result." msgstr "" #: ../../../library/asyncio-runner.rst:29 -#: ../../../library/asyncio-runner.rst:121 +#: ../../../library/asyncio-runner.rst:113 msgid "The argument can be any awaitable object." msgstr "" @@ -56,14 +56,14 @@ msgid "" msgstr "" #: ../../../library/asyncio-runner.rst:35 -#: ../../../library/asyncio-runner.rst:131 +#: ../../../library/asyncio-runner.rst:123 msgid "" "This function cannot be called when another asyncio event loop is running in " "the same thread." msgstr "" #: ../../../library/asyncio-runner.rst:38 -#: ../../../library/asyncio-runner.rst:97 +#: ../../../library/asyncio-runner.rst:89 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:" @@ -76,63 +76,55 @@ msgid "" "otherwise :func:`asyncio.new_event_loop` is used. The loop is closed at the " "end. This function should be used as a main entry point for asyncio " "programs, and should ideally only be called once. It is recommended to use " -"*loop_factory* to configure the event loop instead of policies. Passing :" -"class:`asyncio.EventLoop` allows running asyncio without the policy system." +"*loop_factory* to configure the event loop." msgstr "" -#: ../../../library/asyncio-runner.rst:50 +#: ../../../library/asyncio-runner.rst:48 msgid "" "The executor is given a timeout duration of 5 minutes to shutdown. If the " "executor hasn't finished within that duration, a warning is emitted and the " "executor is closed." msgstr "" -#: ../../../library/asyncio-runner.rst:54 +#: ../../../library/asyncio-runner.rst:52 msgid "Example::" msgstr "" -#: ../../../library/asyncio-runner.rst:64 +#: ../../../library/asyncio-runner.rst:62 msgid "Updated to use :meth:`loop.shutdown_default_executor`." msgstr "" -#: ../../../library/asyncio-runner.rst:69 +#: ../../../library/asyncio-runner.rst:67 msgid "" "*debug* is ``None`` by default to respect the global debug mode settings." msgstr "" -#: ../../../library/asyncio-runner.rst:73 +#: ../../../library/asyncio-runner.rst:71 msgid "Added *loop_factory* parameter." msgstr "" -#: ../../../library/asyncio-runner.rst:77 -#: ../../../library/asyncio-runner.rst:136 +#: ../../../library/asyncio-runner.rst:75 +#: ../../../library/asyncio-runner.rst:128 msgid "*coro* can be any awaitable object." msgstr "" -#: ../../../library/asyncio-runner.rst:81 -msgid "" -"The :mod:`!asyncio` policy system is deprecated and will be removed in " -"Python 3.16; from there on, an explicit *loop_factory* is needed to " -"configure the event loop." -msgstr "" - -#: ../../../library/asyncio-runner.rst:87 +#: ../../../library/asyncio-runner.rst:79 msgid "Runner context manager" msgstr "" -#: ../../../library/asyncio-runner.rst:91 +#: ../../../library/asyncio-runner.rst:83 msgid "" "A context manager that simplifies *multiple* async function calls in the " "same context." msgstr "" -#: ../../../library/asyncio-runner.rst:94 +#: ../../../library/asyncio-runner.rst:86 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:101 +#: ../../../library/asyncio-runner.rst:93 msgid "" "*loop_factory* could be used for overriding the loop creation. It is the " "responsibility of the *loop_factory* to set the created loop as the current " @@ -140,62 +132,62 @@ msgid "" "event loop with :func:`asyncio.set_event_loop` if *loop_factory* is ``None``." msgstr "" -#: ../../../library/asyncio-runner.rst:106 +#: ../../../library/asyncio-runner.rst:98 msgid "" "Basically, :func:`asyncio.run` example can be rewritten with the runner " "usage::" msgstr "" -#: ../../../library/asyncio-runner.rst:119 +#: ../../../library/asyncio-runner.rst:111 msgid "Execute *coro* in the embedded event loop." msgstr "" -#: ../../../library/asyncio-runner.rst:123 +#: ../../../library/asyncio-runner.rst:115 msgid "If the argument is a coroutine, it is wrapped in a Task." msgstr "" -#: ../../../library/asyncio-runner.rst:125 +#: ../../../library/asyncio-runner.rst:117 msgid "" "An optional keyword-only *context* argument allows specifying a custom :" "class:`contextvars.Context` for the code to run in. The runner's default " "context is used if context is ``None``." msgstr "" -#: ../../../library/asyncio-runner.rst:129 +#: ../../../library/asyncio-runner.rst:121 msgid "Returns the awaitable's result or raises an exception." msgstr "" -#: ../../../library/asyncio-runner.rst:140 +#: ../../../library/asyncio-runner.rst:132 msgid "Close the runner." msgstr "" -#: ../../../library/asyncio-runner.rst:142 +#: ../../../library/asyncio-runner.rst:134 msgid "" "Finalize asynchronous generators, shutdown default executor, close the event " "loop and release embedded :class:`contextvars.Context`." msgstr "" -#: ../../../library/asyncio-runner.rst:147 +#: ../../../library/asyncio-runner.rst:139 msgid "Return the event loop associated with the runner instance." msgstr "" -#: ../../../library/asyncio-runner.rst:151 +#: ../../../library/asyncio-runner.rst:143 msgid "" ":class:`Runner` uses the lazy initialization strategy, its constructor " "doesn't initialize underlying low-level structures." msgstr "" -#: ../../../library/asyncio-runner.rst:154 +#: ../../../library/asyncio-runner.rst:146 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:159 +#: ../../../library/asyncio-runner.rst:151 msgid "Handling Keyboard Interruption" msgstr "" -#: ../../../library/asyncio-runner.rst:163 +#: ../../../library/asyncio-runner.rst:155 msgid "" "When :const:`signal.SIGINT` is raised by :kbd:`Ctrl-C`, :exc:" "`KeyboardInterrupt` exception is raised in the main thread by default. " @@ -203,26 +195,26 @@ msgid "" "asyncio internals and can hang the program from exiting." msgstr "" -#: ../../../library/asyncio-runner.rst:168 +#: ../../../library/asyncio-runner.rst:160 msgid "" "To mitigate this issue, :mod:`asyncio` handles :const:`signal.SIGINT` as " "follows:" msgstr "" -#: ../../../library/asyncio-runner.rst:170 +#: ../../../library/asyncio-runner.rst:162 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:172 +#: ../../../library/asyncio-runner.rst:164 msgid "" "The :class:`~asyncio.Runner` creates the main task for the passed coroutine " "for its execution." msgstr "" -#: ../../../library/asyncio-runner.rst:174 +#: ../../../library/asyncio-runner.rst:166 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 " @@ -232,7 +224,7 @@ msgid "" "Runner.run` raises :exc:`KeyboardInterrupt`." msgstr "" -#: ../../../library/asyncio-runner.rst:180 +#: ../../../library/asyncio-runner.rst:172 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` " diff --git a/main/locale/pot/LC_MESSAGES/library/asyncio-task.pot b/main/locale/pot/LC_MESSAGES/library/asyncio-task.pot index e16a6b69e51..8908cab2e7e 100644 --- a/main/locale/pot/LC_MESSAGES/library/asyncio-task.pot +++ b/main/locale/pot/LC_MESSAGES/library/asyncio-task.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -250,11 +250,11 @@ msgid "" "tasks, gather them in a collection::" msgstr "" -#: ../../../library/asyncio-task.rst:293 ../../../library/asyncio-task.rst:1239 +#: ../../../library/asyncio-task.rst:293 ../../../library/asyncio-task.rst:1246 msgid "Added the *name* parameter." msgstr "" -#: ../../../library/asyncio-task.rst:296 ../../../library/asyncio-task.rst:1246 +#: ../../../library/asyncio-task.rst:296 ../../../library/asyncio-task.rst:1253 msgid "Added the *context* parameter." msgstr "" @@ -365,7 +365,7 @@ msgstr "" #: ../../../library/asyncio-task.rst:379 msgid "" "pass the task group instance to child tasks via :meth:`create_task`, " -"allowing a child task to conditionally cancel the entire entire group" +"allowing a child task to conditionally cancel the entire group" msgstr "" #: ../../../library/asyncio-task.rst:381 @@ -496,7 +496,7 @@ msgstr "" #: ../../../library/asyncio-task.rst:497 ../../../library/asyncio-task.rst:595 #: ../../../library/asyncio-task.rst:694 ../../../library/asyncio-task.rst:872 -#: ../../../library/asyncio-task.rst:927 ../../../library/asyncio-task.rst:984 +#: ../../../library/asyncio-task.rst:930 ../../../library/asyncio-task.rst:991 msgid "Removed the *loop* parameter." msgstr "" @@ -913,22 +913,28 @@ msgid "" "when a timeout occurs." msgstr "" -#: ../../../library/asyncio-task.rst:930 +#: ../../../library/asyncio-task.rst:927 +msgid "" +"If ``wait()`` is cancelled, the futures in *aws* are not cancelled and " +"continue to run." +msgstr "" + +#: ../../../library/asyncio-task.rst:933 msgid "Passing coroutine objects to ``wait()`` directly is forbidden." msgstr "" -#: ../../../library/asyncio-task.rst:933 ../../../library/asyncio-task.rst:991 +#: ../../../library/asyncio-task.rst:936 ../../../library/asyncio-task.rst:998 msgid "Added support for generators yielding tasks." msgstr "" -#: ../../../library/asyncio-task.rst:939 +#: ../../../library/asyncio-task.rst:942 msgid "" "Run :ref:`awaitable objects ` in the *aws* iterable " "concurrently. The returned object can be iterated to obtain the results of " "the awaitables as they finish." msgstr "" -#: ../../../library/asyncio-task.rst:943 +#: ../../../library/asyncio-task.rst:946 msgid "" "The object returned by ``as_completed()`` can be iterated as an :term:" "`asynchronous iterator` or a plain :term:`iterator`. When asynchronous " @@ -937,20 +943,20 @@ msgid "" "tasks with their results. Example::" msgstr "" -#: ../../../library/asyncio-task.rst:963 +#: ../../../library/asyncio-task.rst:966 msgid "" "During asynchronous iteration, implicitly-created tasks will be yielded for " "supplied awaitables that aren't tasks or futures." msgstr "" -#: ../../../library/asyncio-task.rst:966 +#: ../../../library/asyncio-task.rst:969 msgid "" "When used as a plain iterator, each iteration yields a new coroutine that " "returns the result or raises the exception of the next completed awaitable. " "This pattern is compatible with Python versions older than 3.13::" msgstr "" -#: ../../../library/asyncio-task.rst:980 +#: ../../../library/asyncio-task.rst:983 msgid "" "A :exc:`TimeoutError` is raised if the timeout occurs before all awaitables " "are done. This is raised by the ``async for`` loop during asynchronous " @@ -959,25 +965,32 @@ msgstr "" #: ../../../library/asyncio-task.rst:987 msgid "" +"``as_completed()`` does not cancel the tasks running the supplied " +"awaitables: if a timeout occurs or the iteration is cancelled, the remaining " +"tasks continue to run." +msgstr "" + +#: ../../../library/asyncio-task.rst:994 +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:994 +#: ../../../library/asyncio-task.rst:1001 msgid "" "The result can now be used as either an :term:`asynchronous iterator` or as " "a plain :term:`iterator` (previously it was only a plain iterator)." msgstr "" -#: ../../../library/asyncio-task.rst:1000 +#: ../../../library/asyncio-task.rst:1007 msgid "Running in threads" msgstr "" -#: ../../../library/asyncio-task.rst:1005 +#: ../../../library/asyncio-task.rst:1012 msgid "Asynchronously run function *func* in a separate thread." msgstr "" -#: ../../../library/asyncio-task.rst:1007 +#: ../../../library/asyncio-task.rst:1014 msgid "" "Any \\*args and \\*\\*kwargs supplied for this function are directly passed " "to *func*. Also, the current :class:`contextvars.Context` is propagated, " @@ -985,19 +998,19 @@ msgid "" "separate thread." msgstr "" -#: ../../../library/asyncio-task.rst:1012 +#: ../../../library/asyncio-task.rst:1019 msgid "" "Return a coroutine that can be awaited to get the eventual result of *func*." msgstr "" -#: ../../../library/asyncio-task.rst:1014 +#: ../../../library/asyncio-task.rst:1021 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 run in the main thread. For example::" msgstr "" -#: ../../../library/asyncio-task.rst:1044 +#: ../../../library/asyncio-task.rst:1051 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. " @@ -1005,7 +1018,7 @@ msgid "" "thread without blocking the event loop." msgstr "" -#: ../../../library/asyncio-task.rst:1051 +#: ../../../library/asyncio-task.rst:1058 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 " @@ -1013,89 +1026,89 @@ msgid "" "``asyncio.to_thread()`` can also be used for CPU-bound functions." msgstr "" -#: ../../../library/asyncio-task.rst:1060 +#: ../../../library/asyncio-task.rst:1067 msgid "Scheduling from other threads" msgstr "" -#: ../../../library/asyncio-task.rst:1064 +#: ../../../library/asyncio-task.rst:1071 msgid "Submit a coroutine to the given event loop. Thread-safe." msgstr "" -#: ../../../library/asyncio-task.rst:1066 +#: ../../../library/asyncio-task.rst:1073 msgid "" "Return a :class:`concurrent.futures.Future` to wait for the result from " "another OS thread." msgstr "" -#: ../../../library/asyncio-task.rst:1069 +#: ../../../library/asyncio-task.rst:1076 msgid "" "This function is meant to be called from a different OS thread than the one " "where the event loop is running. Example::" msgstr "" -#: ../../../library/asyncio-task.rst:1092 +#: ../../../library/asyncio-task.rst:1099 msgid "It's also possible to run the other way around. Example::" msgstr "" -#: ../../../library/asyncio-task.rst:1126 +#: ../../../library/asyncio-task.rst:1133 msgid "" "If an exception is raised in the coroutine, the returned Future will be " "notified. It can also be used to cancel the task in the event loop::" msgstr "" -#: ../../../library/asyncio-task.rst:1140 +#: ../../../library/asyncio-task.rst:1147 msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." msgstr "" -#: ../../../library/asyncio-task.rst:1143 +#: ../../../library/asyncio-task.rst:1150 msgid "" "Unlike other asyncio functions this function requires the *loop* argument to " "be passed explicitly." msgstr "" -#: ../../../library/asyncio-task.rst:1150 +#: ../../../library/asyncio-task.rst:1157 msgid "Introspection" msgstr "" -#: ../../../library/asyncio-task.rst:1155 +#: ../../../library/asyncio-task.rst:1162 msgid "" "Return the currently running :class:`Task` instance, or ``None`` if no task " "is running." msgstr "" -#: ../../../library/asyncio-task.rst:1158 +#: ../../../library/asyncio-task.rst:1165 msgid "" "If *loop* is ``None`` :func:`get_running_loop` is used to get the current " "loop." msgstr "" -#: ../../../library/asyncio-task.rst:1166 +#: ../../../library/asyncio-task.rst:1173 msgid "Return a set of not yet finished :class:`Task` objects run by the loop." msgstr "" -#: ../../../library/asyncio-task.rst:1169 +#: ../../../library/asyncio-task.rst:1176 msgid "" "If *loop* is ``None``, :func:`get_running_loop` is used for getting current " "loop." msgstr "" -#: ../../../library/asyncio-task.rst:1177 +#: ../../../library/asyncio-task.rst:1184 msgid "Return ``True`` if *obj* is a coroutine object." msgstr "" -#: ../../../library/asyncio-task.rst:1184 +#: ../../../library/asyncio-task.rst:1191 msgid "Task object" msgstr "" -#: ../../../library/asyncio-task.rst:1188 +#: ../../../library/asyncio-task.rst:1195 msgid "" "A :class:`Future-like ` object that runs a Python :ref:`coroutine " "`. Not thread-safe." msgstr "" -#: ../../../library/asyncio-task.rst:1191 +#: ../../../library/asyncio-task.rst:1198 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 " @@ -1103,21 +1116,21 @@ msgid "" "wrapped coroutine resumes." msgstr "" -#: ../../../library/asyncio-task.rst:1197 +#: ../../../library/asyncio-task.rst:1204 msgid "" "Event loops use cooperative scheduling: an event loop runs one Task at a " "time. While a Task awaits for the completion of a Future, the event loop " "runs other Tasks, callbacks, or performs IO operations." msgstr "" -#: ../../../library/asyncio-task.rst:1202 +#: ../../../library/asyncio-task.rst:1209 msgid "" "Use the high-level :func:`asyncio.create_task` function to create Tasks, or " "the low-level :meth:`loop.create_task` or :func:`ensure_future` functions. " "Manual instantiation of Tasks is discouraged." msgstr "" -#: ../../../library/asyncio-task.rst:1207 +#: ../../../library/asyncio-task.rst:1214 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 " @@ -1125,20 +1138,20 @@ msgid "" "cancellation, the awaited object will be cancelled." msgstr "" -#: ../../../library/asyncio-task.rst:1212 +#: ../../../library/asyncio-task.rst:1219 msgid "" ":meth:`cancelled` can be used to check if the Task was cancelled. The method " "returns ``True`` if the wrapped coroutine did not suppress the :exc:" "`CancelledError` exception and was actually cancelled." msgstr "" -#: ../../../library/asyncio-task.rst:1217 +#: ../../../library/asyncio-task.rst:1224 msgid "" ":class:`asyncio.Task` inherits from :class:`Future` all of its APIs except :" "meth:`Future.set_result` and :meth:`Future.set_exception`." msgstr "" -#: ../../../library/asyncio-task.rst:1221 +#: ../../../library/asyncio-task.rst:1228 msgid "" "An optional keyword-only *context* argument allows specifying a custom :" "class:`contextvars.Context` for the *coro* to run in. If no *context* is " @@ -1146,7 +1159,7 @@ msgid "" "in the copied context." msgstr "" -#: ../../../library/asyncio-task.rst:1226 +#: ../../../library/asyncio-task.rst:1233 msgid "" "An optional keyword-only *eager_start* argument allows eagerly starting the " "execution of the :class:`asyncio.Task` at task creation time. If set to " @@ -1156,104 +1169,104 @@ msgid "" "eagerly and will skip scheduling to the event loop." msgstr "" -#: ../../../library/asyncio-task.rst:1233 +#: ../../../library/asyncio-task.rst:1240 msgid "" "Tasks are :ref:`generic ` over the return type of their wrapped " "coroutines." msgstr "" -#: ../../../library/asyncio-task.rst:1236 +#: ../../../library/asyncio-task.rst:1243 msgid "Added support for the :mod:`contextvars` module." msgstr "" -#: ../../../library/asyncio-task.rst:1242 +#: ../../../library/asyncio-task.rst:1249 msgid "" "Deprecation warning is emitted if *loop* is not specified and there is no " "running event loop." msgstr "" -#: ../../../library/asyncio-task.rst:1249 +#: ../../../library/asyncio-task.rst:1256 msgid "Added the *eager_start* parameter." msgstr "" -#: ../../../library/asyncio-task.rst:1254 +#: ../../../library/asyncio-task.rst:1261 msgid "Return ``True`` if the Task is *done*." msgstr "" -#: ../../../library/asyncio-task.rst:1256 +#: ../../../library/asyncio-task.rst:1263 msgid "" "A Task is *done* when the wrapped coroutine either returned a value, raised " "an exception, or the Task was cancelled." msgstr "" -#: ../../../library/asyncio-task.rst:1261 +#: ../../../library/asyncio-task.rst:1268 msgid "Return the result of the Task." msgstr "" -#: ../../../library/asyncio-task.rst:1263 +#: ../../../library/asyncio-task.rst:1270 msgid "" "If the Task is *done*, the result of the wrapped coroutine is returned (or " "if the coroutine raised an exception, that exception is re-raised.)" msgstr "" -#: ../../../library/asyncio-task.rst:1267 -#: ../../../library/asyncio-task.rst:1281 +#: ../../../library/asyncio-task.rst:1274 +#: ../../../library/asyncio-task.rst:1288 msgid "" "If the Task has been *cancelled*, this method raises a :exc:`CancelledError` " "exception." msgstr "" -#: ../../../library/asyncio-task.rst:1270 +#: ../../../library/asyncio-task.rst:1277 msgid "" "If the Task's result isn't yet available, this method raises an :exc:" "`InvalidStateError` exception." msgstr "" -#: ../../../library/asyncio-task.rst:1275 +#: ../../../library/asyncio-task.rst:1282 msgid "Return the exception of the Task." msgstr "" -#: ../../../library/asyncio-task.rst:1277 +#: ../../../library/asyncio-task.rst:1284 msgid "" "If the wrapped coroutine raised an exception that exception is returned. If " "the wrapped coroutine returned normally this method returns ``None``." msgstr "" -#: ../../../library/asyncio-task.rst:1284 +#: ../../../library/asyncio-task.rst:1291 msgid "" "If the Task isn't *done* yet, this method raises an :exc:`InvalidStateError` " "exception." msgstr "" -#: ../../../library/asyncio-task.rst:1289 +#: ../../../library/asyncio-task.rst:1296 msgid "Add a callback to be run when the Task is *done*." msgstr "" -#: ../../../library/asyncio-task.rst:1291 -#: ../../../library/asyncio-task.rst:1300 +#: ../../../library/asyncio-task.rst:1298 +#: ../../../library/asyncio-task.rst:1307 msgid "This method should only be used in low-level callback-based code." msgstr "" -#: ../../../library/asyncio-task.rst:1293 +#: ../../../library/asyncio-task.rst:1300 msgid "" "See the documentation of :meth:`Future.add_done_callback` for more details." msgstr "" -#: ../../../library/asyncio-task.rst:1298 +#: ../../../library/asyncio-task.rst:1305 msgid "Remove *callback* from the callbacks list." msgstr "" -#: ../../../library/asyncio-task.rst:1302 +#: ../../../library/asyncio-task.rst:1309 msgid "" "See the documentation of :meth:`Future.remove_done_callback` for more " "details." msgstr "" -#: ../../../library/asyncio-task.rst:1307 +#: ../../../library/asyncio-task.rst:1314 msgid "Return the list of stack frames for this Task." msgstr "" -#: ../../../library/asyncio-task.rst:1309 +#: ../../../library/asyncio-task.rst:1316 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, " @@ -1261,15 +1274,15 @@ msgid "" "this returns the list of traceback frames." msgstr "" -#: ../../../library/asyncio-task.rst:1315 +#: ../../../library/asyncio-task.rst:1322 msgid "The frames are always ordered from oldest to newest." msgstr "" -#: ../../../library/asyncio-task.rst:1317 +#: ../../../library/asyncio-task.rst:1324 msgid "Only one stack frame is returned for a suspended coroutine." msgstr "" -#: ../../../library/asyncio-task.rst:1319 +#: ../../../library/asyncio-task.rst:1326 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 " @@ -1278,87 +1291,87 @@ msgid "" "are returned. (This matches the behavior of the traceback module.)" msgstr "" -#: ../../../library/asyncio-task.rst:1328 +#: ../../../library/asyncio-task.rst:1335 msgid "Print the stack or traceback for this Task." msgstr "" -#: ../../../library/asyncio-task.rst:1330 +#: ../../../library/asyncio-task.rst:1337 msgid "" "This produces output similar to that of the traceback module for the frames " "retrieved by :meth:`get_stack`." msgstr "" -#: ../../../library/asyncio-task.rst:1333 +#: ../../../library/asyncio-task.rst:1340 msgid "The *limit* argument is passed to :meth:`get_stack` directly." msgstr "" -#: ../../../library/asyncio-task.rst:1335 +#: ../../../library/asyncio-task.rst:1342 msgid "" "The *file* argument is an I/O stream to which the output is written; by " "default output is written to :data:`sys.stdout`." msgstr "" -#: ../../../library/asyncio-task.rst:1340 +#: ../../../library/asyncio-task.rst:1347 msgid "Return the coroutine object wrapped by the :class:`Task`." msgstr "" -#: ../../../library/asyncio-task.rst:1344 +#: ../../../library/asyncio-task.rst:1351 msgid "" "This will return ``None`` for Tasks which have already completed eagerly. " "See the :ref:`Eager Task Factory `." msgstr "" -#: ../../../library/asyncio-task.rst:1351 +#: ../../../library/asyncio-task.rst:1358 msgid "Newly added eager task execution means result may be ``None``." msgstr "" -#: ../../../library/asyncio-task.rst:1355 +#: ../../../library/asyncio-task.rst:1362 msgid "" "Return the :class:`contextvars.Context` object associated with the task." msgstr "" -#: ../../../library/asyncio-task.rst:1362 +#: ../../../library/asyncio-task.rst:1369 msgid "Return the name of the Task." msgstr "" -#: ../../../library/asyncio-task.rst:1364 +#: ../../../library/asyncio-task.rst:1371 msgid "" "If no name has been explicitly assigned to the Task, the default asyncio " "Task implementation generates a default name during instantiation." msgstr "" -#: ../../../library/asyncio-task.rst:1372 +#: ../../../library/asyncio-task.rst:1379 msgid "Set the name of the Task." msgstr "" -#: ../../../library/asyncio-task.rst:1374 +#: ../../../library/asyncio-task.rst:1381 msgid "" "The *value* argument can be any object, which is then converted to a string." msgstr "" -#: ../../../library/asyncio-task.rst:1377 +#: ../../../library/asyncio-task.rst:1384 msgid "" "In the default Task implementation, the name will be visible in the :func:" "`repr` output of a task object." msgstr "" -#: ../../../library/asyncio-task.rst:1384 +#: ../../../library/asyncio-task.rst:1391 msgid "Request the Task to be cancelled." msgstr "" -#: ../../../library/asyncio-task.rst:1386 +#: ../../../library/asyncio-task.rst:1393 msgid "" "If the Task is already *done* or *cancelled*, return ``False``, otherwise, " "return ``True``." msgstr "" -#: ../../../library/asyncio-task.rst:1389 +#: ../../../library/asyncio-task.rst:1396 msgid "" "The method arranges for a :exc:`CancelledError` exception to be thrown into " "the wrapped coroutine on the next cycle of the event loop." msgstr "" -#: ../../../library/asyncio-task.rst:1392 +#: ../../../library/asyncio-task.rst:1399 msgid "" "The coroutine then has a chance to clean up or even deny the request by " "suppressing the exception with a :keyword:`try` ... ... ``except " @@ -1370,53 +1383,53 @@ msgid "" "addition to catching the exception." msgstr "" -#: ../../../library/asyncio-task.rst:1402 +#: ../../../library/asyncio-task.rst:1409 msgid "" "If the Task being cancelled is currently awaiting on a future-like object, " "that awaited object will also be cancelled. This cancellation propagates " "down the entire chain of awaited objects." msgstr "" -#: ../../../library/asyncio-task.rst:1406 +#: ../../../library/asyncio-task.rst:1413 msgid "Added the *msg* parameter." msgstr "" -#: ../../../library/asyncio-task.rst:1409 +#: ../../../library/asyncio-task.rst:1416 msgid "The ``msg`` parameter is propagated from cancelled task to its awaiter." msgstr "" -#: ../../../library/asyncio-task.rst:1414 +#: ../../../library/asyncio-task.rst:1421 msgid "" "The following example illustrates how coroutines can intercept the " "cancellation request::" msgstr "" -#: ../../../library/asyncio-task.rst:1453 +#: ../../../library/asyncio-task.rst:1460 msgid "Return ``True`` if the Task is *cancelled*." msgstr "" -#: ../../../library/asyncio-task.rst:1455 +#: ../../../library/asyncio-task.rst:1462 msgid "" "The Task is *cancelled* when the cancellation was requested with :meth:" "`cancel` and the wrapped coroutine propagated the :exc:`CancelledError` " "exception thrown into it." msgstr "" -#: ../../../library/asyncio-task.rst:1461 +#: ../../../library/asyncio-task.rst:1468 msgid "Decrement the count of cancellation requests to this Task." msgstr "" -#: ../../../library/asyncio-task.rst:1463 +#: ../../../library/asyncio-task.rst:1470 msgid "Returns the remaining number of cancellation requests." msgstr "" -#: ../../../library/asyncio-task.rst:1465 +#: ../../../library/asyncio-task.rst:1472 msgid "" "Note that once execution of a cancelled task completed, further calls to :" "meth:`uncancel` are ineffective." msgstr "" -#: ../../../library/asyncio-task.rst:1470 +#: ../../../library/asyncio-task.rst:1477 msgid "" "This method is used by asyncio's internals and isn't expected to be used by " "end-user code. In particular, if a Task gets successfully uncancelled, this " @@ -1425,7 +1438,7 @@ msgid "" "respective structured block. For example::" msgstr "" -#: ../../../library/asyncio-task.rst:1488 +#: ../../../library/asyncio-task.rst:1495 msgid "" "While the block with ``make_request()`` and ``make_another_request()`` might " "get cancelled due to the timeout, ``unrelated_code()`` should continue " @@ -1434,14 +1447,14 @@ msgid "" "similar fashion." msgstr "" -#: ../../../library/asyncio-task.rst:1494 +#: ../../../library/asyncio-task.rst:1501 msgid "" "If end-user code is, for some reason, suppressing cancellation by catching :" "exc:`CancelledError`, it needs to call this method to remove the " "cancellation state." msgstr "" -#: ../../../library/asyncio-task.rst:1498 +#: ../../../library/asyncio-task.rst:1505 msgid "" "When this method decrements the cancellation count to zero, the method " "checks if a previous :meth:`cancel` call had arranged for :exc:" @@ -1450,17 +1463,17 @@ msgid "" "``_must_cancel`` flag)." msgstr "" -#: ../../../library/asyncio-task.rst:1504 +#: ../../../library/asyncio-task.rst:1511 msgid "Changed to rescind pending cancellation requests upon reaching zero." msgstr "" -#: ../../../library/asyncio-task.rst:1509 +#: ../../../library/asyncio-task.rst:1516 msgid "" "Return the number of pending cancellation requests to this Task, i.e., the " "number of calls to :meth:`cancel` less the number of :meth:`uncancel` calls." msgstr "" -#: ../../../library/asyncio-task.rst:1513 +#: ../../../library/asyncio-task.rst:1520 msgid "" "Note that if this number is greater than zero but the Task is still " "executing, :meth:`cancelled` will still return ``False``. This is because " @@ -1469,7 +1482,7 @@ msgid "" "to zero." msgstr "" -#: ../../../library/asyncio-task.rst:1519 +#: ../../../library/asyncio-task.rst:1526 msgid "" "This method is used by asyncio's internals and isn't expected to be used by " "end-user code. See :meth:`uncancel` for more details." diff --git a/main/locale/pot/LC_MESSAGES/library/asyncio-tools.pot b/main/locale/pot/LC_MESSAGES/library/asyncio-tools.pot new file mode 100644 index 00000000000..15b42c6dbae --- /dev/null +++ b/main/locale/pot/LC_MESSAGES/library/asyncio-tools.pot @@ -0,0 +1,115 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 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.16\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-07-20 11:48+0000\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" + +#: ../../../library/asyncio-tools.rst:7 +msgid "Command-line introspection tools" +msgstr "" + +#: ../../../library/asyncio-tools.rst:9 +msgid "**Source code:** :source:`Lib/asyncio/tools.py`" +msgstr "" + +#: ../../../library/asyncio-tools.rst:13 +msgid "" +"The :mod:`!asyncio` module can be invoked as a script via ``python -m " +"asyncio`` to inspect the task graph of another running Python process " +"without modifying it or restarting it. The :mod:`!asyncio.tools` submodule " +"implements this interface." +msgstr "" + +#: ../../../library/asyncio-tools.rst:18 +msgid "The following commands inspect the process identified by ``PID``:" +msgstr "" + +#: ../../../library/asyncio-tools.rst:25 +msgid "" +"The commands read the target process state without executing any code in it. " +"They are only available on supported platforms and may require permission to " +"inspect another process. See the :ref:`permission requirements ` for details." +msgstr "" + +#: ../../../library/asyncio-tools.rst:31 +msgid ":ref:`asyncio-graph`" +msgstr "" + +#: ../../../library/asyncio-tools.rst:32 +msgid "" +"Programmatic APIs for inspecting the async call graph of a task or future in " +"the current process." +msgstr "" + +#: ../../../library/asyncio-tools.rst:35 +msgid "" +"The command examples below use this program, which creates a task hierarchy " +"suitable for inspection and prints its process ID:" +msgstr "" + +#: ../../../library/asyncio-tools.rst:38 +msgid "example.py" +msgstr "" + +#: ../../../library/asyncio-tools.rst:67 +msgid "Run the program in one terminal and leave it running:" +msgstr "" + +#: ../../../library/asyncio-tools.rst:74 +msgid "" +"Then pass the printed process ID to the commands from another terminal. " +"Thread IDs, task IDs, file paths, and line numbers vary between runs and " +"source layouts." +msgstr "" + +#: ../../../library/asyncio-tools.rst:81 +msgid "Command-line options" +msgstr "" + +#: ../../../library/asyncio-tools.rst:85 +msgid "" +"Display task and coroutine relationships as a tree. Each task is shown with " +"its full coroutine stack, nested under the task (if any) that is awaiting " +"it. This subcommand is useful for quickly identifying which branch of a " +"task hierarchy is blocked and where in its coroutine stack execution has " +"paused:" +msgstr "" + +#: ../../../library/asyncio-tools.rst:119 +msgid "" +"If the await graph contains a cycle, ``pstree`` reports an error instead of " +"printing a tree. A cycle in the await graph is unusual and typically " +"indicates a programming error:" +msgstr "" + +#: ../../../library/asyncio-tools.rst:132 +msgid "" +"Display a flat table of all pending tasks in the process *PID*. Each row " +"shows the event-loop thread ID, task ID and name, coroutine stack, and the " +"awaiting task's stack, name, and ID, if any." +msgstr "" + +#: ../../../library/asyncio-tools.rst:136 +msgid "" +"This subcommand prints all tasks regardless of whether the await graph " +"contains cycles:" +msgstr "" + +#: ../../../library/asyncio-tools.rst:154 +msgid "" +"Retry failed attempts to inspect the target process up to *N* times. This " +"can help when the target process changes while its state is being read." +msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/asyncio.pot b/main/locale/pot/LC_MESSAGES/library/asyncio.pot index d80d58ace1e..f02068de078 100644 --- a/main/locale/pot/LC_MESSAGES/library/asyncio.pot +++ b/main/locale/pot/LC_MESSAGES/library/asyncio.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,15 +17,19 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../../../library/asyncio.rst:100 +#: ../../../library/asyncio.rst:107 msgid "High-level APIs" msgstr "" -#: ../../../library/asyncio.rst:113 +#: ../../../library/asyncio.rst:119 +msgid "Introspection APIs" +msgstr "" + +#: ../../../library/asyncio.rst:126 msgid "Low-level APIs" msgstr "" -#: ../../../library/asyncio.rst:124 +#: ../../../library/asyncio.rst:136 msgid "Guides and Tutorials" msgstr "" @@ -91,12 +95,27 @@ msgid ":ref:`synchronize ` concurrent code;" msgstr "" #: ../../../library/asyncio.rst:50 +msgid "For **introspection**, asyncio provides APIs and tools for:" +msgstr "" + +#: ../../../library/asyncio.rst:52 +msgid "" +"inspecting the :ref:`async call graph ` of tasks and futures;" +msgstr "" + +#: ../../../library/asyncio.rst:54 +msgid "" +"inspecting tasks in another running Python process with :ref:`command-line " +"tools `;" +msgstr "" + +#: ../../../library/asyncio.rst:57 msgid "" "Additionally, there are **low-level** APIs for *library and framework " "developers* to:" msgstr "" -#: ../../../library/asyncio.rst:53 +#: ../../../library/asyncio.rst:60 msgid "" "create and manage :ref:`event loops `, which provide " "asynchronous APIs for :ref:`networking `, running :ref:" @@ -104,13 +123,13 @@ msgid "" "`, etc;" msgstr "" -#: ../../../library/asyncio.rst:58 +#: ../../../library/asyncio.rst:65 msgid "" "implement efficient protocols using :ref:`transports `;" msgstr "" -#: ../../../library/asyncio.rst:61 +#: ../../../library/asyncio.rst:68 msgid "" ":ref:`bridge ` callback-based libraries and code with async/" "await syntax." @@ -126,43 +145,43 @@ msgid "" "availability` for more information." msgstr "" -#: ../../../library/asyncio.rst:69 +#: ../../../library/asyncio.rst:76 msgid "asyncio REPL" msgstr "" -#: ../../../library/asyncio.rst:70 +#: ../../../library/asyncio.rst:77 msgid "" "You can experiment with an ``asyncio`` concurrent context in the :term:" "`REPL`:" msgstr "" -#: ../../../library/asyncio.rst:82 +#: ../../../library/asyncio.rst:89 msgid "" "This REPL provides limited compatibility with :envvar:`PYTHON_BASIC_REPL`. " "It is recommended that the default REPL is used for full functionality and " "the latest features." msgstr "" -#: ../../../library/asyncio.rst:86 +#: ../../../library/asyncio.rst:93 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_stdin`` with no " "arguments." msgstr "" -#: ../../../library/asyncio.rst:88 +#: ../../../library/asyncio.rst:95 msgid "(also 3.11.10, 3.10.15, 3.9.20, and 3.8.20) Emits audit events." msgstr "" -#: ../../../library/asyncio.rst:91 +#: ../../../library/asyncio.rst:98 msgid "" "Uses PyREPL if possible, in which case :envvar:`PYTHONSTARTUP` is also " "executed. Emits audit events." msgstr "" -#: ../../../library/asyncio.rst:99 +#: ../../../library/asyncio.rst:106 msgid "Reference" msgstr "" -#: ../../../library/asyncio.rst:134 +#: ../../../library/asyncio.rst:146 msgid "The source code for asyncio can be found in :source:`Lib/asyncio/`." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/calendar.pot b/main/locale/pot/LC_MESSAGES/library/calendar.pot index 0bc5172f217..5d76f666068 100644 --- a/main/locale/pot/LC_MESSAGES/library/calendar.pot +++ b/main/locale/pot/LC_MESSAGES/library/calendar.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -416,7 +416,7 @@ msgstr "" #: ../../../library/calendar.rst:405 msgid "" -"Return a header containing abbreviated weekday names. *n* specifies the " +"Return a header containing abbreviated weekday names. *width* specifies the " "width in characters for one weekday." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/codecs.pot b/main/locale/pot/LC_MESSAGES/library/codecs.pot index 26d0a9439cf..0ff4c700800 100644 --- a/main/locale/pot/LC_MESSAGES/library/codecs.pot +++ b/main/locale/pot/LC_MESSAGES/library/codecs.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -401,8 +401,8 @@ msgid "Value" msgstr "" #: ../../../library/codecs.rst:359 ../../../library/codecs.rst:402 -#: ../../../library/codecs.rst:422 ../../../library/codecs.rst:1379 -#: ../../../library/codecs.rst:1459 ../../../library/codecs.rst:1544 +#: ../../../library/codecs.rst:422 ../../../library/codecs.rst:1391 +#: ../../../library/codecs.rst:1479 ../../../library/codecs.rst:1564 msgid "Meaning" msgstr "" @@ -1383,7 +1383,22 @@ msgid "" "platforms." msgstr "" -#: ../../../library/codecs.rst:1092 +#: ../../../library/codecs.rst:1090 +msgid "" +"On platforms that provide the C library's :manpage:`iconv(3)` function (such " +"as those using the GNU C Library), every encoding known to ``iconv`` for " +"which Python has no built-in codec is available as well. Such an encoding is " +"looked up by its ``iconv`` name (for example ``cp1133``). Prefixing the name " +"with ``iconv:`` forces the use of the ``iconv``-based codec even when a " +"built-in codec of the same name exists (for example ``iconv:latin1``), which " +"is mostly useful for testing." +msgstr "" + +#: ../../../library/codecs.rst:1099 +msgid "Added support for encodings provided by the C library's ``iconv``." +msgstr "" + +#: ../../../library/codecs.rst:1104 msgid "" "Some common encodings can bypass the codecs lookup machinery to improve " "performance. These optimization opportunities are only recognized by CPython " @@ -1393,11 +1408,11 @@ msgid "" "Using alternative aliases for these encodings may result in slower execution." msgstr "" -#: ../../../library/codecs.rst:1100 +#: ../../../library/codecs.rst:1112 msgid "Optimization opportunity recognized for us-ascii." msgstr "" -#: ../../../library/codecs.rst:1103 +#: ../../../library/codecs.rst:1115 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 " @@ -1405,961 +1420,961 @@ msgid "" "languages in particular, the following variants typically exist:" msgstr "" -#: ../../../library/codecs.rst:1108 +#: ../../../library/codecs.rst:1120 msgid "an ISO 8859 codeset" msgstr "" -#: ../../../library/codecs.rst:1110 +#: ../../../library/codecs.rst:1122 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:1113 +#: ../../../library/codecs.rst:1125 msgid "an IBM EBCDIC code page" msgstr "" -#: ../../../library/codecs.rst:1115 +#: ../../../library/codecs.rst:1127 msgid "an IBM PC code page, which is ASCII compatible" msgstr "" -#: ../../../library/codecs.rst:1120 ../../../library/codecs.rst:1379 -#: ../../../library/codecs.rst:1459 ../../../library/codecs.rst:1544 +#: ../../../library/codecs.rst:1132 ../../../library/codecs.rst:1391 +#: ../../../library/codecs.rst:1479 ../../../library/codecs.rst:1564 msgid "Codec" msgstr "" -#: ../../../library/codecs.rst:1120 ../../../library/codecs.rst:1379 -#: ../../../library/codecs.rst:1459 ../../../library/codecs.rst:1544 +#: ../../../library/codecs.rst:1132 ../../../library/codecs.rst:1391 +#: ../../../library/codecs.rst:1479 ../../../library/codecs.rst:1564 msgid "Aliases" msgstr "" -#: ../../../library/codecs.rst:1120 +#: ../../../library/codecs.rst:1132 msgid "Languages" msgstr "" -#: ../../../library/codecs.rst:1122 +#: ../../../library/codecs.rst:1134 msgid "ascii" msgstr "" -#: ../../../library/codecs.rst:1122 +#: ../../../library/codecs.rst:1134 msgid "646, us-ascii" msgstr "" -#: ../../../library/codecs.rst:1122 ../../../library/codecs.rst:1128 -#: ../../../library/codecs.rst:1136 +#: ../../../library/codecs.rst:1134 ../../../library/codecs.rst:1140 +#: ../../../library/codecs.rst:1148 msgid "English" msgstr "" -#: ../../../library/codecs.rst:1124 +#: ../../../library/codecs.rst:1136 msgid "big5" msgstr "" -#: ../../../library/codecs.rst:1124 +#: ../../../library/codecs.rst:1136 msgid "big5-tw, csbig5" msgstr "" -#: ../../../library/codecs.rst:1124 ../../../library/codecs.rst:1126 -#: ../../../library/codecs.rst:1185 +#: ../../../library/codecs.rst:1136 ../../../library/codecs.rst:1138 +#: ../../../library/codecs.rst:1197 msgid "Traditional Chinese" msgstr "" -#: ../../../library/codecs.rst:1126 +#: ../../../library/codecs.rst:1138 msgid "big5hkscs" msgstr "" -#: ../../../library/codecs.rst:1126 +#: ../../../library/codecs.rst:1138 msgid "big5-hkscs, hkscs" msgstr "" -#: ../../../library/codecs.rst:1128 +#: ../../../library/codecs.rst:1140 msgid "cp037" msgstr "" -#: ../../../library/codecs.rst:1128 +#: ../../../library/codecs.rst:1140 msgid "IBM037, IBM039" msgstr "" -#: ../../../library/codecs.rst:1130 +#: ../../../library/codecs.rst:1142 msgid "cp273" msgstr "" -#: ../../../library/codecs.rst:1130 +#: ../../../library/codecs.rst:1142 msgid "273, IBM273, csIBM273" msgstr "" -#: ../../../library/codecs.rst:1130 +#: ../../../library/codecs.rst:1142 msgid "German" msgstr "" -#: ../../../library/codecs.rst:1134 +#: ../../../library/codecs.rst:1146 msgid "cp424" msgstr "" -#: ../../../library/codecs.rst:1134 +#: ../../../library/codecs.rst:1146 msgid "EBCDIC-CP-HE, IBM424" msgstr "" -#: ../../../library/codecs.rst:1134 ../../../library/codecs.rst:1154 -#: ../../../library/codecs.rst:1164 ../../../library/codecs.rst:1208 -#: ../../../library/codecs.rst:1271 +#: ../../../library/codecs.rst:1146 ../../../library/codecs.rst:1166 +#: ../../../library/codecs.rst:1176 ../../../library/codecs.rst:1220 +#: ../../../library/codecs.rst:1283 msgid "Hebrew" msgstr "" -#: ../../../library/codecs.rst:1136 +#: ../../../library/codecs.rst:1148 msgid "cp437" msgstr "" -#: ../../../library/codecs.rst:1136 +#: ../../../library/codecs.rst:1148 msgid "437, IBM437" msgstr "" -#: ../../../library/codecs.rst:1138 +#: ../../../library/codecs.rst:1150 msgid "cp500" msgstr "" -#: ../../../library/codecs.rst:1138 +#: ../../../library/codecs.rst:1150 msgid "EBCDIC-CP-BE, EBCDIC-CP-CH, IBM500" msgstr "" -#: ../../../library/codecs.rst:1138 ../../../library/codecs.rst:1147 -#: ../../../library/codecs.rst:1158 ../../../library/codecs.rst:1195 -#: ../../../library/codecs.rst:1202 ../../../library/codecs.rst:1255 -#: ../../../library/codecs.rst:1283 ../../../library/codecs.rst:1311 +#: ../../../library/codecs.rst:1150 ../../../library/codecs.rst:1159 +#: ../../../library/codecs.rst:1170 ../../../library/codecs.rst:1207 +#: ../../../library/codecs.rst:1214 ../../../library/codecs.rst:1267 +#: ../../../library/codecs.rst:1295 ../../../library/codecs.rst:1323 msgid "Western Europe" msgstr "" -#: ../../../library/codecs.rst:1141 +#: ../../../library/codecs.rst:1153 msgid "cp720" msgstr "" -#: ../../../library/codecs.rst:1141 ../../../library/codecs.rst:1168 -#: ../../../library/codecs.rst:1210 ../../../library/codecs.rst:1267 +#: ../../../library/codecs.rst:1153 ../../../library/codecs.rst:1180 +#: ../../../library/codecs.rst:1222 ../../../library/codecs.rst:1279 msgid "Arabic" msgstr "" -#: ../../../library/codecs.rst:1143 +#: ../../../library/codecs.rst:1155 msgid "cp737" msgstr "" -#: ../../../library/codecs.rst:1143 ../../../library/codecs.rst:1174 -#: ../../../library/codecs.rst:1178 ../../../library/codecs.rst:1204 -#: ../../../library/codecs.rst:1269 ../../../library/codecs.rst:1304 +#: ../../../library/codecs.rst:1155 ../../../library/codecs.rst:1186 +#: ../../../library/codecs.rst:1190 ../../../library/codecs.rst:1216 +#: ../../../library/codecs.rst:1281 ../../../library/codecs.rst:1316 msgid "Greek" msgstr "" -#: ../../../library/codecs.rst:1145 +#: ../../../library/codecs.rst:1157 msgid "cp775" msgstr "" -#: ../../../library/codecs.rst:1145 +#: ../../../library/codecs.rst:1157 msgid "IBM775" msgstr "" -#: ../../../library/codecs.rst:1145 ../../../library/codecs.rst:1212 -#: ../../../library/codecs.rst:1279 +#: ../../../library/codecs.rst:1157 ../../../library/codecs.rst:1224 +#: ../../../library/codecs.rst:1291 msgid "Baltic languages" msgstr "" -#: ../../../library/codecs.rst:1147 +#: ../../../library/codecs.rst:1159 msgid "cp850" msgstr "" -#: ../../../library/codecs.rst:1147 +#: ../../../library/codecs.rst:1159 msgid "850, IBM850" msgstr "" -#: ../../../library/codecs.rst:1149 +#: ../../../library/codecs.rst:1161 msgid "cp852" msgstr "" -#: ../../../library/codecs.rst:1149 +#: ../../../library/codecs.rst:1161 msgid "852, IBM852" msgstr "" -#: ../../../library/codecs.rst:1149 ../../../library/codecs.rst:1197 -#: ../../../library/codecs.rst:1258 ../../../library/codecs.rst:1308 +#: ../../../library/codecs.rst:1161 ../../../library/codecs.rst:1209 +#: ../../../library/codecs.rst:1270 ../../../library/codecs.rst:1320 msgid "Central and Eastern Europe" msgstr "" -#: ../../../library/codecs.rst:1151 +#: ../../../library/codecs.rst:1163 msgid "cp855" msgstr "" -#: ../../../library/codecs.rst:1151 +#: ../../../library/codecs.rst:1163 msgid "855, IBM855" msgstr "" -#: ../../../library/codecs.rst:1151 ../../../library/codecs.rst:1199 -#: ../../../library/codecs.rst:1264 ../../../library/codecs.rst:1301 +#: ../../../library/codecs.rst:1163 ../../../library/codecs.rst:1211 +#: ../../../library/codecs.rst:1276 ../../../library/codecs.rst:1313 msgid "Belarusian, Bulgarian, Macedonian, Russian, Serbian" msgstr "" -#: ../../../library/codecs.rst:1154 +#: ../../../library/codecs.rst:1166 msgid "cp856" msgstr "" -#: ../../../library/codecs.rst:1156 +#: ../../../library/codecs.rst:1168 msgid "cp857" msgstr "" -#: ../../../library/codecs.rst:1156 +#: ../../../library/codecs.rst:1168 msgid "857, IBM857" msgstr "" -#: ../../../library/codecs.rst:1156 ../../../library/codecs.rst:1189 -#: ../../../library/codecs.rst:1206 ../../../library/codecs.rst:1273 -#: ../../../library/codecs.rst:1313 +#: ../../../library/codecs.rst:1168 ../../../library/codecs.rst:1201 +#: ../../../library/codecs.rst:1218 ../../../library/codecs.rst:1285 +#: ../../../library/codecs.rst:1325 msgid "Turkish" msgstr "" -#: ../../../library/codecs.rst:1158 +#: ../../../library/codecs.rst:1170 msgid "cp858" msgstr "" -#: ../../../library/codecs.rst:1158 +#: ../../../library/codecs.rst:1170 msgid "858, IBM00858" msgstr "" -#: ../../../library/codecs.rst:1160 +#: ../../../library/codecs.rst:1172 msgid "cp860" msgstr "" -#: ../../../library/codecs.rst:1160 +#: ../../../library/codecs.rst:1172 msgid "860, IBM860" msgstr "" -#: ../../../library/codecs.rst:1160 +#: ../../../library/codecs.rst:1172 msgid "Portuguese" msgstr "" -#: ../../../library/codecs.rst:1162 +#: ../../../library/codecs.rst:1174 msgid "cp861" msgstr "" -#: ../../../library/codecs.rst:1162 +#: ../../../library/codecs.rst:1174 msgid "861, CP-IS, IBM861" msgstr "" -#: ../../../library/codecs.rst:1162 ../../../library/codecs.rst:1306 +#: ../../../library/codecs.rst:1174 ../../../library/codecs.rst:1318 msgid "Icelandic" msgstr "" -#: ../../../library/codecs.rst:1164 +#: ../../../library/codecs.rst:1176 msgid "cp862" msgstr "" -#: ../../../library/codecs.rst:1164 +#: ../../../library/codecs.rst:1176 msgid "862, IBM862" msgstr "" -#: ../../../library/codecs.rst:1166 +#: ../../../library/codecs.rst:1178 msgid "cp863" msgstr "" -#: ../../../library/codecs.rst:1166 +#: ../../../library/codecs.rst:1178 msgid "863, IBM863" msgstr "" -#: ../../../library/codecs.rst:1166 +#: ../../../library/codecs.rst:1178 msgid "Canadian" msgstr "" -#: ../../../library/codecs.rst:1168 +#: ../../../library/codecs.rst:1180 msgid "cp864" msgstr "" -#: ../../../library/codecs.rst:1168 +#: ../../../library/codecs.rst:1180 msgid "IBM864" msgstr "" -#: ../../../library/codecs.rst:1170 +#: ../../../library/codecs.rst:1182 msgid "cp865" msgstr "" -#: ../../../library/codecs.rst:1170 +#: ../../../library/codecs.rst:1182 msgid "865, IBM865" msgstr "" -#: ../../../library/codecs.rst:1170 +#: ../../../library/codecs.rst:1182 msgid "Danish, Norwegian" msgstr "" -#: ../../../library/codecs.rst:1172 +#: ../../../library/codecs.rst:1184 msgid "cp866" msgstr "" -#: ../../../library/codecs.rst:1172 +#: ../../../library/codecs.rst:1184 msgid "866, IBM866" msgstr "" -#: ../../../library/codecs.rst:1172 ../../../library/codecs.rst:1289 +#: ../../../library/codecs.rst:1184 ../../../library/codecs.rst:1301 msgid "Russian" msgstr "" -#: ../../../library/codecs.rst:1174 +#: ../../../library/codecs.rst:1186 msgid "cp869" msgstr "" -#: ../../../library/codecs.rst:1174 +#: ../../../library/codecs.rst:1186 msgid "869, CP-GR, IBM869" msgstr "" -#: ../../../library/codecs.rst:1176 +#: ../../../library/codecs.rst:1188 msgid "cp874" msgstr "" -#: ../../../library/codecs.rst:1176 +#: ../../../library/codecs.rst:1188 msgid "Thai" msgstr "" -#: ../../../library/codecs.rst:1178 +#: ../../../library/codecs.rst:1190 msgid "cp875" msgstr "" -#: ../../../library/codecs.rst:1180 +#: ../../../library/codecs.rst:1192 msgid "cp932" msgstr "" -#: ../../../library/codecs.rst:1180 +#: ../../../library/codecs.rst:1192 msgid "932, ms932, mskanji, ms-kanji, windows-31j" msgstr "" -#: ../../../library/codecs.rst:1180 ../../../library/codecs.rst:1216 -#: ../../../library/codecs.rst:1218 ../../../library/codecs.rst:1220 -#: ../../../library/codecs.rst:1237 ../../../library/codecs.rst:1240 -#: ../../../library/codecs.rst:1245 ../../../library/codecs.rst:1248 -#: ../../../library/codecs.rst:1250 ../../../library/codecs.rst:1318 -#: ../../../library/codecs.rst:1321 ../../../library/codecs.rst:1324 +#: ../../../library/codecs.rst:1192 ../../../library/codecs.rst:1228 +#: ../../../library/codecs.rst:1230 ../../../library/codecs.rst:1232 +#: ../../../library/codecs.rst:1249 ../../../library/codecs.rst:1252 +#: ../../../library/codecs.rst:1257 ../../../library/codecs.rst:1260 +#: ../../../library/codecs.rst:1262 ../../../library/codecs.rst:1330 +#: ../../../library/codecs.rst:1333 ../../../library/codecs.rst:1336 msgid "Japanese" msgstr "" -#: ../../../library/codecs.rst:1183 +#: ../../../library/codecs.rst:1195 msgid "cp949" msgstr "" -#: ../../../library/codecs.rst:1183 +#: ../../../library/codecs.rst:1195 msgid "949, ms949, uhc" msgstr "" -#: ../../../library/codecs.rst:1183 ../../../library/codecs.rst:1222 -#: ../../../library/codecs.rst:1252 ../../../library/codecs.rst:1287 +#: ../../../library/codecs.rst:1195 ../../../library/codecs.rst:1234 +#: ../../../library/codecs.rst:1264 ../../../library/codecs.rst:1299 msgid "Korean" msgstr "" -#: ../../../library/codecs.rst:1185 +#: ../../../library/codecs.rst:1197 msgid "cp950" msgstr "" -#: ../../../library/codecs.rst:1185 +#: ../../../library/codecs.rst:1197 msgid "950, ms950" msgstr "" -#: ../../../library/codecs.rst:1187 +#: ../../../library/codecs.rst:1199 msgid "cp1006" msgstr "" -#: ../../../library/codecs.rst:1187 +#: ../../../library/codecs.rst:1199 msgid "Urdu" msgstr "" -#: ../../../library/codecs.rst:1189 +#: ../../../library/codecs.rst:1201 msgid "cp1026" msgstr "" -#: ../../../library/codecs.rst:1189 +#: ../../../library/codecs.rst:1201 msgid "ibm1026" msgstr "" -#: ../../../library/codecs.rst:1191 +#: ../../../library/codecs.rst:1203 msgid "cp1125" msgstr "" -#: ../../../library/codecs.rst:1191 +#: ../../../library/codecs.rst:1203 msgid "1125, ibm1125, cp866u, ruscii" msgstr "" -#: ../../../library/codecs.rst:1191 ../../../library/codecs.rst:1295 +#: ../../../library/codecs.rst:1203 ../../../library/codecs.rst:1307 msgid "Ukrainian" msgstr "" -#: ../../../library/codecs.rst:1195 +#: ../../../library/codecs.rst:1207 msgid "cp1140" msgstr "" -#: ../../../library/codecs.rst:1195 +#: ../../../library/codecs.rst:1207 msgid "IBM01140" msgstr "" -#: ../../../library/codecs.rst:1197 +#: ../../../library/codecs.rst:1209 msgid "cp1250" msgstr "" -#: ../../../library/codecs.rst:1197 +#: ../../../library/codecs.rst:1209 msgid "windows-1250" msgstr "" -#: ../../../library/codecs.rst:1199 +#: ../../../library/codecs.rst:1211 msgid "cp1251" msgstr "" -#: ../../../library/codecs.rst:1199 +#: ../../../library/codecs.rst:1211 msgid "windows-1251" msgstr "" -#: ../../../library/codecs.rst:1202 +#: ../../../library/codecs.rst:1214 msgid "cp1252" msgstr "" -#: ../../../library/codecs.rst:1202 +#: ../../../library/codecs.rst:1214 msgid "windows-1252" msgstr "" -#: ../../../library/codecs.rst:1204 +#: ../../../library/codecs.rst:1216 msgid "cp1253" msgstr "" -#: ../../../library/codecs.rst:1204 +#: ../../../library/codecs.rst:1216 msgid "windows-1253" msgstr "" -#: ../../../library/codecs.rst:1206 +#: ../../../library/codecs.rst:1218 msgid "cp1254" msgstr "" -#: ../../../library/codecs.rst:1206 +#: ../../../library/codecs.rst:1218 msgid "windows-1254" msgstr "" -#: ../../../library/codecs.rst:1208 +#: ../../../library/codecs.rst:1220 msgid "cp1255" msgstr "" -#: ../../../library/codecs.rst:1208 +#: ../../../library/codecs.rst:1220 msgid "windows-1255" msgstr "" -#: ../../../library/codecs.rst:1210 +#: ../../../library/codecs.rst:1222 msgid "cp1256" msgstr "" -#: ../../../library/codecs.rst:1210 +#: ../../../library/codecs.rst:1222 msgid "windows-1256" msgstr "" -#: ../../../library/codecs.rst:1212 +#: ../../../library/codecs.rst:1224 msgid "cp1257" msgstr "" -#: ../../../library/codecs.rst:1212 +#: ../../../library/codecs.rst:1224 msgid "windows-1257" msgstr "" -#: ../../../library/codecs.rst:1214 +#: ../../../library/codecs.rst:1226 msgid "cp1258" msgstr "" -#: ../../../library/codecs.rst:1214 +#: ../../../library/codecs.rst:1226 msgid "windows-1258" msgstr "" -#: ../../../library/codecs.rst:1214 +#: ../../../library/codecs.rst:1226 msgid "Vietnamese" msgstr "" -#: ../../../library/codecs.rst:1216 +#: ../../../library/codecs.rst:1228 msgid "euc_jp" msgstr "" -#: ../../../library/codecs.rst:1216 +#: ../../../library/codecs.rst:1228 msgid "eucjp, ujis, u-jis" msgstr "" -#: ../../../library/codecs.rst:1218 +#: ../../../library/codecs.rst:1230 msgid "euc_jis_2004" msgstr "" -#: ../../../library/codecs.rst:1218 +#: ../../../library/codecs.rst:1230 msgid "jisx0213, eucjis2004" msgstr "" -#: ../../../library/codecs.rst:1220 +#: ../../../library/codecs.rst:1232 msgid "euc_jisx0213" msgstr "" -#: ../../../library/codecs.rst:1220 +#: ../../../library/codecs.rst:1232 msgid "eucjisx0213" msgstr "" -#: ../../../library/codecs.rst:1222 +#: ../../../library/codecs.rst:1234 msgid "euc_kr" msgstr "" -#: ../../../library/codecs.rst:1222 +#: ../../../library/codecs.rst:1234 msgid "euckr, korean, ksc5601, ks_c-5601, ks_c-5601-1987, ksx1001, ks_x-1001" msgstr "" -#: ../../../library/codecs.rst:1226 +#: ../../../library/codecs.rst:1238 msgid "gb2312" msgstr "" -#: ../../../library/codecs.rst:1226 +#: ../../../library/codecs.rst:1238 msgid "" "chinese, csiso58gb231280, euc-cn, euccn, eucgb2312-cn, gb2312-1980, " "gb2312-80, iso-ir-58" msgstr "" -#: ../../../library/codecs.rst:1226 ../../../library/codecs.rst:1235 +#: ../../../library/codecs.rst:1238 ../../../library/codecs.rst:1247 msgid "Simplified Chinese" msgstr "" -#: ../../../library/codecs.rst:1231 +#: ../../../library/codecs.rst:1243 msgid "gbk" msgstr "" -#: ../../../library/codecs.rst:1231 +#: ../../../library/codecs.rst:1243 msgid "936, cp936, ms936" msgstr "" -#: ../../../library/codecs.rst:1231 ../../../library/codecs.rst:1233 +#: ../../../library/codecs.rst:1243 ../../../library/codecs.rst:1245 msgid "Unified Chinese" msgstr "" -#: ../../../library/codecs.rst:1233 +#: ../../../library/codecs.rst:1245 msgid "gb18030" msgstr "" -#: ../../../library/codecs.rst:1233 +#: ../../../library/codecs.rst:1245 msgid "gb18030-2000" msgstr "" -#: ../../../library/codecs.rst:1235 +#: ../../../library/codecs.rst:1247 msgid "hz" msgstr "" -#: ../../../library/codecs.rst:1235 +#: ../../../library/codecs.rst:1247 msgid "hzgb, hz-gb, hz-gb-2312" msgstr "" -#: ../../../library/codecs.rst:1237 +#: ../../../library/codecs.rst:1249 msgid "iso2022_jp" msgstr "" -#: ../../../library/codecs.rst:1237 +#: ../../../library/codecs.rst:1249 msgid "csiso2022jp, iso2022jp, iso-2022-jp" msgstr "" -#: ../../../library/codecs.rst:1240 +#: ../../../library/codecs.rst:1252 msgid "iso2022_jp_1" msgstr "" -#: ../../../library/codecs.rst:1240 +#: ../../../library/codecs.rst:1252 msgid "iso2022jp-1, iso-2022-jp-1" msgstr "" -#: ../../../library/codecs.rst:1242 +#: ../../../library/codecs.rst:1254 msgid "iso2022_jp_2" msgstr "" -#: ../../../library/codecs.rst:1242 +#: ../../../library/codecs.rst:1254 msgid "iso2022jp-2, iso-2022-jp-2" msgstr "" -#: ../../../library/codecs.rst:1242 +#: ../../../library/codecs.rst:1254 msgid "Japanese, Korean, Simplified Chinese, Western Europe, Greek" msgstr "" -#: ../../../library/codecs.rst:1245 +#: ../../../library/codecs.rst:1257 msgid "iso2022_jp_2004" msgstr "" -#: ../../../library/codecs.rst:1245 +#: ../../../library/codecs.rst:1257 msgid "iso2022jp-2004, iso-2022-jp-2004" msgstr "" -#: ../../../library/codecs.rst:1248 +#: ../../../library/codecs.rst:1260 msgid "iso2022_jp_3" msgstr "" -#: ../../../library/codecs.rst:1248 +#: ../../../library/codecs.rst:1260 msgid "iso2022jp-3, iso-2022-jp-3" msgstr "" -#: ../../../library/codecs.rst:1250 +#: ../../../library/codecs.rst:1262 msgid "iso2022_jp_ext" msgstr "" -#: ../../../library/codecs.rst:1250 +#: ../../../library/codecs.rst:1262 msgid "iso2022jp-ext, iso-2022-jp-ext" msgstr "" -#: ../../../library/codecs.rst:1252 +#: ../../../library/codecs.rst:1264 msgid "iso2022_kr" msgstr "" -#: ../../../library/codecs.rst:1252 +#: ../../../library/codecs.rst:1264 msgid "csiso2022kr, iso2022kr, iso-2022-kr" msgstr "" -#: ../../../library/codecs.rst:1255 +#: ../../../library/codecs.rst:1267 msgid "latin_1" msgstr "" -#: ../../../library/codecs.rst:1255 +#: ../../../library/codecs.rst:1267 msgid "iso-8859-1, iso8859-1, 8859, cp819, latin, latin1, L1" msgstr "" -#: ../../../library/codecs.rst:1258 +#: ../../../library/codecs.rst:1270 msgid "iso8859_2" msgstr "" -#: ../../../library/codecs.rst:1258 +#: ../../../library/codecs.rst:1270 msgid "iso-8859-2, latin2, L2" msgstr "" -#: ../../../library/codecs.rst:1260 +#: ../../../library/codecs.rst:1272 msgid "iso8859_3" msgstr "" -#: ../../../library/codecs.rst:1260 +#: ../../../library/codecs.rst:1272 msgid "iso-8859-3, latin3, L3" msgstr "" -#: ../../../library/codecs.rst:1260 +#: ../../../library/codecs.rst:1272 msgid "Esperanto, Maltese" msgstr "" -#: ../../../library/codecs.rst:1262 +#: ../../../library/codecs.rst:1274 msgid "iso8859_4" msgstr "" -#: ../../../library/codecs.rst:1262 +#: ../../../library/codecs.rst:1274 msgid "iso-8859-4, latin4, L4" msgstr "" -#: ../../../library/codecs.rst:1262 +#: ../../../library/codecs.rst:1274 msgid "Northern Europe" msgstr "" -#: ../../../library/codecs.rst:1264 +#: ../../../library/codecs.rst:1276 msgid "iso8859_5" msgstr "" -#: ../../../library/codecs.rst:1264 +#: ../../../library/codecs.rst:1276 msgid "iso-8859-5, cyrillic" msgstr "" -#: ../../../library/codecs.rst:1267 +#: ../../../library/codecs.rst:1279 msgid "iso8859_6" msgstr "" -#: ../../../library/codecs.rst:1267 +#: ../../../library/codecs.rst:1279 msgid "iso-8859-6, arabic" msgstr "" -#: ../../../library/codecs.rst:1269 +#: ../../../library/codecs.rst:1281 msgid "iso8859_7" msgstr "" -#: ../../../library/codecs.rst:1269 +#: ../../../library/codecs.rst:1281 msgid "iso-8859-7, greek, greek8" msgstr "" -#: ../../../library/codecs.rst:1271 +#: ../../../library/codecs.rst:1283 msgid "iso8859_8" msgstr "" -#: ../../../library/codecs.rst:1271 +#: ../../../library/codecs.rst:1283 msgid "iso-8859-8, hebrew" msgstr "" -#: ../../../library/codecs.rst:1273 +#: ../../../library/codecs.rst:1285 msgid "iso8859_9" msgstr "" -#: ../../../library/codecs.rst:1273 +#: ../../../library/codecs.rst:1285 msgid "iso-8859-9, latin5, L5" msgstr "" -#: ../../../library/codecs.rst:1275 +#: ../../../library/codecs.rst:1287 msgid "iso8859_10" msgstr "" -#: ../../../library/codecs.rst:1275 +#: ../../../library/codecs.rst:1287 msgid "iso-8859-10, latin6, L6" msgstr "" -#: ../../../library/codecs.rst:1275 +#: ../../../library/codecs.rst:1287 msgid "Nordic languages" msgstr "" -#: ../../../library/codecs.rst:1277 +#: ../../../library/codecs.rst:1289 msgid "iso8859_11" msgstr "" -#: ../../../library/codecs.rst:1277 +#: ../../../library/codecs.rst:1289 msgid "iso-8859-11, thai" msgstr "" -#: ../../../library/codecs.rst:1277 +#: ../../../library/codecs.rst:1289 msgid "Thai languages" msgstr "" -#: ../../../library/codecs.rst:1279 +#: ../../../library/codecs.rst:1291 msgid "iso8859_13" msgstr "" -#: ../../../library/codecs.rst:1279 +#: ../../../library/codecs.rst:1291 msgid "iso-8859-13, latin7, L7" msgstr "" -#: ../../../library/codecs.rst:1281 +#: ../../../library/codecs.rst:1293 msgid "iso8859_14" msgstr "" -#: ../../../library/codecs.rst:1281 +#: ../../../library/codecs.rst:1293 msgid "iso-8859-14, latin8, L8" msgstr "" -#: ../../../library/codecs.rst:1281 +#: ../../../library/codecs.rst:1293 msgid "Celtic languages" msgstr "" -#: ../../../library/codecs.rst:1283 +#: ../../../library/codecs.rst:1295 msgid "iso8859_15" msgstr "" -#: ../../../library/codecs.rst:1283 +#: ../../../library/codecs.rst:1295 msgid "iso-8859-15, latin9, L9" msgstr "" -#: ../../../library/codecs.rst:1285 +#: ../../../library/codecs.rst:1297 msgid "iso8859_16" msgstr "" -#: ../../../library/codecs.rst:1285 +#: ../../../library/codecs.rst:1297 msgid "iso-8859-16, latin10, L10" msgstr "" -#: ../../../library/codecs.rst:1285 +#: ../../../library/codecs.rst:1297 msgid "South-Eastern Europe" msgstr "" -#: ../../../library/codecs.rst:1287 +#: ../../../library/codecs.rst:1299 msgid "johab" msgstr "" -#: ../../../library/codecs.rst:1287 +#: ../../../library/codecs.rst:1299 msgid "cp1361, ms1361" msgstr "" -#: ../../../library/codecs.rst:1289 +#: ../../../library/codecs.rst:1301 msgid "koi8_r" msgstr "" -#: ../../../library/codecs.rst:1291 +#: ../../../library/codecs.rst:1303 msgid "koi8_t" msgstr "" -#: ../../../library/codecs.rst:1291 +#: ../../../library/codecs.rst:1303 msgid "Tajik" msgstr "" -#: ../../../library/codecs.rst:1295 +#: ../../../library/codecs.rst:1307 msgid "koi8_u" msgstr "" -#: ../../../library/codecs.rst:1297 +#: ../../../library/codecs.rst:1309 msgid "kz1048" msgstr "" -#: ../../../library/codecs.rst:1297 +#: ../../../library/codecs.rst:1309 msgid "kz_1048, strk1048_2002, rk1048" msgstr "" -#: ../../../library/codecs.rst:1297 ../../../library/codecs.rst:1315 +#: ../../../library/codecs.rst:1309 ../../../library/codecs.rst:1327 msgid "Kazakh" msgstr "" -#: ../../../library/codecs.rst:1301 +#: ../../../library/codecs.rst:1313 msgid "mac_cyrillic" msgstr "" -#: ../../../library/codecs.rst:1301 +#: ../../../library/codecs.rst:1313 msgid "maccyrillic" msgstr "" -#: ../../../library/codecs.rst:1304 +#: ../../../library/codecs.rst:1316 msgid "mac_greek" msgstr "" -#: ../../../library/codecs.rst:1304 +#: ../../../library/codecs.rst:1316 msgid "macgreek" msgstr "" -#: ../../../library/codecs.rst:1306 +#: ../../../library/codecs.rst:1318 msgid "mac_iceland" msgstr "" -#: ../../../library/codecs.rst:1306 +#: ../../../library/codecs.rst:1318 msgid "maciceland" msgstr "" -#: ../../../library/codecs.rst:1308 +#: ../../../library/codecs.rst:1320 msgid "mac_latin2" msgstr "" -#: ../../../library/codecs.rst:1308 +#: ../../../library/codecs.rst:1320 msgid "maclatin2, maccentraleurope, mac_centeuro" msgstr "" -#: ../../../library/codecs.rst:1311 +#: ../../../library/codecs.rst:1323 msgid "mac_roman" msgstr "" -#: ../../../library/codecs.rst:1311 +#: ../../../library/codecs.rst:1323 msgid "macroman, macintosh" msgstr "" -#: ../../../library/codecs.rst:1313 +#: ../../../library/codecs.rst:1325 msgid "mac_turkish" msgstr "" -#: ../../../library/codecs.rst:1313 +#: ../../../library/codecs.rst:1325 msgid "macturkish" msgstr "" -#: ../../../library/codecs.rst:1315 +#: ../../../library/codecs.rst:1327 msgid "ptcp154" msgstr "" -#: ../../../library/codecs.rst:1315 +#: ../../../library/codecs.rst:1327 msgid "csptcp154, pt154, cp154, cyrillic-asian" msgstr "" -#: ../../../library/codecs.rst:1318 +#: ../../../library/codecs.rst:1330 msgid "shift_jis" msgstr "" -#: ../../../library/codecs.rst:1318 +#: ../../../library/codecs.rst:1330 msgid "csshiftjis, shiftjis, sjis, s_jis" msgstr "" -#: ../../../library/codecs.rst:1321 +#: ../../../library/codecs.rst:1333 msgid "shift_jis_2004" msgstr "" -#: ../../../library/codecs.rst:1321 +#: ../../../library/codecs.rst:1333 msgid "shiftjis2004, sjis_2004, sjis2004" msgstr "" -#: ../../../library/codecs.rst:1324 +#: ../../../library/codecs.rst:1336 msgid "shift_jisx0213" msgstr "" -#: ../../../library/codecs.rst:1324 +#: ../../../library/codecs.rst:1336 msgid "shiftjisx0213, sjisx0213, s_jisx0213" msgstr "" -#: ../../../library/codecs.rst:1327 +#: ../../../library/codecs.rst:1339 msgid "utf_32" msgstr "" -#: ../../../library/codecs.rst:1327 +#: ../../../library/codecs.rst:1339 msgid "U32, utf32" msgstr "" -#: ../../../library/codecs.rst:1327 ../../../library/codecs.rst:1329 -#: ../../../library/codecs.rst:1331 ../../../library/codecs.rst:1333 -#: ../../../library/codecs.rst:1335 ../../../library/codecs.rst:1337 #: ../../../library/codecs.rst:1339 ../../../library/codecs.rst:1341 -#: ../../../library/codecs.rst:1343 +#: ../../../library/codecs.rst:1343 ../../../library/codecs.rst:1345 +#: ../../../library/codecs.rst:1347 ../../../library/codecs.rst:1349 +#: ../../../library/codecs.rst:1351 ../../../library/codecs.rst:1353 +#: ../../../library/codecs.rst:1355 msgid "all languages" msgstr "" -#: ../../../library/codecs.rst:1329 +#: ../../../library/codecs.rst:1341 msgid "utf_32_be" msgstr "" -#: ../../../library/codecs.rst:1329 +#: ../../../library/codecs.rst:1341 msgid "UTF-32BE" msgstr "" -#: ../../../library/codecs.rst:1331 +#: ../../../library/codecs.rst:1343 msgid "utf_32_le" msgstr "" -#: ../../../library/codecs.rst:1331 +#: ../../../library/codecs.rst:1343 msgid "UTF-32LE" msgstr "" -#: ../../../library/codecs.rst:1333 +#: ../../../library/codecs.rst:1345 msgid "utf_16" msgstr "" -#: ../../../library/codecs.rst:1333 +#: ../../../library/codecs.rst:1345 msgid "U16, utf16" msgstr "" -#: ../../../library/codecs.rst:1335 +#: ../../../library/codecs.rst:1347 msgid "utf_16_be" msgstr "" -#: ../../../library/codecs.rst:1335 +#: ../../../library/codecs.rst:1347 msgid "UTF-16BE" msgstr "" -#: ../../../library/codecs.rst:1337 +#: ../../../library/codecs.rst:1349 msgid "utf_16_le" msgstr "" -#: ../../../library/codecs.rst:1337 +#: ../../../library/codecs.rst:1349 msgid "UTF-16LE" msgstr "" -#: ../../../library/codecs.rst:1339 +#: ../../../library/codecs.rst:1351 msgid "utf_7" msgstr "" -#: ../../../library/codecs.rst:1339 +#: ../../../library/codecs.rst:1351 msgid "U7, unicode-1-1-utf-7" msgstr "" -#: ../../../library/codecs.rst:1341 +#: ../../../library/codecs.rst:1353 msgid "utf_8" msgstr "" -#: ../../../library/codecs.rst:1341 +#: ../../../library/codecs.rst:1353 msgid "U8, UTF, utf8, cp65001" msgstr "" -#: ../../../library/codecs.rst:1343 +#: ../../../library/codecs.rst:1355 msgid "utf_8_sig" msgstr "" -#: ../../../library/codecs.rst:1343 +#: ../../../library/codecs.rst:1355 msgid "utf8-sig" msgstr "" -#: ../../../library/codecs.rst:1346 +#: ../../../library/codecs.rst:1358 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:1352 +#: ../../../library/codecs.rst:1364 msgid "``cp65001`` is now an alias to ``utf_8``." msgstr "" -#: ../../../library/codecs.rst:1355 +#: ../../../library/codecs.rst:1367 msgid "On Windows, ``cpXXX`` codecs are now available for all code pages." msgstr "" -#: ../../../library/codecs.rst:1360 +#: ../../../library/codecs.rst:1372 msgid "Python Specific Encodings" msgstr "" -#: ../../../library/codecs.rst:1362 +#: ../../../library/codecs.rst:1374 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 " @@ -2369,246 +2384,260 @@ msgid "" "asymmetric codecs, the stated meaning describes the encoding direction." msgstr "" -#: ../../../library/codecs.rst:1370 +#: ../../../library/codecs.rst:1382 msgid "Text Encodings" msgstr "" -#: ../../../library/codecs.rst:1372 +#: ../../../library/codecs.rst:1384 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:1381 +#: ../../../library/codecs.rst:1393 msgid "idna" msgstr "" -#: ../../../library/codecs.rst:1381 +#: ../../../library/codecs.rst:1393 msgid "" "Implement :rfc:`3490`, see also :mod:`encodings.idna`. Only " "``errors='strict'`` is supported." msgstr "" -#: ../../../library/codecs.rst:1387 +#: ../../../library/codecs.rst:1399 msgid "mbcs" msgstr "" -#: ../../../library/codecs.rst:1387 +#: ../../../library/codecs.rst:1399 msgid "ansi, dbcs" msgstr "" -#: ../../../library/codecs.rst:1387 +#: ../../../library/codecs.rst:1399 msgid "" "Windows only: Encode the operand according to the ANSI codepage (CP_ACP)." msgstr "" -#: ../../../library/codecs.rst:1391 +#: ../../../library/codecs.rst:1403 msgid "oem" msgstr "" -#: ../../../library/codecs.rst:1391 +#: ../../../library/codecs.rst:1403 msgid "" "Windows only: Encode the operand according to the OEM codepage (CP_OEMCP)." msgstr "" -#: ../../../library/codecs.rst:1397 +#: ../../../library/codecs.rst:1409 msgid "palmos" msgstr "" -#: ../../../library/codecs.rst:1397 +#: ../../../library/codecs.rst:1409 msgid "Encoding of PalmOS 3.5." msgstr "" -#: ../../../library/codecs.rst:1399 +#: ../../../library/codecs.rst:1411 msgid "punycode" msgstr "" -#: ../../../library/codecs.rst:1399 +#: ../../../library/codecs.rst:1411 msgid "Implement :rfc:`3492`. Stateful codecs are not supported." msgstr "" -#: ../../../library/codecs.rst:1405 +#: ../../../library/codecs.rst:1417 msgid "" "The decoding and encoding algorithms scale poorly, so limit the length of " "untrusted input." msgstr "" -#: ../../../library/codecs.rst:1411 +#: ../../../library/codecs.rst:1423 msgid "raw_unicode_escape" msgstr "" -#: ../../../library/codecs.rst:1411 +#: ../../../library/codecs.rst:1423 msgid "" "Latin-1 encoding with :samp:`\\\\u{XXXX}` and :samp:`\\\\U{XXXXXXXX}` for " "other code points. Existing backslashes are not escaped in any way. It is " "used in the Python pickle protocol." msgstr "" -#: ../../../library/codecs.rst:1421 +#: ../../../library/codecs.rst:1433 msgid "undefined" msgstr "" -#: ../../../library/codecs.rst:1421 +#: ../../../library/codecs.rst:1433 msgid "This Codec should only be used for testing purposes." msgstr "" -#: ../../../library/codecs.rst:1425 +#: ../../../library/codecs.rst:1437 msgid "" "Raise an exception for all conversions, even empty strings. The error " "handler is ignored." msgstr "" -#: ../../../library/codecs.rst:1430 +#: ../../../library/codecs.rst:1442 msgid "unicode_escape" msgstr "" -#: ../../../library/codecs.rst:1430 +#: ../../../library/codecs.rst:1442 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:1442 +#: ../../../library/codecs.rst:1453 +msgid "utf-7-imap" +msgstr "" + +#: ../../../library/codecs.rst:1453 +msgid "mUTF-7" +msgstr "" + +#: ../../../library/codecs.rst:1453 +msgid "" +"Modified UTF-7 encoding of :rfc:`3501` for IMAP4 mailbox names. Only " +"``errors='strict'`` is supported." +msgstr "" + +#: ../../../library/codecs.rst:1462 msgid "\"unicode_internal\" codec is removed." msgstr "" -#: ../../../library/codecs.rst:1449 +#: ../../../library/codecs.rst:1469 msgid "Binary Transforms" msgstr "" -#: ../../../library/codecs.rst:1451 +#: ../../../library/codecs.rst:1471 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:1459 +#: ../../../library/codecs.rst:1479 msgid "Encoder / decoder" msgstr "" -#: ../../../library/codecs.rst:1461 +#: ../../../library/codecs.rst:1481 msgid "base64_codec [#b64]_" msgstr "" -#: ../../../library/codecs.rst:1461 +#: ../../../library/codecs.rst:1481 msgid "base64, base_64" msgstr "" -#: ../../../library/codecs.rst:1461 +#: ../../../library/codecs.rst:1481 msgid "" "Convert the operand to multiline MIME base64 (the result always includes a " "trailing ``'\\n'``)." msgstr "" -#: ../../../library/codecs.rst:1466 +#: ../../../library/codecs.rst:1486 msgid "" "accepts any :term:`bytes-like object` as input for encoding and decoding" msgstr "" -#: ../../../library/codecs.rst:1461 +#: ../../../library/codecs.rst:1481 msgid ":meth:`base64.encodebytes` / :meth:`base64.decodebytes`" msgstr "" -#: ../../../library/codecs.rst:1472 +#: ../../../library/codecs.rst:1492 msgid "bz2_codec" msgstr "" -#: ../../../library/codecs.rst:1472 +#: ../../../library/codecs.rst:1492 msgid "bz2" msgstr "" -#: ../../../library/codecs.rst:1472 +#: ../../../library/codecs.rst:1492 msgid "Compress the operand using bz2." msgstr "" -#: ../../../library/codecs.rst:1472 +#: ../../../library/codecs.rst:1492 msgid ":meth:`bz2.compress` / :meth:`bz2.decompress`" msgstr "" -#: ../../../library/codecs.rst:1475 +#: ../../../library/codecs.rst:1495 msgid "hex_codec" msgstr "" -#: ../../../library/codecs.rst:1475 +#: ../../../library/codecs.rst:1495 msgid "hex" msgstr "" -#: ../../../library/codecs.rst:1475 +#: ../../../library/codecs.rst:1495 msgid "" "Convert the operand to hexadecimal representation, with two digits per byte." msgstr "" -#: ../../../library/codecs.rst:1475 +#: ../../../library/codecs.rst:1495 msgid ":meth:`binascii.b2a_hex` / :meth:`binascii.a2b_hex`" msgstr "" -#: ../../../library/codecs.rst:1480 +#: ../../../library/codecs.rst:1500 msgid "quopri_codec" msgstr "" -#: ../../../library/codecs.rst:1480 +#: ../../../library/codecs.rst:1500 msgid "quopri, quotedprintable, quoted_printable" msgstr "" -#: ../../../library/codecs.rst:1480 +#: ../../../library/codecs.rst:1500 msgid "Convert the operand to MIME quoted printable." msgstr "" -#: ../../../library/codecs.rst:1480 +#: ../../../library/codecs.rst:1500 msgid ":meth:`quopri.encode` with ``quotetabs=True`` / :meth:`quopri.decode`" msgstr "" -#: ../../../library/codecs.rst:1484 +#: ../../../library/codecs.rst:1504 msgid "uu_codec" msgstr "" -#: ../../../library/codecs.rst:1484 +#: ../../../library/codecs.rst:1504 msgid "uu" msgstr "" -#: ../../../library/codecs.rst:1484 +#: ../../../library/codecs.rst:1504 msgid "Convert the operand using uuencode." msgstr "" -#: ../../../library/codecs.rst:1487 +#: ../../../library/codecs.rst:1507 msgid "zlib_codec" msgstr "" -#: ../../../library/codecs.rst:1487 +#: ../../../library/codecs.rst:1507 msgid "zip, zlib" msgstr "" -#: ../../../library/codecs.rst:1487 +#: ../../../library/codecs.rst:1507 msgid "Compress the operand using gzip." msgstr "" -#: ../../../library/codecs.rst:1487 +#: ../../../library/codecs.rst:1507 msgid ":meth:`zlib.compress` / :meth:`zlib.decompress`" msgstr "" -#: ../../../library/codecs.rst:1491 +#: ../../../library/codecs.rst:1511 msgid "" "In addition to :term:`bytes-like objects `, " "``'base64_codec'`` also accepts ASCII-only instances of :class:`str` for " "decoding" msgstr "" -#: ../../../library/codecs.rst:1495 +#: ../../../library/codecs.rst:1515 msgid "Restoration of the binary transforms." msgstr "" -#: ../../../library/codecs.rst:1498 +#: ../../../library/codecs.rst:1518 msgid "Restoration of the aliases for the binary transforms." msgstr "" -#: ../../../library/codecs.rst:1505 +#: ../../../library/codecs.rst:1525 msgid "Standalone Codec Functions" msgstr "" -#: ../../../library/codecs.rst:1507 +#: ../../../library/codecs.rst:1527 msgid "" "The following functions provide encoding and decoding functionality similar " "to codecs, but are not available as named codecs through :func:`codecs." @@ -2617,74 +2646,74 @@ msgid "" "removed in Python 3." msgstr "" -#: ../../../library/codecs.rst:1514 +#: ../../../library/codecs.rst:1534 msgid "" "Encode *input* using escape sequences. Similar to how :func:`repr` on bytes " "produces escaped byte values." msgstr "" -#: ../../../library/codecs.rst:1517 +#: ../../../library/codecs.rst:1537 msgid "*input* must be a :class:`bytes` object." msgstr "" -#: ../../../library/codecs.rst:1519 ../../../library/codecs.rst:1528 +#: ../../../library/codecs.rst:1539 ../../../library/codecs.rst:1548 msgid "" "Returns a tuple ``(output, length)`` where *output* is a :class:`bytes` " "object and *length* is the number of bytes consumed." msgstr "" -#: ../../../library/codecs.rst:1524 +#: ../../../library/codecs.rst:1544 msgid "Decode *input* from escape sequences back to the original bytes." msgstr "" -#: ../../../library/codecs.rst:1526 +#: ../../../library/codecs.rst:1546 msgid "*input* must be a :term:`bytes-like object`." msgstr "" -#: ../../../library/codecs.rst:1535 +#: ../../../library/codecs.rst:1555 msgid "Text Transforms" msgstr "" -#: ../../../library/codecs.rst:1537 +#: ../../../library/codecs.rst:1557 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:1546 +#: ../../../library/codecs.rst:1566 msgid "rot_13" msgstr "" -#: ../../../library/codecs.rst:1546 +#: ../../../library/codecs.rst:1566 msgid "rot13" msgstr "" -#: ../../../library/codecs.rst:1546 +#: ../../../library/codecs.rst:1566 msgid "Return the Caesar-cypher encryption of the operand." msgstr "" -#: ../../../library/codecs.rst:1551 +#: ../../../library/codecs.rst:1571 msgid "Restoration of the ``rot_13`` text transform." msgstr "" -#: ../../../library/codecs.rst:1554 +#: ../../../library/codecs.rst:1574 msgid "Restoration of the ``rot13`` alias." msgstr "" -#: ../../../library/codecs.rst:1559 +#: ../../../library/codecs.rst:1579 msgid ":mod:`!encodings` --- Encodings package" msgstr "" -#: ../../../library/codecs.rst:1564 +#: ../../../library/codecs.rst:1584 msgid "This module implements the following functions:" msgstr "" -#: ../../../library/codecs.rst:1568 +#: ../../../library/codecs.rst:1588 msgid "Normalize encoding name *encoding*." msgstr "" -#: ../../../library/codecs.rst:1570 +#: ../../../library/codecs.rst:1590 msgid "" "Normalization works as follows: all non-alphanumeric characters except the " "dot used for Python package names are collapsed and replaced with a single " @@ -2692,23 +2721,23 @@ msgid "" "-;#'`` becomes ``'_'``." msgstr "" -#: ../../../library/codecs.rst:1575 +#: ../../../library/codecs.rst:1595 msgid "Note that *encoding* should be ASCII only." msgstr "" -#: ../../../library/codecs.rst:1579 +#: ../../../library/codecs.rst:1599 msgid "" "The following functions should not be used directly, except for testing " "purposes; :func:`codecs.lookup` should be used instead." msgstr "" -#: ../../../library/codecs.rst:1585 +#: ../../../library/codecs.rst:1605 msgid "" "Search for the codec module corresponding to the given encoding name " "*encoding*." msgstr "" -#: ../../../library/codecs.rst:1588 +#: ../../../library/codecs.rst:1608 msgid "" "This function first normalizes the *encoding* using :func:" "`normalize_encoding`, then looks for a corresponding alias. It attempts to " @@ -2718,41 +2747,41 @@ msgid "" "the codec is cached and returned." msgstr "" -#: ../../../library/codecs.rst:1595 +#: ../../../library/codecs.rst:1615 msgid "" "If the codec module defines a ``getaliases()`` function any returned aliases " "are registered for future use." msgstr "" -#: ../../../library/codecs.rst:1601 +#: ../../../library/codecs.rst:1621 msgid "" "Search for a Windows code page encoding *encoding* of the form ``cpXXXX``." msgstr "" -#: ../../../library/codecs.rst:1603 +#: ../../../library/codecs.rst:1623 msgid "" "If the code page is valid and supported, return a :class:`codecs.CodecInfo` " "object for it." msgstr "" -#: ../../../library/codecs.rst:1606 ../../../library/codecs.rst:1691 +#: ../../../library/codecs.rst:1626 ../../../library/codecs.rst:1711 msgid "Availability" msgstr "" -#: ../../../library/codecs.rst:1611 +#: ../../../library/codecs.rst:1631 msgid "This module implements the following exception:" msgstr "" -#: ../../../library/codecs.rst:1615 +#: ../../../library/codecs.rst:1635 msgid "Raised when a codec is invalid or incompatible." msgstr "" -#: ../../../library/codecs.rst:1619 +#: ../../../library/codecs.rst:1639 msgid "" ":mod:`!encodings.idna` --- Internationalized Domain Names in Applications" msgstr "" -#: ../../../library/codecs.rst:1624 +#: ../../../library/codecs.rst:1644 msgid "" "This module implements :rfc:`3490` (Internationalized Domain Names in " "Applications) and :rfc:`3492` (Nameprep: A Stringprep Profile for " @@ -2760,13 +2789,13 @@ msgid "" "encoding and :mod:`stringprep`." msgstr "" -#: ../../../library/codecs.rst:1629 +#: ../../../library/codecs.rst:1649 msgid "" "If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the " "third-party :pypi:`idna` module." msgstr "" -#: ../../../library/codecs.rst:1632 +#: ../../../library/codecs.rst:1652 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." @@ -2780,7 +2809,7 @@ msgid "" "presenting them to the user." msgstr "" -#: ../../../library/codecs.rst:1643 +#: ../../../library/codecs.rst:1663 msgid "" "Python supports this conversion in several ways: the ``idna`` codec " "performs conversion between Unicode and ACE, separating an input string into " @@ -2797,14 +2826,14 @@ msgid "" "sends that field at all)." msgstr "" -#: ../../../library/codecs.rst:1656 +#: ../../../library/codecs.rst:1676 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:1660 +#: ../../../library/codecs.rst:1680 msgid "" "The module :mod:`!encodings.idna` also implements the nameprep procedure, " "which performs certain normalizations on host names, to achieve case-" @@ -2812,45 +2841,45 @@ msgid "" "characters. The nameprep functions can be used directly if desired." msgstr "" -#: ../../../library/codecs.rst:1668 +#: ../../../library/codecs.rst:1688 msgid "" "Return the nameprepped version of *label*. The implementation currently " "assumes query strings, so ``AllowUnassigned`` is true." msgstr "" -#: ../../../library/codecs.rst:1674 +#: ../../../library/codecs.rst:1694 msgid "" "Convert a label to ASCII, as specified in :rfc:`3490`. ``UseSTD3ASCIIRules`` " "is assumed to be false." msgstr "" -#: ../../../library/codecs.rst:1680 +#: ../../../library/codecs.rst:1700 msgid "Convert a label to Unicode, as specified in :rfc:`3490`." msgstr "" -#: ../../../library/codecs.rst:1684 +#: ../../../library/codecs.rst:1704 msgid ":mod:`!encodings.mbcs` --- Windows ANSI codepage" msgstr "" -#: ../../../library/codecs.rst:1689 +#: ../../../library/codecs.rst:1709 msgid "This module implements the ANSI codepage (CP_ACP)." msgstr "" -#: ../../../library/codecs.rst:1693 +#: ../../../library/codecs.rst:1713 msgid "" "Before 3.2, the *errors* argument was ignored; ``'replace'`` was always used " "to encode, and ``'ignore'`` to decode." msgstr "" -#: ../../../library/codecs.rst:1697 +#: ../../../library/codecs.rst:1717 msgid "Support any error handler." msgstr "" -#: ../../../library/codecs.rst:1702 +#: ../../../library/codecs.rst:1722 msgid ":mod:`!encodings.utf_8_sig` --- UTF-8 codec with BOM signature" msgstr "" -#: ../../../library/codecs.rst:1707 +#: ../../../library/codecs.rst:1727 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 " diff --git a/main/locale/pot/LC_MESSAGES/library/compression.zstd.pot b/main/locale/pot/LC_MESSAGES/library/compression.zstd.pot index c183ecbc2b6..3fcbfbc585c 100644 --- a/main/locale/pot/LC_MESSAGES/library/compression.zstd.pot +++ b/main/locale/pot/LC_MESSAGES/library/compression.zstd.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -679,7 +679,7 @@ msgstr "" #: ../../../library/compression.zstd.rst:506 msgid "" -"Parameters are optional; any omitted parameter will have it's value selected " +"Parameters are optional; any omitted parameter will have its value selected " "automatically." msgstr "" @@ -975,7 +975,7 @@ msgstr "" msgid "" "An :class:`~enum.IntEnum` containing the advanced decompression parameter " "keys that can be used when decompressing data. Parameters are optional; any " -"omitted parameter will have it's value selected automatically." +"omitted parameter will have its value selected automatically." msgstr "" #: ../../../library/compression.zstd.rst:740 diff --git a/main/locale/pot/LC_MESSAGES/library/concurrent.futures.pot b/main/locale/pot/LC_MESSAGES/library/concurrent.futures.pot index f5b43aea75c..3d354fad68e 100644 --- a/main/locale/pot/LC_MESSAGES/library/concurrent.futures.pot +++ b/main/locale/pot/LC_MESSAGES/library/concurrent.futures.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-23 09:36+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -236,7 +236,7 @@ msgid "" msgstr "" #: ../../../library/concurrent.futures.rst:195 -#: ../../../library/concurrent.futures.rst:405 +#: ../../../library/concurrent.futures.rst:400 msgid "Added the *initializer* and *initargs* arguments." msgstr "" @@ -450,14 +450,7 @@ msgid "" "with the \"fork\" start method." msgstr "" -#: ../../../library/concurrent.futures.rst:390 -msgid "" -"Bugs have been reported when using the *max_tasks_per_child* feature that " -"can result in the :class:`ProcessPoolExecutor` hanging in some " -"circumstances. Follow its eventual resolution in :gh:`115634`." -msgstr "" - -#: ../../../library/concurrent.futures.rst:394 +#: ../../../library/concurrent.futures.rst:389 msgid "" "When one of the worker processes terminates abruptly, a :exc:`~concurrent." "futures.process.BrokenProcessPool` error is now raised. Previously, " @@ -465,19 +458,19 @@ msgid "" "often freeze or deadlock." msgstr "" -#: ../../../library/concurrent.futures.rst:401 +#: ../../../library/concurrent.futures.rst:396 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:407 +#: ../../../library/concurrent.futures.rst:402 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:411 +#: ../../../library/concurrent.futures.rst:406 msgid "" "On POSIX systems, if your application has multiple threads and the :mod:" "`multiprocessing` context uses the ``\"fork\"`` start method: The :func:`os." @@ -486,13 +479,13 @@ msgid "" "start method. See the :func:`os.fork` documentation for further explanation." msgstr "" -#: ../../../library/concurrent.futures.rst:419 +#: ../../../library/concurrent.futures.rst:414 msgid "" "*max_workers* uses :func:`os.process_cpu_count` by default, instead of :func:" "`os.cpu_count`." msgstr "" -#: ../../../library/concurrent.futures.rst:423 +#: ../../../library/concurrent.futures.rst:418 msgid "" "The default process start method (see :ref:`multiprocessing-start-methods`) " "changed away from *fork*. If you require the *fork* start method for :class:" @@ -500,6 +493,13 @@ msgid "" "get_context(\"fork\")``." msgstr "" +#: ../../../library/concurrent.futures.rst:424 +msgid "" +"Fixed a deadlock (:gh:`115634`) where the executor could hang after a worker " +"process exited upon reaching its *max_tasks_per_child* limit while tasks " +"remained queued." +msgstr "" + #: ../../../library/concurrent.futures.rst:431 msgid "" "Attempt to terminate all living worker processes immediately by calling :" diff --git a/main/locale/pot/LC_MESSAGES/library/concurrent.interpreters.pot b/main/locale/pot/LC_MESSAGES/library/concurrent.interpreters.pot index 09d12b484ff..946f69952f8 100644 --- a/main/locale/pot/LC_MESSAGES/library/concurrent.interpreters.pot +++ b/main/locale/pot/LC_MESSAGES/library/concurrent.interpreters.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -44,8 +44,8 @@ msgstr "" msgid "" "For concurrency, interpreters themselves (and this module) don't provide " "much more than isolation, which on its own isn't useful. Actual concurrency " -"is available separately through :mod:`threads ` See `below " -"`_" +"is available separately through :mod:`threads ` -- see `below " +"`_." msgstr "" #: ../../../library/concurrent.interpreters.rst:28 diff --git a/main/locale/pot/LC_MESSAGES/library/csv.pot b/main/locale/pot/LC_MESSAGES/library/csv.pot index 1f2dc417845..ac6f93c8bae 100644 --- a/main/locale/pot/LC_MESSAGES/library/csv.pot +++ b/main/locale/pot/LC_MESSAGES/library/csv.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -95,12 +95,16 @@ msgid "" "are transformed into floats)." msgstr "" -#: ../../../library/csv.rst:74 ../../../library/csv.rst:104 -#: ../../../library/csv.rst:180 ../../../library/csv.rst:218 +#: ../../../library/csv.rst:74 ../../../library/csv.rst:111 +#: ../../../library/csv.rst:194 ../../../library/csv.rst:240 msgid "A short usage example::" msgstr "" -#: ../../../library/csv.rst:87 +#: ../../../library/csv.rst:84 +msgid "where :file:`eggs.csv` contains:" +msgstr "" + +#: ../../../library/csv.rst:94 msgid "" "Return a writer object responsible for converting the user's data into " "delimited strings on the given file-like object. *csvfile* can be any " @@ -120,7 +124,11 @@ msgid "" "other non-string data are stringified with :func:`str` before being written." msgstr "" -#: ../../../library/csv.rst:116 +#: ../../../library/csv.rst:120 +msgid "which writes :file:`eggs.csv` containing:" +msgstr "" + +#: ../../../library/csv.rst:130 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 " @@ -129,41 +137,41 @@ msgid "" "parameters, see section :ref:`csv-fmt-params`." msgstr "" -#: ../../../library/csv.rst:125 +#: ../../../library/csv.rst:139 msgid "" "Delete the dialect associated with *name* from the dialect registry. An :" "exc:`Error` is raised if *name* is not a registered dialect name." msgstr "" -#: ../../../library/csv.rst:131 +#: ../../../library/csv.rst:145 msgid "" "Return the dialect associated with *name*. An :exc:`Error` is raised if " "*name* is not a registered dialect name. This function returns an " "immutable :class:`Dialect`." msgstr "" -#: ../../../library/csv.rst:137 +#: ../../../library/csv.rst:151 msgid "Return the names of all registered dialects." msgstr "" -#: ../../../library/csv.rst:143 +#: ../../../library/csv.rst:157 msgid "" "Returns the current maximum field size allowed by the parser. If *new_limit* " "is given, this becomes the new limit." msgstr "" -#: ../../../library/csv.rst:147 +#: ../../../library/csv.rst:161 msgid "The :mod:`!csv` module defines the following classes:" msgstr "" -#: ../../../library/csv.rst:152 +#: ../../../library/csv.rst:166 msgid "" "Create an object that operates like a regular reader but maps the " "information in each row to a :class:`dict` whose keys are given by the " "optional *fieldnames* parameter." msgstr "" -#: ../../../library/csv.rst:156 +#: ../../../library/csv.rst:170 msgid "" "The *fieldnames* parameter is a :term:`sequence`. If *fieldnames* is " "omitted, the values in the first row of file *f* will be used as the " @@ -173,7 +181,7 @@ msgid "" "preserves their original ordering." msgstr "" -#: ../../../library/csv.rst:163 +#: ../../../library/csv.rst:177 msgid "" "If a row has more fields than fieldnames, the remaining data is put in a " "list and stored with the fieldname specified by *restkey* (which defaults to " @@ -182,27 +190,31 @@ msgid "" "``None``)." msgstr "" -#: ../../../library/csv.rst:169 +#: ../../../library/csv.rst:183 msgid "" "All other optional or keyword arguments are passed to the underlying :class:" "`reader` instance." msgstr "" -#: ../../../library/csv.rst:172 ../../../library/csv.rst:216 +#: ../../../library/csv.rst:186 ../../../library/csv.rst:238 msgid "" "If the argument passed to *fieldnames* is an iterator, it will be coerced to " "a :class:`list`." msgstr "" -#: ../../../library/csv.rst:174 +#: ../../../library/csv.rst:188 msgid "Returned rows are now of type :class:`OrderedDict`." msgstr "" -#: ../../../library/csv.rst:177 +#: ../../../library/csv.rst:191 msgid "Returned rows are now of type :class:`dict`." msgstr "" -#: ../../../library/csv.rst:198 +#: ../../../library/csv.rst:208 +msgid "where :file:`names.csv` contains:" +msgstr "" + +#: ../../../library/csv.rst:220 msgid "" "Create an object which operates like a regular writer but maps dictionaries " "onto output rows. The *fieldnames* parameter is a :mod:`sequence " @@ -218,13 +230,17 @@ msgid "" "to the underlying :class:`writer` instance." msgstr "" -#: ../../../library/csv.rst:213 +#: ../../../library/csv.rst:235 msgid "" "Note that unlike the :class:`DictReader` class, the *fieldnames* parameter " "of the :class:`DictWriter` class is not optional." msgstr "" -#: ../../../library/csv.rst:234 +#: ../../../library/csv.rst:253 +msgid "which writes :file:`names.csv` containing:" +msgstr "" + +#: ../../../library/csv.rst:265 msgid "" "The :class:`Dialect` class is a container class whose attributes contain " "information for how to handle doublequotes, whitespace, delimiters, etc. Due " @@ -233,49 +249,49 @@ msgid "" "`reader` and :class:`writer` instances behave." msgstr "" -#: ../../../library/csv.rst:240 +#: ../../../library/csv.rst:271 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 "" -#: ../../../library/csv.rst:252 +#: ../../../library/csv.rst:283 msgid "" "The :class:`excel` class defines the usual properties of an Excel-generated " "CSV file. It is registered with the dialect name ``'excel'``." msgstr "" -#: ../../../library/csv.rst:258 +#: ../../../library/csv.rst:289 msgid "" "The :class:`excel_tab` class defines the usual properties of an Excel-" "generated TAB-delimited file. It is registered with the dialect name " "``'excel-tab'``." msgstr "" -#: ../../../library/csv.rst:264 +#: ../../../library/csv.rst:295 msgid "" "The :class:`unix_dialect` class defines the usual properties of a CSV file " "generated on UNIX systems, i.e. using ``'\\n'`` as line terminator and " "quoting all fields. It is registered with the dialect name ``'unix'``." msgstr "" -#: ../../../library/csv.rst:273 +#: ../../../library/csv.rst:304 msgid "The :class:`Sniffer` class is used to deduce the format of a CSV file." msgstr "" -#: ../../../library/csv.rst:275 +#: ../../../library/csv.rst:306 msgid "The :class:`Sniffer` class provides two methods:" msgstr "" -#: ../../../library/csv.rst:279 +#: ../../../library/csv.rst:310 msgid "" "Analyze the given *sample* and return a :class:`Dialect` subclass reflecting " "the parameters found. If the optional *delimiters* parameter is given, it " "is interpreted as a string containing possible valid delimiter characters." msgstr "" -#: ../../../library/csv.rst:287 +#: ../../../library/csv.rst:318 msgid "" "Analyze the sample text (presumed to be in CSV format) and return :const:" "`True` if the first row appears to be a series of column headers. Inspecting " @@ -283,58 +299,58 @@ msgid "" "sample contains a header:" msgstr "" -#: ../../../library/csv.rst:292 +#: ../../../library/csv.rst:323 msgid "the second through n-th rows contain numeric values" msgstr "" -#: ../../../library/csv.rst:293 +#: ../../../library/csv.rst:324 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 "" -#: ../../../library/csv.rst:296 +#: ../../../library/csv.rst:327 msgid "" "Twenty-one rows after the header are sampled; if more than half of the " "columns + rows meet the criteria, :const:`True` is returned." msgstr "" -#: ../../../library/csv.rst:301 +#: ../../../library/csv.rst:332 msgid "" "This method is a rough heuristic and may produce both false positives and " "negatives." msgstr "" -#: ../../../library/csv.rst:304 +#: ../../../library/csv.rst:335 msgid "An example for :class:`Sniffer` use::" msgstr "" -#: ../../../library/csv.rst:315 +#: ../../../library/csv.rst:346 msgid "The :mod:`!csv` module defines the following constants:" msgstr "" -#: ../../../library/csv.rst:319 +#: ../../../library/csv.rst:350 msgid "Instructs :class:`writer` objects to quote all fields." msgstr "" -#: ../../../library/csv.rst:324 +#: ../../../library/csv.rst:355 msgid "" "Instructs :class:`writer` objects to only quote those fields which contain " "special characters such as *delimiter*, *quotechar*, ``'\\r'``, ``'\\n'`` or " "any of the characters in *lineterminator*." msgstr "" -#: ../../../library/csv.rst:331 +#: ../../../library/csv.rst:362 msgid "Instructs :class:`writer` objects to quote all non-numeric fields." msgstr "" -#: ../../../library/csv.rst:333 +#: ../../../library/csv.rst:364 msgid "" "Instructs :class:`reader` objects to convert all non-quoted fields to type :" "class:`float`." msgstr "" -#: ../../../library/csv.rst:336 +#: ../../../library/csv.rst:367 msgid "" "Some numeric types, such as :class:`bool`, :class:`~fractions.Fraction`, or :" "class:`~enum.IntEnum`, have a string representation that cannot be converted " @@ -342,7 +358,7 @@ msgid "" "data:`QUOTE_STRINGS` modes." msgstr "" -#: ../../../library/csv.rst:344 +#: ../../../library/csv.rst:375 msgid "" "Instructs :class:`writer` objects to never quote fields. When the current " "*delimiter*, *quotechar*, *escapechar*, ``'\\r'``, ``'\\n'`` or any of the " @@ -352,51 +368,51 @@ msgid "" "Set *quotechar* to ``None`` to prevent its escaping." msgstr "" -#: ../../../library/csv.rst:352 +#: ../../../library/csv.rst:383 msgid "" "Instructs :class:`reader` objects to perform no special processing of quote " "characters." msgstr "" -#: ../../../library/csv.rst:356 +#: ../../../library/csv.rst:387 msgid "" "Instructs :class:`writer` objects to quote all fields which are not " "``None``. This is similar to :data:`QUOTE_ALL`, except that if a field " "value is ``None`` an empty (unquoted) string is written." msgstr "" -#: ../../../library/csv.rst:360 +#: ../../../library/csv.rst:391 msgid "" "Instructs :class:`reader` objects to interpret an empty (unquoted) field as " "``None`` and to otherwise behave as :data:`QUOTE_ALL`." msgstr "" -#: ../../../library/csv.rst:367 +#: ../../../library/csv.rst:398 msgid "" "Instructs :class:`writer` objects to always place quotes around fields which " "are strings. This is similar to :data:`QUOTE_NONNUMERIC`, except that if a " "field value is ``None`` an empty (unquoted) string is written." msgstr "" -#: ../../../library/csv.rst:371 +#: ../../../library/csv.rst:402 msgid "" "Instructs :class:`reader` objects to interpret an empty (unquoted) string as " "``None`` and to otherwise behave as :data:`QUOTE_NONNUMERIC`." msgstr "" -#: ../../../library/csv.rst:376 +#: ../../../library/csv.rst:407 msgid "The :mod:`!csv` module defines the following exception:" msgstr "" -#: ../../../library/csv.rst:381 +#: ../../../library/csv.rst:412 msgid "Raised by any of the functions when an error is detected." msgstr "" -#: ../../../library/csv.rst:386 +#: ../../../library/csv.rst:417 msgid "Dialects and Formatting Parameters" msgstr "" -#: ../../../library/csv.rst:388 +#: ../../../library/csv.rst:419 msgid "" "To make it easier to specify the format of input and output records, " "specific formatting parameters are grouped together into dialects. A " @@ -409,16 +425,16 @@ msgid "" "attributes defined below for the :class:`Dialect` class." msgstr "" -#: ../../../library/csv.rst:398 +#: ../../../library/csv.rst:429 msgid "Dialects support the following attributes:" msgstr "" -#: ../../../library/csv.rst:403 +#: ../../../library/csv.rst:434 msgid "" "A one-character string used to separate fields. It defaults to ``','``." msgstr "" -#: ../../../library/csv.rst:408 +#: ../../../library/csv.rst:439 msgid "" "Controls how instances of *quotechar* appearing inside a field should " "themselves be quoted. When :const:`True`, the character is doubled. When :" @@ -426,57 +442,57 @@ msgid "" "defaults to :const:`True`." msgstr "" -#: ../../../library/csv.rst:413 +#: ../../../library/csv.rst:444 msgid "" "On output, if *doublequote* is :const:`False` and no *escapechar* is set, :" "exc:`Error` is raised if a *quotechar* is found in a field." msgstr "" -#: ../../../library/csv.rst:419 +#: ../../../library/csv.rst:450 msgid "" "A one-character string used by the writer to escape characters that require " "escaping:" msgstr "" -#: ../../../library/csv.rst:422 +#: ../../../library/csv.rst:453 msgid "" "the *delimiter*, the *quotechar*, ``'\\r'``, ``'\\n'`` and any of the " "characters in *lineterminator* are escaped if *quoting* is set to :const:" "`QUOTE_NONE`;" msgstr "" -#: ../../../library/csv.rst:425 +#: ../../../library/csv.rst:456 msgid "the *quotechar* is escaped if *doublequote* is :const:`False`;" msgstr "" -#: ../../../library/csv.rst:426 +#: ../../../library/csv.rst:457 msgid "the *escapechar* itself." msgstr "" -#: ../../../library/csv.rst:428 +#: ../../../library/csv.rst:459 msgid "" "On reading, the *escapechar* removes any special meaning from the following " "character. It defaults to :const:`None`, which disables escaping." msgstr "" -#: ../../../library/csv.rst:431 +#: ../../../library/csv.rst:462 msgid "An empty *escapechar* is not allowed." msgstr "" -#: ../../../library/csv.rst:436 +#: ../../../library/csv.rst:467 msgid "" "The string used to terminate lines produced by the :class:`writer`. It " "defaults to ``'\\r\\n'``." msgstr "" -#: ../../../library/csv.rst:441 +#: ../../../library/csv.rst:472 msgid "" "The :class:`reader` is hard-coded to recognise either ``'\\r'`` or ``'\\n'`` " "as end-of-line, and ignores *lineterminator*. This behavior may change in " "the future." msgstr "" -#: ../../../library/csv.rst:448 +#: ../../../library/csv.rst:479 msgid "" "A one-character string used to quote fields containing special characters, " "such as the *delimiter* or the *quotechar*, or which contain new-line " @@ -485,11 +501,11 @@ msgid "" "prevent escaping ``'\"'`` if *quoting* is set to :const:`QUOTE_NONE`." msgstr "" -#: ../../../library/csv.rst:455 +#: ../../../library/csv.rst:486 msgid "An empty *quotechar* is not allowed." msgstr "" -#: ../../../library/csv.rst:460 +#: ../../../library/csv.rst:491 msgid "" "Controls when quotes should be generated by the writer and recognised by the " "reader. It can take on any of the :ref:`QUOTE_\\* constants \n" "Language-Team: LANGUAGE \n" @@ -226,7 +226,7 @@ msgid "" "learn more about :mod:`!ctypes` data types." msgstr "" -#: ../../../library/ctypes.rst:226 ../../../library/ctypes.rst:2553 +#: ../../../library/ctypes.rst:226 ../../../library/ctypes.rst:2593 msgid "Fundamental data types" msgstr "" @@ -910,11 +910,45 @@ msgid "" "for details." msgstr "" -#: ../../../library/ctypes.rst:700 +#: ../../../library/ctypes.rst:698 +msgid "Specifying function pointers using type annotations" +msgstr "" + +#: ../../../library/ctypes.rst:703 +msgid "" +"A :term:`decorator` that generates :attr:`~ctypes._CFuncPtr.argtypes` and :" +"attr:`~ctypes._CFuncPtr.restype` from a function signature, using the :attr:" +"`~function.__name__` of the function and its :term:`type annotations " +"`." +msgstr "" + +#: ../../../library/ctypes.rst:707 +msgid "The decorated function should look like this::" +msgstr "" + +#: ../../../library/ctypes.rst:714 +msgid "" +"The body of the decorated function is ignored, and any parameters that are " +"missing type annotations are skipped. The names of the parameters are " +"ignored and do not have to match the underlying C implementation." +msgstr "" + +#: ../../../library/ctypes.rst:718 +msgid "" +"If the decorated function does not have a return type annotation, a :exc:" +"`ValueError` is raised. If the name of the function does not exist in *dll*, " +"an :exc:`AttributeError` is raised." +msgstr "" + +#: ../../../library/ctypes.rst:722 ../../../library/ctypes.rst:2267 +msgid "For example::" +msgstr "" + +#: ../../../library/ctypes.rst:740 msgid "Passing pointers (or: passing parameters by reference)" msgstr "" -#: ../../../library/ctypes.rst:702 +#: ../../../library/ctypes.rst:742 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 " @@ -922,7 +956,7 @@ msgid "" "reference*." msgstr "" -#: ../../../library/ctypes.rst:706 +#: ../../../library/ctypes.rst:746 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:" @@ -931,11 +965,11 @@ msgid "" "you don't need the pointer object in Python itself::" msgstr "" -#: ../../../library/ctypes.rst:728 +#: ../../../library/ctypes.rst:768 msgid "Structures and unions" msgstr "" -#: ../../../library/ctypes.rst:730 +#: ../../../library/ctypes.rst:770 msgid "" "Structures and unions must derive from the :class:`Structure` and :class:" "`Union` base classes which are defined in the :mod:`!ctypes` module. Each " @@ -944,45 +978,45 @@ msgid "" "*field type*." msgstr "" -#: ../../../library/ctypes.rst:735 +#: ../../../library/ctypes.rst:775 msgid "" "The field type must be a :mod:`!ctypes` type like :class:`c_int`, or any " "other derived :mod:`!ctypes` type: structure, union, array, pointer." msgstr "" -#: ../../../library/ctypes.rst:738 +#: ../../../library/ctypes.rst:778 msgid "" "Here is a simple example of a POINT structure, which contains two integers " "named *x* and *y*, and also shows how to initialize a structure in the " "constructor::" msgstr "" -#: ../../../library/ctypes.rst:758 +#: ../../../library/ctypes.rst:798 msgid "" "You can, however, build much more complicated structures. A structure can " "itself contain other structures by using a structure as a field type." msgstr "" -#: ../../../library/ctypes.rst:761 +#: ../../../library/ctypes.rst:801 msgid "" "Here is a RECT structure which contains two POINTs named *upperleft* and " "*lowerright*::" msgstr "" -#: ../../../library/ctypes.rst:775 +#: ../../../library/ctypes.rst:815 msgid "" "Nested structures can also be initialized in the constructor in several " "ways::" msgstr "" -#: ../../../library/ctypes.rst:780 +#: ../../../library/ctypes.rst:820 msgid "" "Field :term:`descriptor`\\s can be retrieved from the *class*, they are " "useful for debugging because they can provide useful information. See :class:" "`CField`::" msgstr "" -#: ../../../library/ctypes.rst:795 +#: ../../../library/ctypes.rst:835 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 " @@ -990,11 +1024,11 @@ msgid "" "structures with bit-fields should always be passed to functions by pointer." msgstr "" -#: ../../../library/ctypes.rst:801 +#: ../../../library/ctypes.rst:841 msgid "Structure/union layout, alignment and byte order" msgstr "" -#: ../../../library/ctypes.rst:803 +#: ../../../library/ctypes.rst:843 msgid "" "By default, Structure and Union fields are laid out in the same way the C " "compiler does it. It is possible to override this behavior entirely by " @@ -1002,7 +1036,7 @@ msgid "" "definition; see the attribute documentation for details." msgstr "" -#: ../../../library/ctypes.rst:808 +#: ../../../library/ctypes.rst:848 msgid "" "It is possible to specify the maximum alignment for the fields and/or for " "the structure itself by setting the class attributes :attr:`~Structure." @@ -1010,7 +1044,7 @@ msgid "" "documentation for details." msgstr "" -#: ../../../library/ctypes.rst:813 +#: ../../../library/ctypes.rst:853 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:" @@ -1019,18 +1053,18 @@ msgid "" "classes cannot contain pointer fields." msgstr "" -#: ../../../library/ctypes.rst:823 +#: ../../../library/ctypes.rst:863 msgid "Bit fields in structures and unions" msgstr "" -#: ../../../library/ctypes.rst:825 +#: ../../../library/ctypes.rst:865 msgid "" "It is possible to create structures and unions containing bit fields. Bit " "fields are only possible for integer fields, the bit width is specified as " "the third item in the :attr:`~Structure._fields_` tuples::" msgstr "" -#: ../../../library/ctypes.rst:838 +#: ../../../library/ctypes.rst:878 msgid "" "It is important to note that bit field allocation and layout in memory are " "not defined as a C standard; their implementation is compiler-specific. By " @@ -1039,80 +1073,80 @@ msgid "" "details on the default behavior and how to change it." msgstr "" -#: ../../../library/ctypes.rst:849 +#: ../../../library/ctypes.rst:889 msgid "Arrays" msgstr "" -#: ../../../library/ctypes.rst:851 +#: ../../../library/ctypes.rst:891 msgid "" "Arrays are sequences, containing a fixed number of instances of the same " "type." msgstr "" -#: ../../../library/ctypes.rst:853 +#: ../../../library/ctypes.rst:893 msgid "" "The recommended way to create array types is by multiplying a data type with " "a positive integer::" msgstr "" -#: ../../../library/ctypes.rst:858 +#: ../../../library/ctypes.rst:898 msgid "" "Here is an example of a somewhat artificial data type, a structure " "containing 4 POINTs among other stuff::" msgstr "" -#: ../../../library/ctypes.rst:874 +#: ../../../library/ctypes.rst:914 msgid "Instances are created in the usual way, by calling the class::" msgstr "" -#: ../../../library/ctypes.rst:880 +#: ../../../library/ctypes.rst:920 msgid "" "The above code print a series of ``0 0`` lines, because the array contents " "is initialized to zeros." msgstr "" -#: ../../../library/ctypes.rst:883 +#: ../../../library/ctypes.rst:923 msgid "Initializers of the correct type can also be specified::" msgstr "" -#: ../../../library/ctypes.rst:899 +#: ../../../library/ctypes.rst:939 msgid "Pointers" msgstr "" -#: ../../../library/ctypes.rst:901 +#: ../../../library/ctypes.rst:941 msgid "" "Pointer instances are created by calling the :func:`pointer` function on a :" "mod:`!ctypes` type::" msgstr "" -#: ../../../library/ctypes.rst:909 +#: ../../../library/ctypes.rst:949 msgid "" "Pointer instances have a :attr:`~_Pointer.contents` attribute which returns " "the object to which the pointer points, the ``i`` object above::" msgstr "" -#: ../../../library/ctypes.rst:916 +#: ../../../library/ctypes.rst:956 msgid "" "Note that :mod:`!ctypes` does not have OOR (original object return), it " "constructs a new, equivalent object each time you retrieve an attribute::" msgstr "" -#: ../../../library/ctypes.rst:925 +#: ../../../library/ctypes.rst:965 msgid "" "Assigning another :class:`c_int` instance to the pointer's contents " "attribute would cause the pointer to point to the memory location where this " "is stored::" msgstr "" -#: ../../../library/ctypes.rst:937 +#: ../../../library/ctypes.rst:977 msgid "Pointer instances can also be indexed with integers::" msgstr "" -#: ../../../library/ctypes.rst:943 +#: ../../../library/ctypes.rst:983 msgid "Assigning to an integer index changes the pointed to value::" msgstr "" -#: ../../../library/ctypes.rst:952 +#: ../../../library/ctypes.rst:992 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 " @@ -1121,7 +1155,7 @@ msgid "" "instead of a single item." msgstr "" -#: ../../../library/ctypes.rst:958 +#: ../../../library/ctypes.rst:998 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 " @@ -1129,30 +1163,30 @@ msgid "" "returns a new type::" msgstr "" -#: ../../../library/ctypes.rst:974 +#: ../../../library/ctypes.rst:1014 msgid "" "Calling the pointer type without an argument creates a ``NULL`` pointer. " "``NULL`` pointers have a ``False`` boolean value::" msgstr "" -#: ../../../library/ctypes.rst:982 +#: ../../../library/ctypes.rst:1022 msgid "" ":mod:`!ctypes` checks for ``NULL`` when dereferencing pointers (but " "dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::" msgstr "" -#: ../../../library/ctypes.rst:1000 +#: ../../../library/ctypes.rst:1040 msgid "Thread safety without the GIL" msgstr "" -#: ../../../library/ctypes.rst:1002 +#: ../../../library/ctypes.rst:1042 msgid "" "From Python 3.13 onward, the :term:`GIL` can be disabled on the :term:`free-" "threaded build`. In ctypes, reads and writes to a single object concurrently " "is safe, but not across multiple objects:" msgstr "" -#: ../../../library/ctypes.rst:1011 +#: ../../../library/ctypes.rst:1051 msgid "" "In the above, it's only safe for one object to read and write to the address " "at once if the GIL is disabled. So, ``pointer_a`` can be shared and written " @@ -1161,11 +1195,11 @@ msgid "" "Lock` to synchronize access to memory:" msgstr "" -#: ../../../library/ctypes.rst:1031 +#: ../../../library/ctypes.rst:1071 msgid "Type conversions" msgstr "" -#: ../../../library/ctypes.rst:1033 +#: ../../../library/ctypes.rst:1073 msgid "" "Usually, ctypes does strict type checking. This means, if you have " "``POINTER(c_int)`` in the :attr:`~_CFuncPtr.argtypes` list of a function or " @@ -1176,7 +1210,7 @@ msgid "" "ctypes accepts an array of c_int::" msgstr "" -#: ../../../library/ctypes.rst:1054 +#: ../../../library/ctypes.rst:1094 msgid "" "In addition, if a function argument is explicitly declared to be a pointer " "type (such as ``POINTER(c_int)``) in :attr:`~_CFuncPtr.argtypes`, an object " @@ -1185,11 +1219,11 @@ msgid "" "automatically." msgstr "" -#: ../../../library/ctypes.rst:1059 +#: ../../../library/ctypes.rst:1099 msgid "To set a POINTER type field to ``NULL``, you can assign ``None``::" msgstr "" -#: ../../../library/ctypes.rst:1066 +#: ../../../library/ctypes.rst:1106 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 " @@ -1198,11 +1232,11 @@ msgid "" "``values`` field, but not instances of other types::" msgstr "" -#: ../../../library/ctypes.rst:1078 +#: ../../../library/ctypes.rst:1118 msgid "For these cases, the :func:`cast` function is handy." msgstr "" -#: ../../../library/ctypes.rst:1080 +#: ../../../library/ctypes.rst:1120 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, " @@ -1211,60 +1245,60 @@ msgid "" "references the same memory block as the first argument::" msgstr "" -#: ../../../library/ctypes.rst:1091 +#: ../../../library/ctypes.rst:1131 msgid "" "So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` " "the structure::" msgstr "" -#: ../../../library/ctypes.rst:1104 +#: ../../../library/ctypes.rst:1144 msgid "Incomplete Types" msgstr "" -#: ../../../library/ctypes.rst:1106 +#: ../../../library/ctypes.rst:1146 msgid "" "*Incomplete Types* are structures, unions or arrays whose members are not " "yet specified. In C, they are specified by forward declarations, which are " "defined later::" msgstr "" -#: ../../../library/ctypes.rst:1117 +#: ../../../library/ctypes.rst:1157 msgid "" "The straightforward translation into ctypes code would be this, but it does " "not work::" msgstr "" -#: ../../../library/ctypes.rst:1130 +#: ../../../library/ctypes.rst:1170 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:`~Structure._fields_` attribute later, after the class statement::" msgstr "" -#: ../../../library/ctypes.rst:1142 +#: ../../../library/ctypes.rst:1182 msgid "" "Let's try it. We create two instances of ``cell``, and let them point to " "each other, and finally follow the pointer chain a few times::" msgstr "" -#: ../../../library/ctypes.rst:1163 +#: ../../../library/ctypes.rst:1203 msgid "Callback functions" msgstr "" -#: ../../../library/ctypes.rst:1165 +#: ../../../library/ctypes.rst:1205 msgid "" ":mod:`!ctypes` allows creating C callable function pointers from Python " "callables. These are sometimes called *callback functions*." msgstr "" -#: ../../../library/ctypes.rst:1168 +#: ../../../library/ctypes.rst:1208 msgid "" "First, you must create a class for the callback function. The class knows " "the calling convention, the return type, and the number and types of " "arguments this function will receive." msgstr "" -#: ../../../library/ctypes.rst:1172 +#: ../../../library/ctypes.rst:1212 msgid "" "The :func:`CFUNCTYPE` factory function creates types for callback functions " "using the ``cdecl`` calling convention. On Windows, the :func:`WINFUNCTYPE` " @@ -1272,21 +1306,21 @@ msgid "" "calling convention." msgstr "" -#: ../../../library/ctypes.rst:1177 +#: ../../../library/ctypes.rst:1217 msgid "" "Both of these factory functions are called with the result type as first " "argument, and the callback functions expected argument types as the " "remaining arguments." msgstr "" -#: ../../../library/ctypes.rst:1181 +#: ../../../library/ctypes.rst:1221 msgid "" "I will present an example here which uses the standard C library's :c:func:`!" "qsort` function, that is used to sort items with the help of a callback " "function. :c:func:`!qsort` will be used to sort an array of integers::" msgstr "" -#: ../../../library/ctypes.rst:1191 +#: ../../../library/ctypes.rst:1231 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 " @@ -1296,44 +1330,44 @@ msgid "" "otherwise." msgstr "" -#: ../../../library/ctypes.rst:1197 +#: ../../../library/ctypes.rst:1237 msgid "" "So our callback function receives pointers to integers, and must return an " "integer. First we create the ``type`` for the callback function::" msgstr "" -#: ../../../library/ctypes.rst:1203 +#: ../../../library/ctypes.rst:1243 msgid "" "To get started, here is a simple callback that shows the values it gets " "passed::" msgstr "" -#: ../../../library/ctypes.rst:1213 +#: ../../../library/ctypes.rst:1253 msgid "The result::" msgstr "" -#: ../../../library/ctypes.rst:1223 +#: ../../../library/ctypes.rst:1263 msgid "Now we can actually compare the two items and return a useful result::" msgstr "" -#: ../../../library/ctypes.rst:1238 +#: ../../../library/ctypes.rst:1278 msgid "As we can easily check, our array is sorted now::" msgstr "" -#: ../../../library/ctypes.rst:1245 +#: ../../../library/ctypes.rst:1285 msgid "" "The function factories can be used as decorator factories, so we may as well " "write::" msgstr "" -#: ../../../library/ctypes.rst:1263 +#: ../../../library/ctypes.rst:1303 msgid "" "Make sure you keep references to :func:`CFUNCTYPE` objects as long as they " "are used from C code. :mod:`!ctypes` doesn't, and if you don't, they may be " "garbage collected, crashing your program when a callback is made." msgstr "" -#: ../../../library/ctypes.rst:1267 +#: ../../../library/ctypes.rst:1307 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 " @@ -1343,35 +1377,35 @@ msgid "" "even when those calls are made from the same C thread." msgstr "" -#: ../../../library/ctypes.rst:1277 +#: ../../../library/ctypes.rst:1317 msgid "Accessing values exported from dlls" msgstr "" -#: ../../../library/ctypes.rst:1279 +#: ../../../library/ctypes.rst:1319 msgid "" "Some shared libraries not only export functions, they also export variables. " "An example in the Python library itself is the :c:data:`Py_Version`, Python " "runtime version number encoded in a single constant integer." msgstr "" -#: ../../../library/ctypes.rst:1283 +#: ../../../library/ctypes.rst:1323 msgid "" ":mod:`!ctypes` can access values like this with the :meth:`~_CData.in_dll` " "class methods of the type. *pythonapi* is a predefined symbol giving access " "to the Python C api::" msgstr "" -#: ../../../library/ctypes.rst:1291 +#: ../../../library/ctypes.rst:1331 msgid "" "An extended example which also demonstrates the use of pointers accesses " "the :c:data:`PyImport_FrozenModules` pointer exported by Python." msgstr "" -#: ../../../library/ctypes.rst:1294 +#: ../../../library/ctypes.rst:1334 msgid "Quoting the docs for that value:" msgstr "" -#: ../../../library/ctypes.rst:1296 +#: ../../../library/ctypes.rst:1336 msgid "" "This pointer is initialized to point to an array of :c:struct:`_frozen` " "records, terminated by one whose members are all ``NULL`` or zero. When a " @@ -1380,19 +1414,19 @@ msgid "" "frozen modules." msgstr "" -#: ../../../library/ctypes.rst:1301 +#: ../../../library/ctypes.rst:1341 msgid "" "So manipulating this pointer could even prove useful. To restrict the " "example size, we show only how this table can be read with :mod:`!ctypes`::" msgstr "" -#: ../../../library/ctypes.rst:1315 +#: ../../../library/ctypes.rst:1355 msgid "" "We have defined the :c:struct:`_frozen` data type, so we can get the pointer " "to the table::" msgstr "" -#: ../../../library/ctypes.rst:1322 +#: ../../../library/ctypes.rst:1362 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 " @@ -1401,34 +1435,34 @@ msgid "" "the loop when we hit the ``NULL`` entry::" msgstr "" -#: ../../../library/ctypes.rst:1338 +#: ../../../library/ctypes.rst:1378 msgid "" "The fact that standard Python has a frozen module and a frozen package " "(indicated by the negative ``size`` member) is not well known, it is only " "used for testing. Try it out with ``import __hello__`` for example." msgstr "" -#: ../../../library/ctypes.rst:1346 +#: ../../../library/ctypes.rst:1386 msgid "Surprises" msgstr "" -#: ../../../library/ctypes.rst:1348 +#: ../../../library/ctypes.rst:1388 msgid "" "There are some edges in :mod:`!ctypes` where you might expect something " "other than what actually happens." msgstr "" -#: ../../../library/ctypes.rst:1351 +#: ../../../library/ctypes.rst:1391 msgid "Consider the following example::" msgstr "" -#: ../../../library/ctypes.rst:1371 +#: ../../../library/ctypes.rst:1411 msgid "" "Hm. We certainly expected the last statement to print ``3 4 1 2``. What " "happened? Here are the steps of the ``rc.a, rc.b = rc.b, rc.a`` line above::" msgstr "" -#: ../../../library/ctypes.rst:1379 +#: ../../../library/ctypes.rst:1419 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 " @@ -1437,26 +1471,26 @@ msgid "" "have the expected effect." msgstr "" -#: ../../../library/ctypes.rst:1385 +#: ../../../library/ctypes.rst:1425 msgid "" "Keep in mind that retrieving sub-objects from Structure, Unions, and Arrays " "doesn't *copy* the sub-object, instead it retrieves a wrapper object " "accessing the root-object's underlying buffer." msgstr "" -#: ../../../library/ctypes.rst:1389 +#: ../../../library/ctypes.rst:1429 msgid "" "Another example that may behave differently from what one would expect is " "this::" msgstr "" -#: ../../../library/ctypes.rst:1401 +#: ../../../library/ctypes.rst:1441 msgid "" "Objects instantiated from :class:`c_char_p` can only have their value set to " "bytes or integers." msgstr "" -#: ../../../library/ctypes.rst:1404 +#: ../../../library/ctypes.rst:1444 msgid "" "Why is it printing ``False``? ctypes instances are objects containing a " "memory block plus some :term:`descriptor`\\s accessing the contents of the " @@ -1465,17 +1499,17 @@ msgid "" "the contents again constructs a new Python object each time!" msgstr "" -#: ../../../library/ctypes.rst:1414 +#: ../../../library/ctypes.rst:1454 msgid "Variable-sized data types" msgstr "" -#: ../../../library/ctypes.rst:1416 +#: ../../../library/ctypes.rst:1456 msgid "" ":mod:`!ctypes` provides some support for variable-sized arrays and " "structures." msgstr "" -#: ../../../library/ctypes.rst:1418 +#: ../../../library/ctypes.rst:1458 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, " @@ -1484,39 +1518,39 @@ msgid "" "objects type, a :exc:`ValueError` is raised if this is tried::" msgstr "" -#: ../../../library/ctypes.rst:1438 +#: ../../../library/ctypes.rst:1478 msgid "" "This is nice and fine, but how would one access the additional elements " "contained in this array? Since the type still only knows about 4 elements, " "we get errors accessing other elements::" msgstr "" -#: ../../../library/ctypes.rst:1450 +#: ../../../library/ctypes.rst:1490 msgid "" "Another way to use variable-sized data types with :mod:`!ctypes` is to use " "the dynamic nature of Python, and (re-)define the data type after the " "required size is already known, on a case by case basis." msgstr "" -#: ../../../library/ctypes.rst:1458 +#: ../../../library/ctypes.rst:1498 msgid "ctypes reference" msgstr "" -#: ../../../library/ctypes.rst:1463 +#: ../../../library/ctypes.rst:1503 msgid "Loading shared libraries" msgstr "" -#: ../../../library/ctypes.rst:1465 +#: ../../../library/ctypes.rst:1505 msgid "" "There are several ways to load shared libraries into the Python process. " "One way is to instantiate :py:class:`CDLL` or one of its subclasses:" msgstr "" -#: ../../../library/ctypes.rst:1471 +#: ../../../library/ctypes.rst:1511 msgid "Represents a loaded shared library." msgstr "" -#: ../../../library/ctypes.rst:1473 +#: ../../../library/ctypes.rst:1513 msgid "" "Functions in this library use the standard C calling convention, and are " "assumed to return :c:expr:`int`. The Python :term:`global interpreter lock` " @@ -1526,7 +1560,7 @@ msgid "" "PyDLL`." msgstr "" -#: ../../../library/ctypes.rst:1480 +#: ../../../library/ctypes.rst:1520 msgid "" "If you have an existing :py:attr:`handle ` to an " "already loaded shared library, it can be passed as the *handle* argument to " @@ -1535,20 +1569,20 @@ msgid "" "it may be adjusted and/or validated." msgstr "" -#: ../../../library/ctypes.rst:1486 +#: ../../../library/ctypes.rst:1526 msgid "" "If *handle* is ``None``, the underlying platform's :manpage:`dlopen(3)` or " "`LoadLibraryExW`_ function is used to load the library into the process, and " "to get a handle to it." msgstr "" -#: ../../../library/ctypes.rst:1490 +#: ../../../library/ctypes.rst:1530 msgid "" "*name* is the pathname of the shared library to open. If *name* does not " "contain a path separator, the library is found in a platform-specific way." msgstr "" -#: ../../../library/ctypes.rst:1494 +#: ../../../library/ctypes.rst:1534 msgid "" "On Windows, the ``.DLL`` suffix may be missing. (For details, see " "`LoadLibraryExW`_ documentation.) Other platform-specific prefixes and " @@ -1557,7 +1591,7 @@ msgid "" "`ctypes-finding-shared-libraries` for more information." msgstr "" -#: ../../../library/ctypes.rst:1501 +#: ../../../library/ctypes.rst:1541 msgid "" "On non-Windows systems, *name* can be ``None``. In this case, :c:func:`!" "dlopen` is called with ``NULL``, which opens the main program as a " @@ -1565,23 +1599,23 @@ msgid "" "is more portable.)" msgstr "" -#: ../../../library/ctypes.rst:1507 +#: ../../../library/ctypes.rst:1547 msgid "CPython implementation detail" msgstr "" -#: ../../../library/ctypes.rst:1509 +#: ../../../library/ctypes.rst:1549 msgid "" "Since CPython is linked to ``libc``, a ``None`` *name* is often used to " "access the C standard library::" msgstr "" -#: ../../../library/ctypes.rst:1518 +#: ../../../library/ctypes.rst:1558 msgid "" "To access the Python C API, prefer :py:data:`ctypes.pythonapi` which works " "across platforms." msgstr "" -#: ../../../library/ctypes.rst:1521 +#: ../../../library/ctypes.rst:1561 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 " @@ -1589,7 +1623,7 @@ msgid "" "configurable." msgstr "" -#: ../../../library/ctypes.rst:1526 +#: ../../../library/ctypes.rst:1566 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:`!" @@ -1599,14 +1633,14 @@ msgid "" "private copy, the same happens immediately after the function call." msgstr "" -#: ../../../library/ctypes.rst:1533 +#: ../../../library/ctypes.rst:1573 msgid "" "The function :func:`ctypes.get_errno` returns the value of the ctypes " "private copy, and the function :func:`ctypes.set_errno` changes the ctypes " "private copy to a new value and returns the former value." msgstr "" -#: ../../../library/ctypes.rst:1537 +#: ../../../library/ctypes.rst:1577 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 :" @@ -1615,7 +1649,7 @@ msgid "" "private copy of the windows error code." msgstr "" -#: ../../../library/ctypes.rst:1543 +#: ../../../library/ctypes.rst:1583 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 " @@ -1625,7 +1659,7 @@ msgid "" "ensure the correct library and dependencies are loaded." msgstr "" -#: ../../../library/ctypes.rst:1550 +#: ../../../library/ctypes.rst:1590 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:" @@ -1637,22 +1671,22 @@ msgid "" "determine which one is not found using Windows debugging and tracing tools." msgstr "" -#: ../../../library/ctypes.rst:1562 +#: ../../../library/ctypes.rst:1602 msgid "" "`Microsoft DUMPBIN tool `_ -- A tool to find DLL " "dependents." msgstr "" -#: ../../../library/ctypes.rst:1565 +#: ../../../library/ctypes.rst:1605 msgid "Added *winmode* parameter." msgstr "" -#: ../../../library/ctypes.rst:1570 +#: ../../../library/ctypes.rst:1610 msgid "The *name* parameter can now be a :term:`path-like object`." msgstr "" -#: ../../../library/ctypes.rst:1572 +#: ../../../library/ctypes.rst:1612 msgid "" "Instances of this class have no public methods. Functions exported by the " "shared library can be accessed as attributes or by index. Please note that " @@ -1661,26 +1695,26 @@ msgid "" "hand, accessing it through an index returns a new object each time::" msgstr "" -#: ../../../library/ctypes.rst:1585 +#: ../../../library/ctypes.rst:1625 msgid "" "The following public attributes are available. Their name starts with an " "underscore to not clash with exported function names:" msgstr "" -#: ../../../library/ctypes.rst:1590 +#: ../../../library/ctypes.rst:1630 msgid "The system handle used to access the library." msgstr "" -#: ../../../library/ctypes.rst:1594 +#: ../../../library/ctypes.rst:1634 msgid "The name of the library passed in the constructor." msgstr "" -#: ../../../library/ctypes.rst:1600 ../../../library/ctypes.rst:1617 -#: ../../../library/ctypes.rst:1626 +#: ../../../library/ctypes.rst:1640 ../../../library/ctypes.rst:1657 +#: ../../../library/ctypes.rst:1666 msgid "See :py:class:`~ctypes.CDLL`, the superclass, for common information." msgstr "" -#: ../../../library/ctypes.rst:1602 +#: ../../../library/ctypes.rst:1642 msgid "" "Functions in this library use the ``stdcall`` calling convention, and are " "assumed to return the windows specific :class:`HRESULT` code. :class:" @@ -1689,60 +1723,60 @@ msgid "" "value signals a failure, an :class:`OSError` is automatically raised." msgstr "" -#: ../../../library/ctypes.rst:1608 ../../../library/ctypes.rst:1622 -#: ../../../library/ctypes.rst:1685 ../../../library/ctypes.rst:1692 -#: ../../../library/ctypes.rst:1828 ../../../library/ctypes.rst:1987 -#: ../../../library/ctypes.rst:2039 ../../../library/ctypes.rst:2191 -#: ../../../library/ctypes.rst:2263 ../../../library/ctypes.rst:2272 -#: ../../../library/ctypes.rst:2286 ../../../library/ctypes.rst:2295 -#: ../../../library/ctypes.rst:2304 ../../../library/ctypes.rst:2319 -#: ../../../library/ctypes.rst:2386 ../../../library/ctypes.rst:2413 -#: ../../../library/ctypes.rst:2844 ../../../library/ctypes.rst:3267 +#: ../../../library/ctypes.rst:1648 ../../../library/ctypes.rst:1662 +#: ../../../library/ctypes.rst:1725 ../../../library/ctypes.rst:1732 +#: ../../../library/ctypes.rst:1868 ../../../library/ctypes.rst:2027 +#: ../../../library/ctypes.rst:2079 ../../../library/ctypes.rst:2231 +#: ../../../library/ctypes.rst:2303 ../../../library/ctypes.rst:2312 +#: ../../../library/ctypes.rst:2326 ../../../library/ctypes.rst:2335 +#: ../../../library/ctypes.rst:2344 ../../../library/ctypes.rst:2359 +#: ../../../library/ctypes.rst:2426 ../../../library/ctypes.rst:2453 +#: ../../../library/ctypes.rst:2884 ../../../library/ctypes.rst:3373 msgid "Availability" msgstr "" -#: ../../../library/ctypes.rst:1610 +#: ../../../library/ctypes.rst:1650 msgid "" ":exc:`WindowsError` used to be raised, which is now an alias of :exc:" "`OSError`." msgstr "" -#: ../../../library/ctypes.rst:1619 +#: ../../../library/ctypes.rst:1659 msgid "" "Functions in these libraries use the ``stdcall`` calling convention, and are " "assumed to return :c:expr:`int` by default." msgstr "" -#: ../../../library/ctypes.rst:1628 +#: ../../../library/ctypes.rst:1668 msgid "" "When functions in this library are called, the Python GIL is *not* released " "during the function call, and after the function execution the Python error " "flag is checked. If the error flag is set, a Python exception is raised." msgstr "" -#: ../../../library/ctypes.rst:1633 +#: ../../../library/ctypes.rst:1673 msgid "Thus, this is only useful to call Python C API functions directly." msgstr "" -#: ../../../library/ctypes.rst:1638 +#: ../../../library/ctypes.rst:1678 msgid "" "Flag to use as *mode* parameter. On platforms where this flag is not " "available, it is defined as the integer zero." msgstr "" -#: ../../../library/ctypes.rst:1644 +#: ../../../library/ctypes.rst:1684 msgid "" "Flag to use as *mode* parameter. On platforms where this is not available, " "it is the same as *RTLD_GLOBAL*." msgstr "" -#: ../../../library/ctypes.rst:1650 +#: ../../../library/ctypes.rst:1690 msgid "" "The default mode which is used to load shared libraries. On OSX 10.3, this " "is *RTLD_GLOBAL*, otherwise it is the same as *RTLD_LOCAL*." msgstr "" -#: ../../../library/ctypes.rst:1654 +#: ../../../library/ctypes.rst:1694 msgid "" "Shared libraries can also be loaded by using one of the prefabricated " "objects, which are instances of the :class:`LibraryLoader` class, either by " @@ -1750,13 +1784,13 @@ msgid "" "library as attribute of the loader instance." msgstr "" -#: ../../../library/ctypes.rst:1661 +#: ../../../library/ctypes.rst:1701 msgid "" "Class which loads shared libraries. *dlltype* should be one of the :class:" "`CDLL`, :class:`PyDLL`, :class:`WinDLL`, or :class:`OleDLL` types." msgstr "" -#: ../../../library/ctypes.rst:1664 +#: ../../../library/ctypes.rst:1704 msgid "" ":meth:`!__getattr__` has special behavior: It allows loading a shared " "library by accessing it as attribute of a library loader instance. The " @@ -1764,33 +1798,33 @@ msgid "" "each time." msgstr "" -#: ../../../library/ctypes.rst:1670 +#: ../../../library/ctypes.rst:1710 msgid "" "Load a shared library into the process and return it. This method always " "returns a new instance of the library." msgstr "" -#: ../../../library/ctypes.rst:1674 +#: ../../../library/ctypes.rst:1714 msgid "These prefabricated library loaders are available:" msgstr "" -#: ../../../library/ctypes.rst:1678 +#: ../../../library/ctypes.rst:1718 msgid "Creates :class:`CDLL` instances." msgstr "" -#: ../../../library/ctypes.rst:1683 +#: ../../../library/ctypes.rst:1723 msgid "Creates :class:`WinDLL` instances." msgstr "" -#: ../../../library/ctypes.rst:1690 +#: ../../../library/ctypes.rst:1730 msgid "Creates :class:`OleDLL` instances." msgstr "" -#: ../../../library/ctypes.rst:1697 +#: ../../../library/ctypes.rst:1737 msgid "Creates :class:`PyDLL` instances." msgstr "" -#: ../../../library/ctypes.rst:1702 +#: ../../../library/ctypes.rst:1742 msgid "" "An instance of :class:`PyDLL` that exposes Python C API functions as " "attributes. Note that all these functions are assumed to return C :c:expr:" @@ -1798,32 +1832,32 @@ msgid "" "correct :attr:`!restype` attribute to use these functions." msgstr "" -#: ../../../library/ctypes.rst:1707 ../../../library/ctypes.rst:1709 +#: ../../../library/ctypes.rst:1747 ../../../library/ctypes.rst:1749 msgid "" "Loading a library through any of these objects raises an :ref:`auditing " "event ` ``ctypes.dlopen`` with string argument ``name``, the name " "used to load the library." msgstr "" -#: ../../../library/ctypes.rst:1713 ../../../library/ctypes.rst:1715 +#: ../../../library/ctypes.rst:1753 ../../../library/ctypes.rst:1755 msgid "" "Accessing a function on a loaded library raises an auditing event ``ctypes." "dlsym`` with arguments ``library`` (the library object) and ``name`` (the " "symbol's name as a string or integer)." msgstr "" -#: ../../../library/ctypes.rst:1719 ../../../library/ctypes.rst:1721 +#: ../../../library/ctypes.rst:1759 ../../../library/ctypes.rst:1761 msgid "" "In cases when only the library handle is available rather than the object, " "accessing a function raises an auditing event ``ctypes.dlsym/handle`` with " "arguments ``handle`` (the raw library handle) and ``name``." msgstr "" -#: ../../../library/ctypes.rst:1729 +#: ../../../library/ctypes.rst:1769 msgid "Finding shared libraries" msgstr "" -#: ../../../library/ctypes.rst:1731 +#: ../../../library/ctypes.rst:1771 msgid "" "When programming in a compiled language, shared libraries are accessed when " "compiling/linking a program, and when the program is run. The programmer " @@ -1832,7 +1866,7 @@ msgid "" "library to load." msgstr "" -#: ../../../library/ctypes.rst:1737 +#: ../../../library/ctypes.rst:1777 msgid "" "While the mapping from short names to filenames is not consistently exposed " "by platforms, the :mod:`!ctypes.util` module provides a function, :func:`!" @@ -1841,7 +1875,7 @@ msgid "" "platforms and configurations, the function is :term:`soft deprecated`." msgstr "" -#: ../../../library/ctypes.rst:1744 +#: ../../../library/ctypes.rst:1784 msgid "" "If wrapping a shared library with :mod:`!ctypes`, consider determining the " "shared library name at development time, and hardcoding it into the wrapper " @@ -1851,11 +1885,11 @@ msgid "" "find_library` as a default or fallback." msgstr "" -#: ../../../library/ctypes.rst:1755 +#: ../../../library/ctypes.rst:1795 msgid "Try to find a library and return a pathname." msgstr "" -#: ../../../library/ctypes.rst:1757 +#: ../../../library/ctypes.rst:1797 msgid "" "*name* is the \"short\" library name without any prefix like ``lib``, suffix " "like ``.so``, ``.dylib`` or version number. (This is the form used for the " @@ -1863,24 +1897,24 @@ msgid "" "passing to :py:class:`~ctypes.CDLL`." msgstr "" -#: ../../../library/ctypes.rst:1762 +#: ../../../library/ctypes.rst:1802 msgid "If no library can be found, return ``None``." msgstr "" -#: ../../../library/ctypes.rst:1764 +#: ../../../library/ctypes.rst:1804 msgid "" "The exact functionality is system dependent, and is *not guaranteed* to " "match the behavior of the compiler, linker, and loader used for (or by) " "Python. It is recommended to only use this function as a default or fallback," msgstr "" -#: ../../../library/ctypes.rst:1771 +#: ../../../library/ctypes.rst:1811 msgid "" "This function is kept for use in cases where it works, but not expected to " "be updated for additional platforms and configurations." msgstr "" -#: ../../../library/ctypes.rst:1774 +#: ../../../library/ctypes.rst:1814 msgid "" "On Linux, :func:`!find_library` tries to run external programs (``/sbin/" "ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library file. If " @@ -1888,63 +1922,63 @@ msgid "" "by Python, the result of this function may be misleading." msgstr "" -#: ../../../library/ctypes.rst:1780 +#: ../../../library/ctypes.rst:1820 msgid "" "On Linux, the value of the environment variable ``LD_LIBRARY_PATH`` is used " "when searching for libraries, if a library cannot be found by any other " "means." msgstr "" -#: ../../../library/ctypes.rst:1784 +#: ../../../library/ctypes.rst:1824 msgid "Here are some examples::" msgstr "" -#: ../../../library/ctypes.rst:1795 +#: ../../../library/ctypes.rst:1835 msgid "" "On macOS and Android, :func:`!find_library` uses the system's standard " "naming schemes and paths to locate the library, and returns a full pathname " "if successful::" msgstr "" -#: ../../../library/ctypes.rst:1810 +#: ../../../library/ctypes.rst:1850 msgid "" "On Windows, :func:`!find_library` searches along the system search path, and " "returns the full pathname, but since there is no predefined naming scheme a " "call like ``find_library(\"c\")`` will fail and return ``None``." msgstr "" -#: ../../../library/ctypes.rst:1817 +#: ../../../library/ctypes.rst:1857 msgid "" "Returns the filename of the VC runtime library used by Python, and by the " "extension modules." msgstr "" -#: ../../../library/ctypes.rst:1820 +#: ../../../library/ctypes.rst:1860 msgid "" "If the name of the library cannot be determined, ``None`` is returned. " "Notably, this will happen for recent versions of the VC runtime library, " "which are not directly loadable." msgstr "" -#: ../../../library/ctypes.rst:1824 +#: ../../../library/ctypes.rst:1864 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:1834 +#: ../../../library/ctypes.rst:1874 msgid "Listing loaded shared libraries" msgstr "" -#: ../../../library/ctypes.rst:1836 +#: ../../../library/ctypes.rst:1876 msgid "" "When writing code that relies on code loaded from shared libraries, it can " "be useful to know which shared libraries have already been loaded into the " "current process." msgstr "" -#: ../../../library/ctypes.rst:1840 +#: ../../../library/ctypes.rst:1880 msgid "" "The :mod:`!ctypes.util` module provides the :func:`~ctypes.util.dllist` " "function, which calls the different APIs provided by the various platforms " @@ -1952,7 +1986,7 @@ msgid "" "current process." msgstr "" -#: ../../../library/ctypes.rst:1844 +#: ../../../library/ctypes.rst:1884 msgid "" "The exact output of this function will be system dependent. On most " "platforms, the first entry of this list represents the current process " @@ -1960,11 +1994,11 @@ msgid "" "return may look like::" msgstr "" -#: ../../../library/ctypes.rst:1856 +#: ../../../library/ctypes.rst:1896 msgid "Foreign functions" msgstr "" -#: ../../../library/ctypes.rst:1858 +#: ../../../library/ctypes.rst:1898 msgid "" "As explained in the previous section, foreign functions can be accessed as " "attributes of loaded shared libraries. The function objects created in this " @@ -1973,35 +2007,35 @@ msgid "" "library loader." msgstr "" -#: ../../../library/ctypes.rst:1863 +#: ../../../library/ctypes.rst:1903 msgid "" "They are instances of a private local class :class:`!_FuncPtr` (not exposed " "in :mod:`!ctypes`) which inherits from the private :class:`_CFuncPtr` class:" msgstr "" -#: ../../../library/ctypes.rst:1877 +#: ../../../library/ctypes.rst:1917 msgid "Base class for C callable foreign functions." msgstr "" -#: ../../../library/ctypes.rst:1879 +#: ../../../library/ctypes.rst:1919 msgid "" "Instances of foreign functions are also C compatible data types; they " "represent C function pointers." msgstr "" -#: ../../../library/ctypes.rst:1882 +#: ../../../library/ctypes.rst:1922 msgid "" "This behavior can be customized by assigning to special attributes of the " "foreign function object." msgstr "" -#: ../../../library/ctypes.rst:1887 +#: ../../../library/ctypes.rst:1927 msgid "" "Assign a ctypes type to specify the result type of the foreign function. Use " "``None`` for :c:expr:`void`, a function not returning anything." msgstr "" -#: ../../../library/ctypes.rst:1890 +#: ../../../library/ctypes.rst:1930 msgid "" "It is possible to assign a callable Python object that is not a ctypes type, " "in this case the function is assumed to return a C :c:expr:`int`, and the " @@ -2011,7 +2045,7 @@ msgid "" "callable to the :attr:`errcheck` attribute." msgstr "" -#: ../../../library/ctypes.rst:1899 +#: ../../../library/ctypes.rst:1939 msgid "" "Assign a tuple of ctypes types to specify the argument types that the " "function accepts. Functions using the ``stdcall`` calling convention can " @@ -2020,7 +2054,7 @@ msgid "" "unspecified arguments as well." msgstr "" -#: ../../../library/ctypes.rst:1905 +#: ../../../library/ctypes.rst:1945 msgid "" "When a foreign function is called, each actual argument is passed to the :" "meth:`~_CData.from_param` class method of the items in the :attr:`argtypes` " @@ -2030,7 +2064,7 @@ msgid "" "object using ctypes conversion rules." msgstr "" -#: ../../../library/ctypes.rst:1912 +#: ../../../library/ctypes.rst:1952 msgid "" "New: It is now possible to put items in argtypes which are not ctypes types, " "but each item must have a :meth:`~_CData.from_param` method which returns a " @@ -2038,38 +2072,38 @@ msgid "" "defining adapters that can adapt custom objects as function parameters." msgstr "" -#: ../../../library/ctypes.rst:1919 +#: ../../../library/ctypes.rst:1959 msgid "" "Assign a Python function or another callable to this attribute. The callable " "will be called with three or more arguments:" msgstr "" -#: ../../../library/ctypes.rst:1926 +#: ../../../library/ctypes.rst:1966 msgid "" "*result* is what the foreign function returns, as specified by the :attr:`!" "restype` attribute." msgstr "" -#: ../../../library/ctypes.rst:1929 +#: ../../../library/ctypes.rst:1969 msgid "" "*func* is the foreign function object itself, this allows reusing the same " "callable object to check or post process the results of several functions." msgstr "" -#: ../../../library/ctypes.rst:1933 +#: ../../../library/ctypes.rst:1973 msgid "" "*arguments* is a tuple containing the parameters originally passed to the " "function call, this allows specializing the behavior on the arguments used." msgstr "" -#: ../../../library/ctypes.rst:1937 +#: ../../../library/ctypes.rst:1977 msgid "" "The object that this function returns will be returned from the foreign " "function call, but it can also check the result value and raise an exception " "if the foreign function call failed." msgstr "" -#: ../../../library/ctypes.rst:1942 ../../../library/ctypes.rst:1944 +#: ../../../library/ctypes.rst:1982 ../../../library/ctypes.rst:1984 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 " @@ -2078,18 +2112,18 @@ msgid "" "hook to replace the exception with its own." msgstr "" -#: ../../../library/ctypes.rst:1950 ../../../library/ctypes.rst:1952 +#: ../../../library/ctypes.rst:1990 ../../../library/ctypes.rst:1992 msgid "" "Some ways to invoke foreign function calls as well as some of the functions " "in this module may raise an auditing event ``ctypes.call_function`` with " "arguments ``function pointer`` and ``arguments``." msgstr "" -#: ../../../library/ctypes.rst:1959 +#: ../../../library/ctypes.rst:1999 msgid "Function prototypes" msgstr "" -#: ../../../library/ctypes.rst:1961 +#: ../../../library/ctypes.rst:2001 msgid "" "Foreign functions can also be created by instantiating function prototypes. " "Function prototypes are similar to function prototypes in C; they describe a " @@ -2100,7 +2134,7 @@ msgid "" "``@wrapper`` syntax. See :ref:`ctypes-callback-functions` for examples." msgstr "" -#: ../../../library/ctypes.rst:1972 +#: ../../../library/ctypes.rst:2012 msgid "" "The returned function prototype creates functions that use the standard C " "calling convention. The function will release the GIL during the call. If " @@ -2109,37 +2143,37 @@ msgid "" "after the call; *use_last_error* does the same for the Windows error code." msgstr "" -#: ../../../library/ctypes.rst:1982 +#: ../../../library/ctypes.rst:2022 msgid "" "The returned function prototype creates functions that use the ``stdcall`` " "calling convention. The function will release the GIL during the call. " "*use_errno* and *use_last_error* have the same meaning as above." msgstr "" -#: ../../../library/ctypes.rst:1992 +#: ../../../library/ctypes.rst:2032 msgid "" "The returned function prototype creates functions that use the Python " "calling convention. The function will *not* release the GIL during the call." msgstr "" -#: ../../../library/ctypes.rst:1995 +#: ../../../library/ctypes.rst:2035 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 "" -#: ../../../library/ctypes.rst:2002 +#: ../../../library/ctypes.rst:2042 msgid "" "Returns a foreign function at the specified address which must be an integer." msgstr "" -#: ../../../library/ctypes.rst:2009 +#: ../../../library/ctypes.rst:2049 msgid "" "Create a C callable function (a callback function) from a Python *callable*." msgstr "" -#: ../../../library/ctypes.rst:2016 +#: ../../../library/ctypes.rst:2056 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 " @@ -2147,7 +2181,7 @@ msgid "" "small integer. The second item is the shared library instance." msgstr "" -#: ../../../library/ctypes.rst:2026 +#: ../../../library/ctypes.rst:2066 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* " @@ -2155,94 +2189,94 @@ msgid "" "identifier which is used in extended error reporting." msgstr "" -#: ../../../library/ctypes.rst:2031 +#: ../../../library/ctypes.rst:2071 msgid "" "If *iid* is not specified, an :exc:`OSError` is raised if the COM method " "call fails. If *iid* is specified, a :exc:`~ctypes.COMError` is raised " "instead." msgstr "" -#: ../../../library/ctypes.rst:2035 +#: ../../../library/ctypes.rst:2075 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 "" -#: ../../../library/ctypes.rst:2042 +#: ../../../library/ctypes.rst:2082 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." msgstr "" -#: ../../../library/ctypes.rst:2045 +#: ../../../library/ctypes.rst:2085 msgid "" "*paramflags* must be a tuple of the same length as :attr:`~_CFuncPtr." "argtypes`." msgstr "" -#: ../../../library/ctypes.rst:2047 +#: ../../../library/ctypes.rst:2087 msgid "" "Each item in this tuple contains further information about a parameter, it " "must be a tuple containing one, two, or three items." msgstr "" -#: ../../../library/ctypes.rst:2050 +#: ../../../library/ctypes.rst:2090 msgid "" "The first item is an integer containing a combination of direction flags for " "the parameter:" msgstr "" -#: ../../../library/ctypes.rst:2053 +#: ../../../library/ctypes.rst:2093 msgid "1" msgstr "" -#: ../../../library/ctypes.rst:2054 +#: ../../../library/ctypes.rst:2094 msgid "Specifies an input parameter to the function." msgstr "" -#: ../../../library/ctypes.rst:2056 +#: ../../../library/ctypes.rst:2096 msgid "2" msgstr "" -#: ../../../library/ctypes.rst:2057 +#: ../../../library/ctypes.rst:2097 msgid "Output parameter. The foreign function fills in a value." msgstr "" -#: ../../../library/ctypes.rst:2059 +#: ../../../library/ctypes.rst:2099 msgid "4" msgstr "" -#: ../../../library/ctypes.rst:2060 +#: ../../../library/ctypes.rst:2100 msgid "Input parameter which defaults to the integer zero." msgstr "" -#: ../../../library/ctypes.rst:2062 +#: ../../../library/ctypes.rst:2102 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 "" -#: ../../../library/ctypes.rst:2065 +#: ../../../library/ctypes.rst:2105 msgid "The optional third item is the default value for this parameter." msgstr "" -#: ../../../library/ctypes.rst:2068 +#: ../../../library/ctypes.rst:2108 msgid "" "The following 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 "" -#: ../../../library/ctypes.rst:2079 ../../../library/ctypes.rst:2102 +#: ../../../library/ctypes.rst:2119 ../../../library/ctypes.rst:2142 msgid "Here is the wrapping with :mod:`!ctypes`::" msgstr "" -#: ../../../library/ctypes.rst:2087 +#: ../../../library/ctypes.rst:2127 msgid "The ``MessageBox`` foreign function can now be called in these ways::" msgstr "" -#: ../../../library/ctypes.rst:2093 +#: ../../../library/ctypes.rst:2133 msgid "" "A second example demonstrates output parameters. The win32 " "``GetWindowRect`` function retrieves the dimensions of a specified window by " @@ -2250,7 +2284,7 @@ msgid "" "the C declaration::" msgstr "" -#: ../../../library/ctypes.rst:2111 +#: ../../../library/ctypes.rst:2151 msgid "" "Functions with output parameters will automatically return the output " "parameter value if there is a single one, or a tuple containing the output " @@ -2258,7 +2292,7 @@ msgid "" "now returns a RECT instance, when called." msgstr "" -#: ../../../library/ctypes.rst:2116 +#: ../../../library/ctypes.rst:2156 msgid "" "Output parameters can be combined with the :attr:`~_CFuncPtr.errcheck` " "protocol to do further output processing and error checking. The win32 " @@ -2267,7 +2301,7 @@ msgid "" "exception when the api call failed::" msgstr "" -#: ../../../library/ctypes.rst:2129 +#: ../../../library/ctypes.rst:2169 msgid "" "If the :attr:`~_CFuncPtr.errcheck` function returns the argument tuple it " "receives unchanged, :mod:`!ctypes` continues the normal processing it does " @@ -2277,58 +2311,58 @@ msgid "" "take place::" msgstr "" -#: ../../../library/ctypes.rst:2148 +#: ../../../library/ctypes.rst:2188 msgid "Utility functions" msgstr "" -#: ../../../library/ctypes.rst:2152 +#: ../../../library/ctypes.rst:2192 msgid "" "Returns the address of the memory buffer as integer. *obj* must be an " "instance of a ctypes type." msgstr "" -#: ../../../library/ctypes.rst:2155 +#: ../../../library/ctypes.rst:2195 msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." msgstr "" -#: ../../../library/ctypes.rst:2160 +#: ../../../library/ctypes.rst:2200 msgid "" "Returns the alignment requirements of a ctypes type. *obj_or_type* must be a " "ctypes type or instance." msgstr "" -#: ../../../library/ctypes.rst:2166 +#: ../../../library/ctypes.rst:2206 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:2170 +#: ../../../library/ctypes.rst:2210 msgid "``byref(obj, offset)`` corresponds to this C code::" msgstr "" -#: ../../../library/ctypes.rst:2174 +#: ../../../library/ctypes.rst:2214 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:2180 +#: ../../../library/ctypes.rst:2220 msgid "" "Copies a COM pointer from *src* to *dst* and returns the Windows specific :c:" "type:`!HRESULT` value." msgstr "" -#: ../../../library/ctypes.rst:2183 +#: ../../../library/ctypes.rst:2223 msgid "" "If *src* is not ``NULL``, its ``AddRef`` method is called, incrementing the " "reference count." msgstr "" -#: ../../../library/ctypes.rst:2186 +#: ../../../library/ctypes.rst:2226 msgid "" "In contrast, the reference count of *dst* will not be decremented before " "assigning the new value. Unless *dst* is ``NULL``, the caller is responsible " @@ -2336,7 +2370,7 @@ msgid "" "necessary." msgstr "" -#: ../../../library/ctypes.rst:2198 +#: ../../../library/ctypes.rst:2238 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* " @@ -2344,85 +2378,81 @@ msgid "" "as a pointer." msgstr "" -#: ../../../library/ctypes.rst:2207 +#: ../../../library/ctypes.rst:2247 msgid "" "This function creates a mutable character buffer. The returned object is a " "ctypes array of :class:`c_char`." msgstr "" -#: ../../../library/ctypes.rst:2210 +#: ../../../library/ctypes.rst:2250 msgid "" "If *size* is given (and not ``None``), it must be an :class:`int`. It " "specifies the size of the returned array." msgstr "" -#: ../../../library/ctypes.rst:2213 +#: ../../../library/ctypes.rst:2253 msgid "" "If the *init* argument is given, it must be :class:`bytes`. It is used to " "initialize the array items. Bytes not initialized this way are set to zero " "(NUL)." msgstr "" -#: ../../../library/ctypes.rst:2217 +#: ../../../library/ctypes.rst:2257 msgid "" "If *size* is not given (or if it is ``None``), the buffer is made one " "element larger than *init*, effectively adding a NUL terminator." msgstr "" -#: ../../../library/ctypes.rst:2220 +#: ../../../library/ctypes.rst:2260 msgid "" "If both arguments are given, *size* must not be less than ``len(init)``." msgstr "" -#: ../../../library/ctypes.rst:2224 +#: ../../../library/ctypes.rst:2264 msgid "" "If *size* is equal to ``len(init)``, a NUL terminator is not added. Do not " "treat such a buffer as a C string." msgstr "" -#: ../../../library/ctypes.rst:2227 -msgid "For example::" -msgstr "" - -#: ../../../library/ctypes.rst:2242 +#: ../../../library/ctypes.rst:2282 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: ../../../library/ctypes.rst:2248 +#: ../../../library/ctypes.rst:2288 msgid "" "This function creates a mutable unicode character buffer. The returned " "object is a ctypes array of :class:`c_wchar`." msgstr "" -#: ../../../library/ctypes.rst:2251 +#: ../../../library/ctypes.rst:2291 msgid "" "The function takes the same arguments as :func:`~create_string_buffer` " "except *init* must be a string and *size* counts :class:`c_wchar`." msgstr "" -#: ../../../library/ctypes.rst:2254 +#: ../../../library/ctypes.rst:2294 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: ../../../library/ctypes.rst:2259 +#: ../../../library/ctypes.rst:2299 msgid "" "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:2268 +#: ../../../library/ctypes.rst:2308 msgid "" "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:2278 +#: ../../../library/ctypes.rst:2318 msgid "" "Try to provide a list of paths of the shared libraries loaded into the " "current process. These paths are not normalized or processed in any way. " @@ -2430,72 +2460,72 @@ msgid "" "The exact functionality is system dependent." msgstr "" -#: ../../../library/ctypes.rst:2283 +#: ../../../library/ctypes.rst:2323 msgid "" "On most platforms, the first element of the list represents the current " "executable file. It may be an empty string." msgstr "" -#: ../../../library/ctypes.rst:2291 +#: ../../../library/ctypes.rst:2331 msgid "" "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 :" "func:`GetLastError`." msgstr "" -#: ../../../library/ctypes.rst:2300 +#: ../../../library/ctypes.rst:2340 msgid "" "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:2309 +#: ../../../library/ctypes.rst:2349 msgid "" "Returns the current value of the ctypes-private copy of the system :data:" "`errno` variable in the calling thread." msgstr "" -#: ../../../library/ctypes.rst:2312 +#: ../../../library/ctypes.rst:2352 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " "arguments." msgstr "" -#: ../../../library/ctypes.rst:2316 +#: ../../../library/ctypes.rst:2356 msgid "" "Returns the current value of the ctypes-private copy of the system :data:`!" "LastError` variable in the calling thread." msgstr "" -#: ../../../library/ctypes.rst:2321 +#: ../../../library/ctypes.rst:2361 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " "arguments." msgstr "" -#: ../../../library/ctypes.rst:2326 +#: ../../../library/ctypes.rst:2366 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:2333 +#: ../../../library/ctypes.rst:2373 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:2340 +#: ../../../library/ctypes.rst:2380 msgid "" "Create or return a 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:2346 +#: ../../../library/ctypes.rst:2386 msgid "" "The resulting pointer type is cached in the ``__pointer_type__`` attribute " "of *type*. It is possible to set this attribute before the first call to " @@ -2504,19 +2534,19 @@ msgid "" "relying on implementation details that may change in future Python versions." msgstr "" -#: ../../../library/ctypes.rst:2357 +#: ../../../library/ctypes.rst:2397 msgid "" "Create a new pointer instance, pointing to *obj*. The returned object is of " "the type ``POINTER(type(obj))``." msgstr "" -#: ../../../library/ctypes.rst:2360 +#: ../../../library/ctypes.rst:2400 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:2366 +#: ../../../library/ctypes.rst:2406 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 " @@ -2524,50 +2554,50 @@ msgid "" "but it is possible to enlarge the buffer." msgstr "" -#: ../../../library/ctypes.rst:2374 +#: ../../../library/ctypes.rst:2414 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:2377 +#: ../../../library/ctypes.rst:2417 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." msgstr "" -#: ../../../library/ctypes.rst:2382 +#: ../../../library/ctypes.rst:2422 msgid "" "Sets 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:2388 +#: ../../../library/ctypes.rst:2428 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " "argument ``error``." msgstr "" -#: ../../../library/ctypes.rst:2393 +#: ../../../library/ctypes.rst:2433 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:2399 +#: ../../../library/ctypes.rst:2439 msgid "" "Return the byte string at *void \\*ptr*. If *size* is specified, it is used " "as size, otherwise the string is assumed to be zero-terminated." msgstr "" -#: ../../../library/ctypes.rst:2403 +#: ../../../library/ctypes.rst:2443 msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " "arguments ``ptr``, ``size``." msgstr "" -#: ../../../library/ctypes.rst:2408 +#: ../../../library/ctypes.rst:2448 msgid "" "Creates an instance of :exc:`OSError`. If *code* is not specified, :func:" "`GetLastError` is called to determine the error code. If *descr* is not " @@ -2575,39 +2605,39 @@ msgid "" "error." msgstr "" -#: ../../../library/ctypes.rst:2415 +#: ../../../library/ctypes.rst:2455 msgid "" "An instance of :exc:`WindowsError` used to be created, which is now an alias " "of :exc:`OSError`." msgstr "" -#: ../../../library/ctypes.rst:2422 +#: ../../../library/ctypes.rst:2462 msgid "" "Return the wide-character string at *void \\*ptr*. If *size* is specified, " "it is used as the number of characters of the string, otherwise the string " "is assumed to be zero-terminated." msgstr "" -#: ../../../library/ctypes.rst:2427 +#: ../../../library/ctypes.rst:2467 msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " "arguments ``ptr``, ``size``." msgstr "" -#: ../../../library/ctypes.rst:2432 +#: ../../../library/ctypes.rst:2472 msgid "" "Return a :class:`memoryview` object of length *size* that references memory " "starting at *void \\*ptr*." msgstr "" -#: ../../../library/ctypes.rst:2435 +#: ../../../library/ctypes.rst:2475 msgid "" "If *readonly* is true, the returned :class:`!memoryview` object can not be " "used to modify the underlying memory. (Changes made by other means will " "still be reflected in the returned object.)" msgstr "" -#: ../../../library/ctypes.rst:2440 +#: ../../../library/ctypes.rst:2480 msgid "" "This function is similar to :func:`string_at` with the key difference of not " "making a copy of the specified memory. It is a semantically equivalent (but " @@ -2617,17 +2647,17 @@ msgid "" "`~ctypes.byref` object.)" msgstr "" -#: ../../../library/ctypes.rst:2447 +#: ../../../library/ctypes.rst:2487 msgid "" "Raises an :ref:`auditing event ` ``ctypes.memoryview_at`` with " "arguments ``address``, ``size``, ``readonly``." msgstr "" -#: ../../../library/ctypes.rst:2455 +#: ../../../library/ctypes.rst:2495 msgid "Data types" msgstr "" -#: ../../../library/ctypes.rst:2460 +#: ../../../library/ctypes.rst:2500 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 " @@ -2637,13 +2667,13 @@ msgid "" "alive in case the memory block contains pointers." msgstr "" -#: ../../../library/ctypes.rst:2467 +#: ../../../library/ctypes.rst:2507 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:2472 +#: ../../../library/ctypes.rst:2512 msgid "" "This method returns a ctypes instance that shares the buffer of the *source* " "object. The *source* object must support the writeable buffer interface. " @@ -2652,13 +2682,13 @@ msgid "" "exc:`ValueError` is raised." msgstr "" -#: ../../../library/ctypes.rst:2478 ../../../library/ctypes.rst:2488 +#: ../../../library/ctypes.rst:2518 ../../../library/ctypes.rst:2528 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " "arguments ``pointer``, ``size``, ``offset``." msgstr "" -#: ../../../library/ctypes.rst:2482 +#: ../../../library/ctypes.rst:2522 msgid "" "This method creates a ctypes instance, copying the buffer from the *source* " "object buffer which must be readable. The optional *offset* parameter " @@ -2666,19 +2696,19 @@ msgid "" "If the source buffer is not large enough a :exc:`ValueError` is raised." msgstr "" -#: ../../../library/ctypes.rst:2492 +#: ../../../library/ctypes.rst:2532 msgid "" "This method returns a ctypes type instance using the memory specified by " "*address* which must be an integer." msgstr "" -#: ../../../library/ctypes.rst:2495 ../../../library/ctypes.rst:2497 +#: ../../../library/ctypes.rst:2535 ../../../library/ctypes.rst:2537 msgid "" "This method, and others that indirectly call this method, raises an :ref:" "`auditing event ` ``ctypes.cdata`` with argument ``address``." msgstr "" -#: ../../../library/ctypes.rst:2503 +#: ../../../library/ctypes.rst:2543 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 " @@ -2686,36 +2716,36 @@ msgid "" "object that can be used as a function call parameter." msgstr "" -#: ../../../library/ctypes.rst:2508 +#: ../../../library/ctypes.rst:2548 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:2514 +#: ../../../library/ctypes.rst:2554 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:2518 +#: ../../../library/ctypes.rst:2558 msgid "Common class variables of ctypes data types:" msgstr "" -#: ../../../library/ctypes.rst:2522 +#: ../../../library/ctypes.rst:2562 msgid "" "The pointer type that was created by calling :func:`POINTER` for " "corresponding ctypes data type. If a pointer type was not yet created, the " "attribute is missing." msgstr "" -#: ../../../library/ctypes.rst:2528 +#: ../../../library/ctypes.rst:2568 msgid "Common instance variables of ctypes data types:" msgstr "" -#: ../../../library/ctypes.rst:2532 +#: ../../../library/ctypes.rst:2572 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:" @@ -2723,13 +2753,13 @@ msgid "" "block." msgstr "" -#: ../../../library/ctypes.rst:2539 +#: ../../../library/ctypes.rst:2579 msgid "" "This read-only variable is true when the ctypes data instance has allocated " "the memory block itself, false otherwise." msgstr "" -#: ../../../library/ctypes.rst:2544 +#: ../../../library/ctypes.rst:2584 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. " @@ -2737,7 +2767,7 @@ msgid "" "dictionary." msgstr "" -#: ../../../library/ctypes.rst:2557 +#: ../../../library/ctypes.rst:2597 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 " @@ -2746,11 +2776,11 @@ msgid "" "types that are not and do not contain pointers can now be pickled." msgstr "" -#: ../../../library/ctypes.rst:2563 +#: ../../../library/ctypes.rst:2603 msgid "Instances have a single attribute:" msgstr "" -#: ../../../library/ctypes.rst:2567 +#: ../../../library/ctypes.rst:2607 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 " @@ -2758,7 +2788,7 @@ msgid "" "bytes object or string." msgstr "" -#: ../../../library/ctypes.rst:2572 +#: ../../../library/ctypes.rst:2612 msgid "" "When the ``value`` attribute is retrieved from a ctypes instance, usually a " "new object is returned each time. :mod:`!ctypes` does *not* implement " @@ -2766,17 +2796,17 @@ msgid "" "true for all other ctypes object instances." msgstr "" -#: ../../../library/ctypes.rst:2577 +#: ../../../library/ctypes.rst:2617 msgid "Each subclass has a class attribute:" msgstr "" -#: ../../../library/ctypes.rst:2581 +#: ../../../library/ctypes.rst:2621 msgid "" "Class attribute that contains an internal type code, as a string. See :ref:" "`ctypes-fundamental-data-types` for a summary." msgstr "" -#: ../../../library/ctypes.rst:2584 +#: ../../../library/ctypes.rst:2624 msgid "" "Types marked \\* in the summary may be (or always are) aliases of a " "different :class:`_SimpleCData` subclass, and will not necessarily use the " @@ -2787,7 +2817,7 @@ msgid "" "code will be unused." msgstr "" -#: ../../../library/ctypes.rst:2595 +#: ../../../library/ctypes.rst:2635 msgid "" "The :mod:`array` and :ref:`struct ` modules, as well as third-" "party modules like `numpy `." msgstr "" -#: ../../../library/ctypes.rst:3119 +#: ../../../library/ctypes.rst:3159 msgid "Offset of the field, in bytes." msgstr "" -#: ../../../library/ctypes.rst:3121 +#: ../../../library/ctypes.rst:3161 msgid "" "For bitfields, this is the offset of the underlying byte-aligned *storage " "unit*; see :attr:`~CField.bit_offset`." msgstr "" -#: ../../../library/ctypes.rst:3126 +#: ../../../library/ctypes.rst:3166 msgid "Size of the field, in bytes." msgstr "" -#: ../../../library/ctypes.rst:3128 +#: ../../../library/ctypes.rst:3168 msgid "" "For bitfields, this is the size of the underlying *storage unit*. Typically, " "it has the same size as the bitfield's type." msgstr "" -#: ../../../library/ctypes.rst:3133 +#: ../../../library/ctypes.rst:3173 msgid "For non-bitfields, equivalent to :attr:`~CField.byte_size`." msgstr "" -#: ../../../library/ctypes.rst:3135 +#: ../../../library/ctypes.rst:3175 msgid "" "For bitfields, this contains a backwards-compatible bit-packed value that " "combines :attr:`~CField.bit_size` and :attr:`~CField.bit_offset`. Prefer " "using the explicit attributes instead." msgstr "" -#: ../../../library/ctypes.rst:3142 +#: ../../../library/ctypes.rst:3182 msgid "True if this is a bitfield." msgstr "" -#: ../../../library/ctypes.rst:3147 +#: ../../../library/ctypes.rst:3187 msgid "" "The location of a bitfield within its *storage unit*, that is, within :attr:" "`~CField.byte_size` bytes of memory starting at :attr:`~CField.byte_offset`." msgstr "" -#: ../../../library/ctypes.rst:3151 +#: ../../../library/ctypes.rst:3191 msgid "" "To get the field's value, read the storage unit as an integer, :ref:`shift " "left ` by :attr:`!bit_offset` and take the :attr:`!bit_size` least " "significant bits." msgstr "" -#: ../../../library/ctypes.rst:3155 +#: ../../../library/ctypes.rst:3195 msgid "" "For non-bitfields, :attr:`!bit_offset` is zero and :attr:`!bit_size` is " "equal to ``byte_size * 8``." msgstr "" -#: ../../../library/ctypes.rst:3160 +#: ../../../library/ctypes.rst:3200 msgid "" "True if this field is anonymous, that is, it contains nested sub-fields that " "should be merged into a containing structure or union." msgstr "" -#: ../../../library/ctypes.rst:3167 +#: ../../../library/ctypes.rst:3207 +msgid "" +"A :term:`decorator` that allows generating structure types using an " +"annotation-based syntax, similar to the :mod:`dataclasses` module." +msgstr "" + +#: ../../../library/ctypes.rst:3210 +msgid "For example:" +msgstr "" + +#: ../../../library/ctypes.rst:3224 +msgid "" +"*align*, *layout*, and *pack* supply the value for the :attr:`~ctypes." +"Structure._align_`, :attr:`~ctypes.Structure._layout_`, and :attr:`~ctypes." +"Structure._pack_` attributes, respectively." +msgstr "" + +#: ../../../library/ctypes.rst:3228 +msgid "*endian* controls which structure class will be used as the base." +msgstr "" + +#: ../../../library/ctypes.rst:3230 +msgid "If *endian* is ``'native'``, :class:`~ctypes.Structure` will be used." +msgstr "" + +#: ../../../library/ctypes.rst:3231 +msgid "" +"If *endian* is ``'big'``, :class:`~ctypes.BigEndianStructure` will be used." +msgstr "" + +#: ../../../library/ctypes.rst:3232 +msgid "" +"If *endian* is ``'little'``, :class:`~ctypes.LittleEndianStructure` will be " +"used." +msgstr "" + +#: ../../../library/ctypes.rst:3234 +msgid "Any other value will raise a :class:`ValueError`." +msgstr "" + +#: ../../../library/ctypes.rst:3236 +msgid "" +"For controlling field-specific data, wrap the annotation in :class:`typing." +"Annotated` with :class:`CFieldInfo` as the second argument, like so:" +msgstr "" + +#: ../../../library/ctypes.rst:3256 +msgid "" +"Information regarding a structure field defined by the :func:`struct` " +"decorator. This should be used in the second argument of a :class:`typing." +"Annotated` wrapping a ctypes type." +msgstr "" + +#: ../../../library/ctypes.rst:3260 +msgid "" +"*anonymous* specifies whether the field will be present in the :attr:" +"`~ctypes.Structure._anonymous_` attribute of the generated class." +msgstr "" + +#: ../../../library/ctypes.rst:3263 +msgid "" +"If *bit_width* is non-``None``, the annotated field will be *bit_width* " +"number of bits in the generated structure. This is equivalent to passing a " +"third item in :attr:`~ctypes.Structure._fields_`." +msgstr "" + +#: ../../../library/ctypes.rst:3273 msgid "Arrays and pointers" msgstr "" -#: ../../../library/ctypes.rst:3171 +#: ../../../library/ctypes.rst:3277 msgid "Abstract base class for arrays." msgstr "" -#: ../../../library/ctypes.rst:3173 +#: ../../../library/ctypes.rst:3279 msgid "" "The recommended way to create concrete array types is by multiplying any :" "mod:`!ctypes` data type with a non-negative integer. Alternatively, you can " @@ -3420,48 +3516,48 @@ msgid "" "an :class:`Array`." msgstr "" -#: ../../../library/ctypes.rst:3180 +#: ../../../library/ctypes.rst:3286 msgid "Arrays are :ref:`generic ` over the type of their elements." msgstr "" -#: ../../../library/ctypes.rst:3185 +#: ../../../library/ctypes.rst:3291 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:3192 +#: ../../../library/ctypes.rst:3298 msgid "Specifies the type of each element in the array." msgstr "" -#: ../../../library/ctypes.rst:3195 +#: ../../../library/ctypes.rst:3301 msgid "" "Array subclass constructors accept positional arguments, used to initialize " "the elements in order." msgstr "" -#: ../../../library/ctypes.rst:3200 +#: ../../../library/ctypes.rst:3306 msgid "" "Create an array. Equivalent to ``type * length``, where *type* is a :mod:`!" "ctypes` data type and *length* an integer." msgstr "" -#: ../../../library/ctypes.rst:3204 +#: ../../../library/ctypes.rst:3310 msgid "In favor of multiplication." msgstr "" -#: ../../../library/ctypes.rst:3210 +#: ../../../library/ctypes.rst:3316 msgid "Private, abstract base class for pointers." msgstr "" -#: ../../../library/ctypes.rst:3212 +#: ../../../library/ctypes.rst:3318 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:3216 +#: ../../../library/ctypes.rst:3322 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 :" @@ -3470,43 +3566,43 @@ msgid "" "probably crash with an access violation (if you're lucky)." msgstr "" -#: ../../../library/ctypes.rst:3226 +#: ../../../library/ctypes.rst:3332 msgid "Specifies the type pointed to." msgstr "" -#: ../../../library/ctypes.rst:3230 +#: ../../../library/ctypes.rst:3336 msgid "" "Returns the object to which to pointer points. Assigning to this attribute " "changes the pointer to point to the assigned object." msgstr "" -#: ../../../library/ctypes.rst:3237 +#: ../../../library/ctypes.rst:3343 msgid "Exceptions" msgstr "" -#: ../../../library/ctypes.rst:3241 +#: ../../../library/ctypes.rst:3347 msgid "" "This exception is raised when a foreign function call cannot convert one of " "the passed arguments." msgstr "" -#: ../../../library/ctypes.rst:3247 +#: ../../../library/ctypes.rst:3353 msgid "This exception is raised when a COM method call failed." msgstr "" -#: ../../../library/ctypes.rst:3251 +#: ../../../library/ctypes.rst:3357 msgid "The integer value representing the error code." msgstr "" -#: ../../../library/ctypes.rst:3255 +#: ../../../library/ctypes.rst:3361 msgid "The error message." msgstr "" -#: ../../../library/ctypes.rst:3259 +#: ../../../library/ctypes.rst:3365 msgid "The 5-tuple ``(descr, source, helpfile, helpcontext, progid)``." msgstr "" -#: ../../../library/ctypes.rst:3261 +#: ../../../library/ctypes.rst:3367 msgid "" "*descr* is the textual description. *source* is the language-dependent " "``ProgID`` for the class or application that raised the error. *helpfile* " diff --git a/main/locale/pot/LC_MESSAGES/library/curses.ascii.pot b/main/locale/pot/LC_MESSAGES/library/curses.ascii.pot index e93abd3453a..dd1dc4f4a2f 100644 --- a/main/locale/pot/LC_MESSAGES/library/curses.ascii.pot +++ b/main/locale/pot/LC_MESSAGES/library/curses.ascii.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -270,47 +270,56 @@ msgstr "" #: ../../../library/curses.ascii.rst:179 msgid "" -"These functions accept either integers or single-character strings; when the " -"argument is a string, it is first converted using the built-in function :" -"func:`ord`." +"These functions accept an integer, a single-character string, or a :class:" +"`curses.complexchar`. A string is converted using the built-in function :" +"func:`ord`, and a complexchar by the code of its single character; a " +"complexchar that holds combining characters is not a single character and " +"matches no class." msgstr "" -#: ../../../library/curses.ascii.rst:182 +#: ../../../library/curses.ascii.rst:185 msgid "" "Note that all these functions check ordinal bit values derived from the " "character of the string you pass in; they do not actually know anything " "about the host machine's character encoding." msgstr "" -#: ../../../library/curses.ascii.rst:186 +#: ../../../library/curses.ascii.rst:189 msgid "" -"The following two functions take either a single-character string or integer " -"byte value; they return a value of the same type." +"The following three functions take either a single-character string or an " +"integer byte value; they return a value of the same type." msgstr "" -#: ../../../library/curses.ascii.rst:192 +#: ../../../library/curses.ascii.rst:195 msgid "Return the ASCII value corresponding to the low 7 bits of *c*." msgstr "" -#: ../../../library/curses.ascii.rst:197 +#: ../../../library/curses.ascii.rst:200 msgid "" -"Return the control character corresponding to the given character (the " -"character bit value is bitwise-anded with 0x1f)." +"Return the control character corresponding to the given ASCII character (the " +"character bit value is bitwise-anded with 0x1f). A non-ASCII character has " +"no control character and is returned unchanged." msgstr "" -#: ../../../library/curses.ascii.rst:203 +#: ../../../library/curses.ascii.rst:204 +msgid "" +"A non-ASCII argument is now returned unchanged instead of masked to a " +"control character." +msgstr "" + +#: ../../../library/curses.ascii.rst:211 msgid "" "Return the 8-bit character corresponding to the given ASCII character (the " "character bit value is bitwise-ored with 0x80)." msgstr "" -#: ../../../library/curses.ascii.rst:206 +#: ../../../library/curses.ascii.rst:214 msgid "" -"The following function takes either a single-character string or integer " -"value; it returns a string." +"The following function takes a single-character string, an integer value, or " +"a :class:`curses.complexchar`; it returns a string." msgstr "" -#: ../../../library/curses.ascii.rst:216 +#: ../../../library/curses.ascii.rst:225 msgid "" "Return a string representation of the ASCII character *c*. If *c* is " "printable, this string is the character itself. If the character is a " @@ -321,21 +330,21 @@ msgid "" "``'!'`` prepended to the result." msgstr "" -#: ../../../library/curses.ascii.rst:226 +#: ../../../library/curses.ascii.rst:235 msgid "" "A 33-element string array that contains the ASCII mnemonics for the thirty-" "two ASCII control characters from 0 (NUL) to 0x1f (US), in order, plus the " "mnemonic ``SP`` for the space character." msgstr "" -#: ../../../library/curses.ascii.rst:210 +#: ../../../library/curses.ascii.rst:219 msgid "^ (caret)" msgstr "" -#: ../../../library/curses.ascii.rst:210 +#: ../../../library/curses.ascii.rst:219 msgid "in curses module" msgstr "" -#: ../../../library/curses.ascii.rst:210 +#: ../../../library/curses.ascii.rst:219 msgid "! (exclamation)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/curses.panel.pot b/main/locale/pot/LC_MESSAGES/library/curses.panel.pot index 036b181b5bc..5a4e6f3b87c 100644 --- a/main/locale/pot/LC_MESSAGES/library/curses.panel.pot +++ b/main/locale/pot/LC_MESSAGES/library/curses.panel.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -33,14 +33,22 @@ msgid "Functions" msgstr "" #: ../../../library/curses.panel.rst:19 -msgid "The module :mod:`!curses.panel` defines the following functions:" +msgid "The module :mod:`!curses.panel` defines the following exception:" msgstr "" #: ../../../library/curses.panel.rst:24 +msgid "Exception raised when a curses panel library function returns an error." +msgstr "" + +#: ../../../library/curses.panel.rst:27 +msgid "The module :mod:`!curses.panel` defines the following functions:" +msgstr "" + +#: ../../../library/curses.panel.rst:32 msgid "Returns the bottom panel in the panel stack." msgstr "" -#: ../../../library/curses.panel.rst:29 +#: ../../../library/curses.panel.rst:37 msgid "" "Returns a panel object, associating it with the given window *win* and " "placing the new panel on top of the panel stack. Be aware that you need to " @@ -48,84 +56,101 @@ msgid "" "panel object is garbage collected and removed from the panel stack." msgstr "" -#: ../../../library/curses.panel.rst:37 +#: ../../../library/curses.panel.rst:45 msgid "Returns the top panel in the panel stack." msgstr "" -#: ../../../library/curses.panel.rst:42 +#: ../../../library/curses.panel.rst:50 msgid "" "Updates the virtual screen after changes in the panel stack. This does not " "call :func:`curses.doupdate`, so you'll have to do this yourself." msgstr "" -#: ../../../library/curses.panel.rst:49 +#: ../../../library/curses.panel.rst:57 msgid "Panel objects" msgstr "" -#: ../../../library/curses.panel.rst:51 +#: ../../../library/curses.panel.rst:59 +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"" +msgstr "" + +#: ../../../library/curses.panel.rst:77 msgid "" "Panel objects, as returned by :func:`new_panel` above, are windows with a " -"stacking order. There's always a window associated with a panel which " +"stacking order. There's always a window associated with a panel which " "determines the content, while the panel methods are responsible for the " "window's depth in the panel stack." msgstr "" -#: ../../../library/curses.panel.rst:56 +#: ../../../library/curses.panel.rst:82 msgid "Panel objects have the following methods:" msgstr "" -#: ../../../library/curses.panel.rst:61 +#: ../../../library/curses.panel.rst:87 msgid "Returns the panel above the current panel." msgstr "" -#: ../../../library/curses.panel.rst:66 +#: ../../../library/curses.panel.rst:92 msgid "Returns the panel below the current panel." msgstr "" -#: ../../../library/curses.panel.rst:71 +#: ../../../library/curses.panel.rst:97 msgid "Push the panel to the bottom of the stack." msgstr "" -#: ../../../library/curses.panel.rst:76 +#: ../../../library/curses.panel.rst:102 msgid "" "Returns ``True`` if the panel is hidden (not visible), ``False`` otherwise." msgstr "" -#: ../../../library/curses.panel.rst:81 +#: ../../../library/curses.panel.rst:107 msgid "" "Hide the panel. This does not delete the object, it just makes the window on " "screen invisible." msgstr "" -#: ../../../library/curses.panel.rst:87 +#: ../../../library/curses.panel.rst:113 msgid "Move the panel to the screen coordinates ``(y, x)``." msgstr "" -#: ../../../library/curses.panel.rst:92 +#: ../../../library/curses.panel.rst:118 msgid "Change the window associated with the panel to the window *win*." msgstr "" -#: ../../../library/curses.panel.rst:97 +#: ../../../library/curses.panel.rst:123 msgid "" "Set the panel's user pointer to *obj*. This is used to associate an " "arbitrary piece of data with the panel, and can be any Python object." msgstr "" -#: ../../../library/curses.panel.rst:103 +#: ../../../library/curses.panel.rst:129 msgid "" "Display the panel (which might have been hidden), placing it on top of the " "panel stack." msgstr "" -#: ../../../library/curses.panel.rst:109 +#: ../../../library/curses.panel.rst:135 msgid "Push panel to the top of the stack." msgstr "" -#: ../../../library/curses.panel.rst:114 +#: ../../../library/curses.panel.rst:140 msgid "" "Returns the user pointer for the panel. This might be any Python object." msgstr "" -#: ../../../library/curses.panel.rst:119 +#: ../../../library/curses.panel.rst:145 msgid "Returns the window object associated with the panel." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/curses.pot b/main/locale/pot/LC_MESSAGES/library/curses.pot index e86ee6becb2..338c2688ccb 100644 --- a/main/locale/pot/LC_MESSAGES/library/curses.pot +++ b/main/locale/pot/LC_MESSAGES/library/curses.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -130,84 +130,97 @@ msgstr "" msgid "The module :mod:`!curses` defines the following functions:" msgstr "" -#: ../../../library/curses.rst:73 -msgid "" -"Allow use of default values for colors on terminals supporting this feature. " -"Use this to support transparency in your application." +#: ../../../library/curses.rst:72 +msgid "Initialization and termination" msgstr "" #: ../../../library/curses.rst:76 msgid "" -"Assign terminal default foreground/background colors to color number ``-1``. " -"So ``init_pair(x, COLOR_RED, -1)`` will initialize pair *x* as red on " -"default background and ``init_pair(x, -1, COLOR_BLUE)`` will initialize pair " -"*x* as default foreground on blue." +"Initialize the library. Return a :ref:`window ` " +"object which represents the whole screen." msgstr "" -#: ../../../library/curses.rst:81 -msgid "Change the definition of the color-pair ``0`` to ``(fg, bg)``." +#: ../../../library/curses.rst:79 ../../../library/curses.rst:111 +msgid "" +"See :func:`setupterm` for a caveat about calling it before this function." msgstr "" #: ../../../library/curses.rst:83 -msgid "This is an ncurses extension." +msgid "" +"If there is an error opening the terminal, the underlying curses library may " +"cause the interpreter to exit." +msgstr "" + +#: ../../../library/curses.rst:88 +msgid "De-initialize the library, and return terminal to normal status." msgstr "" -#: ../../../library/curses.rst:90 +#: ../../../library/curses.rst:92 msgid "" -"Return the output speed of the terminal in bits per second. On software " -"terminal emulators it will have a fixed high value. Included for historical " -"reasons; in former times, it was used to write output loops for time delays " -"and occasionally to change interfaces depending on the line speed." +"Return ``True`` if :func:`endwin` has been called (that is, the curses " +"library has been deinitialized)." msgstr "" -#: ../../../library/curses.rst:98 -msgid "Emit a short attention sound." +#: ../../../library/curses.rst:97 +msgid "" +"Initialize a new terminal in addition to the one initialized by :func:" +"`initscr`, and return a :ref:`screen ` for it. This " +"allows a program to drive more than one terminal." msgstr "" -#: ../../../library/curses.rst:103 +#: ../../../library/curses.rst:102 msgid "" -"Return ``True`` or ``False``, depending on whether the programmer can change " -"the colors displayed by the terminal." +"*type* is the terminal name, as in :func:`setupterm`; if ``None``, the value " +"of the :envvar:`TERM` environment variable is used. *fd* and *infd* are the " +"output and input files for the terminal: either a file object or a file " +"descriptor. They default to :data:`sys.stdout` and :data:`sys.stdin`." msgstr "" -#: ../../../library/curses.rst:109 +#: ../../../library/curses.rst:108 msgid "" -"Enter cbreak mode. In cbreak mode (sometimes called \"rare\" mode) normal " -"tty line buffering is turned off and characters are available to be read one " -"by one. However, unlike raw mode, special characters (interrupt, quit, " -"suspend, and flow control) retain their effects on the tty driver and " -"calling program. Calling first :func:`raw` then :func:`cbreak` leaves the " -"terminal in cbreak mode." +"The new screen becomes the current one. Use :func:`set_term` to switch " +"between screens." msgstr "" -#: ../../../library/curses.rst:118 +#: ../../../library/curses.rst:117 msgid "" -"Return the intensity of the red, green, and blue (RGB) components in the " -"color *color_number*, which must be between ``0`` and ``COLORS - 1``. " -"Return a 3-tuple, containing the R,G,B values for the given color, which " -"will be between ``0`` (no component) and ``1000`` (maximum amount of " -"component). Raise an exception if the color is not supported." +"Return a new :ref:`screen ` that can be used to call " +"functions that affect global state before :func:`initscr` or :func:`newterm` " +"is called." +msgstr "" + +#: ../../../library/curses.rst:121 +msgid "" +"Availability: if the underlying curses library provides ``new_prescr()``." msgstr "" #: ../../../library/curses.rst:127 msgid "" -"Return the attribute value for displaying text in the specified color pair. " -"Only the first 256 color pairs are supported. This attribute value can be " -"combined with :const:`A_STANDOUT`, :const:`A_REVERSE`, and the other :const:" -"`!A_\\*` attributes. :func:`pair_number` is the counterpart to this " -"function." +"Make *screen*, a :ref:`screen ` returned by :func:" +"`newterm`, the current terminal, and return the previously current screen. " +"Returns ``None`` if the previous screen was the one created by :func:" +"`initscr`." msgstr "" -#: ../../../library/curses.rst:136 +#: ../../../library/curses.rst:137 msgid "" -"Set the cursor state. *visibility* can be set to ``0``, ``1``, or ``2``, " -"for invisible, normal, or very visible. If the terminal supports the " -"visibility requested, return the previous cursor state; otherwise raise an " -"exception. On many terminals, the \"visible\" mode is an underline cursor " -"and the \"very visible\" mode is a block cursor." +"Initialize curses and call another callable object, *func*, which should be " +"the rest of your curses-using application. If the application raises an " +"exception, this function will restore the terminal to a sane state before re-" +"raising the exception and generating a traceback. The callable object " +"*func* is then passed the main window 'stdscr' as its first argument, " +"followed by any other arguments passed to :func:`!wrapper`. Before calling " +"*func*, :func:`!wrapper` turns on cbreak mode, turns off echo, enables the " +"terminal keypad, and initializes colors if the terminal has color support. " +"On exit (whether normally or by exception) it restores cooked mode, turns on " +"echo, and disables the terminal keypad." +msgstr "" + +#: ../../../library/curses.rst:149 +msgid "Terminal mode control" msgstr "" -#: ../../../library/curses.rst:145 +#: ../../../library/curses.rst:153 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, " @@ -215,7 +228,7 @@ msgid "" "`reset_prog_mode` will restore this mode." msgstr "" -#: ../../../library/curses.rst:153 +#: ../../../library/curses.rst:160 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\" " @@ -223,11 +236,53 @@ msgid "" "func:`reset_shell_mode` will restore this mode." msgstr "" -#: ../../../library/curses.rst:161 -msgid "Insert an *ms* millisecond pause in output." +#: ../../../library/curses.rst:167 +msgid "" +"Restore the terminal to \"program\" mode, as previously saved by :func:" +"`def_prog_mode`." +msgstr "" + +#: ../../../library/curses.rst:172 +msgid "" +"Restore the terminal to \"shell\" mode, as previously saved by :func:" +"`def_shell_mode`." +msgstr "" + +#: ../../../library/curses.rst:177 +msgid "" +"Save the current state of the terminal modes in a buffer, usable by :func:" +"`resetty`." +msgstr "" + +#: ../../../library/curses.rst:182 +msgid "" +"Restore the state of the terminal modes to what it was at the last call to :" +"func:`savetty`." +msgstr "" + +#: ../../../library/curses.rst:187 +msgid "" +"Set the cursor state. *visibility* can be set to ``0``, ``1``, or ``2``, " +"for invisible, normal, or very visible. If the terminal supports the " +"visibility requested, return the previous cursor state; otherwise raise an " +"exception. On many terminals, the \"visible\" mode is an underline cursor " +"and the \"very visible\" mode is a block cursor." +msgstr "" + +#: ../../../library/curses.rst:195 +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:200 +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:166 +#: ../../../library/curses.rst:205 msgid "" "Update the physical screen. The curses library keeps two data structures, " "one representing the current physical screen contents and a virtual screen " @@ -235,7 +290,7 @@ msgid "" "the physical screen to match the virtual screen." msgstr "" -#: ../../../library/curses.rst:171 +#: ../../../library/curses.rst:210 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 " @@ -246,202 +301,202 @@ msgid "" "func:`!doupdate`." msgstr "" -#: ../../../library/curses.rst:181 -msgid "" -"Enter echo mode. In echo mode, each character input is echoed to the screen " -"as it is entered." +#: ../../../library/curses.rst:219 ../../../library/curses.rst:1809 +msgid "Input options" msgstr "" -#: ../../../library/curses.rst:187 -msgid "De-initialize the library, and return terminal to normal status." +#: ../../../library/curses.rst:223 +msgid "" +"Enter cbreak mode. In cbreak mode (sometimes called \"rare\" mode) normal " +"tty line buffering is turned off and characters are available to be read one " +"by one. However, unlike raw mode, special characters (interrupt, quit, " +"suspend, and flow control) retain their effects on the tty driver and " +"calling program. Calling first :func:`raw` then :func:`cbreak` leaves the " +"terminal in cbreak mode." msgstr "" -#: ../../../library/curses.rst:192 +#: ../../../library/curses.rst:231 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." +"Leave cbreak mode. Return to normal \"cooked\" mode with line buffering." msgstr "" -#: ../../../library/curses.rst:199 +#: ../../../library/curses.rst:235 msgid "" -"The :func:`.filter` routine, if used, must be called before :func:`initscr` " -"is called. The effect is that, during the initialization, :envvar:`LINES` " -"is set to ``1``; the capabilities ``clear``, ``cup``, ``cud``, ``cud1``, " -"``cuu1``, ``cuu``, ``vpa`` are disabled; and the ``home`` string is set to " -"the value of ``cr``. The effect is that the cursor is confined to the " -"current line, and so are screen updates. This may be used for enabling " -"character-at-a-time line editing without touching the rest of the screen." +"Enter echo mode. In echo mode, each character input is echoed to the screen " +"as it is entered." msgstr "" -#: ../../../library/curses.rst:209 +#: ../../../library/curses.rst:240 +msgid "Leave echo mode. Echoing of input characters is turned off." +msgstr "" + +#: ../../../library/curses.rst:244 msgid "" -"Undo the effect of a previous :func:`.filter` call. Like :func:`.filter`, it " -"must be called before :func:`initscr` so that the next initialization uses " -"the full screen again." +"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:213 -msgid "Availability: if the underlying curses library provides ``nofilter()``." +#: ../../../library/curses.rst:250 +msgid "Leave raw mode. Return to normal \"cooked\" mode with line buffering." msgstr "" -#: ../../../library/curses.rst:220 +#: ../../../library/curses.rst:254 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`." +"Used for half-delay mode, which is similar to cbreak mode in that characters " +"typed by the user are immediately available to the program. However, after " +"blocking for *tenths* tenths of seconds, raise an exception if nothing has " +"been typed. The value of *tenths* must be a number between ``1`` and " +"``255``. Use :func:`nocbreak` to leave half-delay mode." msgstr "" -#: ../../../library/curses.rst:227 +#: ../../../library/curses.rst:262 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." +"If *flag* is ``True``, allow 8-bit characters to be input. If *flag* is " +"``False``, allow only 7-bit chars." msgstr "" -#: ../../../library/curses.rst:233 +#: ../../../library/curses.rst:267 msgid "" -"After :meth:`~window.getch` returns :const:`KEY_MOUSE` to signal a mouse " -"event, this method should be called to retrieve the queued mouse event, " -"represented as a 5-tuple ``(id, x, y, z, bstate)``. *id* is an ID value used " -"to distinguish multiple devices, and *x*, *y*, *z* are the event's " -"coordinates. (*z* is currently unused.) *bstate* is an integer value whose " -"bits will be set to indicate the type of event, and will be the bitwise OR " -"of one or more of the following constants, where *n* is the button number " -"from 1 to 5: :const:`BUTTONn_PRESSED`, :const:`BUTTONn_RELEASED`, :const:" -"`BUTTONn_CLICKED`, :const:`BUTTONn_DOUBLE_CLICKED`, :const:" -"`BUTTONn_TRIPLE_CLICKED`, :const:`BUTTON_SHIFT`, :const:`BUTTON_CTRL`, :" -"const:`BUTTON_ALT`." +"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:244 ../../../library/curses.rst:1855 -msgid "" -"The ``BUTTON5_*`` constants are now exposed if they are provided by the " -"underlying curses library." +#: ../../../library/curses.rst:271 +msgid "If *flag* is ``False``, the effect is the same as calling :func:`nonl`." msgstr "" -#: ../../../library/curses.rst:251 +#: ../../../library/curses.rst:275 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)``." +"Leave newline mode. Disable translation of return into newline on input, " +"and disable low-level translation of newline into newline/return on output " +"(but this does not change the behavior of ``addch('\\n')``, which always " +"does the equivalent of return and line feed on the virtual screen). With " +"translation off, curses can sometimes speed up vertical motion a little; " +"also, it will be able to detect the return key on input." msgstr "" -#: ../../../library/curses.rst:257 +#: ../../../library/curses.rst:284 msgid "" -"Read window-related data stored in the file by an earlier :meth:`window." -"putwin` call. The routine then creates and initializes a new window using " -"that data, returning the new window object. The *file* argument must be a " -"file object opened for reading in binary mode." +"If *flag* is ``True``, pressing an interrupt key (interrupt, break, or quit) " +"will flush all output in the terminal driver queue. If *flag* is ``False``, " +"no flushing is done." msgstr "" -#: ../../../library/curses.rst:265 +#: ../../../library/curses.rst:290 msgid "" -"Return ``True`` if the terminal can display colors; otherwise, return " -"``False``." +"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:269 +#: ../../../library/curses.rst:296 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 (for example, xterm-256color)." +"When the :func:`!noqiflush` routine is used, normal flush of input and " +"output queues associated with the ``INTR``, ``QUIT`` and ``SUSP`` characters " +"will not be done. You may want to call :func:`!noqiflush` in a signal " +"handler if you want output to continue as though the interrupt had not " +"occurred, after the handler exits." msgstr "" -#: ../../../library/curses.rst:273 -msgid "Extended color support requires ncurses version 6.1 or later." +#: ../../../library/curses.rst:303 +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:279 +#: ../../../library/curses.rst:306 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." +"The curses library does \"line-breakout optimization\" by looking for " +"typeahead periodically while updating the screen. If input is found, and it " +"is coming from a tty, the current update is postponed until refresh or " +"doupdate is called again, allowing faster response to commands typed in " +"advance. This function allows specifying a different file descriptor for " +"typeahead checking." msgstr "" -#: ../../../library/curses.rst:286 +#: ../../../library/curses.rst:314 msgid "" -"Return ``True`` if the terminal has insert- and delete-line capabilities, or " -"can simulate them using scrolling regions. This function is included for " -"historical reasons only, as all modern software terminal emulators have such " -"capabilities." +"Return ``True`` if cbreak mode (see :func:`cbreak`) is enabled, ``False`` " +"otherwise. Availability: ncurses 6.5 or later." msgstr "" -#: ../../../library/curses.rst:294 +#: ../../../library/curses.rst:322 msgid "" -"Take a key value *ch*, and return ``True`` if the current terminal type " -"recognizes a key with that value." +"Return ``True`` if echo mode (see :func:`echo`) is enabled, ``False`` " +"otherwise. Availability: ncurses 6.5 or later." msgstr "" -#: ../../../library/curses.rst:300 +#: ../../../library/curses.rst:330 msgid "" -"Used for half-delay mode, which is similar to cbreak mode in that characters " -"typed by the user are immediately available to the program. However, after " -"blocking for *tenths* tenths of seconds, raise an exception if nothing has " -"been typed. The value of *tenths* must be a number between ``1`` and " -"``255``. Use :func:`nocbreak` to leave half-delay mode." +"Return ``True`` if nl mode (see :func:`nl`) is enabled, ``False`` otherwise. " +"Availability: ncurses 6.5 or later." msgstr "" -#: ../../../library/curses.rst:309 +#: ../../../library/curses.rst:337 msgid "" -"Change the definition of a color, taking the number of the color to be " -"changed followed by three RGB values (for the amounts of red, green, and " -"blue components). The value of *color_number* must be between ``0`` and " -"``COLORS - 1``. Each of *r*, *g*, *b*, must be a value between ``0`` and " -"``1000``. When :func:`init_color` is used, all occurrences of that color on " -"the screen immediately change to the new definition. This function is a no-" -"op on most terminals; it is active only if :func:`can_change_color` returns " -"``True``." +"Return ``True`` if raw mode (see :func:`raw`) is enabled, ``False`` " +"otherwise. Availability: ncurses 6.5 or later." msgstr "" -#: ../../../library/curses.rst:320 -msgid "" -"Change the definition of a color-pair. It takes three arguments: the number " -"of the color-pair to be changed, the foreground color number, and the " -"background color number. The value of *pair_number* must be between ``1`` " -"and ``COLOR_PAIRS - 1`` (the ``0`` color pair can only be changed by :func:" -"`use_default_colors` and :func:`assume_default_colors`). The value of *fg* " -"and *bg* arguments must be between ``0`` and ``COLORS - 1``, or, after " -"calling :func:`!use_default_colors` or :func:`!assume_default_colors`, " -"``-1``. If the color-pair was previously initialized, the screen is " -"refreshed and all occurrences of that color-pair are changed to the new " -"definition." +#: ../../../library/curses.rst:345 +msgid "Keyboard input" msgstr "" -#: ../../../library/curses.rst:335 +#: ../../../library/curses.rst:349 msgid "" -"Initialize the library. Return a :ref:`window ` " -"object which represents the whole screen." +"Push *ch* so the next :meth:`~window.getch` or :meth:`~window.get_wch` will " +"return it." msgstr "" -#: ../../../library/curses.rst:340 +#: ../../../library/curses.rst:352 msgid "" -"If there is an error opening the terminal, the underlying curses library may " -"cause the interpreter to exit." +"*ch* may be an integer (a key code or character code), a byte, or a string " +"of length 1. A one-character string is pushed like :func:`unget_wch`; on a " +"narrow build it must encode to a single byte." msgstr "" -#: ../../../library/curses.rst:346 -msgid "" -"If *flag* is ``True``, pressing an interrupt key (interrupt, break, or quit) " -"will flush all output in the terminal driver queue. If *flag* is ``False``, " -"no flushing is done." +#: ../../../library/curses.rst:358 +msgid "Only one *ch* can be pushed before :meth:`!getch` is called." msgstr "" -#: ../../../library/curses.rst:353 +#: ../../../library/curses.rst:360 msgid "" -"Return ``True`` if :func:`resize_term` would modify the window structure, " -"``False`` otherwise." +"A one-character string argument is no longer required to encode to a single " +"byte, except on a narrow build." +msgstr "" + +#: ../../../library/curses.rst:366 +msgid "Push *ch* so the next :meth:`~window.get_wch` will return it." +msgstr "" + +#: ../../../library/curses.rst:370 +msgid "Only one *ch* can be pushed before :meth:`!get_wch` is called." msgstr "" -#: ../../../library/curses.rst:359 +#: ../../../library/curses.rst:374 msgid "" -"Return ``True`` if :func:`endwin` has been called (that is, the curses " -"library has been deinitialized)." +"Also available on a narrow build, where *ch* must encode to a single byte " +"(an 8-bit locale)." msgstr "" -#: ../../../library/curses.rst:365 +#: ../../../library/curses.rst:380 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 " +"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:385 +msgid "" +"Take a key value *ch*, and return ``True`` if the current terminal type " +"recognizes a key with that value." +msgstr "" + +#: ../../../library/curses.rst:390 +msgid "" +"Return the name of the key numbered *k* as a bytes object. The name of a " +"key generating printable ASCII character is the key's character. The name " "of a control-key combination is a two-byte bytes object consisting of a " "caret (``b'^'``) followed by the corresponding printable ASCII character. " "The name of an alt-key combination (128--255) is a bytes object consisting " @@ -449,40 +504,70 @@ msgid "" "character." msgstr "" -#: ../../../library/curses.rst:372 +#: ../../../library/curses.rst:397 msgid "Raise a :exc:`ValueError` if *k* is negative." msgstr "" -#: ../../../library/curses.rst:377 +#: ../../../library/curses.rst:401 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." +"Define an escape sequence *definition*, a string, as a key that generates " +"the key code *keycode*, so that :mod:`curses` interprets it like one of the " +"keys predefined in the terminal database." msgstr "" -#: ../../../library/curses.rst:384 +#: ../../../library/curses.rst:405 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`." +"If *definition* is ``None``, any existing binding for *keycode* is removed. " +"If *keycode* is zero or negative, any existing binding for *definition* is " +"removed." msgstr "" -#: ../../../library/curses.rst:391 +#: ../../../library/curses.rst:413 msgid "" -"If *flag* is ``True``, allow 8-bit characters to be input. If *flag* is " -"``False``, allow only 7-bit chars." +"Return the key code bound to the escape sequence *definition*, a string, " +"``0`` if no key code is bound to it, or ``-1`` if *definition* is a prefix " +"of a longer bound sequence (and so is ambiguous)." msgstr "" -#: ../../../library/curses.rst:397 +#: ../../../library/curses.rst:421 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 166 milliseconds, or one " -"sixth of a second. Use a negative *interval* to obtain the interval value " -"without changing it." +"Enable (if *enable* is true) or disable (otherwise) interpretation of the " +"key code *keycode*. Unlike :meth:`window.keypad`, this affects a single key " +"code rather than all of them." msgstr "" -#: ../../../library/curses.rst:405 +#: ../../../library/curses.rst:429 +msgid "Mouse" +msgstr "" + +#: ../../../library/curses.rst:433 +msgid "" +"After :meth:`~window.getch` returns :const:`KEY_MOUSE` to signal a mouse " +"event, this method should be called to retrieve the queued mouse event, " +"represented as a 5-tuple ``(id, x, y, z, bstate)``. *id* is an ID value used " +"to distinguish multiple devices, and *x*, *y*, *z* are the event's " +"coordinates. (*z* is currently unused.) *bstate* is an integer value whose " +"bits will be set to indicate the type of event, and will be the bitwise OR " +"of one or more of the following constants, where *n* is the button number " +"from 1 to 5: :const:`BUTTONn_PRESSED`, :const:`BUTTONn_RELEASED`, :const:" +"`BUTTONn_CLICKED`, :const:`BUTTONn_DOUBLE_CLICKED`, :const:" +"`BUTTONn_TRIPLE_CLICKED`, :const:`BUTTON_SHIFT`, :const:`BUTTON_CTRL`, :" +"const:`BUTTON_ALT`." +msgstr "" + +#: ../../../library/curses.rst:444 ../../../library/curses.rst:2671 +msgid "" +"The ``BUTTON5_*`` constants are now exposed if they are provided by the " +"underlying curses library." +msgstr "" + +#: ../../../library/curses.rst:450 +msgid "" +"Push a :const:`KEY_MOUSE` event onto the input queue, associating the given " +"state data with it." +msgstr "" + +#: ../../../library/curses.rst:455 msgid "" "Set the mouse events to be reported, and return a tuple ``(availmask, " "oldmask)``. *availmask* indicates which of the specified mouse events can " @@ -491,687 +576,840 @@ msgid "" "no mouse events are ever reported." msgstr "" -#: ../../../library/curses.rst:414 -msgid "Sleep for *ms* milliseconds." +#: ../../../library/curses.rst:463 +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 166 milliseconds, or one " +"sixth of a second. Use a negative *interval* to obtain the interval value " +"without changing it." msgstr "" -#: ../../../library/curses.rst:419 -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." +#: ../../../library/curses.rst:470 +msgid "Return ``True`` if the mouse driver has been successfully initialized." msgstr "" -#: ../../../library/curses.rst:422 +#: ../../../library/curses.rst:472 msgid "" -"A pad is like a window, except that it is not restricted by the screen size, " -"and is not necessarily associated with a particular part of the screen. " -"Pads can be used when a large window is needed, and only a part of the " -"window will be on the screen at one time. Automatic refreshes of pads (such " -"as from scrolling or echoing of input) do not occur. The :meth:`~window." -"refresh` and :meth:`~window.noutrefresh` methods of a pad require 6 " -"arguments to specify the part of the pad to be displayed and the location on " -"the screen to be used for the display. The arguments are *pminrow*, " -"*pmincol*, *sminrow*, *smincol*, *smaxrow*, *smaxcol*; the *p* arguments " -"refer to the upper-left corner of the pad region to be displayed and the *s* " -"arguments define a clipping box on the screen within which the pad region is " -"to be displayed." +"Availability: if the underlying curses library provides ``has_mouse()``." msgstr "" -#: ../../../library/curses.rst:438 -msgid "" -"Return a new :ref:`window `, whose left-upper corner " -"is at ``(begin_y, begin_x)``, and whose height/width is *nlines*/*ncols*." +#: ../../../library/curses.rst:478 ../../../library/curses.rst:2681 +msgid "Color" msgstr "" -#: ../../../library/curses.rst:441 +#: ../../../library/curses.rst:482 msgid "" -"By default, the window will extend from the specified position to the lower " -"right corner of the screen." +"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:447 +#: ../../../library/curses.rst:486 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." +":func:`start_color` initializes eight basic colors (black, red, green, " +"yellow, blue, magenta, cyan, and white), and two global variables in the :" +"mod:`!curses` module, :const:`COLORS` and :const:`COLOR_PAIRS`, containing " +"the maximum number of colors and color-pairs the terminal can support. It " +"also restores the colors on the terminal to the values they had when the " +"terminal was just turned on." msgstr "" -#: ../../../library/curses.rst:451 -msgid "If *flag* is ``False``, the effect is the same as calling :func:`nonl`." +#: ../../../library/curses.rst:494 +msgid "" +"Return ``True`` if the terminal can display colors; otherwise, return " +"``False``." msgstr "" -#: ../../../library/curses.rst:456 +#: ../../../library/curses.rst:498 msgid "" -"Leave cbreak mode. Return to normal \"cooked\" mode with line buffering." +"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 (for example, xterm-256color)." msgstr "" -#: ../../../library/curses.rst:461 -msgid "Leave echo mode. Echoing of input characters is turned off." +#: ../../../library/curses.rst:502 +msgid "Extended color support requires ncurses version 6.1 or later." msgstr "" -#: ../../../library/curses.rst:466 +#: ../../../library/curses.rst:508 msgid "" -"Leave newline mode. Disable translation of return into newline on input, " -"and disable low-level translation of newline into newline/return on output " -"(but this does not change the behavior of ``addch('\\n')``, which always " -"does the equivalent of return and line feed on the virtual screen). With " -"translation off, curses can sometimes speed up vertical motion a little; " -"also, it will be able to detect the return key on input." +"Return ``True`` or ``False``, depending on whether the programmer can change " +"the colors displayed by the terminal." msgstr "" -#: ../../../library/curses.rst:476 +#: ../../../library/curses.rst:513 msgid "" -"When the :func:`!noqiflush` routine is used, normal flush of input and " -"output queues associated with the ``INTR``, ``QUIT`` and ``SUSP`` characters " -"will not be done. You may want to call :func:`!noqiflush` in a signal " -"handler if you want output to continue as though the interrupt had not " -"occurred, after the handler exits." +"Change the definition of a color, taking the number of the color to be " +"changed followed by three RGB values (for the amounts of red, green, and " +"blue components). The value of *color_number* must be between ``0`` and " +"``COLORS - 1``. Each of *r*, *g*, *b*, must be a value between ``0`` and " +"``1000``. When :func:`init_color` is used, all occurrences of that color on " +"the screen immediately change to the new definition. This function is a no-" +"op on most terminals; it is active only if :func:`can_change_color` returns " +"``True``." msgstr "" -#: ../../../library/curses.rst:484 -msgid "Leave raw mode. Return to normal \"cooked\" mode with line buffering." +#: ../../../library/curses.rst:523 +msgid "" +"Return the intensity of the red, green, and blue (RGB) components in the " +"color *color_number*, which must be between ``0`` and ``COLORS - 1``. " +"Return a 3-tuple, containing the R,G,B values for the given color, which " +"will be between ``0`` (no component) and ``1000`` (maximum amount of " +"component). Raise an exception if the color is not supported." +msgstr "" + +#: ../../../library/curses.rst:531 +msgid "" +"Change the definition of a color-pair. It takes three arguments: the number " +"of the color-pair to be changed, the foreground color number, and the " +"background color number. The value of *pair_number* must be between ``1`` " +"and ``COLOR_PAIRS - 1`` (the ``0`` color pair can only be changed by :func:" +"`use_default_colors` and :func:`assume_default_colors`). The value of *fg* " +"and *bg* arguments must be between ``0`` and ``COLORS - 1``, or, after " +"calling :func:`!use_default_colors` or :func:`!assume_default_colors`, " +"``-1``. If the color-pair was previously initialized, the screen is " +"refreshed and all occurrences of that color-pair are changed to the new " +"definition." msgstr "" -#: ../../../library/curses.rst:489 +#: ../../../library/curses.rst:545 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:495 +#: ../../../library/curses.rst:550 msgid "" -"Return the number of the color-pair set by the attribute value *attr*. :func:" -"`color_pair` is the counterpart to this function." +"Return the attribute value for displaying text in the specified color pair. " +"Only color pairs that fit in the color-pair field of the returned value can " +"be represented (usually the first 256); a larger *pair_number* raises :exc:" +"`OverflowError` rather than being silently masked to a different pair. Use :" +"meth:`~window.color_set` or :meth:`~window.attr_set` to display higher " +"pairs. This attribute value can be combined with :const:`A_STANDOUT`, :" +"const:`A_REVERSE`, and the other :const:`!A_\\*` attributes. :func:" +"`pair_number` is the counterpart to this function." msgstr "" -#: ../../../library/curses.rst:501 +#: ../../../library/curses.rst:561 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." +"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:505 ../../../library/curses.rst:641 -#: ../../../library/curses.rst:651 ../../../library/curses.rst:661 -#: ../../../library/curses.rst:671 -msgid ":func:`setupterm` (or :func:`initscr`) must be called first." +#: ../../../library/curses.rst:566 +msgid "Equivalent to ``assume_default_colors(-1, -1)``." msgstr "" -#: ../../../library/curses.rst:510 +#: ../../../library/curses.rst:570 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." +"Allow use of default values for colors on terminals supporting this feature. " +"Use this to support transparency in your application." msgstr "" -#: ../../../library/curses.rst:517 +#: ../../../library/curses.rst:573 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." +"Assign terminal default foreground/background colors to color number ``-1``. " +"So ``init_pair(x, COLOR_RED, -1)`` will initialize pair *x* as red on " +"default background and ``init_pair(x, -1, COLOR_BLUE)`` will initialize pair " +"*x* as default foreground on blue." msgstr "" -#: ../../../library/curses.rst:524 -msgid "" -"Restore the terminal to \"program\" mode, as previously saved by :func:" -"`def_prog_mode`." +#: ../../../library/curses.rst:578 +msgid "Change the definition of the color-pair ``0`` to ``(fg, bg)``." +msgstr "" + +#: ../../../library/curses.rst:580 +msgid "This is an ncurses extension." msgstr "" -#: ../../../library/curses.rst:530 +#: ../../../library/curses.rst:586 msgid "" -"Restore the terminal to \"shell\" mode, as previously saved by :func:" -"`def_shell_mode`." +"Allocate a color pair for foreground color *fg* and background color *bg*, " +"and return its number. If a color pair for the same combination of colors " +"already exists, return its number. Otherwise allocate a new color pair and " +"return its number." msgstr "" -#: ../../../library/curses.rst:536 +#: ../../../library/curses.rst:591 ../../../library/curses.rst:602 +#: ../../../library/curses.rst:614 ../../../library/curses.rst:625 msgid "" -"Restore the state of the terminal modes to what it was at the last call to :" -"func:`savetty`." +"This function is only available if Python was built against a wide-character " +"version of the underlying curses library with extended-color support (see :" +"func:`has_extended_color_support`)." msgstr "" -#: ../../../library/curses.rst:542 +#: ../../../library/curses.rst:599 msgid "" -"Backend function used by :func:`resizeterm`, performing most of the work; " -"when resizing the windows, :func:`resize_term` blank-fills the areas that " -"are extended. The calling application should fill in these areas with " -"appropriate data. The :func:`!resize_term` function attempts to resize all " -"windows. However, due to the calling convention of pads, it is not possible " -"to resize these without additional interaction with the application." +"Free the color pair *pair_number*, which must have been allocated by :func:" +"`alloc_pair`. The pair must not be in use." msgstr "" -#: ../../../library/curses.rst:552 +#: ../../../library/curses.rst:610 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)." +"Return the number of a color pair for foreground color *fg* and background " +"color *bg*, or ``-1`` if no color pair for this combination of colors has " +"been allocated." msgstr "" -#: ../../../library/curses.rst:559 +#: ../../../library/curses.rst:622 msgid "" -"Save the current state of the terminal modes in a buffer, usable by :func:" -"`resetty`." +"Discard all color-pair definitions, releasing the color pairs allocated by :" +"func:`init_pair` and :func:`alloc_pair`." msgstr "" -#: ../../../library/curses.rst:564 -msgid "Retrieves the value set by :func:`set_escdelay`." +#: ../../../library/curses.rst:633 +msgid "Windows and pads" msgstr "" -#: ../../../library/curses.rst:570 +#: ../../../library/curses.rst:638 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." +"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:578 -msgid "Retrieves the value set by :func:`set_tabsize`." +#: ../../../library/curses.rst:641 +msgid "" +"By default, the window will extend from the specified position to the lower " +"right corner of the screen." msgstr "" -#: ../../../library/curses.rst:584 +#: ../../../library/curses.rst:646 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." +"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:591 +#: ../../../library/curses.rst:649 msgid "" -"Set the virtual screen cursor to *y*, *x*. If *y* and *x* are both ``-1``, " -"then :meth:`leaveok ` is set ``True``." +"A pad is like a window, except that it is not restricted by the screen size, " +"and is not necessarily associated with a particular part of the screen. " +"Pads can be used when a large window is needed, and only a part of the " +"window will be on the screen at one time. Automatic refreshes of pads (such " +"as from scrolling or echoing of input) do not occur. The :meth:`~window." +"refresh` and :meth:`~window.noutrefresh` methods of a pad require 6 " +"arguments to specify the part of the pad to be displayed and the location on " +"the screen to be used for the display. The arguments are *pminrow*, " +"*pmincol*, *sminrow*, *smincol*, *smaxrow*, *smaxcol*; the *p* arguments " +"refer to the upper-left corner of the pad region to be displayed and the *s* " +"arguments define a clipping box on the screen within which the pad region is " +"to be displayed." msgstr "" -#: ../../../library/curses.rst:597 -msgid "" -"Initialize the terminal. *term* is a string giving the terminal name, or " -"``None``; if omitted or ``None``, the value of the :envvar:`TERM` " -"environment variable will be used. *fd* is the file descriptor to which any " -"initialization sequences will be sent; if not supplied or ``-1``, the file " -"descriptor for ``sys.stdout`` will be used." +#: ../../../library/curses.rst:663 +msgid "Soft labels" msgstr "" -#: ../../../library/curses.rst:603 +#: ../../../library/curses.rst:667 msgid "" -"Raise a :exc:`curses.error` if the terminal could not be found or its " -"terminfo database entry could not be read. If the terminal has already been " -"initialized, this function has no effect." +"The following functions manage *soft-label keys*, a row of labels displayed " +"along the bottom line of the screen, typically used to label a row of " +"function keys. :func:`slk_init` must be called before :func:`initscr` or :" +"func:`newterm`; it takes one screen line away from the standard window for " +"the labels." msgstr "" -#: ../../../library/curses.rst:610 +#: ../../../library/curses.rst:676 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`." +"Reserve a screen line for the soft labels and choose their layout. *fmt* " +"selects the arrangement: ``0`` for 3-2-3 (eight labels), ``1`` for 4-4 " +"(eight labels). Where the underlying curses library supports them, ``2`` " +"gives 4-4-4 (twelve labels) and ``3`` gives 4-4-4 with an index line." msgstr "" -#: ../../../library/curses.rst:614 -msgid "" -":func:`start_color` initializes eight basic colors (black, red, green, " -"yellow, blue, magenta, cyan, and white), and two global variables in the :" -"mod:`!curses` module, :const:`COLORS` and :const:`COLOR_PAIRS`, containing " -"the maximum number of colors and color-pairs the terminal can support. It " -"also restores the colors on the terminal to the values they had when the " -"terminal was just turned on." +#: ../../../library/curses.rst:681 +msgid "Must be called before :func:`initscr` or :func:`newterm`." msgstr "" -#: ../../../library/curses.rst:623 +#: ../../../library/curses.rst:688 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." +"Set the text of soft label number *labnum*, in the range ``1`` through ``8`` " +"(or ``12`` in a twelve-label layout). *justify* controls how *label* is " +"placed within the label: ``0`` for left, ``1`` for centered, ``2`` for right." msgstr "" -#: ../../../library/curses.rst:630 +#: ../../../library/curses.rst:697 msgid "" -"Return the value of the environment variable :envvar:`TERM`, as a bytes " -"object, truncated to 14 characters." +"Return the current text of soft label number *labnum*, justified as it was " +"set, or an empty string if it has no label." msgstr "" -#: ../../../library/curses.rst:636 +#: ../../../library/curses.rst:705 msgid "" -"Return the value of the Boolean capability corresponding to the terminfo " -"capability name *capname* as an integer. Return the value ``-1`` if " -"*capname* is not a Boolean capability, or ``0`` if it is canceled or absent " -"from the terminal description." +"Update the soft labels on the physical screen, like :meth:`~curses.window." +"refresh` for a window." msgstr "" -#: ../../../library/curses.rst:646 +#: ../../../library/curses.rst:713 msgid "" -"Return the value of the numeric capability corresponding to the terminfo " -"capability name *capname* as an integer. Return the value ``-2`` if " -"*capname* is not a numeric capability, or ``-1`` if it is canceled or absent " -"from the terminal description." +"Update the soft labels on the virtual screen, like :meth:`window." +"noutrefresh`. Use it together with :func:`doupdate` to batch screen updates." +msgstr "" + +#: ../../../library/curses.rst:722 +msgid "Remove the soft labels from the screen." +msgstr "" + +#: ../../../library/curses.rst:729 +msgid "Restore the soft labels to the screen after a :func:`slk_clear`." msgstr "" -#: ../../../library/curses.rst:656 +#: ../../../library/curses.rst:736 msgid "" -"Return the value of the string capability corresponding to the terminfo " -"capability name *capname* as a bytes object. Return ``None`` if *capname* " -"is not a terminfo \"string capability\", or is canceled or absent from the " -"terminal description." +"Force all the soft labels to be redrawn by the next :func:`slk_refresh` or :" +"func:`slk_noutrefresh`." msgstr "" -#: ../../../library/curses.rst:666 +#: ../../../library/curses.rst:746 msgid "" -"Instantiate the bytes object *str* with the supplied parameters, where *str* " -"should be a parameterized string obtained from the terminfo database. For " -"example, ``tparm(tigetstr(\"cup\"), 5, 3)`` could result in " -"``b'\\033[6;4H'``, the exact result depending on terminal type. Up to nine " -"integer parameters may be supplied." +"Add, remove, or set the attributes used to display the soft labels, given as " +"packed ``A_*`` attributes." msgstr "" -#: ../../../library/curses.rst:676 +#: ../../../library/curses.rst:754 msgid "" -"Specify that the file descriptor *fd* be used for typeahead checking. If " -"*fd* is ``-1``, then no typeahead checking is done." +"Return the current attributes of the soft labels as packed ``A_*`` " +"attributes. Availability depends on the underlying curses library." msgstr "" -#: ../../../library/curses.rst:679 +#: ../../../library/curses.rst:763 msgid "" -"The curses library does \"line-breakout optimization\" by looking for " -"typeahead periodically while updating the screen. If input is found, and it " -"is coming from a tty, the current update is postponed until refresh or " -"doupdate is called again, allowing faster response to commands typed in " -"advance. This function allows specifying a different file descriptor for " -"typeahead checking." +"Turn the given attributes on or off without affecting any others. Like the " +"``attr_*`` window methods, these work with the :ref:`WA_* attributes ` rather than packed ``A_*`` attributes." msgstr "" -#: ../../../library/curses.rst:688 +#: ../../../library/curses.rst:773 msgid "" -"Return a bytes object which is a printable representation of the character " -"*ch*. Control characters are represented as a caret followed by the " -"character, for example as ``b'^C'``. Printing characters are left as they " -"are." +"Set the attributes and color pair of the soft labels. *attr* is given as :" +"ref:`WA_* attributes ` and *pair* as a color pair " +"number." msgstr "" -#: ../../../library/curses.rst:695 -msgid "Push *ch* so the next :meth:`~window.getch` will return it." +#: ../../../library/curses.rst:782 +msgid "Set the color pair of the soft labels to color pair number *pair*." msgstr "" -#: ../../../library/curses.rst:699 -msgid "Only one *ch* can be pushed before :meth:`!getch` is called." +#: ../../../library/curses.rst:788 +msgid "Saving and restoring" msgstr "" -#: ../../../library/curses.rst:704 +#: ../../../library/curses.rst:792 msgid "" -"Update the :const:`LINES` and :const:`COLS` module variables. Useful for " -"detecting manual screen resize." +"Read window-related data stored in the file by an earlier :meth:`window." +"putwin` call. The routine then creates and initializes a new window using " +"that data, returning the new window object. The *file* argument must be a " +"file object opened for reading in binary mode." msgstr "" -#: ../../../library/curses.rst:712 -msgid "Push *ch* so the next :meth:`~window.get_wch` will return it." +#: ../../../library/curses.rst:799 +msgid "" +"Write the current contents of the virtual screen to *filename*, which may be " +"a string or a :term:`path-like object`. The file can later be read by :func:" +"`scr_restore`, :func:`scr_init` or :func:`scr_set`. This is the whole-" +"screen counterpart of :meth:`window.putwin`." msgstr "" -#: ../../../library/curses.rst:716 -msgid "Only one *ch* can be pushed before :meth:`!get_wch` is called." +#: ../../../library/curses.rst:808 +msgid "" +"Set the virtual screen to the contents of *filename*, which must have been " +"written by :func:`scr_dump`. The next call to :func:`doupdate` or :meth:" +"`window.refresh` restores the screen to those contents." msgstr "" -#: ../../../library/curses.rst:723 +#: ../../../library/curses.rst:816 msgid "" -"Push a :const:`KEY_MOUSE` event onto the input queue, associating the given " -"state data with it." +"Initialize the assumed contents of the terminal from *filename*, which must " +"have been written by :func:`scr_dump`. Use it when the terminal already " +"displays those contents, for example after another program has drawn the " +"screen, so that curses does not redraw what is already there." msgstr "" -#: ../../../library/curses.rst:729 +#: ../../../library/curses.rst:825 msgid "" -"If used, this function should be called before :func:`initscr` or newterm " -"are called. When *flag* is ``False``, the values of lines and columns " -"specified in the terminfo database will be used, even if environment " -"variables :envvar:`LINES` and :envvar:`COLUMNS` (used by default) are set, " -"or if curses is running in a window (in which case default behavior would be " -"to use the window size if :envvar:`LINES` and :envvar:`COLUMNS` are not set)." +"Use *filename*, which must have been written by :func:`scr_dump`, as both " +"the virtual screen and the assumed terminal contents. This combines the " +"effects of :func:`scr_restore` and :func:`scr_init`." msgstr "" -#: ../../../library/curses.rst:739 -msgid "Equivalent to ``assume_default_colors(-1, -1)``." +#: ../../../library/curses.rst:833 +msgid "Querying the terminal" msgstr "" -#: ../../../library/curses.rst:744 +#: ../../../library/curses.rst:837 msgid "" -"Initialize curses and call another callable object, *func*, which should be " -"the rest of your curses-using application. If the application raises an " -"exception, this function will restore the terminal to a sane state before re-" -"raising the exception and generating a traceback. The callable object " -"*func* is then passed the main window 'stdscr' as its first argument, " -"followed by any other arguments passed to :func:`!wrapper`. Before calling " -"*func*, :func:`!wrapper` turns on cbreak mode, turns off echo, enables the " -"terminal keypad, and initializes colors if the terminal has color support. " -"On exit (whether normally or by exception) it restores cooked mode, turns on " -"echo, and disables the terminal keypad." +"Return the output speed of the terminal in bits per second. On software " +"terminal emulators it will have a fixed high value. Included for historical " +"reasons; in former times, it was used to write output loops for time delays " +"and occasionally to change interfaces depending on the line speed." msgstr "" -#: ../../../library/curses.rst:758 -msgid "Window objects" +#: ../../../library/curses.rst:844 +msgid "" +"Return the user's current erase character as a raw byte, a :class:`bytes` " +"object of length 1. See also :func:`erasewchar`." msgstr "" -#: ../../../library/curses.rst:762 +#: ../../../library/curses.rst:849 msgid "" -"Window objects, as returned by :func:`initscr` and :func:`newwin` above, " -"have the following methods and attributes:" +"Return the user's current erase character as a one-character :class:`str`. " +"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:769 +#: ../../../library/curses.rst:857 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." +"Return the user's current line kill character as a raw byte, a :class:" +"`bytes` object of length 1. See also :func:`killwchar`." msgstr "" -#: ../../../library/curses.rst:775 +#: ../../../library/curses.rst:862 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." +"Return the user's current line kill character as a one-character :class:" +"`str`. 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:783 +#: ../../../library/curses.rst:870 msgid "" -"Paint at most *n* characters of the character string *str* at ``(y, x)`` " -"with attributes *attr*, overwriting anything previously on the display." +"Return the value of the environment variable :envvar:`TERM`, as a bytes " +"object, truncated to 14 characters." msgstr "" -#: ../../../library/curses.rst:791 +#: ../../../library/curses.rst:875 msgid "" -"Paint the character string *str* at ``(y, x)`` with attributes *attr*, " -"overwriting anything previously on the display." +"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:796 +#: ../../../library/curses.rst:881 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." +"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:800 +#: ../../../library/curses.rst:887 msgid "" -"A bug in ncurses, the backend for this Python module, could cause segfaults " -"when resizing windows. This was fixed in ncurses-6.1-20190511. If you are " -"stuck with an earlier ncurses, you can avoid triggering it by not calling :" -"meth:`!addstr` with a *str* that has embedded newlines; instead, call :meth:" -"`!addstr` separately for each line." +"Like :func:`termattrs`, but return the attributes as :ref:`WA_* ` values rather than ``A_*`` values." msgstr "" -#: ../../../library/curses.rst:809 +#: ../../../library/curses.rst:894 msgid "" -"Remove attribute *attr* from the \"background\" set applied to all writes to " -"the current window." +"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:815 +#: ../../../library/curses.rst:900 msgid "" -"Add attribute *attr* to the \"background\" set applied to all writes to the " -"current window." +"Return ``True`` if the terminal has insert- and delete-line capabilities, or " +"can simulate them using scrolling regions. This function is included for " +"historical reasons only, as all modern software terminal emulators have such " +"capabilities." msgstr "" -#: ../../../library/curses.rst:821 -msgid "" -"Set the \"background\" set of attributes to *attr*. This set is initially " -"``0`` (no attributes)." +#: ../../../library/curses.rst:907 +msgid "Bell and screen flash" msgstr "" -#: ../../../library/curses.rst:827 -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:" +#: ../../../library/curses.rst:911 +msgid "Emit a short attention sound." msgstr "" -#: ../../../library/curses.rst:831 +#: ../../../library/curses.rst:915 msgid "" -"The attribute of every character in the window is changed to the new " -"background attribute." +"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:834 -msgid "" -"Wherever the former background character appears, it is changed to the new " -"background character." +#: ../../../library/curses.rst:921 +msgid "Terminal resizing" msgstr "" -#: ../../../library/curses.rst:840 +#: ../../../library/curses.rst:925 msgid "" -"Set the window's background. A window's background consists of a character " -"and any combination of attributes. The attribute part of the background is " -"combined (OR'ed) with all non-blank characters that are written into the " -"window. Both the character and attribute parts of the background are " -"combined with the blank characters. The background becomes a property of " -"the character and moves with the character through any scrolling and insert/" -"delete line/character operations." +"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:850 +#: ../../../library/curses.rst:931 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." +"Backend function used by :func:`resizeterm`, performing most of the work; " +"when resizing the windows, :func:`resize_term` blank-fills the areas that " +"are extended. The calling application should fill in these areas with " +"appropriate data. The :func:`!resize_term` function attempts to resize all " +"windows. However, due to the calling convention of pads, it is not possible " +"to resize these without additional interaction with the application." msgstr "" -#: ../../../library/curses.rst:856 +#: ../../../library/curses.rst:940 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:" +"Return ``True`` if :func:`resize_term` would modify the window structure, " +"``False`` otherwise." msgstr "" -#: ../../../library/curses.rst:861 -msgid "Parameter" +#: ../../../library/curses.rst:945 +msgid "" +"Update the :const:`LINES` and :const:`COLS` module variables. Useful for " +"detecting manual screen resize." msgstr "" -#: ../../../library/curses.rst:861 -msgid "Description" +#: ../../../library/curses.rst:952 +msgid "Terminfo database" msgstr "" -#: ../../../library/curses.rst:861 -msgid "Default value" +#: ../../../library/curses.rst:956 +msgid "" +"Initialize the terminal. *term* is a string giving the terminal name, or " +"``None``; if omitted or ``None``, the value of the :envvar:`TERM` " +"environment variable will be used. *fd* is the file descriptor to which any " +"initialization sequences will be sent; if not supplied or ``-1``, the file " +"descriptor for ``sys.stdout`` will be used." msgstr "" -#: ../../../library/curses.rst:863 -msgid "*ls*" +#: ../../../library/curses.rst:962 +msgid "" +"Raise a :exc:`curses.error` if the terminal could not be found or its " +"terminfo database entry could not be read. If the terminal has already been " +"initialized, this function has no effect." msgstr "" -#: ../../../library/curses.rst:863 -msgid "Left side" +#: ../../../library/curses.rst:968 +msgid "" +"Calling :func:`initscr` or :func:`newterm` after :func:`setupterm` leaks the " +"terminal that :func:`setupterm` allocated: the curses library keeps only a " +"single current terminal and does not free the previously allocated one." msgstr "" -#: ../../../library/curses.rst:863 ../../../library/curses.rst:865 -msgid ":const:`ACS_VLINE`" +#: ../../../library/curses.rst:975 +msgid "" +"Return the value of the Boolean capability corresponding to the terminfo " +"capability name *capname* as an integer. Return the value ``-1`` if " +"*capname* is not a Boolean capability, or ``0`` if it is canceled or absent " +"from the terminal description." msgstr "" -#: ../../../library/curses.rst:865 -msgid "*rs*" +#: ../../../library/curses.rst:980 ../../../library/curses.rst:989 +#: ../../../library/curses.rst:998 ../../../library/curses.rst:1007 +#: ../../../library/curses.rst:1015 +msgid ":func:`setupterm` (or :func:`initscr`) must be called first." msgstr "" -#: ../../../library/curses.rst:865 -msgid "Right side" +#: ../../../library/curses.rst:984 +msgid "" +"Return the value of the numeric capability corresponding to the terminfo " +"capability name *capname* as an integer. Return the value ``-2`` if " +"*capname* is not a numeric capability, or ``-1`` if it is canceled or absent " +"from the terminal description." msgstr "" -#: ../../../library/curses.rst:867 -msgid "*ts*" +#: ../../../library/curses.rst:993 +msgid "" +"Return the value of the string capability corresponding to the terminfo " +"capability name *capname* as a bytes object. Return ``None`` if *capname* " +"is not a terminfo \"string capability\", or is canceled or absent from the " +"terminal description." msgstr "" -#: ../../../library/curses.rst:867 -msgid "Top" +#: ../../../library/curses.rst:1002 +msgid "" +"Instantiate the bytes object *str* with the supplied parameters, where *str* " +"should be a parameterized string obtained from the terminfo database. For " +"example, ``tparm(tigetstr(\"cup\"), 5, 3)`` could result in " +"``b'\\033[6;4H'``, the exact result depending on terminal type. Up to nine " +"integer parameters may be supplied." msgstr "" -#: ../../../library/curses.rst:867 ../../../library/curses.rst:869 -msgid ":const:`ACS_HLINE`" +#: ../../../library/curses.rst:1011 +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:869 -msgid "*bs*" +#: ../../../library/curses.rst:1019 +msgid "Utilities" msgstr "" -#: ../../../library/curses.rst:869 -msgid "Bottom" +#: ../../../library/curses.rst:1023 +msgid "" +"Return a bytes object which is a printable representation of the character " +"*ch*. *ch* cannot be a character that does not fit in a single byte; use :" +"func:`wunctrl` for those." msgstr "" -#: ../../../library/curses.rst:871 -msgid "*tl*" +#: ../../../library/curses.rst:1029 +msgid "" +"Return a string which is a printable representation of the character *ch*; " +"any attributes and color pair are ignored. ASCII control characters are " +"represented as a caret followed by a character, for example as ``'^C'``. " +"Printing characters, including non-ASCII characters printable in the locale, " +"are left as they are. The representation of other characters is defined by " +"the underlying curses library." msgstr "" -#: ../../../library/curses.rst:871 -msgid "Upper-left corner" +#: ../../../library/curses.rst:1040 +msgid "" +"The :func:`.filter` routine, if used, must be called before :func:`initscr` " +"is called. The effect is that, during the initialization, :envvar:`LINES` " +"is set to ``1``; the capabilities ``clear``, ``cup``, ``cud``, ``cud1``, " +"``cuu1``, ``cuu``, ``vpa`` are disabled; and the ``home`` string is set to " +"the value of ``cr``. The effect is that the cursor is confined to the " +"current line, and so are screen updates. This may be used for enabling " +"character-at-a-time line editing without touching the rest of the screen." msgstr "" -#: ../../../library/curses.rst:871 -msgid ":const:`ACS_ULCORNER`" +#: ../../../library/curses.rst:1049 +msgid "" +"Undo the effect of a previous :func:`.filter` call. Like :func:`.filter`, it " +"must be called before :func:`initscr` (or :func:`newterm`) so that the next " +"initialization uses the full screen again." msgstr "" -#: ../../../library/curses.rst:873 -msgid "*tr*" +#: ../../../library/curses.rst:1054 +msgid "Availability: if the underlying curses library provides ``nofilter()``." msgstr "" -#: ../../../library/curses.rst:873 -msgid "Upper-right corner" +#: ../../../library/curses.rst:1060 +msgid "" +"If used, this function should be called before :func:`initscr` or newterm " +"are called. When *flag* is ``False``, the values of lines and columns " +"specified in the terminfo database will be used, even if environment " +"variables :envvar:`LINES` and :envvar:`COLUMNS` (used by default) are set, " +"or if curses is running in a window (in which case default behavior would be " +"to use the window size if :envvar:`LINES` and :envvar:`COLUMNS` are not set)." msgstr "" -#: ../../../library/curses.rst:873 -msgid ":const:`ACS_URCORNER`" +#: ../../../library/curses.rst:1069 +msgid "Retrieves the value set by :func:`set_escdelay`." msgstr "" -#: ../../../library/curses.rst:875 -msgid "*bl*" +#: ../../../library/curses.rst:1075 +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:875 -msgid "Bottom-left corner" +#: ../../../library/curses.rst:1083 +msgid "Retrieves the value set by :func:`set_tabsize`." msgstr "" -#: ../../../library/curses.rst:875 -msgid ":const:`ACS_LLCORNER`" +#: ../../../library/curses.rst:1089 +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:877 -msgid "*br*" +#: ../../../library/curses.rst:1096 +msgid "Sleep for *ms* milliseconds." msgstr "" -#: ../../../library/curses.rst:877 -msgid "Bottom-right corner" +#: ../../../library/curses.rst:1100 +msgid "Insert an *ms* millisecond pause in output." msgstr "" -#: ../../../library/curses.rst:877 -msgid ":const:`ACS_LRCORNER`" +#: ../../../library/curses.rst:1105 +msgid "Window objects" msgstr "" -#: ../../../library/curses.rst:883 +#: ../../../library/curses.rst:1109 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." +"Window objects, as returned by :func:`initscr` and :func:`newwin` above, " +"have the following methods and attributes:" +msgstr "" + +#: ../../../library/curses.rst:1114 +msgid "Adding and inserting text" msgstr "" -#: ../../../library/curses.rst:892 +#: ../../../library/curses.rst:1119 msgid "" -"Set the attributes of *num* characters at the current cursor position, or at " -"position ``(y, x)`` if supplied. If *num* is not given or is ``-1``, the " -"attribute will be set on all the characters to the end of the line. This " -"function moves cursor to position ``(y, x)`` if supplied. The changed line " -"will be touched using the :meth:`touchline` method so that the contents will " -"be redisplayed by the next window refresh." +"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:902 +#: ../../../library/curses.rst:1123 msgid "" -"Like :meth:`erase`, but also cause the whole window to be repainted upon " -"next call to :meth:`refresh`." +"*ch* may be a single character, optionally followed by combining characters, " +"that together occupy one character cell." msgstr "" -#: ../../../library/curses.rst:908 +#: ../../../library/curses.rst:1128 msgid "" -"If *flag* is ``True``, the next call to :meth:`refresh` will clear the " -"window completely." +"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:914 +#: ../../../library/curses.rst:1132 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." +"A character may now be given as a string of a base character followed by " +"combining characters, instead of only a single character, or as a :class:" +"`complexchar` cell." msgstr "" -#: ../../../library/curses.rst:920 -msgid "Erase from cursor to the end of the line." +#: ../../../library/curses.rst:1140 +msgid "" +"Paint the character string *str* at ``(y, x)`` with attributes *attr*, " +"overwriting anything previously on the display." msgstr "" -#: ../../../library/curses.rst:925 +#: ../../../library/curses.rst:1143 msgid "" -"Update the current cursor position of all the ancestors of the window to " -"reflect the current cursor position of the window." +"*str* may also be a :class:`complexstr`, in which case each cell carries its " +"own attributes and color pair, so *attr* must not be given. A :class:" +"`complexstr` obtained from :meth:`in_wchstr` is written back unchanged." msgstr "" -#: ../../../library/curses.rst:931 +#: ../../../library/curses.rst:1150 msgid "" -"Delete the character under the cursor, or at ``(y, x)`` if specified. All " -"characters to the right on the same line are shifted one position left." +"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:937 +#: ../../../library/curses.rst:1154 msgid "" -"Delete the line under the cursor. All following lines are moved up by one " -"line." +"A bug in ncurses, the backend for this Python module, could cause segfaults " +"when resizing windows. This was fixed in ncurses-6.1-20190511. If you are " +"stuck with an earlier ncurses, you can avoid triggering it by not calling :" +"meth:`!addstr` with a *str* that has embedded newlines; instead, call :meth:" +"`!addstr` separately for each line." +msgstr "" + +#: ../../../library/curses.rst:1160 ../../../library/curses.rst:1205 +msgid "*str* may now also be a :class:`complexstr`, as described above." msgstr "" -#: ../../../library/curses.rst:943 +#: ../../../library/curses.rst:1166 msgid "" -"An abbreviation for \"derive window\", :meth:`derwin` is the same as " -"calling :meth:`subwin`, except that *begin_y* and *begin_x* are relative to " -"the origin of the window, rather than relative to the entire screen. Return " -"a window object for the derived window." +"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:1170 +msgid "*str* may now also be a :class:`complexstr`; see :meth:`addstr`." msgstr "" -#: ../../../library/curses.rst:951 +#: ../../../library/curses.rst:1175 msgid "" "Add character *ch* with attribute *attr*, and immediately call :meth:" "`refresh` on the window." msgstr "" -#: ../../../library/curses.rst:957 +#: ../../../library/curses.rst:1178 ../../../library/curses.rst:1190 +#: ../../../library/curses.rst:1479 ../../../library/curses.rst:1492 +#: ../../../library/curses.rst:1592 ../../../library/curses.rst:1602 msgid "" -"Test whether the given pair of screen-relative character-cell coordinates " -"are enclosed by the given window, returning ``True`` or ``False``. It is " -"useful for determining what subset of the screen windows enclose the " -"location of a mouse event." +"Wide and combining characters, and :class:`complexchar` cells, are now " +"accepted." msgstr "" -#: ../../../library/curses.rst:962 -msgid "Previously it returned ``1`` or ``0`` instead of ``True`` or ``False``." +#: ../../../library/curses.rst:1185 +msgid "" +"Insert character *ch* with attributes *attr* before the character under the " +"cursor, or at ``(y, x)`` if specified. All characters to the right of the " +"cursor are shifted one position right, with the rightmost character on the " +"line being lost. The cursor position does not change." msgstr "" -#: ../../../library/curses.rst:968 +#: ../../../library/curses.rst:1197 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, current " -"locale encoding is used (see :func:`locale.getencoding`)." +"Insert a character string (as many characters as will fit on the line) " +"before the character under the cursor. All characters to the right of the " +"cursor are shifted right, with the rightmost characters on the line being " +"lost. The cursor position does not change (after moving to *y*, *x*, if " +"specified)." msgstr "" -#: ../../../library/curses.rst:978 -msgid "Clear the window." +#: ../../../library/curses.rst:1202 +msgid "" +"*str* may also be a :class:`complexstr`, in which case each cell carries its " +"own attributes and color pair, so *attr* must not be given." msgstr "" -#: ../../../library/curses.rst:983 -msgid "Return a tuple ``(y, x)`` of coordinates of upper-left corner." +#: ../../../library/curses.rst:1211 +msgid "" +"Insert a character string (as many characters as will fit on the line) " +"before the character under the cursor, up to *n* characters. If *n* is " +"zero or negative, the entire string is inserted. All characters to the right " +"of the cursor are shifted right, with the rightmost characters on the line " +"being lost. The cursor position does not change (after moving to *y*, *x*, " +"if specified)." msgstr "" -#: ../../../library/curses.rst:988 -msgid "Return the given window's current background character/attribute pair." +#: ../../../library/curses.rst:1217 +msgid "*str* may now also be a :class:`complexstr`; see :meth:`insstr`." msgstr "" -#: ../../../library/curses.rst:993 +#: ../../../library/curses.rst:1222 +msgid "Deleting and inserting lines" +msgstr "" + +#: ../../../library/curses.rst:1226 +msgid "" +"Delete the character under the cursor, or at ``(y, x)`` if specified. All " +"characters to the right on the same line are shifted one position left." +msgstr "" + +#: ../../../library/curses.rst:1231 +msgid "" +"Delete the line under the cursor. All following lines are moved up by one " +"line." +msgstr "" + +#: ../../../library/curses.rst:1235 +msgid "" +"Insert a blank line under the cursor. All following lines are moved down by " +"one line." +msgstr "" + +#: ../../../library/curses.rst:1240 +msgid "" +"Insert *nlines* lines into the specified window above the current line. The " +"*nlines* bottom lines are lost. For negative *nlines*, delete *nlines* " +"lines starting with the one under the cursor, and move the remaining lines " +"up. The bottom *nlines* lines are cleared. The current cursor position " +"remains the same." +msgstr "" + +#: ../../../library/curses.rst:1248 +msgid "Reading input" +msgstr "" + +#: ../../../library/curses.rst:1252 msgid "" "Get a character. Note that the integer returned does *not* have to be in " "ASCII range: function keys, keypad keys and so on are represented by numbers " "higher than 255. In no-delay mode, return ``-1`` if there is no input, " -"otherwise wait until a key is pressed." +"otherwise wait until a key is pressed. A multibyte character is returned as " +"its encoded bytes one at a time; use :meth:`get_wch` to read it as a single " +"character." msgstr "" -#: ../../../library/curses.rst:1001 +#: ../../../library/curses.rst:1261 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." +"function keys, keypad keys, and other special keys. Unlike :meth:`getch`, " +"an ordinary key is returned as a one-character :class:`str`. In no-delay " +"mode, raise an exception if there is no input." msgstr "" -#: ../../../library/curses.rst:1010 +#: ../../../library/curses.rst:1268 +msgid "" +"Also available on a narrow build, where only a character representable as a " +"single byte (an 8-bit locale) can be returned." +msgstr "" + +#: ../../../library/curses.rst:1274 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 " @@ -1179,414 +1417,1038 @@ msgid "" "there is no input." msgstr "" -#: ../../../library/curses.rst:1018 -msgid "Return a tuple ``(y, x)`` of the height and width of the window." +#: ../../../library/curses.rst:1284 +msgid "" +"Read a bytes object from the user, with primitive line editing capacity. At " +"most *n* characters are read; *n* defaults to and cannot exceed 2047. A " +"multibyte character is returned as its encoded bytes; use :meth:`get_wstr` " +"to read the input as a :class:`str`." msgstr "" -#: ../../../library/curses.rst:1023 +#: ../../../library/curses.rst:1290 ../../../library/curses.rst:1351 +msgid "The maximum value for *n* was increased from 1023 to 2047." +msgstr "" + +#: ../../../library/curses.rst:1298 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." +"Read a string from the user, with primitive line editing capacity. Unlike :" +"meth:`getstr`, it can return characters that are not representable in the " +"window's encoding. At most *n* characters are read; *n* defaults to and " +"cannot exceed 2047." msgstr "" -#: ../../../library/curses.rst:1033 +#: ../../../library/curses.rst:1307 msgid "" -"Read a bytes object from the user, with primitive line editing capacity. At " -"most *n* characters are read; *n* defaults to and cannot exceed 2047." +"Return the window's read timeout in milliseconds, as set by :meth:`nodelay` " +"or :meth:`timeout`: ``-1`` for blocking, ``0`` for non-blocking, or a " +"positive number of milliseconds." msgstr "" -#: ../../../library/curses.rst:1037 ../../../library/curses.rst:1136 -msgid "The maximum value for *n* was increased from 1023 to 2047." +#: ../../../library/curses.rst:1316 +msgid "Reading window contents" msgstr "" -#: ../../../library/curses.rst:1043 +#: ../../../library/curses.rst:1320 msgid "" -"Return a tuple ``(y, x)`` of current cursor position relative to the " -"window's upper-left corner." +"Return the character at the given position in the window. The bottom 8 bits " +"are the character proper and the upper bits are the attributes; extract them " +"with the :data:`A_CHARTEXT` and :data:`A_ATTRIBUTES` bit-masks, and the " +"color pair with :func:`pair_number`. The character byte is the locale-" +"encoded byte of the cell's character, consistent with :meth:`instr`. It " +"cannot represent a cell holding combining characters, a character that does " +"not fit in a single byte, or a color pair outside the :func:`color_pair` " +"range; use :meth:`in_wch` for those, which returns it as a :class:" +"`complexchar`." msgstr "" -#: ../../../library/curses.rst:1050 +#: ../../../library/curses.rst:1332 msgid "" -"Display a horizontal line starting at ``(y, x)`` with length *n* consisting " -"of the character *ch* with attributes *attr*. The line stops at the right " -"edge of the window if fewer than *n* cells are available." +"Return the complex character at the given position in the window as a :class:" +"`complexchar`. Unlike :meth:`inch`, the returned object carries the cell's " +"text (a spacing character optionally followed by combining characters) " +"together with its attributes and color pair." msgstr "" -#: ../../../library/curses.rst:1057 +#: ../../../library/curses.rst:1342 msgid "" -"If *flag* is ``False``, curses no longer considers using the hardware insert/" -"delete character feature of the terminal; if *flag* is ``True``, use of " -"character insertion and deletion is enabled. When curses is first " -"initialized, use of character insert/delete is enabled by default." +"Return a bytes object of characters, extracted from the window starting at " +"the current cursor position, or at *y*, *x* if specified, and stopping at " +"the end of the line. Attributes and color information are stripped from the " +"characters. If *n* is specified, :meth:`instr` returns a string at most *n* " +"characters long (exclusive of the trailing NUL). The maximum value for *n* " +"is 2047. A character not representable in the window's encoding cannot be " +"returned; use :meth:`in_wstr` for those." msgstr "" -#: ../../../library/curses.rst:1065 +#: ../../../library/curses.rst:1357 msgid "" -"If *flag* is ``True``, :mod:`!curses` will try to use hardware line editing " -"facilities. Otherwise, curses will not use them." +"Return a string of characters, extracted from the window starting at the " +"current cursor position, or at *y*, *x* if specified. Unlike :meth:`instr`, " +"it can return characters that are not representable in the window's " +"encoding. Attributes and color information are stripped from the " +"characters. The maximum value for *n* is 2047." msgstr "" -#: ../../../library/curses.rst:1071 +#: ../../../library/curses.rst:1368 msgid "" -"If *flag* is ``True``, any change in the window image automatically causes " -"the window to be refreshed; you no longer have to call :meth:`refresh` " -"yourself. However, it may degrade performance considerably, due to repeated " -"calls to wrefresh. This option is disabled by default." +"Return a :class:`complexstr` of the styled cells extracted from the window " +"starting at the current cursor position, or at *y*, *x* if specified, and " +"stopping at the end of the line. This is the variant of :meth:`instr` and :" +"meth:`in_wstr` that *keeps* each cell's attributes and color pair (those " +"methods strip the rendition). If *n* is specified, at most *n* cells are " +"returned. The maximum value for *n* is 2047." msgstr "" -#: ../../../library/curses.rst:1079 +#: ../../../library/curses.rst:1375 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." +"The result can be written back unchanged with :meth:`addstr` (a read and a " +"re-write is a round-trip that preserves every cell's rendition)." +msgstr "" + +#: ../../../library/curses.rst:1382 ../../../library/curses.rst:2238 +msgid "Attributes" +msgstr "" + +#: ../../../library/curses.rst:1386 +msgid "" +"Remove attribute *attr* from the \"background\" set applied to all writes to " +"the current window." +msgstr "" + +#: ../../../library/curses.rst:1391 +msgid "" +"Add attribute *attr* to the \"background\" set applied to all writes to the " +"current window." +msgstr "" + +#: ../../../library/curses.rst:1396 +msgid "" +"Set the \"background\" set of attributes to *attr*. This set is initially " +"``0`` (no attributes)." +msgstr "" + +#: ../../../library/curses.rst:1401 +msgid "" +"Return the window's current rendition as a ``(attrs, pair)`` tuple, where " +"*attrs* is the set of attributes and *pair* is the color pair number." +msgstr "" + +#: ../../../library/curses.rst:1404 +msgid "" +"Unlike :meth:`attron` and friends, which take packed ``A_*`` attributes, " +"this method and the other ``attr_*`` methods work with the :ref:`WA_* " +"attributes ` and keep the color pair as a separate " +"number, which lets them use color pairs that do not fit alongside the " +"attributes in a single value." +msgstr "" + +#: ../../../library/curses.rst:1414 +msgid "" +"Set the window's rendition to the attributes *attr* and the color pair " +"*pair*." +msgstr "" + +#: ../../../library/curses.rst:1420 +msgid "Turn on the attributes *attr* without affecting any others." +msgstr "" + +#: ../../../library/curses.rst:1426 +msgid "Turn off the attributes *attr* without affecting any others." +msgstr "" + +#: ../../../library/curses.rst:1432 +msgid "" +"Set the window's color pair to *pair*, leaving the other attributes " +"unchanged." +msgstr "" + +#: ../../../library/curses.rst:1438 +msgid "Return the window's current attributes." +msgstr "" + +#: ../../../library/curses.rst:1444 +msgid "Turn on attribute *A_STANDOUT*." +msgstr "" + +#: ../../../library/curses.rst:1448 +msgid "" +"Turn off the standout attribute. On some terminals this has the side effect " +"of turning off all attributes." +msgstr "" + +#: ../../../library/curses.rst:1456 +msgid "" +"Set the attributes of *num* characters at the current cursor position, or at " +"position ``(y, x)`` if supplied. If *num* is not given or is ``-1``, the " +"attribute will be set on all the characters to the end of the line. This " +"function moves cursor to position ``(y, x)`` if supplied. The changed line " +"will be touched using the :meth:`touchline` method so that the contents will " +"be redisplayed by the next window refresh." +msgstr "" + +#: ../../../library/curses.rst:1465 +msgid "Background" +msgstr "" + +#: ../../../library/curses.rst:1469 +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:1473 +msgid "" +"The attribute of every character in the window is changed to the new " +"background attribute." +msgstr "" + +#: ../../../library/curses.rst:1476 +msgid "" +"Wherever the former background character appears, it is changed to the new " +"background character." +msgstr "" + +#: ../../../library/curses.rst:1485 +msgid "" +"Set the window's background. A window's background consists of a character " +"and any combination of attributes. The attribute part of the background is " +"combined (OR'ed) with all non-blank characters that are written into the " +"window. Both the character and attribute parts of the background are " +"combined with the blank characters. The background becomes a property of " +"the character and moves with the character through any scrolling and insert/" +"delete line/character operations." +msgstr "" + +#: ../../../library/curses.rst:1498 +msgid "" +"Return the given window's current background character/attribute pair. Its " +"components can be extracted like those of :meth:`inch`. It cannot represent " +"a background set with a wide character or with a color pair outside the :" +"func:`color_pair` range; use :meth:`getbkgrnd` for those." +msgstr "" + +#: ../../../library/curses.rst:1505 +msgid "" +"Return the given window's current background as a :class:`complexchar`. " +"Unlike :meth:`getbkgd`, the returned object carries the background character " +"together with its attributes and color pair, and the color pair is not " +"limited to the value that fits in a :func:`color_pair`." +msgstr "" + +#: ../../../library/curses.rst:1514 +msgid "Clearing and erasing" +msgstr "" + +#: ../../../library/curses.rst:1518 +msgid "Clear the window." +msgstr "" + +#: ../../../library/curses.rst:1522 +msgid "" +"Like :meth:`erase`, but also cause the whole window to be repainted upon " +"next call to :meth:`refresh`." +msgstr "" + +#: ../../../library/curses.rst:1527 +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:1532 +msgid "Erase from cursor to the end of the line." +msgstr "" + +#: ../../../library/curses.rst:1536 +msgid "Borders and lines" +msgstr "" + +#: ../../../library/curses.rst:1540 +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:1546 +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:1551 +msgid "Parameter" +msgstr "" + +#: ../../../library/curses.rst:1551 +msgid "Description" +msgstr "" + +#: ../../../library/curses.rst:1551 +msgid "Default value" +msgstr "" + +#: ../../../library/curses.rst:1553 +msgid "*ls*" +msgstr "" + +#: ../../../library/curses.rst:1553 +msgid "Left side" +msgstr "" + +#: ../../../library/curses.rst:1553 ../../../library/curses.rst:1555 +msgid ":const:`ACS_VLINE`" +msgstr "" + +#: ../../../library/curses.rst:1555 +msgid "*rs*" +msgstr "" + +#: ../../../library/curses.rst:1555 +msgid "Right side" +msgstr "" + +#: ../../../library/curses.rst:1557 +msgid "*ts*" +msgstr "" + +#: ../../../library/curses.rst:1557 +msgid "Top" +msgstr "" + +#: ../../../library/curses.rst:1557 ../../../library/curses.rst:1559 +msgid ":const:`ACS_HLINE`" +msgstr "" + +#: ../../../library/curses.rst:1559 +msgid "*bs*" +msgstr "" + +#: ../../../library/curses.rst:1559 +msgid "Bottom" +msgstr "" + +#: ../../../library/curses.rst:1561 +msgid "*tl*" +msgstr "" + +#: ../../../library/curses.rst:1561 +msgid "Upper-left corner" +msgstr "" + +#: ../../../library/curses.rst:1561 +msgid ":const:`ACS_ULCORNER`" +msgstr "" + +#: ../../../library/curses.rst:1563 +msgid "*tr*" +msgstr "" + +#: ../../../library/curses.rst:1563 +msgid "Upper-right corner" +msgstr "" + +#: ../../../library/curses.rst:1563 +msgid ":const:`ACS_URCORNER`" +msgstr "" + +#: ../../../library/curses.rst:1565 +msgid "*bl*" +msgstr "" + +#: ../../../library/curses.rst:1565 +msgid "Bottom-left corner" +msgstr "" + +#: ../../../library/curses.rst:1565 +msgid ":const:`ACS_LLCORNER`" +msgstr "" + +#: ../../../library/curses.rst:1567 +msgid "*br*" +msgstr "" + +#: ../../../library/curses.rst:1567 +msgid "Bottom-right corner" +msgstr "" + +#: ../../../library/curses.rst:1567 +msgid ":const:`ACS_LRCORNER`" +msgstr "" + +#: ../../../library/curses.rst:1570 ../../../library/curses.rst:1580 +msgid "" +"Wide and combining characters, and :class:`complexchar` cells, are now " +"accepted. A single call cannot mix them with integer or byte characters." +msgstr "" + +#: ../../../library/curses.rst:1577 +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:1588 +msgid "" +"Display a horizontal line starting at ``(y, x)`` with length *n* consisting " +"of the character *ch* with attributes *attr*. The line stops at the right " +"edge of the window if fewer than *n* cells are available." +msgstr "" + +#: ../../../library/curses.rst:1599 +msgid "" +"Display a vertical line starting at ``(y, x)`` with length *n* consisting of " +"the character *ch* with attributes *attr*." +msgstr "" + +#: ../../../library/curses.rst:1608 +msgid "Cursor position and window geometry" +msgstr "" + +#: ../../../library/curses.rst:1612 +msgid "Move cursor to ``(new_y, new_x)``." +msgstr "" + +#: ../../../library/curses.rst:1616 +msgid "" +"Return a tuple ``(y, x)`` of current cursor position relative to the " +"window's upper-left corner." +msgstr "" + +#: ../../../library/curses.rst:1621 +msgid "Return a tuple ``(y, x)`` of coordinates of upper-left corner." +msgstr "" + +#: ../../../library/curses.rst:1625 +msgid "Return a tuple ``(y, x)`` of the height and width of the window." +msgstr "" + +#: ../../../library/curses.rst:1629 +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:1635 +msgid "" +"Return the parent window of this subwindow, or ``None`` if this window is " +"not a subwindow." +msgstr "" + +#: ../../../library/curses.rst:1642 +msgid "Creating and resizing windows" +msgstr "" + +#: ../../../library/curses.rst:1647 +msgid "" +"Return a sub-window, whose upper-left corner is at the screen-relative " +"coordinates ``(begin_y, begin_x)``, and whose width/height is *ncols*/" +"*nlines*." +msgstr "" + +#: ../../../library/curses.rst:1650 +msgid "" +"By default, the sub-window will extend from the specified position to the " +"lower right corner of the window." +msgstr "" + +#: ../../../library/curses.rst:1656 +msgid "" +"An abbreviation for \"derive window\", :meth:`derwin` is the same as " +"calling :meth:`subwin`, except that *begin_y* and *begin_x* are relative to " +"the origin of the window, rather than relative to the entire screen. Return " +"a window object for the derived window." +msgstr "" + +#: ../../../library/curses.rst:1664 +msgid "" +"Return a sub-pad, whose upper-left corner is at ``(begin_y, begin_x)``, and " +"whose width/height is *ncols*/*nlines*. The coordinates are relative to the " +"parent pad (unlike :meth:`subwin`, which uses screen coordinates). This " +"method is only available for pads created with :func:`newpad`." +msgstr "" + +#: ../../../library/curses.rst:1671 +msgid "" +"Return a new window that is an exact duplicate of the window: it has the " +"same size, position, contents and attributes. Unlike a window created by :" +"meth:`subwin` or :meth:`derwin`, the duplicate is independent of the " +"original -- it has its own cell buffer, so later changes to one do not " +"affect the other." +msgstr "" + +#: ../../../library/curses.rst:1681 +msgid "Move the window so its upper-left corner is at ``(new_y, new_x)``." +msgstr "" + +#: ../../../library/curses.rst:1683 +msgid "" +"Moving the window so that any part of it would be off the screen is an " +"error: the window is not moved and :exc:`curses.error` is raised." +msgstr "" + +#: ../../../library/curses.rst:1688 +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:1694 +msgid "" +"Reallocate storage for a curses window to adjust its dimensions to the " +"specified values. If either dimension is larger than the current values, " +"the window's data is filled with blanks that have the current background " +"rendition (as set by :meth:`bkgdset`) merged into them." +msgstr "" + +#: ../../../library/curses.rst:1701 +msgid "Refreshing and redrawing" +msgstr "" + +#: ../../../library/curses.rst:1705 +msgid "" +"Update the display immediately (sync actual screen with previous drawing/" +"deleting methods)." +msgstr "" + +#: ../../../library/curses.rst:1708 +msgid "" +"The 6 arguments can only be specified, and are then required, when the " +"window is a pad created with :func:`newpad`. The additional parameters are " +"needed to indicate what part of the pad and screen are involved. *pminrow* " +"and *pmincol* specify the upper-left corner of the rectangle to be displayed " +"in the pad. *sminrow*, *smincol*, *smaxrow*, and *smaxcol* specify the " +"edges of the rectangle to be displayed on the screen. The lower-right " +"corner of the rectangle to be displayed in the pad is calculated from the " +"screen coordinates, since the rectangles must be the same size. Both " +"rectangles must be entirely contained within their respective structures. " +"Negative values of *pminrow*, *pmincol*, *sminrow*, or *smincol* are treated " +"as if they were zero." +msgstr "" + +#: ../../../library/curses.rst:1722 +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:1726 +msgid "" +"The 6 arguments can only be specified, and are then required, when the " +"window is a pad created with :func:`newpad`; they have the same meaning as " +"for :meth:`refresh`." +msgstr "" + +#: ../../../library/curses.rst:1732 +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:1737 +msgid "" +"Touch the entire window, causing it to be completely redrawn on the next :" +"meth:`refresh` call." +msgstr "" + +#: ../../../library/curses.rst:1742 +msgid "Output options" +msgstr "" + +#: ../../../library/curses.rst:1746 +msgid "" +"If *flag* is ``True``, the next call to :meth:`refresh` will clear the " +"window completely." +msgstr "" + +#: ../../../library/curses.rst:1751 +msgid "" +"If *flag* is ``True``, :mod:`!curses` will try to use hardware line editing " +"facilities. Otherwise, curses will not use them." +msgstr "" + +#: ../../../library/curses.rst:1756 +msgid "" +"If *flag* is ``False``, curses no longer considers using the hardware insert/" +"delete character feature of the terminal; if *flag* is ``True``, use of " +"character insertion and deletion is enabled. When curses is first " +"initialized, use of character insert/delete is enabled by default." +msgstr "" + +#: ../../../library/curses.rst:1763 +msgid "" +"If *flag* is ``True``, any change in the window image automatically causes " +"the window to be refreshed; you no longer have to call :meth:`refresh` " +"yourself. However, it may degrade performance considerably, due to repeated " +"calls to wrefresh. This option is disabled by default." +msgstr "" + +#: ../../../library/curses.rst:1770 +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." +msgstr "" + +#: ../../../library/curses.rst:1773 +msgid "" +"If *flag* is ``False``, cursor will always be at \"cursor position\" after " +"an update." +msgstr "" + +#: ../../../library/curses.rst:1777 +msgid "" +"Control what happens when the cursor of a window is moved off the edge of " +"the window or scrolling region, either as a result of a newline action on " +"the bottom line, or typing the last character of the last line. If *flag* " +"is ``False``, the cursor is left on the bottom line. If *flag* is ``True``, " +"the window is scrolled up one line. Note that in order to get the physical " +"scrolling effect on the terminal, it is also necessary to call :meth:`idlok`." +msgstr "" + +#: ../../../library/curses.rst:1786 +msgid "" +"Scroll the screen or scrolling region. Scroll upward by *lines* lines if " +"*lines* is positive, or downward if it is negative. Scrolling has no effect " +"unless it has been enabled for the window with :meth:`scrollok`." +msgstr "" + +#: ../../../library/curses.rst:1792 +msgid "" +"Set the scrolling region from line *top* to line *bottom*. All scrolling " +"actions will take place in this region." +msgstr "" + +#: ../../../library/curses.rst:1797 +msgid "" +"Return a tuple ``(top, bottom)`` of the window's current scrolling region, " +"as set by :meth:`setscrreg`." +msgstr "" + +#: ../../../library/curses.rst:1804 +msgid "" +"If *flag* is ``True``, then :meth:`syncup` is called automatically whenever " +"there is a change in the window." +msgstr "" + +#: ../../../library/curses.rst:1813 +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:1819 +msgid "If *flag* is ``True``, :meth:`getch` will be non-blocking." +msgstr "" + +#: ../../../library/curses.rst:1823 +msgid "If *flag* is ``True``, escape sequences will not be timed out." +msgstr "" + +#: ../../../library/curses.rst:1825 +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:1830 +msgid "" +"Set blocking or non-blocking read behavior for the window. If *delay* is " +"negative, blocking read is used (which will wait indefinitely for input). " +"If *delay* is zero, then non-blocking read is used, and :meth:`getch` will " +"return ``-1`` if no input is waiting. If *delay* is positive, then :meth:" +"`getch` will block for *delay* milliseconds, and return ``-1`` if there is " +"still no input at the end of that time." +msgstr "" + +#: ../../../library/curses.rst:1839 +msgid "Overlapping and touch" +msgstr "" + +#: ../../../library/curses.rst:1843 +msgid "" +"Overlay the window on top of *destwin*. The windows need not be the same " +"size, only the overlapping region is copied. This copy is non-destructive, " +"which means that the current background character does not overwrite the old " +"contents of *destwin*." +msgstr "" + +#: ../../../library/curses.rst:1848 +msgid "" +"To get fine-grained control over the copied region, the second form of :meth:" +"`overlay` can be used. *sminrow* and *smincol* are the upper-left " +"coordinates of the source window, and the other variables mark a rectangle " +"in the destination window." +msgstr "" + +#: ../../../library/curses.rst:1855 +msgid "" +"Overwrite the window on top of *destwin*. The windows need not be the same " +"size, in which case only the overlapping region is copied. This copy is " +"destructive, which means that the current background character overwrites " +"the old contents of *destwin*." +msgstr "" + +#: ../../../library/curses.rst:1860 +msgid "" +"To get fine-grained control over the copied region, the second form of :meth:" +"`overwrite` can be used. *sminrow* and *smincol* are the upper-left " +"coordinates of the source window, the other variables mark a rectangle in " +"the destination window." +msgstr "" + +#: ../../../library/curses.rst:1867 +msgid "" +"Pretend *count* lines have been changed, starting with line *start*. If " +"*changed* is supplied, it specifies whether the affected lines are marked as " +"having been changed (*changed*\\ ``=True``) or unchanged (*changed*\\ " +"``=False``)." +msgstr "" + +#: ../../../library/curses.rst:1873 +msgid "" +"Pretend the whole window has been changed, for purposes of drawing " +"optimizations." +msgstr "" + +#: ../../../library/curses.rst:1878 +msgid "" +"Mark all lines in the window as unchanged since the last call to :meth:" +"`refresh`." +msgstr "" + +#: ../../../library/curses.rst:1883 +msgid "" +"Touch all locations in ancestors of the window that have been changed in " +"the window." +msgstr "" + +#: ../../../library/curses.rst:1888 +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:1894 +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:1086 -msgid "" -"Insert character *ch* with attributes *attr* before the character under the " -"cursor, or at ``(y, x)`` if specified. All characters to the right of the " -"cursor are shifted one position right, with the rightmost character on the " -"line being lost. The cursor position does not change." +#: ../../../library/curses.rst:1899 +msgid "Coordinate conversion" msgstr "" -#: ../../../library/curses.rst:1094 +#: ../../../library/curses.rst:1903 msgid "" -"Insert *nlines* lines into the specified window above the current line. The " -"*nlines* bottom lines are lost. For negative *nlines*, delete *nlines* " -"lines starting with the one under the cursor, and move the remaining lines " -"up. The bottom *nlines* lines are cleared. The current cursor position " -"remains the same." +"Test whether the given pair of screen-relative character-cell coordinates " +"are enclosed by the given window, returning ``True`` or ``False``. It is " +"useful for determining what subset of the screen windows enclose the " +"location of a mouse event." msgstr "" -#: ../../../library/curses.rst:1103 -msgid "" -"Insert a blank line under the cursor. All following lines are moved down by " -"one line." +#: ../../../library/curses.rst:1908 +msgid "Previously it returned ``1`` or ``0`` instead of ``True`` or ``False``." msgstr "" -#: ../../../library/curses.rst:1110 +#: ../../../library/curses.rst:1913 msgid "" -"Insert a character string (as many characters as will fit on the line) " -"before the character under the cursor, up to *n* characters. If *n* is " -"zero or negative, the entire string is inserted. All characters to the right " -"of the cursor are shifted right, with the rightmost characters on the line " -"being lost. The cursor position does not change (after moving to *y*, *x*, " -"if specified)." +"Convert between window-relative and screen-relative (``stdscr``-relative) " +"character-cell coordinates. If *to_screen* is true, convert the window-" +"relative coordinates *y*, *x* to screen-relative coordinates; otherwise " +"convert in the opposite direction. The two coordinate systems differ when " +"lines are reserved on the screen, for example for soft labels." msgstr "" -#: ../../../library/curses.rst:1120 +#: ../../../library/curses.rst:1918 msgid "" -"Insert a character string (as many characters as will fit on the line) " -"before the character under the cursor. All characters to the right of the " -"cursor are shifted right, with the rightmost characters on the line being " -"lost. The cursor position does not change (after moving to *y*, *x*, if " -"specified)." +"Return the converted coordinates as a ``(y, x)`` tuple, or ``None`` if they " +"lie outside the window." msgstr "" -#: ../../../library/curses.rst:1129 -msgid "" -"Return a bytes object of characters, extracted from the window starting at " -"the current cursor position, or at *y*, *x* if specified, and stopping at " -"the end of the line. Attributes and color information are stripped from the " -"characters. If *n* is specified, :meth:`instr` returns a string at most *n* " -"characters long (exclusive of the trailing NUL). The maximum value for *n* " -"is 2047." +#: ../../../library/curses.rst:1924 +msgid "Other" msgstr "" -#: ../../../library/curses.rst:1142 +#: ../../../library/curses.rst:1928 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." +"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, current " +"locale encoding is used (see :func:`locale.getencoding`)." msgstr "" -#: ../../../library/curses.rst:1149 +#: ../../../library/curses.rst:1937 msgid "" -"Return ``True`` if the specified window was modified since the last call to :" -"meth:`refresh`; otherwise return ``False``." +"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:1155 +#: ../../../library/curses.rst:1942 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." +"Call ``func(window, *args, **kwargs)`` with the lock of the window held, and " +"return its result. This provides automatic protection for the window against " +"concurrent access from another thread." msgstr "" -#: ../../../library/curses.rst:1162 +#: ../../../library/curses.rst:1947 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." +"Availability: if the underlying curses library provides ``use_window()``." msgstr "" -#: ../../../library/curses.rst:1165 -msgid "" -"If *flag* is ``False``, cursor will always be at \"cursor position\" after " -"an update." +#: ../../../library/curses.rst:1953 +msgid "State queries" msgstr "" -#: ../../../library/curses.rst:1170 -msgid "Move cursor to ``(new_y, new_x)``." +#: ../../../library/curses.rst:1957 +msgid "Return the current value set by :meth:`clearok`." msgstr "" -#: ../../../library/curses.rst:1175 -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." +#: ../../../library/curses.rst:1963 +msgid "Return the current value set by :meth:`idcok`." msgstr "" -#: ../../../library/curses.rst:1182 -msgid "Move the window so its upper-left corner is at ``(new_y, new_x)``." +#: ../../../library/curses.rst:1969 +msgid "Return the current value set by :meth:`idlok`." msgstr "" -#: ../../../library/curses.rst:1184 -msgid "" -"Moving the window so that any part of it would be off the screen is an " -"error: the window is not moved and :exc:`curses.error` is raised." +#: ../../../library/curses.rst:1975 +msgid "Return the current value set by :meth:`immedok`." msgstr "" -#: ../../../library/curses.rst:1190 -msgid "If *flag* is ``True``, :meth:`getch` will be non-blocking." +#: ../../../library/curses.rst:1981 +msgid "Return the current value set by :meth:`keypad`." msgstr "" -#: ../../../library/curses.rst:1195 -msgid "If *flag* is ``True``, escape sequences will not be timed out." +#: ../../../library/curses.rst:1987 +msgid "Return the current value set by :meth:`leaveok`." msgstr "" -#: ../../../library/curses.rst:1197 +#: ../../../library/curses.rst:1993 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." +"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:1204 -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`." +#: ../../../library/curses.rst:1999 +msgid "Return the current value set by :meth:`nodelay`." msgstr "" -#: ../../../library/curses.rst:1208 -msgid "" -"The 6 arguments can only be specified, and are then required, when the " -"window is a pad created with :func:`newpad`; they have the same meaning as " -"for :meth:`refresh`." +#: ../../../library/curses.rst:2005 +msgid "Return the current value set by :meth:`notimeout`." msgstr "" -#: ../../../library/curses.rst:1215 -msgid "" -"Overlay the window on top of *destwin*. The windows need not be the same " -"size, only the overlapping region is copied. This copy is non-destructive, " -"which means that the current background character does not overwrite the old " -"contents of *destwin*." +#: ../../../library/curses.rst:2011 +msgid "Return ``True`` if the window is a pad created by :func:`newpad`." msgstr "" -#: ../../../library/curses.rst:1220 -msgid "" -"To get fine-grained control over the copied region, the second form of :meth:" -"`overlay` can be used. *sminrow* and *smincol* are the upper-left " -"coordinates of the source window, and the other variables mark a rectangle " -"in the destination window." +#: ../../../library/curses.rst:2017 +msgid "Return the current value set by :meth:`scrollok`." msgstr "" -#: ../../../library/curses.rst:1228 +#: ../../../library/curses.rst:2023 msgid "" -"Overwrite the window on top of *destwin*. The windows need not be the same " -"size, in which case only the overlapping region is copied. This copy is " -"destructive, which means that the current background character overwrites " -"the old contents of *destwin*." +"Return ``True`` if the window is a subwindow created by :meth:`subwin` or :" +"meth:`derwin`." msgstr "" -#: ../../../library/curses.rst:1233 -msgid "" -"To get fine-grained control over the copied region, the second form of :meth:" -"`overwrite` can be used. *sminrow* and *smincol* are the upper-left " -"coordinates of the source window, the other variables mark a rectangle in " -"the destination window." +#: ../../../library/curses.rst:2030 +msgid "Return the current value set by :meth:`syncok`." msgstr "" -#: ../../../library/curses.rst:1241 +#: ../../../library/curses.rst:2036 msgid "" -"Write all data associated with the window into the provided file object. " -"This information can be later retrieved using the :func:`getwin` function." +"Return ``True`` if the specified window was modified since the last call to :" +"meth:`refresh`; otherwise return ``False``." msgstr "" -#: ../../../library/curses.rst:1247 -msgid "" -"Indicate that the *num* screen lines, starting at line *beg*, are corrupted " -"and should be completely redrawn on the next :meth:`refresh` call." +#: ../../../library/curses.rst:2042 +msgid "Screen objects" msgstr "" -#: ../../../library/curses.rst:1253 +#: ../../../library/curses.rst:2046 msgid "" -"Touch the entire window, causing it to be completely redrawn on the next :" -"meth:`refresh` call." +"A *screen* object represents a terminal initialized by :func:`newterm` (or :" +"func:`new_prescr`), in addition to the default screen created by :func:" +"`initscr`. Screen objects are returned by those functions; they cannot be " +"instantiated directly." msgstr "" -#: ../../../library/curses.rst:1259 +#: ../../../library/curses.rst:2052 msgid "" -"Update the display immediately (sync actual screen with previous drawing/" -"deleting methods)." +"A screen is freed automatically once it is no longer referenced, either " +"directly or through one of its windows. Each window keeps its screen alive, " +"so a screen remains valid as long as any of its windows does." msgstr "" -#: ../../../library/curses.rst:1262 +#: ../../../library/curses.rst:2062 msgid "" -"The 6 arguments can only be specified, and are then required, when the " -"window is a pad created with :func:`newpad`. The additional parameters are " -"needed to indicate what part of the pad and screen are involved. *pminrow* " -"and *pmincol* specify the upper-left corner of the rectangle to be displayed " -"in the pad. *sminrow*, *smincol*, *smaxrow*, and *smaxcol* specify the " -"edges of the rectangle to be displayed on the screen. The lower-right " -"corner of the rectangle to be displayed in the pad is calculated from the " -"screen coordinates, since the rectangles must be the same size. Both " -"rectangles must be entirely contained within their respective structures. " -"Negative values of *pminrow*, *pmincol*, *sminrow*, or *smincol* are treated " -"as if they were zero." +"Detach the screen's standard window, breaking the reference cycle between " +"them so the screen can be reclaimed promptly instead of waiting for a " +"garbage collection. Afterwards :attr:`~screen.stdscr` is ``None`` and the " +"window it returned earlier can no longer be used. The screen's resources are " +"released once it and all its windows are no longer referenced." msgstr "" -#: ../../../library/curses.rst:1276 +#: ../../../library/curses.rst:2076 msgid "" -"Reallocate storage for a curses window to adjust its dimensions to the " -"specified values. If either dimension is larger than the current values, " -"the window's data is filled with blanks that have the current background " -"rendition (as set by :meth:`bkgdset`) merged into them." +"The standard :ref:`window ` of the screen, covering " +"the whole terminal, or ``None`` for a screen created by :func:`new_prescr`." msgstr "" -#: ../../../library/curses.rst:1284 +#: ../../../library/curses.rst:2083 msgid "" -"Scroll the screen or scrolling region. Scroll upward by *lines* lines if " -"*lines* is positive, or downward if it is negative. Scrolling has no effect " -"unless it has been enabled for the window with :meth:`scrollok`." +"Call ``func(screen, *args, **kwargs)`` with the lock of the screen held, and " +"return its result. This provides automatic protection for the screen against " +"concurrent access from another thread." msgstr "" -#: ../../../library/curses.rst:1291 +#: ../../../library/curses.rst:2088 msgid "" -"Control what happens when the cursor of a window is moved off the edge of " -"the window or scrolling region, either as a result of a newline action on " -"the bottom line, or typing the last character of the last line. If *flag* " -"is ``False``, the cursor is left on the bottom line. If *flag* is ``True``, " -"the window is scrolled up one line. Note that in order to get the physical " -"scrolling effect on the terminal, it is also necessary to call :meth:`idlok`." +"Availability: if the underlying curses library provides ``use_screen()``." msgstr "" -#: ../../../library/curses.rst:1301 -msgid "" -"Set the scrolling region from line *top* to line *bottom*. All scrolling " -"actions will take place in this region." +#: ../../../library/curses.rst:2096 +msgid "Complex character objects" msgstr "" -#: ../../../library/curses.rst:1307 +#: ../../../library/curses.rst:2100 msgid "" -"Turn off the standout attribute. On some terminals this has the side effect " -"of turning off all attributes." +"A *complex character* (or *complexchar*) is an immutable styled character " +"cell: a spacing character optionally followed by combining characters, " +"together with a set of attributes and a color pair." msgstr "" -#: ../../../library/curses.rst:1313 -msgid "Turn on attribute *A_STANDOUT*." +#: ../../../library/curses.rst:2104 +msgid "" +"*text* is the cell's text, *attr* a combination of the :ref:`WA_* attributes " +"` (equivalent to the matching ``A_*`` constants), and " +"*pair* a color pair number. Unlike the packed :class:`chtype ` used " +"by :meth:`~window.inch` and the ``A_*`` methods, the color pair is stored " +"separately and is not limited to the value that fits in a :func:`color_pair`." msgstr "" -#: ../../../library/curses.rst:1319 +#: ../../../library/curses.rst:2111 msgid "" -"Return a sub-pad, whose upper-left corner is at ``(begin_y, begin_x)``, and " -"whose width/height is *ncols*/*nlines*. The coordinates are relative to the " -"parent pad (unlike :meth:`subwin`, which uses screen coordinates). This " -"method is only available for pads created with :func:`newpad`." +"Complex characters are returned by :meth:`window.in_wch` and :meth:`window." +"getbkgrnd`, and are accepted (along with an integer, a byte or a string) by " +"the character-cell methods such as :meth:`window.addch`, :meth:`window." +"insch`, :meth:`window.bkgd`, :meth:`window.border`, :meth:`window.hline` " +"and :meth:`window.vline`. A complex character already carries its own " +"rendition, so it cannot be combined with an explicit *attr* argument." msgstr "" -#: ../../../library/curses.rst:1328 +#: ../../../library/curses.rst:2119 msgid "" -"Return a sub-window, whose upper-left corner is at the screen-relative " -"coordinates ``(begin_y, begin_x)``, and whose width/height is *ncols*/" -"*nlines*." +":func:`str` returns the cell's text; two complex characters are equal when " +"their text, attributes and color pair all match." msgstr "" -#: ../../../library/curses.rst:1331 +#: ../../../library/curses.rst:2122 msgid "" -"By default, the sub-window will extend from the specified position to the " -"lower right corner of the window." +"The same code works on both wide- and narrow-character builds. On a narrow " +"build a cell holds a single character (no combining marks) that must encode " +"to one byte in the window's encoding (8-bit locales only), and *pair* is " +"limited to the value that fits in a :func:`color_pair`." msgstr "" -#: ../../../library/curses.rst:1337 -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." +#: ../../../library/curses.rst:2129 +msgid "The attributes of the character cell (read-only)." +msgstr "" + +#: ../../../library/curses.rst:2133 +msgid "The color pair number of the character cell (read-only)." msgstr "" -#: ../../../library/curses.rst:1344 +#: ../../../library/curses.rst:2140 msgid "" -"If *flag* is ``True``, then :meth:`syncup` is called automatically whenever " -"there is a change in the window." +"A *complex character string* (or *complexstr*) is an immutable sequence of " +"styled character cells -- the string counterpart of :class:`complexchar` " +"(as :class:`str` is to a single character)." msgstr "" -#: ../../../library/curses.rst:1350 +#: ../../../library/curses.rst:2144 msgid "" -"Touch all locations in ancestors of the window that have been changed in " -"the window." +"If *cells* is a string, it is split into character cells (each a spacing " +"character optionally followed by combining characters), and *attr* (a " +"combination of the :ref:`WA_* attributes `) and *pair* " +"(a color pair number), if given, are applied to every cell." msgstr "" -#: ../../../library/curses.rst:1356 +#: ../../../library/curses.rst:2149 msgid "" -"Set blocking or non-blocking read behavior for the window. If *delay* is " -"negative, blocking read is used (which will wait indefinitely for input). " -"If *delay* is zero, then non-blocking read is used, and :meth:`getch` will " -"return ``-1`` if no input is waiting. If *delay* is positive, then :meth:" -"`getch` will block for *delay* milliseconds, and return ``-1`` if there is " -"still no input at the end of that time." +"Otherwise *cells* is an iterable whose items are themselves cells, each a :" +"class:`complexchar` or a string; each item then carries its own rendition, " +"and *attr* and *pair* must be omitted." msgstr "" -#: ../../../library/curses.rst:1366 +#: ../../../library/curses.rst:2153 msgid "" -"Pretend *count* lines have been changed, starting with line *start*. If " -"*changed* is supplied, it specifies whether the affected lines are marked as " -"having been changed (*changed*\\ ``=True``) or unchanged (*changed*\\ " -"``=False``)." +"It is returned by :meth:`window.in_wchstr`, and accepted by :meth:`window." +"addstr`, :meth:`~window.addnstr`, :meth:`~window.insstr` and :meth:`~window." +"insnstr`, so a run read from a window can be written back unchanged." msgstr "" -#: ../../../library/curses.rst:1373 +#: ../../../library/curses.rst:2158 msgid "" -"Pretend the whole window has been changed, for purposes of drawing " -"optimizations." +"It behaves like an immutable sequence: ``len(s)`` is the number of cells, " +"``s[i]`` is the *i*-th cell as a :class:`complexchar`, slicing and " +"concatenation produce new :class:`!complexstr` instances, and iterating " +"yields the cells. :func:`str` returns the cells' text joined together, and " +"two complex character strings are equal when their cells all match. It is " +"hashable." msgstr "" -#: ../../../library/curses.rst:1379 +#: ../../../library/curses.rst:2165 msgid "" -"Mark all lines in the window as unchanged since the last call to :meth:" -"`refresh`." +"To build or edit a run of cells, use an ordinary :class:`list` of :class:" +"`complexchar` (or strings); a :class:`!complexstr` is the immutable form " +"returned by a read." msgstr "" -#: ../../../library/curses.rst:1386 +#: ../../../library/curses.rst:2169 msgid "" -"Display a vertical line starting at ``(y, x)`` with length *n* consisting of " -"the character *ch* with attributes *attr*." +"Like :class:`complexchar`, this type works on both wide- and narrow-" +"character builds, with the same per-cell limitations on a narrow build." msgstr "" -#: ../../../library/curses.rst:1391 +#: ../../../library/curses.rst:2176 msgid "Constants" msgstr "" -#: ../../../library/curses.rst:1393 +#: ../../../library/curses.rst:2179 +msgid "General" +msgstr "" + +#: ../../../library/curses.rst:2181 msgid "The :mod:`!curses` module defines the following data members:" msgstr "" -#: ../../../library/curses.rst:1398 +#: ../../../library/curses.rst:2186 msgid "" "Some curses routines that return an integer, such as :meth:`~window." "getch`, return :const:`ERR` upon failure." msgstr "" -#: ../../../library/curses.rst:1404 +#: ../../../library/curses.rst:2192 msgid "" "Some curses routines that return an integer, such as :func:`napms`, " "return :const:`OK` upon success." msgstr "" -#: ../../../library/curses.rst:1410 +#: ../../../library/curses.rst:2198 msgid "A bytes object representing the current version of the module." msgstr "" -#: ../../../library/curses.rst:1415 +#: ../../../library/curses.rst:2203 msgid "" "A named tuple containing the three components of the ncurses library " "version: *major*, *minor*, and *patch*. All values are integers. The " @@ -1594,536 +2456,561 @@ msgid "" "is equivalent to ``curses.ncurses_version.major`` and so on." msgstr "" -#: ../../../library/curses.rst:1420 +#: ../../../library/curses.rst:2208 msgid "Availability: if the ncurses library is used." msgstr "" -#: ../../../library/curses.rst:1426 +#: ../../../library/curses.rst:2214 msgid "" "The maximum number of colors the terminal can support. It is defined only " "after the call to :func:`start_color`." msgstr "" -#: ../../../library/curses.rst:1431 +#: ../../../library/curses.rst:2219 msgid "" "The maximum number of color pairs the terminal can support. It is defined " "only after the call to :func:`start_color`." msgstr "" -#: ../../../library/curses.rst:1436 +#: ../../../library/curses.rst:2224 msgid "" "The width of the screen, that is, the number of columns. It is defined only " "after the call to :func:`initscr`. Updated by :func:`update_lines_cols`, :" "func:`resizeterm` and :func:`resize_term`." msgstr "" -#: ../../../library/curses.rst:1443 +#: ../../../library/curses.rst:2231 msgid "" "The height of the screen, that is, the number of lines. It is defined only " "after the call to :func:`initscr`. Updated by :func:`update_lines_cols`, :" "func:`resizeterm` and :func:`resize_term`." msgstr "" -#: ../../../library/curses.rst:1449 +#: ../../../library/curses.rst:2240 msgid "" "Some constants are available to specify character cell attributes. The exact " "constants available are system dependent." msgstr "" -#: ../../../library/curses.rst:1453 +#: ../../../library/curses.rst:2244 msgid "Attribute" msgstr "" -#: ../../../library/curses.rst:1453 ../../../library/curses.rst:1498 -#: ../../../library/curses.rst:1744 ../../../library/curses.rst:1836 +#: ../../../library/curses.rst:2244 ../../../library/curses.rst:2307 +#: ../../../library/curses.rst:2557 ../../../library/curses.rst:2652 msgid "Meaning" msgstr "" -#: ../../../library/curses.rst:1455 +#: ../../../library/curses.rst:2246 msgid "Alternate character set mode" msgstr "" -#: ../../../library/curses.rst:1457 +#: ../../../library/curses.rst:2248 msgid "Blink mode" msgstr "" -#: ../../../library/curses.rst:1459 +#: ../../../library/curses.rst:2250 msgid "Bold mode" msgstr "" -#: ../../../library/curses.rst:1461 +#: ../../../library/curses.rst:2252 msgid "Dim mode" msgstr "" -#: ../../../library/curses.rst:1463 +#: ../../../library/curses.rst:2254 msgid "Invisible or blank mode" msgstr "" -#: ../../../library/curses.rst:1465 +#: ../../../library/curses.rst:2256 msgid "Italic mode" msgstr "" -#: ../../../library/curses.rst:1467 +#: ../../../library/curses.rst:2258 msgid "Normal attribute" msgstr "" -#: ../../../library/curses.rst:1469 +#: ../../../library/curses.rst:2260 msgid "Protected mode" msgstr "" -#: ../../../library/curses.rst:1471 +#: ../../../library/curses.rst:2262 msgid "Reverse background and foreground colors" msgstr "" -#: ../../../library/curses.rst:1474 +#: ../../../library/curses.rst:2265 msgid "Standout mode" msgstr "" -#: ../../../library/curses.rst:1476 +#: ../../../library/curses.rst:2267 msgid "Underline mode" msgstr "" -#: ../../../library/curses.rst:1478 +#: ../../../library/curses.rst:2269 msgid "Horizontal highlight" msgstr "" -#: ../../../library/curses.rst:1480 +#: ../../../library/curses.rst:2271 msgid "Left highlight" msgstr "" -#: ../../../library/curses.rst:1482 +#: ../../../library/curses.rst:2273 msgid "Low highlight" msgstr "" -#: ../../../library/curses.rst:1484 +#: ../../../library/curses.rst:2275 msgid "Right highlight" msgstr "" -#: ../../../library/curses.rst:1486 +#: ../../../library/curses.rst:2277 msgid "Top highlight" msgstr "" -#: ../../../library/curses.rst:1488 +#: ../../../library/curses.rst:2279 msgid "Vertical highlight" msgstr "" -#: ../../../library/curses.rst:1491 +#: ../../../library/curses.rst:2282 msgid "``A_ITALIC`` was added." msgstr "" -#: ../../../library/curses.rst:1494 +#: ../../../library/curses.rst:2287 +msgid "" +"The :meth:`~window.attr_get`, :meth:`~window.attr_set`, :meth:`~window." +"attr_on` and :meth:`~window.attr_off` methods use a parallel set of ``WA_*`` " +"constants. These have the same meaning as the corresponding ``A_*`` " +"attributes above (``WA_BOLD`` like :const:`A_BOLD`, and so on), but belong " +"to the ``attr_t`` type rather than being packed into a character. In " +"ncurses the two sets share the same values, but other curses implementations " +"may give them different ones, so use the ``WA_*`` constants with the " +"``attr_*`` methods. The available names are ``WA_ATTRIBUTES``, " +"``WA_NORMAL``, ``WA_STANDOUT``, ``WA_UNDERLINE``, ``WA_REVERSE``, " +"``WA_BLINK``, ``WA_DIM``, ``WA_BOLD``, ``WA_ALTCHARSET``, ``WA_INVIS``, " +"``WA_PROTECT``, ``WA_HORIZONTAL``, ``WA_LEFT``, ``WA_LOW``, ``WA_RIGHT``, " +"``WA_TOP``, ``WA_VERTICAL`` and ``WA_ITALIC`` (each available only where the " +"platform defines it)." +msgstr "" + +#: ../../../library/curses.rst:2300 +msgid "The ``WA_*`` constants were added." +msgstr "" + +#: ../../../library/curses.rst:2303 msgid "" "Several constants are available to extract corresponding attributes returned " "by some methods." msgstr "" -#: ../../../library/curses.rst:1498 +#: ../../../library/curses.rst:2307 msgid "Bit-mask" msgstr "" -#: ../../../library/curses.rst:1500 +#: ../../../library/curses.rst:2309 msgid "Bit-mask to extract attributes" msgstr "" -#: ../../../library/curses.rst:1503 +#: ../../../library/curses.rst:2312 msgid "Bit-mask to extract a character" msgstr "" -#: ../../../library/curses.rst:1506 +#: ../../../library/curses.rst:2315 msgid "Bit-mask to extract color-pair field information" msgstr "" -#: ../../../library/curses.rst:1510 +#: ../../../library/curses.rst:2320 +msgid "Keys" +msgstr "" + +#: ../../../library/curses.rst:2322 msgid "" "Keys are referred to by integer constants with names starting with " "``KEY_``. The exact keycaps available are system dependent." msgstr "" -#: ../../../library/curses.rst:1516 +#: ../../../library/curses.rst:2326 msgid "Key constant" msgstr "" -#: ../../../library/curses.rst:1516 +#: ../../../library/curses.rst:2326 msgid "Key" msgstr "" -#: ../../../library/curses.rst:1518 +#: ../../../library/curses.rst:2328 msgid "Minimum key value" msgstr "" -#: ../../../library/curses.rst:1520 +#: ../../../library/curses.rst:2330 msgid "Break key (unreliable)" msgstr "" -#: ../../../library/curses.rst:1522 +#: ../../../library/curses.rst:2332 msgid "Down-arrow" msgstr "" -#: ../../../library/curses.rst:1524 +#: ../../../library/curses.rst:2334 msgid "Up-arrow" msgstr "" -#: ../../../library/curses.rst:1526 +#: ../../../library/curses.rst:2336 msgid "Left-arrow" msgstr "" -#: ../../../library/curses.rst:1528 +#: ../../../library/curses.rst:2338 msgid "Right-arrow" msgstr "" -#: ../../../library/curses.rst:1530 +#: ../../../library/curses.rst:2340 msgid "Home key (upward+left arrow)" msgstr "" -#: ../../../library/curses.rst:1532 +#: ../../../library/curses.rst:2342 msgid "Backspace (unreliable)" msgstr "" -#: ../../../library/curses.rst:1534 +#: ../../../library/curses.rst:2344 msgid "Function keys. Up to 64 function keys are supported." msgstr "" -#: ../../../library/curses.rst:1537 +#: ../../../library/curses.rst:2347 msgid "Value of function key *n*" msgstr "" -#: ../../../library/curses.rst:1539 +#: ../../../library/curses.rst:2349 msgid "Delete line" msgstr "" -#: ../../../library/curses.rst:1541 +#: ../../../library/curses.rst:2351 msgid "Insert line" msgstr "" -#: ../../../library/curses.rst:1543 +#: ../../../library/curses.rst:2353 msgid "Delete character" msgstr "" -#: ../../../library/curses.rst:1545 +#: ../../../library/curses.rst:2355 msgid "Insert char or enter insert mode" msgstr "" -#: ../../../library/curses.rst:1547 +#: ../../../library/curses.rst:2357 msgid "Exit insert char mode" msgstr "" -#: ../../../library/curses.rst:1549 +#: ../../../library/curses.rst:2359 msgid "Clear screen" msgstr "" -#: ../../../library/curses.rst:1551 +#: ../../../library/curses.rst:2361 msgid "Clear to end of screen" msgstr "" -#: ../../../library/curses.rst:1553 +#: ../../../library/curses.rst:2363 msgid "Clear to end of line" msgstr "" -#: ../../../library/curses.rst:1555 +#: ../../../library/curses.rst:2365 msgid "Scroll 1 line forward" msgstr "" -#: ../../../library/curses.rst:1557 +#: ../../../library/curses.rst:2367 msgid "Scroll 1 line backward (reverse)" msgstr "" -#: ../../../library/curses.rst:1559 +#: ../../../library/curses.rst:2369 msgid "Next page" msgstr "" -#: ../../../library/curses.rst:1561 +#: ../../../library/curses.rst:2371 msgid "Previous page" msgstr "" -#: ../../../library/curses.rst:1563 +#: ../../../library/curses.rst:2373 msgid "Set tab" msgstr "" -#: ../../../library/curses.rst:1565 +#: ../../../library/curses.rst:2375 msgid "Clear tab" msgstr "" -#: ../../../library/curses.rst:1567 +#: ../../../library/curses.rst:2377 msgid "Clear all tabs" msgstr "" -#: ../../../library/curses.rst:1569 +#: ../../../library/curses.rst:2379 msgid "Enter or send (unreliable)" msgstr "" -#: ../../../library/curses.rst:1571 +#: ../../../library/curses.rst:2381 msgid "Soft (partial) reset (unreliable)" msgstr "" -#: ../../../library/curses.rst:1573 +#: ../../../library/curses.rst:2383 msgid "Reset or hard reset (unreliable)" msgstr "" -#: ../../../library/curses.rst:1575 +#: ../../../library/curses.rst:2385 msgid "Print" msgstr "" -#: ../../../library/curses.rst:1577 +#: ../../../library/curses.rst:2387 msgid "Home down or bottom (lower left)" msgstr "" -#: ../../../library/curses.rst:1579 +#: ../../../library/curses.rst:2389 msgid "Upper left of keypad" msgstr "" -#: ../../../library/curses.rst:1581 +#: ../../../library/curses.rst:2391 msgid "Upper right of keypad" msgstr "" -#: ../../../library/curses.rst:1583 +#: ../../../library/curses.rst:2393 msgid "Center of keypad" msgstr "" -#: ../../../library/curses.rst:1585 +#: ../../../library/curses.rst:2395 msgid "Lower left of keypad" msgstr "" -#: ../../../library/curses.rst:1587 +#: ../../../library/curses.rst:2397 msgid "Lower right of keypad" msgstr "" -#: ../../../library/curses.rst:1589 +#: ../../../library/curses.rst:2399 msgid "Back tab" msgstr "" -#: ../../../library/curses.rst:1591 +#: ../../../library/curses.rst:2401 msgid "Beg (beginning)" msgstr "" -#: ../../../library/curses.rst:1593 +#: ../../../library/curses.rst:2403 msgid "Cancel" msgstr "" -#: ../../../library/curses.rst:1595 +#: ../../../library/curses.rst:2405 msgid "Close" msgstr "" -#: ../../../library/curses.rst:1597 +#: ../../../library/curses.rst:2407 msgid "Cmd (command)" msgstr "" -#: ../../../library/curses.rst:1599 +#: ../../../library/curses.rst:2409 msgid "Copy" msgstr "" -#: ../../../library/curses.rst:1601 +#: ../../../library/curses.rst:2411 msgid "Create" msgstr "" -#: ../../../library/curses.rst:1603 +#: ../../../library/curses.rst:2413 msgid "End" msgstr "" -#: ../../../library/curses.rst:1605 +#: ../../../library/curses.rst:2415 msgid "Exit" msgstr "" -#: ../../../library/curses.rst:1607 +#: ../../../library/curses.rst:2417 msgid "Find" msgstr "" -#: ../../../library/curses.rst:1609 +#: ../../../library/curses.rst:2419 msgid "Help" msgstr "" -#: ../../../library/curses.rst:1611 +#: ../../../library/curses.rst:2421 msgid "Mark" msgstr "" -#: ../../../library/curses.rst:1613 +#: ../../../library/curses.rst:2423 msgid "Message" msgstr "" -#: ../../../library/curses.rst:1615 +#: ../../../library/curses.rst:2425 msgid "Move" msgstr "" -#: ../../../library/curses.rst:1617 +#: ../../../library/curses.rst:2427 msgid "Next" msgstr "" -#: ../../../library/curses.rst:1619 +#: ../../../library/curses.rst:2429 msgid "Open" msgstr "" -#: ../../../library/curses.rst:1621 +#: ../../../library/curses.rst:2431 msgid "Options" msgstr "" -#: ../../../library/curses.rst:1623 +#: ../../../library/curses.rst:2433 msgid "Prev (previous)" msgstr "" -#: ../../../library/curses.rst:1625 +#: ../../../library/curses.rst:2435 msgid "Redo" msgstr "" -#: ../../../library/curses.rst:1627 +#: ../../../library/curses.rst:2437 msgid "Ref (reference)" msgstr "" -#: ../../../library/curses.rst:1629 +#: ../../../library/curses.rst:2439 msgid "Refresh" msgstr "" -#: ../../../library/curses.rst:1631 +#: ../../../library/curses.rst:2441 msgid "Replace" msgstr "" -#: ../../../library/curses.rst:1633 +#: ../../../library/curses.rst:2443 msgid "Restart" msgstr "" -#: ../../../library/curses.rst:1635 +#: ../../../library/curses.rst:2445 msgid "Resume" msgstr "" -#: ../../../library/curses.rst:1637 +#: ../../../library/curses.rst:2447 msgid "Save" msgstr "" -#: ../../../library/curses.rst:1639 +#: ../../../library/curses.rst:2449 msgid "Shifted Beg (beginning)" msgstr "" -#: ../../../library/curses.rst:1641 +#: ../../../library/curses.rst:2451 msgid "Shifted Cancel" msgstr "" -#: ../../../library/curses.rst:1643 +#: ../../../library/curses.rst:2453 msgid "Shifted Command" msgstr "" -#: ../../../library/curses.rst:1645 +#: ../../../library/curses.rst:2455 msgid "Shifted Copy" msgstr "" -#: ../../../library/curses.rst:1647 +#: ../../../library/curses.rst:2457 msgid "Shifted Create" msgstr "" -#: ../../../library/curses.rst:1649 +#: ../../../library/curses.rst:2459 msgid "Shifted Delete char" msgstr "" -#: ../../../library/curses.rst:1651 +#: ../../../library/curses.rst:2461 msgid "Shifted Delete line" msgstr "" -#: ../../../library/curses.rst:1653 +#: ../../../library/curses.rst:2463 msgid "Select" msgstr "" -#: ../../../library/curses.rst:1655 +#: ../../../library/curses.rst:2465 msgid "Shifted End" msgstr "" -#: ../../../library/curses.rst:1657 +#: ../../../library/curses.rst:2467 msgid "Shifted Clear line" msgstr "" -#: ../../../library/curses.rst:1659 +#: ../../../library/curses.rst:2469 msgid "Shifted Exit" msgstr "" -#: ../../../library/curses.rst:1661 +#: ../../../library/curses.rst:2471 msgid "Shifted Find" msgstr "" -#: ../../../library/curses.rst:1663 +#: ../../../library/curses.rst:2473 msgid "Shifted Help" msgstr "" -#: ../../../library/curses.rst:1665 +#: ../../../library/curses.rst:2475 msgid "Shifted Home" msgstr "" -#: ../../../library/curses.rst:1667 +#: ../../../library/curses.rst:2477 msgid "Shifted Input" msgstr "" -#: ../../../library/curses.rst:1669 +#: ../../../library/curses.rst:2479 msgid "Shifted Left arrow" msgstr "" -#: ../../../library/curses.rst:1671 +#: ../../../library/curses.rst:2481 msgid "Shifted Message" msgstr "" -#: ../../../library/curses.rst:1673 +#: ../../../library/curses.rst:2483 msgid "Shifted Move" msgstr "" -#: ../../../library/curses.rst:1675 +#: ../../../library/curses.rst:2485 msgid "Shifted Next" msgstr "" -#: ../../../library/curses.rst:1677 +#: ../../../library/curses.rst:2487 msgid "Shifted Options" msgstr "" -#: ../../../library/curses.rst:1679 +#: ../../../library/curses.rst:2489 msgid "Shifted Prev" msgstr "" -#: ../../../library/curses.rst:1681 +#: ../../../library/curses.rst:2491 msgid "Shifted Print" msgstr "" -#: ../../../library/curses.rst:1683 +#: ../../../library/curses.rst:2493 msgid "Shifted Redo" msgstr "" -#: ../../../library/curses.rst:1685 +#: ../../../library/curses.rst:2495 msgid "Shifted Replace" msgstr "" -#: ../../../library/curses.rst:1687 +#: ../../../library/curses.rst:2497 msgid "Shifted Right arrow" msgstr "" -#: ../../../library/curses.rst:1689 +#: ../../../library/curses.rst:2499 msgid "Shifted Resume" msgstr "" -#: ../../../library/curses.rst:1691 +#: ../../../library/curses.rst:2501 msgid "Shifted Save" msgstr "" -#: ../../../library/curses.rst:1693 +#: ../../../library/curses.rst:2503 msgid "Shifted Suspend" msgstr "" -#: ../../../library/curses.rst:1695 +#: ../../../library/curses.rst:2505 msgid "Shifted Undo" msgstr "" -#: ../../../library/curses.rst:1697 +#: ../../../library/curses.rst:2507 msgid "Suspend" msgstr "" -#: ../../../library/curses.rst:1699 +#: ../../../library/curses.rst:2509 msgid "Undo" msgstr "" -#: ../../../library/curses.rst:1701 +#: ../../../library/curses.rst:2511 msgid "Mouse event has occurred" msgstr "" -#: ../../../library/curses.rst:1703 +#: ../../../library/curses.rst:2513 msgid "Terminal resize event" msgstr "" -#: ../../../library/curses.rst:1705 +#: ../../../library/curses.rst:2515 msgid "Maximum key value" msgstr "" -#: ../../../library/curses.rst:1708 +#: ../../../library/curses.rst:2518 msgid "" "On VT100s and their software emulations, such as X terminal emulators, there " "are normally at least four function keys (:const:`KEY_F1 `, :const:" @@ -2135,64 +3022,68 @@ msgid "" "keypad mappings are standard:" msgstr "" -#: ../../../library/curses.rst:1717 +#: ../../../library/curses.rst:2527 msgid "Keycap" msgstr "" -#: ../../../library/curses.rst:1717 ../../../library/curses.rst:1862 -#: ../../../library/curses.rst:1988 +#: ../../../library/curses.rst:2527 ../../../library/curses.rst:2681 +#: ../../../library/curses.rst:2816 msgid "Constant" msgstr "" -#: ../../../library/curses.rst:1719 +#: ../../../library/curses.rst:2529 msgid ":kbd:`Insert`" msgstr "" -#: ../../../library/curses.rst:1719 +#: ../../../library/curses.rst:2529 msgid "KEY_IC" msgstr "" -#: ../../../library/curses.rst:1721 +#: ../../../library/curses.rst:2531 msgid ":kbd:`Delete`" msgstr "" -#: ../../../library/curses.rst:1721 +#: ../../../library/curses.rst:2531 msgid "KEY_DC" msgstr "" -#: ../../../library/curses.rst:1723 +#: ../../../library/curses.rst:2533 msgid ":kbd:`Home`" msgstr "" -#: ../../../library/curses.rst:1723 +#: ../../../library/curses.rst:2533 msgid "KEY_HOME" msgstr "" -#: ../../../library/curses.rst:1725 +#: ../../../library/curses.rst:2535 msgid ":kbd:`End`" msgstr "" -#: ../../../library/curses.rst:1725 +#: ../../../library/curses.rst:2535 msgid "KEY_END" msgstr "" -#: ../../../library/curses.rst:1727 +#: ../../../library/curses.rst:2537 msgid ":kbd:`Page Up`" msgstr "" -#: ../../../library/curses.rst:1727 +#: ../../../library/curses.rst:2537 msgid "KEY_PPAGE" msgstr "" -#: ../../../library/curses.rst:1729 +#: ../../../library/curses.rst:2539 msgid ":kbd:`Page Down`" msgstr "" -#: ../../../library/curses.rst:1729 +#: ../../../library/curses.rst:2539 msgid "KEY_NPAGE" msgstr "" -#: ../../../library/curses.rst:1734 +#: ../../../library/curses.rst:2543 +msgid "Alternate character set" +msgstr "" + +#: ../../../library/curses.rst:2547 msgid "" "The following table lists characters from the alternate character set. These " "are inherited from the VT100 terminal, and will generally be available on " @@ -2200,272 +3091,276 @@ msgid "" "available, curses falls back on a crude printable ASCII approximation." msgstr "" -#: ../../../library/curses.rst:1741 +#: ../../../library/curses.rst:2554 msgid "These are available only after :func:`initscr` has been called." msgstr "" -#: ../../../library/curses.rst:1744 +#: ../../../library/curses.rst:2557 msgid "ACS code" msgstr "" -#: ../../../library/curses.rst:1746 +#: ../../../library/curses.rst:2559 msgid "alternate name for upper-right corner" msgstr "" -#: ../../../library/curses.rst:1748 +#: ../../../library/curses.rst:2561 msgid "solid square block" msgstr "" -#: ../../../library/curses.rst:1750 +#: ../../../library/curses.rst:2563 msgid "board of squares" msgstr "" -#: ../../../library/curses.rst:1752 +#: ../../../library/curses.rst:2565 msgid "alternate name for horizontal line" msgstr "" -#: ../../../library/curses.rst:1754 +#: ../../../library/curses.rst:2567 msgid "alternate name for upper-left corner" msgstr "" -#: ../../../library/curses.rst:1756 +#: ../../../library/curses.rst:2569 msgid "alternate name for top tee" msgstr "" -#: ../../../library/curses.rst:1758 +#: ../../../library/curses.rst:2571 msgid "bottom tee" msgstr "" -#: ../../../library/curses.rst:1760 +#: ../../../library/curses.rst:2573 msgid "bullet" msgstr "" -#: ../../../library/curses.rst:1762 +#: ../../../library/curses.rst:2575 msgid "checker board (stipple)" msgstr "" -#: ../../../library/curses.rst:1764 +#: ../../../library/curses.rst:2577 msgid "arrow pointing down" msgstr "" -#: ../../../library/curses.rst:1766 +#: ../../../library/curses.rst:2579 msgid "degree symbol" msgstr "" -#: ../../../library/curses.rst:1768 +#: ../../../library/curses.rst:2581 msgid "diamond" msgstr "" -#: ../../../library/curses.rst:1770 +#: ../../../library/curses.rst:2583 msgid "greater-than-or-equal-to" msgstr "" -#: ../../../library/curses.rst:1772 +#: ../../../library/curses.rst:2585 msgid "horizontal line" msgstr "" -#: ../../../library/curses.rst:1774 +#: ../../../library/curses.rst:2587 msgid "lantern symbol" msgstr "" -#: ../../../library/curses.rst:1776 +#: ../../../library/curses.rst:2589 msgid "left arrow" msgstr "" -#: ../../../library/curses.rst:1778 +#: ../../../library/curses.rst:2591 msgid "less-than-or-equal-to" msgstr "" -#: ../../../library/curses.rst:1780 +#: ../../../library/curses.rst:2593 msgid "lower-left corner" msgstr "" -#: ../../../library/curses.rst:1782 +#: ../../../library/curses.rst:2595 msgid "lower-right corner" msgstr "" -#: ../../../library/curses.rst:1784 +#: ../../../library/curses.rst:2597 msgid "left tee" msgstr "" -#: ../../../library/curses.rst:1786 +#: ../../../library/curses.rst:2599 msgid "not-equal sign" msgstr "" -#: ../../../library/curses.rst:1788 +#: ../../../library/curses.rst:2601 msgid "letter pi" msgstr "" -#: ../../../library/curses.rst:1790 +#: ../../../library/curses.rst:2603 msgid "plus-or-minus sign" msgstr "" -#: ../../../library/curses.rst:1792 +#: ../../../library/curses.rst:2605 msgid "big plus sign" msgstr "" -#: ../../../library/curses.rst:1794 +#: ../../../library/curses.rst:2607 msgid "right arrow" msgstr "" -#: ../../../library/curses.rst:1796 +#: ../../../library/curses.rst:2609 msgid "right tee" msgstr "" -#: ../../../library/curses.rst:1798 +#: ../../../library/curses.rst:2611 msgid "scan line 1" msgstr "" -#: ../../../library/curses.rst:1800 +#: ../../../library/curses.rst:2613 msgid "scan line 3" msgstr "" -#: ../../../library/curses.rst:1802 +#: ../../../library/curses.rst:2615 msgid "scan line 7" msgstr "" -#: ../../../library/curses.rst:1804 +#: ../../../library/curses.rst:2617 msgid "scan line 9" msgstr "" -#: ../../../library/curses.rst:1806 +#: ../../../library/curses.rst:2619 msgid "alternate name for lower-right corner" msgstr "" -#: ../../../library/curses.rst:1808 +#: ../../../library/curses.rst:2621 msgid "alternate name for vertical line" msgstr "" -#: ../../../library/curses.rst:1810 +#: ../../../library/curses.rst:2623 msgid "alternate name for right tee" msgstr "" -#: ../../../library/curses.rst:1812 +#: ../../../library/curses.rst:2625 msgid "alternate name for lower-left corner" msgstr "" -#: ../../../library/curses.rst:1814 +#: ../../../library/curses.rst:2627 msgid "alternate name for bottom tee" msgstr "" -#: ../../../library/curses.rst:1816 +#: ../../../library/curses.rst:2629 msgid "alternate name for left tee" msgstr "" -#: ../../../library/curses.rst:1818 +#: ../../../library/curses.rst:2631 msgid "alternate name for crossover or big plus" msgstr "" -#: ../../../library/curses.rst:1820 +#: ../../../library/curses.rst:2633 msgid "pound sterling" msgstr "" -#: ../../../library/curses.rst:1822 +#: ../../../library/curses.rst:2635 msgid "top tee" msgstr "" -#: ../../../library/curses.rst:1824 +#: ../../../library/curses.rst:2637 msgid "up arrow" msgstr "" -#: ../../../library/curses.rst:1826 +#: ../../../library/curses.rst:2639 msgid "upper-left corner" msgstr "" -#: ../../../library/curses.rst:1828 +#: ../../../library/curses.rst:2641 msgid "upper-right corner" msgstr "" -#: ../../../library/curses.rst:1830 +#: ../../../library/curses.rst:2643 msgid "vertical line" msgstr "" -#: ../../../library/curses.rst:1833 +#: ../../../library/curses.rst:2647 +msgid "Mouse buttons" +msgstr "" + +#: ../../../library/curses.rst:2649 msgid "" "The following table lists mouse button constants used by :meth:`getmouse`:" msgstr "" -#: ../../../library/curses.rst:1836 +#: ../../../library/curses.rst:2652 msgid "Mouse button constant" msgstr "" -#: ../../../library/curses.rst:1838 +#: ../../../library/curses.rst:2654 msgid "Mouse button *n* pressed" msgstr "" -#: ../../../library/curses.rst:1840 +#: ../../../library/curses.rst:2656 msgid "Mouse button *n* released" msgstr "" -#: ../../../library/curses.rst:1842 +#: ../../../library/curses.rst:2658 msgid "Mouse button *n* clicked" msgstr "" -#: ../../../library/curses.rst:1844 +#: ../../../library/curses.rst:2660 msgid "Mouse button *n* double clicked" msgstr "" -#: ../../../library/curses.rst:1846 +#: ../../../library/curses.rst:2662 msgid "Mouse button *n* triple clicked" msgstr "" -#: ../../../library/curses.rst:1848 +#: ../../../library/curses.rst:2664 msgid "Shift was down during button state change" msgstr "" -#: ../../../library/curses.rst:1850 +#: ../../../library/curses.rst:2666 msgid "Control was down during button state change" msgstr "" -#: ../../../library/curses.rst:1852 +#: ../../../library/curses.rst:2668 msgid "Alt was down during button state change" msgstr "" -#: ../../../library/curses.rst:1859 -msgid "The following table lists the predefined colors:" +#: ../../../library/curses.rst:2676 +msgid "Colors" msgstr "" -#: ../../../library/curses.rst:1862 -msgid "Color" +#: ../../../library/curses.rst:2678 +msgid "The following table lists the predefined colors:" msgstr "" -#: ../../../library/curses.rst:1864 +#: ../../../library/curses.rst:2683 msgid "Black" msgstr "" -#: ../../../library/curses.rst:1866 +#: ../../../library/curses.rst:2685 msgid "Blue" msgstr "" -#: ../../../library/curses.rst:1868 +#: ../../../library/curses.rst:2687 msgid "Cyan (light greenish blue)" msgstr "" -#: ../../../library/curses.rst:1870 +#: ../../../library/curses.rst:2689 msgid "Green" msgstr "" -#: ../../../library/curses.rst:1872 +#: ../../../library/curses.rst:2691 msgid "Magenta (purplish red)" msgstr "" -#: ../../../library/curses.rst:1874 +#: ../../../library/curses.rst:2693 msgid "Red" msgstr "" -#: ../../../library/curses.rst:1876 +#: ../../../library/curses.rst:2695 msgid "White" msgstr "" -#: ../../../library/curses.rst:1878 +#: ../../../library/curses.rst:2697 msgid "Yellow" msgstr "" -#: ../../../library/curses.rst:1883 +#: ../../../library/curses.rst:2702 msgid ":mod:`!curses.textpad` --- Text input widget for curses programs" msgstr "" -#: ../../../library/curses.rst:1888 +#: ../../../library/curses.rst:2707 msgid "" "The :mod:`!curses.textpad` module provides a :class:`Textbox` class that " "handles elementary text editing in a curses window, supporting a set of " @@ -2475,11 +3370,11 @@ msgid "" "purposes." msgstr "" -#: ../../../library/curses.rst:1894 +#: ../../../library/curses.rst:2713 msgid "The module :mod:`!curses.textpad` defines the following function:" msgstr "" -#: ../../../library/curses.rst:1899 +#: ../../../library/curses.rst:2718 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 " @@ -2491,15 +3386,15 @@ msgid "" "will be drawn with ASCII dashes, vertical bars, and plus signs." msgstr "" -#: ../../../library/curses.rst:1912 +#: ../../../library/curses.rst:2731 msgid "Textbox objects" msgstr "" -#: ../../../library/curses.rst:1914 +#: ../../../library/curses.rst:2733 msgid "You can instantiate a :class:`Textbox` object as follows:" msgstr "" -#: ../../../library/curses.rst:1919 +#: ../../../library/curses.rst:2738 msgid "" "Return a textbox widget object. The *win* argument should be a curses :ref:" "`window ` object in which the textbox is to be " @@ -2510,11 +3405,18 @@ msgid "" "`stripspaces` flag is initially on." msgstr "" -#: ../../../library/curses.rst:1927 +#: ../../../library/curses.rst:2746 +msgid "" +"Entering and reading back the full Unicode range, including combining " +"characters, is now supported when curses is built with wide-character " +"support." +msgstr "" + +#: ../../../library/curses.rst:2751 msgid ":class:`Textbox` objects have the following methods:" msgstr "" -#: ../../../library/curses.rst:1932 +#: ../../../library/curses.rst:2756 msgid "" "This is the entry point you will normally use. It accepts editing " "keystrokes until one of the termination keystrokes is entered. If " @@ -2525,170 +3427,176 @@ msgid "" "window are included is affected by the :attr:`stripspaces` attribute." msgstr "" -#: ../../../library/curses.rst:1944 +#: ../../../library/curses.rst:2765 +msgid "" +"*validate* is now called with a non-ASCII character as a string; other " +"keystrokes are still passed as an integer." +msgstr "" + +#: ../../../library/curses.rst:2772 msgid "" "Process a single command keystroke. Returns ``1`` to continue editing, or " "``0`` if a termination keystroke was processed. Here are the supported " "special keystrokes:" msgstr "" -#: ../../../library/curses.rst:1949 ../../../library/curses.rst:1988 +#: ../../../library/curses.rst:2777 ../../../library/curses.rst:2816 msgid "Keystroke" msgstr "" -#: ../../../library/curses.rst:1949 +#: ../../../library/curses.rst:2777 msgid "Action" msgstr "" -#: ../../../library/curses.rst:1951 +#: ../../../library/curses.rst:2779 msgid ":kbd:`Control-A`" msgstr "" -#: ../../../library/curses.rst:1951 +#: ../../../library/curses.rst:2779 msgid "Go to left edge of window." msgstr "" -#: ../../../library/curses.rst:1953 ../../../library/curses.rst:1990 +#: ../../../library/curses.rst:2781 ../../../library/curses.rst:2818 msgid ":kbd:`Control-B`" msgstr "" -#: ../../../library/curses.rst:1953 +#: ../../../library/curses.rst:2781 msgid "Cursor left, wrapping to previous line if appropriate." msgstr "" -#: ../../../library/curses.rst:1956 +#: ../../../library/curses.rst:2784 msgid ":kbd:`Control-D`" msgstr "" -#: ../../../library/curses.rst:1956 +#: ../../../library/curses.rst:2784 msgid "Delete character under cursor." msgstr "" -#: ../../../library/curses.rst:1958 +#: ../../../library/curses.rst:2786 msgid ":kbd:`Control-E`" msgstr "" -#: ../../../library/curses.rst:1958 +#: ../../../library/curses.rst:2786 msgid "Go to right edge (stripspaces off) or end of line (stripspaces on)." msgstr "" -#: ../../../library/curses.rst:1961 ../../../library/curses.rst:1992 +#: ../../../library/curses.rst:2789 ../../../library/curses.rst:2820 msgid ":kbd:`Control-F`" msgstr "" -#: ../../../library/curses.rst:1961 +#: ../../../library/curses.rst:2789 msgid "Cursor right, wrapping to next line when appropriate." msgstr "" -#: ../../../library/curses.rst:1964 +#: ../../../library/curses.rst:2792 msgid ":kbd:`Control-G`" msgstr "" -#: ../../../library/curses.rst:1964 +#: ../../../library/curses.rst:2792 msgid "Terminate, returning the window contents." msgstr "" -#: ../../../library/curses.rst:1966 +#: ../../../library/curses.rst:2794 msgid ":kbd:`Control-H`" msgstr "" -#: ../../../library/curses.rst:1966 +#: ../../../library/curses.rst:2794 msgid "Delete character backward." msgstr "" -#: ../../../library/curses.rst:1968 +#: ../../../library/curses.rst:2796 msgid ":kbd:`Control-J`" msgstr "" -#: ../../../library/curses.rst:1968 +#: ../../../library/curses.rst:2796 msgid "" "Terminate if the window is 1 line, otherwise move to the start of the next " "line." msgstr "" -#: ../../../library/curses.rst:1972 +#: ../../../library/curses.rst:2800 msgid ":kbd:`Control-K`" msgstr "" -#: ../../../library/curses.rst:1972 +#: ../../../library/curses.rst:2800 msgid "If line is blank, delete it, otherwise clear to end of line." msgstr "" -#: ../../../library/curses.rst:1975 +#: ../../../library/curses.rst:2803 msgid ":kbd:`Control-L`" msgstr "" -#: ../../../library/curses.rst:1975 +#: ../../../library/curses.rst:2803 msgid "Refresh screen." msgstr "" -#: ../../../library/curses.rst:1977 ../../../library/curses.rst:1996 +#: ../../../library/curses.rst:2805 ../../../library/curses.rst:2824 msgid ":kbd:`Control-N`" msgstr "" -#: ../../../library/curses.rst:1977 +#: ../../../library/curses.rst:2805 msgid "Cursor down; move down one line." msgstr "" -#: ../../../library/curses.rst:1979 +#: ../../../library/curses.rst:2807 msgid ":kbd:`Control-O`" msgstr "" -#: ../../../library/curses.rst:1979 +#: ../../../library/curses.rst:2807 msgid "Insert a blank line at cursor location." msgstr "" -#: ../../../library/curses.rst:1981 ../../../library/curses.rst:1994 +#: ../../../library/curses.rst:2809 ../../../library/curses.rst:2822 msgid ":kbd:`Control-P`" msgstr "" -#: ../../../library/curses.rst:1981 +#: ../../../library/curses.rst:2809 msgid "Cursor up; move up one line." msgstr "" -#: ../../../library/curses.rst:1984 +#: ../../../library/curses.rst:2812 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:1990 +#: ../../../library/curses.rst:2818 msgid ":const:`~curses.KEY_LEFT`" msgstr "" -#: ../../../library/curses.rst:1992 +#: ../../../library/curses.rst:2820 msgid ":const:`~curses.KEY_RIGHT`" msgstr "" -#: ../../../library/curses.rst:1994 +#: ../../../library/curses.rst:2822 msgid ":const:`~curses.KEY_UP`" msgstr "" -#: ../../../library/curses.rst:1996 +#: ../../../library/curses.rst:2824 msgid ":const:`~curses.KEY_DOWN`" msgstr "" -#: ../../../library/curses.rst:1998 +#: ../../../library/curses.rst:2826 msgid ":const:`~curses.KEY_BACKSPACE`" msgstr "" -#: ../../../library/curses.rst:1998 +#: ../../../library/curses.rst:2826 msgid ":kbd:`Control-h`" msgstr "" -#: ../../../library/curses.rst:2001 +#: ../../../library/curses.rst:2829 msgid "" "All other keystrokes are treated as a command to insert the given character " "and move right (with line wrapping)." msgstr "" -#: ../../../library/curses.rst:2007 +#: ../../../library/curses.rst:2835 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:2013 +#: ../../../library/curses.rst:2841 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/main/locale/pot/LC_MESSAGES/library/datatypes.pot b/main/locale/pot/LC_MESSAGES/library/datatypes.pot index 57738090b2c..c8ff46beba6 100644 --- a/main/locale/pot/LC_MESSAGES/library/datatypes.pot +++ b/main/locale/pot/LC_MESSAGES/library/datatypes.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-11 08:40+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,12 +30,13 @@ msgstr "" #: ../../../library/datatypes.rst:11 msgid "" -"Python also provides some built-in data types, in particular, :class:" -"`dict`, :class:`list`, :class:`set` and :class:`frozenset`, and :class:" -"`tuple`. The :class:`str` class is used to hold Unicode strings, and the :" -"class:`bytes` and :class:`bytearray` classes are used to hold binary data." +"Python also provides :ref:`some built-in data types `, in " +"particular, :class:`list`, :class:`tuple`, :class:`dict`, :class:" +"`frozendict`, :class:`set`, and :class:`frozenset`. The :class:`str` class " +"is used to hold Unicode strings, and the :class:`bytes` and :class:" +"`bytearray` classes are used to hold binary data." msgstr "" -#: ../../../library/datatypes.rst:17 +#: ../../../library/datatypes.rst:18 msgid "The following modules are documented in this chapter:" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/dialog.pot b/main/locale/pot/LC_MESSAGES/library/dialog.pot index ed1e02016d1..7ca7348c4b9 100644 --- a/main/locale/pot/LC_MESSAGES/library/dialog.pot +++ b/main/locale/pot/LC_MESSAGES/library/dialog.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -48,34 +48,45 @@ msgid "" "window over which the dialog is shown. :func:`askinteger` and :func:" "`askfloat` also accept *minvalue* and *maxvalue*, which bound the accepted " "value. :func:`askstring` also accepts *show*, a character used to mask the " -"entered text, for example ``'*'`` to hide a password." +"entered text, for example ``'*'`` to hide a password. They use the themed :" +"mod:`tkinter.ttk` widgets; pass ``use_ttk=False`` for the classic widgets." msgstr "" -#: ../../../library/dialog.rst:35 +#: ../../../library/dialog.rst:37 msgid "" "The base class for custom dialogs. Instantiating it shows the dialog modally " "and returns once the user closes it; the entered value is then available in " -"the :attr:`!result` attribute." +"the :attr:`!result` attribute. When *use_ttk* is false (the default), the " +"dialog is built from the classic :mod:`tkinter` widgets, modelled on the " +"classic ``tk_dialog``; when true, from the themed :mod:`tkinter.ttk` " +"widgets, modelled on the Tk message box. The default is classic for " +"compatibility, since the themed widgets set a themed background that classic " +"widgets added in :meth:`body` would not match." msgstr "" -#: ../../../library/dialog.rst:41 +#: ../../../library/dialog.rst:46 ../../../library/dialog.rst:304 +#: ../../../library/dialog.rst:317 +msgid "Added the *use_ttk* parameter." +msgstr "" + +#: ../../../library/dialog.rst:51 msgid "" "The value produced by :meth:`apply`, or ``None`` if the dialog was cancelled." msgstr "" -#: ../../../library/dialog.rst:46 +#: ../../../library/dialog.rst:56 msgid "" "Override to construct the dialog's interface and return the widget that " "should have initial focus." msgstr "" -#: ../../../library/dialog.rst:51 +#: ../../../library/dialog.rst:61 msgid "" "Default behaviour adds OK and Cancel buttons. Override for custom button " "layouts." msgstr "" -#: ../../../library/dialog.rst:56 +#: ../../../library/dialog.rst:66 msgid "" "Validate the data entered by the user. Return true if it is valid, in which " "case the dialog proceeds to :meth:`apply`; return false to keep the dialog " @@ -83,7 +94,7 @@ msgid "" "the input." msgstr "" -#: ../../../library/dialog.rst:64 +#: ../../../library/dialog.rst:74 msgid "" "Process the data entered by the user, for example by storing it in the :attr:" "`!result` attribute. Called after :meth:`validate` succeeds and just before " @@ -91,47 +102,65 @@ msgid "" "it to act on or store the result." msgstr "" -#: ../../../library/dialog.rst:73 +#: ../../../library/dialog.rst:83 msgid "" "Destroy the dialog window, clearing the reference to the widget that had the " "initial focus." msgstr "" -#: ../../../library/dialog.rst:79 +#: ../../../library/dialog.rst:89 msgid "" "A simple modal dialog that displays the message *text* above a row of push " -"buttons whose labels are given by *buttons*, and returns the index of the " -"button the user presses. *default* is the index of the button activated by " -"the Return key, *cancel* the index returned when the window is closed " -"through the window manager, *title* the window title, and *class_* the Tk " -"class name of the window." +"buttons given by *buttons*, and returns the index of the button the user " +"presses. Each entry of *buttons* is either a button label, or a mapping of " +"button options such as ``{'text': 'OK', 'underline': 0}``; an ``underline`` " +"option makes :kbd:`Alt` plus the underlined character invoke the button. " +"*default* is the index of the default button, activated by the Return key " +"when no button has the focus, *cancel* the index returned when the window is " +"closed through the window manager, *title* the window title, and *class_* " +"the Tk class name of the window. *bitmap* is the name of a bitmap displayed " +"beside the message (for example ``'warning'`` or ``'question'``); the " +"standard names ``'error'``, ``'info'``, ``'question'`` and ``'warning'`` are " +"shown as themed icons when *use_ttk* is true. *detail* is a secondary " +"message displayed below *text*. When *use_ttk* is true (the default), the " +"dialog is built from the themed :mod:`tkinter.ttk` widgets, modelled on the " +"Tk message box; when false, from the classic :mod:`tkinter` widgets, " +"modelled on ``tk_dialog``." +msgstr "" + +#: ../../../library/dialog.rst:108 +msgid "" +"The dialog is now built from the themed :mod:`tkinter.ttk` widgets by " +"default, instead of the classic :mod:`tkinter` widgets. Added the *bitmap*, " +"*detail* and *use_ttk* parameters. Entries of *buttons* may be mappings of " +"button options." msgstr "" -#: ../../../library/dialog.rst:88 +#: ../../../library/dialog.rst:116 msgid "" "Display the dialog, wait until the user presses a button or closes the " "window, and return the index of the chosen button." msgstr "" -#: ../../../library/dialog.rst:94 +#: ../../../library/dialog.rst:122 msgid ":mod:`!tkinter.filedialog` --- File selection dialogs" msgstr "" -#: ../../../library/dialog.rst:99 +#: ../../../library/dialog.rst:127 msgid "**Source code:** :source:`Lib/tkinter/filedialog.py`" msgstr "" -#: ../../../library/dialog.rst:103 +#: ../../../library/dialog.rst:131 msgid "" "The :mod:`!tkinter.filedialog` module provides classes and factory functions " "for creating file/directory selection windows." msgstr "" -#: ../../../library/dialog.rst:107 +#: ../../../library/dialog.rst:135 msgid "Native load/save dialogs" msgstr "" -#: ../../../library/dialog.rst:109 +#: ../../../library/dialog.rst:137 msgid "" "The following classes and functions provide file dialog windows that combine " "a native look-and-feel with configuration options to customize behaviour. " @@ -168,34 +197,48 @@ msgstr "" msgid "*multiple* - when true, selection of multiple items is allowed" msgstr "" -#: ../../../library/dialog.rst:129 +#: ../../../library/dialog.rst:157 msgid "**Static factory functions**" msgstr "" -#: ../../../library/dialog.rst:131 +#: ../../../library/dialog.rst:159 msgid "" "The below functions when called create a modal, native look-and-feel dialog, " "wait for the user's selection, and return it. The exact return value depends " -"on the function (see below); when the dialog is cancelled it is an empty " -"string, an empty tuple, an empty list or ``None``." +"on the function (see below); when the dialog is cancelled it is the empty " +"value documented for that function -- an empty string, an empty tuple, an " +"empty list or ``None``." +msgstr "" + +#: ../../../library/dialog.rst:167 +msgid "" +"Create an :class:`Open` dialog and return the opened file object, or " +"``None`` if the dialog is cancelled. The file is opened in mode *mode* (read-" +"only ``'r'`` by default)." msgstr "" -#: ../../../library/dialog.rst:139 +#: ../../../library/dialog.rst:173 msgid "" -"Create an :class:`Open` dialog. :func:`askopenfile` returns the opened file " -"object, or ``None`` if the dialog is cancelled. :func:`askopenfiles` returns " -"a list of the opened file objects, or an empty list if cancelled. The files " -"are opened in mode *mode* (read-only ``'r'`` by default)." +"Create an :class:`Open` dialog and return a list of the opened file objects, " +"or an empty list if cancelled. The files are opened in mode *mode* (read-" +"only ``'r'`` by default)." msgstr "" -#: ../../../library/dialog.rst:148 +#: ../../../library/dialog.rst:177 +msgid "" +"Opening several files at once is error-prone, and the returned list cannot " +"be used in a :keyword:`with` statement. Iterate over the names returned by :" +"func:`askopenfilenames` and open them one by one instead." +msgstr "" + +#: ../../../library/dialog.rst:185 msgid "" "Create a :class:`SaveAs` dialog and return the opened file object, or " "``None`` if the dialog is cancelled. The file is opened in mode *mode* " "(``'w'`` by default)." msgstr "" -#: ../../../library/dialog.rst:155 +#: ../../../library/dialog.rst:192 msgid "" "Create an :class:`Open` dialog. :func:`askopenfilename` returns the selected " "filename as a string, or an empty string if the dialog is cancelled. :func:" @@ -203,13 +246,13 @@ msgid "" "tuple if cancelled." msgstr "" -#: ../../../library/dialog.rst:163 +#: ../../../library/dialog.rst:200 msgid "" "Create a :class:`SaveAs` dialog and return the selected filename as a " "string, or an empty string if the dialog is cancelled." msgstr "" -#: ../../../library/dialog.rst:168 +#: ../../../library/dialog.rst:205 msgid "" "Prompt the user to select a directory, and return its path as a string, or " "an empty string if the dialog is cancelled. Additional keyword option: " @@ -217,172 +260,182 @@ msgid "" "by default)." msgstr "" -#: ../../../library/dialog.rst:176 +#: ../../../library/dialog.rst:214 msgid "" -"The above two classes provide native dialog windows for saving and loading " -"files." +"The above three classes provide native dialog windows for loading and saving " +"files and for selecting a directory." msgstr "" -#: ../../../library/dialog.rst:179 +#: ../../../library/dialog.rst:217 msgid "**Convenience classes**" msgstr "" -#: ../../../library/dialog.rst:181 +#: ../../../library/dialog.rst:219 msgid "" "The below classes are used for creating file/directory windows from scratch. " "These do not emulate the native look-and-feel of the platform." msgstr "" -#: ../../../library/dialog.rst:186 -msgid "Create a dialog prompting the user to select a directory." -msgstr "" - -#: ../../../library/dialog.rst:188 +#: ../../../library/dialog.rst:222 msgid "" "The *FileDialog* class should be subclassed for custom event handling and " "behaviour." msgstr "" -#: ../../../library/dialog.rst:193 -msgid "Create a basic file selection dialog." +#: ../../../library/dialog.rst:227 +msgid "" +"Create a basic file selection dialog. Its layout -- a filter entry, side-by-" +"side directory and file lists, and a selection entry -- follows the classic " +"Motif file selection dialog. When *use_ttk* is true (the default), the " +"dialog is built from the themed :mod:`tkinter.ttk` widgets; when false, from " +"the classic :mod:`tkinter` widgets." msgstr "" -#: ../../../library/dialog.rst:197 +#: ../../../library/dialog.rst:234 +msgid "" +"The dialog is now built from the themed :mod:`tkinter.ttk` widgets by " +"default, instead of the classic :mod:`tkinter` widgets. Added the *use_ttk* " +"parameter." +msgstr "" + +#: ../../../library/dialog.rst:241 msgid "Trigger the termination of the dialog window." msgstr "" -#: ../../../library/dialog.rst:201 +#: ../../../library/dialog.rst:245 msgid "Event handler for double-click event on directory." msgstr "" -#: ../../../library/dialog.rst:205 +#: ../../../library/dialog.rst:249 msgid "Event handler for click event on directory." msgstr "" -#: ../../../library/dialog.rst:209 +#: ../../../library/dialog.rst:253 msgid "Event handler for double-click event on file." msgstr "" -#: ../../../library/dialog.rst:213 +#: ../../../library/dialog.rst:257 msgid "Event handler for single-click event on file." msgstr "" -#: ../../../library/dialog.rst:217 +#: ../../../library/dialog.rst:261 msgid "Filter the files by directory." msgstr "" -#: ../../../library/dialog.rst:221 +#: ../../../library/dialog.rst:265 msgid "Retrieve the file filter currently in use." msgstr "" -#: ../../../library/dialog.rst:225 +#: ../../../library/dialog.rst:269 msgid "Retrieve the currently selected item." msgstr "" -#: ../../../library/dialog.rst:229 +#: ../../../library/dialog.rst:273 msgid "Render dialog and start event loop." msgstr "" -#: ../../../library/dialog.rst:233 +#: ../../../library/dialog.rst:277 msgid "Exit dialog returning current selection." msgstr "" -#: ../../../library/dialog.rst:237 +#: ../../../library/dialog.rst:281 msgid "" "Called when the user confirms the current selection. The base implementation " "accepts the selection and closes the dialog; :class:`LoadFileDialog` and :" "class:`SaveFileDialog` override it to check the selection first." msgstr "" -#: ../../../library/dialog.rst:244 +#: ../../../library/dialog.rst:288 msgid "Exit dialog returning filename, if any." msgstr "" -#: ../../../library/dialog.rst:248 +#: ../../../library/dialog.rst:292 msgid "Set the file filter." msgstr "" -#: ../../../library/dialog.rst:252 +#: ../../../library/dialog.rst:296 msgid "Update the current file selection to *file*." msgstr "" -#: ../../../library/dialog.rst:257 +#: ../../../library/dialog.rst:301 msgid "" "A subclass of FileDialog that creates a dialog window for selecting an " "existing file." msgstr "" -#: ../../../library/dialog.rst:262 +#: ../../../library/dialog.rst:309 msgid "" "Test that a file is provided and that the selection indicates an already " "existing file." msgstr "" -#: ../../../library/dialog.rst:267 +#: ../../../library/dialog.rst:314 msgid "" "A subclass of FileDialog that creates a dialog window for selecting a " "destination file." msgstr "" -#: ../../../library/dialog.rst:272 +#: ../../../library/dialog.rst:322 msgid "" "Test whether or not the selection points to a valid file that is not a " "directory. Confirmation is required if an already existing file is selected." msgstr "" -#: ../../../library/dialog.rst:277 +#: ../../../library/dialog.rst:327 msgid ":mod:`!tkinter.commondialog` --- Dialog window templates" msgstr "" -#: ../../../library/dialog.rst:282 +#: ../../../library/dialog.rst:332 msgid "**Source code:** :source:`Lib/tkinter/commondialog.py`" msgstr "" -#: ../../../library/dialog.rst:286 +#: ../../../library/dialog.rst:336 msgid "" "The :mod:`!tkinter.commondialog` module provides the :class:`Dialog` class " "that is the base class for dialogs defined in other supporting modules." msgstr "" -#: ../../../library/dialog.rst:293 +#: ../../../library/dialog.rst:343 msgid "Render the Dialog window." msgstr "" -#: ../../../library/dialog.rst:297 +#: ../../../library/dialog.rst:347 msgid ":mod:`!tkinter.dialog` --- Classic Tk dialog boxes" msgstr "" -#: ../../../library/dialog.rst:302 +#: ../../../library/dialog.rst:352 msgid "**Source code:** :source:`Lib/tkinter/dialog.py`" msgstr "" -#: ../../../library/dialog.rst:306 +#: ../../../library/dialog.rst:356 msgid "" "The :mod:`!tkinter.dialog` module provides a simple modal dialog box built " "on the classic (non-themed) Tk widgets." msgstr "" -#: ../../../library/dialog.rst:311 +#: ../../../library/dialog.rst:361 msgid "" -"The name of the default bitmap (``'questhead'``) displayed by a :class:" -"`Dialog`." +"The name of a bitmap (``'questhead'``) suitable for use as the *bitmap* of " +"a :class:`Dialog`." msgstr "" -#: ../../../library/dialog.rst:316 +#: ../../../library/dialog.rst:366 msgid "" "Display a modal dialog box built from the classic (non-themed) Tk widgets " "and wait for the user to press one of its buttons. The options, given " -"through *cnf* or as keyword arguments, include *title* (the window title), " -"*text* (the message), *bitmap* (an icon, :data:`DIALOG_ICON` by default), " -"*default* (the index of the default button) and *strings* (the sequence of " -"button labels). After construction, the :attr:`!num` attribute holds the " -"index of the button the user pressed." +"through *cnf* or as keyword arguments, are all required: *title* (the window " +"title), *text* (the message), *bitmap* (the name of a bitmap icon, such as :" +"data:`DIALOG_ICON`), *default* (the index of the default button) and " +"*strings* (the sequence of button labels). After construction, the :attr:`!" +"num` attribute holds the index of the button the user pressed." msgstr "" -#: ../../../library/dialog.rst:327 -msgid "Destroy the dialog window." +#: ../../../library/dialog.rst:377 +msgid "" +"Do nothing. The dialog window is destroyed automatically before the " +"constructor returns, so there is nothing left for this method to do." msgstr "" -#: ../../../library/dialog.rst:332 +#: ../../../library/dialog.rst:384 msgid "Modules :mod:`tkinter.messagebox`, :ref:`tut-files`" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/difflib.pot b/main/locale/pot/LC_MESSAGES/library/difflib.pot index a27651ae350..b78a12e446f 100644 --- a/main/locale/pot/LC_MESSAGES/library/difflib.pot +++ b/main/locale/pot/LC_MESSAGES/library/difflib.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -71,7 +71,7 @@ msgid "" "``False`` when creating the :class:`SequenceMatcher`." msgstr "" -#: ../../../library/difflib.rst:51 ../../../library/difflib.rst:390 +#: ../../../library/difflib.rst:51 ../../../library/difflib.rst:395 msgid "Added the *autojunk* parameter." msgstr "" @@ -91,7 +91,7 @@ msgstr "" msgid "Code" msgstr "" -#: ../../../library/difflib.rst:65 ../../../library/difflib.rst:500 +#: ../../../library/difflib.rst:65 ../../../library/difflib.rst:505 msgid "Meaning" msgstr "" @@ -143,27 +143,33 @@ msgid "" "generated in either full or contextual difference mode." msgstr "" -#: ../../../library/difflib.rst:88 -msgid "The constructor for this class is:" +#: ../../../library/difflib.rst:90 +msgid "" +"The trailing newlines get stripped before the diff, so the result can be " +"incomplete. See :gh:`71896` for details." msgstr "" #: ../../../library/difflib.rst:93 +msgid "The constructor for this class is:" +msgstr "" + +#: ../../../library/difflib.rst:98 msgid "Initializes instance of :class:`HtmlDiff`." msgstr "" -#: ../../../library/difflib.rst:95 +#: ../../../library/difflib.rst:100 msgid "" "*tabsize* is an optional keyword argument to specify tab stop spacing and " "defaults to ``8``." msgstr "" -#: ../../../library/difflib.rst:98 +#: ../../../library/difflib.rst:103 msgid "" "*wrapcolumn* is an optional keyword to specify column number where lines are " "broken and wrapped, defaults to ``None`` where lines are not wrapped." msgstr "" -#: ../../../library/difflib.rst:101 +#: ../../../library/difflib.rst:106 msgid "" "*linejunk* and *charjunk* are optional keyword arguments passed into :func:" "`ndiff` (used by :class:`HtmlDiff` to generate the side by side HTML " @@ -171,24 +177,24 @@ msgid "" "and descriptions." msgstr "" -#: ../../../library/difflib.rst:105 +#: ../../../library/difflib.rst:110 msgid "The following methods are public:" msgstr "" -#: ../../../library/difflib.rst:110 +#: ../../../library/difflib.rst:115 msgid "" "Compares *fromlines* and *tolines* (lists of strings) and returns a string " "which is a complete HTML file containing a table showing line by line " "differences with inter-line and intra-line changes highlighted." msgstr "" -#: ../../../library/difflib.rst:114 +#: ../../../library/difflib.rst:119 msgid "" "*fromdesc* and *todesc* are optional keyword arguments to specify from/to " "file column header strings (both default to an empty string)." msgstr "" -#: ../../../library/difflib.rst:117 +#: ../../../library/difflib.rst:122 msgid "" "*context* and *numlines* are both optional keyword arguments. Set *context* " "to ``True`` when contextual differences are to be shown, else the default is " @@ -201,45 +207,45 @@ msgid "" "without any leading context)." msgstr "" -#: ../../../library/difflib.rst:128 +#: ../../../library/difflib.rst:133 msgid "" "*fromdesc* and *todesc* are interpreted as unescaped HTML and should be " "properly escaped while receiving input from untrusted sources." msgstr "" -#: ../../../library/difflib.rst:131 +#: ../../../library/difflib.rst:136 msgid "" "*charset* keyword-only argument was added. The default charset of HTML " "document changed from ``'ISO-8859-1'`` to ``'utf-8'``." msgstr "" -#: ../../../library/difflib.rst:137 +#: ../../../library/difflib.rst:142 msgid "" "Compares *fromlines* and *tolines* (lists of strings) and returns a string " "which is a complete HTML table showing line by line differences with inter-" "line and intra-line changes highlighted." msgstr "" -#: ../../../library/difflib.rst:141 +#: ../../../library/difflib.rst:146 msgid "" "The arguments for this method are the same as those for the :meth:" "`make_file` method." msgstr "" -#: ../../../library/difflib.rst:148 +#: ../../../library/difflib.rst:153 msgid "" "Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` " "generating the delta lines) in context diff format." msgstr "" -#: ../../../library/difflib.rst:151 +#: ../../../library/difflib.rst:156 msgid "" "Context diffs are a compact way of showing just the lines that have changed " "plus a few lines of context. The changes are shown in a before/after " "style. The number of context lines is set by *n* which defaults to three." msgstr "" -#: ../../../library/difflib.rst:155 +#: ../../../library/difflib.rst:160 msgid "" "By default, the diff control lines (those with ``***`` or ``---``) are " "created with a trailing newline. This is helpful so that inputs created " @@ -248,13 +254,13 @@ msgid "" "trailing newlines." msgstr "" -#: ../../../library/difflib.rst:161 ../../../library/difflib.rst:293 +#: ../../../library/difflib.rst:166 ../../../library/difflib.rst:298 msgid "" "For inputs that do not have trailing newlines, set the *lineterm* argument " "to ``\"\"`` so that the output will be uniformly newline free." msgstr "" -#: ../../../library/difflib.rst:164 +#: ../../../library/difflib.rst:169 msgid "" "The context diff format normally has a header for filenames and modification " "times. Any or all of these may be specified using strings for *fromfile*, " @@ -263,11 +269,11 @@ msgid "" "default to blanks." msgstr "" -#: ../../../library/difflib.rst:190 ../../../library/difflib.rst:320 +#: ../../../library/difflib.rst:195 ../../../library/difflib.rst:325 msgid "See :ref:`difflib-interface` for a more detailed example." msgstr "" -#: ../../../library/difflib.rst:195 +#: ../../../library/difflib.rst:200 msgid "" "Return a list of the best \"good enough\" matches. *word* is a sequence for " "which close matches are desired (typically a string), and *possibilities* is " @@ -275,37 +281,37 @@ msgid "" "strings)." msgstr "" -#: ../../../library/difflib.rst:199 +#: ../../../library/difflib.rst:204 msgid "" "Optional argument *n* (default ``3``) is the maximum number of close matches " "to return; *n* must be greater than ``0``." msgstr "" -#: ../../../library/difflib.rst:202 +#: ../../../library/difflib.rst:207 msgid "" "Optional argument *cutoff* (default ``0.6``) is a float in the range [0, 1]. " "Possibilities that don't score at least that similar to *word* are ignored." msgstr "" -#: ../../../library/difflib.rst:205 +#: ../../../library/difflib.rst:210 msgid "" "The best (no more than *n*) matches among the possibilities are returned in " "a list, sorted by similarity score, most similar first." msgstr "" -#: ../../../library/difflib.rst:221 +#: ../../../library/difflib.rst:226 msgid "" "Compare *a* and *b* (lists of strings); return a :class:`Differ`\\ -style " "delta (a :term:`generator` generating the delta lines)." msgstr "" -#: ../../../library/difflib.rst:224 +#: ../../../library/difflib.rst:229 msgid "" "Optional keyword parameters *linejunk* and *charjunk* are filtering " "functions (or ``None``):" msgstr "" -#: ../../../library/difflib.rst:227 +#: ../../../library/difflib.rst:232 msgid "" "*linejunk*: A function that accepts a single string argument, and returns " "true if the string is junk, or false if not. The default is ``None``. There " @@ -316,7 +322,7 @@ msgid "" "this usually works better than using this function." msgstr "" -#: ../../../library/difflib.rst:235 +#: ../../../library/difflib.rst:240 msgid "" "*charjunk*: A function that accepts a character (a string of length 1), and " "returns if the character is junk, or false if not. The default is module-" @@ -324,28 +330,28 @@ msgid "" "characters (a blank or tab; it's a bad idea to include newline in this!)." msgstr "" -#: ../../../library/difflib.rst:256 +#: ../../../library/difflib.rst:261 msgid "Return one of the two sequences that generated a delta." msgstr "" -#: ../../../library/difflib.rst:258 +#: ../../../library/difflib.rst:263 msgid "" "Given a *sequence* produced by :meth:`Differ.compare` or :func:`ndiff`, " "extract lines originating from file 1 or 2 (parameter *which*), stripping " "off line prefixes." msgstr "" -#: ../../../library/difflib.rst:262 +#: ../../../library/difflib.rst:267 msgid "Example:" msgstr "" -#: ../../../library/difflib.rst:279 +#: ../../../library/difflib.rst:284 msgid "" "Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` " "generating the delta lines) in unified diff format." msgstr "" -#: ../../../library/difflib.rst:282 +#: ../../../library/difflib.rst:287 msgid "" "Unified diffs are a compact way of showing just the lines that have changed " "plus a few lines of context. The changes are shown in an inline style " @@ -353,7 +359,7 @@ msgid "" "set by *n* which defaults to three." msgstr "" -#: ../../../library/difflib.rst:287 +#: ../../../library/difflib.rst:292 msgid "" "By default, the diff control lines (those with ``---``, ``+++``, or ``@@``) " "are created with a trailing newline. This is helpful so that inputs created " @@ -362,14 +368,14 @@ msgid "" "trailing newlines." msgstr "" -#: ../../../library/difflib.rst:296 +#: ../../../library/difflib.rst:301 msgid "" "Set *color* to ``True`` to enable output in color, similar to :program:`git " "diff --color`. Even if enabled, it can be :ref:`controlled using environment " "variables `." msgstr "" -#: ../../../library/difflib.rst:300 +#: ../../../library/difflib.rst:305 msgid "" "The unified diff format normally has a header for filenames and modification " "times. Any or all of these may be specified using strings for *fromfile*, " @@ -378,18 +384,18 @@ msgid "" "default to blanks." msgstr "" -#: ../../../library/difflib.rst:322 +#: ../../../library/difflib.rst:327 msgid "Added the *color* parameter." msgstr "" -#: ../../../library/difflib.rst:328 +#: ../../../library/difflib.rst:333 msgid "" "Compare *a* and *b* (lists of bytes objects) using *dfunc*; yield a sequence " "of delta lines (also bytes) in the format returned by *dfunc*. *dfunc* must " "be a callable, typically either :func:`unified_diff` or :func:`context_diff`." msgstr "" -#: ../../../library/difflib.rst:333 +#: ../../../library/difflib.rst:338 msgid "" "Allows you to compare data with unknown or inconsistent encoding. All inputs " "except *n* must be bytes objects, not str. Works by losslessly converting " @@ -399,41 +405,41 @@ msgid "" "unknown/inconsistent encodings as *a* and *b*." msgstr "" -#: ../../../library/difflib.rst:344 +#: ../../../library/difflib.rst:349 msgid "" "Return ``True`` for ignorable lines. The line *line* is ignorable if *line* " "is blank or contains a single ``'#'``, otherwise it is not ignorable. Used " "as a default for parameter *linejunk* in :func:`ndiff` in older versions." msgstr "" -#: ../../../library/difflib.rst:351 +#: ../../../library/difflib.rst:356 msgid "" "Return ``True`` for ignorable characters. The character *ch* is ignorable " "if *ch* is a space or tab, otherwise it is not ignorable. Used as a default " "for parameter *charjunk* in :func:`ndiff`." msgstr "" -#: ../../../library/difflib.rst:358 +#: ../../../library/difflib.rst:363 msgid "" "`Pattern Matching: The Gestalt Approach `_" msgstr "" -#: ../../../library/difflib.rst:359 +#: ../../../library/difflib.rst:364 msgid "" "Discussion of a similar algorithm by John W. Ratcliff and D. E. Metzener. " "This was published in Dr. Dobb's Journal in July, 1988." msgstr "" -#: ../../../library/difflib.rst:366 +#: ../../../library/difflib.rst:371 msgid "SequenceMatcher objects" msgstr "" -#: ../../../library/difflib.rst:368 +#: ../../../library/difflib.rst:373 msgid "The :class:`SequenceMatcher` class has this constructor:" msgstr "" -#: ../../../library/difflib.rst:373 +#: ../../../library/difflib.rst:378 msgid "" "Optional argument *isjunk* must be ``None`` (the default) or a one-argument " "function that takes a sequence element and returns true if and only if the " @@ -442,26 +448,26 @@ msgid "" "ignored. For example, pass::" msgstr "" -#: ../../../library/difflib.rst:381 +#: ../../../library/difflib.rst:386 msgid "" "if you're comparing lines as sequences of characters, and don't want to " "synch up on blanks or hard tabs." msgstr "" -#: ../../../library/difflib.rst:384 +#: ../../../library/difflib.rst:389 msgid "" "The optional arguments *a* and *b* are sequences to be compared; both " "default to empty strings. The elements of both sequences must be :term:" "`hashable`." msgstr "" -#: ../../../library/difflib.rst:387 +#: ../../../library/difflib.rst:392 msgid "" "The optional argument *autojunk* can be used to disable the automatic junk " "heuristic." msgstr "" -#: ../../../library/difflib.rst:393 +#: ../../../library/difflib.rst:398 msgid "" "SequenceMatcher objects get three data attributes: *bjunk* is the set of " "elements of *b* for which *isjunk* is ``True``; *bpopular* is the set of non-" @@ -471,19 +477,19 @@ msgid "" "`set_seqs` or :meth:`set_seq2`." msgstr "" -#: ../../../library/difflib.rst:400 +#: ../../../library/difflib.rst:405 msgid "The *bjunk* and *bpopular* attributes." msgstr "" -#: ../../../library/difflib.rst:403 +#: ../../../library/difflib.rst:408 msgid ":class:`SequenceMatcher` objects have the following methods:" msgstr "" -#: ../../../library/difflib.rst:407 +#: ../../../library/difflib.rst:412 msgid "Set the two sequences to be compared." msgstr "" -#: ../../../library/difflib.rst:409 +#: ../../../library/difflib.rst:414 msgid "" ":class:`SequenceMatcher` computes and caches detailed information about the " "second sequence, so if you want to compare one sequence against many " @@ -491,23 +497,23 @@ msgid "" "call :meth:`set_seq1` repeatedly, once for each of the other sequences." msgstr "" -#: ../../../library/difflib.rst:417 +#: ../../../library/difflib.rst:422 msgid "" "Set the first sequence to be compared. The second sequence to be compared " "is not changed." msgstr "" -#: ../../../library/difflib.rst:423 +#: ../../../library/difflib.rst:428 msgid "" "Set the second sequence to be compared. The first sequence to be compared " "is not changed." msgstr "" -#: ../../../library/difflib.rst:429 +#: ../../../library/difflib.rst:434 msgid "Find longest matching block in ``a[alo:ahi]`` and ``b[blo:bhi]``." msgstr "" -#: ../../../library/difflib.rst:431 +#: ../../../library/difflib.rst:436 msgid "" "If *isjunk* was omitted or ``None``, :meth:`find_longest_match` returns " "``(i, j, k)`` such that ``a[i:i+k]`` is equal to ``b[j:j+k]``, where ``alo " @@ -519,7 +525,7 @@ msgid "" "that starts earliest in *b*." msgstr "" -#: ../../../library/difflib.rst:444 +#: ../../../library/difflib.rst:449 msgid "" "If *isjunk* was provided, first the longest matching block is determined as " "above, but with the additional restriction that no junk element appears in " @@ -528,7 +534,7 @@ msgid "" "junk except as identical junk happens to be adjacent to an interesting match." msgstr "" -#: ../../../library/difflib.rst:451 +#: ../../../library/difflib.rst:456 msgid "" "Here's the same example as before, but considering blanks to be junk. That " "prevents ``' abcd'`` from matching the ``' abcd'`` at the tail end of the " @@ -536,26 +542,26 @@ msgid "" "matches the leftmost ``'abcd'`` in the second sequence:" msgstr "" -#: ../../../library/difflib.rst:460 +#: ../../../library/difflib.rst:465 msgid "If no blocks match, this returns ``(alo, blo, 0)``." msgstr "" -#: ../../../library/difflib.rst:462 +#: ../../../library/difflib.rst:467 msgid "This method returns a :term:`named tuple` ``Match(a, b, size)``." msgstr "" -#: ../../../library/difflib.rst:464 +#: ../../../library/difflib.rst:469 msgid "Added default arguments." msgstr "" -#: ../../../library/difflib.rst:470 +#: ../../../library/difflib.rst:475 msgid "" "Return list of triples describing non-overlapping matching subsequences. " "Each triple is of the form ``(i, j, n)``, and means that ``a[i:i+n] == b[j:" "j+n]``. The triples are monotonically increasing in *i* and *j*." msgstr "" -#: ../../../library/difflib.rst:475 +#: ../../../library/difflib.rst:480 msgid "" "The last triple is a dummy, and has the value ``(len(a), len(b), 0)``. It " "is the only triple with ``n == 0``. If ``(i, j, n)`` and ``(i', j', n')`` " @@ -564,7 +570,7 @@ msgid "" "triples always describe non-adjacent equal blocks." msgstr "" -#: ../../../library/difflib.rst:492 +#: ../../../library/difflib.rst:497 msgid "" "Return list of 5-tuples describing how to turn *a* into *b*. Each tuple is " "of the form ``(tag, i1, i2, j1, j2)``. The first tuple has ``i1 == j1 == " @@ -572,101 +578,101 @@ msgid "" "tuple, and, likewise, *j1* equal to the previous *j2*." msgstr "" -#: ../../../library/difflib.rst:497 +#: ../../../library/difflib.rst:502 msgid "The *tag* values are strings, with these meanings:" msgstr "" -#: ../../../library/difflib.rst:500 +#: ../../../library/difflib.rst:505 msgid "Value" msgstr "" -#: ../../../library/difflib.rst:502 +#: ../../../library/difflib.rst:507 msgid "``'replace'``" msgstr "" -#: ../../../library/difflib.rst:502 +#: ../../../library/difflib.rst:507 msgid "``a[i1:i2]`` should be replaced by ``b[j1:j2]``." msgstr "" -#: ../../../library/difflib.rst:505 +#: ../../../library/difflib.rst:510 msgid "``'delete'``" msgstr "" -#: ../../../library/difflib.rst:505 +#: ../../../library/difflib.rst:510 msgid "``a[i1:i2]`` should be deleted. Note that ``j1 == j2`` in this case." msgstr "" -#: ../../../library/difflib.rst:508 +#: ../../../library/difflib.rst:513 msgid "``'insert'``" msgstr "" -#: ../../../library/difflib.rst:508 +#: ../../../library/difflib.rst:513 msgid "" "``b[j1:j2]`` should be inserted at ``a[i1:i1]``. Note that ``i1 == i2`` in " "this case." msgstr "" -#: ../../../library/difflib.rst:512 +#: ../../../library/difflib.rst:517 msgid "``'equal'``" msgstr "" -#: ../../../library/difflib.rst:512 +#: ../../../library/difflib.rst:517 msgid "``a[i1:i2] == b[j1:j2]`` (the sub-sequences are equal)." msgstr "" -#: ../../../library/difflib.rst:516 +#: ../../../library/difflib.rst:521 msgid "For example::" msgstr "" -#: ../../../library/difflib.rst:533 +#: ../../../library/difflib.rst:538 msgid "Return a :term:`generator` of groups with up to *n* lines of context." msgstr "" -#: ../../../library/difflib.rst:535 +#: ../../../library/difflib.rst:540 msgid "" "Starting with the groups returned by :meth:`get_opcodes`, this method splits " "out smaller change clusters and eliminates intervening ranges which have no " "changes." msgstr "" -#: ../../../library/difflib.rst:539 +#: ../../../library/difflib.rst:544 msgid "The groups are returned in the same format as :meth:`get_opcodes`." msgstr "" -#: ../../../library/difflib.rst:544 +#: ../../../library/difflib.rst:549 msgid "" "Return a measure of the sequences' similarity as a float in the range [0, 1]." msgstr "" -#: ../../../library/difflib.rst:547 +#: ../../../library/difflib.rst:552 msgid "" "Where T is the total number of elements in both sequences, and M is the " "number of matches, this is 2.0\\*M / T. Note that this is ``1.0`` if the " "sequences are identical, and ``0.0`` if they have nothing in common." msgstr "" -#: ../../../library/difflib.rst:551 +#: ../../../library/difflib.rst:556 msgid "" "This is expensive to compute if :meth:`get_matching_blocks` or :meth:" "`get_opcodes` hasn't already been called, in which case you may want to try :" "meth:`quick_ratio` or :meth:`real_quick_ratio` first to get an upper bound." msgstr "" -#: ../../../library/difflib.rst:558 +#: ../../../library/difflib.rst:563 msgid "" "Caution: The result of a :meth:`ratio` call may depend on the order of the " "arguments. For instance::" msgstr "" -#: ../../../library/difflib.rst:569 +#: ../../../library/difflib.rst:574 msgid "Return an upper bound on :meth:`ratio` relatively quickly." msgstr "" -#: ../../../library/difflib.rst:574 +#: ../../../library/difflib.rst:579 msgid "Return an upper bound on :meth:`ratio` very quickly." msgstr "" -#: ../../../library/difflib.rst:577 +#: ../../../library/difflib.rst:582 msgid "" "The three methods that return the ratio of matching to total characters can " "give different results due to differing levels of approximation, although :" @@ -675,28 +681,28 @@ msgid "" "ratio`:" msgstr "" -#: ../../../library/difflib.rst:594 +#: ../../../library/difflib.rst:599 msgid "SequenceMatcher examples" msgstr "" -#: ../../../library/difflib.rst:596 +#: ../../../library/difflib.rst:601 msgid "This example compares two strings, considering blanks to be \"junk\":" msgstr "" -#: ../../../library/difflib.rst:602 +#: ../../../library/difflib.rst:607 msgid "" ":meth:`~SequenceMatcher.ratio` returns a float in [0, 1], measuring the " "similarity of the sequences. As a rule of thumb, a :meth:`~SequenceMatcher." "ratio` value over 0.6 means the sequences are close matches:" msgstr "" -#: ../../../library/difflib.rst:609 +#: ../../../library/difflib.rst:614 msgid "" "If you're only interested in where the sequences match, :meth:" "`~SequenceMatcher.get_matching_blocks` is handy:" msgstr "" -#: ../../../library/difflib.rst:618 +#: ../../../library/difflib.rst:623 msgid "" "Note that the last tuple returned by :meth:`~SequenceMatcher." "get_matching_blocks` is always a dummy, ``(len(a), len(b), 0)``, and this is " @@ -704,30 +710,30 @@ msgid "" "is ``0``." msgstr "" -#: ../../../library/difflib.rst:622 +#: ../../../library/difflib.rst:627 msgid "" "If you want to know how to change the first sequence into the second, use :" "meth:`~SequenceMatcher.get_opcodes`:" msgstr "" -#: ../../../library/difflib.rst:633 +#: ../../../library/difflib.rst:638 msgid "" "The :func:`get_close_matches` function in this module which shows how simple " "code building on :class:`SequenceMatcher` can be used to do useful work." msgstr "" -#: ../../../library/difflib.rst:637 +#: ../../../library/difflib.rst:642 msgid "" "`Simple version control recipe `_ for a small application built with :class:" "`SequenceMatcher`." msgstr "" -#: ../../../library/difflib.rst:645 +#: ../../../library/difflib.rst:650 msgid "Differ objects" msgstr "" -#: ../../../library/difflib.rst:647 +#: ../../../library/difflib.rst:652 msgid "" "Note that :class:`Differ`\\ -generated deltas make no claim to be " "**minimal** diffs. To the contrary, minimal diffs are often counter-" @@ -737,31 +743,31 @@ msgid "" "longer diff." msgstr "" -#: ../../../library/difflib.rst:653 +#: ../../../library/difflib.rst:658 msgid "The :class:`Differ` class has this constructor:" msgstr "" -#: ../../../library/difflib.rst:659 +#: ../../../library/difflib.rst:664 msgid "" "Optional keyword parameters *linejunk* and *charjunk* are for filter " "functions (or ``None``):" msgstr "" -#: ../../../library/difflib.rst:662 +#: ../../../library/difflib.rst:667 msgid "" "*linejunk*: A function that accepts a single string argument, and returns " "true if the string is junk. The default is ``None``, meaning that no line " "is considered junk." msgstr "" -#: ../../../library/difflib.rst:666 +#: ../../../library/difflib.rst:671 msgid "" "*charjunk*: A function that accepts a single character argument (a string of " "length 1), and returns true if the character is junk. The default is " "``None``, meaning that no character is considered junk." msgstr "" -#: ../../../library/difflib.rst:670 +#: ../../../library/difflib.rst:675 msgid "" "These junk-filtering functions speed up matching to find differences and do " "not cause any differing lines or characters to be ignored. Read the " @@ -769,17 +775,17 @@ msgid "" "*isjunk* parameter for an explanation." msgstr "" -#: ../../../library/difflib.rst:676 +#: ../../../library/difflib.rst:681 msgid "" ":class:`Differ` objects are used (deltas generated) via a single method:" msgstr "" -#: ../../../library/difflib.rst:681 +#: ../../../library/difflib.rst:686 msgid "" "Compare two sequences of lines, and generate the delta (a sequence of lines)." msgstr "" -#: ../../../library/difflib.rst:683 +#: ../../../library/difflib.rst:688 msgid "" "Each sequence must contain individual single-line strings ending with " "newlines. Such sequences can be obtained from the :meth:`~io.IOBase." @@ -788,11 +794,11 @@ msgid "" "IOBase.writelines` method of a file-like object." msgstr "" -#: ../../../library/difflib.rst:694 +#: ../../../library/difflib.rst:699 msgid "Differ example" msgstr "" -#: ../../../library/difflib.rst:696 +#: ../../../library/difflib.rst:701 msgid "" "This example compares two texts. First we set up the texts, sequences of " "individual single-line strings ending with newlines (such sequences can also " @@ -800,42 +806,42 @@ msgid "" "objects):" msgstr "" -#: ../../../library/difflib.rst:715 +#: ../../../library/difflib.rst:720 msgid "Next we instantiate a Differ object:" msgstr "" -#: ../../../library/difflib.rst:719 +#: ../../../library/difflib.rst:724 msgid "" "Note that when instantiating a :class:`Differ` object we may pass functions " "to filter out line and character \"junk.\" See the :meth:`Differ` " "constructor for details." msgstr "" -#: ../../../library/difflib.rst:723 +#: ../../../library/difflib.rst:728 msgid "Finally, we compare the two:" msgstr "" -#: ../../../library/difflib.rst:727 +#: ../../../library/difflib.rst:732 msgid "``result`` is a list of strings, so let's pretty-print it::" msgstr "" -#: ../../../library/difflib.rst:742 +#: ../../../library/difflib.rst:747 msgid "As a single multi-line string it looks like this::" msgstr "" -#: ../../../library/difflib.rst:761 +#: ../../../library/difflib.rst:766 msgid "A command-line interface to difflib" msgstr "" -#: ../../../library/difflib.rst:763 +#: ../../../library/difflib.rst:768 msgid "" "This example shows how to use difflib to create a ``diff``-like utility." msgstr "" -#: ../../../library/difflib.rst:768 +#: ../../../library/difflib.rst:773 msgid "ndiff example" msgstr "" -#: ../../../library/difflib.rst:770 +#: ../../../library/difflib.rst:775 msgid "This example shows how to use :func:`difflib.ndiff`." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/dis.pot b/main/locale/pot/LC_MESSAGES/library/dis.pot index 878e0304901..023bd14a43a 100644 --- a/main/locale/pot/LC_MESSAGES/library/dis.pot +++ b/main/locale/pot/LC_MESSAGES/library/dis.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-04-27 10:55+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -173,7 +173,7 @@ msgid "" "instance yields the bytecode operations as :class:`Instruction` instances." msgstr "" -#: ../../../library/dis.rst:152 ../../../library/dis.rst:373 +#: ../../../library/dis.rst:152 ../../../library/dis.rst:393 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 " @@ -212,61 +212,73 @@ msgid "" "source code positions in the output." msgstr "" -#: ../../../library/dis.rst:175 +#: ../../../library/dis.rst:173 +msgid "" +"If *show_jit* is ``True``, :meth:`.dis` will show ``ENTER_EXECUTOR`` " +"instructions, which mark JIT entry points and are hidden by default." +msgstr "" + +#: ../../../library/dis.rst:178 msgid "" "Construct a :class:`Bytecode` instance from the given traceback, setting " "*current_offset* to the instruction responsible for the exception." msgstr "" -#: ../../../library/dis.rst:180 +#: ../../../library/dis.rst:183 msgid "The compiled code object." msgstr "" -#: ../../../library/dis.rst:184 +#: ../../../library/dis.rst:187 msgid "The first source line of the code object (if available)" msgstr "" -#: ../../../library/dis.rst:188 +#: ../../../library/dis.rst:191 msgid "" "Return a formatted view of the bytecode operations (the same as printed by :" "func:`dis.dis`, but returned as a multi-line string)." msgstr "" -#: ../../../library/dis.rst:193 +#: ../../../library/dis.rst:196 msgid "" "Return a formatted multi-line string with detailed information about the " "code object, like :func:`code_info`." msgstr "" -#: ../../../library/dis.rst:196 ../../../library/dis.rst:242 -#: ../../../library/dis.rst:295 +#: ../../../library/dis.rst:199 ../../../library/dis.rst:248 +#: ../../../library/dis.rst:305 msgid "This can now handle coroutine and asynchronous generator objects." msgstr "" -#: ../../../library/dis.rst:199 ../../../library/dis.rst:298 -#: ../../../library/dis.rst:320 ../../../library/dis.rst:356 -#: ../../../library/dis.rst:382 +#: ../../../library/dis.rst:202 ../../../library/dis.rst:308 +#: ../../../library/dis.rst:333 ../../../library/dis.rst:373 +#: ../../../library/dis.rst:404 msgid "Added the *show_caches* and *adaptive* parameters." msgstr "" -#: ../../../library/dis.rst:202 +#: ../../../library/dis.rst:205 msgid "Added the *show_offsets* parameter" msgstr "" -#: ../../../library/dis.rst:205 ../../../library/dis.rst:304 -#: ../../../library/dis.rst:326 ../../../library/dis.rst:362 +#: ../../../library/dis.rst:208 ../../../library/dis.rst:314 +#: ../../../library/dis.rst:339 ../../../library/dis.rst:379 msgid "Added the *show_positions* parameter." msgstr "" -#: ../../../library/dis.rst:208 +#: ../../../library/dis.rst:211 ../../../library/dis.rst:317 +#: ../../../library/dis.rst:342 ../../../library/dis.rst:382 +#: ../../../library/dis.rst:413 +msgid "Added the *show_jit* parameter." +msgstr "" + +#: ../../../library/dis.rst:214 msgid "Example:" msgstr "" -#: ../../../library/dis.rst:224 +#: ../../../library/dis.rst:230 msgid "Analysis functions" msgstr "" -#: ../../../library/dis.rst:226 +#: ../../../library/dis.rst:232 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 " @@ -274,39 +286,39 @@ msgid "" "isn't useful:" msgstr "" -#: ../../../library/dis.rst:232 +#: ../../../library/dis.rst:238 msgid "" "Return a formatted multi-line string with detailed code object information " "for the supplied function, generator, asynchronous generator, coroutine, " "method, source code string or code object." msgstr "" -#: ../../../library/dis.rst:236 +#: ../../../library/dis.rst:242 msgid "" "Note that the exact contents of code info strings are highly implementation " "dependent and they may change arbitrarily across Python VMs or Python " "releases." msgstr "" -#: ../../../library/dis.rst:248 +#: ../../../library/dis.rst:254 msgid "" "Print detailed code object information for the supplied function, method, " "source code string or code object to *file* (or ``sys.stdout`` if *file* is " "not specified)." msgstr "" -#: ../../../library/dis.rst:252 +#: ../../../library/dis.rst:258 msgid "" "This is a convenient shorthand for ``print(code_info(x), file=file)``, " "intended for interactive exploration at the interpreter prompt." msgstr "" -#: ../../../library/dis.rst:257 ../../../library/dis.rst:289 -#: ../../../library/dis.rst:317 ../../../library/dis.rst:353 +#: ../../../library/dis.rst:263 ../../../library/dis.rst:299 +#: ../../../library/dis.rst:330 ../../../library/dis.rst:370 msgid "Added *file* parameter." msgstr "" -#: ../../../library/dis.rst:264 +#: ../../../library/dis.rst:271 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 " @@ -322,107 +334,117 @@ msgid "" "disassembles the last traceback." msgstr "" -#: ../../../library/dis.rst:277 ../../../library/dis.rst:314 -#: ../../../library/dis.rst:350 +#: ../../../library/dis.rst:284 ../../../library/dis.rst:327 +#: ../../../library/dis.rst:367 msgid "" "The disassembly is written as text to the supplied *file* argument if " "provided and to ``sys.stdout`` otherwise." msgstr "" -#: ../../../library/dis.rst:280 +#: ../../../library/dis.rst:287 msgid "" "The maximal depth of recursion is limited by *depth* unless it is ``None``. " "``depth=0`` means no recursion." msgstr "" -#: ../../../library/dis.rst:283 +#: ../../../library/dis.rst:290 msgid "" "If *show_caches* is ``True``, this function will display inline cache " "entries used by the interpreter to specialize the bytecode." msgstr "" -#: ../../../library/dis.rst:286 +#: ../../../library/dis.rst:293 msgid "" "If *adaptive* is ``True``, this function will display specialized bytecode " "that may be different from the original bytecode." msgstr "" -#: ../../../library/dis.rst:292 +#: ../../../library/dis.rst:296 +msgid "" +"If *show_jit* is ``True``, this function will show ``ENTER_EXECUTOR`` " +"instructions, which mark JIT entry points and are hidden by default." +msgstr "" + +#: ../../../library/dis.rst:302 msgid "Implemented recursive disassembling and added *depth* parameter." msgstr "" -#: ../../../library/dis.rst:301 ../../../library/dis.rst:323 -#: ../../../library/dis.rst:359 +#: ../../../library/dis.rst:311 ../../../library/dis.rst:336 +#: ../../../library/dis.rst:376 msgid "Added the *show_offsets* parameter." msgstr "" -#: ../../../library/dis.rst:310 +#: ../../../library/dis.rst:323 msgid "" "Disassemble the top-of-stack function of a traceback, using the last " "traceback if none was passed. The instruction causing the exception is " "indicated." msgstr "" -#: ../../../library/dis.rst:334 +#: ../../../library/dis.rst:351 msgid "" "Disassemble a code object, indicating the last instruction if *lasti* was " "provided. The output is divided in the following columns:" msgstr "" -#: ../../../library/dis.rst:337 +#: ../../../library/dis.rst:354 msgid "" "the source code location of the instruction. Complete location information " "is shown if *show_positions* is true. Otherwise (the default) only the line " "number is displayed." msgstr "" -#: ../../../library/dis.rst:340 +#: ../../../library/dis.rst:357 msgid "the current instruction, indicated as ``-->``," msgstr "" -#: ../../../library/dis.rst:341 +#: ../../../library/dis.rst:358 msgid "a labelled instruction, indicated with ``>>``," msgstr "" -#: ../../../library/dis.rst:342 +#: ../../../library/dis.rst:359 msgid "the address of the instruction," msgstr "" -#: ../../../library/dis.rst:343 +#: ../../../library/dis.rst:360 msgid "the operation code name," msgstr "" -#: ../../../library/dis.rst:344 +#: ../../../library/dis.rst:361 msgid "operation parameters, and" msgstr "" -#: ../../../library/dis.rst:345 +#: ../../../library/dis.rst:362 msgid "interpretation of the parameters in parentheses." msgstr "" -#: ../../../library/dis.rst:347 +#: ../../../library/dis.rst:364 msgid "" "The parameter interpretation recognizes local and global variable names, " "constant values, branch targets, and compare operators." msgstr "" -#: ../../../library/dis.rst:367 +#: ../../../library/dis.rst:387 msgid "" "Return an iterator over the instructions in the supplied function, method, " "source code string or code object." msgstr "" -#: ../../../library/dis.rst:370 +#: ../../../library/dis.rst:390 msgid "" "The iterator generates a series of :class:`Instruction` named tuples giving " "the details of each operation in the supplied code." msgstr "" -#: ../../../library/dis.rst:378 +#: ../../../library/dis.rst:398 msgid "The *adaptive* parameter works as it does in :func:`dis`." msgstr "" -#: ../../../library/dis.rst:385 +#: ../../../library/dis.rst:400 +msgid "The *show_jit* parameter works as it does in :func:`dis`." +msgstr "" + +#: ../../../library/dis.rst:407 msgid "" "The *show_caches* parameter is deprecated and has no effect. The iterator " "generates the :class:`Instruction` instances with the *cache_info* field " @@ -430,7 +452,7 @@ msgid "" "generates separate items for the cache entries." msgstr "" -#: ../../../library/dis.rst:393 +#: ../../../library/dis.rst:418 msgid "" "This generator function uses the :meth:`~codeobject.co_lines` method of the :" "ref:`code object ` *code* to find the offsets which are starts " @@ -438,33 +460,33 @@ msgid "" "pairs." msgstr "" -#: ../../../library/dis.rst:398 +#: ../../../library/dis.rst:423 msgid "Line numbers can be decreasing. Before, they were always increasing." msgstr "" -#: ../../../library/dis.rst:401 +#: ../../../library/dis.rst:426 msgid "" "The :pep:`626` :meth:`~codeobject.co_lines` method is used instead of the :" "attr:`~codeobject.co_firstlineno` and :attr:`!codeobject.co_lnotab` " "attributes of the :ref:`code object `." msgstr "" -#: ../../../library/dis.rst:406 +#: ../../../library/dis.rst:431 msgid "" "Line numbers can be ``None`` for bytecode that does not map to source lines." msgstr "" -#: ../../../library/dis.rst:412 +#: ../../../library/dis.rst:437 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:418 +#: ../../../library/dis.rst:443 msgid "Compute the stack effect of *opcode* with argument *oparg*." msgstr "" -#: ../../../library/dis.rst:420 +#: ../../../library/dis.rst:445 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 " @@ -472,11 +494,11 @@ msgid "" "it will return the maximal stack effect of both cases." msgstr "" -#: ../../../library/dis.rst:427 +#: ../../../library/dis.rst:452 msgid "Added *jump* parameter." msgstr "" -#: ../../../library/dis.rst:430 +#: ../../../library/dis.rst:455 msgid "" "If ``oparg`` is omitted (or ``None``), the stack effect is now returned for " "``oparg=0``. Previously this was an error for opcodes that use their arg. It " @@ -484,104 +506,104 @@ msgid "" "does not use it; the ``oparg`` in this case is ignored." msgstr "" -#: ../../../library/dis.rst:440 +#: ../../../library/dis.rst:465 msgid "Python Bytecode Instructions" msgstr "" -#: ../../../library/dis.rst:442 +#: ../../../library/dis.rst:467 msgid "" "The :func:`get_instructions` function and :class:`Bytecode` class provide " "details of bytecode instructions as :class:`Instruction` instances:" msgstr "" -#: ../../../library/dis.rst:447 +#: ../../../library/dis.rst:472 msgid "Details for a bytecode operation" msgstr "" -#: ../../../library/dis.rst:451 +#: ../../../library/dis.rst:476 msgid "" "numeric code for operation, corresponding to the opcode values listed below " "and the bytecode values in the :ref:`opcode_collections`." msgstr "" -#: ../../../library/dis.rst:457 +#: ../../../library/dis.rst:482 msgid "human readable name for operation" msgstr "" -#: ../../../library/dis.rst:462 +#: ../../../library/dis.rst:487 msgid "" "numeric code for the base operation if operation is specialized; otherwise " "equal to :data:`opcode`" msgstr "" -#: ../../../library/dis.rst:468 +#: ../../../library/dis.rst:493 msgid "" "human readable name for the base operation if operation is specialized; " "otherwise equal to :data:`opname`" msgstr "" -#: ../../../library/dis.rst:474 +#: ../../../library/dis.rst:499 msgid "numeric argument to operation (if any), otherwise ``None``" msgstr "" -#: ../../../library/dis.rst:478 +#: ../../../library/dis.rst:503 msgid "alias for :data:`arg`" msgstr "" -#: ../../../library/dis.rst:482 +#: ../../../library/dis.rst:507 msgid "resolved arg value (if any), otherwise ``None``" msgstr "" -#: ../../../library/dis.rst:487 +#: ../../../library/dis.rst:512 msgid "" "human readable description of operation argument (if any), otherwise an " "empty string." msgstr "" -#: ../../../library/dis.rst:493 +#: ../../../library/dis.rst:518 msgid "start index of operation within bytecode sequence" msgstr "" -#: ../../../library/dis.rst:498 +#: ../../../library/dis.rst:523 msgid "" "start index of operation within bytecode sequence, including prefixed " "``EXTENDED_ARG`` operations if present; otherwise equal to :data:`offset`" msgstr "" -#: ../../../library/dis.rst:504 +#: ../../../library/dis.rst:529 msgid "start index of the cache entries following the operation" msgstr "" -#: ../../../library/dis.rst:509 +#: ../../../library/dis.rst:534 msgid "end index of the cache entries following the operation" msgstr "" -#: ../../../library/dis.rst:514 +#: ../../../library/dis.rst:539 msgid "``True`` if this opcode starts a source line, otherwise ``False``" msgstr "" -#: ../../../library/dis.rst:519 +#: ../../../library/dis.rst:544 msgid "" "source line number associated with this opcode (if any), otherwise ``None``" msgstr "" -#: ../../../library/dis.rst:524 +#: ../../../library/dis.rst:549 msgid "``True`` if other code jumps to here, otherwise ``False``" msgstr "" -#: ../../../library/dis.rst:529 +#: ../../../library/dis.rst:554 msgid "" "bytecode index of the jump target if this is a jump operation, otherwise " "``None``" msgstr "" -#: ../../../library/dis.rst:535 +#: ../../../library/dis.rst:560 msgid "" ":class:`dis.Positions` object holding the start and end locations that are " "covered by this instruction." msgstr "" -#: ../../../library/dis.rst:540 +#: ../../../library/dis.rst:565 msgid "" "Information about the cache entries of this instruction, as triplets of the " "form ``(name, size, data)``, where the ``name`` and ``size`` describe the " @@ -589,84 +611,84 @@ msgid "" "``None`` if the instruction does not have caches." msgstr "" -#: ../../../library/dis.rst:550 +#: ../../../library/dis.rst:575 msgid "Field ``positions`` is added." msgstr "" -#: ../../../library/dis.rst:554 +#: ../../../library/dis.rst:579 msgid "Changed field ``starts_line``." msgstr "" -#: ../../../library/dis.rst:556 +#: ../../../library/dis.rst:581 msgid "" "Added fields ``start_offset``, ``cache_offset``, ``end_offset``, " "``baseopname``, ``baseopcode``, ``jump_target``, ``oparg``, ``line_number`` " "and ``cache_info``." msgstr "" -#: ../../../library/dis.rst:563 +#: ../../../library/dis.rst:588 msgid "" "In case the information is not available, some fields might be ``None``." msgstr "" -#: ../../../library/dis.rst:573 +#: ../../../library/dis.rst:598 msgid "" "The Python compiler currently generates the following bytecode instructions." msgstr "" -#: ../../../library/dis.rst:576 +#: ../../../library/dis.rst:601 msgid "**General instructions**" msgstr "" -#: ../../../library/dis.rst:578 +#: ../../../library/dis.rst:603 msgid "" "In the following, We will refer to the interpreter stack as ``STACK`` and " "describe operations on it as if it was a Python list. The top of the stack " "corresponds to ``STACK[-1]`` in this language." msgstr "" -#: ../../../library/dis.rst:584 +#: ../../../library/dis.rst:609 msgid "" "Do nothing code. Used as a placeholder by the bytecode optimizer, and to " "generate line tracing events." msgstr "" -#: ../../../library/dis.rst:590 +#: ../../../library/dis.rst:615 msgid "" "Do nothing code. Used by the interpreter to record :monitoring-event:" "`BRANCH_LEFT` and :monitoring-event:`BRANCH_RIGHT` events for :mod:`sys." "monitoring`." msgstr "" -#: ../../../library/dis.rst:599 +#: ../../../library/dis.rst:624 msgid "Removes the iterator from the top of the stack." msgstr "" -#: ../../../library/dis.rst:606 +#: ../../../library/dis.rst:631 msgid "Removes the top-of-stack item::" msgstr "" -#: ../../../library/dis.rst:613 +#: ../../../library/dis.rst:638 msgid "" "Removes the top-of-stack item. Equivalent to ``POP_TOP``. Used to clean up " "at the end of loops, hence the name." msgstr "" -#: ../../../library/dis.rst:622 +#: ../../../library/dis.rst:647 msgid "Implements ``del STACK[-2]``. Used to clean up when a generator exits." msgstr "" -#: ../../../library/dis.rst:630 +#: ../../../library/dis.rst:655 msgid "" "Push the i-th item to the top of the stack without removing it from its " "original location::" msgstr "" -#: ../../../library/dis.rst:641 +#: ../../../library/dis.rst:666 msgid "Swap the top of the stack with the i-th element::" msgstr "" -#: ../../../library/dis.rst:650 +#: ../../../library/dis.rst:675 msgid "" "Rather than being an actual instruction, this opcode is used to mark extra " "space for the interpreter to cache useful data directly in the bytecode " @@ -674,105 +696,105 @@ msgid "" "viewed with ``show_caches=True``." msgstr "" -#: ../../../library/dis.rst:655 +#: ../../../library/dis.rst:680 msgid "" "Logically, this space is part of the preceding instruction. Many opcodes " "expect to be followed by an exact number of caches, and will instruct the " "interpreter to skip over them at runtime." msgstr "" -#: ../../../library/dis.rst:659 +#: ../../../library/dis.rst:684 msgid "" "Populated caches can look like arbitrary instructions, so great care should " "be taken when reading or modifying raw, adaptive bytecode containing " "quickened data." msgstr "" -#: ../../../library/dis.rst:666 +#: ../../../library/dis.rst:691 msgid "**Unary operations**" msgstr "" -#: ../../../library/dis.rst:668 +#: ../../../library/dis.rst:693 msgid "" "Unary operations take the top of the stack, apply the operation, and push " "the result back on the stack." msgstr "" -#: ../../../library/dis.rst:674 +#: ../../../library/dis.rst:699 msgid "Implements ``STACK[-1] = -STACK[-1]``." msgstr "" -#: ../../../library/dis.rst:679 +#: ../../../library/dis.rst:704 msgid "Implements ``STACK[-1] = not STACK[-1]``." msgstr "" -#: ../../../library/dis.rst:681 ../../../library/dis.rst:1383 -#: ../../../library/dis.rst:1399 +#: ../../../library/dis.rst:706 ../../../library/dis.rst:1386 +#: ../../../library/dis.rst:1402 msgid "This instruction now requires an exact :class:`bool` operand." msgstr "" -#: ../../../library/dis.rst:687 +#: ../../../library/dis.rst:712 msgid "Implements ``STACK[-1] = ~STACK[-1]``." msgstr "" -#: ../../../library/dis.rst:692 +#: ../../../library/dis.rst:717 msgid "Implements ``STACK[-1] = iter(STACK[-1])``." msgstr "" -#: ../../../library/dis.rst:697 +#: ../../../library/dis.rst:722 msgid "" "If ``STACK[-1]`` is a :term:`generator iterator` or :term:`coroutine` object " "it is left as is. Otherwise, implements ``STACK[-1] = iter(STACK[-1])``." msgstr "" -#: ../../../library/dis.rst:705 +#: ../../../library/dis.rst:730 msgid "Implements ``STACK[-1] = bool(STACK[-1])``." msgstr "" -#: ../../../library/dis.rst:710 +#: ../../../library/dis.rst:735 msgid "**Binary and in-place operations**" msgstr "" -#: ../../../library/dis.rst:712 +#: ../../../library/dis.rst:737 msgid "" "Binary operations remove the top two items from the stack (``STACK[-1]`` and " "``STACK[-2]``). They perform the operation, then put the result back on the " "stack." msgstr "" -#: ../../../library/dis.rst:715 +#: ../../../library/dis.rst:740 msgid "" "In-place operations are like binary operations, but the operation is done in-" "place when ``STACK[-2]`` supports it, and the resulting ``STACK[-1]`` may be " "(but does not have to be) the original ``STACK[-2]``." msgstr "" -#: ../../../library/dis.rst:722 +#: ../../../library/dis.rst:747 msgid "" "Implements the binary and in-place operators (depending on the value of " "*op*)::" msgstr "" -#: ../../../library/dis.rst:730 +#: ../../../library/dis.rst:755 msgid "" "With oparg :``NB_SUBSCR``, implements binary subscript (replaces opcode " "``BINARY_SUBSCR``)" msgstr "" -#: ../../../library/dis.rst:736 ../../../library/dis.rst:746 -#: ../../../library/dis.rst:754 ../../../library/dis.rst:766 -#: ../../../library/dis.rst:844 ../../../library/dis.rst:854 -#: ../../../library/dis.rst:864 ../../../library/dis.rst:1070 -#: ../../../library/dis.rst:1081 ../../../library/dis.rst:1226 -#: ../../../library/dis.rst:1238 ../../../library/dis.rst:1250 +#: ../../../library/dis.rst:761 ../../../library/dis.rst:771 +#: ../../../library/dis.rst:779 ../../../library/dis.rst:791 +#: ../../../library/dis.rst:869 ../../../library/dis.rst:879 +#: ../../../library/dis.rst:889 ../../../library/dis.rst:1089 +#: ../../../library/dis.rst:1229 ../../../library/dis.rst:1241 +#: ../../../library/dis.rst:1253 msgid "Implements::" msgstr "" -#: ../../../library/dis.rst:777 +#: ../../../library/dis.rst:802 msgid "**Coroutine opcodes**" msgstr "" -#: ../../../library/dis.rst:781 +#: ../../../library/dis.rst:806 msgid "" "Implements ``STACK[-1] = get_awaitable(STACK[-1])``, where " "``get_awaitable(o)`` returns ``o`` if ``o`` is a coroutine object or a " @@ -780,39 +802,39 @@ msgid "" "resolves ``o.__await__``." msgstr "" -#: ../../../library/dis.rst:786 +#: ../../../library/dis.rst:811 msgid "" "If the ``where`` operand is nonzero, it indicates where the instruction " "occurs:" msgstr "" -#: ../../../library/dis.rst:789 +#: ../../../library/dis.rst:814 msgid "``1``: After a call to ``__aenter__``" msgstr "" -#: ../../../library/dis.rst:790 +#: ../../../library/dis.rst:815 msgid "``2``: After a call to ``__aexit__``" msgstr "" -#: ../../../library/dis.rst:794 +#: ../../../library/dis.rst:819 msgid "Previously, this instruction did not have an oparg." msgstr "" -#: ../../../library/dis.rst:800 +#: ../../../library/dis.rst:825 msgid "Implements ``STACK[-1] = STACK[-1].__aiter__()``." msgstr "" -#: ../../../library/dis.rst:803 +#: ../../../library/dis.rst:828 msgid "Returning awaitable objects from ``__aiter__`` is no longer supported." msgstr "" -#: ../../../library/dis.rst:810 +#: ../../../library/dis.rst:835 msgid "" "Implement ``STACK.append(get_awaitable(STACK[-1].__anext__()))`` to the " "stack. See ``GET_AWAITABLE`` for details about ``get_awaitable``." msgstr "" -#: ../../../library/dis.rst:818 +#: ../../../library/dis.rst:843 msgid "" "Terminates an :keyword:`async for` loop. Handles an exception raised when " "awaiting a next item. The stack contains the async iterable in ``STACK[-2]`` " @@ -820,13 +842,13 @@ msgid "" "is not :exc:`StopAsyncIteration`, it is re-raised." msgstr "" -#: ../../../library/dis.rst:825 ../../../library/dis.rst:916 -#: ../../../library/dis.rst:927 +#: ../../../library/dis.rst:850 ../../../library/dis.rst:941 +#: ../../../library/dis.rst:952 msgid "" "Exception representation on the stack now consist of one, not three, items." msgstr "" -#: ../../../library/dis.rst:831 +#: ../../../library/dis.rst:856 msgid "" "Handles an exception raised during a :meth:`~generator.throw` or :meth:" "`~generator.close` call through the current frame. If ``STACK[-1]`` is an " @@ -834,29 +856,29 @@ msgid "" "its ``value`` member. Otherwise, re-raise ``STACK[-1]``." msgstr "" -#: ../../../library/dis.rst:840 +#: ../../../library/dis.rst:865 msgid "**Miscellaneous opcodes**" msgstr "" -#: ../../../library/dis.rst:849 +#: ../../../library/dis.rst:874 msgid "Used to implement set comprehensions." msgstr "" -#: ../../../library/dis.rst:859 +#: ../../../library/dis.rst:884 msgid "Used to implement list comprehensions." msgstr "" -#: ../../../library/dis.rst:870 +#: ../../../library/dis.rst:895 msgid "Used to implement dict comprehensions." msgstr "" -#: ../../../library/dis.rst:873 +#: ../../../library/dis.rst:898 msgid "" "Map value is ``STACK[-1]`` and map key is ``STACK[-2]``. Before, those were " "reversed." msgstr "" -#: ../../../library/dis.rst:877 +#: ../../../library/dis.rst:902 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 " @@ -864,31 +886,31 @@ msgid "" "further iterations of the loop." msgstr "" -#: ../../../library/dis.rst:885 +#: ../../../library/dis.rst:910 msgid "Returns with ``STACK[-1]`` to the caller of the function." msgstr "" -#: ../../../library/dis.rst:890 +#: ../../../library/dis.rst:915 msgid "Yields ``STACK.pop()`` from a :term:`generator`." msgstr "" -#: ../../../library/dis.rst:892 +#: ../../../library/dis.rst:917 msgid "oparg set to be the stack depth." msgstr "" -#: ../../../library/dis.rst:895 +#: ../../../library/dis.rst:920 msgid "" "oparg set to be the exception block depth, for efficient closing of " "generators." msgstr "" -#: ../../../library/dis.rst:898 +#: ../../../library/dis.rst:923 msgid "" "oparg is ``1`` if this instruction is part of a yield-from or await, and " "``0`` otherwise." msgstr "" -#: ../../../library/dis.rst:904 +#: ../../../library/dis.rst:929 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 " @@ -896,39 +918,39 @@ msgid "" "statically." msgstr "" -#: ../../../library/dis.rst:914 +#: ../../../library/dis.rst:939 msgid "" "Pops a value from the stack, which is used to restore the exception state." msgstr "" -#: ../../../library/dis.rst:921 +#: ../../../library/dis.rst:946 msgid "" "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 :attr:`~frame." "f_lasti` of the current frame." msgstr "" -#: ../../../library/dis.rst:932 +#: ../../../library/dis.rst:957 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:940 +#: ../../../library/dis.rst:965 msgid "" "Performs exception matching for ``except``. Tests whether the ``STACK[-2]`` " "is an exception matching ``STACK[-1]``. Pops ``STACK[-1]`` and pushes the " "boolean result of the test." msgstr "" -#: ../../../library/dis.rst:948 +#: ../../../library/dis.rst:973 msgid "" "Performs exception matching for ``except*``. Applies ``split(STACK[-1])`` on " "the exception group representing ``STACK[-2]``." msgstr "" -#: ../../../library/dis.rst:951 +#: ../../../library/dis.rst:976 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 " @@ -936,7 +958,7 @@ msgid "" "``None``." msgstr "" -#: ../../../library/dis.rst:960 +#: ../../../library/dis.rst:985 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 " @@ -944,32 +966,32 @@ msgid "" "occurred in a :keyword:`with` statement." msgstr "" -#: ../../../library/dis.rst:967 +#: ../../../library/dis.rst:992 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:974 +#: ../../../library/dis.rst:999 msgid "" "Pushes a common constant onto the stack. The interpreter contains a " "hardcoded list of constants supported by this instruction. Used by the :" "keyword:`assert` statement to load :exc:`AssertionError`." msgstr "" -#: ../../../library/dis.rst:983 +#: ../../../library/dis.rst:1008 msgid "" "Pushes :func:`!builtins.__build_class__` onto the stack. It is later called " "to construct a class." msgstr "" -#: ../../../library/dis.rst:988 +#: ../../../library/dis.rst:1013 msgid "" "Perform ``STACK.append(len(STACK[-1]))``. Used in :keyword:`match` " "statements where comparison with structure of pattern is needed." msgstr "" -#: ../../../library/dis.rst:996 +#: ../../../library/dis.rst:1021 msgid "" "If ``STACK[-1]`` is an instance of :class:`collections.abc.Mapping` (or, " "more technically: if it has the :c:macro:`Py_TPFLAGS_MAPPING` flag set in " @@ -977,7 +999,7 @@ msgid "" "Otherwise, push ``False``." msgstr "" -#: ../../../library/dis.rst:1006 +#: ../../../library/dis.rst:1031 msgid "" "If ``STACK[-1]`` is an instance of :class:`collections.abc.Sequence` and is " "*not* an instance of :class:`str`/:class:`bytes`/:class:`bytearray` (or, " @@ -986,20 +1008,20 @@ msgid "" "Otherwise, push ``False``." msgstr "" -#: ../../../library/dis.rst:1016 +#: ../../../library/dis.rst:1041 msgid "" "``STACK[-1]`` is a tuple of mapping keys, and ``STACK[-2]`` is the match " "subject. If ``STACK[-2]`` contains all of the keys in ``STACK[-1]``, push a :" "class:`tuple` containing the corresponding values. Otherwise, push ``None``." msgstr "" -#: ../../../library/dis.rst:1022 ../../../library/dis.rst:1768 +#: ../../../library/dis.rst:1047 ../../../library/dis.rst:1771 msgid "" "Previously, this instruction also pushed a boolean value indicating success " "(``True``) or failure (``False``)." msgstr "" -#: ../../../library/dis.rst:1029 +#: ../../../library/dis.rst:1054 msgid "" "Implements ``name = STACK.pop()``. *namei* is the index of *name* in the " "attribute :attr:`~codeobject.co_names` of the :ref:`code object `." -msgstr "" - -#: ../../../library/dis.rst:1042 +#: ../../../library/dis.rst:1061 msgid "" "Unpacks ``STACK[-1]`` into *count* individual values, which are put onto the " "stack right-to-left. Require there to be exactly *count* values.::" msgstr "" -#: ../../../library/dis.rst:1051 +#: ../../../library/dis.rst:1070 msgid "" "Implements assignment with a starred target: Unpacks an iterable in " "``STACK[-1]`` into individual values, where the total number of values can " @@ -1027,11 +1043,11 @@ msgid "" "will be a list of all leftover items." msgstr "" -#: ../../../library/dis.rst:1056 +#: ../../../library/dis.rst:1075 msgid "The number of values before and after the list value is limited to 255." msgstr "" -#: ../../../library/dis.rst:1058 +#: ../../../library/dis.rst:1077 msgid "" "The number of values before the list value is encoded in the argument of the " "opcode. The number of values after the list if any is encoded using an " @@ -1040,55 +1056,45 @@ msgid "" "list value, the high byte of *counts* the number of values after it." msgstr "" -#: ../../../library/dis.rst:1064 +#: ../../../library/dis.rst:1083 msgid "" "The extracted values are put onto the stack right-to-left, i.e. ``a, *b, c = " "d`` will be stored after execution as ``STACK.extend((a, b, c))``." msgstr "" -#: ../../../library/dis.rst:1076 +#: ../../../library/dis.rst:1095 msgid "" "where *namei* is the index of name in :attr:`~codeobject.co_names` of the :" "ref:`code object `." msgstr "" -#: ../../../library/dis.rst:1086 -msgid "" -"where *namei* is the index of name into :attr:`~codeobject.co_names` of the :" -"ref:`code object `." -msgstr "" - -#: ../../../library/dis.rst:1092 +#: ../../../library/dis.rst:1100 msgid "Works as :opcode:`STORE_NAME`, but stores the name as a global." msgstr "" -#: ../../../library/dis.rst:1097 -msgid "Works as :opcode:`DELETE_NAME`, but deletes a global name." -msgstr "" - -#: ../../../library/dis.rst:1102 +#: ../../../library/dis.rst:1105 msgid "Pushes ``co_consts[consti]`` onto the stack." msgstr "" -#: ../../../library/dis.rst:1107 +#: ../../../library/dis.rst:1110 msgid "" "Pushes the integer ``i`` onto the stack. ``i`` must be in ``range(256)``" msgstr "" -#: ../../../library/dis.rst:1115 +#: ../../../library/dis.rst:1118 msgid "" "Pushes the value associated with ``co_names[namei]`` onto the stack. The " "name is looked up within the locals, then the globals, then the builtins." msgstr "" -#: ../../../library/dis.rst:1121 +#: ../../../library/dis.rst:1124 msgid "" "Pushes a reference to the locals dictionary onto the stack. This is used to " "prepare namespace dictionaries for :opcode:`LOAD_FROM_DICT_OR_DEREF` and :" "opcode:`LOAD_FROM_DICT_OR_GLOBALS`." msgstr "" -#: ../../../library/dis.rst:1130 +#: ../../../library/dis.rst:1133 msgid "" "Pops a mapping off the stack and looks up the value for ``co_names[namei]``. " "If the name is not found there, looks it up in the globals and then the " @@ -1097,95 +1103,95 @@ msgid "" "bodies." msgstr "" -#: ../../../library/dis.rst:1141 +#: ../../../library/dis.rst:1144 msgid "" "Constructs a new :class:`~string.templatelib.Template` instance from a tuple " "of strings and a tuple of interpolations and pushes the resulting object " "onto the stack::" msgstr "" -#: ../../../library/dis.rst:1154 +#: ../../../library/dis.rst:1157 msgid "" "Constructs a new :class:`~string.templatelib.Interpolation` instance from a " "value and its source expression and pushes the resulting object onto the " "stack." msgstr "" -#: ../../../library/dis.rst:1158 +#: ../../../library/dis.rst:1161 msgid "" "If no conversion or format specification is present, ``format`` is set to " "``2``." msgstr "" -#: ../../../library/dis.rst:1161 +#: ../../../library/dis.rst:1164 msgid "" "If the low bit of ``format`` is set, it indicates that the interpolation " "contains a format specification." msgstr "" -#: ../../../library/dis.rst:1164 +#: ../../../library/dis.rst:1167 msgid "" "If ``format >> 2`` is non-zero, it indicates that the interpolation contains " "a conversion. The value of ``format >> 2`` is the conversion type (``0`` for " "no conversion, ``1`` for ``!s``, ``2`` for ``!r``, and ``3`` for ``!a``)::" msgstr "" -#: ../../../library/dis.rst:1183 +#: ../../../library/dis.rst:1186 msgid "" "Creates a tuple consuming *count* items from the stack, and pushes the " "resulting tuple onto the stack::" msgstr "" -#: ../../../library/dis.rst:1197 +#: ../../../library/dis.rst:1200 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a list." msgstr "" -#: ../../../library/dis.rst:1202 +#: ../../../library/dis.rst:1205 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a set." msgstr "" -#: ../../../library/dis.rst:1207 +#: ../../../library/dis.rst:1210 msgid "" "Pushes a new dictionary object onto the stack. Pops ``2 * count`` items so " "that the dictionary holds *count* entries: ``{..., STACK[-4]: STACK[-3], " "STACK[-2]: STACK[-1]}``." msgstr "" -#: ../../../library/dis.rst:1211 +#: ../../../library/dis.rst:1214 msgid "" "The dictionary is created from stack items instead of creating an empty " "dictionary pre-sized to hold *count* items." msgstr "" -#: ../../../library/dis.rst:1218 +#: ../../../library/dis.rst:1221 msgid "" "Concatenates *count* strings from the stack and pushes the resulting string " "onto the stack." msgstr "" -#: ../../../library/dis.rst:1231 +#: ../../../library/dis.rst:1234 msgid "Used to build lists." msgstr "" -#: ../../../library/dis.rst:1243 +#: ../../../library/dis.rst:1246 msgid "Used to build sets." msgstr "" -#: ../../../library/dis.rst:1255 +#: ../../../library/dis.rst:1258 msgid "Used to build dicts." msgstr "" -#: ../../../library/dis.rst:1262 +#: ../../../library/dis.rst:1265 msgid "Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys." msgstr "" -#: ../../../library/dis.rst:1269 +#: ../../../library/dis.rst:1272 msgid "" "If the low bit of ``namei`` is not set, this replaces ``STACK[-1]`` with " "``getattr(STACK[-1], co_names[namei>>1])``." msgstr "" -#: ../../../library/dis.rst:1272 +#: ../../../library/dis.rst:1275 msgid "" "If the low bit of ``namei`` is set, this will attempt to load a method named " "``co_names[namei>>1]`` from the ``STACK[-1]`` object. ``STACK[-1]`` is " @@ -1197,76 +1203,76 @@ msgid "" "pushed." msgstr "" -#: ../../../library/dis.rst:1281 +#: ../../../library/dis.rst:1284 msgid "" "If the low bit of ``namei`` is set, then a ``NULL`` or ``self`` is pushed to " "the stack before the attribute or unbound method respectively." msgstr "" -#: ../../../library/dis.rst:1288 +#: ../../../library/dis.rst:1291 msgid "" "This opcode implements :func:`super`, both in its zero-argument and two-" "argument forms (e.g. ``super().method()``, ``super().attr`` and ``super(cls, " "self).method()``, ``super(cls, self).attr``)." msgstr "" -#: ../../../library/dis.rst:1292 +#: ../../../library/dis.rst:1295 msgid "It pops three values from the stack (from top of stack down):" msgstr "" -#: ../../../library/dis.rst:1294 +#: ../../../library/dis.rst:1297 msgid "``self``: the first argument to the current method" msgstr "" -#: ../../../library/dis.rst:1295 +#: ../../../library/dis.rst:1298 msgid "``cls``: the class within which the current method was defined" msgstr "" -#: ../../../library/dis.rst:1296 +#: ../../../library/dis.rst:1299 msgid "the global ``super``" msgstr "" -#: ../../../library/dis.rst:1298 +#: ../../../library/dis.rst:1301 msgid "" "With respect to its argument, it works similarly to :opcode:`LOAD_ATTR`, " "except that ``namei`` is shifted left by 2 bits instead of 1." msgstr "" -#: ../../../library/dis.rst:1301 +#: ../../../library/dis.rst:1304 msgid "" "The low bit of ``namei`` signals to attempt a method load, as with :opcode:" "`LOAD_ATTR`, which results in pushing ``NULL`` and the loaded method. When " "it is unset a single value is pushed to the stack." msgstr "" -#: ../../../library/dis.rst:1305 +#: ../../../library/dis.rst:1308 msgid "" "The second-low bit of ``namei``, if set, means that this was a two-argument " "call to :func:`super` (unset means zero-argument)." msgstr "" -#: ../../../library/dis.rst:1313 +#: ../../../library/dis.rst:1316 msgid "" "Performs a Boolean operation. The operation name can be found in " "``cmp_op[opname >> 5]``. If the fifth-lowest bit of ``opname`` is set " "(``opname & 16``), the result should be coerced to ``bool``." msgstr "" -#: ../../../library/dis.rst:1317 +#: ../../../library/dis.rst:1320 msgid "" "The fifth-lowest bit of the oparg now indicates a forced conversion to :" "class:`bool`." msgstr "" -#: ../../../library/dis.rst:1324 +#: ../../../library/dis.rst:1327 msgid "Performs ``is`` comparison, or ``is not`` if ``invert`` is 1." msgstr "" -#: ../../../library/dis.rst:1331 +#: ../../../library/dis.rst:1334 msgid "Performs ``in`` comparison, or ``not in`` if ``invert`` is 1." msgstr "" -#: ../../../library/dis.rst:1338 +#: ../../../library/dis.rst:1341 msgid "" "Imports the module ``co_names[namei]``. ``STACK[-1]`` and ``STACK[-2]`` are " "popped and provide the *fromlist* and *level* arguments of :func:" @@ -1275,62 +1281,62 @@ msgid "" "opcode:`STORE_FAST` instruction modifies the namespace." msgstr "" -#: ../../../library/dis.rst:1346 +#: ../../../library/dis.rst:1349 msgid "" "Loads the attribute ``co_names[namei]`` from the module found in " "``STACK[-1]``. The resulting object is pushed onto the stack, to be " "subsequently stored by a :opcode:`STORE_FAST` instruction." msgstr "" -#: ../../../library/dis.rst:1353 +#: ../../../library/dis.rst:1356 msgid "Increments bytecode counter by *delta*." msgstr "" -#: ../../../library/dis.rst:1358 +#: ../../../library/dis.rst:1361 msgid "Decrements bytecode counter by *delta*. Checks for interrupts." msgstr "" -#: ../../../library/dis.rst:1365 +#: ../../../library/dis.rst:1368 msgid "Decrements bytecode counter by *delta*. Does not check for interrupts." msgstr "" -#: ../../../library/dis.rst:1372 +#: ../../../library/dis.rst:1375 msgid "" "If ``STACK[-1]`` is true, increments the bytecode counter by *delta*. " "``STACK[-1]`` is popped." msgstr "" -#: ../../../library/dis.rst:1375 ../../../library/dis.rst:1391 +#: ../../../library/dis.rst:1378 ../../../library/dis.rst:1394 msgid "" "The oparg is now a relative delta rather than an absolute target. This " "opcode is a pseudo-instruction, replaced in final bytecode by the directed " "versions (forward/backward)." msgstr "" -#: ../../../library/dis.rst:1380 ../../../library/dis.rst:1396 -#: ../../../library/dis.rst:1409 ../../../library/dis.rst:1420 +#: ../../../library/dis.rst:1383 ../../../library/dis.rst:1399 +#: ../../../library/dis.rst:1412 ../../../library/dis.rst:1423 msgid "This is no longer a pseudo-instruction." msgstr "" -#: ../../../library/dis.rst:1388 +#: ../../../library/dis.rst:1391 msgid "" "If ``STACK[-1]`` is false, increments the bytecode counter by *delta*. " "``STACK[-1]`` is popped." msgstr "" -#: ../../../library/dis.rst:1404 +#: ../../../library/dis.rst:1407 msgid "" "If ``STACK[-1]`` is not ``None``, increments the bytecode counter by " "*delta*. ``STACK[-1]`` is popped." msgstr "" -#: ../../../library/dis.rst:1415 +#: ../../../library/dis.rst:1418 msgid "" "If ``STACK[-1]`` is ``None``, increments the bytecode counter by *delta*. " "``STACK[-1]`` is popped." msgstr "" -#: ../../../library/dis.rst:1425 +#: ../../../library/dis.rst:1428 msgid "" "``STACK[-1]`` is an :term:`iterator`. Call its :meth:`~iterator.__next__` " "method. If this yields a new value, push it on the stack (leaving the " @@ -1338,103 +1344,103 @@ msgid "" "code counter is incremented by *delta*." msgstr "" -#: ../../../library/dis.rst:1430 +#: ../../../library/dis.rst:1433 msgid "Up until 3.11 the iterator was popped when it was exhausted." msgstr "" -#: ../../../library/dis.rst:1435 +#: ../../../library/dis.rst:1438 msgid "Loads the global named ``co_names[namei>>1]`` onto the stack." msgstr "" -#: ../../../library/dis.rst:1437 +#: ../../../library/dis.rst:1440 msgid "" "If the low bit of ``namei`` is set, then a ``NULL`` is pushed to the stack " "before the global variable." msgstr "" -#: ../../../library/dis.rst:1443 +#: ../../../library/dis.rst:1446 msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack." msgstr "" -#: ../../../library/dis.rst:1445 +#: ../../../library/dis.rst:1448 msgid "" "This opcode is now only used in situations where the local variable is " "guaranteed to be initialized. It cannot raise :exc:`UnboundLocalError`." msgstr "" -#: ../../../library/dis.rst:1451 +#: ../../../library/dis.rst:1454 msgid "" "Pushes a borrowed reference to the local ``co_varnames[var_num]`` onto the " "stack." msgstr "" -#: ../../../library/dis.rst:1458 +#: ../../../library/dis.rst:1461 msgid "" "Pushes references to ``co_varnames[var_nums >> 4]`` and " "``co_varnames[var_nums & 15]`` onto the stack." msgstr "" -#: ../../../library/dis.rst:1466 +#: ../../../library/dis.rst:1469 msgid "" "Pushes borrowed references to ``co_varnames[var_nums >> 4]`` and " "``co_varnames[var_nums & 15]`` onto the stack." msgstr "" -#: ../../../library/dis.rst:1473 +#: ../../../library/dis.rst:1476 msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack, " "raising an :exc:`UnboundLocalError` if the local variable has not been " "initialized." msgstr "" -#: ../../../library/dis.rst:1481 +#: ../../../library/dis.rst:1484 msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack (or " "pushes ``NULL`` onto the stack if the local variable has not been " "initialized) and sets ``co_varnames[var_num]`` to ``NULL``." msgstr "" -#: ../../../library/dis.rst:1489 +#: ../../../library/dis.rst:1492 msgid "Stores ``STACK.pop()`` into the local ``co_varnames[var_num]``." msgstr "" -#: ../../../library/dis.rst:1493 +#: ../../../library/dis.rst:1496 msgid "" "Stores ``STACK[-1]`` into ``co_varnames[var_nums >> 4]`` and ``STACK[-2]`` " "into ``co_varnames[var_nums & 15]``." msgstr "" -#: ../../../library/dis.rst:1500 +#: ../../../library/dis.rst:1503 msgid "" "Stores ``STACK.pop()`` into the local ``co_varnames[var_nums >> 4]`` and " "pushes a reference to the local ``co_varnames[var_nums & 15]`` onto the " "stack." msgstr "" -#: ../../../library/dis.rst:1508 +#: ../../../library/dis.rst:1511 msgid "Deletes local ``co_varnames[var_num]``." msgstr "" -#: ../../../library/dis.rst:1513 +#: ../../../library/dis.rst:1516 msgid "" "Creates a new cell in slot ``i``. If that slot is nonempty then that value " "is stored into the new cell." msgstr "" -#: ../../../library/dis.rst:1521 +#: ../../../library/dis.rst:1524 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:1524 ../../../library/dis.rst:1546 -#: ../../../library/dis.rst:1557 +#: ../../../library/dis.rst:1527 ../../../library/dis.rst:1549 +#: ../../../library/dis.rst:1560 msgid "" "``i`` is no longer offset by the length of :attr:`~codeobject.co_varnames`." msgstr "" -#: ../../../library/dis.rst:1530 +#: ../../../library/dis.rst:1533 msgid "" "Pops a mapping off the stack and looks up the name associated with slot " "``i`` of the \"fast locals\" storage in this mapping. If the name is not " @@ -1445,112 +1451,112 @@ msgid "" "class bodies." msgstr "" -#: ../../../library/dis.rst:1543 +#: ../../../library/dis.rst:1546 msgid "" "Stores ``STACK.pop()`` into the cell contained in slot ``i`` of the \"fast " "locals\" storage." msgstr "" -#: ../../../library/dis.rst:1552 +#: ../../../library/dis.rst:1555 msgid "" "Empties the cell contained in slot ``i`` of the \"fast locals\" storage. " "Used by the :keyword:`del` statement." msgstr "" -#: ../../../library/dis.rst:1563 +#: ../../../library/dis.rst:1566 msgid "" "Copies the ``n`` :term:`free (closure) 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:1572 +#: ../../../library/dis.rst:1575 msgid "" "Raises an exception using one of the 3 forms of the ``raise`` statement, " "depending on the value of *argc*:" msgstr "" -#: ../../../library/dis.rst:1575 +#: ../../../library/dis.rst:1578 msgid "0: ``raise`` (re-raise previous exception)" msgstr "" -#: ../../../library/dis.rst:1576 +#: ../../../library/dis.rst:1579 msgid "" "1: ``raise STACK[-1]`` (raise exception instance or type at ``STACK[-1]``)" msgstr "" -#: ../../../library/dis.rst:1577 +#: ../../../library/dis.rst:1580 msgid "" "2: ``raise STACK[-2] from STACK[-1]`` (raise exception instance or type at " "``STACK[-2]`` with ``__cause__`` set to ``STACK[-1]``)" msgstr "" -#: ../../../library/dis.rst:1583 +#: ../../../library/dis.rst:1586 msgid "" "Calls a callable object with the number of arguments specified by ``argc``. " "On the stack are (in ascending order):" msgstr "" -#: ../../../library/dis.rst:1586 ../../../library/dis.rst:1610 +#: ../../../library/dis.rst:1589 ../../../library/dis.rst:1613 msgid "The callable" msgstr "" -#: ../../../library/dis.rst:1587 ../../../library/dis.rst:1611 +#: ../../../library/dis.rst:1590 ../../../library/dis.rst:1614 msgid "``self`` or ``NULL``" msgstr "" -#: ../../../library/dis.rst:1588 ../../../library/dis.rst:1612 +#: ../../../library/dis.rst:1591 ../../../library/dis.rst:1615 msgid "The remaining positional arguments" msgstr "" -#: ../../../library/dis.rst:1590 +#: ../../../library/dis.rst:1593 msgid "``argc`` is the total of the positional arguments, excluding ``self``." msgstr "" -#: ../../../library/dis.rst:1592 +#: ../../../library/dis.rst:1595 msgid "" "``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:1598 +#: ../../../library/dis.rst:1601 msgid "The callable now always appears at the same position on the stack." msgstr "" -#: ../../../library/dis.rst:1601 +#: ../../../library/dis.rst:1604 msgid "Calls with keyword arguments are now handled by :opcode:`CALL_KW`." msgstr "" -#: ../../../library/dis.rst:1607 +#: ../../../library/dis.rst:1610 msgid "" "Calls a callable object with the number of arguments specified by ``argc``, " "including one or more named arguments. On the stack are (in ascending order):" msgstr "" -#: ../../../library/dis.rst:1613 +#: ../../../library/dis.rst:1616 msgid "The named arguments" msgstr "" -#: ../../../library/dis.rst:1614 +#: ../../../library/dis.rst:1617 msgid "A :class:`tuple` of keyword argument names" msgstr "" -#: ../../../library/dis.rst:1616 +#: ../../../library/dis.rst:1619 msgid "" "``argc`` is the total of the positional and named arguments, excluding " "``self``. The length of the tuple of keyword argument names is the number of " "named arguments." msgstr "" -#: ../../../library/dis.rst:1619 +#: ../../../library/dis.rst:1622 msgid "" "``CALL_KW`` pops all arguments, the keyword names, 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:1628 +#: ../../../library/dis.rst:1631 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 " @@ -1562,33 +1568,33 @@ msgid "" "arguments, and pushes the return value returned by the callable object." msgstr "" -#: ../../../library/dis.rst:1643 +#: ../../../library/dis.rst:1646 msgid "" "Pushes a ``NULL`` to the stack. Used in the call sequence to match the " "``NULL`` pushed by :opcode:`LOAD_ATTR` for non-method calls." msgstr "" -#: ../../../library/dis.rst:1652 +#: ../../../library/dis.rst:1655 msgid "" "Pushes a new function object on the stack built from the code object at " "``STACK[-1]``." msgstr "" -#: ../../../library/dis.rst:1654 +#: ../../../library/dis.rst:1657 msgid "Flag value ``0x04`` is a tuple of strings instead of dictionary" msgstr "" -#: ../../../library/dis.rst:1657 +#: ../../../library/dis.rst:1660 msgid "Qualified name at ``STACK[-1]`` was removed." msgstr "" -#: ../../../library/dis.rst:1660 +#: ../../../library/dis.rst:1663 msgid "" "Extra function attributes on the stack, signaled by oparg flags, were " "removed. They now use :opcode:`SET_FUNCTION_ATTRIBUTE`." msgstr "" -#: ../../../library/dis.rst:1667 +#: ../../../library/dis.rst:1670 msgid "" "Sets an attribute on a function object. Expects the function at " "``STACK[-1]`` and the attribute value to set at ``STACK[-2]``; consumes both " @@ -1596,48 +1602,48 @@ msgid "" "attribute to set:" msgstr "" -#: ../../../library/dis.rst:1671 +#: ../../../library/dis.rst:1674 msgid "" "``0x01`` a tuple of default values for positional-only and positional-or-" "keyword parameters in positional order" msgstr "" -#: ../../../library/dis.rst:1673 +#: ../../../library/dis.rst:1676 msgid "``0x02`` a dictionary of keyword-only parameters' default values" msgstr "" -#: ../../../library/dis.rst:1674 +#: ../../../library/dis.rst:1677 msgid "``0x04`` a tuple of strings containing parameters' annotations" msgstr "" -#: ../../../library/dis.rst:1675 +#: ../../../library/dis.rst:1678 msgid "``0x08`` a tuple containing cells for free variables, making a closure" msgstr "" -#: ../../../library/dis.rst:1676 +#: ../../../library/dis.rst:1679 msgid "``0x10`` the :term:`annotate function` for the function object" msgstr "" -#: ../../../library/dis.rst:1680 +#: ../../../library/dis.rst:1683 msgid "" "Added ``0x10`` to indicate the annotate function for the function object." msgstr "" -#: ../../../library/dis.rst:1688 +#: ../../../library/dis.rst:1691 msgid "" "Pushes a slice object on the stack. *argc* must be 2 or 3. If it is 2, " "implements::" msgstr "" -#: ../../../library/dis.rst:1694 +#: ../../../library/dis.rst:1697 msgid "if it is 3, implements::" msgstr "" -#: ../../../library/dis.rst:1701 +#: ../../../library/dis.rst:1704 msgid "See the :func:`slice` built-in function for more information." msgstr "" -#: ../../../library/dis.rst:1706 +#: ../../../library/dis.rst:1709 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 " @@ -1645,43 +1651,43 @@ msgid "" "allowed, forming an argument from two-byte to four-byte." msgstr "" -#: ../../../library/dis.rst:1714 +#: ../../../library/dis.rst:1717 msgid "Convert value to a string, depending on ``oparg``::" msgstr "" -#: ../../../library/dis.rst:1720 +#: ../../../library/dis.rst:1723 msgid "``oparg == 1``: call :func:`str` on *value*" msgstr "" -#: ../../../library/dis.rst:1721 +#: ../../../library/dis.rst:1724 msgid "``oparg == 2``: call :func:`repr` on *value*" msgstr "" -#: ../../../library/dis.rst:1722 +#: ../../../library/dis.rst:1725 msgid "``oparg == 3``: call :func:`ascii` on *value*" msgstr "" -#: ../../../library/dis.rst:1724 ../../../library/dis.rst:1737 -#: ../../../library/dis.rst:1750 +#: ../../../library/dis.rst:1727 ../../../library/dis.rst:1740 +#: ../../../library/dis.rst:1753 msgid "Used for implementing formatted string literals (f-strings)." msgstr "" -#: ../../../library/dis.rst:1731 +#: ../../../library/dis.rst:1734 msgid "Formats the value on top of stack::" msgstr "" -#: ../../../library/dis.rst:1743 +#: ../../../library/dis.rst:1746 msgid "Formats the given value with the given format spec::" msgstr "" -#: ../../../library/dis.rst:1757 +#: ../../../library/dis.rst:1760 msgid "" "``STACK[-1]`` is a tuple of keyword attribute names, ``STACK[-2]`` is the " "class being matched against, and ``STACK[-3]`` is the match subject. " "*count* is the number of positional sub-patterns." msgstr "" -#: ../../../library/dis.rst:1761 +#: ../../../library/dis.rst:1764 msgid "" "Pop ``STACK[-1]``, ``STACK[-2]``, and ``STACK[-3]``. If ``STACK[-3]`` is an " "instance of ``STACK[-2]`` and has the positional and keyword attributes " @@ -1689,255 +1695,255 @@ msgid "" "Otherwise, push ``None``." msgstr "" -#: ../../../library/dis.rst:1775 +#: ../../../library/dis.rst:1778 msgid "A no-op. Performs internal tracing, debugging and optimization checks." msgstr "" -#: ../../../library/dis.rst:1777 +#: ../../../library/dis.rst:1780 msgid "" "The ``context`` operand consists of two parts. The lowest two bits indicate " "where the ``RESUME`` occurs:" msgstr "" -#: ../../../library/dis.rst:1780 +#: ../../../library/dis.rst:1783 msgid "" "``0`` The start of a function, which is neither a generator, coroutine nor " "an async generator" msgstr "" -#: ../../../library/dis.rst:1782 +#: ../../../library/dis.rst:1785 msgid "``1`` After a ``yield`` expression" msgstr "" -#: ../../../library/dis.rst:1783 +#: ../../../library/dis.rst:1786 msgid "``2`` After a ``yield from`` expression" msgstr "" -#: ../../../library/dis.rst:1784 +#: ../../../library/dis.rst:1787 msgid "``3`` After an ``await`` expression" msgstr "" -#: ../../../library/dis.rst:1786 +#: ../../../library/dis.rst:1789 msgid "" "The next bit is ``1`` if the RESUME is at except-depth ``1``, and ``0`` " "otherwise." msgstr "" -#: ../../../library/dis.rst:1791 +#: ../../../library/dis.rst:1794 msgid "The oparg value changed to include information about except-depth" msgstr "" -#: ../../../library/dis.rst:1797 +#: ../../../library/dis.rst:1800 msgid "" "Create a generator, coroutine, or async generator from the current frame. " "Used as first opcode of in code object for the above mentioned callables. " "Clear the current frame and return the newly created generator." msgstr "" -#: ../../../library/dis.rst:1806 +#: ../../../library/dis.rst:1809 msgid "" "Equivalent to ``STACK[-1] = STACK[-2].send(STACK[-1])``. Used in ``yield " "from`` and ``await`` statements." msgstr "" -#: ../../../library/dis.rst:1809 +#: ../../../library/dis.rst:1812 msgid "" "If the call raises :exc:`StopIteration`, pop the top value from the stack, " "push the exception's ``value`` attribute, and increment the bytecode counter " "by *delta*." msgstr "" -#: ../../../library/dis.rst:1818 +#: ../../../library/dis.rst:1821 msgid "" "This is not really an opcode. It identifies the dividing line between " "opcodes in the range [0,255] which don't use their argument and those that " "do (``< HAVE_ARGUMENT`` and ``>= HAVE_ARGUMENT``, respectively)." msgstr "" -#: ../../../library/dis.rst:1822 +#: ../../../library/dis.rst:1825 msgid "" "If your application uses pseudo instructions or specialized instructions, " "use the :data:`hasarg` collection instead." msgstr "" -#: ../../../library/dis.rst:1825 +#: ../../../library/dis.rst:1828 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:1829 +#: ../../../library/dis.rst:1832 msgid "" "Pseudo instructions were added to the :mod:`!dis` module, and for them it is " "not true that comparison with ``HAVE_ARGUMENT`` indicates whether they use " "their arg." msgstr "" -#: ../../../library/dis.rst:1834 +#: ../../../library/dis.rst:1837 msgid "Use :data:`hasarg` instead." msgstr "" -#: ../../../library/dis.rst:1839 +#: ../../../library/dis.rst:1842 msgid "" "Calls an intrinsic function with one argument. Passes ``STACK[-1]`` as the " "argument and sets ``STACK[-1]`` to the result. Used to implement " "functionality that is not performance critical." msgstr "" -#: ../../../library/dis.rst:1843 ../../../library/dis.rst:1897 +#: ../../../library/dis.rst:1846 ../../../library/dis.rst:1900 msgid "The operand determines which intrinsic function is called:" msgstr "" -#: ../../../library/dis.rst:1846 ../../../library/dis.rst:1900 +#: ../../../library/dis.rst:1849 ../../../library/dis.rst:1903 msgid "Operand" msgstr "" -#: ../../../library/dis.rst:1846 ../../../library/dis.rst:1900 +#: ../../../library/dis.rst:1849 ../../../library/dis.rst:1903 msgid "Description" msgstr "" -#: ../../../library/dis.rst:1848 +#: ../../../library/dis.rst:1851 msgid "``INTRINSIC_1_INVALID``" msgstr "" -#: ../../../library/dis.rst:1848 ../../../library/dis.rst:1902 +#: ../../../library/dis.rst:1851 ../../../library/dis.rst:1905 msgid "Not valid" msgstr "" -#: ../../../library/dis.rst:1850 +#: ../../../library/dis.rst:1853 msgid "``INTRINSIC_PRINT``" msgstr "" -#: ../../../library/dis.rst:1850 +#: ../../../library/dis.rst:1853 msgid "Prints the argument to standard out. Used in the REPL." msgstr "" -#: ../../../library/dis.rst:1853 +#: ../../../library/dis.rst:1856 msgid "``INTRINSIC_IMPORT_STAR``" msgstr "" -#: ../../../library/dis.rst:1853 +#: ../../../library/dis.rst:1856 msgid "Performs ``import *`` for the named module." msgstr "" -#: ../../../library/dis.rst:1856 +#: ../../../library/dis.rst:1859 msgid "``INTRINSIC_STOPITERATION_ERROR``" msgstr "" -#: ../../../library/dis.rst:1856 +#: ../../../library/dis.rst:1859 msgid "Extracts the return value from a ``StopIteration`` exception." msgstr "" -#: ../../../library/dis.rst:1859 +#: ../../../library/dis.rst:1862 msgid "``INTRINSIC_ASYNC_GEN_WRAP``" msgstr "" -#: ../../../library/dis.rst:1859 +#: ../../../library/dis.rst:1862 msgid "Wraps an async generator value" msgstr "" -#: ../../../library/dis.rst:1861 +#: ../../../library/dis.rst:1864 msgid "``INTRINSIC_UNARY_POSITIVE``" msgstr "" -#: ../../../library/dis.rst:1861 +#: ../../../library/dis.rst:1864 msgid "Performs the unary ``+`` operation" msgstr "" -#: ../../../library/dis.rst:1864 +#: ../../../library/dis.rst:1867 msgid "``INTRINSIC_LIST_TO_TUPLE``" msgstr "" -#: ../../../library/dis.rst:1864 +#: ../../../library/dis.rst:1867 msgid "Converts a list to a tuple" msgstr "" -#: ../../../library/dis.rst:1866 +#: ../../../library/dis.rst:1869 msgid "``INTRINSIC_TYPEVAR``" msgstr "" -#: ../../../library/dis.rst:1866 +#: ../../../library/dis.rst:1869 msgid "Creates a :class:`typing.TypeVar`" msgstr "" -#: ../../../library/dis.rst:1868 +#: ../../../library/dis.rst:1871 msgid "``INTRINSIC_PARAMSPEC``" msgstr "" -#: ../../../library/dis.rst:1868 +#: ../../../library/dis.rst:1871 msgid "Creates a :class:`typing.ParamSpec`" msgstr "" -#: ../../../library/dis.rst:1871 +#: ../../../library/dis.rst:1874 msgid "``INTRINSIC_TYPEVARTUPLE``" msgstr "" -#: ../../../library/dis.rst:1871 +#: ../../../library/dis.rst:1874 msgid "Creates a :class:`typing.TypeVarTuple`" msgstr "" -#: ../../../library/dis.rst:1874 +#: ../../../library/dis.rst:1877 msgid "``INTRINSIC_SUBSCRIPT_GENERIC``" msgstr "" -#: ../../../library/dis.rst:1874 +#: ../../../library/dis.rst:1877 msgid "Returns :class:`typing.Generic` subscripted with the argument" msgstr "" -#: ../../../library/dis.rst:1877 +#: ../../../library/dis.rst:1880 msgid "``INTRINSIC_TYPEALIAS``" msgstr "" -#: ../../../library/dis.rst:1877 +#: ../../../library/dis.rst:1880 msgid "" "Creates a :class:`typing.TypeAliasType`; used in the :keyword:`type` " "statement. The argument is a tuple of the type alias's name, type " "parameters, and value." msgstr "" -#: ../../../library/dis.rst:1889 +#: ../../../library/dis.rst:1892 msgid "" "Calls an intrinsic function with two arguments. Used to implement " "functionality that is not performance critical::" msgstr "" -#: ../../../library/dis.rst:1902 +#: ../../../library/dis.rst:1905 msgid "``INTRINSIC_2_INVALID``" msgstr "" -#: ../../../library/dis.rst:1904 +#: ../../../library/dis.rst:1907 msgid "``INTRINSIC_PREP_RERAISE_STAR``" msgstr "" -#: ../../../library/dis.rst:1904 +#: ../../../library/dis.rst:1907 msgid "Calculates the :exc:`ExceptionGroup` to raise from a ``try-except*``." msgstr "" -#: ../../../library/dis.rst:1908 +#: ../../../library/dis.rst:1911 msgid "``INTRINSIC_TYPEVAR_WITH_BOUND``" msgstr "" -#: ../../../library/dis.rst:1908 +#: ../../../library/dis.rst:1911 msgid "Creates a :class:`typing.TypeVar` with a bound." msgstr "" -#: ../../../library/dis.rst:1911 +#: ../../../library/dis.rst:1914 msgid "``INTRINSIC_TYPEVAR_WITH_CONSTRAINTS``" msgstr "" -#: ../../../library/dis.rst:1911 +#: ../../../library/dis.rst:1914 msgid "Creates a :class:`typing.TypeVar` with constraints." msgstr "" -#: ../../../library/dis.rst:1915 +#: ../../../library/dis.rst:1918 msgid "``INTRINSIC_SET_FUNCTION_TYPE_PARAMS``" msgstr "" -#: ../../../library/dis.rst:1915 +#: ../../../library/dis.rst:1918 msgid "Sets the ``__type_params__`` attribute of a function." msgstr "" -#: ../../../library/dis.rst:1924 +#: ../../../library/dis.rst:1927 msgid "" "Performs special method lookup on ``STACK[-1]``. If ``type(STACK[-1])." "__xxx__`` is a method, leave ``type(STACK[-1]).__xxx__; STACK[-1]`` on the " @@ -1945,25 +1951,25 @@ msgid "" "__xxx__; NULL`` on the stack." msgstr "" -#: ../../../library/dis.rst:1933 +#: ../../../library/dis.rst:1936 msgid "**Pseudo-instructions**" msgstr "" -#: ../../../library/dis.rst:1935 +#: ../../../library/dis.rst:1938 msgid "" "These opcodes do not appear in Python bytecode. They are used by the " "compiler but are replaced by real opcodes or removed before bytecode is " "generated." msgstr "" -#: ../../../library/dis.rst:1940 +#: ../../../library/dis.rst:1943 msgid "" "Set up an exception handler for the following code block. If an exception " "occurs, the value stack level is restored to its current state and control " "is transferred to the exception handler at ``target``." msgstr "" -#: ../../../library/dis.rst:1947 +#: ../../../library/dis.rst:1950 msgid "" "Like ``SETUP_FINALLY``, but in case of an exception also pushes the last " "instruction (``lasti``) to the stack so that ``RERAISE`` can restore it. If " @@ -1972,91 +1978,91 @@ msgid "" "exception handler at ``target``." msgstr "" -#: ../../../library/dis.rst:1956 +#: ../../../library/dis.rst:1959 msgid "" "Like ``SETUP_CLEANUP``, but in case of an exception one more item is popped " "from the stack before control is transferred to the exception handler at " "``target``." msgstr "" -#: ../../../library/dis.rst:1960 +#: ../../../library/dis.rst:1963 msgid "" "This variant is used in :keyword:`with` and :keyword:`async with` " "constructs, which push the return value of the context manager's :meth:" "`~object.__enter__` or :meth:`~object.__aenter__` to the stack." msgstr "" -#: ../../../library/dis.rst:1967 +#: ../../../library/dis.rst:1970 msgid "" "Marks the end of the code block associated with the last ``SETUP_FINALLY``, " "``SETUP_CLEANUP`` or ``SETUP_WITH``." msgstr "" -#: ../../../library/dis.rst:1974 +#: ../../../library/dis.rst:1977 msgid "" "Undirected relative jump instructions which are replaced by their directed " "(forward/backward) counterparts by the assembler." msgstr "" -#: ../../../library/dis.rst:1980 +#: ../../../library/dis.rst:1983 msgid "" "Conditional jumps which do not impact the stack. Replaced by the sequence " "``COPY 1``, ``TO_BOOL``, ``POP_JUMP_IF_TRUE/FALSE``." msgstr "" -#: ../../../library/dis.rst:1985 +#: ../../../library/dis.rst:1988 msgid "" "Pushes a reference to the cell contained in slot ``i`` of the \"fast " "locals\" storage." msgstr "" -#: ../../../library/dis.rst:1988 +#: ../../../library/dis.rst:1991 msgid "" "Note that ``LOAD_CLOSURE`` is replaced with ``LOAD_FAST`` in the assembler." msgstr "" -#: ../../../library/dis.rst:1990 +#: ../../../library/dis.rst:1993 msgid "This opcode is now a pseudo-instruction." msgstr "" -#: ../../../library/dis.rst:1997 +#: ../../../library/dis.rst:2000 msgid "Opcode collections" msgstr "" -#: ../../../library/dis.rst:1999 +#: ../../../library/dis.rst:2002 msgid "" "These collections are provided for automatic introspection of bytecode " "instructions:" msgstr "" -#: ../../../library/dis.rst:2002 +#: ../../../library/dis.rst:2005 msgid "" "The collections now contain pseudo instructions and instrumented " "instructions as well. These are opcodes with values ``>= MIN_PSEUDO_OPCODE`` " "and ``>= MIN_INSTRUMENTED_OPCODE``." msgstr "" -#: ../../../library/dis.rst:2009 +#: ../../../library/dis.rst:2012 msgid "Sequence of operation names, indexable using the bytecode." msgstr "" -#: ../../../library/dis.rst:2014 +#: ../../../library/dis.rst:2017 msgid "Dictionary mapping operation names to bytecodes." msgstr "" -#: ../../../library/dis.rst:2019 +#: ../../../library/dis.rst:2022 msgid "Sequence of all compare operation names." msgstr "" -#: ../../../library/dis.rst:2024 +#: ../../../library/dis.rst:2027 msgid "Sequence of bytecodes that use their argument." msgstr "" -#: ../../../library/dis.rst:2031 +#: ../../../library/dis.rst:2034 msgid "Sequence of bytecodes that access a constant." msgstr "" -#: ../../../library/dis.rst:2036 +#: ../../../library/dis.rst:2039 msgid "" "Sequence of bytecodes that access a :term:`free (closure) variable `. 'free' in this context refers to names in the current scope that " @@ -2065,46 +2071,46 @@ msgid "" "scopes." msgstr "" -#: ../../../library/dis.rst:2044 +#: ../../../library/dis.rst:2047 msgid "Sequence of bytecodes that access an attribute by name." msgstr "" -#: ../../../library/dis.rst:2049 +#: ../../../library/dis.rst:2052 msgid "Sequence of bytecodes that have a jump target. All jumps are relative." msgstr "" -#: ../../../library/dis.rst:2056 +#: ../../../library/dis.rst:2059 msgid "Sequence of bytecodes that access a local variable." msgstr "" -#: ../../../library/dis.rst:2061 +#: ../../../library/dis.rst:2064 msgid "Sequence of bytecodes of Boolean operations." msgstr "" -#: ../../../library/dis.rst:2065 +#: ../../../library/dis.rst:2068 msgid "Sequence of bytecodes that set an exception handler." msgstr "" -#: ../../../library/dis.rst:2072 +#: ../../../library/dis.rst:2075 msgid "Sequence of bytecodes that have a relative jump target." msgstr "" -#: ../../../library/dis.rst:2074 +#: ../../../library/dis.rst:2077 msgid "All jumps are now relative. Use :data:`hasjump`." msgstr "" -#: ../../../library/dis.rst:2080 +#: ../../../library/dis.rst:2083 msgid "Sequence of bytecodes that have an absolute jump target." msgstr "" -#: ../../../library/dis.rst:2082 +#: ../../../library/dis.rst:2085 msgid "All jumps are now relative. This list is empty." msgstr "" -#: ../../../library/dis.rst:1686 +#: ../../../library/dis.rst:1689 msgid "built-in function" msgstr "" -#: ../../../library/dis.rst:1686 +#: ../../../library/dis.rst:1689 msgid "slice" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/email.utils.pot b/main/locale/pot/LC_MESSAGES/library/email.utils.pot index 1dc9ec3a188..3c21baa9108 100644 --- a/main/locale/pot/LC_MESSAGES/library/email.utils.pot +++ b/main/locale/pot/LC_MESSAGES/library/email.utils.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -88,12 +88,12 @@ msgid "" "unless the parse fails, in which case a 2-tuple of ``('', '')`` is returned." msgstr "" -#: ../../../library/email.utils.rst:67 ../../../library/email.utils.rst:95 +#: ../../../library/email.utils.rst:67 ../../../library/email.utils.rst:102 msgid "" "If *strict* is true, use a strict parser which rejects malformed inputs." msgstr "" -#: ../../../library/email.utils.rst:69 ../../../library/email.utils.rst:107 +#: ../../../library/email.utils.rst:69 ../../../library/email.utils.rst:114 msgid "Add *strict* optional parameter and reject malformed inputs by default." msgstr "" @@ -114,21 +114,32 @@ msgid "" msgstr "" #: ../../../library/email.utils.rst:85 +msgid "" +"If *strict* is true (the default), raise :exc:`ValueError` for inputs that " +"contain CR or LF, which are not allowed in an email address. Set *strict* " +"to ``False`` to allow non-strict inputs." +msgstr "" + +#: ../../../library/email.utils.rst:89 msgid "Added the *charset* option." msgstr "" -#: ../../../library/email.utils.rst:91 +#: ../../../library/email.utils.rst:92 +msgid "Added the *strict* parameter." +msgstr "" + +#: ../../../library/email.utils.rst:98 msgid "" "This method returns a list of 2-tuples of the form returned by " "``parseaddr()``. *fieldvalues* is a sequence of header field values as might " "be returned by :meth:`Message.get_all `." msgstr "" -#: ../../../library/email.utils.rst:97 +#: ../../../library/email.utils.rst:104 msgid "Here's a simple example that gets all the recipients of a message::" msgstr "" -#: ../../../library/email.utils.rst:113 +#: ../../../library/email.utils.rst:120 msgid "" "Attempts to parse a date according to the rules in :rfc:`2822`. however, " "some mailers don't follow that format as specified, so :func:`parsedate` " @@ -139,7 +150,7 @@ msgid "" "returned. Note that indexes 6, 7, and 8 of the result tuple are not usable." msgstr "" -#: ../../../library/email.utils.rst:124 +#: ../../../library/email.utils.rst:131 msgid "" "Performs the same function as :func:`parsedate`, but returns either ``None`` " "or a 10-tuple; the first 9 elements make up a tuple that can be passed " @@ -150,7 +161,7 @@ msgid "" "the result tuple are not usable." msgstr "" -#: ../../../library/email.utils.rst:134 +#: ../../../library/email.utils.rst:141 msgid "" "The inverse of :func:`format_datetime`. Performs the same function as :func:" "`parsedate`, but on success returns a :mod:`~datetime.datetime`; otherwise " @@ -164,25 +175,25 @@ msgid "" "corresponding a :class:`~datetime.timezone` :class:`~datetime.tzinfo`." msgstr "" -#: ../../../library/email.utils.rst:150 +#: ../../../library/email.utils.rst:157 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:157 +#: ../../../library/email.utils.rst:164 msgid "Returns a date string as per :rfc:`2822`, e.g.::" msgstr "" -#: ../../../library/email.utils.rst:161 +#: ../../../library/email.utils.rst:168 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:165 +#: ../../../library/email.utils.rst:172 msgid "" "Optional *localtime* is a flag that when ``True``, interprets *timeval*, and " "returns a date relative to the local timezone instead of UTC, properly " @@ -190,7 +201,7 @@ msgid "" "UTC is used." msgstr "" -#: ../../../library/email.utils.rst:170 +#: ../../../library/email.utils.rst:177 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``. " @@ -198,7 +209,7 @@ msgid "" "*localtime* is ``False``. The default is ``False``." msgstr "" -#: ../../../library/email.utils.rst:178 +#: ../../../library/email.utils.rst:185 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 " @@ -210,11 +221,11 @@ msgid "" "date headers." msgstr "" -#: ../../../library/email.utils.rst:192 +#: ../../../library/email.utils.rst:199 msgid "Decode the string *s* according to :rfc:`2231`." msgstr "" -#: ../../../library/email.utils.rst:197 +#: ../../../library/email.utils.rst:204 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 " @@ -223,7 +234,7 @@ msgid "" "*language*." msgstr "" -#: ../../../library/email.utils.rst:205 +#: ../../../library/email.utils.rst:212 msgid "" "When a header parameter is encoded in :rfc:`2231` format, :meth:`Message." "get_param ` may return a 3-tuple containing " @@ -235,23 +246,23 @@ msgid "" "defaults to ``'us-ascii'``." msgstr "" -#: ../../../library/email.utils.rst:214 +#: ../../../library/email.utils.rst:221 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:220 +#: ../../../library/email.utils.rst:227 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:225 +#: ../../../library/email.utils.rst:232 msgid "Footnotes" msgstr "" -#: ../../../library/email.utils.rst:226 +#: ../../../library/email.utils.rst:233 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/main/locale/pot/LC_MESSAGES/library/filecmp.pot b/main/locale/pot/LC_MESSAGES/library/filecmp.pot index bff09e7ce95..4104af33aaa 100644 --- a/main/locale/pot/LC_MESSAGES/library/filecmp.pot +++ b/main/locale/pot/LC_MESSAGES/library/filecmp.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -70,8 +70,8 @@ msgstr "" #: ../../../library/filecmp.rst:39 msgid "" -"Compare the files in the two directories *dir1* and *dir2* whose names are " -"given by *common*." +"Compare the files in the two directories *a* and *b* whose names are given " +"by *common*." msgstr "" #: ../../../library/filecmp.rst:42 diff --git a/main/locale/pot/LC_MESSAGES/library/functions.pot b/main/locale/pot/LC_MESSAGES/library/functions.pot index e7d3eed036b..f3e69f28298 100644 --- a/main/locale/pot/LC_MESSAGES/library/functions.pot +++ b/main/locale/pot/LC_MESSAGES/library/functions.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -474,8 +474,8 @@ msgid "" "See also :func:`enum.bin` to represent negative values as twos-complement." msgstr "" -#: ../../../library/functions.rst:145 ../../../library/functions.rst:986 -#: ../../../library/functions.rst:1370 +#: ../../../library/functions.rst:145 ../../../library/functions.rst:990 +#: ../../../library/functions.rst:1374 msgid "See also :func:`format` for more information." msgstr "" @@ -489,7 +489,7 @@ msgid "" "``False`` and ``True`` (see :ref:`typebool`)." msgstr "" -#: ../../../library/functions.rst:160 ../../../library/functions.rst:836 +#: ../../../library/functions.rst:160 ../../../library/functions.rst:840 msgid "The parameter is now positional-only." msgstr "" @@ -799,8 +799,8 @@ msgid "" "number from real and imaginary parts." msgstr "" -#: ../../../library/functions.rst:395 ../../../library/functions.rst:779 -#: ../../../library/functions.rst:1042 +#: ../../../library/functions.rst:395 ../../../library/functions.rst:783 +#: ../../../library/functions.rst:1046 msgid "Examples:" msgstr "" @@ -854,8 +854,8 @@ msgstr "" msgid "The complex type is described in :ref:`typesnumeric`." msgstr "" -#: ../../../library/functions.rst:460 ../../../library/functions.rst:833 -#: ../../../library/functions.rst:1090 +#: ../../../library/functions.rst:460 ../../../library/functions.rst:837 +#: ../../../library/functions.rst:1094 msgid "Grouping digits with underscores as in code literals is allowed." msgstr "" @@ -1014,7 +1014,7 @@ msgstr "" msgid "Syntax errors are reported as exceptions." msgstr "" -#: ../../../library/functions.rst:610 ../../../library/functions.rst:676 +#: ../../../library/functions.rst:610 ../../../library/functions.rst:680 msgid "" "This function executes arbitrary code. Calling it with untrusted user-" "supplied input will lead to security vulnerabilities." @@ -1023,11 +1023,11 @@ msgstr "" #: ../../../library/functions.rst:613 msgid "" "The *source* argument is parsed and evaluated as a Python expression " -"(technically speaking, a condition list) using the *globals* and *locals* " -"mappings 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 *source* is parsed. Overriding " +"(technically speaking, an :ref:`expression list `) using the " +"*globals* and *locals* mappings 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 *source* is parsed. Overriding " "``__builtins__`` can be used to restrict or change the available names, but " "this is **not** a security mechanism: the executed code can still access all " "builtins. If the *locals* mapping is omitted it defaults to the *globals* " @@ -1039,11 +1039,11 @@ msgid "" "`nonlocal` statement)." msgstr "" -#: ../../../library/functions.rst:630 +#: ../../../library/functions.rst:631 msgid "Example:" msgstr "" -#: ../../../library/functions.rst:636 +#: ../../../library/functions.rst:640 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 " @@ -1051,7 +1051,7 @@ msgid "" "*mode* argument, :func:`eval`\\'s return value will be ``None``." msgstr "" -#: ../../../library/functions.rst:641 +#: ../../../library/functions.rst:645 msgid "" "Hints: dynamic execution of statements is supported by the :func:`exec` " "function. The :func:`globals` and :func:`locals` functions return the " @@ -1059,40 +1059,40 @@ msgid "" "pass around for use by :func:`eval` or :func:`exec`." msgstr "" -#: ../../../library/functions.rst:646 +#: ../../../library/functions.rst:650 msgid "" "If the given source is a string, then leading and trailing spaces and tabs " "are stripped." msgstr "" -#: ../../../library/functions.rst:649 +#: ../../../library/functions.rst:653 msgid "" "See :func:`ast.literal_eval` for a function to evaluate strings with " "expressions containing only literals." msgstr "" -#: ../../../library/functions.rst:652 ../../../library/functions.rst:654 -#: ../../../library/functions.rst:719 ../../../library/functions.rst:721 +#: ../../../library/functions.rst:656 ../../../library/functions.rst:658 +#: ../../../library/functions.rst:723 ../../../library/functions.rst:725 msgid "" "Raises an :ref:`auditing event ` ``exec`` with the code object as " "the argument. Code compilation events may also be raised." msgstr "" -#: ../../../library/functions.rst:659 ../../../library/functions.rst:741 +#: ../../../library/functions.rst:663 ../../../library/functions.rst:745 msgid "The *globals* and *locals* arguments can now be passed as keywords." msgstr "" -#: ../../../library/functions.rst:663 ../../../library/functions.rst:745 +#: ../../../library/functions.rst:667 ../../../library/functions.rst:749 msgid "" "The semantics of the default *locals* namespace have been adjusted as " "described for the :func:`locals` builtin." msgstr "" -#: ../../../library/functions.rst:668 ../../../library/functions.rst:750 +#: ../../../library/functions.rst:672 ../../../library/functions.rst:754 msgid "*globals* can now be a :class:`frozendict`." msgstr "" -#: ../../../library/functions.rst:679 +#: ../../../library/functions.rst:683 msgid "" "This function supports dynamic execution of Python code. *source* must be " "either a string or a code object. If it is a string, the string is parsed " @@ -1105,7 +1105,7 @@ msgid "" "passed to the :func:`exec` function. The return value is ``None``." msgstr "" -#: ../../../library/functions.rst:690 +#: ../../../library/functions.rst:694 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 " @@ -1116,7 +1116,7 @@ msgid "" "are the same dictionary." msgstr "" -#: ../../../library/functions.rst:700 +#: ../../../library/functions.rst:704 msgid "" "When ``exec`` gets two separate objects as *globals* and *locals*, the code " "will be executed as if it were embedded in a class definition. This means " @@ -1125,7 +1125,7 @@ msgid "" "are treated as class variables in a class definition)." msgstr "" -#: ../../../library/functions.rst:706 +#: ../../../library/functions.rst:710 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:" @@ -1134,7 +1134,7 @@ msgid "" "security mechanism: the executed code can still access all builtins." msgstr "" -#: ../../../library/functions.rst:713 +#: ../../../library/functions.rst:717 msgid "" "The *closure* argument specifies a closure--a tuple of cellvars. It's only " "valid when the *object* is a code object containing :term:`free (closure) " @@ -1142,25 +1142,25 @@ msgid "" "the length of the code object's :attr:`~codeobject.co_freevars` attribute." msgstr "" -#: ../../../library/functions.rst:726 +#: ../../../library/functions.rst:730 msgid "" "The built-in functions :func:`globals` and :func:`locals` return the current " "global and local namespace, respectively, which may be useful to pass around " "for use as the second and third argument to :func:`exec`." msgstr "" -#: ../../../library/functions.rst:732 +#: ../../../library/functions.rst:736 msgid "" "The default *locals* act as described for function :func:`locals` below. " "Pass an explicit *locals* dictionary if you need to see effects of the code " "on *locals* after function :func:`exec` returns." msgstr "" -#: ../../../library/functions.rst:736 +#: ../../../library/functions.rst:740 msgid "Added the *closure* parameter." msgstr "" -#: ../../../library/functions.rst:755 +#: ../../../library/functions.rst:759 msgid "" "Construct an iterator from those elements of *iterable* for which *function* " "is true. *iterable* may be either a sequence, a container which supports " @@ -1168,7 +1168,7 @@ msgid "" "is assumed, that is, all elements of *iterable* that are false are removed." msgstr "" -#: ../../../library/functions.rst:761 +#: ../../../library/functions.rst:765 msgid "" "Note that ``filter(function, iterable)`` is equivalent to the generator " "expression ``(item for item in iterable if function(item))`` if function is " @@ -1176,17 +1176,17 @@ msgid "" "``None``." msgstr "" -#: ../../../library/functions.rst:766 +#: ../../../library/functions.rst:770 msgid "" "See :func:`itertools.filterfalse` for the complementary function that " "returns elements of *iterable* for which *function* is false." msgstr "" -#: ../../../library/functions.rst:777 +#: ../../../library/functions.rst:781 msgid "Return a floating-point number constructed from a number or a string." msgstr "" -#: ../../../library/functions.rst:794 +#: ../../../library/functions.rst:798 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 " @@ -1197,13 +1197,13 @@ msgid "" "grammar, after leading and trailing whitespace characters are removed:" msgstr "" -#: ../../../library/functions.rst:815 +#: ../../../library/functions.rst:819 msgid "" "Case is not significant, so, for example, \"inf\", \"Inf\", \"INFINITY\", " "and \"iNfINity\" are all acceptable spellings for positive infinity." msgstr "" -#: ../../../library/functions.rst:818 +#: ../../../library/functions.rst:822 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 " @@ -1211,33 +1211,33 @@ msgid "" "float, an :exc:`OverflowError` will be raised." msgstr "" -#: ../../../library/functions.rst:823 +#: ../../../library/functions.rst:827 msgid "" "For a general Python object ``x``, ``float(x)`` delegates to ``x." "__float__()``. If :meth:`~object.__float__` is not defined then it falls " "back to :meth:`~object.__index__`." msgstr "" -#: ../../../library/functions.rst:827 +#: ../../../library/functions.rst:831 msgid "" "See also :meth:`float.from_number` which only accepts a numeric argument." msgstr "" -#: ../../../library/functions.rst:829 +#: ../../../library/functions.rst:833 msgid "If no argument is given, ``0.0`` is returned." msgstr "" -#: ../../../library/functions.rst:831 +#: ../../../library/functions.rst:835 msgid "The float type is described in :ref:`typesnumeric`." msgstr "" -#: ../../../library/functions.rst:839 +#: ../../../library/functions.rst:843 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__float__` is not " "defined." msgstr "" -#: ../../../library/functions.rst:849 +#: ../../../library/functions.rst:853 msgid "" "Convert a *value* to a \"formatted\" representation, as controlled by " "*format_spec*. The interpretation of *format_spec* will depend on the type " @@ -1245,13 +1245,13 @@ msgid "" "is used by most built-in types: :ref:`formatspec`." msgstr "" -#: ../../../library/functions.rst:854 +#: ../../../library/functions.rst:858 msgid "" "The default *format_spec* is an empty string which usually gives the same " "effect as calling :func:`str(value) `." msgstr "" -#: ../../../library/functions.rst:857 +#: ../../../library/functions.rst:861 msgid "" "A call to ``format(value, format_spec)`` is translated to ``type(value)." "__format__(value, format_spec)`` which bypasses the instance dictionary when " @@ -1261,38 +1261,38 @@ msgid "" "return value are not strings." msgstr "" -#: ../../../library/functions.rst:864 +#: ../../../library/functions.rst:868 msgid "" "``object().__format__(format_spec)`` raises :exc:`TypeError` if " "*format_spec* is not an empty string." msgstr "" -#: ../../../library/functions.rst:875 +#: ../../../library/functions.rst:879 msgid "" "Create a new frozen dictionary. The :class:`frozendict` object is a built-" "in class. See also :ref:`typesmapping` for documentation about this class." msgstr "" -#: ../../../library/functions.rst:878 +#: ../../../library/functions.rst:882 msgid "" "For other containers see the built-in :class:`dict`, :class:`list`, :class:" "`set`, and :class:`tuple` classes, as well as the :mod:`collections` module." msgstr "" -#: ../../../library/functions.rst:888 +#: ../../../library/functions.rst:892 msgid "" "Return a new :class:`frozenset` object, optionally with elements taken from " "*iterable*. :class:`frozenset` is a built-in class. See also :ref:`types-" "set` for documentation about this class." msgstr "" -#: ../../../library/functions.rst:892 +#: ../../../library/functions.rst:896 msgid "" "For other containers see the built-in :class:`set`, :class:`list`, :class:" "`tuple`, and :class:`dict` classes, as well as the :mod:`collections` module." msgstr "" -#: ../../../library/functions.rst:900 +#: ../../../library/functions.rst:904 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 " @@ -1302,7 +1302,7 @@ msgid "" "raised. *name* need not be a Python identifier (see :func:`setattr`)." msgstr "" -#: ../../../library/functions.rst:909 +#: ../../../library/functions.rst:913 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " @@ -1310,14 +1310,14 @@ msgid "" "`getattr`." msgstr "" -#: ../../../library/functions.rst:917 +#: ../../../library/functions.rst:921 msgid "" "Return the dictionary implementing the current module namespace. For code " "within functions, this is set when the function is defined and remains the " "same regardless of where the function is called." msgstr "" -#: ../../../library/functions.rst:924 +#: ../../../library/functions.rst:928 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. " @@ -1325,7 +1325,7 @@ msgid "" "it raises an :exc:`AttributeError` or not.)" msgstr "" -#: ../../../library/functions.rst:932 +#: ../../../library/functions.rst:936 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 " @@ -1333,13 +1333,13 @@ msgid "" "value (even if they are of different types, as is the case for 1 and 1.0)." msgstr "" -#: ../../../library/functions.rst:939 +#: ../../../library/functions.rst:943 msgid "" "For objects with custom :meth:`~object.__hash__` methods, note that :func:" "`hash` truncates the return value based on the bit width of the host machine." msgstr "" -#: ../../../library/functions.rst:946 +#: ../../../library/functions.rst:950 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 " @@ -1349,7 +1349,7 @@ msgid "" "argument is any other kind of object, a help page on the object is generated." msgstr "" -#: ../../../library/functions.rst:953 +#: ../../../library/functions.rst:957 msgid "" "Note that if a slash(/) appears in the parameter list of a function when " "invoking :func:`help`, it means that the parameters prior to the slash are " @@ -1357,44 +1357,44 @@ msgid "" "parameters `." msgstr "" -#: ../../../library/functions.rst:958 +#: ../../../library/functions.rst:962 msgid "" "This function is added to the built-in namespace by the :mod:`site` module." msgstr "" -#: ../../../library/functions.rst:960 +#: ../../../library/functions.rst:964 msgid "" "Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported signatures " "for callables are now more comprehensive and consistent." msgstr "" -#: ../../../library/functions.rst:967 +#: ../../../library/functions.rst:971 msgid "" "Convert an integer number to a lowercase hexadecimal string prefixed with " "\"0x\". If *integer* is not a Python :class:`int` object, it has to define " "an :meth:`~object.__index__` method that returns an integer. Some examples:" msgstr "" -#: ../../../library/functions.rst:976 +#: ../../../library/functions.rst:980 msgid "" "If you want to convert an integer number to an uppercase or lower " "hexadecimal string with prefix or not, you can use either of the following " "ways:" msgstr "" -#: ../../../library/functions.rst:988 +#: ../../../library/functions.rst:992 msgid "" "See also :func:`int` for converting a hexadecimal string to an integer using " "a base of 16." msgstr "" -#: ../../../library/functions.rst:993 +#: ../../../library/functions.rst:997 msgid "" "To obtain a hexadecimal string representation for a float, use the :meth:" "`float.hex` method." msgstr "" -#: ../../../library/functions.rst:999 +#: ../../../library/functions.rst:1003 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. " @@ -1402,17 +1402,17 @@ msgid "" "value." msgstr "" -#: ../../../library/functions.rst:1004 +#: ../../../library/functions.rst:1008 msgid "This is the address of the object in memory." msgstr "" -#: ../../../library/functions.rst:1006 +#: ../../../library/functions.rst:1010 msgid "" "Raises an :ref:`auditing event ` ``builtins.id`` with argument " "``id``." msgstr "" -#: ../../../library/functions.rst:1012 +#: ../../../library/functions.rst:1016 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, " @@ -1420,38 +1420,38 @@ msgid "" "When EOF is read, :exc:`EOFError` is raised. Example::" msgstr "" -#: ../../../library/functions.rst:1022 +#: ../../../library/functions.rst:1026 msgid "" "If the :mod:`readline` module was loaded, then :func:`input` will use it to " "provide elaborate line editing and history features." msgstr "" -#: ../../../library/functions.rst:1025 ../../../library/functions.rst:1027 +#: ../../../library/functions.rst:1029 ../../../library/functions.rst:1031 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt`` before reading input" msgstr "" -#: ../../../library/functions.rst:1030 ../../../library/functions.rst:1032 +#: ../../../library/functions.rst:1034 ../../../library/functions.rst:1036 msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "the result after successfully reading input." msgstr "" -#: ../../../library/functions.rst:1039 +#: ../../../library/functions.rst:1043 msgid "" "Return an integer object constructed from a number or a string, or return " "``0`` if no arguments are given." msgstr "" -#: ../../../library/functions.rst:1059 +#: ../../../library/functions.rst:1063 msgid "" "If the argument defines :meth:`~object.__int__`, ``int(x)`` returns ``x." "__int__()``. If the argument defines :meth:`~object.__index__`, it returns " "``x.__index__()``. For floating-point numbers, this truncates towards zero." msgstr "" -#: ../../../library/functions.rst:1064 +#: ../../../library/functions.rst:1068 msgid "" "If the argument is not a number or if *base* is given, then it must be a " "string, :class:`bytes`, or :class:`bytearray` instance representing an " @@ -1460,7 +1460,7 @@ msgid "" "whitespace, and have single underscores interspersed between digits." msgstr "" -#: ../../../library/functions.rst:1070 +#: ../../../library/functions.rst:1074 msgid "" "A base-n integer string contains digits, each representing a value from 0 to " "n-1. The values 0--9 can be represented by any Unicode decimal digit. The " @@ -1474,11 +1474,11 @@ msgid "" "while ``int('010')`` and ``int('010', 8)`` are." msgstr "" -#: ../../../library/functions.rst:1081 +#: ../../../library/functions.rst:1085 msgid "The integer type is described in :ref:`typesnumeric`." msgstr "" -#: ../../../library/functions.rst:1083 +#: ../../../library/functions.rst:1087 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 " @@ -1486,17 +1486,17 @@ msgid "" "` instead of :meth:`base.__index__ `." msgstr "" -#: ../../../library/functions.rst:1093 +#: ../../../library/functions.rst:1097 msgid "The first parameter is now positional-only." msgstr "" -#: ../../../library/functions.rst:1096 +#: ../../../library/functions.rst:1100 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__int__` is not " "defined." msgstr "" -#: ../../../library/functions.rst:1099 +#: ../../../library/functions.rst:1103 msgid "" ":class:`int` string inputs and string representations can be limited to help " "avoid denial of service attacks. A :exc:`ValueError` is raised when the " @@ -1506,12 +1506,12 @@ msgid "" "documentation." msgstr "" -#: ../../../library/functions.rst:1107 +#: ../../../library/functions.rst:1111 msgid "" ":func:`int` no longer delegates to the :meth:`~object.__trunc__` method." msgstr "" -#: ../../../library/functions.rst:1112 +#: ../../../library/functions.rst:1116 msgid "" "Return ``True`` if the *object* argument is an instance of the *classinfo* " "argument, or of a (direct, indirect, or :term:`virtual `) of *classinfo*. A class is considered a subclass of " @@ -1538,7 +1538,7 @@ msgid "" "`TypeError` exception is raised." msgstr "" -#: ../../../library/functions.rst:1144 +#: ../../../library/functions.rst:1148 msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " "differently depending on the presence of the second argument. Without a " @@ -1554,63 +1554,63 @@ msgid "" "raised, otherwise the value will be returned." msgstr "" -#: ../../../library/functions.rst:1158 +#: ../../../library/functions.rst:1162 msgid "See also :ref:`typeiter`." msgstr "" -#: ../../../library/functions.rst:1160 +#: ../../../library/functions.rst:1164 msgid "" "One useful application of the second form of :func:`iter` is to build a " "block-reader. For example, reading fixed-width blocks from a binary database " "file until the end of file is reached::" msgstr "" -#: ../../../library/functions.rst:1172 +#: ../../../library/functions.rst:1176 msgid "" "Return the length (the number of items) of an object. The argument may be a " "sequence (such as a string, bytes, tuple, list, or range) or a collection " "(such as a dictionary, set, or frozen set)." msgstr "" -#: ../../../library/functions.rst:1178 +#: ../../../library/functions.rst:1182 msgid "" "``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." "maxsize`, such as :class:`range(2 ** 100) `." msgstr "" -#: ../../../library/functions.rst:1186 +#: ../../../library/functions.rst:1190 msgid "" "Rather than being a function, :class:`list` is actually a mutable sequence " "type, as documented in :ref:`typesseq-list` and :ref:`typesseq`." msgstr "" -#: ../../../library/functions.rst:1192 +#: ../../../library/functions.rst:1196 msgid "" "Return a mapping object representing the current local symbol table, with " "variable names as the keys, and their currently bound references as the " "values." msgstr "" -#: ../../../library/functions.rst:1196 +#: ../../../library/functions.rst:1200 msgid "" "At module scope, as well as when using :func:`exec` or :func:`eval` with a " "single namespace, this function returns the same namespace as :func:" "`globals`." msgstr "" -#: ../../../library/functions.rst:1200 +#: ../../../library/functions.rst:1204 msgid "" "At class scope, it returns the namespace that will be passed to the " "metaclass constructor." msgstr "" -#: ../../../library/functions.rst:1203 +#: ../../../library/functions.rst:1207 msgid "" "When using ``exec()`` or ``eval()`` with separate local and global " "arguments, it returns the local namespace passed in to the function call." msgstr "" -#: ../../../library/functions.rst:1206 +#: ../../../library/functions.rst:1210 msgid "" "In all of the above cases, each call to ``locals()`` in a given frame of " "execution will return the *same* mapping object. Changes made through the " @@ -1620,7 +1620,7 @@ msgid "" "returned mapping object." msgstr "" -#: ../../../library/functions.rst:1213 +#: ../../../library/functions.rst:1217 msgid "" "In an :term:`optimized scope` (including functions, generators, and " "coroutines), each call to ``locals()`` instead returns a fresh dictionary " @@ -1632,7 +1632,7 @@ msgid "" "previously returned dictionaries." msgstr "" -#: ../../../library/functions.rst:1222 +#: ../../../library/functions.rst:1226 msgid "" "Calling ``locals()`` as part of a comprehension in a function, generator, or " "coroutine is equivalent to calling it in the containing scope, except that " @@ -1641,19 +1641,19 @@ msgid "" "function." msgstr "" -#: ../../../library/functions.rst:1228 +#: ../../../library/functions.rst:1232 msgid "" "Calling ``locals()`` as part of a generator expression is equivalent to " "calling it in a nested generator function." msgstr "" -#: ../../../library/functions.rst:1231 +#: ../../../library/functions.rst:1235 msgid "" "The behaviour of ``locals()`` in a comprehension has been updated as " "described in :pep:`709`." msgstr "" -#: ../../../library/functions.rst:1235 +#: ../../../library/functions.rst:1239 msgid "" "As part of :pep:`667`, the semantics of mutating the mapping objects " "returned from this function are now defined. The behavior in :term:" @@ -1662,7 +1662,7 @@ msgid "" "versions." msgstr "" -#: ../../../library/functions.rst:1245 +#: ../../../library/functions.rst:1249 msgid "" "Return an iterator that applies *function* to every item of *iterable*, " "yielding the results. If additional *iterables* arguments are passed, " @@ -1674,24 +1674,24 @@ msgid "" "see :func:`itertools.starmap`." msgstr "" -#: ../../../library/functions.rst:1254 +#: ../../../library/functions.rst:1258 msgid "Added the *strict* parameter." msgstr "" -#: ../../../library/functions.rst:1262 +#: ../../../library/functions.rst:1266 msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." msgstr "" -#: ../../../library/functions.rst:1265 +#: ../../../library/functions.rst:1269 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The largest item in the iterable is returned. If two or more positional " "arguments are provided, the largest of the positional arguments is returned." msgstr "" -#: ../../../library/functions.rst:1270 ../../../library/functions.rst:1308 +#: ../../../library/functions.rst:1274 ../../../library/functions.rst:1312 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 " @@ -1700,7 +1700,7 @@ msgid "" "`ValueError` is raised." msgstr "" -#: ../../../library/functions.rst:1276 +#: ../../../library/functions.rst:1280 msgid "" "If multiple items are maximal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1708,34 +1708,34 @@ msgid "" "nlargest(1, iterable, key=keyfunc)``." msgstr "" -#: ../../../library/functions.rst:1281 ../../../library/functions.rst:1319 +#: ../../../library/functions.rst:1285 ../../../library/functions.rst:1323 msgid "Added the *default* keyword-only parameter." msgstr "" -#: ../../../library/functions.rst:1284 ../../../library/functions.rst:1322 +#: ../../../library/functions.rst:1288 ../../../library/functions.rst:1326 msgid "The *key* can be ``None``." msgstr "" -#: ../../../library/functions.rst:1292 +#: ../../../library/functions.rst:1296 msgid "" "Return a \"memory view\" object created from the given argument. See :ref:" "`typememoryview` for more information." msgstr "" -#: ../../../library/functions.rst:1300 +#: ../../../library/functions.rst:1304 msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." msgstr "" -#: ../../../library/functions.rst:1303 +#: ../../../library/functions.rst:1307 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The smallest item in the iterable is returned. If two or more positional " "arguments are provided, the smallest of the positional arguments is returned." msgstr "" -#: ../../../library/functions.rst:1314 +#: ../../../library/functions.rst:1318 msgid "" "If multiple items are minimal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1743,14 +1743,14 @@ msgid "" "iterable, key=keyfunc)``." msgstr "" -#: ../../../library/functions.rst:1329 +#: ../../../library/functions.rst:1333 msgid "" "Retrieve the next item from the :term:`iterator` by calling its :meth:" "`~iterator.__next__` method. If *default* is given, it is returned if the " "iterator is exhausted, otherwise :exc:`StopIteration` is raised." msgstr "" -#: ../../../library/functions.rst:1336 +#: ../../../library/functions.rst:1340 msgid "" "This is the ultimate base class of all other classes. It has methods that " "are common to all instances of Python classes. When the constructor is " @@ -1758,13 +1758,13 @@ msgid "" "any arguments." msgstr "" -#: ../../../library/functions.rst:1343 +#: ../../../library/functions.rst:1347 msgid "" ":class:`object` instances do *not* have :attr:`~object.__dict__` attributes, " "so you can't assign arbitrary attributes to an instance of :class:`object`." msgstr "" -#: ../../../library/functions.rst:1350 +#: ../../../library/functions.rst:1354 msgid "" "Convert an integer number to an octal string prefixed with \"0o\". The " "result is a valid Python expression. If *integer* is not a Python :class:" @@ -1772,20 +1772,20 @@ msgid "" "returns an integer. For example:" msgstr "" -#: ../../../library/functions.rst:1360 +#: ../../../library/functions.rst:1364 msgid "" "If you want to convert an integer number to an octal string either with the " "prefix \"0o\" or not, you can use either of the following ways." msgstr "" -#: ../../../library/functions.rst:1377 +#: ../../../library/functions.rst:1381 msgid "" "Open *file* and return a corresponding :term:`file object`. If the file " "cannot be opened, an :exc:`OSError` is raised. See :ref:`tut-files` for more " "examples of how to use this function." msgstr "" -#: ../../../library/functions.rst:1381 +#: ../../../library/functions.rst:1385 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 " @@ -1794,7 +1794,7 @@ msgid "" "is set to ``False``.)" msgstr "" -#: ../../../library/functions.rst:1387 +#: ../../../library/functions.rst:1391 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. " @@ -1808,78 +1808,78 @@ msgid "" "unspecified.) The available modes are:" msgstr "" -#: ../../../library/functions.rst:1404 +#: ../../../library/functions.rst:1408 msgid "Character" msgstr "" -#: ../../../library/functions.rst:1404 +#: ../../../library/functions.rst:1408 msgid "Meaning" msgstr "" -#: ../../../library/functions.rst:1406 +#: ../../../library/functions.rst:1410 msgid "``'r'``" msgstr "" -#: ../../../library/functions.rst:1406 +#: ../../../library/functions.rst:1410 msgid "open for reading (default)" msgstr "" -#: ../../../library/functions.rst:1407 +#: ../../../library/functions.rst:1411 msgid "``'w'``" msgstr "" -#: ../../../library/functions.rst:1407 +#: ../../../library/functions.rst:1411 msgid "open for writing, truncating the file first" msgstr "" -#: ../../../library/functions.rst:1408 +#: ../../../library/functions.rst:1412 msgid "``'x'``" msgstr "" -#: ../../../library/functions.rst:1408 +#: ../../../library/functions.rst:1412 msgid "open for exclusive creation, failing if the file already exists" msgstr "" -#: ../../../library/functions.rst:1409 +#: ../../../library/functions.rst:1413 msgid "``'a'``" msgstr "" -#: ../../../library/functions.rst:1409 +#: ../../../library/functions.rst:1413 msgid "open for writing, appending to the end of file if it exists" msgstr "" -#: ../../../library/functions.rst:1410 +#: ../../../library/functions.rst:1414 msgid "``'b'``" msgstr "" -#: ../../../library/functions.rst:1410 ../../../library/functions.rst:1526 +#: ../../../library/functions.rst:1414 ../../../library/functions.rst:1530 msgid "binary mode" msgstr "" -#: ../../../library/functions.rst:1411 +#: ../../../library/functions.rst:1415 msgid "``'t'``" msgstr "" -#: ../../../library/functions.rst:1411 +#: ../../../library/functions.rst:1415 msgid "text mode (default)" msgstr "" -#: ../../../library/functions.rst:1412 +#: ../../../library/functions.rst:1416 msgid "``'+'``" msgstr "" -#: ../../../library/functions.rst:1412 +#: ../../../library/functions.rst:1416 msgid "open for updating (reading and writing)" msgstr "" -#: ../../../library/functions.rst:1415 +#: ../../../library/functions.rst:1419 msgid "" "The default mode is ``'r'`` (open for reading text, a synonym of ``'rt'``). " "Modes ``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and " "``'r+b'`` open the file with no truncation." msgstr "" -#: ../../../library/functions.rst:1419 +#: ../../../library/functions.rst:1423 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* " @@ -1890,14 +1890,14 @@ msgid "" "specified *encoding* if given." msgstr "" -#: ../../../library/functions.rst:1429 +#: ../../../library/functions.rst:1433 msgid "" "Python doesn't depend on the underlying operating system's notion of text " "files; all the processing is done by Python itself, and is therefore " "platform-independent." msgstr "" -#: ../../../library/functions.rst:1433 +#: ../../../library/functions.rst:1437 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 " @@ -1910,7 +1910,7 @@ msgid "" "*buffering* argument is given, the default buffering policy works as follows:" msgstr "" -#: ../../../library/functions.rst:1443 +#: ../../../library/functions.rst:1447 msgid "" "Binary files are buffered in fixed-size chunks; the size of the buffer is " "``max(min(blocksize, 8 MiB), DEFAULT_BUFFER_SIZE)`` when the device block " @@ -1918,14 +1918,14 @@ msgid "" "kilobytes long." msgstr "" -#: ../../../library/functions.rst:1448 +#: ../../../library/functions.rst:1452 msgid "" "\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` " "returns ``True``) use line buffering. Other text files use the policy " "described above for binary files." msgstr "" -#: ../../../library/functions.rst:1452 +#: ../../../library/functions.rst:1456 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 " @@ -1934,7 +1934,7 @@ msgid "" "the list of supported encodings." msgstr "" -#: ../../../library/functions.rst:1458 +#: ../../../library/functions.rst:1462 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 " @@ -1943,14 +1943,14 @@ msgid "" "standard names can be found in :ref:`error-handlers`." msgstr "" -#: ../../../library/functions.rst:1470 +#: ../../../library/functions.rst:1474 msgid "" "*newline* determines how to parse newline characters from the stream. It can " "be ``None``, ``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as " "follows:" msgstr "" -#: ../../../library/functions.rst:1474 +#: ../../../library/functions.rst:1478 msgid "" "When reading input from the stream, if *newline* is ``None``, universal " "newlines mode is enabled. Lines in the input can end in ``'\\n'``, " @@ -1961,7 +1961,7 @@ msgid "" "given string, and the line ending is returned to the caller untranslated." msgstr "" -#: ../../../library/functions.rst:1482 +#: ../../../library/functions.rst:1486 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -1970,7 +1970,7 @@ msgid "" "characters written are translated to the given string." msgstr "" -#: ../../../library/functions.rst:1488 +#: ../../../library/functions.rst:1492 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 " @@ -1978,7 +1978,7 @@ msgid "" "otherwise, an error will be raised." msgstr "" -#: ../../../library/functions.rst:1493 +#: ../../../library/functions.rst:1497 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 " @@ -1987,17 +1987,17 @@ msgid "" "similar to passing ``None``)." msgstr "" -#: ../../../library/functions.rst:1499 +#: ../../../library/functions.rst:1503 msgid "The newly created file is :ref:`non-inheritable `." msgstr "" -#: ../../../library/functions.rst:1501 +#: ../../../library/functions.rst:1505 msgid "" "The following example uses the :ref:`dir_fd ` parameter of the :func:" "`os.open` function to open a file relative to a given directory::" msgstr "" -#: ../../../library/functions.rst:1514 +#: ../../../library/functions.rst:1518 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 " @@ -2012,77 +2012,77 @@ msgid "" "FileIO`, is returned." msgstr "" -#: ../../../library/functions.rst:1535 +#: ../../../library/functions.rst:1539 msgid "" "See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " "(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:" "`tempfile`, and :mod:`shutil`." msgstr "" -#: ../../../library/functions.rst:1539 +#: ../../../library/functions.rst:1543 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``path``, " "``mode``, ``flags``." msgstr "" -#: ../../../library/functions.rst:1541 +#: ../../../library/functions.rst:1545 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." msgstr "" -#: ../../../library/functions.rst:1546 +#: ../../../library/functions.rst:1550 msgid "The *opener* parameter was added." msgstr "" -#: ../../../library/functions.rst:1547 +#: ../../../library/functions.rst:1551 msgid "The ``'x'`` mode was added." msgstr "" -#: ../../../library/functions.rst:1548 +#: ../../../library/functions.rst:1552 msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "" -#: ../../../library/functions.rst:1549 +#: ../../../library/functions.rst:1553 msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " "creation mode (``'x'``) already exists." msgstr "" -#: ../../../library/functions.rst:1554 +#: ../../../library/functions.rst:1558 msgid "The file is now non-inheritable." msgstr "" -#: ../../../library/functions.rst:1558 +#: ../../../library/functions.rst:1562 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the function now retries the system call instead of raising an :" "exc:`InterruptedError` exception (see :pep:`475` for the rationale)." msgstr "" -#: ../../../library/functions.rst:1561 +#: ../../../library/functions.rst:1565 msgid "The ``'namereplace'`` error handler was added." msgstr "" -#: ../../../library/functions.rst:1565 +#: ../../../library/functions.rst:1569 msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "" -#: ../../../library/functions.rst:1566 +#: ../../../library/functions.rst:1570 msgid "" "On Windows, opening a console buffer may return a subclass of :class:`io." "RawIOBase` other than :class:`io.FileIO`." msgstr "" -#: ../../../library/functions.rst:1569 +#: ../../../library/functions.rst:1573 msgid "The ``'U'`` mode has been removed." msgstr "" -#: ../../../library/functions.rst:1574 +#: ../../../library/functions.rst:1578 msgid "Return the ordinal value of a character." msgstr "" -#: ../../../library/functions.rst:1576 +#: ../../../library/functions.rst:1580 msgid "" "If the argument is a one-character string, return the Unicode code point of " "that character. For example, ``ord('a')`` returns the integer ``97`` and " @@ -2090,14 +2090,14 @@ msgid "" "`chr`." msgstr "" -#: ../../../library/functions.rst:1581 +#: ../../../library/functions.rst:1585 msgid "" "If the argument is a :class:`bytes` or :class:`bytearray` object of length " "1, return its single byte value. For example, ``ord(b'a')`` returns the " "integer ``97``." msgstr "" -#: ../../../library/functions.rst:1588 +#: ../../../library/functions.rst:1592 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) % " @@ -2105,7 +2105,7 @@ msgid "" "power operator: ``base**exp``." msgstr "" -#: ../../../library/functions.rst:1593 +#: ../../../library/functions.rst:1597 msgid "" "When arguments are builtin numeric types with mixed operand types, the " "coercion rules for binary arithmetic operators apply. For :class:`int` " @@ -2120,7 +2120,7 @@ msgid "" "``pow(-9, 2.0)`` returns ``81.0``." msgstr "" -#: ../../../library/functions.rst:1605 +#: ../../../library/functions.rst:1609 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 " @@ -2129,29 +2129,29 @@ msgid "" "*base* modulo *mod*." msgstr "" -#: ../../../library/functions.rst:1611 +#: ../../../library/functions.rst:1615 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "" -#: ../../../library/functions.rst:1618 +#: ../../../library/functions.rst:1622 msgid "" "For :class:`int` operands, the three-argument form of ``pow`` now allows the " "second argument to be negative, permitting computation of modular inverses." msgstr "" -#: ../../../library/functions.rst:1623 +#: ../../../library/functions.rst:1627 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" -#: ../../../library/functions.rst:1630 +#: ../../../library/functions.rst:1634 msgid "" "Print *objects* to the text stream *file*, separated by *sep* and followed " "by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as " "keyword arguments." msgstr "" -#: ../../../library/functions.rst:1634 +#: ../../../library/functions.rst:1638 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* " @@ -2160,7 +2160,7 @@ msgid "" "*end*." msgstr "" -#: ../../../library/functions.rst:1640 +#: ../../../library/functions.rst:1644 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 " @@ -2168,38 +2168,38 @@ msgid "" "binary mode file objects. For these, use ``file.write(...)`` instead." msgstr "" -#: ../../../library/functions.rst:1645 +#: ../../../library/functions.rst:1649 msgid "" "Output buffering is usually determined by *file*. However, if *flush* is " "true, the stream is forcibly flushed." msgstr "" -#: ../../../library/functions.rst:1649 +#: ../../../library/functions.rst:1653 msgid "Added the *flush* keyword argument." msgstr "" -#: ../../../library/functions.rst:1655 +#: ../../../library/functions.rst:1659 msgid "Return a property attribute." msgstr "" -#: ../../../library/functions.rst:1657 +#: ../../../library/functions.rst:1661 msgid "" "*fget* is a function for getting an attribute value. *fset* is a function " "for setting an attribute value. *fdel* is a function for deleting an " "attribute value. And *doc* creates a docstring for the attribute." msgstr "" -#: ../../../library/functions.rst:1661 +#: ../../../library/functions.rst:1665 msgid "A typical use is to define a managed attribute ``x``::" msgstr "" -#: ../../../library/functions.rst:1678 +#: ../../../library/functions.rst:1682 msgid "" "If *c* is an instance of *C*, ``c.x`` will invoke the getter, ``c.x = " "value`` will invoke the setter, and ``del c.x`` the deleter." msgstr "" -#: ../../../library/functions.rst:1681 +#: ../../../library/functions.rst:1685 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 " @@ -2207,14 +2207,14 @@ msgid "" "term:`decorator`::" msgstr "" -#: ../../../library/functions.rst:1694 +#: ../../../library/functions.rst:1698 msgid "" "The ``@property`` decorator turns the :meth:`!voltage` method into a " "\"getter\" for a read-only attribute with the same name, and it sets the " "docstring for *voltage* to \"Get the current voltage.\"" msgstr "" -#: ../../../library/functions.rst:1702 +#: ../../../library/functions.rst:1706 msgid "" "A property object has ``getter``, ``setter``, and ``deleter`` methods usable " "as decorators that create a copy of the property with the corresponding " @@ -2222,36 +2222,36 @@ msgid "" "with an example:" msgstr "" -#: ../../../library/functions.rst:1726 +#: ../../../library/functions.rst:1730 msgid "" "This code is exactly equivalent to the first example. Be sure to give the " "additional functions the same name as the original property (``x`` in this " "case.)" msgstr "" -#: ../../../library/functions.rst:1730 +#: ../../../library/functions.rst:1734 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." msgstr "" -#: ../../../library/functions.rst:1733 +#: ../../../library/functions.rst:1737 msgid "The docstrings of property objects are now writeable." msgstr "" -#: ../../../library/functions.rst:1738 +#: ../../../library/functions.rst:1742 msgid "" "Attribute holding the name of the property. The name of the property can be " "changed at runtime." msgstr "" -#: ../../../library/functions.rst:1749 +#: ../../../library/functions.rst:1753 msgid "" "Rather than being a function, :class:`range` is actually an immutable " "sequence type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." msgstr "" -#: ../../../library/functions.rst:1755 +#: ../../../library/functions.rst:1759 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 " @@ -2264,11 +2264,11 @@ msgid "" "raise :exc:`RuntimeError`." msgstr "" -#: ../../../library/functions.rst:1766 +#: ../../../library/functions.rst:1770 msgid "This class has a custom representation that can be evaluated::" msgstr "" -#: ../../../library/functions.rst:1779 +#: ../../../library/functions.rst:1783 msgid "" "Return a reverse :term:`iterator`. The argument must be an object which has " "a :meth:`~object.__reversed__` method or supports the sequence protocol " @@ -2276,14 +2276,14 @@ msgid "" "method with integer arguments starting at ``0``)." msgstr "" -#: ../../../library/functions.rst:1787 +#: ../../../library/functions.rst:1791 msgid "" "Return *number* rounded to *ndigits* precision after the decimal point. If " "*ndigits* is omitted or is ``None``, it returns the nearest integer to its " "input." msgstr "" -#: ../../../library/functions.rst:1791 +#: ../../../library/functions.rst:1795 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 " @@ -2294,13 +2294,13 @@ msgid "" "``None``. Otherwise, the return value has the same type as *number*." msgstr "" -#: ../../../library/functions.rst:1800 +#: ../../../library/functions.rst:1804 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." msgstr "" -#: ../../../library/functions.rst:1805 +#: ../../../library/functions.rst:1809 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 " @@ -2309,21 +2309,21 @@ msgid "" "information." msgstr "" -#: ../../../library/functions.rst:1816 +#: ../../../library/functions.rst:1820 msgid "" "Return a new :class:`set` object, optionally with elements taken from " "*iterable*. :class:`set` is a built-in class. See also :ref:`types-set` " "for documentation about this class." msgstr "" -#: ../../../library/functions.rst:1820 +#: ../../../library/functions.rst:1824 msgid "" "For other containers see the built-in :class:`frozenset`, :class:`list`, :" "class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` " "module." msgstr "" -#: ../../../library/functions.rst:1827 +#: ../../../library/functions.rst:1831 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 " @@ -2332,7 +2332,7 @@ msgid "" "is equivalent to ``x.foobar = 123``." msgstr "" -#: ../../../library/functions.rst:1833 +#: ../../../library/functions.rst:1837 msgid "" "*name* need not be a Python identifier as defined in :ref:`identifiers` " "unless the object chooses to enforce that, for example in a custom :meth:" @@ -2341,52 +2341,52 @@ msgid "" "notation, but is accessible through :func:`getattr` etc.." msgstr "" -#: ../../../library/functions.rst:1841 +#: ../../../library/functions.rst:1845 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:1849 +#: ../../../library/functions.rst:1853 msgid "" "Return a new unique sentinel object. *name* must be a :class:`str`, and is " "used by default as the returned object's representation::" msgstr "" -#: ../../../library/functions.rst:1856 +#: ../../../library/functions.rst:1860 msgid "" "The optional *repr* argument can be used to specify a different " "representation::" msgstr "" -#: ../../../library/functions.rst:1862 +#: ../../../library/functions.rst:1866 msgid "" "Sentinel objects are truthy and compare equal only to themselves. They are " "intended to be compared with the :keyword:`is` operator." msgstr "" -#: ../../../library/functions.rst:1865 +#: ../../../library/functions.rst:1869 msgid "``sentinel`` does not support subclassing." msgstr "" -#: ../../../library/functions.rst:1867 +#: ../../../library/functions.rst:1871 msgid "Shallow and deep copies of a sentinel object return the object itself." msgstr "" -#: ../../../library/functions.rst:1869 +#: ../../../library/functions.rst:1873 msgid "" "Sentinels are conventionally assigned to a variable with a matching name. " "Sentinels defined in this way can be used in :term:`type hints `::" msgstr "" -#: ../../../library/functions.rst:1877 +#: ../../../library/functions.rst:1881 msgid "" "Sentinel objects support the :ref:`| ` operator for use in type " "expressions." msgstr "" -#: ../../../library/functions.rst:1879 +#: ../../../library/functions.rst:1883 msgid "" ":mod:`Pickling ` is supported for sentinel objects that are placed " "in the global scope of a module under a name matching the sentinel's name, " @@ -2396,81 +2396,81 @@ msgid "" "preserved after pickling::" msgstr "" -#: ../../../library/functions.rst:1897 +#: ../../../library/functions.rst:1901 msgid "Sentinel objects have the following attributes:" msgstr "" -#: ../../../library/functions.rst:1901 +#: ../../../library/functions.rst:1905 msgid "The sentinel's name." msgstr "" -#: ../../../library/functions.rst:1905 +#: ../../../library/functions.rst:1909 msgid "" "The name of the module where the sentinel was created. This attribute is " "writable." msgstr "" -#: ../../../library/functions.rst:1913 +#: ../../../library/functions.rst:1917 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``." msgstr "" -#: ../../../library/functions.rst:1917 +#: ../../../library/functions.rst:1921 msgid "" "Slice objects are also generated when :ref:`slicing syntax ` is " "used. For example: ``a[start:stop:step]`` or ``a[start:stop, i]``." msgstr "" -#: ../../../library/functions.rst:1920 +#: ../../../library/functions.rst:1924 msgid "" "See :func:`itertools.islice` for an alternate version that returns an :term:" "`iterator`." msgstr "" -#: ../../../library/functions.rst:1927 +#: ../../../library/functions.rst:1931 msgid "" "These read-only attributes are set to the argument values (or their " "default). They have no other explicit functionality; however, they are used " "by NumPy and other third-party packages." msgstr "" -#: ../../../library/functions.rst:1931 +#: ../../../library/functions.rst:1935 msgid "" "Slice objects are now :term:`hashable` (provided :attr:`~slice.start`, :attr:" "`~slice.stop`, and :attr:`~slice.step` are hashable)." msgstr "" -#: ../../../library/functions.rst:1937 +#: ../../../library/functions.rst:1941 msgid "Return a new sorted list from the items in *iterable*." msgstr "" -#: ../../../library/functions.rst:1939 +#: ../../../library/functions.rst:1943 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "" -#: ../../../library/functions.rst:1941 +#: ../../../library/functions.rst:1945 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each element in *iterable* (for example, ``key=str." "lower``). The default value is ``None`` (compare the elements directly)." msgstr "" -#: ../../../library/functions.rst:1945 +#: ../../../library/functions.rst:1949 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." msgstr "" -#: ../../../library/functions.rst:1948 +#: ../../../library/functions.rst:1952 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." msgstr "" -#: ../../../library/functions.rst:1951 +#: ../../../library/functions.rst:1955 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 " @@ -2478,7 +2478,7 @@ msgid "" "example, sort by department, then by salary grade)." msgstr "" -#: ../../../library/functions.rst:1956 +#: ../../../library/functions.rst:1960 msgid "" "The sort algorithm uses only ``<`` comparisons between items. While " "defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " @@ -2490,28 +2490,28 @@ msgid "" "method." msgstr "" -#: ../../../library/functions.rst:1965 +#: ../../../library/functions.rst:1969 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../../library/functions.rst:1969 +#: ../../../library/functions.rst:1973 msgid "Transform a method into a static method." msgstr "" -#: ../../../library/functions.rst:1971 +#: ../../../library/functions.rst:1975 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" msgstr "" -#: ../../../library/functions.rst:1978 +#: ../../../library/functions.rst:1982 msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." msgstr "" -#: ../../../library/functions.rst:1981 +#: ../../../library/functions.rst:1985 msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " "an instance (such as ``C().f()``). Moreover, the static method :term:" @@ -2519,14 +2519,14 @@ msgid "" "(such as ``f()``)." msgstr "" -#: ../../../library/functions.rst:1986 +#: ../../../library/functions.rst:1990 msgid "" "Static methods in Python are similar to those found in Java or C++. Also, " "see :deco:`classmethod` for a variant that is useful for creating alternate " "class constructors." msgstr "" -#: ../../../library/functions.rst:1990 +#: ../../../library/functions.rst:1994 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 " @@ -2535,11 +2535,11 @@ msgid "" "cases, use this idiom::" msgstr "" -#: ../../../library/functions.rst:2002 +#: ../../../library/functions.rst:2006 msgid "For more information on static methods, see :ref:`types`." msgstr "" -#: ../../../library/functions.rst:2004 +#: ../../../library/functions.rst:2008 msgid "" "Static methods now inherit the method attributes (:attr:`~function." "__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :" @@ -2547,25 +2547,25 @@ msgid "" "``__wrapped__`` attribute, and are now callable as regular functions." msgstr "" -#: ../../../library/functions.rst:2022 +#: ../../../library/functions.rst:2026 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" -#: ../../../library/functions.rst:2024 +#: ../../../library/functions.rst:2028 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." msgstr "" -#: ../../../library/functions.rst:2030 +#: ../../../library/functions.rst:2034 msgid "" "Sums *start* and the items of an *iterable* from left to right and returns " "the total. The *iterable*'s items are normally numbers, and the start value " "is not allowed to be a string." msgstr "" -#: ../../../library/functions.rst:2034 +#: ../../../library/functions.rst:2038 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 ``''." @@ -2574,43 +2574,43 @@ msgid "" "using :func:`itertools.chain`." msgstr "" -#: ../../../library/functions.rst:2040 +#: ../../../library/functions.rst:2044 msgid "The *start* parameter can be specified as a keyword argument." msgstr "" -#: ../../../library/functions.rst:2043 +#: ../../../library/functions.rst:2047 msgid "" "Summation of floats switched to an algorithm that gives higher accuracy and " "better commutativity on most builds." msgstr "" -#: ../../../library/functions.rst:2046 +#: ../../../library/functions.rst:2050 msgid "" "Added specialization for summation of complexes, using same algorithm as for " "summation of floats." msgstr "" -#: ../../../library/functions.rst:2054 +#: ../../../library/functions.rst:2058 msgid "" "Return a proxy object that delegates method calls to a parent or sibling " "class of *type*. This is useful for accessing inherited methods that have " "been overridden in a class." msgstr "" -#: ../../../library/functions.rst:2058 +#: ../../../library/functions.rst:2062 msgid "" "The *object_or_type* determines the :term:`method resolution order` to be " "searched. The search starts from the class right after the *type*." msgstr "" -#: ../../../library/functions.rst:2062 +#: ../../../library/functions.rst:2066 msgid "" "For example, if :attr:`~type.__mro__` of *object_or_type* is ``D -> B -> C -" "> A -> object`` and the value of *type* is ``B``, then :func:`super` " "searches ``C -> A -> object``." msgstr "" -#: ../../../library/functions.rst:2066 +#: ../../../library/functions.rst:2070 msgid "" "The :attr:`~type.__mro__` attribute of the class corresponding to " "*object_or_type* lists the method resolution search order used by both :func:" @@ -2618,7 +2618,7 @@ msgid "" "whenever the inheritance hierarchy is updated." msgstr "" -#: ../../../library/functions.rst:2071 +#: ../../../library/functions.rst:2075 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. " @@ -2626,7 +2626,7 @@ msgid "" "(this is useful for classmethods)." msgstr "" -#: ../../../library/functions.rst:2076 +#: ../../../library/functions.rst:2080 msgid "" "When called directly within an ordinary method of a class, both arguments " "may be omitted (\"zero-argument :func:`!super`\"). In this case, *type* will " @@ -2636,7 +2636,7 @@ msgid "" "including generator expressions, which implicitly create nested functions.)" msgstr "" -#: ../../../library/functions.rst:2083 +#: ../../../library/functions.rst:2087 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 " @@ -2644,7 +2644,7 @@ msgid "" "closely parallels the use of *super* in other programming languages." msgstr "" -#: ../../../library/functions.rst:2088 +#: ../../../library/functions.rst:2092 msgid "" "The second use case is to support cooperative multiple inheritance in a " "dynamic execution environment. This use case is unique to Python and is not " @@ -2657,18 +2657,18 @@ msgid "" "classes that are unknown prior to runtime)." msgstr "" -#: ../../../library/functions.rst:2098 +#: ../../../library/functions.rst:2102 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" -#: ../../../library/functions.rst:2105 +#: ../../../library/functions.rst:2109 msgid "" "In addition to method lookups, :func:`super` also works for attribute " "lookups. One possible use case for this is calling :term:`descriptors " "` in a parent or sibling class." msgstr "" -#: ../../../library/functions.rst:2109 +#: ../../../library/functions.rst:2113 msgid "" "Note that :func:`super` is implemented as part of the binding process for " "explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " @@ -2678,7 +2678,7 @@ msgid "" "using statements or operators such as ``super()[name]``." msgstr "" -#: ../../../library/functions.rst:2117 +#: ../../../library/functions.rst:2121 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 " @@ -2688,39 +2688,39 @@ msgid "" "accessing the current instance for ordinary methods." msgstr "" -#: ../../../library/functions.rst:2124 +#: ../../../library/functions.rst:2128 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." msgstr "" -#: ../../../library/functions.rst:2128 +#: ../../../library/functions.rst:2132 msgid "" ":class:`super` objects are now :mod:`pickleable ` and :mod:" "`copyable `." msgstr "" -#: ../../../library/functions.rst:2137 +#: ../../../library/functions.rst:2141 msgid "" "Rather than being a function, :class:`tuple` is actually an immutable " "sequence type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." msgstr "" -#: ../../../library/functions.rst:2146 +#: ../../../library/functions.rst:2150 msgid "" "With one argument, return the type of an *object*. The return value is a " "type object and generally the same object as returned by :attr:`object." "__class__`." msgstr "" -#: ../../../library/functions.rst:2150 +#: ../../../library/functions.rst:2154 msgid "" "The :func:`isinstance` built-in function is recommended for testing the type " "of an object, because it takes subclasses into account." msgstr "" -#: ../../../library/functions.rst:2153 +#: ../../../library/functions.rst:2157 msgid "" "With three arguments, return a new type object. This is essentially a " "dynamic form of the :keyword:`class` statement. The *name* string is the " @@ -2733,21 +2733,21 @@ msgid "" "type` objects:" msgstr "" -#: ../../../library/functions.rst:2168 +#: ../../../library/functions.rst:2172 msgid "See also:" msgstr "" -#: ../../../library/functions.rst:2170 +#: ../../../library/functions.rst:2174 msgid "" ":ref:`Documentation on attributes and methods on classes `." msgstr "" -#: ../../../library/functions.rst:2171 +#: ../../../library/functions.rst:2175 msgid ":ref:`bltin-type-objects`" msgstr "" -#: ../../../library/functions.rst:2173 +#: ../../../library/functions.rst:2177 msgid "" "Keyword arguments provided to the three argument form are passed to the " "appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " @@ -2755,27 +2755,34 @@ msgid "" "would." msgstr "" -#: ../../../library/functions.rst:2178 +#: ../../../library/functions.rst:2182 +msgid "" +"Unlike a :keyword:`class` statement, the three argument form does not call " +"the metaclass ``__prepare__`` method (see :ref:`prepare`). Use :func:`types." +"new_class` to dynamically create a class using the appropriate metaclass." +msgstr "" + +#: ../../../library/functions.rst:2187 msgid "See also :ref:`class-customization`." msgstr "" -#: ../../../library/functions.rst:2180 +#: ../../../library/functions.rst:2189 msgid "" "Subclasses of :class:`!type` which don't override ``type.__new__`` may no " "longer use the one-argument form to get the type of an object." msgstr "" -#: ../../../library/functions.rst:2186 +#: ../../../library/functions.rst:2195 msgid "*dict* can now be a :class:`frozendict`." msgstr "" -#: ../../../library/functions.rst:2191 +#: ../../../library/functions.rst:2200 msgid "" "Return the :attr:`~object.__dict__` attribute for a module, class, instance, " "or any other object with a :attr:`!__dict__` attribute." msgstr "" -#: ../../../library/functions.rst:2194 +#: ../../../library/functions.rst:2203 msgid "" "Objects such as modules and instances have an updateable :attr:`~object." "__dict__` attribute; however, other objects may have write restrictions on " @@ -2783,54 +2790,54 @@ msgid "" "MappingProxyType` to prevent direct dictionary updates)." msgstr "" -#: ../../../library/functions.rst:2199 +#: ../../../library/functions.rst:2208 msgid "Without an argument, :func:`vars` acts like :func:`locals`." msgstr "" -#: ../../../library/functions.rst:2201 +#: ../../../library/functions.rst:2210 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:2207 +#: ../../../library/functions.rst:2216 msgid "" "The result of calling this function without an argument has been updated as " "described for the :func:`locals` builtin." msgstr "" -#: ../../../library/functions.rst:2213 +#: ../../../library/functions.rst:2222 msgid "" "Iterate over several iterables in parallel, producing tuples with an item " "from each one." msgstr "" -#: ../../../library/functions.rst:2216 +#: ../../../library/functions.rst:2225 msgid "Example::" msgstr "" -#: ../../../library/functions.rst:2225 +#: ../../../library/functions.rst:2234 msgid "" "More formally: :func:`zip` returns an iterator of tuples, where the *i*-th " "tuple contains the *i*-th element from each of the argument iterables." msgstr "" -#: ../../../library/functions.rst:2228 +#: ../../../library/functions.rst:2237 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:2232 +#: ../../../library/functions.rst:2241 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:2236 +#: ../../../library/functions.rst:2245 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 " @@ -2838,51 +2845,51 @@ msgid "" "approaches to dealing with this issue:" msgstr "" -#: ../../../library/functions.rst:2241 +#: ../../../library/functions.rst:2250 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:2248 +#: ../../../library/functions.rst:2257 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:2255 +#: ../../../library/functions.rst:2264 msgid "" "Unlike the default behavior, it raises a :exc:`ValueError` if one iterable " "is exhausted before the others:" msgstr "" -#: ../../../library/functions.rst:2273 +#: ../../../library/functions.rst:2282 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:2277 +#: ../../../library/functions.rst:2286 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:2281 +#: ../../../library/functions.rst:2290 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:2284 +#: ../../../library/functions.rst:2293 msgid "Tips and tricks:" msgstr "" -#: ../../../library/functions.rst:2286 +#: ../../../library/functions.rst:2295 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 " @@ -2891,23 +2898,23 @@ msgid "" "iterator. This has the effect of dividing the input into n-length chunks." msgstr "" -#: ../../../library/functions.rst:2292 +#: ../../../library/functions.rst:2301 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" msgstr "" -#: ../../../library/functions.rst:2303 +#: ../../../library/functions.rst:2312 msgid "Added the ``strict`` argument." msgstr "" -#: ../../../library/functions.rst:2315 +#: ../../../library/functions.rst:2324 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." msgstr "" -#: ../../../library/functions.rst:2318 +#: ../../../library/functions.rst:2327 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -2919,7 +2926,7 @@ msgid "" "discouraged in favor of :func:`importlib.import_module`." msgstr "" -#: ../../../library/functions.rst:2327 +#: ../../../library/functions.rst:2336 msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " @@ -2929,7 +2936,7 @@ msgid "" "determine the package context of the :keyword:`import` statement." msgstr "" -#: ../../../library/functions.rst:2334 +#: ../../../library/functions.rst:2343 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -2938,7 +2945,7 @@ msgid "" "details)." msgstr "" -#: ../../../library/functions.rst:2340 +#: ../../../library/functions.rst:2349 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 " @@ -2946,58 +2953,58 @@ msgid "" "given, the module named by *name* is returned." msgstr "" -#: ../../../library/functions.rst:2345 +#: ../../../library/functions.rst:2354 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" msgstr "" -#: ../../../library/functions.rst:2350 +#: ../../../library/functions.rst:2359 msgid "The statement ``import spam.ham`` results in this call::" msgstr "" -#: ../../../library/functions.rst:2354 +#: ../../../library/functions.rst:2363 msgid "" "Note how :func:`__import__` returns the toplevel module here because this is " "the object that is bound to a name by the :keyword:`import` statement." msgstr "" -#: ../../../library/functions.rst:2357 +#: ../../../library/functions.rst:2366 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" msgstr "" -#: ../../../library/functions.rst:2364 +#: ../../../library/functions.rst:2373 msgid "" "Here, the ``spam.ham`` module is returned from :func:`__import__`. From " "this object, the names to import are retrieved and assigned to their " "respective names." msgstr "" -#: ../../../library/functions.rst:2368 +#: ../../../library/functions.rst:2377 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." msgstr "" -#: ../../../library/functions.rst:2371 +#: ../../../library/functions.rst:2380 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." msgstr "" -#: ../../../library/functions.rst:2375 +#: ../../../library/functions.rst:2384 msgid "" "When the command line options :option:`-E` or :option:`-I` are being used, " "the environment variable :envvar:`PYTHONCASEOK` is now ignored." msgstr "" -#: ../../../library/functions.rst:2380 +#: ../../../library/functions.rst:2389 msgid "Footnotes" msgstr "" -#: ../../../library/functions.rst:2381 +#: ../../../library/functions.rst:2390 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 " @@ -3008,106 +3015,106 @@ msgstr "" msgid "Boolean" msgstr "" -#: ../../../library/functions.rst:158 ../../../library/functions.rst:2144 +#: ../../../library/functions.rst:158 ../../../library/functions.rst:2148 msgid "type" msgstr "" -#: ../../../library/functions.rst:670 +#: ../../../library/functions.rst:674 msgid "built-in function" msgstr "" -#: ../../../library/functions.rst:670 +#: ../../../library/functions.rst:674 msgid "exec" msgstr "" -#: ../../../library/functions.rst:773 +#: ../../../library/functions.rst:777 msgid "NaN" msgstr "" -#: ../../../library/functions.rst:773 +#: ../../../library/functions.rst:777 msgid "Infinity" msgstr "" -#: ../../../library/functions.rst:843 +#: ../../../library/functions.rst:847 msgid "__format__" msgstr "" -#: ../../../library/functions.rst:843 ../../../library/functions.rst:2012 +#: ../../../library/functions.rst:847 ../../../library/functions.rst:2016 msgid "string" msgstr "" -#: ../../../library/functions.rst:843 +#: ../../../library/functions.rst:847 msgid "format() (built-in function)" msgstr "" -#: ../../../library/functions.rst:1372 +#: ../../../library/functions.rst:1376 msgid "file object" msgstr "" -#: ../../../library/functions.rst:1372 ../../../library/functions.rst:1465 +#: ../../../library/functions.rst:1376 ../../../library/functions.rst:1469 msgid "open() built-in function" msgstr "" -#: ../../../library/functions.rst:1400 +#: ../../../library/functions.rst:1404 msgid "file" msgstr "" -#: ../../../library/functions.rst:1400 +#: ../../../library/functions.rst:1404 msgid "modes" msgstr "" -#: ../../../library/functions.rst:1465 +#: ../../../library/functions.rst:1469 msgid "universal newlines" msgstr "" -#: ../../../library/functions.rst:1526 +#: ../../../library/functions.rst:1530 msgid "line-buffered I/O" msgstr "" -#: ../../../library/functions.rst:1526 +#: ../../../library/functions.rst:1530 msgid "unbuffered I/O" msgstr "" -#: ../../../library/functions.rst:1526 +#: ../../../library/functions.rst:1530 msgid "buffer size, I/O" msgstr "" -#: ../../../library/functions.rst:1526 +#: ../../../library/functions.rst:1530 msgid "I/O control" msgstr "" -#: ../../../library/functions.rst:1526 +#: ../../../library/functions.rst:1530 msgid "buffering" msgstr "" -#: ../../../library/functions.rst:1526 +#: ../../../library/functions.rst:1530 msgid "text mode" msgstr "" -#: ../../../library/functions.rst:1526 ../../../library/functions.rst:2309 +#: ../../../library/functions.rst:1530 ../../../library/functions.rst:2318 msgid "module" msgstr "" -#: ../../../library/functions.rst:1526 +#: ../../../library/functions.rst:1530 msgid "sys" msgstr "" -#: ../../../library/functions.rst:2012 +#: ../../../library/functions.rst:2016 msgid "str() (built-in function)" msgstr "" -#: ../../../library/functions.rst:2144 +#: ../../../library/functions.rst:2148 msgid "object" msgstr "" -#: ../../../library/functions.rst:2309 +#: ../../../library/functions.rst:2318 msgid "statement" msgstr "" -#: ../../../library/functions.rst:2309 +#: ../../../library/functions.rst:2318 msgid "import" msgstr "" -#: ../../../library/functions.rst:2309 +#: ../../../library/functions.rst:2318 msgid "builtins" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/getopt.pot b/main/locale/pot/LC_MESSAGES/library/getopt.pot index 35c8c236ceb..b4a53ec2350 100644 --- a/main/locale/pot/LC_MESSAGES/library/getopt.pot +++ b/main/locale/pot/LC_MESSAGES/library/getopt.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-11 08:40+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -92,6 +92,11 @@ msgstr "" #: ../../../library/getopt.rst:65 msgid "" +"If *longopts* is a string it gets treated as a list of a single element." +msgstr "" + +#: ../../../library/getopt.rst:67 +msgid "" "The return value consists of two elements: the first is a list of ``(option, " "value)`` pairs; the second is the list of program arguments left after the " "option list was stripped (this is a trailing slice of *args*). Each option-" @@ -103,11 +108,11 @@ msgid "" "occurrences. Long and short options may be mixed." msgstr "" -#: ../../../library/getopt.rst:75 +#: ../../../library/getopt.rst:77 msgid "Optional arguments are supported." msgstr "" -#: ../../../library/getopt.rst:81 +#: ../../../library/getopt.rst:83 msgid "" "This function works like :func:`getopt`, except that GNU style scanning mode " "is used by default. This means that option and non-option arguments may be " @@ -115,14 +120,14 @@ msgid "" "a non-option argument is encountered." msgstr "" -#: ../../../library/getopt.rst:86 +#: ../../../library/getopt.rst:88 msgid "" "If the first character of the option string is ``'+'``, or if the " "environment variable :envvar:`!POSIXLY_CORRECT` is set, then option " "processing stops as soon as a non-option argument is encountered." msgstr "" -#: ../../../library/getopt.rst:90 +#: ../../../library/getopt.rst:92 msgid "" "If the first character of the option string is ``'-'``, non-option arguments " "that are followed by options are added to the list of option-and-value pairs " @@ -131,12 +136,12 @@ msgid "" "gnu_getopt` result is a list of program arguments after the last option." msgstr "" -#: ../../../library/getopt.rst:97 +#: ../../../library/getopt.rst:99 msgid "" "Support for returning intermixed options and non-option arguments in order." msgstr "" -#: ../../../library/getopt.rst:103 +#: ../../../library/getopt.rst:105 msgid "" "This is raised when an unrecognized option is found in the argument list or " "when an option requiring an argument is given none. The argument to the " @@ -147,62 +152,62 @@ msgid "" "which the exception relates, :attr:`!opt` is an empty string." msgstr "" -#: ../../../library/getopt.rst:114 +#: ../../../library/getopt.rst:116 msgid "Alias for :exc:`GetoptError`; for backward compatibility." msgstr "" -#: ../../../library/getopt.rst:116 +#: ../../../library/getopt.rst:118 msgid "An example using only Unix style options:" msgstr "" -#: ../../../library/getopt.rst:130 +#: ../../../library/getopt.rst:132 msgid "Using long option names is equally easy:" msgstr "" -#: ../../../library/getopt.rst:145 +#: ../../../library/getopt.rst:147 msgid "Optional arguments should be specified explicitly:" msgstr "" -#: ../../../library/getopt.rst:159 +#: ../../../library/getopt.rst:161 msgid "The order of options and non-option arguments can be preserved:" msgstr "" -#: ../../../library/getopt.rst:173 +#: ../../../library/getopt.rst:175 msgid "In a script, typical usage is something like this:" msgstr "" -#: ../../../library/getopt.rst:204 +#: ../../../library/getopt.rst:206 msgid "" "Note that an equivalent command line interface could be produced with less " "code and more informative help and error messages by using the :mod:" "`optparse` module:" msgstr "" -#: ../../../library/getopt.rst:218 +#: ../../../library/getopt.rst:220 msgid "" "A roughly equivalent command line interface for this case can also be " "produced by using the :mod:`argparse` module:" msgstr "" -#: ../../../library/getopt.rst:233 +#: ../../../library/getopt.rst:235 msgid "" "See :ref:`choosing-an-argument-parser` for details on how the ``argparse`` " "version of this code differs in behaviour from the ``optparse`` (and " "``getopt``) version." msgstr "" -#: ../../../library/getopt.rst:239 +#: ../../../library/getopt.rst:241 msgid "Module :mod:`optparse`" msgstr "" -#: ../../../library/getopt.rst:240 +#: ../../../library/getopt.rst:242 msgid "Declarative command line option parsing." msgstr "" -#: ../../../library/getopt.rst:242 +#: ../../../library/getopt.rst:244 msgid "Module :mod:`argparse`" msgstr "" -#: ../../../library/getopt.rst:243 +#: ../../../library/getopt.rst:245 msgid "More opinionated command line option and argument parsing library." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/glob.pot b/main/locale/pot/LC_MESSAGES/library/glob.pot index a3e3f4c3f4f..35e30c852d8 100644 --- a/main/locale/pot/LC_MESSAGES/library/glob.pot +++ b/main/locale/pot/LC_MESSAGES/library/glob.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-04-27 10:55+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -42,10 +42,10 @@ msgstr "" #: ../../../library/glob.rst:32 msgid "" -"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`." +"By default, 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:38 @@ -94,115 +94,115 @@ msgstr "" #: ../../../library/glob.rst:73 msgid "" -"If *include_hidden* is true, \"``**``\" pattern will match hidden " -"directories." +"If *include_hidden* is true, wildcards can match path segments that begin " +"with a dot (``.``)." msgstr "" -#: ../../../library/glob.rst:75 ../../../library/glob.rst:107 +#: ../../../library/glob.rst:76 ../../../library/glob.rst:108 msgid "" "Raises an :ref:`auditing event ` ``glob.glob`` with arguments " "``pathname``, ``recursive``." msgstr "" -#: ../../../library/glob.rst:76 ../../../library/glob.rst:108 +#: ../../../library/glob.rst:77 ../../../library/glob.rst:109 msgid "" "Raises an :ref:`auditing event ` ``glob.glob/2`` with arguments " "``pathname``, ``recursive``, ``root_dir``, ``dir_fd``." msgstr "" -#: ../../../library/glob.rst:79 +#: ../../../library/glob.rst:80 msgid "" "Using the \"``**``\" pattern in large directory trees may consume an " "inordinate amount of time." msgstr "" -#: ../../../library/glob.rst:83 ../../../library/glob.rst:111 +#: ../../../library/glob.rst:84 ../../../library/glob.rst:112 msgid "" "This function may return duplicate path names if *pathname* contains " "multiple \"``**``\" patterns and *recursive* is true." msgstr "" -#: ../../../library/glob.rst:87 ../../../library/glob.rst:115 +#: ../../../library/glob.rst:88 ../../../library/glob.rst:116 msgid "" "Any :exc:`OSError` exceptions raised from scanning the filesystem are " "suppressed. This includes :exc:`PermissionError` when accessing directories " "without read permission." msgstr "" -#: ../../../library/glob.rst:91 ../../../library/glob.rst:119 +#: ../../../library/glob.rst:92 ../../../library/glob.rst:120 msgid "Support for recursive globs using \"``**``\"." msgstr "" -#: ../../../library/glob.rst:94 ../../../library/glob.rst:122 +#: ../../../library/glob.rst:95 ../../../library/glob.rst:123 msgid "Added the *root_dir* and *dir_fd* parameters." msgstr "" -#: ../../../library/glob.rst:97 ../../../library/glob.rst:125 +#: ../../../library/glob.rst:98 ../../../library/glob.rst:126 msgid "Added the *include_hidden* parameter." msgstr "" -#: ../../../library/glob.rst:104 +#: ../../../library/glob.rst:105 msgid "" "Return an :term:`iterator` which yields the same values as :func:`glob` " "without actually storing them all simultaneously." msgstr "" -#: ../../../library/glob.rst:131 +#: ../../../library/glob.rst:132 msgid "" "Escape all special characters (``'?'``, ``'*'`` and ``'['``). This is useful " "if you want to match an arbitrary literal string that may have special " "characters in it. Special characters in drive/UNC sharepoints are not " -"escaped, e.g. on Windows ``escape('//?/c:/Quo vadis?.txt')`` returns ``'//?/" -"c:/Quo vadis[?].txt'``." +"escaped, for example on Windows ``escape('//?/c:/Quo vadis?.txt')`` returns " +"``'//?/c:/Quo vadis[?].txt'``." msgstr "" -#: ../../../library/glob.rst:142 +#: ../../../library/glob.rst:143 msgid "" "Convert the given path specification to a regular expression for use with :" "func:`re.prefixmatch`. The path specification can contain shell-style " "wildcards." msgstr "" -#: ../../../library/glob.rst:146 +#: ../../../library/glob.rst:147 msgid "For example:" msgstr "" -#: ../../../library/glob.rst:157 +#: ../../../library/glob.rst:158 msgid "" "Path separators and segments are meaningful to this function, unlike :func:" "`fnmatch.translate`. By default wildcards do not match path separators, and " "``*`` pattern segments match precisely one path segment." msgstr "" -#: ../../../library/glob.rst:161 +#: ../../../library/glob.rst:162 msgid "" "If *recursive* is true, the pattern segment \"``**``\" will match any number " "of path segments." msgstr "" -#: ../../../library/glob.rst:164 +#: ../../../library/glob.rst:165 msgid "" "If *include_hidden* is true, wildcards can match path segments that start " "with a dot (``.``)." msgstr "" -#: ../../../library/glob.rst:167 +#: ../../../library/glob.rst:168 msgid "" "A sequence of path separators may be supplied to the *seps* argument. If not " "given, :data:`os.sep` and :data:`~os.altsep` (if available) are used." msgstr "" -#: ../../../library/glob.rst:172 +#: ../../../library/glob.rst:173 msgid "" ":meth:`pathlib.PurePath.full_match` and :meth:`pathlib.Path.glob` methods, " "which call this function to implement pattern matching and globbing." msgstr "" -#: ../../../library/glob.rst:180 +#: ../../../library/glob.rst:181 msgid "Examples" msgstr "" -#: ../../../library/glob.rst:182 +#: ../../../library/glob.rst:183 msgid "" "Consider a directory containing the following files: :file:`1.gif`, :file:`2." "txt`, :file:`card.gif` and a subdirectory :file:`sub` which contains only " @@ -210,19 +210,19 @@ msgid "" "Notice how any leading components of the path are preserved. ::" msgstr "" -#: ../../../library/glob.rst:200 +#: ../../../library/glob.rst:201 msgid "" "If the directory contains files starting with ``.`` they won't be matched by " "default. For example, consider a directory containing :file:`card.gif` and :" "file:`.card.gif`::" msgstr "" -#: ../../../library/glob.rst:211 +#: ../../../library/glob.rst:212 msgid "" "The :mod:`fnmatch` module offers shell-style filename (not path) expansion." msgstr "" -#: ../../../library/glob.rst:214 +#: ../../../library/glob.rst:215 msgid "The :mod:`pathlib` module offers high-level path objects." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/hashlib.pot b/main/locale/pot/LC_MESSAGES/library/hashlib.pot index 033097eab69..32513a4cb91 100644 --- a/main/locale/pot/LC_MESSAGES/library/hashlib.pot +++ b/main/locale/pot/LC_MESSAGES/library/hashlib.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -66,15 +66,22 @@ msgstr "" #: ../../../library/hashlib.rst:52 msgid "" "Constructors for hash algorithms that are always present in this module are :" -"func:`sha1`, :func:`sha224`, :func:`sha256`, :func:`sha384`, :func:" -"`sha512`, :func:`sha3_224`, :func:`sha3_256`, :func:`sha3_384`, :func:" +"func:`md5`, :func:`sha1`, :func:`sha224`, :func:`sha256`, :func:`sha384`, :" +"func:`sha512`, :func:`sha3_224`, :func:`sha3_256`, :func:`sha3_384`, :func:" "`sha3_512`, :func:`shake_128`, :func:`shake_256`, :func:`blake2b`, and :func:" -"`blake2s`. :func:`md5` is normally available as well, though it may be " -"missing or blocked if you are using a rare \"FIPS compliant\" build of " -"Python. These correspond to :data:`algorithms_guaranteed`." +"`blake2s`. These correspond to :data:`algorithms_guaranteed`." msgstr "" -#: ../../../library/hashlib.rst:60 +#: ../../../library/hashlib.rst:58 +msgid "" +"Any of these may nonetheless be missing or blocked in unusual environments, " +"such as a rare \"FIPS compliant\" build of Python or when OpenSSL's \"FIPS " +"mode\" is configured to exclude some algorithms from its default provider. " +"Calling the constructor of an algorithm that is unavailable raises :exc:" +"`ValueError`." +msgstr "" + +#: ../../../library/hashlib.rst:63 msgid "" "Additional algorithms may also be available if your Python distribution's :" "mod:`!hashlib` was linked against a build of OpenSSL that provides others. " @@ -82,21 +89,21 @@ msgid "" "accessible by name via :func:`new`. See :data:`algorithms_available`." msgstr "" -#: ../../../library/hashlib.rst:67 +#: ../../../library/hashlib.rst:70 msgid "" "Some algorithms have known hash collision weaknesses (including MD5 and " "SHA1). Refer to `Attacks on cryptographic hash algorithms`_ and the `hashlib-" "seealso`_ section at the end of this document." msgstr "" -#: ../../../library/hashlib.rst:71 +#: ../../../library/hashlib.rst:74 msgid "" "SHA3 (Keccak) and SHAKE constructors :func:`sha3_224`, :func:`sha3_256`, :" "func:`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:`shake_256` were " "added. :func:`blake2b` and :func:`blake2s` were added." msgstr "" -#: ../../../library/hashlib.rst:79 +#: ../../../library/hashlib.rst:82 msgid "" "All hashlib constructors take a keyword-only argument *usedforsecurity* with " "default value ``True``. A false value allows the use of insecure and blocked " @@ -105,18 +112,18 @@ msgid "" "cryptographic one-way compression function." msgstr "" -#: ../../../library/hashlib.rst:86 +#: ../../../library/hashlib.rst:89 msgid "Hashlib now uses SHA3 and SHAKE from OpenSSL if it provides it." msgstr "" -#: ../../../library/hashlib.rst:89 +#: ../../../library/hashlib.rst:92 msgid "" "For any of the MD5, SHA1, SHA2, or SHA3 algorithms that the linked OpenSSL " "does not provide we fall back to a verified implementation from the `HACL\\* " "project`_." msgstr "" -#: ../../../library/hashlib.rst:94 +#: ../../../library/hashlib.rst:97 msgid "" "The undocumented ``string`` keyword parameter in :func:`!_hashlib.new` and " "hash-named constructors such as :func:`!_md5.md5` is deprecated. Prefer " @@ -124,25 +131,25 @@ msgid "" "compatibility." msgstr "" -#: ../../../library/hashlib.rst:102 +#: ../../../library/hashlib.rst:105 msgid "Usage" msgstr "" -#: ../../../library/hashlib.rst:104 +#: ../../../library/hashlib.rst:107 msgid "" "To obtain the digest of the byte string ``b\"Nobody inspects the spammish " "repetition\"``::" msgstr "" -#: ../../../library/hashlib.rst:116 +#: ../../../library/hashlib.rst:119 msgid "More condensed:" msgstr "" -#: ../../../library/hashlib.rst:122 +#: ../../../library/hashlib.rst:125 msgid "Constructors" msgstr "" -#: ../../../library/hashlib.rst:126 +#: ../../../library/hashlib.rst:129 msgid "" "Is a generic constructor that takes the string *name* of the desired " "algorithm as its first parameter. It also exists to allow access to the " @@ -150,25 +157,25 @@ msgid "" "library may offer." msgstr "" -#: ../../../library/hashlib.rst:131 +#: ../../../library/hashlib.rst:134 msgid "Using :func:`new` with an algorithm name:" msgstr "" -#: ../../../library/hashlib.rst:150 +#: ../../../library/hashlib.rst:153 msgid "" "Named constructors such as these are faster than passing an algorithm name " "to :func:`new`." msgstr "" -#: ../../../library/hashlib.rst:154 +#: ../../../library/hashlib.rst:157 msgid "Attributes" msgstr "" -#: ../../../library/hashlib.rst:156 +#: ../../../library/hashlib.rst:159 msgid "Hashlib provides the following constant module attributes:" msgstr "" -#: ../../../library/hashlib.rst:160 +#: ../../../library/hashlib.rst:163 msgid "" "A set containing the names of the hash algorithms guaranteed to be supported " "by this module on all platforms. Note that 'md5' is in this list despite " @@ -176,7 +183,7 @@ msgid "" "excludes it." msgstr "" -#: ../../../library/hashlib.rst:169 +#: ../../../library/hashlib.rst:172 msgid "" "A set containing the names of the hash algorithms that are available in the " "running Python interpreter. These names will be recognized when passed to :" @@ -185,77 +192,77 @@ msgid "" "(thanks to OpenSSL)." msgstr "" -#: ../../../library/hashlib.rst:178 +#: ../../../library/hashlib.rst:181 msgid "Hash Objects" msgstr "" -#: ../../../library/hashlib.rst:180 +#: ../../../library/hashlib.rst:183 msgid "" "The following values are provided as constant attributes of the hash objects " "returned by the constructors:" msgstr "" -#: ../../../library/hashlib.rst:185 +#: ../../../library/hashlib.rst:188 msgid "The size of the resulting hash in bytes." msgstr "" -#: ../../../library/hashlib.rst:189 +#: ../../../library/hashlib.rst:192 msgid "The internal block size of the hash algorithm in bytes." msgstr "" -#: ../../../library/hashlib.rst:191 +#: ../../../library/hashlib.rst:194 msgid "A hash object has the following attributes:" msgstr "" -#: ../../../library/hashlib.rst:195 +#: ../../../library/hashlib.rst:198 msgid "" "The canonical name of this hash, always lowercase and always suitable as a " "parameter to :func:`new` to create another hash of this type." msgstr "" -#: ../../../library/hashlib.rst:198 +#: ../../../library/hashlib.rst:201 msgid "" "The name attribute has been present in CPython since its inception, but " "until Python 3.4 was not formally specified, so may not exist on some " "platforms." msgstr "" -#: ../../../library/hashlib.rst:203 +#: ../../../library/hashlib.rst:206 msgid "A hash object has the following methods:" msgstr "" -#: ../../../library/hashlib.rst:208 +#: ../../../library/hashlib.rst:211 msgid "" "Update the hash object with the :term:`bytes-like object`. Repeated calls " "are equivalent to a single call with the concatenation of all the arguments: " "``m.update(a); m.update(b)`` is equivalent to ``m.update(a+b)``." msgstr "" -#: ../../../library/hashlib.rst:216 +#: ../../../library/hashlib.rst:219 msgid "" "Return the digest of the data passed to the :meth:`update` method so far. " "This is a bytes object of size :attr:`digest_size` which may contain bytes " "in the whole range from 0 to 255." msgstr "" -#: ../../../library/hashlib.rst:223 +#: ../../../library/hashlib.rst:226 msgid "" "Like :meth:`digest` except the digest is returned as a string object of " "double length, containing only hexadecimal digits. This may be used to " "exchange the value safely in email or other non-binary environments." msgstr "" -#: ../../../library/hashlib.rst:230 +#: ../../../library/hashlib.rst:233 msgid "" "Return a copy (\"clone\") of the hash object. This can be used to " "efficiently compute the digests of data sharing a common initial substring." msgstr "" -#: ../../../library/hashlib.rst:235 +#: ../../../library/hashlib.rst:238 msgid "SHAKE variable length digests" msgstr "" -#: ../../../library/hashlib.rst:240 +#: ../../../library/hashlib.rst:243 msgid "" "The :func:`shake_128` and :func:`shake_256` algorithms provide variable " "length digests with length_in_bits//2 up to 128 or 256 bits of security. As " @@ -263,40 +270,40 @@ msgid "" "by the SHAKE algorithm." msgstr "" -#: ../../../library/hashlib.rst:247 +#: ../../../library/hashlib.rst:250 msgid "" "Return the digest of the data passed to the :meth:`~hash.update` method so " "far. This is a bytes object of size *length* which may contain bytes in the " "whole range from 0 to 255." msgstr "" -#: ../../../library/hashlib.rst:254 +#: ../../../library/hashlib.rst:257 msgid "" "Like :meth:`digest` except the digest is returned as a string object of " "double length, containing only hexadecimal digits. This may be used to " "exchange the value in email or other non-binary environments." msgstr "" -#: ../../../library/hashlib.rst:258 +#: ../../../library/hashlib.rst:261 msgid "Example use:" msgstr "" -#: ../../../library/hashlib.rst:265 +#: ../../../library/hashlib.rst:268 msgid "File hashing" msgstr "" -#: ../../../library/hashlib.rst:267 +#: ../../../library/hashlib.rst:270 msgid "" "The hashlib module provides a helper function for efficient hashing of a " "file or file-like object." msgstr "" -#: ../../../library/hashlib.rst:272 +#: ../../../library/hashlib.rst:275 msgid "" "Return a digest object that has been updated with contents of file object." msgstr "" -#: ../../../library/hashlib.rst:274 +#: ../../../library/hashlib.rst:277 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` " @@ -305,7 +312,7 @@ msgid "" "`BlockingIOError` may be raised." msgstr "" -#: ../../../library/hashlib.rst:280 +#: ../../../library/hashlib.rst:283 msgid "" "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 " @@ -313,27 +320,27 @@ msgid "" "*fileobj*." msgstr "" -#: ../../../library/hashlib.rst:285 +#: ../../../library/hashlib.rst:288 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:288 +#: ../../../library/hashlib.rst:291 msgid "Example:" msgstr "" -#: ../../../library/hashlib.rst:309 +#: ../../../library/hashlib.rst:312 msgid "" "Now raises a :exc:`BlockingIOError` if the file is opened in non-blocking " "mode. Previously, spurious null bytes were added to the digest." msgstr "" -#: ../../../library/hashlib.rst:315 +#: ../../../library/hashlib.rst:318 msgid "Key derivation" msgstr "" -#: ../../../library/hashlib.rst:317 +#: ../../../library/hashlib.rst:320 msgid "" "Key derivation and key stretching algorithms are designed for secure " "password hashing. Naive algorithms such as ``sha1(password)`` are not " @@ -342,13 +349,13 @@ msgid "" "Salt_%28cryptography%29>`_." msgstr "" -#: ../../../library/hashlib.rst:325 +#: ../../../library/hashlib.rst:328 msgid "" "The function provides PKCS#5 password-based key derivation function 2. It " "uses HMAC as pseudorandom function." msgstr "" -#: ../../../library/hashlib.rst:328 +#: ../../../library/hashlib.rst:331 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 " @@ -357,7 +364,7 @@ msgid "" "proper source, e.g. :func:`os.urandom`." msgstr "" -#: ../../../library/hashlib.rst:334 +#: ../../../library/hashlib.rst:337 msgid "" "The number of *iterations* should be chosen based on the hash algorithm and " "computing power. As of 2022, hundreds of thousands of iterations of SHA-256 " @@ -366,30 +373,30 @@ msgid "" "the `stackexchange pbkdf2 iterations question`_ explain in detail." msgstr "" -#: ../../../library/hashlib.rst:340 +#: ../../../library/hashlib.rst:343 msgid "" "*dklen* is the length of the derived key in bytes. If *dklen* is ``None`` " "then the digest size of the hash algorithm *hash_name* is used, e.g. 64 for " "SHA-512." msgstr "" -#: ../../../library/hashlib.rst:349 +#: ../../../library/hashlib.rst:352 msgid "Function only available when Python is compiled with OpenSSL." msgstr "" -#: ../../../library/hashlib.rst:353 +#: ../../../library/hashlib.rst:356 msgid "" "Function now only available when Python is built with OpenSSL. The slow pure " "Python implementation has been removed." msgstr "" -#: ../../../library/hashlib.rst:359 +#: ../../../library/hashlib.rst:362 msgid "" "The function provides scrypt password-based key derivation function as " "defined in :rfc:`7914`." msgstr "" -#: ../../../library/hashlib.rst:362 +#: ../../../library/hashlib.rst:365 msgid "" "*password* and *salt* must be :term:`bytes-like objects `. Applications and libraries should limit *password* to a sensible " @@ -397,138 +404,138 @@ msgid "" "source, e.g. :func:`os.urandom`." msgstr "" -#: ../../../library/hashlib.rst:367 +#: ../../../library/hashlib.rst:370 msgid "" "*n* is the CPU/Memory cost factor, *r* the block size, *p* parallelization " "factor and *maxmem* limits memory (OpenSSL 1.1.0 defaults to 32 MiB). " "*dklen* is the length of the derived key in bytes." msgstr "" -#: ../../../library/hashlib.rst:377 +#: ../../../library/hashlib.rst:380 msgid "BLAKE2" msgstr "" -#: ../../../library/hashlib.rst:382 +#: ../../../library/hashlib.rst:385 msgid "" "BLAKE2_ is a cryptographic hash function defined in :rfc:`7693` that comes " "in two flavors:" msgstr "" -#: ../../../library/hashlib.rst:385 +#: ../../../library/hashlib.rst:388 msgid "" "**BLAKE2b**, optimized for 64-bit platforms and produces digests of any size " "between 1 and 64 bytes," msgstr "" -#: ../../../library/hashlib.rst:388 +#: ../../../library/hashlib.rst:391 msgid "" "**BLAKE2s**, optimized for 8- to 32-bit platforms and produces digests of " "any size between 1 and 32 bytes." msgstr "" -#: ../../../library/hashlib.rst:391 +#: ../../../library/hashlib.rst:394 msgid "" "BLAKE2 supports **keyed mode** (a faster and simpler replacement for HMAC_), " "**salted hashing**, **personalization**, and **tree hashing**." msgstr "" -#: ../../../library/hashlib.rst:394 +#: ../../../library/hashlib.rst:397 msgid "" "Hash objects from this module follow the API of standard library's :mod:`!" "hashlib` objects." msgstr "" -#: ../../../library/hashlib.rst:399 +#: ../../../library/hashlib.rst:402 msgid "Creating hash objects" msgstr "" -#: ../../../library/hashlib.rst:401 +#: ../../../library/hashlib.rst:404 msgid "New hash objects are created by calling constructor functions:" msgstr "" -#: ../../../library/hashlib.rst:415 +#: ../../../library/hashlib.rst:418 msgid "" "These functions return the corresponding hash objects for calculating " "BLAKE2b or BLAKE2s. They optionally take these general parameters:" msgstr "" -#: ../../../library/hashlib.rst:418 +#: ../../../library/hashlib.rst:421 msgid "" "*data*: initial chunk of data to hash, which must be :term:`bytes-like " "object`. It can be passed only as positional argument." msgstr "" -#: ../../../library/hashlib.rst:421 +#: ../../../library/hashlib.rst:424 msgid "*digest_size*: size of output digest in bytes." msgstr "" -#: ../../../library/hashlib.rst:423 +#: ../../../library/hashlib.rst:426 msgid "" "*key*: key for keyed hashing (up to 64 bytes for BLAKE2b, up to 32 bytes for " "BLAKE2s)." msgstr "" -#: ../../../library/hashlib.rst:426 +#: ../../../library/hashlib.rst:429 msgid "" "*salt*: salt for randomized hashing (up to 16 bytes for BLAKE2b, up to 8 " "bytes for BLAKE2s)." msgstr "" -#: ../../../library/hashlib.rst:429 +#: ../../../library/hashlib.rst:432 msgid "" "*person*: personalization string (up to 16 bytes for BLAKE2b, up to 8 bytes " "for BLAKE2s)." msgstr "" -#: ../../../library/hashlib.rst:432 +#: ../../../library/hashlib.rst:435 msgid "The following table shows limits for general parameters (in bytes):" msgstr "" -#: ../../../library/hashlib.rst:435 +#: ../../../library/hashlib.rst:438 msgid "Hash" msgstr "" -#: ../../../library/hashlib.rst:435 +#: ../../../library/hashlib.rst:438 msgid "digest_size" msgstr "" -#: ../../../library/hashlib.rst:435 +#: ../../../library/hashlib.rst:438 msgid "len(key)" msgstr "" -#: ../../../library/hashlib.rst:435 +#: ../../../library/hashlib.rst:438 msgid "len(salt)" msgstr "" -#: ../../../library/hashlib.rst:435 +#: ../../../library/hashlib.rst:438 msgid "len(person)" msgstr "" -#: ../../../library/hashlib.rst:437 +#: ../../../library/hashlib.rst:440 msgid "BLAKE2b" msgstr "" -#: ../../../library/hashlib.rst:437 +#: ../../../library/hashlib.rst:440 msgid "64" msgstr "" -#: ../../../library/hashlib.rst:437 +#: ../../../library/hashlib.rst:440 msgid "16" msgstr "" -#: ../../../library/hashlib.rst:438 +#: ../../../library/hashlib.rst:441 msgid "BLAKE2s" msgstr "" -#: ../../../library/hashlib.rst:438 +#: ../../../library/hashlib.rst:441 msgid "32" msgstr "" -#: ../../../library/hashlib.rst:438 +#: ../../../library/hashlib.rst:441 msgid "8" msgstr "" -#: ../../../library/hashlib.rst:443 +#: ../../../library/hashlib.rst:446 msgid "" "BLAKE2 specification defines constant lengths for salt and personalization " "parameters, however, for convenience, this implementation accepts byte " @@ -538,94 +545,94 @@ msgid "" "the case for *key*.)" msgstr "" -#: ../../../library/hashlib.rst:450 +#: ../../../library/hashlib.rst:453 msgid "These sizes are available as module `constants`_ described below." msgstr "" -#: ../../../library/hashlib.rst:452 +#: ../../../library/hashlib.rst:455 msgid "" "Constructor functions also accept the following tree hashing parameters:" msgstr "" -#: ../../../library/hashlib.rst:454 +#: ../../../library/hashlib.rst:457 msgid "*fanout*: fanout (0 to 255, 0 if unlimited, 1 in sequential mode)." msgstr "" -#: ../../../library/hashlib.rst:456 +#: ../../../library/hashlib.rst:459 msgid "" "*depth*: maximal depth of tree (1 to 255, 255 if unlimited, 1 in sequential " "mode)." msgstr "" -#: ../../../library/hashlib.rst:459 +#: ../../../library/hashlib.rst:462 msgid "" "*leaf_size*: maximal byte length of leaf (0 to ``2**32-1``, 0 if unlimited " "or in sequential mode)." msgstr "" -#: ../../../library/hashlib.rst:462 +#: ../../../library/hashlib.rst:465 msgid "" "*node_offset*: node offset (0 to ``2**64-1`` for BLAKE2b, 0 to ``2**48-1`` " "for BLAKE2s, 0 for the first, leftmost, leaf, or in sequential mode)." msgstr "" -#: ../../../library/hashlib.rst:465 +#: ../../../library/hashlib.rst:468 msgid "" "*node_depth*: node depth (0 to 255, 0 for leaves, or in sequential mode)." msgstr "" -#: ../../../library/hashlib.rst:467 +#: ../../../library/hashlib.rst:470 msgid "" "*inner_size*: inner digest size (0 to 64 for BLAKE2b, 0 to 32 for BLAKE2s, 0 " "in sequential mode)." msgstr "" -#: ../../../library/hashlib.rst:470 +#: ../../../library/hashlib.rst:473 msgid "" "*last_node*: boolean indicating whether the processed node is the last one " "(``False`` for sequential mode)." msgstr "" -#: ../../../library/hashlib.rst:473 +#: ../../../library/hashlib.rst:476 msgid "Explanation of tree mode parameters." msgstr "" -#: ../../../library/hashlib.rst:477 +#: ../../../library/hashlib.rst:480 msgid "" "See section 2.10 in `BLAKE2 specification `_ for comprehensive review of tree hashing." msgstr "" -#: ../../../library/hashlib.rst:483 +#: ../../../library/hashlib.rst:486 msgid "Constants" msgstr "" -#: ../../../library/hashlib.rst:488 +#: ../../../library/hashlib.rst:491 msgid "Salt length (maximum length accepted by constructors)." msgstr "" -#: ../../../library/hashlib.rst:494 +#: ../../../library/hashlib.rst:497 msgid "" "Personalization string length (maximum length accepted by constructors)." msgstr "" -#: ../../../library/hashlib.rst:500 +#: ../../../library/hashlib.rst:503 msgid "Maximum key size." msgstr "" -#: ../../../library/hashlib.rst:506 +#: ../../../library/hashlib.rst:509 msgid "Maximum digest size that the hash function can output." msgstr "" -#: ../../../library/hashlib.rst:510 +#: ../../../library/hashlib.rst:513 msgid "Examples" msgstr "" -#: ../../../library/hashlib.rst:513 +#: ../../../library/hashlib.rst:516 msgid "Simple hashing" msgstr "" -#: ../../../library/hashlib.rst:515 +#: ../../../library/hashlib.rst:518 msgid "" "To calculate hash of some data, you should first construct a hash object by " "calling the appropriate constructor function (:func:`blake2b` or :func:" @@ -634,41 +641,41 @@ msgid "" "`~hash.digest` (or :meth:`~hash.hexdigest` for hex-encoded string)." msgstr "" -#: ../../../library/hashlib.rst:528 +#: ../../../library/hashlib.rst:531 msgid "" "As a shortcut, you can pass the first chunk of data to update directly to " "the constructor as the positional argument:" msgstr "" -#: ../../../library/hashlib.rst:535 +#: ../../../library/hashlib.rst:538 msgid "" "You can call :meth:`hash.update` as many times as you need to iteratively " "update the hash:" msgstr "" -#: ../../../library/hashlib.rst:549 +#: ../../../library/hashlib.rst:552 msgid "Using different digest sizes" msgstr "" -#: ../../../library/hashlib.rst:551 +#: ../../../library/hashlib.rst:554 msgid "" "BLAKE2 has configurable size of digests up to 64 bytes for BLAKE2b and up to " "32 bytes for BLAKE2s. For example, to replace SHA-1 with BLAKE2b without " "changing the size of output, we can tell BLAKE2b to produce 20-byte digests:" msgstr "" -#: ../../../library/hashlib.rst:565 +#: ../../../library/hashlib.rst:568 msgid "" "Hash objects with different digest sizes have completely different outputs " "(shorter hashes are *not* prefixes of longer hashes); BLAKE2b and BLAKE2s " "produce different outputs even if the output length is the same:" msgstr "" -#: ../../../library/hashlib.rst:581 +#: ../../../library/hashlib.rst:584 msgid "Keyed hashing" msgstr "" -#: ../../../library/hashlib.rst:583 +#: ../../../library/hashlib.rst:586 msgid "" "Keyed hashing can be used for authentication as a faster and simpler " "replacement for `Hash-based message authentication code `_)" msgstr "" -#: ../../../library/hashlib.rst:667 +#: ../../../library/hashlib.rst:670 msgid "" "In BLAKE2 the salt is processed as a one-time input to the hash function " "during initialization, rather than as an input to each compression function." msgstr "" -#: ../../../library/hashlib.rst:672 +#: ../../../library/hashlib.rst:675 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 " @@ -746,18 +753,18 @@ msgid "" "information." msgstr "" -#: ../../../library/hashlib.rst:695 +#: ../../../library/hashlib.rst:698 msgid "Personalization" msgstr "" -#: ../../../library/hashlib.rst:697 +#: ../../../library/hashlib.rst:700 msgid "" "Sometimes it is useful to force hash function to produce different digests " "for the same input for different purposes. Quoting the authors of the Skein " "hash function:" msgstr "" -#: ../../../library/hashlib.rst:701 +#: ../../../library/hashlib.rst:704 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 " @@ -767,41 +774,41 @@ msgid "" "hash function used in the protocol summarily stops this type of attack." msgstr "" -#: ../../../library/hashlib.rst:708 +#: ../../../library/hashlib.rst:711 msgid "" "(`The Skein Hash Function Family `_, p. 21)" msgstr "" -#: ../../../library/hashlib.rst:712 +#: ../../../library/hashlib.rst:715 msgid "BLAKE2 can be personalized by passing bytes to the *person* argument::" msgstr "" -#: ../../../library/hashlib.rst:726 +#: ../../../library/hashlib.rst:729 msgid "" "Personalization together with the keyed mode can also be used to derive " "different keys from a single one." msgstr "" -#: ../../../library/hashlib.rst:740 +#: ../../../library/hashlib.rst:743 msgid "Tree mode" msgstr "" -#: ../../../library/hashlib.rst:742 +#: ../../../library/hashlib.rst:745 msgid "Here's an example of hashing a minimal tree with two leaf nodes::" msgstr "" -#: ../../../library/hashlib.rst:748 +#: ../../../library/hashlib.rst:751 msgid "" "This example uses 64-byte internal digests, and returns the 32-byte final " "digest::" msgstr "" -#: ../../../library/hashlib.rst:778 +#: ../../../library/hashlib.rst:781 msgid "Credits" msgstr "" -#: ../../../library/hashlib.rst:780 +#: ../../../library/hashlib.rst:783 msgid "" "BLAKE2_ was designed by *Jean-Philippe Aumasson*, *Samuel Neves*, *Zooko " "Wilcox-O'Hearn*, and *Christian Winnerlein* based on SHA-3_ finalist BLAKE_ " @@ -809,118 +816,118 @@ msgid "" "*Raphael C.-W. Phan*." msgstr "" -#: ../../../library/hashlib.rst:785 +#: ../../../library/hashlib.rst:788 msgid "" "It uses core algorithm from ChaCha_ cipher designed by *Daniel J. " "Bernstein*." msgstr "" -#: ../../../library/hashlib.rst:787 +#: ../../../library/hashlib.rst:790 msgid "" "The stdlib implementation is based on pyblake2_ module. It was written by " "*Dmitry Chestnykh* based on C implementation written by *Samuel Neves*. The " "documentation was copied from pyblake2_ and written by *Dmitry Chestnykh*." msgstr "" -#: ../../../library/hashlib.rst:791 +#: ../../../library/hashlib.rst:794 msgid "The C code was partly rewritten for Python by *Christian Heimes*." msgstr "" -#: ../../../library/hashlib.rst:793 +#: ../../../library/hashlib.rst:796 msgid "" "The following public domain dedication applies for both C hash function " "implementation, extension code, and this documentation:" msgstr "" -#: ../../../library/hashlib.rst:796 +#: ../../../library/hashlib.rst:799 msgid "" "To the extent possible under law, the author(s) have dedicated all copyright " "and related and neighboring rights to this software to the public domain " "worldwide. This software is distributed without any warranty." msgstr "" -#: ../../../library/hashlib.rst:800 +#: ../../../library/hashlib.rst:803 msgid "" "You should have received a copy of the CC0 Public Domain Dedication along " "with this software. If not, see https://creativecommons.org/publicdomain/" "zero/1.0/." msgstr "" -#: ../../../library/hashlib.rst:804 +#: ../../../library/hashlib.rst:807 msgid "" "The following people have helped with development or contributed their " "changes to the project and the public domain according to the Creative " "Commons Public Domain Dedication 1.0 Universal:" msgstr "" -#: ../../../library/hashlib.rst:808 +#: ../../../library/hashlib.rst:811 msgid "*Alexandr Sokolovskiy*" msgstr "" -#: ../../../library/hashlib.rst:829 +#: ../../../library/hashlib.rst:832 msgid "Module :mod:`hmac`" msgstr "" -#: ../../../library/hashlib.rst:830 +#: ../../../library/hashlib.rst:833 msgid "A module to generate message authentication codes using hashes." msgstr "" -#: ../../../library/hashlib.rst:832 +#: ../../../library/hashlib.rst:835 msgid "Module :mod:`base64`" msgstr "" -#: ../../../library/hashlib.rst:833 +#: ../../../library/hashlib.rst:836 msgid "Another way to encode binary hashes for non-binary environments." msgstr "" -#: ../../../library/hashlib.rst:835 +#: ../../../library/hashlib.rst:838 msgid "https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.180-4.pdf" msgstr "" -#: ../../../library/hashlib.rst:836 +#: ../../../library/hashlib.rst:839 msgid "The FIPS 180-4 publication on Secure Hash Algorithms." msgstr "" -#: ../../../library/hashlib.rst:838 +#: ../../../library/hashlib.rst:841 msgid "https://csrc.nist.gov/pubs/fips/202/final" msgstr "" -#: ../../../library/hashlib.rst:839 +#: ../../../library/hashlib.rst:842 msgid "The FIPS 202 publication on the SHA-3 Standard." msgstr "" -#: ../../../library/hashlib.rst:841 +#: ../../../library/hashlib.rst:844 msgid "https://www.blake2.net/" msgstr "" -#: ../../../library/hashlib.rst:842 +#: ../../../library/hashlib.rst:845 msgid "Official BLAKE2 website." msgstr "" -#: ../../../library/hashlib.rst:844 +#: ../../../library/hashlib.rst:847 msgid "https://en.wikipedia.org/wiki/Cryptographic_hash_function" msgstr "" -#: ../../../library/hashlib.rst:845 +#: ../../../library/hashlib.rst:848 msgid "" "Wikipedia article with information on which algorithms have known issues and " "what that means regarding their use." msgstr "" -#: ../../../library/hashlib.rst:848 +#: ../../../library/hashlib.rst:851 msgid "https://www.ietf.org/rfc/rfc8018.txt" msgstr "" -#: ../../../library/hashlib.rst:849 +#: ../../../library/hashlib.rst:852 msgid "PKCS #5: Password-Based Cryptography Specification Version 2.1" msgstr "" -#: ../../../library/hashlib.rst:851 +#: ../../../library/hashlib.rst:854 msgid "" "https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf" msgstr "" -#: ../../../library/hashlib.rst:852 +#: ../../../library/hashlib.rst:855 msgid "NIST Recommendation for Password-Based Key Derivation." msgstr "" @@ -942,6 +949,6 @@ msgstr "" msgid "(use in module hashlib)" msgstr "" -#: ../../../library/hashlib.rst:379 +#: ../../../library/hashlib.rst:382 msgid "blake2b, blake2s" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/http.client.pot b/main/locale/pot/LC_MESSAGES/library/http.client.pot index e064fc662f9..71f9212f54c 100644 --- a/main/locale/pot/LC_MESSAGES/library/http.client.pot +++ b/main/locale/pot/LC_MESSAGES/library/http.client.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-15 08:48+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -473,17 +473,17 @@ msgstr "" msgid "" "The maximum number of allowed response headers to help prevent denial-of-" "service attacks. By default, the maximum number of allowed headers is set to " -"100." +"100. The same limit applies to the trailer section of a chunked response." msgstr "" -#: ../../../library/http.client.rst:440 +#: ../../../library/http.client.rst:441 msgid "" "As an alternative to using the :meth:`~HTTPConnection.request` method " "described above, you can also send your request step by step, by using the " "four functions below." msgstr "" -#: ../../../library/http.client.rst:447 +#: ../../../library/http.client.rst:448 msgid "" "This should be the first call after the connection to the server has been " "made. It sends a line to the server consisting of the *method* string, the " @@ -493,7 +493,7 @@ msgid "" "with non-False values." msgstr "" -#: ../../../library/http.client.rst:457 +#: ../../../library/http.client.rst:458 msgid "" "Send an :rfc:`822`\\ -style header to the server. It sends a line to the " "server consisting of the header, a colon and a space, and the first " @@ -501,14 +501,14 @@ msgid "" "consisting of a tab and an argument." msgstr "" -#: ../../../library/http.client.rst:465 +#: ../../../library/http.client.rst:466 msgid "" "Send a blank line to the server, signalling the end of the headers. The " "optional *message_body* argument can be used to pass a message body " "associated with the request." msgstr "" -#: ../../../library/http.client.rst:469 +#: ../../../library/http.client.rst:470 msgid "" "If *encode_chunked* is ``True``, the result of each iteration of " "*message_body* will be chunk-encoded as specified in :rfc:`7230`, Section " @@ -521,7 +521,7 @@ msgid "" "the chunk-encoded data immediately after *message_body*." msgstr "" -#: ../../../library/http.client.rst:480 +#: ../../../library/http.client.rst:481 msgid "" "Due to the chunked encoding specification, empty chunks yielded by an " "iterator body will be ignored by the chunk-encoder. This is to avoid " @@ -529,50 +529,50 @@ msgid "" "malformed encoding." msgstr "" -#: ../../../library/http.client.rst:485 +#: ../../../library/http.client.rst:486 msgid "Added chunked encoding support and the *encode_chunked* parameter." msgstr "" -#: ../../../library/http.client.rst:491 +#: ../../../library/http.client.rst:492 msgid "" "Send data to the server. This should be used directly only after the :meth:" "`endheaders` method has been called and before :meth:`getresponse` is called." msgstr "" -#: ../../../library/http.client.rst:495 +#: ../../../library/http.client.rst:496 msgid "" "Raises an :ref:`auditing event ` ``http.client.send`` with " "arguments ``self``, ``data``." msgstr "" -#: ../../../library/http.client.rst:501 +#: ../../../library/http.client.rst:502 msgid "HTTPResponse Objects" msgstr "" -#: ../../../library/http.client.rst:503 +#: ../../../library/http.client.rst:504 msgid "" "An :class:`HTTPResponse` instance wraps the HTTP response from the server. " "It provides access to the request headers and the entity body. The response " "is an iterable object and can be used in a with statement." msgstr "" -#: ../../../library/http.client.rst:508 +#: ../../../library/http.client.rst:509 msgid "" "The :class:`io.BufferedIOBase` interface is now implemented and all of its " "reader operations are supported." msgstr "" -#: ../../../library/http.client.rst:515 +#: ../../../library/http.client.rst:516 msgid "Reads and returns the response body, or up to the next *amt* bytes." msgstr "" -#: ../../../library/http.client.rst:519 +#: ../../../library/http.client.rst:520 msgid "" "Reads up to the next len(b) bytes of the response body into the buffer *b*. " "Returns the number of bytes read." msgstr "" -#: ../../../library/http.client.rst:526 +#: ../../../library/http.client.rst:527 msgid "" "Return the value of the header *name*, or *default* if there is no header " "matching *name*. If there is more than one header with the name *name*, " @@ -580,87 +580,87 @@ msgid "" "than a single string, its elements are similarly returned joined by commas." msgstr "" -#: ../../../library/http.client.rst:533 +#: ../../../library/http.client.rst:534 msgid "Return a list of (header, value) tuples." msgstr "" -#: ../../../library/http.client.rst:537 +#: ../../../library/http.client.rst:538 msgid "Return the ``fileno`` of the underlying socket." msgstr "" -#: ../../../library/http.client.rst:541 +#: ../../../library/http.client.rst:542 msgid "" "A :class:`http.client.HTTPMessage` instance containing the response " "headers. :class:`http.client.HTTPMessage` is a subclass of :class:`email." "message.Message`." msgstr "" -#: ../../../library/http.client.rst:547 +#: ../../../library/http.client.rst:548 msgid "" "HTTP protocol version used by server. 10 for HTTP/1.0, 11 for HTTP/1.1." msgstr "" -#: ../../../library/http.client.rst:551 +#: ../../../library/http.client.rst:552 msgid "" "URL of the resource retrieved, commonly used to determine if a redirect was " "followed." msgstr "" -#: ../../../library/http.client.rst:555 +#: ../../../library/http.client.rst:556 msgid "" "Headers of the response in the form of an :class:`email.message." "EmailMessage` instance." msgstr "" -#: ../../../library/http.client.rst:559 +#: ../../../library/http.client.rst:560 msgid "Status code returned by server." msgstr "" -#: ../../../library/http.client.rst:563 +#: ../../../library/http.client.rst:564 msgid "Reason phrase returned by server." msgstr "" -#: ../../../library/http.client.rst:567 +#: ../../../library/http.client.rst:568 msgid "" "A debugging hook. If :attr:`debuglevel` is greater than zero, messages will " "be printed to stdout as the response is read and parsed." msgstr "" -#: ../../../library/http.client.rst:572 +#: ../../../library/http.client.rst:573 msgid "Is ``True`` if the stream is closed." msgstr "" -#: ../../../library/http.client.rst:576 +#: ../../../library/http.client.rst:577 msgid "Deprecated in favor of :attr:`~HTTPResponse.url`." msgstr "" -#: ../../../library/http.client.rst:581 +#: ../../../library/http.client.rst:582 msgid "Deprecated in favor of :attr:`~HTTPResponse.headers`." msgstr "" -#: ../../../library/http.client.rst:586 +#: ../../../library/http.client.rst:587 msgid "Deprecated in favor of :attr:`~HTTPResponse.status`." msgstr "" -#: ../../../library/http.client.rst:590 +#: ../../../library/http.client.rst:591 msgid "Examples" msgstr "" -#: ../../../library/http.client.rst:592 +#: ../../../library/http.client.rst:593 msgid "Here is an example session that uses the ``GET`` method::" msgstr "" -#: ../../../library/http.client.rst:617 +#: ../../../library/http.client.rst:618 msgid "" "Here is an example session that uses the ``HEAD`` method. Note that the " "``HEAD`` method never returns any data. ::" msgstr "" -#: ../../../library/http.client.rst:632 +#: ../../../library/http.client.rst:633 msgid "Here is an example session that uses the ``POST`` method::" msgstr "" -#: ../../../library/http.client.rst:648 +#: ../../../library/http.client.rst:649 msgid "" "Client side HTTP ``PUT`` requests are very similar to ``POST`` requests. The " "difference lies only on the server side where HTTP servers will allow " @@ -670,11 +670,11 @@ msgid "" "``PUT`` method::" msgstr "" -#: ../../../library/http.client.rst:669 +#: ../../../library/http.client.rst:670 msgid "HTTPMessage Objects" msgstr "" -#: ../../../library/http.client.rst:673 +#: ../../../library/http.client.rst:674 msgid "" "An :class:`http.client.HTTPMessage` instance holds the headers from an HTTP " "response. It is implemented using the :class:`email.message.Message` class." diff --git a/main/locale/pot/LC_MESSAGES/library/http.cookiejar.pot b/main/locale/pot/LC_MESSAGES/library/http.cookiejar.pot index 92c92f30221..f0af7dcdfd9 100644 --- a/main/locale/pot/LC_MESSAGES/library/http.cookiejar.pot +++ b/main/locale/pot/LC_MESSAGES/library/http.cookiejar.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -50,9 +50,9 @@ msgstr "" #: ../../../library/http.cookiejar.rst:28 msgid "" "The various named parameters found in :mailheader:`Set-Cookie` and :" -"mailheader:`Set-Cookie2` headers (eg. ``domain`` and ``expires``) are " -"conventionally referred to as :dfn:`attributes`. To distinguish them from " -"Python attributes, the documentation for this module uses the term :dfn:" +"mailheader:`Set-Cookie2` headers (for example, ``domain`` and ``expires``) " +"are conventionally referred to as :dfn:`attributes`. To distinguish them " +"from Python attributes, the documentation for this module uses the term :dfn:" "`cookie-attribute` instead." msgstr "" @@ -109,7 +109,7 @@ msgid "" msgstr "" #: ../../../library/http.cookiejar.rst:75 -#: ../../../library/http.cookiejar.rst:348 +#: ../../../library/http.cookiejar.rst:360 msgid "The filename parameter supports a :term:`path-like object`." msgstr "" @@ -123,8 +123,8 @@ msgstr "" msgid "" "Constructor arguments should be passed as keyword arguments only. " "*blocked_domains* is a sequence of domain names that we never accept cookies " -"from, nor return cookies to. *allowed_domains* if not :const:`None`, this is " -"a sequence of the only domains for which we accept and return cookies. " +"from, nor return cookies to. *allowed_domains* if not ``None``, this is a " +"sequence of the only domains for which we accept and return cookies. " "*secure_protocols* is a sequence of protocols for which secure cookies can " "be added to. By default *https* and *wss* (secure websocket) are considered " "secure protocols. For all other arguments, see the documentation for :class:" @@ -134,22 +134,22 @@ msgstr "" #: ../../../library/http.cookiejar.rst:95 msgid "" ":class:`DefaultCookiePolicy` implements the standard accept / reject rules " -"for Netscape and :rfc:`2965` cookies. By default, :rfc:`2109` cookies (ie. " -"cookies received in a :mailheader:`Set-Cookie` header with a version cookie-" -"attribute of 1) are treated according to the RFC 2965 rules. However, if " -"RFC 2965 handling is turned off or :attr:`rfc2109_as_netscape` is ``True``, " -"RFC 2109 cookies are 'downgraded' by the :class:`CookieJar` instance to " -"Netscape cookies, by setting the :attr:`version` attribute of the :class:" -"`Cookie` instance to 0. :class:`DefaultCookiePolicy` also provides some " -"parameters to allow some fine-tuning of policy." +"for Netscape and :rfc:`2965` cookies. By default, :rfc:`2109` cookies (that " +"is, cookies received in a :mailheader:`Set-Cookie` header with a version " +"cookie-attribute of 1) are treated according to the RFC 2965 rules. " +"However, if RFC 2965 handling is turned off or :attr:`rfc2109_as_netscape` " +"is ``True``, RFC 2109 cookies are 'downgraded' by the :class:`CookieJar` " +"instance to Netscape cookies, by setting the :attr:`~Cookie.version` " +"attribute of the :class:`Cookie` instance to 0. :class:`DefaultCookiePolicy` " +"also provides some parameters to allow some fine-tuning of policy." msgstr "" #: ../../../library/http.cookiejar.rst:108 msgid "" "This class represents Netscape, :rfc:`2109` and :rfc:`2965` cookies. It is " "not expected that users of :mod:`!http.cookiejar` construct their own :class:" -"`Cookie` instances. Instead, if necessary, call :meth:`make_cookies` on a :" -"class:`CookieJar` instance." +"`Cookie` instances. Instead, if necessary, call :meth:`~CookieJar." +"make_cookies` on a :class:`CookieJar` instance." msgstr "" #: ../../../library/http.cookiejar.rst:116 @@ -213,7 +213,7 @@ msgid ":rfc:`2964` - Use of HTTP State Management" msgstr "" #: ../../../library/http.cookiejar.rst:145 -msgid "CookieJar and FileCookieJar Objects" +msgid "CookieJar and FileCookieJar objects" msgstr "" #: ../../../library/http.cookiejar.rst:147 @@ -232,35 +232,39 @@ msgstr "" #: ../../../library/http.cookiejar.rst:157 msgid "" -"If policy allows (ie. the :attr:`rfc2965` and :attr:`hide_cookie2` " -"attributes of the :class:`CookieJar`'s :class:`CookiePolicy` instance are " -"true and false respectively), the :mailheader:`Cookie2` header is also added " -"when appropriate." +"If policy allows (that is, the :attr:`~CookiePolicy.rfc2965` and :attr:" +"`~CookiePolicy.hide_cookie2` attributes of the :class:`CookieJar`'s :class:" +"`CookiePolicy` instance are true and false respectively), the :mailheader:" +"`Cookie2` header is also added when appropriate." msgstr "" -#: ../../../library/http.cookiejar.rst:161 +#: ../../../library/http.cookiejar.rst:162 msgid "" "The *request* object (usually a :class:`urllib.request.Request` instance) " -"must support the methods :meth:`get_full_url`, :meth:`has_header`, :meth:" -"`get_header`, :meth:`header_items`, :meth:`add_unredirected_header` and the " -"attributes :attr:`host`, :attr:`!type`, :attr:`unverifiable` and :attr:" -"`origin_req_host` as documented by :mod:`urllib.request`." +"must support the methods :meth:`~urllib.request.Request.get_full_url`, :meth:" +"`~urllib.request.Request.has_header`, :meth:`~urllib.request.Request." +"get_header`, :meth:`~urllib.request.Request.header_items`, :meth:`~urllib." +"request.Request.add_unredirected_header` and the attributes :attr:`~urllib." +"request.Request.host`, :attr:`~urllib.request.Request.type`, :attr:`~urllib." +"request.Request.unverifiable` and :attr:`~urllib.request.Request." +"origin_req_host` as documented by :mod:`urllib.request`." msgstr "" -#: ../../../library/http.cookiejar.rst:169 -#: ../../../library/http.cookiejar.rst:195 +#: ../../../library/http.cookiejar.rst:175 +#: ../../../library/http.cookiejar.rst:205 msgid "" -"*request* object needs :attr:`origin_req_host` attribute. Dependency on a " -"deprecated method :meth:`get_origin_req_host` has been removed." +"*request* object needs :attr:`~urllib.request.Request.origin_req_host` " +"attribute. Dependency on a deprecated method :meth:`!get_origin_req_host` " +"has been removed." msgstr "" -#: ../../../library/http.cookiejar.rst:175 +#: ../../../library/http.cookiejar.rst:182 msgid "" "Extract cookies from HTTP *response* and store them in the :class:" "`CookieJar`, where allowed by policy." msgstr "" -#: ../../../library/http.cookiejar.rst:178 +#: ../../../library/http.cookiejar.rst:185 msgid "" "The :class:`CookieJar` will look for allowable :mailheader:`Set-Cookie` and :" "mailheader:`Set-Cookie2` headers in the *response* argument, and store " @@ -268,52 +272,54 @@ msgid "" "approval)." msgstr "" -#: ../../../library/http.cookiejar.rst:182 +#: ../../../library/http.cookiejar.rst:189 msgid "" "The *response* object (usually the result of a call to :meth:`urllib.request." -"urlopen`, or similar) should support an :meth:`info` method, which returns " -"an :class:`email.message.Message` instance." +"urlopen`, or similar) should support an :meth:`~http.client.HTTPResponse." +"info` method, which returns an :class:`email.message.Message` instance." msgstr "" -#: ../../../library/http.cookiejar.rst:186 +#: ../../../library/http.cookiejar.rst:194 msgid "" "The *request* object (usually a :class:`urllib.request.Request` instance) " -"must support the method :meth:`get_full_url` and the attributes :attr:" -"`host`, :attr:`unverifiable` and :attr:`origin_req_host`, as documented by :" -"mod:`urllib.request`. The request is used to set default values for cookie-" -"attributes as well as for checking that the cookie is allowed to be set." +"must support the method :meth:`~urllib.request.Request.get_full_url` and the " +"attributes :attr:`~urllib.request.Request.host`, :attr:`~urllib.request." +"Request.unverifiable` and :attr:`~urllib.request.Request.origin_req_host`, " +"as documented by :mod:`urllib.request`. The request is used to set default " +"values for cookie-attributes as well as for checking that the cookie is " +"allowed to be set." msgstr "" -#: ../../../library/http.cookiejar.rst:200 +#: ../../../library/http.cookiejar.rst:211 msgid "Set the :class:`CookiePolicy` instance to be used." msgstr "" -#: ../../../library/http.cookiejar.rst:205 +#: ../../../library/http.cookiejar.rst:216 msgid "" "Return sequence of :class:`Cookie` objects extracted from *response* object." msgstr "" -#: ../../../library/http.cookiejar.rst:207 +#: ../../../library/http.cookiejar.rst:218 msgid "" "See the documentation for :meth:`extract_cookies` for the interfaces " "required of the *response* and *request* arguments." msgstr "" -#: ../../../library/http.cookiejar.rst:213 +#: ../../../library/http.cookiejar.rst:224 msgid "Set a :class:`Cookie` if policy says it's OK to do so." msgstr "" -#: ../../../library/http.cookiejar.rst:218 +#: ../../../library/http.cookiejar.rst:229 msgid "" "Set a :class:`Cookie`, without checking with policy to see whether or not it " "should be set." msgstr "" -#: ../../../library/http.cookiejar.rst:224 +#: ../../../library/http.cookiejar.rst:235 msgid "Clear some cookies." msgstr "" -#: ../../../library/http.cookiejar.rst:226 +#: ../../../library/http.cookiejar.rst:237 msgid "" "If invoked without arguments, clear all cookies. If given a single " "argument, only cookies belonging to that *domain* will be removed. If given " @@ -322,108 +328,108 @@ msgid "" "*domain*, *path* and *name* is removed." msgstr "" -#: ../../../library/http.cookiejar.rst:232 +#: ../../../library/http.cookiejar.rst:243 msgid "Raises :exc:`KeyError` if no matching cookie exists." msgstr "" -#: ../../../library/http.cookiejar.rst:237 +#: ../../../library/http.cookiejar.rst:248 msgid "Discard all session cookies." msgstr "" -#: ../../../library/http.cookiejar.rst:239 +#: ../../../library/http.cookiejar.rst:250 msgid "" -"Discards all contained cookies that have a true :attr:`discard` attribute " -"(usually because they had either no ``max-age`` or ``expires`` cookie-" -"attribute, or an explicit ``discard`` cookie-attribute). For interactive " -"browsers, the end of a session usually corresponds to closing the browser " -"window." +"Discards all contained cookies that have a true :attr:`~Cookie.discard` " +"attribute (usually because they had either no ``max-age`` or ``expires`` " +"cookie-attribute, or an explicit ``discard`` cookie-attribute). For " +"interactive browsers, the end of a session usually corresponds to closing " +"the browser window." msgstr "" -#: ../../../library/http.cookiejar.rst:244 +#: ../../../library/http.cookiejar.rst:255 msgid "" -"Note that the :meth:`save` method won't save session cookies anyway, unless " -"you ask otherwise by passing a true *ignore_discard* argument." +"Note that the :meth:`~FileCookieJar.save` method won't save session cookies " +"anyway, unless you ask otherwise by passing a true *ignore_discard* argument." msgstr "" -#: ../../../library/http.cookiejar.rst:247 +#: ../../../library/http.cookiejar.rst:258 msgid ":class:`FileCookieJar` implements the following additional methods:" msgstr "" -#: ../../../library/http.cookiejar.rst:252 +#: ../../../library/http.cookiejar.rst:263 msgid "Save cookies to a file." msgstr "" -#: ../../../library/http.cookiejar.rst:254 +#: ../../../library/http.cookiejar.rst:265 msgid "" "This base class raises :exc:`NotImplementedError`. Subclasses may leave " "this method unimplemented." msgstr "" -#: ../../../library/http.cookiejar.rst:257 +#: ../../../library/http.cookiejar.rst:268 msgid "" "*filename* is the name of file in which to save cookies. If *filename* is " -"not specified, :attr:`self.filename` is used (whose default is the value " -"passed to the constructor, if any); if :attr:`self.filename` is :const:" -"`None`, :exc:`ValueError` is raised." +"not specified, :attr:`self.filename ` is used (whose " +"default is the value passed to the constructor, if any); if :attr:`self." +"filename ` is ``None``, :exc:`ValueError` is raised." msgstr "" -#: ../../../library/http.cookiejar.rst:262 +#: ../../../library/http.cookiejar.rst:274 msgid "" "*ignore_discard*: save even cookies set to be discarded. *ignore_expires*: " "save even cookies that have expired" msgstr "" -#: ../../../library/http.cookiejar.rst:265 +#: ../../../library/http.cookiejar.rst:277 msgid "" "The file is overwritten if it already exists, thus wiping all the cookies it " "contains. Saved cookies can be restored later using the :meth:`load` or :" "meth:`revert` methods." msgstr "" -#: ../../../library/http.cookiejar.rst:272 +#: ../../../library/http.cookiejar.rst:284 msgid "Load cookies from a file." msgstr "" -#: ../../../library/http.cookiejar.rst:274 +#: ../../../library/http.cookiejar.rst:286 msgid "Old cookies are kept unless overwritten by newly loaded ones." msgstr "" -#: ../../../library/http.cookiejar.rst:276 +#: ../../../library/http.cookiejar.rst:288 msgid "Arguments are as for :meth:`save`." msgstr "" -#: ../../../library/http.cookiejar.rst:278 +#: ../../../library/http.cookiejar.rst:290 msgid "" "The named file must be in the format understood by the class, or :exc:" "`LoadError` will be raised. Also, :exc:`OSError` may be raised, for example " "if the file does not exist." msgstr "" -#: ../../../library/http.cookiejar.rst:282 +#: ../../../library/http.cookiejar.rst:294 msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "" -#: ../../../library/http.cookiejar.rst:288 +#: ../../../library/http.cookiejar.rst:300 msgid "Clear all cookies and reload cookies from a saved file." msgstr "" -#: ../../../library/http.cookiejar.rst:290 +#: ../../../library/http.cookiejar.rst:302 msgid "" ":meth:`revert` can raise the same exceptions as :meth:`load`. If there is a " "failure, the object's state will not be altered." msgstr "" -#: ../../../library/http.cookiejar.rst:293 +#: ../../../library/http.cookiejar.rst:305 msgid ":class:`FileCookieJar` instances have the following public attributes:" msgstr "" -#: ../../../library/http.cookiejar.rst:298 +#: ../../../library/http.cookiejar.rst:310 msgid "" "Filename of default file in which to keep cookies. This attribute may be " "assigned to." msgstr "" -#: ../../../library/http.cookiejar.rst:304 +#: ../../../library/http.cookiejar.rst:316 msgid "" "If true, load cookies lazily from disk. This attribute should not be " "assigned to. This is only a hint, since this only affects performance, not " @@ -432,43 +438,43 @@ msgid "" "in the standard library lazily loads cookies." msgstr "" -#: ../../../library/http.cookiejar.rst:314 +#: ../../../library/http.cookiejar.rst:326 msgid "FileCookieJar subclasses and co-operation with web browsers" msgstr "" -#: ../../../library/http.cookiejar.rst:316 +#: ../../../library/http.cookiejar.rst:328 msgid "" "The following :class:`CookieJar` subclasses are provided for reading and " "writing." msgstr "" -#: ../../../library/http.cookiejar.rst:321 +#: ../../../library/http.cookiejar.rst:333 msgid "" "A :class:`FileCookieJar` that can load from and save cookies to disk in the " "Mozilla ``cookies.txt`` file format (which is also used by curl and the Lynx " "and Netscape browsers)." msgstr "" -#: ../../../library/http.cookiejar.rst:327 +#: ../../../library/http.cookiejar.rst:339 msgid "" "This loses information about :rfc:`2965` cookies, and also about newer or " "non-standard cookie-attributes such as ``port``." msgstr "" -#: ../../../library/http.cookiejar.rst:332 +#: ../../../library/http.cookiejar.rst:344 msgid "" "Back up your cookies before saving if you have cookies whose loss / " "corruption would be inconvenient (there are some subtleties which may lead " "to slight changes in the file over a load / save round-trip)." msgstr "" -#: ../../../library/http.cookiejar.rst:336 +#: ../../../library/http.cookiejar.rst:348 msgid "" "Also note that cookies saved while Mozilla is running will get clobbered by " "Mozilla." msgstr "" -#: ../../../library/http.cookiejar.rst:342 +#: ../../../library/http.cookiejar.rst:354 msgid "" "A :class:`FileCookieJar` that can load from and save cookies to disk in " "format compatible with the libwww-perl library's ``Set-Cookie3`` file " @@ -476,47 +482,47 @@ msgid "" "file." msgstr "" -#: ../../../library/http.cookiejar.rst:353 -msgid "CookiePolicy Objects" +#: ../../../library/http.cookiejar.rst:365 +msgid "CookiePolicy objects" msgstr "" -#: ../../../library/http.cookiejar.rst:355 +#: ../../../library/http.cookiejar.rst:367 msgid "" "Objects implementing the :class:`CookiePolicy` interface have the following " "methods:" msgstr "" -#: ../../../library/http.cookiejar.rst:361 +#: ../../../library/http.cookiejar.rst:373 msgid "" "Return boolean value indicating whether cookie should be accepted from " "server." msgstr "" -#: ../../../library/http.cookiejar.rst:363 +#: ../../../library/http.cookiejar.rst:375 msgid "" "*cookie* is a :class:`Cookie` instance. *request* is an object implementing " "the interface defined by the documentation for :meth:`CookieJar." "extract_cookies`." msgstr "" -#: ../../../library/http.cookiejar.rst:370 +#: ../../../library/http.cookiejar.rst:382 msgid "" "Return boolean value indicating whether cookie should be returned to server." msgstr "" -#: ../../../library/http.cookiejar.rst:372 +#: ../../../library/http.cookiejar.rst:384 msgid "" "*cookie* is a :class:`Cookie` instance. *request* is an object implementing " "the interface defined by the documentation for :meth:`CookieJar." "add_cookie_header`." msgstr "" -#: ../../../library/http.cookiejar.rst:379 +#: ../../../library/http.cookiejar.rst:391 msgid "" "Return ``False`` if cookies should not be returned, given cookie domain." msgstr "" -#: ../../../library/http.cookiejar.rst:381 +#: ../../../library/http.cookiejar.rst:393 msgid "" "This method is an optimization. It removes the need for checking every " "cookie with a particular domain (which might involve reading many files). " @@ -524,7 +530,7 @@ msgid "" "leaves all the work to :meth:`return_ok`." msgstr "" -#: ../../../library/http.cookiejar.rst:386 +#: ../../../library/http.cookiejar.rst:398 msgid "" "If :meth:`domain_return_ok` returns true for the cookie domain, :meth:" "`path_return_ok` is called for the cookie path. Otherwise, :meth:" @@ -534,7 +540,7 @@ msgid "" "`return_ok` is never called for that cookie path." msgstr "" -#: ../../../library/http.cookiejar.rst:393 +#: ../../../library/http.cookiejar.rst:405 msgid "" "Note that :meth:`domain_return_ok` is called for every *cookie* domain, not " "just for the *request* domain. For example, the function might be called " @@ -542,19 +548,19 @@ msgid "" "domain is ``\"www.example.com\"``. The same goes for :meth:`path_return_ok`." msgstr "" -#: ../../../library/http.cookiejar.rst:398 +#: ../../../library/http.cookiejar.rst:410 msgid "The *request* argument is as documented for :meth:`return_ok`." msgstr "" -#: ../../../library/http.cookiejar.rst:403 +#: ../../../library/http.cookiejar.rst:415 msgid "Return ``False`` if cookies should not be returned, given cookie path." msgstr "" -#: ../../../library/http.cookiejar.rst:405 +#: ../../../library/http.cookiejar.rst:417 msgid "See the documentation for :meth:`domain_return_ok`." msgstr "" -#: ../../../library/http.cookiejar.rst:407 +#: ../../../library/http.cookiejar.rst:419 msgid "" "In addition to implementing the methods above, implementations of the :class:" "`CookiePolicy` interface must also supply the following attributes, " @@ -562,21 +568,21 @@ msgid "" "may be assigned to." msgstr "" -#: ../../../library/http.cookiejar.rst:415 +#: ../../../library/http.cookiejar.rst:427 msgid "Implement Netscape protocol." msgstr "" -#: ../../../library/http.cookiejar.rst:420 +#: ../../../library/http.cookiejar.rst:432 msgid "Implement :rfc:`2965` protocol." msgstr "" -#: ../../../library/http.cookiejar.rst:425 +#: ../../../library/http.cookiejar.rst:437 msgid "" "Don't add :mailheader:`Cookie2` header to requests (the presence of this " "header indicates to the server that we understand :rfc:`2965` cookies)." msgstr "" -#: ../../../library/http.cookiejar.rst:428 +#: ../../../library/http.cookiejar.rst:440 msgid "" "The most useful way to define a :class:`CookiePolicy` class is by " "subclassing from :class:`DefaultCookiePolicy` and overriding some or all of " @@ -585,28 +591,28 @@ msgid "" "to be useful)." msgstr "" -#: ../../../library/http.cookiejar.rst:437 -msgid "DefaultCookiePolicy Objects" +#: ../../../library/http.cookiejar.rst:449 +msgid "DefaultCookiePolicy objects" msgstr "" -#: ../../../library/http.cookiejar.rst:439 +#: ../../../library/http.cookiejar.rst:451 msgid "Implements the standard rules for accepting and returning cookies." msgstr "" -#: ../../../library/http.cookiejar.rst:441 +#: ../../../library/http.cookiejar.rst:453 msgid "" "Both :rfc:`2965` and Netscape cookies are covered. RFC 2965 handling is " "switched off by default." msgstr "" -#: ../../../library/http.cookiejar.rst:444 +#: ../../../library/http.cookiejar.rst:456 msgid "" "The easiest way to provide your own policy is to override this class and " "call its methods in your overridden implementations before adding your own " "additional checks::" msgstr "" -#: ../../../library/http.cookiejar.rst:457 +#: ../../../library/http.cookiejar.rst:469 msgid "" "In addition to the features required to implement the :class:`CookiePolicy` " "interface, this class allows you to block and allow domains from setting and " @@ -615,18 +621,18 @@ msgid "" "cost of blocking some benign cookies)." msgstr "" -#: ../../../library/http.cookiejar.rst:463 +#: ../../../library/http.cookiejar.rst:475 msgid "" "A domain blocklist and allowlist is provided (both off by default). Only " "domains not in the blocklist and present in the allowlist (if the allowlist " "is active) participate in cookie setting and returning. Use the " -"*blocked_domains* constructor argument, and :meth:`blocked_domains` and :" -"meth:`set_blocked_domains` methods (and the corresponding argument and " -"methods for *allowed_domains*). If you set an allowlist, you can turn it " -"off again by setting it to :const:`None`." +"*blocked_domains* constructor argument, and :meth:`~DefaultCookiePolicy." +"blocked_domains` and :meth:`~DefaultCookiePolicy.set_blocked_domains` " +"methods (and the corresponding argument and methods for *allowed_domains*). " +"If you set an allowlist, you can turn it off again by setting it to ``None``." msgstr "" -#: ../../../library/http.cookiejar.rst:471 +#: ../../../library/http.cookiejar.rst:483 msgid "" "Domains in block or allow lists that do not start with a dot must equal the " "cookie domain to be matched. For example, ``\"example.com\"`` matches a " @@ -639,73 +645,73 @@ msgid "" "192.168.1.2 is blocked, but 193.168.1.2 is not." msgstr "" -#: ../../../library/http.cookiejar.rst:480 +#: ../../../library/http.cookiejar.rst:492 msgid "" ":class:`DefaultCookiePolicy` implements the following additional methods:" msgstr "" -#: ../../../library/http.cookiejar.rst:485 +#: ../../../library/http.cookiejar.rst:497 msgid "Return the sequence of blocked domains (as a tuple)." msgstr "" -#: ../../../library/http.cookiejar.rst:490 +#: ../../../library/http.cookiejar.rst:502 msgid "Set the sequence of blocked domains." msgstr "" -#: ../../../library/http.cookiejar.rst:495 +#: ../../../library/http.cookiejar.rst:507 msgid "" "Return ``True`` if *domain* is on the blocklist for setting or receiving " "cookies." msgstr "" -#: ../../../library/http.cookiejar.rst:501 -msgid "Return :const:`None`, or the sequence of allowed domains (as a tuple)." +#: ../../../library/http.cookiejar.rst:513 +msgid "Return ``None``, or the sequence of allowed domains (as a tuple)." msgstr "" -#: ../../../library/http.cookiejar.rst:506 -msgid "Set the sequence of allowed domains, or :const:`None`." +#: ../../../library/http.cookiejar.rst:518 +msgid "Set the sequence of allowed domains, or ``None``." msgstr "" -#: ../../../library/http.cookiejar.rst:511 +#: ../../../library/http.cookiejar.rst:523 msgid "" "Return ``True`` if *domain* is not on the allowlist for setting or receiving " "cookies." msgstr "" -#: ../../../library/http.cookiejar.rst:514 +#: ../../../library/http.cookiejar.rst:526 msgid "" ":class:`DefaultCookiePolicy` instances have the following attributes, which " "are all initialised from the constructor arguments of the same name, and " "which may all be assigned to." msgstr "" -#: ../../../library/http.cookiejar.rst:521 +#: ../../../library/http.cookiejar.rst:533 msgid "" "If true, request that the :class:`CookieJar` instance downgrade :rfc:`2109` " -"cookies (ie. cookies received in a :mailheader:`Set-Cookie` header with a " -"version cookie-attribute of 1) to Netscape cookies by setting the version " -"attribute of the :class:`Cookie` instance to 0. The default value is :const:" -"`None`, in which case RFC 2109 cookies are downgraded if and only if :rfc:" +"cookies (that is, cookies received in a :mailheader:`Set-Cookie` header with " +"a version cookie-attribute of 1) to Netscape cookies by setting the version " +"attribute of the :class:`Cookie` instance to 0. The default value is " +"``None``, in which case RFC 2109 cookies are downgraded if and only if :rfc:" "`2965` handling is turned off. Therefore, RFC 2109 cookies are downgraded " "by default." msgstr "" -#: ../../../library/http.cookiejar.rst:529 +#: ../../../library/http.cookiejar.rst:541 msgid "General strictness switches:" msgstr "" -#: ../../../library/http.cookiejar.rst:533 +#: ../../../library/http.cookiejar.rst:545 msgid "" "Don't allow sites to set two-component domains with country-code top-level " "domains like ``.co.uk``, ``.gov.uk``, ``.co.nz``.etc. This is far from " "perfect and isn't guaranteed to work!" msgstr "" -#: ../../../library/http.cookiejar.rst:538 +#: ../../../library/http.cookiejar.rst:550 msgid ":rfc:`2965` protocol strictness switches:" msgstr "" -#: ../../../library/http.cookiejar.rst:542 +#: ../../../library/http.cookiejar.rst:554 msgid "" "Follow :rfc:`2965` rules on unverifiable transactions (usually, an " "unverifiable transaction is one resulting from a redirect or a request for " @@ -713,78 +719,78 @@ msgid "" "blocked on the basis of verifiability" msgstr "" -#: ../../../library/http.cookiejar.rst:548 +#: ../../../library/http.cookiejar.rst:560 msgid "Netscape protocol strictness switches:" msgstr "" -#: ../../../library/http.cookiejar.rst:552 +#: ../../../library/http.cookiejar.rst:564 msgid "" "Apply :rfc:`2965` rules on unverifiable transactions even to Netscape " "cookies." msgstr "" -#: ../../../library/http.cookiejar.rst:557 +#: ../../../library/http.cookiejar.rst:569 msgid "" "Flags indicating how strict to be with domain-matching rules for Netscape " "cookies. See below for acceptable values." msgstr "" -#: ../../../library/http.cookiejar.rst:563 +#: ../../../library/http.cookiejar.rst:575 msgid "" "Ignore cookies in Set-Cookie: headers that have names starting with ``'$'``." msgstr "" -#: ../../../library/http.cookiejar.rst:568 +#: ../../../library/http.cookiejar.rst:580 msgid "Don't allow setting cookies whose path doesn't path-match request URI." msgstr "" -#: ../../../library/http.cookiejar.rst:570 +#: ../../../library/http.cookiejar.rst:582 msgid "" ":attr:`~DefaultCookiePolicy.strict_ns_domain` is a collection of flags. Its " "value is constructed by or-ing together (for example, ``DomainStrictNoDots|" "DomainStrictNonDomain`` means both flags are set)." msgstr "" -#: ../../../library/http.cookiejar.rst:577 +#: ../../../library/http.cookiejar.rst:589 msgid "" -"When setting cookies, the 'host prefix' must not contain a dot (eg. ``www." -"foo.bar.com`` can't set a cookie for ``.bar.com``, because ``www.foo`` " +"When setting cookies, the 'host prefix' must not contain a dot (for example, " +"``www.foo.bar.com`` can't set a cookie for ``.bar.com``, because ``www.foo`` " "contains a dot)." msgstr "" -#: ../../../library/http.cookiejar.rst:584 +#: ../../../library/http.cookiejar.rst:596 msgid "" "Cookies that did not explicitly specify a ``domain`` cookie-attribute can " -"only be returned to a domain equal to the domain that set the cookie (eg. " -"``spam.example.com`` won't be returned cookies from ``example.com`` that had " -"no ``domain`` cookie-attribute)." +"only be returned to a domain equal to the domain that set the cookie (for " +"example, ``spam.example.com`` won't be returned cookies from ``example.com`` " +"that had no ``domain`` cookie-attribute)." msgstr "" -#: ../../../library/http.cookiejar.rst:592 +#: ../../../library/http.cookiejar.rst:604 msgid "When setting cookies, require a full :rfc:`2965` domain-match." msgstr "" -#: ../../../library/http.cookiejar.rst:594 +#: ../../../library/http.cookiejar.rst:606 msgid "" "The following attributes are provided for convenience, and are the most " "useful combinations of the above flags:" msgstr "" -#: ../../../library/http.cookiejar.rst:600 +#: ../../../library/http.cookiejar.rst:612 msgid "" -"Equivalent to 0 (ie. all of the above Netscape domain strictness flags " +"Equivalent to 0 (that is, all of the above Netscape domain strictness flags " "switched off)." msgstr "" -#: ../../../library/http.cookiejar.rst:606 +#: ../../../library/http.cookiejar.rst:618 msgid "Equivalent to ``DomainStrictNoDots|DomainStrictNonDomain``." msgstr "" -#: ../../../library/http.cookiejar.rst:610 -msgid "Cookie Objects" +#: ../../../library/http.cookiejar.rst:622 +msgid "Cookie objects" msgstr "" -#: ../../../library/http.cookiejar.rst:612 +#: ../../../library/http.cookiejar.rst:624 msgid "" ":class:`Cookie` instances have Python attributes roughly corresponding to " "the standard cookie-attributes specified in the various cookie standards. " @@ -795,142 +801,142 @@ msgid "" "(Netscape) cookies." msgstr "" -#: ../../../library/http.cookiejar.rst:620 +#: ../../../library/http.cookiejar.rst:632 msgid "" "Assignment to these attributes should not be necessary other than in rare " "circumstances in a :class:`CookiePolicy` method. The class does not enforce " "internal consistency, so you should know what you're doing if you do that." msgstr "" -#: ../../../library/http.cookiejar.rst:627 +#: ../../../library/http.cookiejar.rst:639 msgid "" -"Integer or :const:`None`. Netscape cookies have :attr:`version` 0. :rfc:" -"`2965` and :rfc:`2109` cookies have a ``version`` cookie-attribute of 1. " -"However, note that :mod:`!http.cookiejar` may 'downgrade' RFC 2109 cookies " -"to Netscape cookies, in which case :attr:`version` is 0." +"Integer or ``None``. Netscape cookies have :attr:`version` 0. :rfc:`2965` " +"and :rfc:`2109` cookies have a ``version`` cookie-attribute of 1. However, " +"note that :mod:`!http.cookiejar` may 'downgrade' RFC 2109 cookies to " +"Netscape cookies, in which case :attr:`version` is 0." msgstr "" -#: ../../../library/http.cookiejar.rst:635 +#: ../../../library/http.cookiejar.rst:647 msgid "Cookie name (a string)." msgstr "" -#: ../../../library/http.cookiejar.rst:640 -msgid "Cookie value (a string), or :const:`None`." +#: ../../../library/http.cookiejar.rst:652 +msgid "Cookie value (a string), or ``None``." msgstr "" -#: ../../../library/http.cookiejar.rst:645 +#: ../../../library/http.cookiejar.rst:657 msgid "" -"String representing a port or a set of ports (eg. '80', or '80,8080'), or :" -"const:`None`." +"String representing a port or a set of ports (for example, '80', or " +"'80,8080'), or ``None``." msgstr "" -#: ../../../library/http.cookiejar.rst:651 +#: ../../../library/http.cookiejar.rst:663 msgid "Cookie domain (a string)." msgstr "" -#: ../../../library/http.cookiejar.rst:656 -msgid "Cookie path (a string, eg. ``'/acme/rocket_launchers'``)." +#: ../../../library/http.cookiejar.rst:668 +msgid "Cookie path (a string, for example, ``'/acme/rocket_launchers'``)." msgstr "" -#: ../../../library/http.cookiejar.rst:661 +#: ../../../library/http.cookiejar.rst:673 msgid "``True`` if cookie should only be returned over a secure connection." msgstr "" -#: ../../../library/http.cookiejar.rst:666 +#: ../../../library/http.cookiejar.rst:678 msgid "" -"Integer expiry date in seconds since epoch, or :const:`None`. See also the :" -"meth:`is_expired` method." +"Integer expiry date in seconds since epoch, or ``None``. See also the :meth:" +"`is_expired` method." msgstr "" -#: ../../../library/http.cookiejar.rst:672 +#: ../../../library/http.cookiejar.rst:684 msgid "``True`` if this is a session cookie." msgstr "" -#: ../../../library/http.cookiejar.rst:677 +#: ../../../library/http.cookiejar.rst:689 msgid "" -"String comment from the server explaining the function of this cookie, or :" -"const:`None`." +"String comment from the server explaining the function of this cookie, or " +"``None``." msgstr "" -#: ../../../library/http.cookiejar.rst:683 +#: ../../../library/http.cookiejar.rst:695 msgid "" "URL linking to a comment from the server explaining the function of this " -"cookie, or :const:`None`." +"cookie, or ``None``." msgstr "" -#: ../../../library/http.cookiejar.rst:689 +#: ../../../library/http.cookiejar.rst:701 msgid "" -"``True`` if this cookie was received as an :rfc:`2109` cookie (ie. the " +"``True`` if this cookie was received as an :rfc:`2109` cookie (that is, the " "cookie arrived in a :mailheader:`Set-Cookie` header, and the value of the " "Version cookie-attribute in that header was 1). This attribute is provided " "because :mod:`!http.cookiejar` may 'downgrade' RFC 2109 cookies to Netscape " "cookies, in which case :attr:`version` is 0." msgstr "" -#: ../../../library/http.cookiejar.rst:698 +#: ../../../library/http.cookiejar.rst:710 msgid "" "``True`` if a port or set of ports was explicitly specified by the server " "(in the :mailheader:`Set-Cookie` / :mailheader:`Set-Cookie2` header)." msgstr "" -#: ../../../library/http.cookiejar.rst:704 +#: ../../../library/http.cookiejar.rst:716 msgid "``True`` if a domain was explicitly specified by the server." msgstr "" -#: ../../../library/http.cookiejar.rst:709 +#: ../../../library/http.cookiejar.rst:721 msgid "" "``True`` if the domain explicitly specified by the server began with a dot " "(``'.'``)." msgstr "" -#: ../../../library/http.cookiejar.rst:712 +#: ../../../library/http.cookiejar.rst:724 msgid "" "Cookies may have additional non-standard cookie-attributes. These may be " "accessed using the following methods:" msgstr "" -#: ../../../library/http.cookiejar.rst:718 +#: ../../../library/http.cookiejar.rst:730 msgid "Return ``True`` if cookie has the named cookie-attribute." msgstr "" -#: ../../../library/http.cookiejar.rst:723 +#: ../../../library/http.cookiejar.rst:735 msgid "" "If cookie has the named cookie-attribute, return its value. Otherwise, " "return *default*." msgstr "" -#: ../../../library/http.cookiejar.rst:729 +#: ../../../library/http.cookiejar.rst:741 msgid "Set the value of the named cookie-attribute." msgstr "" -#: ../../../library/http.cookiejar.rst:731 +#: ../../../library/http.cookiejar.rst:743 msgid "The :class:`Cookie` class also defines the following method:" msgstr "" -#: ../../../library/http.cookiejar.rst:736 +#: ../../../library/http.cookiejar.rst:748 msgid "" "``True`` if cookie has passed the time at which the server requested it " "should expire. If *now* is given (in seconds since the epoch), return " "whether the cookie has expired at the specified time." msgstr "" -#: ../../../library/http.cookiejar.rst:742 +#: ../../../library/http.cookiejar.rst:754 msgid "Examples" msgstr "" -#: ../../../library/http.cookiejar.rst:744 +#: ../../../library/http.cookiejar.rst:756 msgid "" "The first example shows the most common usage of :mod:`!http.cookiejar`::" msgstr "" -#: ../../../library/http.cookiejar.rst:751 +#: ../../../library/http.cookiejar.rst:763 msgid "" "This example illustrates how to open a URL using your Netscape, Mozilla, or " "Lynx cookies (assumes Unix/Netscape convention for location of the cookies " "file)::" msgstr "" -#: ../../../library/http.cookiejar.rst:760 +#: ../../../library/http.cookiejar.rst:772 msgid "" "The next example illustrates the use of :class:`DefaultCookiePolicy`. Turn " "on :rfc:`2965` cookies, be more strict about domains when setting and " diff --git a/main/locale/pot/LC_MESSAGES/library/http.server.pot b/main/locale/pot/LC_MESSAGES/library/http.server.pot index 28d932326a3..d851a0abd0b 100644 --- a/main/locale/pot/LC_MESSAGES/library/http.server.pot +++ b/main/locale/pot/LC_MESSAGES/library/http.server.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -57,10 +57,19 @@ msgid "" "This class builds on the :class:`~socketserver.TCPServer` class by storing " "the server address as instance variables named :attr:`server_name` and :attr:" "`server_port`. The server is accessible by the handler, typically through " -"the handler's :attr:`server` instance variable." +"the handler's :attr:`~socketserver.BaseRequestHandler.server` instance " +"variable." msgstr "" -#: ../../../library/http.server.rst:46 +#: ../../../library/http.server.rst:47 +msgid "The HTTP server's fully qualified domain name." +msgstr "" + +#: ../../../library/http.server.rst:51 +msgid "The HTTP server's port number obtained from *server_address*." +msgstr "" + +#: ../../../library/http.server.rst:56 msgid "" "This class is identical to HTTPServer but uses threads to handle requests by " "using the :class:`~socketserver.ThreadingMixIn`. This is useful to handle " @@ -68,32 +77,32 @@ msgid "" "indefinitely." msgstr "" -#: ../../../library/http.server.rst:58 +#: ../../../library/http.server.rst:68 msgid "" "Subclass of :class:`HTTPServer` with a wrapped socket using the :mod:`ssl` " "module. If the :mod:`ssl` module is not available, instantiating a :class:`!" "HTTPSServer` object fails with a :exc:`RuntimeError`." msgstr "" -#: ../../../library/http.server.rst:62 +#: ../../../library/http.server.rst:72 msgid "" "The *certfile* argument is the path to the SSL certificate chain file, and " -"the *keyfile* is the path to file containing the private key." +"the *keyfile* is the path to the file containing the private key." msgstr "" -#: ../../../library/http.server.rst:65 +#: ../../../library/http.server.rst:75 msgid "" "A *password* can be specified for files protected and wrapped with PKCS#8, " "but beware that this could possibly expose hardcoded passwords in clear." msgstr "" -#: ../../../library/http.server.rst:70 +#: ../../../library/http.server.rst:80 msgid "" "See :meth:`ssl.SSLContext.load_cert_chain` for additional information on the " "accepted values for *certfile*, *keyfile* and *password*." msgstr "" -#: ../../../library/http.server.rst:74 +#: ../../../library/http.server.rst:84 msgid "" "When specified, the *alpn_protocols* argument must be a sequence of strings " "specifying the \"Application-Layer Protocol Negotiation\" (ALPN) protocols " @@ -101,27 +110,27 @@ msgid "" "the application protocol during the TLS handshake." msgstr "" -#: ../../../library/http.server.rst:79 +#: ../../../library/http.server.rst:89 msgid "" "By default, it is set to ``[\"http/1.1\"]``, meaning the server supports " "HTTP/1.1." msgstr "" -#: ../../../library/http.server.rst:87 +#: ../../../library/http.server.rst:97 msgid "" "This class is identical to :class:`HTTPSServer` but uses threads to handle " "requests by inheriting from :class:`~socketserver.ThreadingMixIn`. This is " "analogous to :class:`ThreadingHTTPServer` only using :class:`HTTPSServer`." msgstr "" -#: ../../../library/http.server.rst:94 +#: ../../../library/http.server.rst:104 msgid "" "The :class:`HTTPServer`, :class:`ThreadingHTTPServer`, :class:`HTTPSServer` " "and :class:`ThreadingHTTPSServer` must be given a *RequestHandlerClass* on " "instantiation, of which this module provides three different variants:" msgstr "" -#: ../../../library/http.server.rst:100 +#: ../../../library/http.server.rst:110 msgid "" "This class is used to handle the HTTP requests that arrive at the server. " "By itself, it cannot respond to any actual HTTP requests; it must be " @@ -130,7 +139,7 @@ msgid "" "instance variables, and methods for use by subclasses." msgstr "" -#: ../../../library/http.server.rst:106 +#: ../../../library/http.server.rst:116 msgid "" "The handler will parse the request and the headers, then call a method " "specific to the request type. The method name is constructed from the " @@ -140,28 +149,28 @@ msgid "" "override or extend the :meth:`!__init__` method." msgstr "" -#: ../../../library/http.server.rst:113 +#: ../../../library/http.server.rst:123 msgid ":class:`BaseHTTPRequestHandler` has the following instance variables:" msgstr "" -#: ../../../library/http.server.rst:117 +#: ../../../library/http.server.rst:127 msgid "" "Contains a tuple of the form ``(host, port)`` referring to the client's " "address." msgstr "" -#: ../../../library/http.server.rst:122 +#: ../../../library/http.server.rst:132 msgid "Contains the server instance." msgstr "" -#: ../../../library/http.server.rst:126 +#: ../../../library/http.server.rst:136 msgid "" "Boolean that should be set before :meth:`handle_one_request` returns, " "indicating if another request may be expected, or if the connection should " "be shut down." msgstr "" -#: ../../../library/http.server.rst:132 +#: ../../../library/http.server.rst:142 msgid "" "Contains the string representation of the HTTP request line. The terminating " "CRLF is stripped. This attribute should be set by :meth:" @@ -169,23 +178,23 @@ msgid "" "set to the empty string." msgstr "" -#: ../../../library/http.server.rst:139 +#: ../../../library/http.server.rst:149 msgid "Contains the command (request type). For example, ``'GET'``." msgstr "" -#: ../../../library/http.server.rst:143 +#: ../../../library/http.server.rst:153 msgid "" -"Contains the request path. If query component of the URL is present, then " -"``path`` includes the query. Using the terminology of :rfc:`3986`, ``path`` " -"here includes ``hier-part`` and the ``query``." +"Contains the request path. If the query component of the URL is present, " +"then ``path`` includes the query. Using the terminology of :rfc:`3986`, " +"``path`` here includes ``hier-part`` and the ``query``." msgstr "" -#: ../../../library/http.server.rst:149 +#: ../../../library/http.server.rst:159 msgid "" "Contains the version string from the request. For example, ``'HTTP/1.0'``." msgstr "" -#: ../../../library/http.server.rst:153 +#: ../../../library/http.server.rst:163 msgid "" "Holds an instance of the class specified by the :attr:`MessageClass` class " "variable. This instance parses and manages the headers in the HTTP request. " @@ -194,56 +203,56 @@ msgid "" "valid :rfc:`5322` style header." msgstr "" -#: ../../../library/http.server.rst:161 +#: ../../../library/http.server.rst:171 msgid "" "An :class:`io.BufferedIOBase` input stream, ready to read from the start of " "the optional input data." msgstr "" -#: ../../../library/http.server.rst:166 +#: ../../../library/http.server.rst:176 msgid "" "Contains the output stream for writing a response back to the client. Proper " "adherence to the HTTP protocol must be used when writing to this stream in " "order to achieve successful interoperation with HTTP clients." msgstr "" -#: ../../../library/http.server.rst:171 +#: ../../../library/http.server.rst:181 msgid "This is an :class:`io.BufferedIOBase` stream." msgstr "" -#: ../../../library/http.server.rst:174 +#: ../../../library/http.server.rst:184 msgid ":class:`BaseHTTPRequestHandler` has the following attributes:" msgstr "" -#: ../../../library/http.server.rst:178 +#: ../../../library/http.server.rst:188 msgid "" "Specifies the server software version. You may want to override this. The " "format is multiple whitespace-separated strings, where each string is of the " "form name[/version]. For example, ``'BaseHTTP/0.2'``." msgstr "" -#: ../../../library/http.server.rst:184 +#: ../../../library/http.server.rst:194 msgid "" "Contains the Python system version, in a form usable by the :attr:" "`version_string` method and the :attr:`server_version` class variable. For " "example, ``'Python/1.4'``." msgstr "" -#: ../../../library/http.server.rst:190 +#: ../../../library/http.server.rst:200 msgid "" "Specifies a format string that should be used by :meth:`send_error` method " "for building an error response to the client. The string is filled by " -"default with variables from :attr:`responses` based on the status code that " +"default with variables from :attr:`responses` based on the status code " "passed to :meth:`send_error`." msgstr "" -#: ../../../library/http.server.rst:197 +#: ../../../library/http.server.rst:207 msgid "" "Specifies the Content-Type HTTP header of error responses sent to the " "client. The default value is ``'text/html'``." msgstr "" -#: ../../../library/http.server.rst:202 +#: ../../../library/http.server.rst:212 msgid "" "Specifies the HTTP version to which the server is conformant. It is sent in " "responses to let the client know the server's communication capabilities for " @@ -254,14 +263,14 @@ msgid "" "``'HTTP/1.0'``." msgstr "" -#: ../../../library/http.server.rst:212 +#: ../../../library/http.server.rst:222 msgid "" "Specifies an :class:`email.message.Message`\\ -like class to parse HTTP " "headers. Typically, this is not overridden, and it defaults to :class:`http." "client.HTTPMessage`." msgstr "" -#: ../../../library/http.server.rst:218 +#: ../../../library/http.server.rst:228 msgid "" "This attribute contains a mapping of error code integers to two-element " "tuples containing a short and long message. For example, ``{code: " @@ -270,33 +279,33 @@ msgid "" "It is used by :meth:`send_response_only` and :meth:`send_error` methods." msgstr "" -#: ../../../library/http.server.rst:224 +#: ../../../library/http.server.rst:234 msgid "A :class:`BaseHTTPRequestHandler` instance has the following methods:" msgstr "" -#: ../../../library/http.server.rst:228 +#: ../../../library/http.server.rst:238 msgid "" "Calls :meth:`handle_one_request` once (or, if persistent connections are " "enabled, multiple times) to handle incoming HTTP requests. You should never " "need to override it; instead, implement appropriate :meth:`!do_\\*` methods." msgstr "" -#: ../../../library/http.server.rst:235 +#: ../../../library/http.server.rst:245 msgid "" "This method will parse and dispatch the request to the appropriate :meth:`!" "do_\\*` method. You should never need to override it." msgstr "" -#: ../../../library/http.server.rst:240 +#: ../../../library/http.server.rst:250 msgid "" "When an HTTP/1.1 conformant server receives an ``Expect: 100-continue`` " -"request header it responds back with a ``100 Continue`` followed by ``200 " -"OK`` headers. This method can be overridden to raise an error if the server " -"does not want the client to continue. For example, the server can choose to " -"send ``417 Expectation Failed`` as a response header and ``return False``." +"request header it responds with a ``100 Continue`` followed by ``200 OK`` " +"headers. This method can be overridden to raise an error if the server does " +"not want the client to continue. For example, the server can choose to send " +"``417 Expectation Failed`` as a response header and ``return False``." msgstr "" -#: ../../../library/http.server.rst:251 +#: ../../../library/http.server.rst:261 msgid "" "Sends and logs a complete error reply to the client. The numeric *code* " "specifies the HTTP error code, with *message* as an optional, short, human " @@ -311,13 +320,13 @@ msgid "" "``205 Reset Content``, ``304 Not Modified``." msgstr "" -#: ../../../library/http.server.rst:263 +#: ../../../library/http.server.rst:273 msgid "" "The error response includes a Content-Length header. Added the *explain* " "argument." msgstr "" -#: ../../../library/http.server.rst:269 +#: ../../../library/http.server.rst:279 msgid "" "Adds a response header to the headers buffer and logs the accepted request. " "The HTTP response line is written to the internal buffer, followed by " @@ -328,13 +337,13 @@ msgid "" "followed by an :meth:`end_headers` call." msgstr "" -#: ../../../library/http.server.rst:278 +#: ../../../library/http.server.rst:288 msgid "" "Headers are stored to an internal buffer and :meth:`end_headers` needs to be " "called explicitly." msgstr "" -#: ../../../library/http.server.rst:284 +#: ../../../library/http.server.rst:294 msgid "" "Adds the HTTP header to an internal buffer which will be written to the " "output stream when either :meth:`end_headers` or :meth:`flush_headers` is " @@ -343,196 +352,204 @@ msgid "" "`end_headers` MUST BE called in order to complete the operation." msgstr "" -#: ../../../library/http.server.rst:290 +#: ../../../library/http.server.rst:300 msgid "This method does not reject input containing CRLF sequences." msgstr "" -#: ../../../library/http.server.rst:292 +#: ../../../library/http.server.rst:302 msgid "Headers are stored in an internal buffer." msgstr "" -#: ../../../library/http.server.rst:297 +#: ../../../library/http.server.rst:307 msgid "" "Sends the response header only, used for the purposes when ``100 Continue`` " -"response is sent by the server to the client. The headers not buffered and " -"sent directly the output stream.If the *message* is not specified, the HTTP " -"message corresponding the response *code* is sent." +"response is sent by the server to the client. The headers are not buffered " +"and sent directly the output stream. If the *message* is not specified, the " +"HTTP message corresponding the response *code* is sent." msgstr "" -#: ../../../library/http.server.rst:302 +#: ../../../library/http.server.rst:312 msgid "This method does not reject *message* containing CRLF sequences." msgstr "" -#: ../../../library/http.server.rst:308 +#: ../../../library/http.server.rst:318 msgid "" "Adds a blank line (indicating the end of the HTTP headers in the response) " "to the headers buffer and calls :meth:`flush_headers`." msgstr "" -#: ../../../library/http.server.rst:312 +#: ../../../library/http.server.rst:322 msgid "The buffered headers are written to the output stream." msgstr "" -#: ../../../library/http.server.rst:317 +#: ../../../library/http.server.rst:327 msgid "" "Finally send the headers to the output stream and flush the internal headers " "buffer." msgstr "" -#: ../../../library/http.server.rst:324 +#: ../../../library/http.server.rst:334 msgid "" "Logs an accepted (successful) request. *code* should specify the numeric " "HTTP code associated with the response. If a size of the response is " "available, then it should be passed as the *size* parameter." msgstr "" -#: ../../../library/http.server.rst:330 +#: ../../../library/http.server.rst:340 msgid "" "Logs an error when a request cannot be fulfilled. By default, it passes the " "message to :meth:`log_message`, so it takes the same arguments (*format* and " "additional values)." msgstr "" -#: ../../../library/http.server.rst:337 +#: ../../../library/http.server.rst:347 msgid "" "Logs an arbitrary message to ``sys.stderr``. This is typically overridden to " "create custom error logging mechanisms. The *format* argument is a standard " "printf-style format string, where the additional arguments to :meth:" -"`log_message` are applied as inputs to the formatting. The client ip address " +"`log_message` are applied as inputs to the formatting. The client IP address " "and current date and time are prefixed to every message logged." msgstr "" -#: ../../../library/http.server.rst:345 +#: ../../../library/http.server.rst:355 msgid "" "Returns the server software's version string. This is a combination of the :" "attr:`server_version` and :attr:`sys_version` attributes." msgstr "" -#: ../../../library/http.server.rst:350 +#: ../../../library/http.server.rst:360 msgid "" "Returns the date and time given by *timestamp* (which must be ``None`` or in " "the format returned by :func:`time.time`), formatted for a message header. " "If *timestamp* is omitted, it uses the current date and time." msgstr "" -#: ../../../library/http.server.rst:354 +#: ../../../library/http.server.rst:364 msgid "The result looks like ``'Sun, 06 Nov 1994 08:49:37 GMT'``." msgstr "" -#: ../../../library/http.server.rst:358 +#: ../../../library/http.server.rst:368 msgid "Returns the current date and time, formatted for logging." msgstr "" -#: ../../../library/http.server.rst:362 +#: ../../../library/http.server.rst:372 msgid "Returns the client address." msgstr "" -#: ../../../library/http.server.rst:364 +#: ../../../library/http.server.rst:374 msgid "" "Previously, a name lookup was performed. To avoid name resolution delays, it " "now always returns the IP address." msgstr "" -#: ../../../library/http.server.rst:372 +#: ../../../library/http.server.rst:382 msgid "" "This class serves files from the directory *directory* and below, or the " "current directory if *directory* is not provided, directly mapping the " "directory structure to HTTP requests." msgstr "" -#: ../../../library/http.server.rst:376 +#: ../../../library/http.server.rst:386 msgid "Added the *directory* parameter." msgstr "" -#: ../../../library/http.server.rst:379 +#: ../../../library/http.server.rst:389 msgid "The *directory* parameter accepts a :term:`path-like object`." msgstr "" -#: ../../../library/http.server.rst:382 +#: ../../../library/http.server.rst:392 msgid "Added *extra_response_headers* parameter." msgstr "" -#: ../../../library/http.server.rst:385 +#: ../../../library/http.server.rst:395 msgid "" "A lot of the work, such as parsing the request, is done by the base class :" "class:`BaseHTTPRequestHandler`. This class implements the :func:`do_GET` " "and :func:`do_HEAD` functions." msgstr "" -#: ../../../library/http.server.rst:389 +#: ../../../library/http.server.rst:399 msgid "" "The following are defined as class-level attributes of :class:" "`SimpleHTTPRequestHandler`:" msgstr "" -#: ../../../library/http.server.rst:394 +#: ../../../library/http.server.rst:404 msgid "" "This will be ``\"SimpleHTTP/\" + __version__``, where ``__version__`` is " "defined at the module level." msgstr "" -#: ../../../library/http.server.rst:399 +#: ../../../library/http.server.rst:409 msgid "" "Specifies the Content-Type header value sent when the MIME type cannot be " "guessed from the file extension of the requested URL. By default, it is set " "to ``'application/octet-stream'``." msgstr "" -#: ../../../library/http.server.rst:407 +#: ../../../library/http.server.rst:417 +msgid "Specifies the filenames that are treated as directory index pages." +msgstr "" + +#: ../../../library/http.server.rst:419 +msgid "Defaults to ``(\"index.html\", \"index.htm\")``." +msgstr "" + +#: ../../../library/http.server.rst:425 msgid "" "A dictionary mapping suffixes into MIME types, contains custom overrides for " "the default system mappings. The mapping is used case-insensitively, and so " "should contain only lower-cased keys." msgstr "" -#: ../../../library/http.server.rst:411 +#: ../../../library/http.server.rst:429 msgid "" "This dictionary is no longer filled with the default system mappings, but " "only contains overrides." msgstr "" -#: ../../../library/http.server.rst:417 +#: ../../../library/http.server.rst:435 msgid "" "A sequence of ``(name, value)`` pairs containing user-defined extra HTTP " "response headers to add to each successful HTTP status 200 response. These " "headers are not included in other status code responses." msgstr "" -#: ../../../library/http.server.rst:421 +#: ../../../library/http.server.rst:439 msgid "" "Headers that the server sends automatically such as ``Content-Type`` will " "not be overwritten by :attr:`!extra_response_headers`." msgstr "" -#: ../../../library/http.server.rst:424 +#: ../../../library/http.server.rst:442 msgid "" "The :class:`SimpleHTTPRequestHandler` class defines the following methods:" msgstr "" -#: ../../../library/http.server.rst:428 +#: ../../../library/http.server.rst:446 msgid "" "This method serves the ``'HEAD'`` request type: it sends the headers it " "would send for the equivalent ``GET`` request. See the :meth:`do_GET` method " "for a more complete explanation of the possible headers." msgstr "" -#: ../../../library/http.server.rst:434 +#: ../../../library/http.server.rst:452 msgid "" "The request is mapped to a local file by interpreting the request as a path " "relative to the current working directory." msgstr "" -#: ../../../library/http.server.rst:437 +#: ../../../library/http.server.rst:455 msgid "" -"If the request was mapped to a directory, the directory is checked for a " -"file named ``index.html`` or ``index.htm`` (in that order). If found, the " -"file's contents are returned; otherwise a directory listing is generated by " -"calling the :meth:`list_directory` method. This method uses :func:`os." -"listdir` to scan the directory, and returns a ``404`` error response if the :" -"func:`~os.listdir` fails." +"If the request was mapped to a directory, the directory is checked for an " +"index page as specified by :attr:`index_pages`. If found, the file's " +"contents are returned; otherwise a directory listing is generated by calling " +"the :meth:`list_directory` method. This method uses :func:`os.listdir` to " +"scan the directory, and returns a ``404`` error response if the :func:`~os." +"listdir` fails." msgstr "" -#: ../../../library/http.server.rst:444 +#: ../../../library/http.server.rst:462 msgid "" "If the request was mapped to a file, it is opened. Any :exc:`OSError` " "exception in opening the requested file is mapped to a ``404``, ``'File not " @@ -543,71 +560,102 @@ msgid "" "*extensions_map* variable, and the file contents are returned." msgstr "" -#: ../../../library/http.server.rst:452 +#: ../../../library/http.server.rst:470 msgid "" "A ``'Content-type:'`` header with the guessed content type is output, " "followed by a ``'Content-Length:'`` header with the file's size and a " "``'Last-Modified:'`` header with the file's modification time." msgstr "" -#: ../../../library/http.server.rst:456 +#: ../../../library/http.server.rst:474 msgid "" "The instance attribute :attr:`extra_response_headers` is a sequence of " "``(name, value)`` pairs containing user-defined extra response headers." msgstr "" -#: ../../../library/http.server.rst:459 +#: ../../../library/http.server.rst:477 msgid "" "Then follows a blank line signifying the end of the headers, and then the " "contents of the file are output." msgstr "" -#: ../../../library/http.server.rst:462 +#: ../../../library/http.server.rst:480 msgid "" "For example usage, see the implementation of the ``test`` function in :" "source:`Lib/http/server.py`." msgstr "" -#: ../../../library/http.server.rst:465 +#: ../../../library/http.server.rst:483 msgid "Support of the ``'If-Modified-Since'`` header." msgstr "" -#: ../../../library/http.server.rst:468 +#: ../../../library/http.server.rst:488 +msgid "Helper to list the contents of *path* when no index page is present." +msgstr "" + +#: ../../../library/http.server.rst:490 +msgid "" +"This returns either a :term:`file-like object` (which must be closed by the " +"caller) or ``None`` to indicate an error, in which case the caller has " +"nothing further to do. In either case, the headers are sent." +msgstr "" + +#: ../../../library/http.server.rst:496 +msgid "Guess the type of the file at the given *path*." +msgstr "" + +#: ../../../library/http.server.rst:498 +msgid "" +"This returns a string of the form ``type/subtype``, usable for a MIME " +"Content-type header." +msgstr "" + +#: ../../../library/http.server.rst:501 msgid "" -"The :class:`SimpleHTTPRequestHandler` class can be used in the following " -"manner in order to create a very basic webserver serving files relative to " -"the current directory::" +"The default implementation looks the file's extension up in :attr:" +"`extensions_map`, falling back to :func:`mimetypes.guess_file_type` and then " +"to :attr:`default_content_type`." +msgstr "" + +#: ../../../library/http.server.rst:506 +msgid "Add :func:`mimetypes.guess_file_type` as a fallback." msgstr "" -#: ../../../library/http.server.rst:484 +#: ../../../library/http.server.rst:510 +msgid "" +"The :class:`SimpleHTTPRequestHandler` class can be used to create a very " +"basic webserver serving files relative to the current directory as follows::" +msgstr "" + +#: ../../../library/http.server.rst:525 msgid "" ":class:`SimpleHTTPRequestHandler` can also be subclassed to enhance " "behavior, such as using different index file names by overriding the class " -"attribute :attr:`index_pages`." +"attribute :attr:`~SimpleHTTPRequestHandler.index_pages`." msgstr "" -#: ../../../library/http.server.rst:492 +#: ../../../library/http.server.rst:533 msgid "Command-line interface" msgstr "" -#: ../../../library/http.server.rst:494 +#: ../../../library/http.server.rst:535 msgid "" ":mod:`!http.server` can also be invoked directly using the :option:`-m` " "switch of the interpreter. The following example illustrates how to serve " "files relative to the current directory:" msgstr "" -#: ../../../library/http.server.rst:502 +#: ../../../library/http.server.rst:543 msgid "The following options are accepted:" msgstr "" -#: ../../../library/http.server.rst:508 +#: ../../../library/http.server.rst:549 msgid "" "The server listens to port 8000 by default. The default can be overridden by " "passing the desired port number as an argument:" msgstr "" -#: ../../../library/http.server.rst:517 +#: ../../../library/http.server.rst:558 msgid "" "Specifies a specific address to which it should bind. Both IPv4 and IPv6 " "addresses are supported. By default, the server binds itself to all " @@ -615,75 +663,75 @@ msgid "" "localhost only:" msgstr "" -#: ../../../library/http.server.rst:528 +#: ../../../library/http.server.rst:569 msgid "Support IPv6 in the ``--bind`` option." msgstr "" -#: ../../../library/http.server.rst:533 +#: ../../../library/http.server.rst:574 msgid "" "Specifies a directory to which it should serve the files. By default, the " "server uses the current directory. For example, the following command uses a " "specific directory:" msgstr "" -#: ../../../library/http.server.rst:545 +#: ../../../library/http.server.rst:586 msgid "" "Specifies the HTTP version to which the server is conformant. By default, " "the server is conformant to HTTP/1.0. For example, the following command " "runs an HTTP/1.1 conformant server:" msgstr "" -#: ../../../library/http.server.rst:557 +#: ../../../library/http.server.rst:598 msgid "" "Specifies the default Content-Type HTTP header used when the MIME type " "cannot be guessed from the URL's file extension. By default, the server uses " "``'application/octet-stream'``:" msgstr "" -#: ../../../library/http.server.rst:569 +#: ../../../library/http.server.rst:610 msgid "Specifies a TLS certificate chain for HTTPS connections:" msgstr "" -#: ../../../library/http.server.rst:579 +#: ../../../library/http.server.rst:620 msgid "Specifies a private key file for HTTPS connections." msgstr "" -#: ../../../library/http.server.rst:581 ../../../library/http.server.rst:596 +#: ../../../library/http.server.rst:622 ../../../library/http.server.rst:637 msgid "This option requires ``--tls-cert`` to be specified." msgstr "" -#: ../../../library/http.server.rst:587 +#: ../../../library/http.server.rst:628 msgid "Specifies the password file for password-protected private keys:" msgstr "" -#: ../../../library/http.server.rst:602 +#: ../../../library/http.server.rst:643 msgid "" -"Specify an additional extra HTTP Response Header to send on successful HTTP " -"200 responses. Can be used multiple times to send additional custom response " +"Specify an additional HTTP Response Header to send on successful HTTP 200 " +"responses. Can be used multiple times to send additional custom response " "headers. Headers that are sent automatically by the server (for instance " "Content-Type) will not be overwritten by the server." msgstr "" -#: ../../../library/http.server.rst:613 +#: ../../../library/http.server.rst:654 msgid "Security considerations" msgstr "" -#: ../../../library/http.server.rst:617 +#: ../../../library/http.server.rst:658 msgid "" ":class:`SimpleHTTPRequestHandler` will follow symbolic links when handling " -"requests, this makes it possible for files outside of the specified " +"requests which makes it possible for files outside of the specified " "directory to be served." msgstr "" -#: ../../../library/http.server.rst:621 +#: ../../../library/http.server.rst:662 msgid "" "Methods :meth:`BaseHTTPRequestHandler.send_header` and :meth:" "`BaseHTTPRequestHandler.send_response_only` assume sanitized input and do " "not perform input validation such as checking for the presence of CRLF " -"sequences. Untrusted input may result in HTTP Header injection attacks." +"sequences. Untrusted input may result in HTTP header injection attacks." msgstr "" -#: ../../../library/http.server.rst:626 +#: ../../../library/http.server.rst:667 msgid "" "Earlier versions of Python did not scrub control characters from the log " "messages emitted to stderr from ``python -m http.server`` or the default :" @@ -692,7 +740,7 @@ msgid "" "codes to your terminal." msgstr "" -#: ../../../library/http.server.rst:632 +#: ../../../library/http.server.rst:673 msgid "Control characters are scrubbed in stderr logs." msgstr "" @@ -720,10 +768,10 @@ msgstr "" msgid "httpd" msgstr "" -#: ../../../library/http.server.rst:615 +#: ../../../library/http.server.rst:656 msgid "http.server" msgstr "" -#: ../../../library/http.server.rst:615 +#: ../../../library/http.server.rst:656 msgid "security" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/imaplib.pot b/main/locale/pot/LC_MESSAGES/library/imaplib.pot index 159a909ef8c..a6627c48d39 100644 --- a/main/locale/pot/LC_MESSAGES/library/imaplib.pot +++ b/main/locale/pot/LC_MESSAGES/library/imaplib.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,7 +30,7 @@ msgid "" "This module defines three classes, :class:`IMAP4`, :class:`IMAP4_SSL` and :" "class:`IMAP4_stream`, which encapsulate a connection to an IMAP4 server and " "implement a large subset of the IMAP4rev1 client protocol as defined in :rfc:" -"`2060`. It is backward compatible with IMAP4 (:rfc:`1730`) servers, but note " +"`3501`. It is backward compatible with IMAP4 (:rfc:`1730`) servers, but note " "that the ``STATUS`` command is not supported in IMAP4." msgstr "" @@ -72,7 +72,7 @@ msgstr "" msgid "Support for the :keyword:`with` statement was added." msgstr "" -#: ../../../library/imaplib.rst:50 ../../../library/imaplib.rst:104 +#: ../../../library/imaplib.rst:50 ../../../library/imaplib.rst:111 msgid "The optional *timeout* parameter was added." msgstr "" @@ -117,60 +117,70 @@ msgid "" "for best practices." msgstr "" -#: ../../../library/imaplib.rst:92 +#: ../../../library/imaplib.rst:94 ../../../library/imaplib.rst:785 +msgid "" +"With the default *ssl_context*, the connection is encrypted but the server " +"certificate and hostname are not verified. To verify them, pass a context " +"created by :func:`ssl.create_default_context`." +msgstr "" + +#: ../../../library/imaplib.rst:99 msgid "" "The optional *timeout* parameter specifies a timeout in seconds for the " "connection attempt. If timeout is not given or is ``None``, the global " "default socket timeout is used." msgstr "" -#: ../../../library/imaplib.rst:96 +#: ../../../library/imaplib.rst:103 msgid "*ssl_context* parameter was added." msgstr "" -#: ../../../library/imaplib.rst:99 +#: ../../../library/imaplib.rst:106 msgid "" "The class now supports hostname check with :attr:`ssl.SSLContext." "check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "" -#: ../../../library/imaplib.rst:107 +#: ../../../library/imaplib.rst:114 msgid "The deprecated *keyfile* and *certfile* parameters have been removed." msgstr "" -#: ../../../library/imaplib.rst:110 +#: ../../../library/imaplib.rst:117 msgid "The second subclass allows for connections created by a child process:" msgstr "" -#: ../../../library/imaplib.rst:115 +#: ../../../library/imaplib.rst:122 msgid "" "This is a subclass derived from :class:`IMAP4` that connects to the ``stdin/" "stdout`` file descriptors created by passing *command* to ``subprocess." "Popen()``." msgstr "" -#: ../../../library/imaplib.rst:120 +#: ../../../library/imaplib.rst:127 msgid "The following utility functions are defined:" msgstr "" -#: ../../../library/imaplib.rst:125 +#: ../../../library/imaplib.rst:132 msgid "" -"Parse an IMAP4 ``INTERNALDATE`` string and return corresponding local time. " -"The return value is a :class:`time.struct_time` tuple or ``None`` if the " -"string has wrong format." +"Parse a :term:`bytes-like object` containing an IMAP4 ``INTERNALDATE`` " +"response and return the corresponding local time. The return value is a :" +"class:`time.struct_time` tuple or ``None`` if the input has wrong format." msgstr "" -#: ../../../library/imaplib.rst:131 +#: ../../../library/imaplib.rst:138 msgid "" "Converts an integer into a bytes representation using characters from the " "set [``A`` .. ``P``]." msgstr "" -#: ../../../library/imaplib.rst:137 -msgid "Converts an IMAP4 ``FLAGS`` response to a tuple of individual flags." +#: ../../../library/imaplib.rst:144 +msgid "" +"Converts a :term:`bytes-like object` containing an IMAP4 ``FLAGS`` response " +"to a tuple of individual flags as :class:`bytes`. The return value is an " +"empty tuple if the input has wrong format." msgstr "" -#: ../../../library/imaplib.rst:142 +#: ../../../library/imaplib.rst:151 msgid "" "Convert *date_time* to an IMAP4 ``INTERNALDATE`` representation. The return " "value is a string in the form: ``\"DD-Mmm-YYYY HH:MM:SS +HHMM\"`` (including " @@ -182,7 +192,7 @@ msgid "" "already be in the correct format." msgstr "" -#: ../../../library/imaplib.rst:152 +#: ../../../library/imaplib.rst:161 msgid "" "Note that IMAP4 message numbers change as the mailbox changes; in " "particular, after an ``EXPUNGE`` command performs deletions the remaining " @@ -190,30 +200,30 @@ msgid "" "the UID command." msgstr "" -#: ../../../library/imaplib.rst:156 +#: ../../../library/imaplib.rst:165 msgid "" "At the end of the module, there is a test section that contains a more " "extensive example of usage." msgstr "" -#: ../../../library/imaplib.rst:162 +#: ../../../library/imaplib.rst:171 msgid "" "Documents describing the protocol, sources for servers implementing it, by " "the University of Washington's IMAP Information Center can all be found at " "(**Source Code**) https://github.com/uw-imap/imap (**Not Maintained**)." msgstr "" -#: ../../../library/imaplib.rst:170 +#: ../../../library/imaplib.rst:179 msgid "IMAP4 Objects" msgstr "" -#: ../../../library/imaplib.rst:172 +#: ../../../library/imaplib.rst:181 msgid "" "All IMAP4rev1 commands are represented by methods of the same name, either " "uppercase or lowercase." msgstr "" -#: ../../../library/imaplib.rst:175 +#: ../../../library/imaplib.rst:184 msgid "" "All arguments to commands are converted to strings, except for " "``AUTHENTICATE``, and the last argument to ``APPEND`` which is passed as an " @@ -222,10 +232,28 @@ msgid "" "string is quoted. However, the *password* argument to the ``LOGIN`` command " "is always quoted. If you want to avoid having an argument string quoted (eg: " "the *flags* argument to ``STORE``) then enclose the string in parentheses " -"(eg: ``r'(\\Deleted)'``)." +"(eg: ``r'(\\Deleted)'``). Or you can quote the string yourself; an argument " +"that is already enclosed in double quotes is left unchanged. In general, " +"however, it is better to pass arguments unquoted and let the module quote " +"them as needed." +msgstr "" + +#: ../../../library/imaplib.rst:196 +msgid "" +"Mailbox names are encoded as modified UTF-7 (:rfc:`3501`, section 5.1.3), so " +"a mailbox name containing non-ASCII characters can be passed as an ordinary :" +"class:`str`. A :class:`str` that is already valid modified UTF-7 is left " +"unchanged, so that a name obtained from :meth:`~IMAP4.list` (raw ``bytes`` " +"decoded to text) round-trips; pass :class:`bytes` to send the exact bytes " +"with no encoding. When ``UTF8=ACCEPT`` is enabled (see :meth:`~IMAP4." +"enable`), mailbox names are sent as UTF-8 instead." msgstr "" -#: ../../../library/imaplib.rst:183 +#: ../../../library/imaplib.rst:206 +msgid "Non-ASCII mailbox names are automatically encoded as modified UTF-7." +msgstr "" + +#: ../../../library/imaplib.rst:209 msgid "" "Most commands return a tuple: ``(type, [data, ...])`` where *type* is " "usually ``'OK'`` or ``'NO'``, and *data* is either the text from the command " @@ -234,46 +262,131 @@ msgid "" "response, and the second part contains the data (ie: 'literal' value)." msgstr "" -#: ../../../library/imaplib.rst:189 +#: ../../../library/imaplib.rst:215 msgid "" -"The *message_set* options to commands below is a string specifying one or " -"more messages to be acted upon. It may be a simple message number " +"The *message_set* options to the commands below can be a string specifying " +"one or more messages to be acted upon. It may be a simple message number " "(``'1'``), a range of message numbers (``'2:4'``), or a group of non-" -"contiguous ranges separated by commas (``'1:3,6:9'``). A range can contain " +"contiguous ranges separated by commas (``'1:3,6:9'``). A range can contain " "an asterisk to indicate an infinite upper bound (``'3:*'``)." msgstr "" -#: ../../../library/imaplib.rst:195 +#: ../../../library/imaplib.rst:223 +msgid "" +"Alternatively it can be specified using integers and :class:`range` objects. " +"It may be a single message number or a sequence. The sequence items may be " +"integers, ``(start, stop)`` tuples (where ``None`` or ``'*'`` stands for the " +"last message), or :class:`range` objects. For example, ``[1, (3, 5), 8]`` " +"and ``[range(1, 6), 8]`` are both equivalent to ``'1,3:5,8'``." +msgstr "" + +#: ../../../library/imaplib.rst:231 +msgid "Added support for the structured *message_set*." +msgstr "" + +#: ../../../library/imaplib.rst:234 +msgid "" +"Command arguments that are parenthesized lists of atoms --- such as the " +"*flag_list* argument of :meth:`~IMAP4.store` and the *flags* argument of :" +"meth:`~IMAP4.append`, the *names* argument of :meth:`~IMAP4.status`, the " +"*sort_criteria* argument of :meth:`~IMAP4.sort`, or the *message_parts* " +"argument of :meth:`~IMAP4.fetch` --- can be passed as a sequence of strings " +"instead of a single preformatted string. For example, ``[r'\\Seen', " +"r'\\Answered']`` is equivalent to ``(\\Seen \\Answered)``." +msgstr "" + +#: ../../../library/imaplib.rst:244 +msgid "Added support for passing these arguments as a sequence." +msgstr "" + +#: ../../../library/imaplib.rst:249 +msgid "" +"The value-bearing arguments of the search and fetch commands can be quoted " +"by hand, but this is error prone. Instead, they may contain ``?`` " +"placeholders that are substituted, and quoted as required, from a *params* " +"keyword argument, in the manner of :mod:`sqlite3` parameter substitution::" +msgstr "" + +#: ../../../library/imaplib.rst:261 +msgid "The placeholders are:" +msgstr "" + +#: ../../../library/imaplib.rst:263 +msgid "" +"``?`` --- an ``astring``: a string (which will be quoted if necessary), an " +"integer, or a list of integers and/or strings (which will be sent as a " +"parenthesized list);" +msgstr "" + +#: ../../../library/imaplib.rst:266 +msgid "``?f`` --- a flag or a list of flags, sent verbatim without quoting;" +msgstr "" + +#: ../../../library/imaplib.rst:267 +msgid "``?s`` --- a *message_set* in the structured form described above." +msgstr "" + +#: ../../../library/imaplib.rst:269 +msgid "``??`` stands for a literal ``?``." +msgstr "" + +#: ../../../library/imaplib.rst:271 +msgid "" +"Substitution is only performed when *params* is given; if no *params* are " +"given, an argument containing a literal ``?`` is unchanged. The *params* " +"keyword is accepted by :meth:`~IMAP4.search`, :meth:`~IMAP4.fetch`, :meth:" +"`~IMAP4.sort`, :meth:`~IMAP4.thread` and :meth:`~IMAP4.uid`." +msgstr "" + +#: ../../../library/imaplib.rst:277 +msgid "The *params* keyword argument." +msgstr "" + +#: ../../../library/imaplib.rst:280 msgid "An :class:`IMAP4` instance has the following methods:" msgstr "" -#: ../../../library/imaplib.rst:200 +#: ../../../library/imaplib.rst:285 msgid "Append *message* to named mailbox." msgstr "" -#: ../../../library/imaplib.rst:202 +#: ../../../library/imaplib.rst:287 msgid "" "*flags* may be ``None`` or a string of IMAP flag tokens. Multiple flags are " "separated by spaces, for example ``r'\\Seen \\Answered'``. If *flags* is not " "already enclosed in parentheses, parentheses are added automatically." msgstr "" -#: ../../../library/imaplib.rst:210 +#: ../../../library/imaplib.rst:292 +msgid "" +"If *translate_line_endings* is true (the default), line endings in *message* " +"are translated to CRLF. Pass ``False`` to send the message literal exactly " +"as given, which is required to preserve messages that contain bare CR or LF. " +"In that case *message* must already use CRLF line endings as required by :" +"rfc:`3501`; for example, serialize :mod:`email` messages using :class:`email." +"policy.SMTP`." +msgstr "" + +#: ../../../library/imaplib.rst:300 +msgid "Added the *translate_line_endings* parameter." +msgstr "" + +#: ../../../library/imaplib.rst:306 msgid "Authenticate command --- requires response processing." msgstr "" -#: ../../../library/imaplib.rst:212 +#: ../../../library/imaplib.rst:308 msgid "" "*mechanism* specifies which authentication mechanism is to be used - it " "should appear in the instance variable ``capabilities`` in the form " "``AUTH=mechanism``." msgstr "" -#: ../../../library/imaplib.rst:215 +#: ../../../library/imaplib.rst:311 msgid "*authobject* must be a callable object::" msgstr "" -#: ../../../library/imaplib.rst:219 +#: ../../../library/imaplib.rst:315 msgid "" "It will be called to process server continuation responses; the *response* " "argument it is passed will be ``bytes``. It should return ``bytes`` *data* " @@ -281,101 +394,148 @@ msgid "" "``None`` if the client abort response ``*`` should be sent instead." msgstr "" -#: ../../../library/imaplib.rst:224 +#: ../../../library/imaplib.rst:320 msgid "" "string usernames and passwords are now encoded to ``utf-8`` instead of being " "limited to ASCII." msgstr "" -#: ../../../library/imaplib.rst:231 +#: ../../../library/imaplib.rst:327 msgid "Checkpoint mailbox on server." msgstr "" -#: ../../../library/imaplib.rst:236 +#: ../../../library/imaplib.rst:332 msgid "" "Close currently selected mailbox. Deleted messages are removed from writable " "mailbox. This is the recommended command before ``LOGOUT``." msgstr "" -#: ../../../library/imaplib.rst:242 +#: ../../../library/imaplib.rst:338 msgid "Copy *message_set* messages onto end of *new_mailbox*." msgstr "" -#: ../../../library/imaplib.rst:247 +#: ../../../library/imaplib.rst:340 +msgid "" +"If *uid* is true, *message_set* is a set of UIDs and the ``UID COPY`` " +"command is used instead of ``COPY``." +msgstr "" + +#: ../../../library/imaplib.rst:343 ../../../library/imaplib.rst:831 +msgid "Added the *uid* parameter." +msgstr "" + +#: ../../../library/imaplib.rst:349 msgid "Create new mailbox named *mailbox*." msgstr "" -#: ../../../library/imaplib.rst:252 +#: ../../../library/imaplib.rst:354 msgid "Delete old mailbox named *mailbox*." msgstr "" -#: ../../../library/imaplib.rst:257 +#: ../../../library/imaplib.rst:359 msgid "Delete the ACLs (remove any rights) set for who on mailbox." msgstr "" -#: ../../../library/imaplib.rst:262 +#: ../../../library/imaplib.rst:364 msgid "" "Enable *capability* (see :rfc:`5161`). Most capabilities do not need to be " "enabled. Currently only the ``UTF8=ACCEPT`` capability is supported (see :" "RFC:`6855`)." msgstr "" -#: ../../../library/imaplib.rst:266 +#: ../../../library/imaplib.rst:368 msgid "The :meth:`enable` method itself, and :RFC:`6855` support." msgstr "" -#: ../../../library/imaplib.rst:272 +#: ../../../library/imaplib.rst:374 msgid "" "Permanently remove deleted items from selected mailbox. Generates an " "``EXPUNGE`` response for each deleted message. Returned data contains a list " "of ``EXPUNGE`` message numbers in order received." msgstr "" -#: ../../../library/imaplib.rst:279 +#: ../../../library/imaplib.rst:378 +msgid "" +"If *uid* is true, the ``UID EXPUNGE`` command (:rfc:`4315`) is used to " +"remove only the messages that both are marked as deleted and have a UID in " +"*message_set*. *message_set* is required in this case, and must be omitted " +"otherwise." +msgstr "" + +#: ../../../library/imaplib.rst:383 +msgid "Added the *message_set* and *uid* parameters." +msgstr "" + +#: ../../../library/imaplib.rst:389 msgid "" "Fetch (parts of) messages. *message_parts* should be a string of message " "part names enclosed within parentheses, eg: ``\"(UID BODY[TEXT])\"``. " "Returned data are tuples of message part envelope and data." msgstr "" -#: ../../../library/imaplib.rst:286 +#: ../../../library/imaplib.rst:393 +msgid "" +"If *uid* is true, *message_set* is a set of UIDs and the message numbers in " +"the response are UIDs (``UID FETCH``)." +msgstr "" + +#: ../../../library/imaplib.rst:396 +msgid "" +"If *params* is given, ``?`` placeholders in *message_parts* are substituted " +"with the quoted parameters (see :ref:`the placeholders `)." +msgstr "" + +#: ../../../library/imaplib.rst:399 +msgid "Added the *params* and *uid* parameters." +msgstr "" + +#: ../../../library/imaplib.rst:405 msgid "" "Get the ``ACL``\\ s for *mailbox*. The method is non-standard, but is " "supported by the ``Cyrus`` server." msgstr "" -#: ../../../library/imaplib.rst:292 +#: ../../../library/imaplib.rst:411 msgid "" "Retrieve the specified ``ANNOTATION``\\ s for *mailbox*. The method is non-" "standard, but is supported by the ``Cyrus`` server." msgstr "" -#: ../../../library/imaplib.rst:298 +#: ../../../library/imaplib.rst:417 msgid "" "Get the ``quota`` *root*'s resource usage and limits. This method is part of " "the IMAP4 QUOTA extension defined in rfc2087." msgstr "" -#: ../../../library/imaplib.rst:304 +#: ../../../library/imaplib.rst:423 msgid "" "Get the list of ``quota`` ``roots`` for the named *mailbox*. This method is " "part of the IMAP4 QUOTA extension defined in rfc2087." msgstr "" -#: ../../../library/imaplib.rst:310 +#: ../../../library/imaplib.rst:429 +msgid "" +"Send client identification information to the server and return the " +"identification information sent back by the server (the ``ID`` command, " +"defined in :rfc:`2971`). *fields* is a mapping of field names to values (for " +"example, ``{'name': 'myclient', 'version': '1.0'}``); a value can be " +"``None``. The server must support the ``ID`` capability." +msgstr "" + +#: ../../../library/imaplib.rst:442 msgid "" "Return an :class:`!Idler`: an iterable context manager implementing the " "IMAP4 ``IDLE`` command as defined in :rfc:`2177`." msgstr "" -#: ../../../library/imaplib.rst:313 +#: ../../../library/imaplib.rst:445 msgid "" "The returned object sends the ``IDLE`` command when activated by the :" "keyword:`with` statement, produces IMAP untagged responses via the :term:" "`iterator` protocol, and sends ``DONE`` upon context exit." msgstr "" -#: ../../../library/imaplib.rst:317 +#: ../../../library/imaplib.rst:449 msgid "" "All untagged responses that arrive after sending the ``IDLE`` command " "(including any that arrive before the server acknowledges the command) will " @@ -384,13 +544,13 @@ msgid "" "``IDLE`` ends, using :meth:`IMAP4.response`." msgstr "" -#: ../../../library/imaplib.rst:323 +#: ../../../library/imaplib.rst:455 msgid "" "Responses are represented as ``(type, [data, ...])`` tuples, as described " "in :ref:`IMAP4 Objects `." msgstr "" -#: ../../../library/imaplib.rst:326 +#: ../../../library/imaplib.rst:458 msgid "" "The *duration* argument sets a maximum duration (in seconds) to keep idling, " "after which any ongoing iteration will stop. It can be an :class:`int` or :" @@ -400,13 +560,13 @@ msgid "" "``None`` on :class:`IMAP4_stream` connections." msgstr "" -#: ../../../library/imaplib.rst:346 +#: ../../../library/imaplib.rst:478 msgid "" "Yield a burst of responses no more than *interval* seconds apart (expressed " "as an :class:`int` or :class:`float`)." msgstr "" -#: ../../../library/imaplib.rst:349 +#: ../../../library/imaplib.rst:481 msgid "" "This :term:`generator` is an alternative to iterating one response at a " "time, intended to aid in efficient batch processing. It retrieves the next " @@ -414,13 +574,13 @@ msgid "" "example, a rapid series of ``EXPUNGE`` responses after a bulk delete.)" msgstr "" -#: ../../../library/imaplib.rst:355 +#: ../../../library/imaplib.rst:487 msgid "" "Requires a socket connection; does not work on :class:`IMAP4_stream` " "connections." msgstr "" -#: ../../../library/imaplib.rst:371 +#: ../../../library/imaplib.rst:503 msgid "" "The ``IDLE`` context's maximum duration, as passed to :meth:`IMAP4.idle`, is " "respected when waiting for the first response in a burst. Therefore, an " @@ -429,7 +589,7 @@ msgid "" "loop." msgstr "" -#: ../../../library/imaplib.rst:380 +#: ../../../library/imaplib.rst:512 msgid "" "The iterator returned by :meth:`IMAP4.idle` is usable only within a :keyword:" "`with` statement. Before or after that context, unsolicited responses are " @@ -437,7 +597,7 @@ msgid "" "meth:`IMAP4.response`." msgstr "" -#: ../../../library/imaplib.rst:387 +#: ../../../library/imaplib.rst:519 msgid "" "The :class:`!Idler` class name and structure are internal interfaces, " "subject to change. Calling code can rely on its context management, " @@ -445,58 +605,91 @@ msgid "" "instantiate, compare, or otherwise directly reference the class." msgstr "" -#: ../../../library/imaplib.rst:397 +#: ../../../library/imaplib.rst:529 msgid "" "List mailbox names in *directory* matching *pattern*. *directory* defaults " "to the top-level mail folder, and *pattern* defaults to match anything. " "Returned data contains a list of ``LIST`` responses." msgstr "" -#: ../../../library/imaplib.rst:404 +#: ../../../library/imaplib.rst:536 msgid "" "Identify the client using a plaintext password. The *password* will be " "quoted." msgstr "" -#: ../../../library/imaplib.rst:409 +#: ../../../library/imaplib.rst:541 msgid "" "Force use of ``CRAM-MD5`` authentication when identifying the client to " -"protect the password. Will only work if the server ``CAPABILITY`` response " -"includes the phrase ``AUTH=CRAM-MD5``." +"protect the password. It will only work if the server ``CAPABILITY`` " +"response includes the phrase ``AUTH=CRAM-MD5``." msgstr "" -#: ../../../library/imaplib.rst:413 +#: ../../../library/imaplib.rst:545 msgid "An :exc:`IMAP4.error` is raised if MD5 support is not available." msgstr "" -#: ../../../library/imaplib.rst:419 +#: ../../../library/imaplib.rst:551 +msgid "Authenticate using the ``PLAIN`` SASL mechanism (:rfc:`4616`)." +msgstr "" + +#: ../../../library/imaplib.rst:553 +msgid "" +"This is a plaintext authentication mechanism that can be used instead of :" +"meth:`login` when UTF-8 support is required (see :rfc:`6855`). Since the " +"credentials are only base64-encoded, not encrypted, this method should only " +"be used over a TLS-protected connection, such as :class:`IMAP4_SSL` or " +"after :meth:`starttls`." +msgstr "" + +#: ../../../library/imaplib.rst:559 +msgid "" +"It will only work if the server supports the ``PLAIN`` mechanism, which it " +"need not advertise as ``AUTH=PLAIN`` in its ``CAPABILITY`` response." +msgstr "" + +#: ../../../library/imaplib.rst:568 msgid "Shutdown connection to server. Returns server ``BYE`` response." msgstr "" -#: ../../../library/imaplib.rst:421 +#: ../../../library/imaplib.rst:570 msgid "The method no longer ignores silently arbitrary exceptions." msgstr "" -#: ../../../library/imaplib.rst:427 +#: ../../../library/imaplib.rst:576 msgid "" "List subscribed mailbox names in directory matching pattern. *directory* " "defaults to the top level directory and *pattern* defaults to match any " "mailbox. Returned data are tuples of message part envelope and data." msgstr "" -#: ../../../library/imaplib.rst:434 +#: ../../../library/imaplib.rst:583 +msgid "Move *message_set* messages onto end of *new_mailbox*." +msgstr "" + +#: ../../../library/imaplib.rst:585 +msgid "The server must support the ``MOVE`` capability (:rfc:`6851`)." +msgstr "" + +#: ../../../library/imaplib.rst:587 +msgid "" +"If *uid* is true, *message_set* is a set of UIDs and the ``UID MOVE`` " +"command is used instead of ``MOVE``." +msgstr "" + +#: ../../../library/imaplib.rst:595 msgid "Show my ACLs for a mailbox (i.e. the rights that I have on mailbox)." msgstr "" -#: ../../../library/imaplib.rst:439 +#: ../../../library/imaplib.rst:600 msgid "Returns IMAP namespaces as defined in :rfc:`2342`." msgstr "" -#: ../../../library/imaplib.rst:444 +#: ../../../library/imaplib.rst:605 msgid "Send ``NOOP`` to server." msgstr "" -#: ../../../library/imaplib.rst:449 +#: ../../../library/imaplib.rst:610 msgid "" "Opens socket to *port* at *host*. The optional *timeout* parameter specifies " "a timeout in seconds for the connection attempt. If timeout is not given or " @@ -509,54 +702,54 @@ msgid "" "You may override this method." msgstr "" -#: ../../../library/imaplib.rst:459 +#: ../../../library/imaplib.rst:620 msgid "" "Raises an :ref:`auditing event ` ``imaplib.open`` with arguments " "``self``, ``host``, ``port``." msgstr "" -#: ../../../library/imaplib.rst:461 +#: ../../../library/imaplib.rst:622 msgid "The *timeout* parameter was added." msgstr "" -#: ../../../library/imaplib.rst:466 +#: ../../../library/imaplib.rst:627 msgid "" "Fetch truncated part of a message. Returned data is a tuple of message part " "envelope and data." msgstr "" -#: ../../../library/imaplib.rst:472 +#: ../../../library/imaplib.rst:633 msgid "" "Assume authentication as *user*. Allows an authorised administrator to proxy " "into any user's mailbox." msgstr "" -#: ../../../library/imaplib.rst:478 +#: ../../../library/imaplib.rst:639 msgid "" "Reads *size* bytes from the remote server. You may override this method." msgstr "" -#: ../../../library/imaplib.rst:483 +#: ../../../library/imaplib.rst:644 msgid "Reads one line from the remote server. You may override this method." msgstr "" -#: ../../../library/imaplib.rst:488 +#: ../../../library/imaplib.rst:649 msgid "" "Prompt server for an update. Returned data is ``None`` if no new messages, " "else value of ``RECENT`` response." msgstr "" -#: ../../../library/imaplib.rst:494 +#: ../../../library/imaplib.rst:655 msgid "Rename mailbox named *oldmailbox* to *newmailbox*." msgstr "" -#: ../../../library/imaplib.rst:499 +#: ../../../library/imaplib.rst:660 msgid "" "Return data for response *code* if received, or ``None``. Returns the given " "code, instead of the usual type." msgstr "" -#: ../../../library/imaplib.rst:505 +#: ../../../library/imaplib.rst:666 msgid "" "Search mailbox for matching messages. *charset* may be ``None``, in which " "case no ``CHARSET`` will be specified in the request to the server. The " @@ -566,63 +759,91 @@ msgid "" "`enable` command." msgstr "" -#: ../../../library/imaplib.rst:512 +#: ../../../library/imaplib.rst:673 +msgid "" +"If *uid* is true, the message numbers in the response are UIDs (``UID " +"SEARCH``)." +msgstr "" + +#: ../../../library/imaplib.rst:676 +msgid "" +"A criterion passed as :class:`str` is encoded to *charset* (which must name " +"a codec known to Python); pass :class:`bytes` to send a criterion that is " +"already encoded, for example when *charset* is one that Python does not " +"support. When *charset* is ``None`` (as it must be under ``UTF8=ACCEPT``), " +"the criterion is sent using the connection's encoding instead." +msgstr "" + +#: ../../../library/imaplib.rst:683 +msgid "" +"If *params* is given, ``?`` placeholders in the criteria are substituted " +"with the quoted parameters (see :ref:`the placeholders `)." +msgstr "" + +#: ../../../library/imaplib.rst:686 msgid "Example::" msgstr "" -#: ../../../library/imaplib.rst:523 +#: ../../../library/imaplib.rst:697 ../../../library/imaplib.rst:771 +#: ../../../library/imaplib.rst:869 +msgid "" +"Added the *params* and *uid* parameters. ``str`` search criteria are encoded " +"to *charset*." +msgstr "" + +#: ../../../library/imaplib.rst:704 msgid "" "Select a mailbox. Returned data is the count of messages in *mailbox* " "(``EXISTS`` response). The default *mailbox* is ``'INBOX'``. If the " "*readonly* flag is set, modifications to the mailbox are not allowed." msgstr "" -#: ../../../library/imaplib.rst:530 +#: ../../../library/imaplib.rst:711 msgid "Sends ``data`` to the remote server. You may override this method." msgstr "" -#: ../../../library/imaplib.rst:532 +#: ../../../library/imaplib.rst:713 msgid "" "Raises an :ref:`auditing event ` ``imaplib.send`` with arguments " "``self``, ``data``." msgstr "" -#: ../../../library/imaplib.rst:537 +#: ../../../library/imaplib.rst:718 msgid "" "Set an ``ACL`` for *mailbox*. The method is non-standard, but is supported " "by the ``Cyrus`` server." msgstr "" -#: ../../../library/imaplib.rst:543 +#: ../../../library/imaplib.rst:724 msgid "" "Set ``ANNOTATION``\\ s for *mailbox*. The method is non-standard, but is " "supported by the ``Cyrus`` server." msgstr "" -#: ../../../library/imaplib.rst:549 +#: ../../../library/imaplib.rst:730 msgid "" "Set the ``quota`` *root*'s resource *limits*. This method is part of the " "IMAP4 QUOTA extension defined in rfc2087." msgstr "" -#: ../../../library/imaplib.rst:555 +#: ../../../library/imaplib.rst:736 msgid "" "Close connection established in ``open``. This method is implicitly called " "by :meth:`IMAP4.logout`. You may override this method." msgstr "" -#: ../../../library/imaplib.rst:561 +#: ../../../library/imaplib.rst:742 msgid "Returns socket instance used to connect to server." msgstr "" -#: ../../../library/imaplib.rst:566 +#: ../../../library/imaplib.rst:747 msgid "" "The ``sort`` command is a variant of ``search`` with sorting semantics for " "the results. Returned data contains a space separated list of matching " "message numbers." msgstr "" -#: ../../../library/imaplib.rst:570 +#: ../../../library/imaplib.rst:751 msgid "" "Sort has two arguments before the *search_criterion* argument(s); a " "parenthesized list of *sort_criteria*, and the searching *charset*. Note " @@ -634,68 +855,93 @@ msgid "" "searching criteria. It then returns the numbers of matching messages." msgstr "" -#: ../../../library/imaplib.rst:579 ../../../library/imaplib.rst:650 +#: ../../../library/imaplib.rst:760 +msgid "" +"If *uid* is true, the message numbers in the response are UIDs (``UID " +"SORT``)." +msgstr "" + +#: ../../../library/imaplib.rst:762 ../../../library/imaplib.rst:860 +msgid "" +"As with :meth:`search`, a *search_criterion* passed as :class:`str` is " +"encoded to *charset*; pass :class:`bytes` to send one already encoded." +msgstr "" + +#: ../../../library/imaplib.rst:766 ../../../library/imaplib.rst:864 +msgid "" +"If *params* is given, ``?`` placeholders in the search criteria are " +"substituted with the quoted parameters (see :ref:`the placeholders `)." +msgstr "" + +#: ../../../library/imaplib.rst:769 ../../../library/imaplib.rst:867 msgid "This is an ``IMAP4rev1`` extension command." msgstr "" -#: ../../../library/imaplib.rst:584 +#: ../../../library/imaplib.rst:778 msgid "" "Send a ``STARTTLS`` command. The *ssl_context* argument is optional and " "should be a :class:`ssl.SSLContext` object. This will enable encryption on " "the IMAP connection. Please read :ref:`ssl-security` for best practices." msgstr "" -#: ../../../library/imaplib.rst:591 +#: ../../../library/imaplib.rst:792 msgid "" "The method now supports hostname check with :attr:`ssl.SSLContext." "check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "" -#: ../../../library/imaplib.rst:599 +#: ../../../library/imaplib.rst:800 msgid "Request named status conditions for *mailbox*." msgstr "" -#: ../../../library/imaplib.rst:604 +#: ../../../library/imaplib.rst:805 msgid "" "Alters flag dispositions for messages in mailbox. *command* is specified by " -"section 6.4.6 of :rfc:`2060` as being one of \"FLAGS\", \"+FLAGS\", or \"-" +"section 6.4.6 of :rfc:`3501` as being one of \"FLAGS\", \"+FLAGS\", or \"-" "FLAGS\", optionally with a suffix of \".SILENT\"." msgstr "" -#: ../../../library/imaplib.rst:608 +#: ../../../library/imaplib.rst:809 +msgid "" +"If *uid* is true, *message_set* is a set of UIDs and the ``UID STORE`` " +"command is used instead of ``STORE``." +msgstr "" + +#: ../../../library/imaplib.rst:812 msgid "For example, to set the delete flag on all messages::" msgstr "" -#: ../../../library/imaplib.rst:617 +#: ../../../library/imaplib.rst:821 msgid "" "Creating flags containing ']' (for example: \"[test]\") violates :rfc:`3501` " "(the IMAP protocol). However, imaplib has historically allowed creation of " -"such tags, and popular IMAP servers, such as Gmail, accept and produce such " -"flags. There are non-Python programs which also create such tags. Although " -"it is an RFC violation and IMAP clients and servers are supposed to be " -"strict, imaplib still continues to allow such tags to be created for " +"such flags, and popular IMAP servers, such as Gmail, accept and produce such " +"flags. There are non-Python programs which also create such flags. " +"Although it is an RFC violation and IMAP clients and servers are supposed to " +"be strict, imaplib still continues to allow such flags to be created for " "backward compatibility reasons, and as of Python 3.6, handles them if they " "are sent from the server, since this improves real-world compatibility." msgstr "" -#: ../../../library/imaplib.rst:629 +#: ../../../library/imaplib.rst:836 msgid "Subscribe to new mailbox." msgstr "" -#: ../../../library/imaplib.rst:634 +#: ../../../library/imaplib.rst:841 msgid "" "The ``thread`` command is a variant of ``search`` with threading semantics " "for the results. Returned data contains a space separated list of thread " "members." msgstr "" -#: ../../../library/imaplib.rst:637 +#: ../../../library/imaplib.rst:844 msgid "" "Thread members consist of zero or more messages numbers, delimited by " "spaces, indicating successive parent and child." msgstr "" -#: ../../../library/imaplib.rst:640 +#: ../../../library/imaplib.rst:847 msgid "" "Thread has two arguments before the *search_criterion* argument(s); a " "*threading_algorithm*, and the searching *charset*. Note that unlike " @@ -708,7 +954,13 @@ msgid "" "specified threading algorithm." msgstr "" -#: ../../../library/imaplib.rst:655 +#: ../../../library/imaplib.rst:857 +msgid "" +"If *uid* is true, the message numbers in the response are UIDs (``UID " +"THREAD``)." +msgstr "" + +#: ../../../library/imaplib.rst:876 msgid "" "Execute command args with messages identified by UID, rather than message " "number. Returns response appropriate to command. At least one argument " @@ -716,11 +968,22 @@ msgid "" "an exception will be raised." msgstr "" -#: ../../../library/imaplib.rst:663 +#: ../../../library/imaplib.rst:881 +msgid "" +"If *params* is given, ``?`` placeholders in the ``SEARCH``, ``SORT`` and " +"``THREAD`` criteria or in the ``FETCH`` parts are substituted with the " +"quoted parameters (see :ref:`the placeholders `)." +msgstr "" + +#: ../../../library/imaplib.rst:885 +msgid "Added the *params* parameter." +msgstr "" + +#: ../../../library/imaplib.rst:891 msgid "Unsubscribe from old mailbox." msgstr "" -#: ../../../library/imaplib.rst:667 +#: ../../../library/imaplib.rst:895 msgid "" ":meth:`imaplib.IMAP4.unselect` frees server's resources associated with the " "selected mailbox and returns the server to the authenticated state. This " @@ -728,36 +991,36 @@ msgid "" "that no messages are permanently removed from the currently selected mailbox." msgstr "" -#: ../../../library/imaplib.rst:677 +#: ../../../library/imaplib.rst:905 msgid "" "Allow simple extension commands notified by server in ``CAPABILITY`` " "response." msgstr "" -#: ../../../library/imaplib.rst:680 +#: ../../../library/imaplib.rst:908 msgid "The following attributes are defined on instances of :class:`IMAP4`:" msgstr "" -#: ../../../library/imaplib.rst:684 +#: ../../../library/imaplib.rst:912 msgid "" "The most recent supported protocol in the ``CAPABILITY`` response from the " "server." msgstr "" -#: ../../../library/imaplib.rst:690 +#: ../../../library/imaplib.rst:918 msgid "" "Integer value to control debugging output. The initialize value is taken " "from the module variable ``Debug``. Values greater than three trace each " "command." msgstr "" -#: ../../../library/imaplib.rst:696 +#: ../../../library/imaplib.rst:924 msgid "" "Boolean value that is normally ``False``, but is set to ``True`` if an :meth:" "`enable` command is successfully issued for the ``UTF8=ACCEPT`` capability." msgstr "" -#: ../../../library/imaplib.rst:705 +#: ../../../library/imaplib.rst:933 msgid "" "Internal :class:`~io.BufferedReader` associated with the underlying socket. " "This property is documented for legacy purposes but not part of the public " @@ -765,16 +1028,23 @@ msgid "" "closed before changing it." msgstr "" -#: ../../../library/imaplib.rst:716 +#: ../../../library/imaplib.rst:944 msgid "IMAP4 Example" msgstr "" -#: ../../../library/imaplib.rst:718 +#: ../../../library/imaplib.rst:946 msgid "" "Here is a minimal example (without error checking) that opens a mailbox and " "retrieves and prints all messages::" msgstr "" +#: ../../../library/imaplib.rst:963 +msgid "" +"A ``FETCH`` response may contain additional or unsolicited data (see :rfc:" +"`3501`, section 7.4.2), so production code should inspect the whole response " +"rather than rely on ``data[0][1]``." +msgstr "" + #: ../../../library/imaplib.rst:9 msgid "IMAP4" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/inspect.pot b/main/locale/pot/LC_MESSAGES/library/inspect.pot index 4803294208c..a1dfb3e0adb 100644 --- a/main/locale/pot/LC_MESSAGES/library/inspect.pot +++ b/main/locale/pot/LC_MESSAGES/library/inspect.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -967,11 +967,10 @@ msgstr "" #: ../../../library/inspect.rst:637 msgid "" "Return ``True`` if the object is a method descriptor, but not if :func:" -"`ismethod`, :func:`isclass`, :func:`isfunction` or :func:`isbuiltin` are " -"true." +"`isclass`, :func:`ismethod` or :func:`isfunction` is true." msgstr "" -#: ../../../library/inspect.rst:641 +#: ../../../library/inspect.rst:640 msgid "" "This, for example, is true of ``int.__add__``. An object passing this test " "has a :meth:`~object.__get__` method, but not a :meth:`~object.__set__` " @@ -980,15 +979,16 @@ msgid "" "sensible, and :attr:`~definition.__doc__` often is." msgstr "" -#: ../../../library/inspect.rst:647 +#: ../../../library/inspect.rst:646 msgid "" -"Methods implemented via descriptors that also pass one of the other tests " -"return ``False`` from the :func:`ismethoddescriptor` test, simply because " -"the other tests promise more -- you can, e.g., count on having the :attr:" -"`~method.__func__` attribute (etc) when an object passes :func:`ismethod`." +"Method descriptors that also pass any of the other tests (:func:`!isclass`, :" +"func:`!ismethod` or :func:`!isfunction`) make this function return " +"``False``, simply because those other tests promise more -- you can, for " +"example, count on having the :attr:`~method.__func__` attribute when an " +"object passes :func:`ismethod`." msgstr "" -#: ../../../library/inspect.rst:653 +#: ../../../library/inspect.rst:652 msgid "" "This function no longer incorrectly reports objects with :meth:`~object." "__get__` and :meth:`~object.__delete__`, but not :meth:`~object.__set__`, as " @@ -996,90 +996,112 @@ msgid "" "descriptors)." msgstr "" -#: ../../../library/inspect.rst:661 -msgid "Return ``True`` if the object is a data descriptor." +#: ../../../library/inspect.rst:660 +msgid "" +"Return ``True`` if the object is a data descriptor, but not if :func:" +"`isclass`, :func:`ismethod` or :func:`isfunction` is true." msgstr "" #: ../../../library/inspect.rst:663 msgid "" -"Data descriptors have a :attr:`~object.__set__` or a :attr:`~object." -"__delete__` method. Examples are properties (defined in Python), getsets, " -"and members. The latter two are defined in C and there are more specific " -"tests available for those types, which is robust across Python " -"implementations. Typically, data descriptors will also have :attr:" -"`~definition.__name__` and :attr:`!__doc__` attributes (properties, getsets, " -"and members have both of these attributes), but this is not guaranteed." +"Data descriptors always have a :meth:`~object.__set__` method and/or a :meth:" +"`~object.__delete__` method. Optionally, they may also have a :meth:" +"`~object.__get__` method." +msgstr "" + +#: ../../../library/inspect.rst:667 +msgid "" +"Examples of data descriptors are :func:`properties `, getsets and " +"member descriptors. Note that for the latter two (defined only in C " +"extension modules), more specific tests are available: :func:" +"`isgetsetdescriptor` and :func:`ismemberdescriptor`, respectively." +msgstr "" + +#: ../../../library/inspect.rst:672 +msgid "" +"While data descriptors may also have :attr:`~definition.__name__` and :attr:" +"`!__doc__` attributes (as properties, getsets and member descriptors do), " +"this is not necessarily the case in general." +msgstr "" + +#: ../../../library/inspect.rst:676 +msgid "" +"This function now reports objects with only a :meth:`~object.__set__` method " +"as being data descriptors (the presence of :meth:`~object.__get__` is no " +"longer required for that). Moreover, objects with :meth:`~object." +"__delete__`, but not :meth:`~object.__set__`, are now properly recognized as " +"data descriptors as well, which was not the case previously." msgstr "" -#: ../../../library/inspect.rst:674 +#: ../../../library/inspect.rst:685 msgid "Return ``True`` if the object is a getset descriptor." msgstr "" -#: ../../../library/inspect.rst:678 +#: ../../../library/inspect.rst:689 msgid "" "getsets are attributes defined in extension modules via :c:type:" "`PyGetSetDef` structures. For Python implementations without such types, " "this method will always return ``False``." msgstr "" -#: ../../../library/inspect.rst:685 +#: ../../../library/inspect.rst:696 msgid "Return ``True`` if the object is a member descriptor." msgstr "" -#: ../../../library/inspect.rst:689 +#: ../../../library/inspect.rst:700 msgid "" "Member descriptors are attributes defined in extension modules via :c:type:" "`PyMemberDef` structures. For Python implementations without such types, " "this method will always return ``False``." msgstr "" -#: ../../../library/inspect.rst:697 +#: ../../../library/inspect.rst:708 msgid "Retrieving source code" msgstr "" -#: ../../../library/inspect.rst:701 +#: ../../../library/inspect.rst:712 msgid "" "Get the documentation string for an object, cleaned up with :func:" "`cleandoc`. If the documentation string for an object is not provided:" msgstr "" -#: ../../../library/inspect.rst:704 +#: ../../../library/inspect.rst:715 msgid "" "if the object is a class and *inherit_class_doc* is true (by default), " "retrieve the documentation string from the inheritance hierarchy;" msgstr "" -#: ../../../library/inspect.rst:706 +#: ../../../library/inspect.rst:717 msgid "" "if the object is a method, a property or a descriptor, retrieve the " "documentation string from the inheritance hierarchy;" msgstr "" -#: ../../../library/inspect.rst:708 +#: ../../../library/inspect.rst:719 msgid "" "otherwise, if *fallback_to_class_doc* is true (by default), retrieve the " "documentation string from the class of the object." msgstr "" -#: ../../../library/inspect.rst:711 +#: ../../../library/inspect.rst:722 msgid "Return ``None`` if the documentation string is invalid or missing." msgstr "" -#: ../../../library/inspect.rst:713 +#: ../../../library/inspect.rst:724 msgid "Documentation strings are now inherited if not overridden." msgstr "" -#: ../../../library/inspect.rst:716 +#: ../../../library/inspect.rst:727 msgid "Added parameters *inherit_class_doc* and *fallback_to_class_doc*." msgstr "" -#: ../../../library/inspect.rst:719 +#: ../../../library/inspect.rst:730 msgid "" "Documentation strings on :class:`~functools.cached_property` objects are now " "inherited if not overridden." msgstr "" -#: ../../../library/inspect.rst:725 +#: ../../../library/inspect.rst:736 msgid "" "Return in a single string any lines of comments immediately preceding the " "object's source code (for a class, function, or method), or at the top of " @@ -1088,27 +1110,27 @@ msgid "" "been defined in C or the interactive shell." msgstr "" -#: ../../../library/inspect.rst:734 +#: ../../../library/inspect.rst:745 msgid "" "Return the name of the (text or binary) file in which an object was defined. " "This will fail with a :exc:`TypeError` if the object is a built-in module, " "class, or function." msgstr "" -#: ../../../library/inspect.rst:741 +#: ../../../library/inspect.rst:752 msgid "" "Try to guess which module an object was defined in. Return ``None`` if the " "module cannot be determined." msgstr "" -#: ../../../library/inspect.rst:747 +#: ../../../library/inspect.rst:758 msgid "" "Return the name of the Python source file in which an object was defined or " "``None`` if no way can be identified to get the source. This will fail with " "a :exc:`TypeError` if the object is a built-in module, class, or function." msgstr "" -#: ../../../library/inspect.rst:755 +#: ../../../library/inspect.rst:766 msgid "" "Return a list of source lines and starting line number for an object. The " "argument may be a module, class, method, function, traceback, frame, or code " @@ -1119,13 +1141,13 @@ msgid "" "built-in module, class, or function." msgstr "" -#: ../../../library/inspect.rst:764 ../../../library/inspect.rst:778 +#: ../../../library/inspect.rst:775 ../../../library/inspect.rst:789 msgid "" ":exc:`OSError` is raised instead of :exc:`IOError`, now an alias of the " "former." msgstr "" -#: ../../../library/inspect.rst:771 +#: ../../../library/inspect.rst:782 msgid "" "Return the text of the source code for an object. The argument may be a " "module, class, method, function, traceback, frame, or code object. The " @@ -1134,13 +1156,13 @@ msgid "" "object is a built-in module, class, or function." msgstr "" -#: ../../../library/inspect.rst:785 +#: ../../../library/inspect.rst:796 msgid "" "Clean up indentation from docstrings that are indented to line up with " "blocks of code." msgstr "" -#: ../../../library/inspect.rst:788 +#: ../../../library/inspect.rst:799 msgid "" "All leading whitespace is removed from the first line. Any leading " "whitespace that can be uniformly removed from the second line onwards is " @@ -1148,28 +1170,28 @@ msgid "" "Also, all tabs are expanded to spaces." msgstr "" -#: ../../../library/inspect.rst:797 +#: ../../../library/inspect.rst:808 msgid "Introspecting callables with the Signature object" msgstr "" -#: ../../../library/inspect.rst:801 +#: ../../../library/inspect.rst:812 msgid "" "The :class:`Signature` object represents the call signature of a callable " "object and its return annotation. To retrieve a :class:`!Signature` object, " "use the :func:`!signature` function." msgstr "" -#: ../../../library/inspect.rst:808 +#: ../../../library/inspect.rst:819 msgid "Return a :class:`Signature` object for the given *callable*:" msgstr "" -#: ../../../library/inspect.rst:827 +#: ../../../library/inspect.rst:838 msgid "" "Accepts a wide range of Python callables, from plain functions and classes " "to :func:`functools.partial` objects." msgstr "" -#: ../../../library/inspect.rst:830 +#: ../../../library/inspect.rst:841 msgid "" "If some of the annotations are strings (e.g., because ``from __future__ " "import annotations`` was used), :func:`signature` will attempt to " @@ -1184,7 +1206,7 @@ msgid "" "STRING`` to return annotations in string format." msgstr "" -#: ../../../library/inspect.rst:844 +#: ../../../library/inspect.rst:855 msgid "" "Raises :exc:`ValueError` if no signature can be provided, and :exc:" "`TypeError` if that type of object is not supported. Also, if the " @@ -1193,36 +1215,36 @@ msgid "" "get_annotations` could potentially raise any kind of exception." msgstr "" -#: ../../../library/inspect.rst:850 +#: ../../../library/inspect.rst:861 msgid "" "A slash (/) in the signature of a function denotes that the parameters prior " "to it are positional-only. For more info, see :ref:`the FAQ entry on " "positional-only parameters `." msgstr "" -#: ../../../library/inspect.rst:854 +#: ../../../library/inspect.rst:865 msgid "" "The *follow_wrapped* parameter was added. Pass ``False`` to get a signature " "of *callable* specifically (``callable.__wrapped__`` will not be used to " "unwrap decorated callables.)" msgstr "" -#: ../../../library/inspect.rst:860 ../../../library/inspect.rst:996 +#: ../../../library/inspect.rst:871 ../../../library/inspect.rst:1007 msgid "The *globals*, *locals*, and *eval_str* parameters were added." msgstr "" -#: ../../../library/inspect.rst:863 ../../../library/inspect.rst:1289 +#: ../../../library/inspect.rst:874 ../../../library/inspect.rst:1300 msgid "The *annotation_format* parameter was added." msgstr "" -#: ../../../library/inspect.rst:868 +#: ../../../library/inspect.rst:879 msgid "" "Some callables may not be introspectable in certain implementations of " "Python. For example, in CPython, some built-in functions defined in C " "provide no metadata about their arguments." msgstr "" -#: ../../../library/inspect.rst:874 +#: ../../../library/inspect.rst:885 msgid "" "If the passed object has a :attr:`!__signature__` attribute, we may use it " "to create the signature. The exact semantics are an implementation detail " @@ -1230,14 +1252,14 @@ msgid "" "semantics." msgstr "" -#: ../../../library/inspect.rst:882 +#: ../../../library/inspect.rst:893 msgid "" "A :class:`!Signature` object represents the call signature of a function and " "its return annotation. For each parameter accepted by the function it " "stores a :class:`Parameter` object in its :attr:`parameters` collection." msgstr "" -#: ../../../library/inspect.rst:887 +#: ../../../library/inspect.rst:898 msgid "" "The optional *parameters* argument is a sequence of :class:`Parameter` " "objects, which is validated to check that there are no parameters with " @@ -1246,54 +1268,54 @@ msgid "" "defaults follow parameters without defaults." msgstr "" -#: ../../../library/inspect.rst:893 +#: ../../../library/inspect.rst:904 msgid "" "The optional *return_annotation* argument can be an arbitrary Python object. " "It represents the \"return\" annotation of the callable." msgstr "" -#: ../../../library/inspect.rst:896 +#: ../../../library/inspect.rst:907 msgid "" ":class:`!Signature` objects are *immutable*. Use :meth:`Signature.replace` " "or :func:`copy.replace` to make a modified copy." msgstr "" -#: ../../../library/inspect.rst:899 +#: ../../../library/inspect.rst:910 msgid ":class:`!Signature` objects are now picklable and :term:`hashable`." msgstr "" -#: ../../../library/inspect.rst:904 +#: ../../../library/inspect.rst:915 msgid "A special class-level marker to specify absence of a return annotation." msgstr "" -#: ../../../library/inspect.rst:908 +#: ../../../library/inspect.rst:919 msgid "" "An ordered mapping of parameters' names to the corresponding :class:" "`Parameter` objects. Parameters appear in strict definition order, " "including keyword-only parameters." msgstr "" -#: ../../../library/inspect.rst:912 ../../../library/inspect.rst:1284 +#: ../../../library/inspect.rst:923 ../../../library/inspect.rst:1295 msgid "" "Python only explicitly guaranteed that it preserved the declaration order of " "keyword-only parameters as of version 3.7, although in practice this order " "had always been preserved in Python 3." msgstr "" -#: ../../../library/inspect.rst:919 +#: ../../../library/inspect.rst:930 msgid "" "The \"return\" annotation for the callable. If the callable has no " "\"return\" annotation, this attribute is set to :attr:`Signature.empty`." msgstr "" -#: ../../../library/inspect.rst:924 +#: ../../../library/inspect.rst:935 msgid "" "Create a mapping from positional and keyword arguments to parameters. " "Returns :class:`BoundArguments` if ``*args`` and ``**kwargs`` match the " "signature, or raises a :exc:`TypeError`." msgstr "" -#: ../../../library/inspect.rst:930 +#: ../../../library/inspect.rst:941 msgid "" "Works the same way as :meth:`Signature.bind`, but allows the omission of " "some required arguments (mimics :func:`functools.partial` behavior.) " @@ -1301,7 +1323,7 @@ msgid "" "arguments do not match the signature." msgstr "" -#: ../../../library/inspect.rst:937 +#: ../../../library/inspect.rst:948 msgid "" "Create a new :class:`Signature` instance based on the instance :meth:" "`replace` was invoked on. It is possible to pass different *parameters* and/" @@ -1310,24 +1332,24 @@ msgid "" "Signature`, pass in :attr:`Signature.empty`." msgstr "" -#: ../../../library/inspect.rst:955 +#: ../../../library/inspect.rst:966 msgid "" ":class:`Signature` objects are also supported by the generic function :func:" "`copy.replace`." msgstr "" -#: ../../../library/inspect.rst:960 +#: ../../../library/inspect.rst:971 msgid "Create a string representation of the :class:`Signature` object." msgstr "" -#: ../../../library/inspect.rst:962 +#: ../../../library/inspect.rst:973 msgid "" "If *max_width* is passed, the method will attempt to fit the signature into " "lines of at most *max_width* characters. If the signature is longer than " "*max_width*, all parameters will be on separate lines." msgstr "" -#: ../../../library/inspect.rst:967 +#: ../../../library/inspect.rst:978 msgid "" "If *quote_annotation_strings* is False, :term:`annotations ` in " "the signature are displayed without opening and closing quotation marks if " @@ -1336,151 +1358,151 @@ msgid "" "annotations`` was used." msgstr "" -#: ../../../library/inspect.rst:975 +#: ../../../library/inspect.rst:986 msgid "The *unquote_annotations* parameter was added." msgstr "" -#: ../../../library/inspect.rst:980 +#: ../../../library/inspect.rst:991 msgid "" "Return a :class:`Signature` (or its subclass) object for a given callable " "*obj*." msgstr "" -#: ../../../library/inspect.rst:983 +#: ../../../library/inspect.rst:994 msgid "This method simplifies subclassing of :class:`Signature`:" msgstr "" -#: ../../../library/inspect.rst:992 +#: ../../../library/inspect.rst:1003 msgid "Its behavior is otherwise identical to that of :func:`signature`." msgstr "" -#: ../../../library/inspect.rst:1002 +#: ../../../library/inspect.rst:1013 msgid "" ":class:`!Parameter` objects are *immutable*. Instead of modifying a :class:`!" "Parameter` object, you can use :meth:`Parameter.replace` or :func:`copy." "replace` to create a modified copy." msgstr "" -#: ../../../library/inspect.rst:1006 +#: ../../../library/inspect.rst:1017 msgid "Parameter objects are now picklable and :term:`hashable`." msgstr "" -#: ../../../library/inspect.rst:1011 +#: ../../../library/inspect.rst:1022 msgid "" "A special class-level marker to specify absence of default values and " "annotations." msgstr "" -#: ../../../library/inspect.rst:1016 +#: ../../../library/inspect.rst:1027 msgid "" "The name of the parameter as a string. The name must be a valid Python " "identifier." msgstr "" -#: ../../../library/inspect.rst:1021 +#: ../../../library/inspect.rst:1032 msgid "" "CPython generates implicit parameter names of the form ``.0`` on the code " "objects used to implement comprehensions and generator expressions." msgstr "" -#: ../../../library/inspect.rst:1025 +#: ../../../library/inspect.rst:1036 msgid "" "These parameter names are now exposed by this module as names like " "``implicit0``." msgstr "" -#: ../../../library/inspect.rst:1031 +#: ../../../library/inspect.rst:1042 msgid "" "The default value for the parameter. If the parameter has no default value, " "this attribute is set to :attr:`Parameter.empty`." msgstr "" -#: ../../../library/inspect.rst:1036 +#: ../../../library/inspect.rst:1047 msgid "" "The annotation for the parameter. If the parameter has no annotation, this " "attribute is set to :attr:`Parameter.empty`." msgstr "" -#: ../../../library/inspect.rst:1041 +#: ../../../library/inspect.rst:1052 msgid "" "Describes how argument values are bound to the parameter. The possible " "values are accessible via :class:`Parameter` (like ``Parameter." "KEYWORD_ONLY``), and support comparison and ordering, in the following order:" msgstr "" -#: ../../../library/inspect.rst:1048 +#: ../../../library/inspect.rst:1059 msgid "Name" msgstr "" -#: ../../../library/inspect.rst:1048 +#: ../../../library/inspect.rst:1059 msgid "Meaning" msgstr "" -#: ../../../library/inspect.rst:1050 +#: ../../../library/inspect.rst:1061 msgid "*POSITIONAL_ONLY*" msgstr "" -#: ../../../library/inspect.rst:1050 +#: ../../../library/inspect.rst:1061 msgid "" "Value must be supplied as a positional argument. Positional only parameters " "are those which appear before a ``/`` entry (if present) in a Python " "function definition." msgstr "" -#: ../../../library/inspect.rst:1055 +#: ../../../library/inspect.rst:1066 msgid "*POSITIONAL_OR_KEYWORD*" msgstr "" -#: ../../../library/inspect.rst:1055 +#: ../../../library/inspect.rst:1066 msgid "" "Value may be supplied as either a keyword or positional argument (this is " "the standard binding behaviour for functions implemented in Python.)" msgstr "" -#: ../../../library/inspect.rst:1060 +#: ../../../library/inspect.rst:1071 msgid "*VAR_POSITIONAL*" msgstr "" -#: ../../../library/inspect.rst:1060 +#: ../../../library/inspect.rst:1071 msgid "" "A tuple of positional arguments that aren't bound to any other parameter. " "This corresponds to a ``*args`` parameter in a Python function definition." msgstr "" -#: ../../../library/inspect.rst:1065 +#: ../../../library/inspect.rst:1076 msgid "*KEYWORD_ONLY*" msgstr "" -#: ../../../library/inspect.rst:1065 +#: ../../../library/inspect.rst:1076 msgid "" "Value must be supplied as a keyword argument. Keyword only parameters are " "those which appear after a ``*`` or ``*args`` entry in a Python function " "definition." msgstr "" -#: ../../../library/inspect.rst:1070 +#: ../../../library/inspect.rst:1081 msgid "*VAR_KEYWORD*" msgstr "" -#: ../../../library/inspect.rst:1070 +#: ../../../library/inspect.rst:1081 msgid "" "A dict of keyword arguments that aren't bound to any other parameter. This " "corresponds to a ``**kwargs`` parameter in a Python function definition." msgstr "" -#: ../../../library/inspect.rst:1076 +#: ../../../library/inspect.rst:1087 msgid "Example: print all keyword-only arguments without default values:" msgstr "" -#: ../../../library/inspect.rst:1092 +#: ../../../library/inspect.rst:1103 msgid "Describes an enum value of :attr:`Parameter.kind`." msgstr "" -#: ../../../library/inspect.rst:1096 +#: ../../../library/inspect.rst:1107 msgid "Example: print all descriptions of arguments:" msgstr "" -#: ../../../library/inspect.rst:1113 +#: ../../../library/inspect.rst:1124 msgid "" "Create a new :class:`Parameter` instance based on the instance replaced was " "invoked on. To override a :class:`!Parameter` attribute, pass the " @@ -1488,101 +1510,101 @@ msgid "" "a :class:`!Parameter`, pass :attr:`Parameter.empty`." msgstr "" -#: ../../../library/inspect.rst:1131 +#: ../../../library/inspect.rst:1142 msgid "" ":class:`Parameter` objects are also supported by the generic function :func:" "`copy.replace`." msgstr "" -#: ../../../library/inspect.rst:1134 +#: ../../../library/inspect.rst:1145 msgid "" "In Python 3.3 :class:`Parameter` objects were allowed to have ``name`` set " "to ``None`` if their ``kind`` was set to ``POSITIONAL_ONLY``. This is no " "longer permitted." msgstr "" -#: ../../../library/inspect.rst:1141 +#: ../../../library/inspect.rst:1152 msgid "" "Result of a :meth:`Signature.bind` or :meth:`Signature.bind_partial` call. " "Holds the mapping of arguments to the function's parameters." msgstr "" -#: ../../../library/inspect.rst:1146 +#: ../../../library/inspect.rst:1157 msgid "" "A mutable mapping of parameters' names to arguments' values. Contains only " "explicitly bound arguments. Changes in :attr:`arguments` will reflect in :" "attr:`args` and :attr:`kwargs`." msgstr "" -#: ../../../library/inspect.rst:1150 +#: ../../../library/inspect.rst:1161 msgid "" "Should be used in conjunction with :attr:`Signature.parameters` for any " "argument processing purposes." msgstr "" -#: ../../../library/inspect.rst:1155 +#: ../../../library/inspect.rst:1166 msgid "" "Arguments for which :meth:`Signature.bind` or :meth:`Signature.bind_partial` " "relied on a default value are skipped. However, if needed, use :meth:" "`BoundArguments.apply_defaults` to add them." msgstr "" -#: ../../../library/inspect.rst:1160 +#: ../../../library/inspect.rst:1171 msgid "" ":attr:`arguments` is now of type :class:`dict`. Formerly, it was of type :" "class:`collections.OrderedDict`." msgstr "" -#: ../../../library/inspect.rst:1166 +#: ../../../library/inspect.rst:1177 msgid "" "A tuple of positional arguments values. Dynamically computed from the :attr:" "`arguments` attribute." msgstr "" -#: ../../../library/inspect.rst:1171 +#: ../../../library/inspect.rst:1182 msgid "" "A dict of keyword arguments values. Dynamically computed from the :attr:" "`arguments` attribute. Arguments that can be passed positionally are " "included in :attr:`args` instead." msgstr "" -#: ../../../library/inspect.rst:1177 +#: ../../../library/inspect.rst:1188 msgid "A reference to the parent :class:`Signature` object." msgstr "" -#: ../../../library/inspect.rst:1181 +#: ../../../library/inspect.rst:1192 msgid "Set default values for missing arguments." msgstr "" -#: ../../../library/inspect.rst:1183 +#: ../../../library/inspect.rst:1194 msgid "" "For variable-positional arguments (``*args``) the default is an empty tuple." msgstr "" -#: ../../../library/inspect.rst:1186 +#: ../../../library/inspect.rst:1197 msgid "" "For variable-keyword arguments (``**kwargs``) the default is an empty dict." msgstr "" -#: ../../../library/inspect.rst:1199 +#: ../../../library/inspect.rst:1210 msgid "" "The :attr:`args` and :attr:`kwargs` properties can be used to invoke " "functions:" msgstr "" -#: ../../../library/inspect.rst:1214 +#: ../../../library/inspect.rst:1225 msgid ":pep:`362` - Function Signature Object." msgstr "" -#: ../../../library/inspect.rst:1215 +#: ../../../library/inspect.rst:1226 msgid "The detailed specification, implementation details and examples." msgstr "" -#: ../../../library/inspect.rst:1221 +#: ../../../library/inspect.rst:1232 msgid "Classes and functions" msgstr "" -#: ../../../library/inspect.rst:1225 +#: ../../../library/inspect.rst:1236 msgid "" "Arrange the given list of classes into a hierarchy of nested lists. Where a " "nested list appears, it contains classes derived from the class whose entry " @@ -1593,19 +1615,19 @@ msgid "" "will appear multiple times." msgstr "" -#: ../../../library/inspect.rst:1236 +#: ../../../library/inspect.rst:1247 msgid "" "Get the names and default values of a Python function's parameters. A :term:" "`named tuple` is returned:" msgstr "" -#: ../../../library/inspect.rst:1239 +#: ../../../library/inspect.rst:1250 msgid "" "``FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, " "annotations)``" msgstr "" -#: ../../../library/inspect.rst:1242 +#: ../../../library/inspect.rst:1253 msgid "" "*args* is a list of the positional parameter names. *varargs* is the name of " "the ``*`` parameter or ``None`` if arbitrary positional arguments are not " @@ -1620,7 +1642,7 @@ msgid "" "report the function return value annotation (if any)." msgstr "" -#: ../../../library/inspect.rst:1257 +#: ../../../library/inspect.rst:1268 msgid "" "Note that :func:`signature` and :ref:`Signature Object ` provide the recommended API for callable introspection, and support " @@ -1630,7 +1652,7 @@ msgid "" "``inspect`` module API." msgstr "" -#: ../../../library/inspect.rst:1264 +#: ../../../library/inspect.rst:1275 msgid "" "A member of the :class:`annotationlib.Format` enum can be passed to the " "*annotation_format* parameter to control the format of the returned " @@ -1639,14 +1661,14 @@ msgid "" "``VALUE`` format, creation of some argspecs may raise an exception." msgstr "" -#: ../../../library/inspect.rst:1272 +#: ../../../library/inspect.rst:1283 msgid "" "This function is now based on :func:`signature`, but still ignores " "``__wrapped__`` attributes and includes the already bound first parameter in " "the signature output for bound methods." msgstr "" -#: ../../../library/inspect.rst:1277 +#: ../../../library/inspect.rst:1288 msgid "" "This method was previously documented as deprecated in favour of :func:" "`signature` in Python 3.5, but that decision has been reversed in order to " @@ -1654,7 +1676,7 @@ msgid "" "code migrating away from the legacy :func:`!getargspec` API." msgstr "" -#: ../../../library/inspect.rst:1295 +#: ../../../library/inspect.rst:1306 msgid "" "Get information about arguments passed into a particular frame. A :term:" "`named tuple` ``ArgInfo(args, varargs, keywords, locals)`` is returned. " @@ -1663,18 +1685,18 @@ msgid "" "dictionary of the given frame." msgstr "" -#: ../../../library/inspect.rst:1302 ../../../library/inspect.rst:1312 +#: ../../../library/inspect.rst:1313 ../../../library/inspect.rst:1323 msgid "This function was inadvertently marked as deprecated in Python 3.5." msgstr "" -#: ../../../library/inspect.rst:1307 +#: ../../../library/inspect.rst:1318 msgid "" "Format a pretty argument spec from the four values returned by :func:" "`getargvalues`. The format\\* arguments are the corresponding optional " "formatting functions that are called to turn names and values into strings." msgstr "" -#: ../../../library/inspect.rst:1317 +#: ../../../library/inspect.rst:1328 msgid "" "Return a tuple of class cls's base classes, including cls, in method " "resolution order. No class appears more than once in this tuple. Note that " @@ -1682,7 +1704,7 @@ msgid "" "user-defined metatype is in use, cls will be the first element of the tuple." msgstr "" -#: ../../../library/inspect.rst:1325 +#: ../../../library/inspect.rst:1336 msgid "" "Bind the *args* and *kwds* to the argument names of the Python function or " "method *func*, as if it was called with them. For bound methods, bind also " @@ -1695,11 +1717,11 @@ msgid "" "example:" msgstr "" -#: ../../../library/inspect.rst:1351 +#: ../../../library/inspect.rst:1362 msgid "Use :meth:`Signature.bind` and :meth:`Signature.bind_partial` instead." msgstr "" -#: ../../../library/inspect.rst:1357 +#: ../../../library/inspect.rst:1368 msgid "" "Get the mapping of external name references in a Python function or method " "*func* to their current values. A :term:`named tuple` " @@ -1711,18 +1733,18 @@ msgid "" "builtins." msgstr "" -#: ../../../library/inspect.rst:1366 +#: ../../../library/inspect.rst:1377 msgid "" ":exc:`TypeError` is raised if *func* is not a Python function or method." msgstr "" -#: ../../../library/inspect.rst:1373 +#: ../../../library/inspect.rst:1384 msgid "" "Get the object wrapped by *func*. It follows the chain of :attr:" "`__wrapped__` attributes returning the last object in the chain." msgstr "" -#: ../../../library/inspect.rst:1376 +#: ../../../library/inspect.rst:1387 msgid "" "*stop* is an optional callback accepting an object in the wrapper chain as " "its sole argument that allows the unwrapping to be terminated early if the " @@ -1732,37 +1754,37 @@ msgid "" "``__signature__`` attribute defined." msgstr "" -#: ../../../library/inspect.rst:1383 +#: ../../../library/inspect.rst:1394 msgid ":exc:`ValueError` is raised if a cycle is encountered." msgstr "" -#: ../../../library/inspect.rst:1390 +#: ../../../library/inspect.rst:1401 msgid "Compute the annotations dict for an object." msgstr "" -#: ../../../library/inspect.rst:1392 +#: ../../../library/inspect.rst:1403 msgid "" "This is an alias for :func:`annotationlib.get_annotations`; see the " "documentation of that function for more information." msgstr "" -#: ../../../library/inspect.rst:1397 +#: ../../../library/inspect.rst:1408 msgid "" "This function may execute arbitrary code contained in annotations. See :ref:" "`annotationlib-security` for more information." msgstr "" -#: ../../../library/inspect.rst:1402 +#: ../../../library/inspect.rst:1413 msgid "" "This function is now an alias for :func:`annotationlib.get_annotations`. " "Calling it as ``inspect.get_annotations`` will continue to work." msgstr "" -#: ../../../library/inspect.rst:1410 +#: ../../../library/inspect.rst:1421 msgid "The interpreter stack" msgstr "" -#: ../../../library/inspect.rst:1412 +#: ../../../library/inspect.rst:1423 msgid "" "Some of the following functions return :class:`FrameInfo` objects. For " "backwards compatibility these objects allow tuple-like operations on all " @@ -1770,95 +1792,95 @@ msgid "" "may be removed in the future." msgstr "" -#: ../../../library/inspect.rst:1421 +#: ../../../library/inspect.rst:1432 msgid "The :ref:`frame object ` that the record corresponds to." msgstr "" -#: ../../../library/inspect.rst:1425 +#: ../../../library/inspect.rst:1436 msgid "" "The file name associated with the code being executed by the frame this " "record corresponds to." msgstr "" -#: ../../../library/inspect.rst:1430 +#: ../../../library/inspect.rst:1441 msgid "" "The line number of the current line associated with the code being executed " "by the frame this record corresponds to." msgstr "" -#: ../../../library/inspect.rst:1435 +#: ../../../library/inspect.rst:1446 msgid "" "The function name that is being executed by the frame this record " "corresponds to." msgstr "" -#: ../../../library/inspect.rst:1439 +#: ../../../library/inspect.rst:1450 msgid "" "A list of lines of context from the source code that's being executed by the " "frame this record corresponds to." msgstr "" -#: ../../../library/inspect.rst:1444 ../../../library/inspect.rst:1483 +#: ../../../library/inspect.rst:1455 ../../../library/inspect.rst:1494 msgid "" "The index of the current line being executed in the :attr:`code_context` " "list." msgstr "" -#: ../../../library/inspect.rst:1448 +#: ../../../library/inspect.rst:1459 msgid "" "A :class:`dis.Positions` object containing the start line number, end line " "number, start column offset, and end column offset associated with the " "instruction being executed by the frame this record corresponds to." msgstr "" -#: ../../../library/inspect.rst:1452 +#: ../../../library/inspect.rst:1463 msgid "Return a :term:`named tuple` instead of a :class:`tuple`." msgstr "" -#: ../../../library/inspect.rst:1455 +#: ../../../library/inspect.rst:1466 msgid "" ":class:`!FrameInfo` is now a class instance (that is backwards compatible " "with the previous :term:`named tuple`)." msgstr "" -#: ../../../library/inspect.rst:1464 +#: ../../../library/inspect.rst:1475 msgid "" "The file name associated with the code being executed by the frame this " "traceback corresponds to." msgstr "" -#: ../../../library/inspect.rst:1469 +#: ../../../library/inspect.rst:1480 msgid "" "The line number of the current line associated with the code being executed " "by the frame this traceback corresponds to." msgstr "" -#: ../../../library/inspect.rst:1474 +#: ../../../library/inspect.rst:1485 msgid "" "The function name that is being executed by the frame this traceback " "corresponds to." msgstr "" -#: ../../../library/inspect.rst:1478 +#: ../../../library/inspect.rst:1489 msgid "" "A list of lines of context from the source code that's being executed by the " "frame this traceback corresponds to." msgstr "" -#: ../../../library/inspect.rst:1487 +#: ../../../library/inspect.rst:1498 msgid "" "A :class:`dis.Positions` object containing the start line number, end line " "number, start column offset, and end column offset associated with the " "instruction being executed by the frame this traceback corresponds to." msgstr "" -#: ../../../library/inspect.rst:1492 +#: ../../../library/inspect.rst:1503 msgid "" ":class:`!Traceback` is now a class instance (that is backwards compatible " "with the previous :term:`named tuple`)." msgstr "" -#: ../../../library/inspect.rst:1499 +#: ../../../library/inspect.rst:1510 msgid "" "Keeping references to frame objects, as found in the first element of the " "frame records these functions return, can cause your program to create " @@ -1870,7 +1892,7 @@ msgid "" "consumption which occurs." msgstr "" -#: ../../../library/inspect.rst:1507 +#: ../../../library/inspect.rst:1518 msgid "" "Though the cycle detector will catch these, destruction of the frames (and " "local variables) can be made deterministic by removing the cycle in a :" @@ -1878,31 +1900,31 @@ msgid "" "disabled when Python was compiled or using :func:`gc.disable`. For example::" msgstr "" -#: ../../../library/inspect.rst:1519 +#: ../../../library/inspect.rst:1530 msgid "" "If you want to keep the frame around (for example to print a traceback " "later), you can also break reference cycles by using the :meth:`frame.clear` " "method." msgstr "" -#: ../../../library/inspect.rst:1523 +#: ../../../library/inspect.rst:1534 msgid "" "The optional *context* argument supported by most of these functions " "specifies the number of lines of context to return, which are centered " "around the current line." msgstr "" -#: ../../../library/inspect.rst:1530 +#: ../../../library/inspect.rst:1541 msgid "" "Get information about a frame or traceback object. A :class:`Traceback` " "object is returned." msgstr "" -#: ../../../library/inspect.rst:1533 +#: ../../../library/inspect.rst:1544 msgid "A :class:`Traceback` object is returned instead of a named tuple." msgstr "" -#: ../../../library/inspect.rst:1538 +#: ../../../library/inspect.rst:1549 msgid "" "Get a list of :class:`FrameInfo` objects for a frame and all outer frames. " "These frames represent the calls that lead to the creation of *frame*. The " @@ -1910,19 +1932,19 @@ msgid "" "represents the outermost call on *frame*'s stack." msgstr "" -#: ../../../library/inspect.rst:1543 ../../../library/inspect.rst:1558 -#: ../../../library/inspect.rst:1584 ../../../library/inspect.rst:1599 +#: ../../../library/inspect.rst:1554 ../../../library/inspect.rst:1569 +#: ../../../library/inspect.rst:1595 ../../../library/inspect.rst:1610 msgid "" "A list of :term:`named tuples ` ``FrameInfo(frame, filename, " "lineno, function, code_context, index)`` is returned." msgstr "" -#: ../../../library/inspect.rst:1548 ../../../library/inspect.rst:1563 -#: ../../../library/inspect.rst:1589 ../../../library/inspect.rst:1604 +#: ../../../library/inspect.rst:1559 ../../../library/inspect.rst:1574 +#: ../../../library/inspect.rst:1600 ../../../library/inspect.rst:1615 msgid "A list of :class:`FrameInfo` objects is returned." msgstr "" -#: ../../../library/inspect.rst:1553 +#: ../../../library/inspect.rst:1564 msgid "" "Get a list of :class:`FrameInfo` objects for a traceback's frame and all " "inner frames. These frames represent calls made as a consequence of " @@ -1930,11 +1952,11 @@ msgid "" "represents where the exception was raised." msgstr "" -#: ../../../library/inspect.rst:1568 +#: ../../../library/inspect.rst:1579 msgid "Return the frame object for the caller's stack frame." msgstr "" -#: ../../../library/inspect.rst:1572 +#: ../../../library/inspect.rst:1583 msgid "" "This function relies on Python stack frame support in the interpreter, which " "isn't guaranteed to exist in all implementations of Python. If running in " @@ -1942,14 +1964,14 @@ msgid "" "``None``." msgstr "" -#: ../../../library/inspect.rst:1580 +#: ../../../library/inspect.rst:1591 msgid "" "Return a list of :class:`FrameInfo` objects for the caller's stack. The " "first entry in the returned list represents the caller; the last entry " "represents the outermost call on the stack." msgstr "" -#: ../../../library/inspect.rst:1594 +#: ../../../library/inspect.rst:1605 msgid "" "Return a list of :class:`FrameInfo` objects for the stack between the " "current frame and the frame in which an exception currently being handled " @@ -1957,11 +1979,11 @@ msgid "" "entry represents where the exception was raised." msgstr "" -#: ../../../library/inspect.rst:1608 +#: ../../../library/inspect.rst:1619 msgid "Fetching attributes statically" msgstr "" -#: ../../../library/inspect.rst:1610 +#: ../../../library/inspect.rst:1621 msgid "" "Both :func:`getattr` and :func:`hasattr` can trigger code execution when " "fetching or checking for the existence of attributes. Descriptors, like " @@ -1969,20 +1991,20 @@ msgid "" "`~object.__getattribute__` may be called." msgstr "" -#: ../../../library/inspect.rst:1616 +#: ../../../library/inspect.rst:1627 msgid "" "For cases where you want passive introspection, like documentation tools, " "this can be inconvenient. :func:`getattr_static` has a similar signature as :" "func:`getattr` but avoids executing code when it fetches attributes." msgstr "" -#: ../../../library/inspect.rst:1623 +#: ../../../library/inspect.rst:1634 msgid "" "Retrieve attributes without triggering dynamic lookup via the descriptor " "protocol, :meth:`~object.__getattr__` or :meth:`~object.__getattribute__`." msgstr "" -#: ../../../library/inspect.rst:1627 +#: ../../../library/inspect.rst:1638 msgid "" "Note: this function may not be able to retrieve all attributes that getattr " "can fetch (like dynamically created attributes) and may find attributes that " @@ -1990,31 +2012,31 @@ msgid "" "return descriptors objects instead of instance members." msgstr "" -#: ../../../library/inspect.rst:1633 +#: ../../../library/inspect.rst:1644 msgid "" "If the instance :attr:`~object.__dict__` is shadowed by another member (for " "example a property) then this function will be unable to find instance " "members." msgstr "" -#: ../../../library/inspect.rst:1639 +#: ../../../library/inspect.rst:1650 msgid "" ":func:`getattr_static` does not resolve descriptors, for example slot " "descriptors or getset descriptors on objects implemented in C. The " "descriptor object is returned instead of the underlying attribute." msgstr "" -#: ../../../library/inspect.rst:1643 +#: ../../../library/inspect.rst:1654 msgid "" "You can handle these with code like the following. Note that for arbitrary " "getset descriptors invoking these may trigger code execution::" msgstr "" -#: ../../../library/inspect.rst:1669 +#: ../../../library/inspect.rst:1680 msgid "Current State of Generators, Coroutines, and Asynchronous Generators" msgstr "" -#: ../../../library/inspect.rst:1671 +#: ../../../library/inspect.rst:1682 msgid "" "When implementing coroutine schedulers and for other advanced uses of " "generators, it is useful to determine whether a generator is currently " @@ -2023,32 +2045,32 @@ msgid "" "generator to be determined easily." msgstr "" -#: ../../../library/inspect.rst:1679 +#: ../../../library/inspect.rst:1690 msgid "Get current state of a generator-iterator." msgstr "" -#: ../../../library/inspect.rst:1681 ../../../library/inspect.rst:1697 -#: ../../../library/inspect.rst:1714 +#: ../../../library/inspect.rst:1692 ../../../library/inspect.rst:1708 +#: ../../../library/inspect.rst:1725 msgid "Possible states are:" msgstr "" -#: ../../../library/inspect.rst:1683 +#: ../../../library/inspect.rst:1694 msgid "GEN_CREATED: Waiting to start execution." msgstr "" -#: ../../../library/inspect.rst:1684 +#: ../../../library/inspect.rst:1695 msgid "GEN_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../../library/inspect.rst:1685 +#: ../../../library/inspect.rst:1696 msgid "GEN_SUSPENDED: Currently suspended at a yield expression." msgstr "" -#: ../../../library/inspect.rst:1686 +#: ../../../library/inspect.rst:1697 msgid "GEN_CLOSED: Execution has completed." msgstr "" -#: ../../../library/inspect.rst:1692 +#: ../../../library/inspect.rst:1703 msgid "" "Get current state of a coroutine object. The function is intended to be " "used with coroutine objects created by :keyword:`async def` functions, but " @@ -2056,23 +2078,23 @@ msgid "" "``cr_frame`` attributes." msgstr "" -#: ../../../library/inspect.rst:1699 +#: ../../../library/inspect.rst:1710 msgid "CORO_CREATED: Waiting to start execution." msgstr "" -#: ../../../library/inspect.rst:1700 +#: ../../../library/inspect.rst:1711 msgid "CORO_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../../library/inspect.rst:1701 +#: ../../../library/inspect.rst:1712 msgid "CORO_SUSPENDED: Currently suspended at an await expression." msgstr "" -#: ../../../library/inspect.rst:1702 +#: ../../../library/inspect.rst:1713 msgid "CORO_CLOSED: Execution has completed." msgstr "" -#: ../../../library/inspect.rst:1708 +#: ../../../library/inspect.rst:1719 msgid "" "Get current state of an asynchronous generator object. The function is " "intended to be used with asynchronous iterator objects created by :keyword:" @@ -2081,30 +2103,30 @@ msgid "" "``ag_frame`` attributes." msgstr "" -#: ../../../library/inspect.rst:1716 +#: ../../../library/inspect.rst:1727 msgid "AGEN_CREATED: Waiting to start execution." msgstr "" -#: ../../../library/inspect.rst:1717 +#: ../../../library/inspect.rst:1728 msgid "AGEN_RUNNING: Currently being executed by the interpreter." msgstr "" -#: ../../../library/inspect.rst:1718 +#: ../../../library/inspect.rst:1729 msgid "AGEN_SUSPENDED: Currently suspended at a yield expression." msgstr "" -#: ../../../library/inspect.rst:1719 +#: ../../../library/inspect.rst:1730 msgid "AGEN_CLOSED: Execution has completed." msgstr "" -#: ../../../library/inspect.rst:1723 +#: ../../../library/inspect.rst:1734 msgid "" "The current internal state of the generator can also be queried. This is " "mostly useful for testing purposes, to ensure that internal state is being " "updated as expected:" msgstr "" -#: ../../../library/inspect.rst:1729 +#: ../../../library/inspect.rst:1740 msgid "" "Get the mapping of live local variables in *generator* to their current " "values. A dictionary is returned that maps from variable names to values. " @@ -2112,14 +2134,14 @@ msgid "" "generator, and all the same caveats apply." msgstr "" -#: ../../../library/inspect.rst:1734 +#: ../../../library/inspect.rst:1745 msgid "" "If *generator* is a :term:`generator` with no currently associated frame, " "then an empty dictionary is returned. :exc:`TypeError` is raised if " "*generator* is not a Python generator object." msgstr "" -#: ../../../library/inspect.rst:1740 +#: ../../../library/inspect.rst:1751 msgid "" "This function relies on the generator exposing a Python stack frame for " "introspection, which isn't guaranteed to be the case in all implementations " @@ -2127,90 +2149,90 @@ msgid "" "dictionary." msgstr "" -#: ../../../library/inspect.rst:1749 +#: ../../../library/inspect.rst:1760 msgid "" "This function is analogous to :func:`~inspect.getgeneratorlocals`, but works " "for coroutine objects created by :keyword:`async def` functions." msgstr "" -#: ../../../library/inspect.rst:1756 +#: ../../../library/inspect.rst:1767 msgid "" "This function is analogous to :func:`~inspect.getgeneratorlocals`, but works " "for asynchronous generator objects created by :keyword:`async def` functions " "which use the :keyword:`yield` statement." msgstr "" -#: ../../../library/inspect.rst:1766 +#: ../../../library/inspect.rst:1777 msgid "Code Objects Bit Flags" msgstr "" -#: ../../../library/inspect.rst:1768 +#: ../../../library/inspect.rst:1779 msgid "" "Python code objects have a :attr:`~codeobject.co_flags` attribute, which is " "a bitmap of the following flags:" msgstr "" -#: ../../../library/inspect.rst:1773 +#: ../../../library/inspect.rst:1784 msgid "The code object is optimized, using fast locals." msgstr "" -#: ../../../library/inspect.rst:1777 +#: ../../../library/inspect.rst:1788 msgid "" "If set, a new dict will be created for the frame's :attr:`~frame.f_locals` " "when the code object is executed." msgstr "" -#: ../../../library/inspect.rst:1782 +#: ../../../library/inspect.rst:1793 msgid "The code object has a variable positional parameter (``*args``-like)." msgstr "" -#: ../../../library/inspect.rst:1786 +#: ../../../library/inspect.rst:1797 msgid "The code object has a variable keyword parameter (``**kwargs``-like)." msgstr "" -#: ../../../library/inspect.rst:1790 +#: ../../../library/inspect.rst:1801 msgid "The flag is set when the code object is a nested function." msgstr "" -#: ../../../library/inspect.rst:1794 +#: ../../../library/inspect.rst:1805 msgid "" "The flag is set when the code object is a generator function, i.e. a " "generator object is returned when the code object is executed." msgstr "" -#: ../../../library/inspect.rst:1799 +#: ../../../library/inspect.rst:1810 msgid "" "The flag is set when the code object is a coroutine function. When the code " "object is executed it returns a coroutine object. See :pep:`492` for more " "details." msgstr "" -#: ../../../library/inspect.rst:1807 +#: ../../../library/inspect.rst:1818 msgid "" "The flag is used to transform generators into generator-based coroutines. " "Generator objects with this flag can be used in ``await`` expression, and " "can ``yield from`` coroutine objects. See :pep:`492` for more details." msgstr "" -#: ../../../library/inspect.rst:1816 +#: ../../../library/inspect.rst:1827 msgid "" "The flag is set when the code object is an asynchronous generator function. " "When the code object is executed it returns an asynchronous generator " "object. See :pep:`525` for more details." msgstr "" -#: ../../../library/inspect.rst:1824 +#: ../../../library/inspect.rst:1835 msgid "" "The flag is set when there is a docstring for the code object in the source " "code. If set, it will be the first item in :attr:`~codeobject.co_consts`." msgstr "" -#: ../../../library/inspect.rst:1832 +#: ../../../library/inspect.rst:1843 msgid "" "The flag is set when the code object is a function defined in class scope." msgstr "" -#: ../../../library/inspect.rst:1838 +#: ../../../library/inspect.rst:1849 msgid "" "The flags are specific to CPython, and may not be defined in other Python " "implementations. Furthermore, the flags are an implementation detail, and " @@ -2218,44 +2240,44 @@ msgid "" "use public APIs from the :mod:`!inspect` module for any introspection needs." msgstr "" -#: ../../../library/inspect.rst:1846 +#: ../../../library/inspect.rst:1857 msgid "Buffer flags" msgstr "" -#: ../../../library/inspect.rst:1850 +#: ../../../library/inspect.rst:1861 msgid "" "This is an :class:`enum.IntFlag` that represents the flags that can be " "passed to the :meth:`~object.__buffer__` method of objects implementing the :" "ref:`buffer protocol `." msgstr "" -#: ../../../library/inspect.rst:1854 +#: ../../../library/inspect.rst:1865 msgid "The meaning of the flags is explained at :ref:`buffer-request-types`." msgstr "" -#: ../../../library/inspect.rst:1881 +#: ../../../library/inspect.rst:1892 msgid "Command-line interface" msgstr "" -#: ../../../library/inspect.rst:1883 +#: ../../../library/inspect.rst:1894 msgid "" "The :mod:`!inspect` module also provides a basic introspection capability " "from the command line." msgstr "" -#: ../../../library/inspect.rst:1888 +#: ../../../library/inspect.rst:1899 msgid "" "By default, accepts the name of a module and prints the source of that " "module. A class or function within the module can be printed instead by " "appending a colon and the qualified name of the target object." msgstr "" -#: ../../../library/inspect.rst:1894 +#: ../../../library/inspect.rst:1905 msgid "" "Print information about the specified object rather than the source code" msgstr "" -#: ../../../library/inspect.rst:1898 +#: ../../../library/inspect.rst:1909 msgid "" "The ``--details`` option now supports basic introspection for modules " "without available source code and indicates when modules are frozen. It also " diff --git a/main/locale/pot/LC_MESSAGES/library/io.pot b/main/locale/pot/LC_MESSAGES/library/io.pot index db1a91d2b48..81594b73f25 100644 --- a/main/locale/pot/LC_MESSAGES/library/io.pot +++ b/main/locale/pot/LC_MESSAGES/library/io.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,8 +62,8 @@ msgid "" "since :exc:`IOError` is now an alias of :exc:`OSError`." msgstr "" -#: ../../../library/io.rst:44 ../../../library/io.rst:894 -#: ../../../library/io.rst:1244 +#: ../../../library/io.rst:44 ../../../library/io.rst:905 +#: ../../../library/io.rst:1255 msgid "Text I/O" msgstr "" @@ -99,7 +99,7 @@ msgid "" "`TextIOBase`." msgstr "" -#: ../../../library/io.rst:72 ../../../library/io.rst:1232 +#: ../../../library/io.rst:72 ../../../library/io.rst:1243 msgid "Binary I/O" msgstr "" @@ -621,7 +621,7 @@ msgid "" "negative" msgstr "" -#: ../../../library/io.rst:427 ../../../library/io.rst:970 +#: ../../../library/io.rst:427 ../../../library/io.rst:981 msgid "The :data:`!SEEK_*` constants." msgstr "" @@ -1063,116 +1063,129 @@ msgstr "" msgid "Return :class:`bytes` containing the entire contents of the buffer." msgstr "" -#: ../../../library/io.rst:777 +#: ../../../library/io.rst:776 +msgid "" +"Return a copy of the buffer from the current position onwards without " +"advancing the position." +msgstr "" + +#: ../../../library/io.rst:779 +msgid "" +"If *size* is less than one or omitted, at most :data:`DEFAULT_BUFFER_SIZE` " +"bytes are returned. Otherwise, at most *size* bytes are returned. Return an " +"empty :class:`bytes` object at EOF." +msgstr "" + +#: ../../../library/io.rst:788 msgid "In :class:`BytesIO`, this is the same as :meth:`~BufferedIOBase.read`." msgstr "" -#: ../../../library/io.rst:779 ../../../library/io.rst:819 +#: ../../../library/io.rst:790 ../../../library/io.rst:830 msgid "The *size* argument is now optional." msgstr "" -#: ../../../library/io.rst:784 +#: ../../../library/io.rst:795 msgid "" "In :class:`BytesIO`, this is the same as :meth:`~BufferedIOBase.readinto`." msgstr "" -#: ../../../library/io.rst:790 +#: ../../../library/io.rst:801 msgid "" "A buffered binary stream providing higher-level access to a readable, non " "seekable :class:`RawIOBase` raw binary stream. It inherits from :class:" "`BufferedIOBase`." msgstr "" -#: ../../../library/io.rst:794 +#: ../../../library/io.rst:805 msgid "" "When reading data from this object, a larger amount of data may be requested " "from the underlying raw stream, and kept in an internal buffer. The buffered " "data can then be returned directly on subsequent reads." msgstr "" -#: ../../../library/io.rst:798 +#: ../../../library/io.rst:809 msgid "" "The constructor creates a :class:`BufferedReader` for the given readable " "*raw* stream and *buffer_size*. If *buffer_size* is omitted, :data:" "`DEFAULT_BUFFER_SIZE` is used." msgstr "" -#: ../../../library/io.rst:802 +#: ../../../library/io.rst:813 msgid "" ":class:`BufferedReader` provides or overrides these methods in addition to " "those from :class:`BufferedIOBase` and :class:`IOBase`:" msgstr "" -#: ../../../library/io.rst:807 +#: ../../../library/io.rst:818 msgid "" "Return bytes from the stream without advancing the position. The number of " "bytes returned may be less or more than requested. If the underlying raw " "stream is non-blocking and the operation would block, returns empty bytes." msgstr "" -#: ../../../library/io.rst:813 +#: ../../../library/io.rst:824 msgid "" "In :class:`BufferedReader` this is the same as :meth:`io.BufferedIOBase.read`" msgstr "" -#: ../../../library/io.rst:817 +#: ../../../library/io.rst:828 msgid "" "In :class:`BufferedReader` this is the same as :meth:`io.BufferedIOBase." "read1`" msgstr "" -#: ../../../library/io.rst:824 +#: ../../../library/io.rst:835 msgid "" "A buffered binary stream providing higher-level access to a writeable, non " "seekable :class:`RawIOBase` raw binary stream. It inherits from :class:" "`BufferedIOBase`." msgstr "" -#: ../../../library/io.rst:828 +#: ../../../library/io.rst:839 msgid "" "When writing to this object, data is normally placed into an internal " "buffer. The buffer will be written out to the underlying :class:`RawIOBase` " "object under various conditions, including:" msgstr "" -#: ../../../library/io.rst:832 +#: ../../../library/io.rst:843 msgid "when the buffer gets too small for all pending data;" msgstr "" -#: ../../../library/io.rst:833 +#: ../../../library/io.rst:844 msgid "when :meth:`flush` is called;" msgstr "" -#: ../../../library/io.rst:834 +#: ../../../library/io.rst:845 msgid "" "when a :meth:`~IOBase.seek` is requested (for :class:`BufferedRandom` " "objects);" msgstr "" -#: ../../../library/io.rst:835 +#: ../../../library/io.rst:846 msgid "when the :class:`BufferedWriter` object is closed or destroyed." msgstr "" -#: ../../../library/io.rst:837 +#: ../../../library/io.rst:848 msgid "" "The constructor creates a :class:`BufferedWriter` for the given writeable " "*raw* stream. If the *buffer_size* is not given, it defaults to :data:" "`DEFAULT_BUFFER_SIZE`." msgstr "" -#: ../../../library/io.rst:841 +#: ../../../library/io.rst:852 msgid "" ":class:`BufferedWriter` provides or overrides these methods in addition to " "those from :class:`BufferedIOBase` and :class:`IOBase`:" msgstr "" -#: ../../../library/io.rst:846 +#: ../../../library/io.rst:857 msgid "" "Force bytes held in the buffer into the raw stream. A :exc:" "`BlockingIOError` should be raised if the raw stream blocks." msgstr "" -#: ../../../library/io.rst:851 +#: ../../../library/io.rst:862 msgid "" "Write the :term:`bytes-like object`, *b*, and return the number of bytes " "written. When in non-blocking mode, a :exc:`BlockingIOError` with :attr:" @@ -1180,175 +1193,175 @@ msgid "" "written out but the raw stream blocks." msgstr "" -#: ../../../library/io.rst:859 +#: ../../../library/io.rst:870 msgid "" "A buffered binary stream implementing :class:`BufferedIOBase` interfaces " "providing higher-level access to a seekable :class:`RawIOBase` raw binary " "stream." msgstr "" -#: ../../../library/io.rst:863 +#: ../../../library/io.rst:874 msgid "" "The constructor creates a reader and writer for a seekable raw stream, given " "in the first argument. If the *buffer_size* is omitted it defaults to :data:" "`DEFAULT_BUFFER_SIZE`." msgstr "" -#: ../../../library/io.rst:867 +#: ../../../library/io.rst:878 msgid "" ":class:`BufferedRandom` is capable of anything :class:`BufferedReader` or :" "class:`BufferedWriter` can do. In addition, :meth:`~IOBase.seek` and :meth:" "`~IOBase.tell` are guaranteed to be implemented." msgstr "" -#: ../../../library/io.rst:874 +#: ../../../library/io.rst:885 msgid "" "A buffered binary stream providing higher-level access to two non seekable :" "class:`RawIOBase` raw binary streams---one readable, the other writeable. It " "inherits from :class:`BufferedIOBase`." msgstr "" -#: ../../../library/io.rst:878 +#: ../../../library/io.rst:889 msgid "" "*reader* and *writer* are :class:`RawIOBase` objects that are readable and " "writeable respectively. If the *buffer_size* is omitted it defaults to :" "data:`DEFAULT_BUFFER_SIZE`." msgstr "" -#: ../../../library/io.rst:882 +#: ../../../library/io.rst:893 msgid "" ":class:`BufferedRWPair` implements all of :class:`BufferedIOBase`\\'s " "methods except for :meth:`~BufferedIOBase.detach`, which raises :exc:" "`UnsupportedOperation`." msgstr "" -#: ../../../library/io.rst:888 +#: ../../../library/io.rst:899 msgid "" ":class:`BufferedRWPair` does not attempt to synchronize accesses to its " "underlying raw streams. You should not pass it the same object as reader " "and writer; use :class:`BufferedRandom` instead." msgstr "" -#: ../../../library/io.rst:898 +#: ../../../library/io.rst:909 msgid "" "Base class for text streams. This class provides a character and line based " "interface to stream I/O. It inherits from :class:`IOBase`." msgstr "" -#: ../../../library/io.rst:901 +#: ../../../library/io.rst:912 msgid "" ":class:`TextIOBase` provides or overrides these data attributes and methods " "in addition to those from :class:`IOBase`:" msgstr "" -#: ../../../library/io.rst:906 +#: ../../../library/io.rst:917 msgid "" "The name of the encoding used to decode the stream's bytes into strings, and " "to encode strings into bytes." msgstr "" -#: ../../../library/io.rst:911 +#: ../../../library/io.rst:922 msgid "The error setting of the decoder or encoder." msgstr "" -#: ../../../library/io.rst:915 +#: ../../../library/io.rst:926 msgid "" "A string, a tuple of strings, or ``None``, indicating the newlines " "translated so far. Depending on the implementation and the initial " "constructor flags, this may not be available." msgstr "" -#: ../../../library/io.rst:921 +#: ../../../library/io.rst:932 msgid "" "The underlying binary buffer (a :class:`BufferedIOBase` or :class:" "`RawIOBase` instance) that :class:`TextIOBase` deals with. This is not part " "of the :class:`TextIOBase` API and may not exist in some implementations." msgstr "" -#: ../../../library/io.rst:928 +#: ../../../library/io.rst:939 msgid "" "Separate the underlying binary buffer from the :class:`TextIOBase` and " "return it." msgstr "" -#: ../../../library/io.rst:931 +#: ../../../library/io.rst:942 msgid "" "After the underlying buffer has been detached, the :class:`TextIOBase` is in " "an unusable state." msgstr "" -#: ../../../library/io.rst:934 +#: ../../../library/io.rst:945 msgid "" "Some :class:`TextIOBase` implementations, like :class:`StringIO`, may not " "have the concept of an underlying buffer and calling this method will raise :" "exc:`UnsupportedOperation`." msgstr "" -#: ../../../library/io.rst:942 +#: ../../../library/io.rst:953 msgid "" "Read and return at most *size* characters from the stream as a single :class:" "`str`. If *size* is negative or ``None``, reads until EOF." msgstr "" -#: ../../../library/io.rst:947 +#: ../../../library/io.rst:958 msgid "" "Read until newline or EOF and return a single :class:`str`. If the stream " "is already at EOF, an empty string is returned." msgstr "" -#: ../../../library/io.rst:950 +#: ../../../library/io.rst:961 msgid "If *size* is specified, at most *size* characters will be read." msgstr "" -#: ../../../library/io.rst:954 +#: ../../../library/io.rst:965 msgid "" "Change the stream position to the given *offset*. Behaviour depends on the " "*whence* parameter. The default value for *whence* is :data:`!SEEK_SET`." msgstr "" -#: ../../../library/io.rst:958 +#: ../../../library/io.rst:969 msgid "" ":data:`!SEEK_SET` or ``0``: seek from the start of the stream (the default); " "*offset* must either be a number returned by :meth:`TextIOBase.tell`, or " "zero. Any other *offset* value produces undefined behaviour." msgstr "" -#: ../../../library/io.rst:962 +#: ../../../library/io.rst:973 msgid "" ":data:`!SEEK_CUR` or ``1``: \"seek\" to the current position; *offset* must " "be zero, which is a no-operation (all other values are unsupported)." msgstr "" -#: ../../../library/io.rst:965 +#: ../../../library/io.rst:976 msgid "" ":data:`!SEEK_END` or ``2``: seek to the end of the stream; *offset* must be " "zero (all other values are unsupported)." msgstr "" -#: ../../../library/io.rst:968 +#: ../../../library/io.rst:979 msgid "Return the new absolute position as an opaque number." msgstr "" -#: ../../../library/io.rst:975 +#: ../../../library/io.rst:986 msgid "" "Return the current stream position as an opaque number. The number does not " "usually represent a number of bytes in the underlying binary storage." msgstr "" -#: ../../../library/io.rst:981 +#: ../../../library/io.rst:992 msgid "" "Write the string *s* to the stream and return the number of characters " "written." msgstr "" -#: ../../../library/io.rst:988 +#: ../../../library/io.rst:999 msgid "" "A buffered text stream providing higher-level access to a :class:" "`BufferedIOBase` buffered binary stream. It inherits from :class:" "`TextIOBase`." msgstr "" -#: ../../../library/io.rst:992 +#: ../../../library/io.rst:1003 msgid "" "*encoding* gives the name of the encoding that the stream will be decoded or " "encoded with. In :ref:`UTF-8 Mode `, this defaults to UTF-8. " @@ -1357,7 +1370,7 @@ msgid "" "explicitly. See :ref:`io-text-encoding` for more information." msgstr "" -#: ../../../library/io.rst:998 +#: ../../../library/io.rst:1009 msgid "" "*errors* is an optional string that specifies how encoding and decoding " "errors are to be handled. Pass ``'strict'`` to raise a :exc:`ValueError` " @@ -1372,13 +1385,13 @@ msgid "" "that has been registered with :func:`codecs.register_error` is also valid." msgstr "" -#: ../../../library/io.rst:1014 +#: ../../../library/io.rst:1025 msgid "" "*newline* controls how line endings are handled. It can be ``None``, " "``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as follows:" msgstr "" -#: ../../../library/io.rst:1017 +#: ../../../library/io.rst:1028 msgid "" "When reading input from the stream, if *newline* is ``None``, :term:" "`universal newlines` mode is enabled. Lines in the input can end in " @@ -1390,7 +1403,7 @@ msgid "" "returned to the caller untranslated." msgstr "" -#: ../../../library/io.rst:1026 +#: ../../../library/io.rst:1037 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -1399,13 +1412,13 @@ msgid "" "characters written are translated to the given string." msgstr "" -#: ../../../library/io.rst:1032 +#: ../../../library/io.rst:1043 msgid "" "If *line_buffering* is ``True``, :meth:`~IOBase.flush` is implied when a " "call to write contains a newline character or a carriage return." msgstr "" -#: ../../../library/io.rst:1035 +#: ../../../library/io.rst:1046 msgid "" "If *write_through* is ``True``, calls to :meth:`~BufferedIOBase.write` are " "guaranteed not to be buffered: any data written on the :class:" @@ -1413,11 +1426,11 @@ msgid "" "*buffer*." msgstr "" -#: ../../../library/io.rst:1039 +#: ../../../library/io.rst:1050 msgid "The *write_through* argument has been added." msgstr "" -#: ../../../library/io.rst:1042 +#: ../../../library/io.rst:1053 msgid "" "The default *encoding* is now ``locale.getpreferredencoding(False)`` instead " "of ``locale.getpreferredencoding()``. Don't change temporary the locale " @@ -1425,114 +1438,114 @@ msgid "" "instead of the user preferred encoding." msgstr "" -#: ../../../library/io.rst:1048 +#: ../../../library/io.rst:1059 msgid "" "The *encoding* argument now supports the ``\"locale\"`` dummy encoding name." msgstr "" -#: ../../../library/io.rst:1053 +#: ../../../library/io.rst:1064 msgid "" "When the underlying raw stream is non-blocking, a :exc:`BlockingIOError` may " "be raised if a read operation cannot be completed immediately." msgstr "" -#: ../../../library/io.rst:1056 +#: ../../../library/io.rst:1067 msgid "" ":class:`TextIOWrapper` provides these data attributes and methods in " "addition to those from :class:`TextIOBase` and :class:`IOBase`:" msgstr "" -#: ../../../library/io.rst:1061 +#: ../../../library/io.rst:1072 msgid "Whether line buffering is enabled." msgstr "" -#: ../../../library/io.rst:1065 +#: ../../../library/io.rst:1076 msgid "Whether writes are passed immediately to the underlying binary buffer." msgstr "" -#: ../../../library/io.rst:1073 +#: ../../../library/io.rst:1084 msgid "" "Reconfigure this text stream using new settings for *encoding*, *errors*, " "*newline*, *line_buffering* and *write_through*." msgstr "" -#: ../../../library/io.rst:1076 +#: ../../../library/io.rst:1087 msgid "" "Parameters not specified keep current settings, except ``errors='strict'`` " "is used when *encoding* is specified but *errors* is not specified." msgstr "" -#: ../../../library/io.rst:1080 +#: ../../../library/io.rst:1091 msgid "" "It is not possible to change the encoding or newline if some data has " "already been read from the stream. On the other hand, changing encoding " "after write is possible." msgstr "" -#: ../../../library/io.rst:1084 +#: ../../../library/io.rst:1095 msgid "" "This method does an implicit stream flush before setting the new parameters." msgstr "" -#: ../../../library/io.rst:1089 +#: ../../../library/io.rst:1100 msgid "The method supports ``encoding=\"locale\"`` option." msgstr "" -#: ../../../library/io.rst:1094 +#: ../../../library/io.rst:1105 msgid "" "Set the stream position. Return the new stream position as an :class:`int`." msgstr "" -#: ../../../library/io.rst:1097 +#: ../../../library/io.rst:1108 msgid "" "Four operations are supported, given by the following argument combinations:" msgstr "" -#: ../../../library/io.rst:1100 +#: ../../../library/io.rst:1111 msgid "``seek(0, SEEK_SET)``: Rewind to the start of the stream." msgstr "" -#: ../../../library/io.rst:1101 +#: ../../../library/io.rst:1112 msgid "" "``seek(cookie, SEEK_SET)``: Restore a previous position; *cookie* **must " "be** a number returned by :meth:`tell`." msgstr "" -#: ../../../library/io.rst:1103 +#: ../../../library/io.rst:1114 msgid "``seek(0, SEEK_END)``: Fast-forward to the end of the stream." msgstr "" -#: ../../../library/io.rst:1104 +#: ../../../library/io.rst:1115 msgid "``seek(0, SEEK_CUR)``: Leave the current stream position unchanged." msgstr "" -#: ../../../library/io.rst:1106 +#: ../../../library/io.rst:1117 msgid "Any other argument combinations are invalid, and may raise exceptions." msgstr "" -#: ../../../library/io.rst:1111 +#: ../../../library/io.rst:1122 msgid ":data:`os.SEEK_SET`, :data:`os.SEEK_CUR`, and :data:`os.SEEK_END`." msgstr "" -#: ../../../library/io.rst:1115 +#: ../../../library/io.rst:1126 msgid "" "Return the stream position as an opaque number. The return value of :meth:`!" "tell` can be given as input to :meth:`seek`, to restore a previous stream " "position." msgstr "" -#: ../../../library/io.rst:1122 +#: ../../../library/io.rst:1133 msgid "" "A text stream using an in-memory text buffer. It inherits from :class:" "`TextIOBase`." msgstr "" -#: ../../../library/io.rst:1125 +#: ../../../library/io.rst:1136 msgid "" "The text buffer is discarded when the :meth:`~IOBase.close` method is called." msgstr "" -#: ../../../library/io.rst:1128 +#: ../../../library/io.rst:1139 msgid "" "The initial value of the buffer can be set by providing *initial_value*. If " "newline translation is enabled, newlines will be encoded as if by :meth:" @@ -1544,95 +1557,95 @@ msgid "" "at the end of the buffer." msgstr "" -#: ../../../library/io.rst:1137 +#: ../../../library/io.rst:1148 msgid "" "The *newline* argument works like that of :class:`TextIOWrapper`, except " "that when writing output to the stream, if *newline* is ``None``, newlines " "are written as ``\\n`` on all platforms." msgstr "" -#: ../../../library/io.rst:1141 +#: ../../../library/io.rst:1152 msgid "" ":class:`StringIO` provides this method in addition to those from :class:" "`TextIOBase` and :class:`IOBase`:" msgstr "" -#: ../../../library/io.rst:1146 +#: ../../../library/io.rst:1157 msgid "" "Return a :class:`str` containing the entire contents of the buffer. Newlines " "are decoded as if by :meth:`~TextIOBase.read`, although the stream position " "is not changed." msgstr "" -#: ../../../library/io.rst:1150 +#: ../../../library/io.rst:1161 msgid "Example usage::" msgstr "" -#: ../../../library/io.rst:1172 +#: ../../../library/io.rst:1183 msgid "" "A helper codec that decodes newlines for :term:`universal newlines` mode. It " "inherits from :class:`codecs.IncrementalDecoder`." msgstr "" -#: ../../../library/io.rst:1177 +#: ../../../library/io.rst:1188 msgid "Static Typing" msgstr "" -#: ../../../library/io.rst:1179 +#: ../../../library/io.rst:1190 msgid "" "The following protocols can be used for annotating function and method " "arguments for simple stream reading or writing operations. They are " "decorated with :deco:`typing.runtime_checkable`." msgstr "" -#: ../../../library/io.rst:1185 +#: ../../../library/io.rst:1196 msgid "" "Generic protocol for reading from a file or other input stream. ``T`` will " "usually be :class:`str` or :class:`bytes`, but can be any type that is read " "from the stream." msgstr "" -#: ../../../library/io.rst:1194 +#: ../../../library/io.rst:1205 msgid "" "Read data from the input stream and return it. If *size* is specified, it " "should be an integer, and at most *size* items (bytes/characters) will be " "read." msgstr "" -#: ../../../library/io.rst:1198 ../../../library/io.rst:1217 +#: ../../../library/io.rst:1209 ../../../library/io.rst:1228 msgid "For example::" msgstr "" -#: ../../../library/io.rst:1206 +#: ../../../library/io.rst:1217 msgid "" "Generic protocol for writing to a file or other output stream. ``T`` will " "usually be :class:`str` or :class:`bytes`, but can be any type that can be " "written to the stream." msgstr "" -#: ../../../library/io.rst:1214 +#: ../../../library/io.rst:1225 msgid "" "Write *data* to the output stream and return the number of items (bytes/" "characters) written." msgstr "" -#: ../../../library/io.rst:1222 +#: ../../../library/io.rst:1233 msgid "" "See :ref:`typing-io` for other I/O related protocols and classes that can be " "used for static type checking." msgstr "" -#: ../../../library/io.rst:1226 +#: ../../../library/io.rst:1237 msgid "Performance" msgstr "" -#: ../../../library/io.rst:1228 +#: ../../../library/io.rst:1239 msgid "" "This section discusses the performance of the provided concrete I/O " "implementations." msgstr "" -#: ../../../library/io.rst:1234 +#: ../../../library/io.rst:1245 msgid "" "By reading and writing only large chunks of data even when the user asks for " "a single byte, buffered I/O hides any inefficiency in calling and executing " @@ -1645,7 +1658,7 @@ msgid "" "data." msgstr "" -#: ../../../library/io.rst:1246 +#: ../../../library/io.rst:1257 msgid "" "Text I/O over a binary storage (such as a file) is significantly slower than " "binary I/O over the same storage, because it requires conversions between " @@ -1655,24 +1668,24 @@ msgid "" "the reconstruction algorithm used." msgstr "" -#: ../../../library/io.rst:1253 +#: ../../../library/io.rst:1264 msgid "" ":class:`StringIO`, however, is a native in-memory unicode container and will " "exhibit similar speed to :class:`BytesIO`." msgstr "" -#: ../../../library/io.rst:1257 +#: ../../../library/io.rst:1268 msgid "Multi-threading" msgstr "" -#: ../../../library/io.rst:1259 +#: ../../../library/io.rst:1270 msgid "" ":class:`FileIO` objects are thread-safe to the extent that the operating " "system calls (such as :manpage:`read(2)` under Unix) they wrap are thread-" "safe too." msgstr "" -#: ../../../library/io.rst:1262 +#: ../../../library/io.rst:1273 msgid "" "Binary buffered objects (instances of :class:`BufferedReader`, :class:" "`BufferedWriter`, :class:`BufferedRandom` and :class:`BufferedRWPair`) " @@ -1680,15 +1693,15 @@ msgid "" "them from multiple threads at once." msgstr "" -#: ../../../library/io.rst:1267 +#: ../../../library/io.rst:1278 msgid ":class:`TextIOWrapper` objects are not thread-safe." msgstr "" -#: ../../../library/io.rst:1270 +#: ../../../library/io.rst:1281 msgid "Reentrancy" msgstr "" -#: ../../../library/io.rst:1272 +#: ../../../library/io.rst:1283 msgid "" "Binary buffered objects (instances of :class:`BufferedReader`, :class:" "`BufferedWriter`, :class:`BufferedRandom` and :class:`BufferedRWPair`) are " @@ -1699,7 +1712,7 @@ msgid "" "from entering the buffered object." msgstr "" -#: ../../../library/io.rst:1280 +#: ../../../library/io.rst:1291 msgid "" "The above implicitly extends to text files, since the :func:`open` function " "will wrap a buffered object inside a :class:`TextIOWrapper`. This includes " @@ -1715,14 +1728,14 @@ msgstr "" msgid "io module" msgstr "" -#: ../../../library/io.rst:1011 ../../../library/io.rst:1167 +#: ../../../library/io.rst:1022 ../../../library/io.rst:1178 msgid "universal newlines" msgstr "" -#: ../../../library/io.rst:1011 +#: ../../../library/io.rst:1022 msgid "io.TextIOWrapper class" msgstr "" -#: ../../../library/io.rst:1167 +#: ../../../library/io.rst:1178 msgid "io.IncrementalNewlineDecoder class" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/ipaddress.pot b/main/locale/pot/LC_MESSAGES/library/ipaddress.pot index 8121c1bf32e..2a141a42119 100644 --- a/main/locale/pot/LC_MESSAGES/library/ipaddress.pot +++ b/main/locale/pot/LC_MESSAGES/library/ipaddress.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -458,8 +458,8 @@ msgid "" "ID." msgstr "" -#: ../../../library/ipaddress.rst:421 ../../../library/ipaddress.rst:805 -#: ../../../library/ipaddress.rst:941 +#: ../../../library/ipaddress.rst:421 ../../../library/ipaddress.rst:835 +#: ../../../library/ipaddress.rst:971 msgid "Operators" msgstr "" @@ -587,7 +587,7 @@ msgid "" "an IPv4 address." msgstr "" -#: ../../../library/ipaddress.rst:531 ../../../library/ipaddress.rst:751 +#: ../../../library/ipaddress.rst:531 ../../../library/ipaddress.rst:780 msgid "" "If *strict* is ``True`` and host bits are set in the supplied address, then :" "exc:`ValueError` is raised. Otherwise, the host bits are masked out to " @@ -601,7 +601,7 @@ msgid "" "incompatible to ``self``." msgstr "" -#: ../../../library/ipaddress.rst:541 ../../../library/ipaddress.rst:757 +#: ../../../library/ipaddress.rst:541 ../../../library/ipaddress.rst:786 msgid "Added the two-tuple form for the *address* constructor parameter." msgstr "" @@ -728,12 +728,25 @@ msgid "" "\">\"" msgstr "" -#: ../../../library/ipaddress.rst:724 +#: ../../../library/ipaddress.rst:723 +msgid "" +"Finds the next closest network of prefix size *next_prefix*. If " +"*next_prefix=None*, then the current network prefix will be used. Returns a " +"single network object." +msgstr "" + +#: ../../../library/ipaddress.rst:727 +msgid "" +"Raises :exc:`ValueError` if *next_prefix* is out of range or no further " +"network of the requested size exists." +msgstr "" + +#: ../../../library/ipaddress.rst:753 msgid "" "Construct an IPv6 network definition. *address* can be one of the following:" msgstr "" -#: ../../../library/ipaddress.rst:726 +#: ../../../library/ipaddress.rst:755 msgid "" "A string consisting of an IP address and an optional prefix length, " "separated by a slash (``/``). The IP address is the network address, and " @@ -741,26 +754,26 @@ msgid "" "length is provided, it's considered to be ``/128``." msgstr "" -#: ../../../library/ipaddress.rst:731 +#: ../../../library/ipaddress.rst:760 msgid "" "Note that currently expanded netmasks are not supported. That means ``2001:" "db00::0/24`` is a valid argument while ``2001:db00::0/ffff:ff00::`` is not." msgstr "" -#: ../../../library/ipaddress.rst:735 +#: ../../../library/ipaddress.rst:764 msgid "" "An integer that fits into 128 bits. This is equivalent to a single-address " "network, with the network address being *address* and the mask being " "``/128``." msgstr "" -#: ../../../library/ipaddress.rst:739 +#: ../../../library/ipaddress.rst:768 msgid "" "An integer packed into a :class:`bytes` object of length 16, big-endian. The " "interpretation is similar to an integer *address*." msgstr "" -#: ../../../library/ipaddress.rst:742 +#: ../../../library/ipaddress.rst:771 msgid "" "A two-tuple of an address description and a netmask, where the address " "description is either a string, a 128-bits integer, a 16-bytes packed " @@ -768,14 +781,14 @@ msgid "" "integer representing the prefix length." msgstr "" -#: ../../../library/ipaddress.rst:747 +#: ../../../library/ipaddress.rst:776 msgid "" "An :exc:`AddressValueError` is raised if *address* is not a valid IPv6 " "address. A :exc:`NetmaskValueError` is raised if the mask is not valid for " "an IPv6 address." msgstr "" -#: ../../../library/ipaddress.rst:780 +#: ../../../library/ipaddress.rst:809 msgid "" "Returns an iterator over the usable hosts in the network. The usable hosts " "are all the IP addresses that belong to the network, except the Subnet-" @@ -784,139 +797,139 @@ msgid "" "of 128 will return a list containing the single host address." msgstr "" -#: ../../../library/ipaddress.rst:795 +#: ../../../library/ipaddress.rst:825 msgid "" "Refer to the corresponding attribute documentation in :class:`IPv4Network`." msgstr "" -#: ../../../library/ipaddress.rst:800 +#: ../../../library/ipaddress.rst:830 msgid "" "This attribute is true for the network as a whole if it is true for both the " "network address and the broadcast address." msgstr "" -#: ../../../library/ipaddress.rst:807 +#: ../../../library/ipaddress.rst:837 msgid "" "Network objects support some operators. Unless stated otherwise, operators " "can only be applied between compatible objects (i.e. IPv4 with IPv4, IPv6 " "with IPv6)." msgstr "" -#: ../../../library/ipaddress.rst:813 ../../../library/ipaddress.rst:949 +#: ../../../library/ipaddress.rst:843 ../../../library/ipaddress.rst:979 msgid "Logical operators" msgstr "" -#: ../../../library/ipaddress.rst:815 +#: ../../../library/ipaddress.rst:845 msgid "" "Network objects can be compared with the usual set of logical operators. " "Network objects are ordered first by network address, then by net mask." msgstr "" -#: ../../../library/ipaddress.rst:820 +#: ../../../library/ipaddress.rst:850 msgid "Iteration" msgstr "" -#: ../../../library/ipaddress.rst:822 +#: ../../../library/ipaddress.rst:852 msgid "" "Network objects can be iterated to list all the addresses belonging to the " "network. For iteration, *all* hosts are returned, including unusable hosts " "(for usable hosts, use the :meth:`~IPv4Network.hosts` method). An example::" msgstr "" -#: ../../../library/ipaddress.rst:849 +#: ../../../library/ipaddress.rst:879 msgid "Networks as containers of addresses" msgstr "" -#: ../../../library/ipaddress.rst:851 +#: ../../../library/ipaddress.rst:881 msgid "Network objects can act as containers of addresses. Some examples::" msgstr "" -#: ../../../library/ipaddress.rst:864 +#: ../../../library/ipaddress.rst:894 msgid "Interface objects" msgstr "" -#: ../../../library/ipaddress.rst:866 +#: ../../../library/ipaddress.rst:896 msgid "" "Interface objects are :term:`hashable`, so they can be used as keys in " "dictionaries." msgstr "" -#: ../../../library/ipaddress.rst:871 +#: ../../../library/ipaddress.rst:901 msgid "" "Construct an IPv4 interface. The meaning of *address* is as in the " "constructor of :class:`IPv4Network`, except that arbitrary host addresses " "are always accepted." msgstr "" -#: ../../../library/ipaddress.rst:875 +#: ../../../library/ipaddress.rst:905 msgid "" ":class:`IPv4Interface` is a subclass of :class:`IPv4Address`, so it inherits " "all the attributes from that class. In addition, the following attributes " "are available:" msgstr "" -#: ../../../library/ipaddress.rst:881 +#: ../../../library/ipaddress.rst:911 msgid "The address (:class:`IPv4Address`) without network information." msgstr "" -#: ../../../library/ipaddress.rst:889 +#: ../../../library/ipaddress.rst:919 msgid "The network (:class:`IPv4Network`) this interface belongs to." msgstr "" -#: ../../../library/ipaddress.rst:897 +#: ../../../library/ipaddress.rst:927 msgid "" "A string representation of the interface with the mask in prefix notation." msgstr "" -#: ../../../library/ipaddress.rst:905 +#: ../../../library/ipaddress.rst:935 msgid "" "A string representation of the interface with the network as a net mask." msgstr "" -#: ../../../library/ipaddress.rst:913 +#: ../../../library/ipaddress.rst:943 msgid "" "A string representation of the interface with the network as a host mask." msgstr "" -#: ../../../library/ipaddress.rst:922 +#: ../../../library/ipaddress.rst:952 msgid "" "Construct an IPv6 interface. The meaning of *address* is as in the " "constructor of :class:`IPv6Network`, except that arbitrary host addresses " "are always accepted." msgstr "" -#: ../../../library/ipaddress.rst:926 +#: ../../../library/ipaddress.rst:956 msgid "" ":class:`IPv6Interface` is a subclass of :class:`IPv6Address`, so it inherits " "all the attributes from that class. In addition, the following attributes " "are available:" msgstr "" -#: ../../../library/ipaddress.rst:936 +#: ../../../library/ipaddress.rst:966 msgid "" "Refer to the corresponding attribute documentation in :class:`IPv4Interface`." msgstr "" -#: ../../../library/ipaddress.rst:943 +#: ../../../library/ipaddress.rst:973 msgid "" "Interface objects support some operators. Unless stated otherwise, " "operators can only be applied between compatible objects (i.e. IPv4 with " "IPv4, IPv6 with IPv6)." msgstr "" -#: ../../../library/ipaddress.rst:951 +#: ../../../library/ipaddress.rst:981 msgid "" "Interface objects can be compared with the usual set of logical operators." msgstr "" -#: ../../../library/ipaddress.rst:953 +#: ../../../library/ipaddress.rst:983 msgid "" "For equality comparison (``==`` and ``!=``), both the IP address and network " "must be the same for the objects to be equal. An interface will not compare " "equal to any address or network object." msgstr "" -#: ../../../library/ipaddress.rst:957 +#: ../../../library/ipaddress.rst:987 msgid "" "For ordering (``<``, ``>``, etc) the rules are different. Interface and " "address objects with the same IP version can be compared, and the address " @@ -925,15 +938,15 @@ msgid "" "then by their IP addresses." msgstr "" -#: ../../../library/ipaddress.rst:965 +#: ../../../library/ipaddress.rst:995 msgid "Other Module Level Functions" msgstr "" -#: ../../../library/ipaddress.rst:967 +#: ../../../library/ipaddress.rst:997 msgid "The module also provides the following module level functions:" msgstr "" -#: ../../../library/ipaddress.rst:971 +#: ../../../library/ipaddress.rst:1001 msgid "" "Represent an address as 4 packed bytes in network (big-endian) order. " "*address* is an integer representation of an IPv4 IP address. A :exc:" @@ -941,7 +954,7 @@ msgid "" "IP address." msgstr "" -#: ../../../library/ipaddress.rst:984 +#: ../../../library/ipaddress.rst:1014 msgid "" "Represent an address as 16 packed bytes in network (big-endian) order. " "*address* is an integer representation of an IPv6 IP address. A :exc:" @@ -949,7 +962,7 @@ msgid "" "IP address." msgstr "" -#: ../../../library/ipaddress.rst:992 +#: ../../../library/ipaddress.rst:1022 msgid "" "Return an iterator of the summarized network range given the first and last " "IP addresses. *first* is the first :class:`IPv4Address` or :class:" @@ -960,7 +973,7 @@ msgid "" "address version is not 4 or 6." msgstr "" -#: ../../../library/ipaddress.rst:1008 +#: ../../../library/ipaddress.rst:1038 msgid "" "Return an iterator of the collapsed :class:`IPv4Network` or :class:" "`IPv6Network` objects. *addresses* is an :term:`iterable` of :class:" @@ -968,38 +981,38 @@ msgid "" "if *addresses* contains mixed version objects." msgstr "" -#: ../../../library/ipaddress.rst:1021 +#: ../../../library/ipaddress.rst:1051 msgid "" "Return a key suitable for sorting between networks and addresses. Address " "and Network objects are not sortable by default; they're fundamentally " "different, so the expression::" msgstr "" -#: ../../../library/ipaddress.rst:1027 +#: ../../../library/ipaddress.rst:1057 msgid "" "doesn't make sense. There are some times however, where you may wish to " "have :mod:`!ipaddress` sort these anyway. If you need to do this, you can " "use this function as the *key* argument to :func:`sorted`." msgstr "" -#: ../../../library/ipaddress.rst:1031 +#: ../../../library/ipaddress.rst:1061 msgid "*obj* is either a network or address object." msgstr "" -#: ../../../library/ipaddress.rst:1035 +#: ../../../library/ipaddress.rst:1065 msgid "Custom Exceptions" msgstr "" -#: ../../../library/ipaddress.rst:1037 +#: ../../../library/ipaddress.rst:1067 msgid "" "To support more specific error reporting from class constructors, the module " "defines the following exceptions:" msgstr "" -#: ../../../library/ipaddress.rst:1042 +#: ../../../library/ipaddress.rst:1072 msgid "Any value error related to the address." msgstr "" -#: ../../../library/ipaddress.rst:1047 +#: ../../../library/ipaddress.rst:1077 msgid "Any value error related to the net mask." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/itertools.pot b/main/locale/pot/LC_MESSAGES/library/itertools.pot index e743dd12960..be6e375d6a1 100644 --- a/main/locale/pot/LC_MESSAGES/library/itertools.pot +++ b/main/locale/pot/LC_MESSAGES/library/itertools.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -432,10 +432,10 @@ msgid "" msgstr "" #: ../../../library/itertools.rst:97 ../../../library/itertools.rst:170 -#: ../../../library/itertools.rst:229 ../../../library/itertools.rst:272 -#: ../../../library/itertools.rst:473 ../../../library/itertools.rst:508 -#: ../../../library/itertools.rst:545 ../../../library/itertools.rst:621 -#: ../../../library/itertools.rst:682 ../../../library/itertools.rst:763 +#: ../../../library/itertools.rst:237 ../../../library/itertools.rst:280 +#: ../../../library/itertools.rst:481 ../../../library/itertools.rst:516 +#: ../../../library/itertools.rst:553 ../../../library/itertools.rst:629 +#: ../../../library/itertools.rst:690 ../../../library/itertools.rst:771 msgid "Roughly equivalent to::" msgstr "" @@ -494,17 +494,31 @@ msgid "" "Roughly equivalent to::" msgstr "" -#: ../../../library/itertools.rst:203 +#: ../../../library/itertools.rst:200 +msgid "" +"Note that :ref:`unpacking in comprehensions ` " +"provides similar functionality so that ``list(chain(p, q))`` could be " +"written as ``[*s for s in (p, q)]``." +msgstr "" + +#: ../../../library/itertools.rst:207 msgid "" "Alternate constructor for :func:`chain`. Gets chained inputs from a single " "iterable argument that is evaluated lazily. Roughly equivalent to::" msgstr "" -#: ../../../library/itertools.rst:214 +#: ../../../library/itertools.rst:215 +msgid "" +"Note that :ref:`unpacking in comprehensions ` " +"provides similar functionality so that ``list(chain." +"from_iterable(iterables))`` could be written as ``[*s for s in iterables]``." +msgstr "" + +#: ../../../library/itertools.rst:222 msgid "Return *r* length subsequences of elements from the input *iterable*." msgstr "" -#: ../../../library/itertools.rst:216 +#: ../../../library/itertools.rst:224 msgid "" "The output is a subsequence of :func:`product` keeping only entries that are " "subsequences of the *iterable*. The length of the output is given by :func:" @@ -512,27 +526,27 @@ msgid "" "when ``r > n``." msgstr "" -#: ../../../library/itertools.rst:221 +#: ../../../library/itertools.rst:229 msgid "" "The combination tuples are emitted in lexicographic order according to the " "order of the input *iterable*. If the input *iterable* is sorted, the output " "tuples will be produced in sorted order." msgstr "" -#: ../../../library/itertools.rst:225 +#: ../../../library/itertools.rst:233 msgid "" "Elements are treated as unique based on their position, not on their value. " "If the input elements are unique, there will be no repeated values within " "each combination." msgstr "" -#: ../../../library/itertools.rst:256 +#: ../../../library/itertools.rst:264 msgid "" "Return *r* length subsequences of elements from the input *iterable* " "allowing individual elements to be repeated more than once." msgstr "" -#: ../../../library/itertools.rst:259 +#: ../../../library/itertools.rst:267 msgid "" "The output is a subsequence of :func:`product` that keeps only entries that " "are subsequences (with possible repeated elements) of the *iterable*. The " @@ -540,79 +554,79 @@ msgid "" "> 0``." msgstr "" -#: ../../../library/itertools.rst:264 +#: ../../../library/itertools.rst:272 msgid "" "The combination tuples are emitted in lexicographic order according to the " "order of the input *iterable*. if the input *iterable* is sorted, the output " "tuples will be produced in sorted order." msgstr "" -#: ../../../library/itertools.rst:268 +#: ../../../library/itertools.rst:276 msgid "" "Elements are treated as unique based on their position, not on their value. " "If the input elements are unique, the generated combinations will also be " "unique." msgstr "" -#: ../../../library/itertools.rst:298 +#: ../../../library/itertools.rst:306 msgid "" "Make an iterator that returns elements from *data* where the corresponding " "element in *selectors* is true. Stops when either the *data* or *selectors* " "iterables have been exhausted. Roughly equivalent to::" msgstr "" -#: ../../../library/itertools.rst:312 +#: ../../../library/itertools.rst:320 msgid "" "Make an iterator that returns evenly spaced values beginning with *start*. " "Can be used with :func:`map` to generate consecutive data points or with :" "func:`zip` to add sequence numbers. Roughly equivalent to::" msgstr "" -#: ../../../library/itertools.rst:325 +#: ../../../library/itertools.rst:333 msgid "" "When counting with floating-point numbers, better accuracy can sometimes be " "achieved by substituting multiplicative code such as: ``(start + step * i " "for i in count())``." msgstr "" -#: ../../../library/itertools.rst:329 +#: ../../../library/itertools.rst:337 msgid "Added *step* argument and allowed non-integer arguments." msgstr "" -#: ../../../library/itertools.rst:335 +#: ../../../library/itertools.rst:343 msgid "" "Make an iterator returning elements from the *iterable* and saving a copy of " "each. When the iterable is exhausted, return elements from the saved copy. " "Repeats indefinitely. Roughly equivalent to::" msgstr "" -#: ../../../library/itertools.rst:351 +#: ../../../library/itertools.rst:359 msgid "" "This itertool may require significant auxiliary storage (depending on the " "length of the iterable)." msgstr "" -#: ../../../library/itertools.rst:357 +#: ../../../library/itertools.rst:365 msgid "" "Make an iterator that drops elements from the *iterable* while the " "*predicate* is true and afterwards returns every element. Roughly " "equivalent to::" msgstr "" -#: ../../../library/itertools.rst:373 +#: ../../../library/itertools.rst:381 msgid "" "Note this does not produce *any* output until the predicate first becomes " "false, so this itertool may have a lengthy start-up time." msgstr "" -#: ../../../library/itertools.rst:379 +#: ../../../library/itertools.rst:387 msgid "" "Make an iterator that filters elements from the *iterable* returning only " "those for which the *predicate* returns a false value. If *predicate* is " "``None``, returns the items that are false. Roughly equivalent to::" msgstr "" -#: ../../../library/itertools.rst:397 +#: ../../../library/itertools.rst:405 msgid "" "Make an iterator that returns consecutive keys and groups from the " "*iterable*. The *key* is a function computing a key value for each element. " @@ -621,7 +635,7 @@ msgid "" "sorted on the same key function." msgstr "" -#: ../../../library/itertools.rst:403 +#: ../../../library/itertools.rst:411 msgid "" "The operation of :func:`groupby` is similar to the ``uniq`` filter in Unix. " "It generates a break or new group every time the value of the key function " @@ -630,7 +644,7 @@ msgid "" "aggregates common elements regardless of their input order." msgstr "" -#: ../../../library/itertools.rst:409 +#: ../../../library/itertools.rst:417 msgid "" "The returned group is itself an iterator that shares the underlying iterable " "with :func:`groupby`. Because the source is shared, when the :func:" @@ -638,66 +652,66 @@ msgid "" "if that data is needed later, it should be stored as a list::" msgstr "" -#: ../../../library/itertools.rst:421 +#: ../../../library/itertools.rst:429 msgid ":func:`groupby` is roughly equivalent to::" msgstr "" -#: ../../../library/itertools.rst:459 +#: ../../../library/itertools.rst:467 msgid "" "Make an iterator that returns selected elements from the iterable. Works " "like sequence slicing but does not support negative values for *start*, " "*stop*, or *step*." msgstr "" -#: ../../../library/itertools.rst:463 +#: ../../../library/itertools.rst:471 msgid "" "If *start* is zero or ``None``, iteration starts at zero. Otherwise, " "elements from the iterable are skipped until *start* is reached." msgstr "" -#: ../../../library/itertools.rst:466 +#: ../../../library/itertools.rst:474 msgid "" "If *stop* is ``None``, iteration continues until the input is exhausted, if " "at all. Otherwise, it stops at the specified position." msgstr "" -#: ../../../library/itertools.rst:469 +#: ../../../library/itertools.rst:477 msgid "" "If *step* is ``None``, the step defaults to one. Elements are returned " "consecutively unless *step* is set higher than one which results in items " "being skipped." msgstr "" -#: ../../../library/itertools.rst:495 +#: ../../../library/itertools.rst:503 msgid "" "If the input is an iterator, then fully consuming the *islice* advances the " "input iterator by ``max(start, stop)`` steps regardless of the *step* value." msgstr "" -#: ../../../library/itertools.rst:502 +#: ../../../library/itertools.rst:510 msgid "Return successive overlapping pairs taken from the input *iterable*." msgstr "" -#: ../../../library/itertools.rst:504 +#: ../../../library/itertools.rst:512 msgid "" "The number of 2-tuples in the output iterator will be one fewer than the " "number of inputs. It will be empty if the input iterable has fewer than two " "values." msgstr "" -#: ../../../library/itertools.rst:525 +#: ../../../library/itertools.rst:533 msgid "" "Return successive *r* length `permutations of elements `_ from the *iterable*." msgstr "" -#: ../../../library/itertools.rst:528 +#: ../../../library/itertools.rst:536 msgid "" "If *r* is not specified or is ``None``, then *r* defaults to the length of " "the *iterable* and all possible full-length permutations are generated." msgstr "" -#: ../../../library/itertools.rst:532 +#: ../../../library/itertools.rst:540 msgid "" "The output is a subsequence of :func:`product` where entries with repeated " "elements have been filtered out. The length of the output is given by :func:" @@ -705,34 +719,34 @@ msgid "" "``r > n``." msgstr "" -#: ../../../library/itertools.rst:537 +#: ../../../library/itertools.rst:545 msgid "" "The permutation tuples are emitted in lexicographic order according to the " "order of the input *iterable*. If the input *iterable* is sorted, the " "output tuples will be produced in sorted order." msgstr "" -#: ../../../library/itertools.rst:541 +#: ../../../library/itertools.rst:549 msgid "" "Elements are treated as unique based on their position, not on their value. " "If the input elements are unique, there will be no repeated values within a " "permutation." msgstr "" -#: ../../../library/itertools.rst:578 +#: ../../../library/itertools.rst:586 msgid "" "`Cartesian product `_ of " "the input iterables." msgstr "" -#: ../../../library/itertools.rst:581 +#: ../../../library/itertools.rst:589 msgid "" "Roughly equivalent to nested for-loops in a generator expression. For " "example, ``product(A, B)`` returns the same as ``((x,y) for x in A for y in " "B)``." msgstr "" -#: ../../../library/itertools.rst:584 +#: ../../../library/itertools.rst:592 msgid "" "The nested loops cycle like an odometer with the rightmost element advancing " "on every iteration. This pattern creates a lexicographic ordering so that " @@ -740,59 +754,59 @@ msgid "" "sorted order." msgstr "" -#: ../../../library/itertools.rst:589 +#: ../../../library/itertools.rst:597 msgid "" "To compute the product of an iterable with itself, specify the number of " "repetitions with the optional *repeat* keyword argument. For example, " "``product(A, repeat=4)`` means the same as ``product(A, A, A, A)``." msgstr "" -#: ../../../library/itertools.rst:593 +#: ../../../library/itertools.rst:601 msgid "" "This function is roughly equivalent to the following code, except that the " "actual implementation does not build up intermediate results in memory::" msgstr "" -#: ../../../library/itertools.rst:611 +#: ../../../library/itertools.rst:619 msgid "" "Before :func:`product` runs, it completely consumes the input iterables, " "keeping pools of values in memory to generate the products. Accordingly, it " "is only useful with finite inputs." msgstr "" -#: ../../../library/itertools.rst:618 +#: ../../../library/itertools.rst:626 msgid "" "Make an iterator that returns *object* over and over again. Runs " "indefinitely unless the *times* argument is specified." msgstr "" -#: ../../../library/itertools.rst:632 +#: ../../../library/itertools.rst:640 msgid "" "A common use for *repeat* is to supply a stream of constant values to *map* " "or *zip*:" msgstr "" -#: ../../../library/itertools.rst:643 +#: ../../../library/itertools.rst:651 msgid "" "Make an iterator that computes the *function* using arguments obtained from " "the *iterable*. Used instead of :func:`map` when argument parameters have " "already been \"pre-zipped\" into tuples." msgstr "" -#: ../../../library/itertools.rst:647 +#: ../../../library/itertools.rst:655 msgid "" "The difference between :func:`map` and :func:`starmap` parallels the " "distinction between ``function(a,b)`` and ``function(*c)``. Roughly " "equivalent to::" msgstr "" -#: ../../../library/itertools.rst:659 +#: ../../../library/itertools.rst:667 msgid "" "Make an iterator that returns elements from the *iterable* as long as the " "*predicate* is true. Roughly equivalent to::" msgstr "" -#: ../../../library/itertools.rst:669 +#: ../../../library/itertools.rst:677 msgid "" "Note, the element that first fails the predicate condition is consumed from " "the input iterator and there is no way to access it. This could be an issue " @@ -802,11 +816,11 @@ msgid "" "readthedocs.io/en/stable/api.html#more_itertools.before_and_after>`_ instead." msgstr "" -#: ../../../library/itertools.rst:680 +#: ../../../library/itertools.rst:688 msgid "Return *n* independent iterators from a single iterable." msgstr "" -#: ../../../library/itertools.rst:717 +#: ../../../library/itertools.rst:725 msgid "" "When the input *iterable* is already a tee iterator object, all members of " "the return tuple are constructed as if they had been produced by the " @@ -815,18 +829,18 @@ msgid "" "update step rather than a chain of calls." msgstr "" -#: ../../../library/itertools.rst:723 +#: ../../../library/itertools.rst:731 msgid "The flattening property makes tee iterators efficiently peekable:" msgstr "" -#: ../../../library/itertools.rst:743 +#: ../../../library/itertools.rst:751 msgid "" "``tee`` iterators are not threadsafe. A :exc:`RuntimeError` may be raised " "when simultaneously using iterators returned by the same :func:`tee` call, " "even if the original *iterable* is threadsafe." msgstr "" -#: ../../../library/itertools.rst:747 +#: ../../../library/itertools.rst:755 msgid "" "This itertool may require significant auxiliary storage (depending on how " "much temporary data needs to be stored). In general, if one iterator uses " @@ -834,38 +848,38 @@ msgid "" "func:`list` instead of :func:`tee`." msgstr "" -#: ../../../library/itertools.rst:755 +#: ../../../library/itertools.rst:763 msgid "Make an iterator that aggregates elements from each of the *iterables*." msgstr "" -#: ../../../library/itertools.rst:758 +#: ../../../library/itertools.rst:766 msgid "" "If the iterables are of uneven length, missing values are filled-in with " "*fillvalue*. If not specified, *fillvalue* defaults to ``None``." msgstr "" -#: ../../../library/itertools.rst:761 +#: ../../../library/itertools.rst:769 msgid "Iteration continues until the longest iterable is exhausted." msgstr "" -#: ../../../library/itertools.rst:787 +#: ../../../library/itertools.rst:795 msgid "" "If one of the iterables is potentially infinite, then the :func:" "`zip_longest` function should be wrapped with something that limits the " "number of calls (for example :func:`islice` or :func:`takewhile`)." msgstr "" -#: ../../../library/itertools.rst:795 +#: ../../../library/itertools.rst:803 msgid "Itertools Recipes" msgstr "" -#: ../../../library/itertools.rst:797 +#: ../../../library/itertools.rst:805 msgid "" "This section shows recipes for creating an extended toolset using the " "existing itertools as building blocks." msgstr "" -#: ../../../library/itertools.rst:800 +#: ../../../library/itertools.rst:808 msgid "" "The primary purpose of the itertools recipes is educational. The recipes " "show various ways of thinking about individual tools — for example, that " @@ -877,7 +891,7 @@ msgid "" "``map()``, ``filter()``, ``reversed()``, and ``enumerate()``." msgstr "" -#: ../../../library/itertools.rst:809 +#: ../../../library/itertools.rst:817 msgid "" "A secondary purpose of the recipes is to serve as an incubator. The " "``accumulate()``, ``compress()``, and ``pairwise()`` itertools started out " @@ -885,13 +899,13 @@ msgid "" "``sieve()`` recipes are being tested to see whether they prove their worth." msgstr "" -#: ../../../library/itertools.rst:814 +#: ../../../library/itertools.rst:822 msgid "" "Substantially all of these recipes and many, many others can be installed " "from the :pypi:`more-itertools` project found on the Python Package Index::" msgstr "" -#: ../../../library/itertools.rst:820 +#: ../../../library/itertools.rst:828 msgid "" "Many of the recipes offer the same high performance as the underlying " "toolset. Superior memory performance is kept by processing elements one at a " diff --git a/main/locale/pot/LC_MESSAGES/library/locale.pot b/main/locale/pot/LC_MESSAGES/library/locale.pot index 45ff246fbb5..d1df7f825d5 100644 --- a/main/locale/pot/LC_MESSAGES/library/locale.pot +++ b/main/locale/pot/LC_MESSAGES/library/locale.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -498,13 +498,19 @@ msgid "" "The function now temporarily sets the ``LC_CTYPE`` locale in some cases." msgstr "" -#: ../../../library/locale.rst:348 +#: ../../../library/locale.rst:345 +msgid "" +"On glibc, the ``LC_TIME`` items (except ``ERA``) are now decoded " +"independently of the ``LC_CTYPE`` encoding." +msgstr "" + +#: ../../../library/locale.rst:352 msgid "" "Tries to determine the default locale settings and returns them as a tuple " "of the form ``(language code, encoding)``." msgstr "" -#: ../../../library/locale.rst:351 +#: ../../../library/locale.rst:355 msgid "" "According to POSIX, a program which has not called ``setlocale(LC_ALL, '')`` " "runs using the portable ``'C'`` locale. Calling ``setlocale(LC_ALL, '')`` " @@ -513,7 +519,7 @@ msgid "" "emulate the behavior in the way described above." msgstr "" -#: ../../../library/locale.rst:357 +#: ../../../library/locale.rst:361 msgid "" "To maintain compatibility with other platforms, not only the :envvar:`LANG` " "variable is tested, but a list of variables given as envvars parameter. The " @@ -523,7 +529,7 @@ msgid "" "``'LC_CTYPE'``, ``'LANG'`` and ``'LANGUAGE'``, in that order." msgstr "" -#: ../../../library/locale.rst:364 +#: ../../../library/locale.rst:368 msgid "" "The language code has the same format as a :ref:`locale name `, " "but without encoding and ``@``-modifier. The language code and encoding may " @@ -531,7 +537,7 @@ msgid "" "represented as ``(None, None)``." msgstr "" -#: ../../../library/locale.rst:373 +#: ../../../library/locale.rst:377 msgid "" "Returns the current setting for the given locale category as a tuple " "containing the language code and encoding. *category* may be one of the :" @@ -539,7 +545,7 @@ msgid "" "`LC_CTYPE`." msgstr "" -#: ../../../library/locale.rst:377 +#: ../../../library/locale.rst:381 msgid "" "The language code has the same format as a :ref:`locale name `, " "but without encoding. The language code and encoding may be ``None`` if " @@ -547,13 +553,13 @@ msgid "" "``(None, None)``." msgstr "" -#: ../../../library/locale.rst:383 +#: ../../../library/locale.rst:387 msgid "" "``@``-modifier are no longer silently removed, but included in the language " "code." msgstr "" -#: ../../../library/locale.rst:390 +#: ../../../library/locale.rst:394 msgid "" "Return the :term:`locale encoding` used for text data, according to user " "preferences. User preferences are expressed differently on different " @@ -561,72 +567,72 @@ msgid "" "this function only returns a guess." msgstr "" -#: ../../../library/locale.rst:395 +#: ../../../library/locale.rst:399 msgid "" "On some systems, it is necessary to invoke :func:`setlocale` to obtain the " "user preferences, so this function is not thread-safe. If invoking setlocale " "is not necessary or desired, *do_setlocale* should be set to ``False``." msgstr "" -#: ../../../library/locale.rst:399 +#: ../../../library/locale.rst:403 msgid "" "On Android or if the :ref:`Python UTF-8 Mode ` is enabled, always " "return ``'utf-8'``, the :term:`locale encoding` and the *do_setlocale* " "argument are ignored." msgstr "" -#: ../../../library/locale.rst:403 ../../../library/locale.rst:421 +#: ../../../library/locale.rst:407 ../../../library/locale.rst:425 msgid "" "The :ref:`Python preinitialization ` configures the LC_CTYPE " "locale. See also the :term:`filesystem encoding and error handler`." msgstr "" -#: ../../../library/locale.rst:406 +#: ../../../library/locale.rst:410 msgid "" "The function now always returns ``\"utf-8\"`` on Android or if the :ref:" "`Python UTF-8 Mode ` is enabled." msgstr "" -#: ../../../library/locale.rst:413 +#: ../../../library/locale.rst:417 msgid "Get the current :term:`locale encoding`:" msgstr "" -#: ../../../library/locale.rst:415 +#: ../../../library/locale.rst:419 msgid "On Android and VxWorks, return ``\"utf-8\"``." msgstr "" -#: ../../../library/locale.rst:416 +#: ../../../library/locale.rst:420 msgid "" "On Unix, return the encoding of the current :data:`LC_CTYPE` locale. Return " "``\"utf-8\"`` if ``nl_langinfo(CODESET)`` returns an empty string: for " "example, if the current LC_CTYPE locale is not supported." msgstr "" -#: ../../../library/locale.rst:419 +#: ../../../library/locale.rst:423 msgid "On Windows, return the ANSI code page." msgstr "" -#: ../../../library/locale.rst:424 +#: ../../../library/locale.rst:428 msgid "" "This function is similar to :func:`getpreferredencoding(False) " "` except this function ignores the :ref:`Python UTF-8 " "Mode `." msgstr "" -#: ../../../library/locale.rst:433 +#: ../../../library/locale.rst:437 msgid "" "Returns a normalized locale code for the given locale name. The returned " "locale code is formatted for use with :func:`setlocale`. If normalization " "fails, the original name is returned unchanged." msgstr "" -#: ../../../library/locale.rst:437 +#: ../../../library/locale.rst:441 msgid "" "If the given encoding is not known, the function defaults to the default " "encoding for the locale code just like :func:`setlocale`." msgstr "" -#: ../../../library/locale.rst:443 +#: ../../../library/locale.rst:447 msgid "" "Compares two strings according to the current :const:`LC_COLLATE` setting. " "As any other compare function, returns a negative, or a positive value, or " @@ -634,7 +640,7 @@ msgid "" "is equal to it." msgstr "" -#: ../../../library/locale.rst:451 +#: ../../../library/locale.rst:455 msgid "" "Transforms a string to one that can be used in locale-aware comparisons. " "For example, ``strxfrm(s1) < strxfrm(s2)`` is equivalent to ``strcoll(s1, " @@ -642,7 +648,7 @@ msgid "" "repeatedly, e.g. when collating a sequence of strings." msgstr "" -#: ../../../library/locale.rst:460 +#: ../../../library/locale.rst:464 msgid "" "Formats a number *val* according to the current :const:`LC_NUMERIC` setting. " "The format follows the conventions of the ``%`` operator. For floating-" @@ -650,29 +656,29 @@ msgid "" "is ``True``, also takes the grouping into account." msgstr "" -#: ../../../library/locale.rst:465 +#: ../../../library/locale.rst:469 msgid "" "If *monetary* is true, the conversion uses monetary thousands separator and " "grouping strings." msgstr "" -#: ../../../library/locale.rst:468 +#: ../../../library/locale.rst:472 msgid "" "Processes formatting specifiers as in ``format % val``, but takes the " "current locale settings into account." msgstr "" -#: ../../../library/locale.rst:471 +#: ../../../library/locale.rst:475 msgid "The *monetary* keyword parameter was added." msgstr "" -#: ../../../library/locale.rst:477 +#: ../../../library/locale.rst:481 msgid "" "Formats a number *val* according to the current :const:`LC_MONETARY` " "settings." msgstr "" -#: ../../../library/locale.rst:479 +#: ../../../library/locale.rst:483 msgid "" "The returned string includes the currency symbol if *symbol* is true, which " "is the default. If *grouping* is ``True`` (which is not the default), " @@ -680,43 +686,43 @@ msgid "" "not the default), the international currency symbol is used." msgstr "" -#: ../../../library/locale.rst:486 +#: ../../../library/locale.rst:490 msgid "" "This function will not work with the 'C' locale, so you have to set a locale " "via :func:`setlocale` first." msgstr "" -#: ../../../library/locale.rst:492 +#: ../../../library/locale.rst:496 msgid "" "Formats a floating-point number using the same format as the built-in " "function ``str(float)``, but takes the decimal point into account." msgstr "" -#: ../../../library/locale.rst:498 +#: ../../../library/locale.rst:502 msgid "" "Converts a string into a normalized number string, following the :const:" "`LC_NUMERIC` settings." msgstr "" -#: ../../../library/locale.rst:506 +#: ../../../library/locale.rst:510 msgid "" "Converts a normalized number string into a formatted string following the :" "const:`LC_NUMERIC` settings." msgstr "" -#: ../../../library/locale.rst:514 +#: ../../../library/locale.rst:518 msgid "" "Converts a string to a number, following the :const:`LC_NUMERIC` settings, " "by calling *func* on the result of calling :func:`delocalize` on *string*." msgstr "" -#: ../../../library/locale.rst:520 +#: ../../../library/locale.rst:524 msgid "" "Converts a string to an integer, following the :const:`LC_NUMERIC` " "conventions." msgstr "" -#: ../../../library/locale.rst:525 +#: ../../../library/locale.rst:529 msgid "" "Locale category for the character type functions. Most importantly, this " "category defines the text encoding, i.e. how bytes are interpreted as " @@ -726,32 +732,32 @@ msgid "" "SSH connections." msgstr "" -#: ../../../library/locale.rst:532 +#: ../../../library/locale.rst:536 msgid "" "Python doesn't internally use locale-dependent character transformation " "functions from ``ctype.h``. Instead, ``pyctype.h`` provides locale-" "independent equivalents like :c:macro:`Py_TOLOWER`." msgstr "" -#: ../../../library/locale.rst:539 +#: ../../../library/locale.rst:543 msgid "" "Locale category for sorting strings. The functions :func:`strcoll` and :" "func:`strxfrm` of the :mod:`!locale` module are affected." msgstr "" -#: ../../../library/locale.rst:545 +#: ../../../library/locale.rst:549 msgid "" "Locale category for the formatting of time. The function :func:`time." "strftime` follows these conventions." msgstr "" -#: ../../../library/locale.rst:551 +#: ../../../library/locale.rst:555 msgid "" "Locale category for formatting of monetary values. The available options " "are available from the :func:`localeconv` function." msgstr "" -#: ../../../library/locale.rst:557 +#: ../../../library/locale.rst:561 msgid "" "Locale category for message display. Python currently does not support " "application specific locale-aware messages. Messages displayed by the " @@ -759,13 +765,13 @@ msgid "" "affected by this category." msgstr "" -#: ../../../library/locale.rst:562 +#: ../../../library/locale.rst:566 msgid "" "This value may not be available on operating systems not conforming to the " "POSIX standard, most notably Windows." msgstr "" -#: ../../../library/locale.rst:568 +#: ../../../library/locale.rst:572 msgid "" "Locale category for formatting numbers. The functions :func:" "`format_string`, :func:`atoi`, :func:`atof` and :func:`.str` of the :mod:`!" @@ -773,7 +779,7 @@ msgid "" "operations are not affected." msgstr "" -#: ../../../library/locale.rst:576 +#: ../../../library/locale.rst:580 msgid "" "Combination of all locale settings. If this flag is used when the locale is " "changed, setting the locale for all categories is attempted. If that fails " @@ -783,17 +789,17 @@ msgid "" "settings." msgstr "" -#: ../../../library/locale.rst:585 +#: ../../../library/locale.rst:589 msgid "" "This is a symbolic constant used for different values returned by :func:" "`localeconv`." msgstr "" -#: ../../../library/locale.rst:590 +#: ../../../library/locale.rst:594 msgid "Background, details, hints, tips and caveats" msgstr "" -#: ../../../library/locale.rst:592 +#: ../../../library/locale.rst:596 msgid "" "The C standard defines the locale as a program-wide property that may be " "relatively expensive to change. On top of that, some implementations are " @@ -801,7 +807,7 @@ msgid "" "This makes the locale somewhat painful to use correctly." msgstr "" -#: ../../../library/locale.rst:597 +#: ../../../library/locale.rst:601 msgid "" "Initially, when a program is started, the locale is the ``C`` locale, no " "matter what the user's preferred locale is. There is one exception: the :" @@ -811,7 +817,7 @@ msgid "" "categories by calling ``setlocale(LC_ALL, '')``." msgstr "" -#: ../../../library/locale.rst:604 +#: ../../../library/locale.rst:608 msgid "" "It is generally a bad idea to call :func:`setlocale` in some library " "routine, since as a side effect it affects the entire program. Saving and " @@ -819,7 +825,7 @@ msgid "" "that happen to run before the settings have been restored." msgstr "" -#: ../../../library/locale.rst:609 +#: ../../../library/locale.rst:613 msgid "" "If, when coding a module for general use, you need a locale independent " "version of an operation that is affected by the locale (such as certain " @@ -830,14 +836,14 @@ msgid "" "settings." msgstr "" -#: ../../../library/locale.rst:616 +#: ../../../library/locale.rst:620 msgid "" "The only way to perform numeric operations according to the locale is to use " "the special functions defined by this module: :func:`atof`, :func:`atoi`, :" "func:`format_string`, :func:`.str`." msgstr "" -#: ../../../library/locale.rst:620 +#: ../../../library/locale.rst:624 msgid "" "There is no way to perform case conversions and character classifications " "according to the locale. For (Unicode) text strings these are done " @@ -848,21 +854,21 @@ msgid "" "whitespace." msgstr "" -#: ../../../library/locale.rst:631 +#: ../../../library/locale.rst:635 msgid "Locale names" msgstr "" -#: ../../../library/locale.rst:633 +#: ../../../library/locale.rst:637 msgid "" "The format of the locale name is platform dependent, and the set of " "supported locales can depend on the system configuration." msgstr "" -#: ../../../library/locale.rst:636 +#: ../../../library/locale.rst:640 msgid "On Posix platforms, it usually has the format [1]_:" msgstr "" -#: ../../../library/locale.rst:641 +#: ../../../library/locale.rst:645 msgid "" "where *language* is a two- or three-letter language code from `ISO 639`_, " "*territory* is a two-letter country or region code from `ISO 3166`_, " @@ -871,13 +877,13 @@ msgid "" "\"latin\", \"valencia\", \"stroke\" and \"euro\")." msgstr "" -#: ../../../library/locale.rst:647 +#: ../../../library/locale.rst:651 msgid "" "On Windows, several formats are supported. [2]_ [3]_ A subset of `IETF BCP " "47`_ tags:" msgstr "" -#: ../../../library/locale.rst:654 +#: ../../../library/locale.rst:658 msgid "" "where *language* and *territory* have the same meaning as in Posix, *script* " "is a four-letter script code from `ISO 15924`_, and *modifier* is a language " @@ -887,11 +893,11 @@ msgid "" "allowed for BCP 47 tags." msgstr "" -#: ../../../library/locale.rst:661 +#: ../../../library/locale.rst:665 msgid "Windows also supports locale names in the format:" msgstr "" -#: ../../../library/locale.rst:666 +#: ../../../library/locale.rst:670 msgid "" "where *language* and *territory* are full names, such as \"English\" and " "\"United States\", and *charset* is either a code page number (for example, " @@ -899,34 +905,34 @@ msgid "" "format." msgstr "" -#: ../../../library/locale.rst:671 +#: ../../../library/locale.rst:675 msgid "The \"C\" locale is supported on all platforms." msgstr "" -#: ../../../library/locale.rst:678 +#: ../../../library/locale.rst:682 msgid "" "`IEEE Std 1003.1-2024; 8.2 Internationalization Variables `_" msgstr "" -#: ../../../library/locale.rst:679 +#: ../../../library/locale.rst:683 msgid "" "`UCRT Locale names, Languages, and Country/Region strings `_" msgstr "" -#: ../../../library/locale.rst:680 +#: ../../../library/locale.rst:684 msgid "" "`Locale Names `_" msgstr "" -#: ../../../library/locale.rst:686 +#: ../../../library/locale.rst:690 msgid "For extension writers and programs that embed Python" msgstr "" -#: ../../../library/locale.rst:688 +#: ../../../library/locale.rst:692 msgid "" "Extension modules should never call :func:`setlocale`, except to find out " "what the current locale is. But since the return value can only be used " @@ -934,7 +940,7 @@ msgid "" "whether or not the locale is ``C``)." msgstr "" -#: ../../../library/locale.rst:693 +#: ../../../library/locale.rst:697 msgid "" "When Python code uses the :mod:`!locale` module to change the locale, this " "also affects the embedding application. If the embedding application " @@ -944,11 +950,11 @@ msgid "" "accessible as a shared library." msgstr "" -#: ../../../library/locale.rst:704 +#: ../../../library/locale.rst:708 msgid "Access to message catalogs" msgstr "" -#: ../../../library/locale.rst:713 +#: ../../../library/locale.rst:717 msgid "" "The locale module exposes the C library's gettext interface on systems that " "provide this interface. It consists of the functions :func:`gettext`, :func:" @@ -959,7 +965,7 @@ msgid "" "locating message catalogs." msgstr "" -#: ../../../library/locale.rst:720 +#: ../../../library/locale.rst:724 msgid "" "Python applications should normally find no need to invoke these functions, " "and should use :mod:`gettext` instead. A known exception to this rule are " diff --git a/main/locale/pot/LC_MESSAGES/library/lzma.pot b/main/locale/pot/LC_MESSAGES/library/lzma.pot index fb2f59646e8..3ddf65a1a8e 100644 --- a/main/locale/pot/LC_MESSAGES/library/lzma.pot +++ b/main/locale/pot/LC_MESSAGES/library/lzma.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -215,79 +215,32 @@ msgstr "" #: ../../../library/lzma.rst:154 msgid "" "The *format* argument specifies what container format should be used. " -"Possible values are:" -msgstr "" - -#: ../../../library/lzma.rst:157 -msgid ":const:`FORMAT_XZ`: The ``.xz`` container format." +"Possible values are :const:`FORMAT_XZ` (the default), :const:`FORMAT_ALONE` " +"and :const:`FORMAT_RAW`." msgstr "" #: ../../../library/lzma.rst:158 -msgid "This is the default format." -msgstr "" - -#: ../../../library/lzma.rst:160 -msgid ":const:`FORMAT_ALONE`: The legacy ``.lzma`` container format." -msgstr "" - -#: ../../../library/lzma.rst:161 -msgid "" -"This format is more limited than ``.xz`` -- it does not support integrity " -"checks or multiple filters." -msgstr "" - -#: ../../../library/lzma.rst:164 -msgid ":const:`FORMAT_RAW`: A raw data stream, not using any container format." -msgstr "" - -#: ../../../library/lzma.rst:165 -msgid "" -"This format specifier does not support integrity checks, and requires that " -"you always specify a custom filter chain (for both compression and " -"decompression). Additionally, data compressed in this manner cannot be " -"decompressed using :const:`FORMAT_AUTO` (see :class:`LZMADecompressor`)." -msgstr "" - -#: ../../../library/lzma.rst:170 msgid "" "The *check* argument specifies the type of integrity check to include in the " "compressed data. This check is used when decompressing, to ensure that the " -"data has not been corrupted. Possible values are:" -msgstr "" - -#: ../../../library/lzma.rst:174 -msgid "" -":const:`CHECK_NONE`: No integrity check. This is the default (and the only " -"acceptable value) for :const:`FORMAT_ALONE` and :const:`FORMAT_RAW`." -msgstr "" - -#: ../../../library/lzma.rst:178 -msgid ":const:`CHECK_CRC32`: 32-bit Cyclic Redundancy Check." -msgstr "" - -#: ../../../library/lzma.rst:180 -msgid "" -":const:`CHECK_CRC64`: 64-bit Cyclic Redundancy Check. This is the default " -"for :const:`FORMAT_XZ`." -msgstr "" - -#: ../../../library/lzma.rst:183 -msgid ":const:`CHECK_SHA256`: 256-bit Secure Hash Algorithm." +"data has not been corrupted. Possible values are :const:`CHECK_NONE`, :const:" +"`CHECK_CRC32`, :const:`CHECK_CRC64` (the default for :const:`FORMAT_XZ`) " +"and :const:`CHECK_SHA256`." msgstr "" -#: ../../../library/lzma.rst:185 +#: ../../../library/lzma.rst:164 msgid "" "If the specified check is not supported, an :class:`LZMAError` is raised." msgstr "" -#: ../../../library/lzma.rst:187 +#: ../../../library/lzma.rst:166 msgid "" "The compression settings can be specified either as a preset compression " "level (with the *preset* argument), or in detail as a custom filter chain " "(with the *filters* argument)." msgstr "" -#: ../../../library/lzma.rst:191 +#: ../../../library/lzma.rst:170 msgid "" "The *preset* argument (if provided) should be an integer between ``0`` and " "``9`` (inclusive), optionally OR-ed with the constant :const:" @@ -296,7 +249,7 @@ msgid "" "presets produce smaller output, but make the compression process slower." msgstr "" -#: ../../../library/lzma.rst:200 +#: ../../../library/lzma.rst:179 msgid "" "In addition to being more CPU-intensive, compression with higher presets " "also requires much more memory (and produces output that needs more memory " @@ -305,13 +258,13 @@ msgid "" "generally best to stick with the default preset." msgstr "" -#: ../../../library/lzma.rst:206 +#: ../../../library/lzma.rst:185 msgid "" "The *filters* argument (if provided) should be a filter chain specifier. " "See :ref:`filter-chain-specs` for details." msgstr "" -#: ../../../library/lzma.rst:211 +#: ../../../library/lzma.rst:190 msgid "" "Compress *data* (a :class:`bytes` object), returning a :class:`bytes` object " "containing compressed data for at least part of the input. Some of *data* " @@ -320,29 +273,29 @@ msgid "" "any previous calls to :meth:`compress`." msgstr "" -#: ../../../library/lzma.rst:219 +#: ../../../library/lzma.rst:198 msgid "" "Finish the compression process, returning a :class:`bytes` object containing " "any data stored in the compressor's internal buffers." msgstr "" -#: ../../../library/lzma.rst:222 +#: ../../../library/lzma.rst:201 msgid "The compressor cannot be used after this method has been called." msgstr "" -#: ../../../library/lzma.rst:227 +#: ../../../library/lzma.rst:206 msgid "" "Create a decompressor object, which can be used to decompress data " "incrementally." msgstr "" -#: ../../../library/lzma.rst:230 +#: ../../../library/lzma.rst:209 msgid "" "For a more convenient way of decompressing an entire compressed stream at " "once, see :func:`decompress`." msgstr "" -#: ../../../library/lzma.rst:233 +#: ../../../library/lzma.rst:212 msgid "" "The *format* argument specifies the container format that should be used. " "The default is :const:`FORMAT_AUTO`, which can decompress both ``.xz`` and " @@ -350,7 +303,7 @@ msgid "" "`FORMAT_ALONE`, and :const:`FORMAT_RAW`." msgstr "" -#: ../../../library/lzma.rst:238 +#: ../../../library/lzma.rst:217 msgid "" "The *memlimit* argument specifies a limit (in bytes) on the amount of memory " "that the decompressor can use. When this argument is used, decompression " @@ -358,7 +311,7 @@ msgid "" "input within the given memory limit." msgstr "" -#: ../../../library/lzma.rst:243 +#: ../../../library/lzma.rst:222 msgid "" "The *filters* argument specifies the filter chain that was used to create " "the stream being decompressed. This argument is required if *format* is :" @@ -366,7 +319,7 @@ msgid "" "`filter-chain-specs` for more information about filter chains." msgstr "" -#: ../../../library/lzma.rst:249 +#: ../../../library/lzma.rst:228 msgid "" "This class does not transparently handle inputs containing multiple " "compressed streams, unlike :func:`decompress` and :class:`LZMAFile`. To " @@ -374,7 +327,7 @@ msgid "" "create a new decompressor for each stream." msgstr "" -#: ../../../library/lzma.rst:256 +#: ../../../library/lzma.rst:235 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 " @@ -382,7 +335,7 @@ msgid "" "output of any previous calls to :meth:`decompress`." msgstr "" -#: ../../../library/lzma.rst:262 +#: ../../../library/lzma.rst:241 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 " @@ -391,100 +344,100 @@ msgid "" "``b''`` to obtain more of the output." msgstr "" -#: ../../../library/lzma.rst:269 +#: ../../../library/lzma.rst:248 msgid "" "If all of the input data was decompressed and returned (either because this " "was less than *max_length* bytes, or because *max_length* was negative), " "the :attr:`~.needs_input` attribute will be set to ``True``." msgstr "" -#: ../../../library/lzma.rst:274 +#: ../../../library/lzma.rst:253 msgid "" "Attempting to decompress data after the end of stream is reached raises an :" "exc:`EOFError`. Any data found after the end of the stream is ignored and " "saved in the :attr:`~.unused_data` attribute." msgstr "" -#: ../../../library/lzma.rst:278 +#: ../../../library/lzma.rst:257 msgid "Added the *max_length* parameter." msgstr "" -#: ../../../library/lzma.rst:283 +#: ../../../library/lzma.rst:262 msgid "" "The ID of the integrity check used by the input stream. This may be :const:" "`CHECK_UNKNOWN` until enough of the input has been decoded to determine what " "integrity check it uses." msgstr "" -#: ../../../library/lzma.rst:289 +#: ../../../library/lzma.rst:268 msgid "``True`` if the end-of-stream marker has been reached." msgstr "" -#: ../../../library/lzma.rst:293 +#: ../../../library/lzma.rst:272 msgid "Data found after the end of the compressed stream." msgstr "" -#: ../../../library/lzma.rst:295 +#: ../../../library/lzma.rst:274 msgid "Before the end of the stream is reached, this will be ``b\"\"``." msgstr "" -#: ../../../library/lzma.rst:299 +#: ../../../library/lzma.rst:278 msgid "" "``False`` if the :meth:`.decompress` method can provide more decompressed " "data before requiring new uncompressed input." msgstr "" -#: ../../../library/lzma.rst:306 +#: ../../../library/lzma.rst:285 msgid "" "Compress *data* (a :class:`bytes` object), returning the compressed data as " "a :class:`bytes` object." msgstr "" -#: ../../../library/lzma.rst:309 +#: ../../../library/lzma.rst:288 msgid "" "See :class:`LZMACompressor` above for a description of the *format*, " "*check*, *preset* and *filters* arguments." msgstr "" -#: ../../../library/lzma.rst:315 +#: ../../../library/lzma.rst:294 msgid "" "Decompress *data* (a :class:`bytes` object), returning the uncompressed data " "as a :class:`bytes` object." msgstr "" -#: ../../../library/lzma.rst:318 +#: ../../../library/lzma.rst:297 msgid "" "If *data* is the concatenation of multiple distinct compressed streams, " "decompress all of these streams, and return the concatenation of the results." msgstr "" -#: ../../../library/lzma.rst:321 +#: ../../../library/lzma.rst:300 msgid "" "See :class:`LZMADecompressor` above for a description of the *format*, " "*memlimit* and *filters* arguments." msgstr "" -#: ../../../library/lzma.rst:326 +#: ../../../library/lzma.rst:305 msgid "Miscellaneous" msgstr "" -#: ../../../library/lzma.rst:330 +#: ../../../library/lzma.rst:309 msgid "" "Return ``True`` if the given integrity check is supported on this system." msgstr "" -#: ../../../library/lzma.rst:332 +#: ../../../library/lzma.rst:311 msgid "" ":const:`CHECK_NONE` and :const:`CHECK_CRC32` are always supported. :const:" "`CHECK_CRC64` and :const:`CHECK_SHA256` may be unavailable if you are using " "a version of :program:`liblzma` that was compiled with a limited feature set." msgstr "" -#: ../../../library/lzma.rst:341 +#: ../../../library/lzma.rst:320 msgid "Specifying custom filter chains" msgstr "" -#: ../../../library/lzma.rst:343 +#: ../../../library/lzma.rst:322 msgid "" "A filter chain specifier is a sequence of dictionaries, where each " "dictionary contains the ID and options for a single filter. Each dictionary " @@ -492,138 +445,138 @@ msgid "" "filter-dependent options. Valid filter IDs are as follows:" msgstr "" -#: ../../../library/lzma.rst:348 +#: ../../../library/lzma.rst:327 msgid "Compression filters:" msgstr "" -#: ../../../library/lzma.rst:350 +#: ../../../library/lzma.rst:329 msgid ":const:`FILTER_LZMA1` (for use with :const:`FORMAT_ALONE`)" msgstr "" -#: ../../../library/lzma.rst:351 +#: ../../../library/lzma.rst:330 msgid "" ":const:`FILTER_LZMA2` (for use with :const:`FORMAT_XZ` and :const:" "`FORMAT_RAW`)" msgstr "" -#: ../../../library/lzma.rst:353 +#: ../../../library/lzma.rst:332 msgid "Delta filter:" msgstr "" -#: ../../../library/lzma.rst:355 +#: ../../../library/lzma.rst:334 msgid ":const:`FILTER_DELTA`" msgstr "" -#: ../../../library/lzma.rst:357 +#: ../../../library/lzma.rst:336 msgid "Branch-Call-Jump (BCJ) filters:" msgstr "" -#: ../../../library/lzma.rst:359 +#: ../../../library/lzma.rst:338 msgid ":const:`!FILTER_X86`" msgstr "" -#: ../../../library/lzma.rst:360 +#: ../../../library/lzma.rst:339 msgid ":const:`!FILTER_IA64`" msgstr "" -#: ../../../library/lzma.rst:361 +#: ../../../library/lzma.rst:340 msgid ":const:`!FILTER_ARM`" msgstr "" -#: ../../../library/lzma.rst:362 +#: ../../../library/lzma.rst:341 msgid ":const:`!FILTER_ARMTHUMB`" msgstr "" -#: ../../../library/lzma.rst:363 +#: ../../../library/lzma.rst:342 msgid ":const:`!FILTER_POWERPC`" msgstr "" -#: ../../../library/lzma.rst:364 +#: ../../../library/lzma.rst:343 msgid ":const:`!FILTER_SPARC`" msgstr "" -#: ../../../library/lzma.rst:366 +#: ../../../library/lzma.rst:345 msgid "The above work on all lzma runtime library versions." msgstr "" -#: ../../../library/lzma.rst:368 +#: ../../../library/lzma.rst:347 msgid ":const:`!FILTER_ARM64`" msgstr "" -#: ../../../library/lzma.rst:370 +#: ../../../library/lzma.rst:349 msgid "Only works if the lzma version is 5.4.0 or later." msgstr "" -#: ../../../library/lzma.rst:374 +#: ../../../library/lzma.rst:353 msgid ":const:`!FILTER_RISCV`" msgstr "" -#: ../../../library/lzma.rst:376 +#: ../../../library/lzma.rst:355 msgid "Only works if the lzma version is 5.6.0 or later." msgstr "" -#: ../../../library/lzma.rst:380 +#: ../../../library/lzma.rst:359 msgid "" "A filter chain can consist of up to 4 filters, and cannot be empty. The last " "filter in the chain must be a compression filter, and any other filters must " "be delta or BCJ filters." msgstr "" -#: ../../../library/lzma.rst:384 +#: ../../../library/lzma.rst:363 msgid "" "Compression filters support the following options (specified as additional " "entries in the dictionary representing the filter):" msgstr "" -#: ../../../library/lzma.rst:387 +#: ../../../library/lzma.rst:366 msgid "" "``preset``: A compression preset to use as a source of default values for " "options that are not specified explicitly." msgstr "" -#: ../../../library/lzma.rst:389 +#: ../../../library/lzma.rst:368 msgid "" "``dict_size``: Dictionary size in bytes. This should be between 4 KiB and " "1.5 GiB (inclusive)." msgstr "" -#: ../../../library/lzma.rst:391 +#: ../../../library/lzma.rst:370 msgid "``lc``: Number of literal context bits." msgstr "" -#: ../../../library/lzma.rst:392 +#: ../../../library/lzma.rst:371 msgid "" "``lp``: Number of literal position bits. The sum ``lc + lp`` must be at most " "4." msgstr "" -#: ../../../library/lzma.rst:394 +#: ../../../library/lzma.rst:373 msgid "``pb``: Number of position bits; must be at most 4." msgstr "" -#: ../../../library/lzma.rst:395 +#: ../../../library/lzma.rst:374 msgid "``mode``: :const:`MODE_FAST` or :const:`MODE_NORMAL`." msgstr "" -#: ../../../library/lzma.rst:396 +#: ../../../library/lzma.rst:375 msgid "" "``nice_len``: What should be considered a \"nice length\" for a match. This " "should be 273 or less." msgstr "" -#: ../../../library/lzma.rst:398 +#: ../../../library/lzma.rst:377 msgid "" "``mf``: What match finder to use -- :const:`MF_HC3`, :const:`MF_HC4`, :const:" "`MF_BT2`, :const:`MF_BT3`, or :const:`MF_BT4`." msgstr "" -#: ../../../library/lzma.rst:400 +#: ../../../library/lzma.rst:379 msgid "" "``depth``: Maximum search depth used by match finder. 0 (default) means to " "select automatically based on other filter options." msgstr "" -#: ../../../library/lzma.rst:403 +#: ../../../library/lzma.rst:382 msgid "" "The delta filter stores the differences between bytes, producing more " "repetitive input for the compressor in certain circumstances. It supports " @@ -632,7 +585,7 @@ msgid "" "bytes." msgstr "" -#: ../../../library/lzma.rst:408 +#: ../../../library/lzma.rst:387 msgid "" "The BCJ filters are intended to be applied to machine code. They convert " "relative branches, calls and jumps in the code to use absolute addressing, " @@ -642,30 +595,145 @@ msgid "" "data. The default is 0." msgstr "" -#: ../../../library/lzma.rst:416 +#: ../../../library/lzma.rst:395 +msgid "Constants" +msgstr "" + +#: ../../../library/lzma.rst:397 +msgid "" +"The following module-level constants are provided for use as the *format*, " +"*check*, *preset* and *filters* arguments of the classes and functions above." +msgstr "" + +#: ../../../library/lzma.rst:400 +msgid "Container formats:" +msgstr "" + +#: ../../../library/lzma.rst:404 +msgid "The ``.xz`` container format." +msgstr "" + +#: ../../../library/lzma.rst:408 +msgid "" +"The legacy ``.lzma`` container format. This format is more limited than ``." +"xz`` -- it does not support integrity checks or multiple filters." +msgstr "" + +#: ../../../library/lzma.rst:413 +msgid "" +"A raw data stream, not using any container format. This format specifier " +"does not support integrity checks, and requires that you always specify a " +"custom filter chain (for both compression and decompression). Additionally, " +"data compressed in this manner cannot be decompressed using :const:" +"`FORMAT_AUTO`." +msgstr "" + +#: ../../../library/lzma.rst:421 +msgid "" +"Used for decompression only. The container format is detected " +"automatically, so that both ``.xz`` and ``.lzma`` files can be decompressed." +msgstr "" + +#: ../../../library/lzma.rst:424 +msgid "Integrity checks:" +msgstr "" + +#: ../../../library/lzma.rst:428 +msgid "" +"No integrity check. This is the default (and the only acceptable value) " +"for :const:`FORMAT_ALONE` and :const:`FORMAT_RAW`." +msgstr "" + +#: ../../../library/lzma.rst:433 +msgid "A 32-bit Cyclic Redundancy Check." +msgstr "" + +#: ../../../library/lzma.rst:437 +msgid "" +"A 64-bit Cyclic Redundancy Check. This is the default for :const:" +"`FORMAT_XZ`." +msgstr "" + +#: ../../../library/lzma.rst:442 +msgid "A 256-bit Secure Hash Algorithm." +msgstr "" + +#: ../../../library/lzma.rst:446 +msgid "" +"The integrity check used by a stream could not yet be determined. This may " +"be the value of the :attr:`LZMADecompressor.check` attribute until enough of " +"the input has been decoded." +msgstr "" + +#: ../../../library/lzma.rst:452 +msgid "The largest supported integrity-check ID." +msgstr "" + +#: ../../../library/lzma.rst:454 +msgid "Compression presets:" +msgstr "" + +#: ../../../library/lzma.rst:458 +msgid "The default compression preset, equivalent to preset level ``6``." +msgstr "" + +#: ../../../library/lzma.rst:462 +msgid "" +"A flag that may be bitwise OR-ed with a preset level (``0`` to ``9``) to " +"select a slower but more thorough variant of that preset." +msgstr "" + +#: ../../../library/lzma.rst:465 +msgid "Filter IDs and options:" +msgstr "" + +#: ../../../library/lzma.rst:470 +msgid "" +"The LZMA1 and LZMA2 compression filters. :const:`FILTER_LZMA1` is for use " +"with :const:`FORMAT_ALONE`, while :const:`FILTER_LZMA2` is for use with :" +"const:`FORMAT_XZ` and :const:`FORMAT_RAW`." +msgstr "" + +#: ../../../library/lzma.rst:476 +msgid "The delta filter." +msgstr "" + +#: ../../../library/lzma.rst:481 +msgid "" +"Compression modes that may be used as the ``mode`` option of a filter " +"specifier (see :ref:`filter-chain-specs`)." +msgstr "" + +#: ../../../library/lzma.rst:490 +msgid "" +"Match finders that may be used as the ``mf`` option of a filter specifier " +"(see :ref:`filter-chain-specs`)." +msgstr "" + +#: ../../../library/lzma.rst:495 msgid "Examples" msgstr "" -#: ../../../library/lzma.rst:418 +#: ../../../library/lzma.rst:497 msgid "Reading in a compressed file::" msgstr "" -#: ../../../library/lzma.rst:424 +#: ../../../library/lzma.rst:503 msgid "Creating a compressed file::" msgstr "" -#: ../../../library/lzma.rst:431 +#: ../../../library/lzma.rst:510 msgid "Compressing data in memory::" msgstr "" -#: ../../../library/lzma.rst:437 +#: ../../../library/lzma.rst:516 msgid "Incremental compression::" msgstr "" -#: ../../../library/lzma.rst:448 +#: ../../../library/lzma.rst:527 msgid "Writing compressed data to an already-open file::" msgstr "" -#: ../../../library/lzma.rst:457 +#: ../../../library/lzma.rst:536 msgid "Creating a compressed file using a custom filter chain::" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/mimetypes.pot b/main/locale/pot/LC_MESSAGES/library/mimetypes.pot index c9a1333dcbc..102f1c04515 100644 --- a/main/locale/pot/LC_MESSAGES/library/mimetypes.pot +++ b/main/locale/pot/LC_MESSAGES/library/mimetypes.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -160,13 +160,14 @@ msgstr "" #: ../../../library/mimetypes.rst:121 msgid "" -"Load the type map given in the file *filename*, if it exists. The type map " -"is returned as a dictionary mapping filename extensions, including the " -"leading dot (``'.'``), to strings of the form ``'type/subtype'``. If the " -"file *filename* does not exist or cannot be read, ``None`` is returned." +"Load the type map given in the file named by *file*, if it exists. *file* " +"must be a string specifying the name of the file to read. The type map is " +"returned as a dictionary mapping file extensions, including the leading dot " +"(``'.'``), to strings of the form ``'type/subtype'``. If the file does not " +"exist or cannot be read, ``None`` is returned." msgstr "" -#: ../../../library/mimetypes.rst:129 +#: ../../../library/mimetypes.rst:130 msgid "" "Add a mapping from the MIME type *type* to the extension *ext*. When the " "extension is already known, the new type will replace the old one. When the " @@ -174,39 +175,39 @@ msgid "" "extensions. Valid extensions are empty or start with a ``'.'``." msgstr "" -#: ../../../library/mimetypes.rst:134 ../../../library/mimetypes.rst:317 +#: ../../../library/mimetypes.rst:135 ../../../library/mimetypes.rst:318 msgid "Registered lower-case extensions are matched case-insensitively." msgstr "" -#: ../../../library/mimetypes.rst:136 ../../../library/mimetypes.rst:319 +#: ../../../library/mimetypes.rst:137 ../../../library/mimetypes.rst:320 msgid "" "When *strict* is ``True`` (the default), the mapping will be added to the " "official MIME types, otherwise to the non-standard ones." msgstr "" -#: ../../../library/mimetypes.rst:139 ../../../library/mimetypes.rst:322 +#: ../../../library/mimetypes.rst:140 ../../../library/mimetypes.rst:323 msgid "*ext* values that do not start with ``'.'`` are deprecated." msgstr "" -#: ../../../library/mimetypes.rst:142 ../../../library/mimetypes.rst:325 +#: ../../../library/mimetypes.rst:143 ../../../library/mimetypes.rst:326 msgid "" "*ext* now must start with ``'.'``. Otherwise :exc:`ValueError` is raised." msgstr "" -#: ../../../library/mimetypes.rst:149 +#: ../../../library/mimetypes.rst:150 msgid "" "Flag indicating whether or not the global data structures have been " "initialized. This is set to ``True`` by :func:`init`." msgstr "" -#: ../../../library/mimetypes.rst:157 +#: ../../../library/mimetypes.rst:158 msgid "" "List of type map file names commonly installed. These files are typically " "named :file:`mime.types` and are installed in different locations by " "different packages." msgstr "" -#: ../../../library/mimetypes.rst:164 +#: ../../../library/mimetypes.rst:165 msgid "" "Dictionary mapping suffixes to suffixes. This is used to allow recognition " "of encoded files for which the encoding and the type are indicated by the " @@ -214,36 +215,36 @@ msgid "" "`.tar.gz` to allow the encoding and type to be recognized separately." msgstr "" -#: ../../../library/mimetypes.rst:172 +#: ../../../library/mimetypes.rst:173 msgid "Dictionary mapping filename extensions to encoding types." msgstr "" -#: ../../../library/mimetypes.rst:177 +#: ../../../library/mimetypes.rst:178 msgid "Dictionary mapping filename extensions to MIME types." msgstr "" -#: ../../../library/mimetypes.rst:182 +#: ../../../library/mimetypes.rst:183 msgid "" "Dictionary mapping filename extensions to non-standard, but commonly found " "MIME types." msgstr "" -#: ../../../library/mimetypes.rst:186 +#: ../../../library/mimetypes.rst:187 msgid "An example usage of the module::" msgstr "" -#: ../../../library/mimetypes.rst:203 +#: ../../../library/mimetypes.rst:204 msgid "MimeTypes objects" msgstr "" -#: ../../../library/mimetypes.rst:205 +#: ../../../library/mimetypes.rst:206 msgid "" "The :class:`MimeTypes` class may be useful for applications which may want " "more than one MIME-type database; it provides an interface similar to the " "one of the :mod:`!mimetypes` module." msgstr "" -#: ../../../library/mimetypes.rst:212 +#: ../../../library/mimetypes.rst:213 msgid "" "This class represents a MIME-types database. By default, it provides access " "to the same database as the rest of this module. The initial database is a " @@ -253,13 +254,13 @@ msgid "" "cleared before loading additional data if the default data is not desired." msgstr "" -#: ../../../library/mimetypes.rst:219 +#: ../../../library/mimetypes.rst:220 msgid "" "The optional *filenames* parameter can be used to cause additional files to " "be loaded \"on top\" of the default database." msgstr "" -#: ../../../library/mimetypes.rst:225 +#: ../../../library/mimetypes.rst:226 msgid "" "Dictionary mapping suffixes to suffixes. This is used to allow recognition " "of encoded files for which the encoding and the type are indicated by the " @@ -268,13 +269,13 @@ msgid "" "is initially a copy of the global :data:`suffix_map` defined in the module." msgstr "" -#: ../../../library/mimetypes.rst:234 +#: ../../../library/mimetypes.rst:235 msgid "" "Dictionary mapping filename extensions to encoding types. This is initially " "a copy of the global :data:`encodings_map` defined in the module." msgstr "" -#: ../../../library/mimetypes.rst:240 +#: ../../../library/mimetypes.rst:241 msgid "" "Tuple containing two dictionaries, mapping filename extensions to MIME " "types: the first dictionary is for the non-standards types and the second " @@ -282,7 +283,7 @@ msgid "" "and :data:`types_map`." msgstr "" -#: ../../../library/mimetypes.rst:248 +#: ../../../library/mimetypes.rst:249 msgid "" "Tuple containing two dictionaries, mapping MIME types to a list of filename " "extensions: the first dictionary is for the non-standards types and the " @@ -290,63 +291,63 @@ msgid "" "`common_types` and :data:`types_map`." msgstr "" -#: ../../../library/mimetypes.rst:256 +#: ../../../library/mimetypes.rst:257 msgid "" "Similar to the :func:`guess_extension` function, using the tables stored as " "part of the object." msgstr "" -#: ../../../library/mimetypes.rst:262 +#: ../../../library/mimetypes.rst:263 msgid "" "Similar to the :func:`guess_type` function, using the tables stored as part " "of the object." msgstr "" -#: ../../../library/mimetypes.rst:268 +#: ../../../library/mimetypes.rst:269 msgid "" "Similar to the :func:`guess_file_type` function, using the tables stored as " "part of the object." msgstr "" -#: ../../../library/mimetypes.rst:276 +#: ../../../library/mimetypes.rst:277 msgid "" "Similar to the :func:`guess_all_extensions` function, using the tables " "stored as part of the object." msgstr "" -#: ../../../library/mimetypes.rst:282 +#: ../../../library/mimetypes.rst:283 msgid "" "Load MIME information from a file named *filename*. This uses :meth:" "`readfp` to parse the file." msgstr "" -#: ../../../library/mimetypes.rst:285 +#: ../../../library/mimetypes.rst:286 msgid "" "If *strict* is ``True``, information will be added to list of standard " "types, else to the list of non-standard types." msgstr "" -#: ../../../library/mimetypes.rst:291 +#: ../../../library/mimetypes.rst:292 msgid "" "Load MIME type information from an open file *fp*. The file must have the " "format of the standard :file:`mime.types` files." msgstr "" -#: ../../../library/mimetypes.rst:294 ../../../library/mimetypes.rst:304 +#: ../../../library/mimetypes.rst:295 ../../../library/mimetypes.rst:305 msgid "" "If *strict* is ``True``, information will be added to the list of standard " "types, else to the list of non-standard types." msgstr "" -#: ../../../library/mimetypes.rst:300 +#: ../../../library/mimetypes.rst:301 msgid "Load MIME type information from the Windows registry." msgstr "" -#: ../../../library/mimetypes.rst:302 +#: ../../../library/mimetypes.rst:303 msgid "Availability" msgstr "" -#: ../../../library/mimetypes.rst:312 +#: ../../../library/mimetypes.rst:313 msgid "" "Add a mapping from the MIME type *type* to the extension *ext*. Valid " "extensions start with a '.' or are empty. When the extension is already " @@ -354,50 +355,50 @@ msgid "" "the extension will be added to the list of known extensions." msgstr "" -#: ../../../library/mimetypes.rst:332 +#: ../../../library/mimetypes.rst:333 msgid "Command-line usage" msgstr "" -#: ../../../library/mimetypes.rst:334 +#: ../../../library/mimetypes.rst:335 msgid "" "The :mod:`!mimetypes` module can be executed as a script from the command " "line." msgstr "" -#: ../../../library/mimetypes.rst:340 +#: ../../../library/mimetypes.rst:341 msgid "The following options are accepted:" msgstr "" -#: ../../../library/mimetypes.rst:347 +#: ../../../library/mimetypes.rst:348 msgid "Show the help message and exit." msgstr "" -#: ../../../library/mimetypes.rst:352 +#: ../../../library/mimetypes.rst:353 msgid "Guess extension instead of type." msgstr "" -#: ../../../library/mimetypes.rst:357 +#: ../../../library/mimetypes.rst:358 msgid "Additionally search for some common, but non-standard types." msgstr "" -#: ../../../library/mimetypes.rst:359 +#: ../../../library/mimetypes.rst:360 msgid "" "By default the script converts MIME types to file extensions. However, if " "``--extension`` is specified, it converts file extensions to MIME types." msgstr "" -#: ../../../library/mimetypes.rst:363 +#: ../../../library/mimetypes.rst:364 msgid "" "For each ``type`` entry, the script writes a line into the standard output " "stream. If an unknown type occurs, it writes an error message into the " "standard output stream and exits with the return code ``1``." msgstr "" -#: ../../../library/mimetypes.rst:371 +#: ../../../library/mimetypes.rst:372 msgid "Command-line example" msgstr "" -#: ../../../library/mimetypes.rst:373 +#: ../../../library/mimetypes.rst:374 msgid "" "Here are some examples of typical usage of the :mod:`!mimetypes` command-" "line interface:" @@ -416,10 +417,10 @@ msgstr "" msgid "headers" msgstr "" -#: ../../../library/mimetypes.rst:155 +#: ../../../library/mimetypes.rst:156 msgid "file" msgstr "" -#: ../../../library/mimetypes.rst:155 +#: ../../../library/mimetypes.rst:156 msgid "mime.types" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/numbers.pot b/main/locale/pot/LC_MESSAGES/library/numbers.pot index 0ff1dda2e5c..abd5ecbe2a9 100644 --- a/main/locale/pot/LC_MESSAGES/library/numbers.pot +++ b/main/locale/pot/LC_MESSAGES/library/numbers.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-11 08:40+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -123,26 +123,25 @@ msgstr "" msgid "" "Implementers should be careful to make equal numbers equal and hash them to " "the same values. This may be subtle if there are two different extensions of " -"the real numbers. For example, :class:`fractions.Fraction` implements :func:" -"`hash` as follows::" +"the real numbers. See also :ref:`numeric-hash`." msgstr "" -#: ../../../library/numbers.rst:110 +#: ../../../library/numbers.rst:97 msgid "Adding More Numeric ABCs" msgstr "" -#: ../../../library/numbers.rst:112 +#: ../../../library/numbers.rst:99 msgid "" "There are, of course, more possible ABCs for numbers, and this would be a " "poor hierarchy if it precluded the possibility of adding those. You can add " "``MyFoo`` between :class:`Complex` and :class:`Real` with::" msgstr "" -#: ../../../library/numbers.rst:124 +#: ../../../library/numbers.rst:111 msgid "Implementing the arithmetic operations" msgstr "" -#: ../../../library/numbers.rst:126 +#: ../../../library/numbers.rst:113 msgid "" "We want to implement the arithmetic operations so that mixed-mode operations " "either call an implementation whose author knew about the types of both " @@ -151,7 +150,7 @@ msgid "" "__add__` and :meth:`~object.__radd__` should be defined as::" msgstr "" -#: ../../../library/numbers.rst:158 +#: ../../../library/numbers.rst:145 msgid "" "There are 5 different cases for a mixed-type operation on subclasses of :" "class:`Complex`. I'll refer to all of the above code that doesn't refer to " @@ -160,12 +159,12 @@ msgid "" "Complex``), and ``b : B <: Complex``. I'll consider ``a + b``:" msgstr "" -#: ../../../library/numbers.rst:165 +#: ../../../library/numbers.rst:152 msgid "" "If ``A`` defines an :meth:`~object.__add__` which accepts ``b``, all is well." msgstr "" -#: ../../../library/numbers.rst:167 +#: ../../../library/numbers.rst:154 msgid "" "If ``A`` falls back to the boilerplate code, and it were to return a value " "from :meth:`~object.__add__`, we'd miss the possibility that ``B`` defines a " @@ -174,26 +173,26 @@ msgid "" "meth:`!__add__` at all.)" msgstr "" -#: ../../../library/numbers.rst:173 +#: ../../../library/numbers.rst:160 msgid "" "Then ``B``'s :meth:`~object.__radd__` gets a chance. If it accepts ``a``, " "all is well." msgstr "" -#: ../../../library/numbers.rst:175 +#: ../../../library/numbers.rst:162 msgid "" "If it falls back to the boilerplate, there are no more possible methods to " "try, so this is where the default implementation should live." msgstr "" -#: ../../../library/numbers.rst:178 +#: ../../../library/numbers.rst:165 msgid "" "If ``B <: A``, Python tries ``B.__radd__`` before ``A.__add__``. This is ok, " "because it was implemented with knowledge of ``A``, so it can handle those " "instances before delegating to :class:`Complex`." msgstr "" -#: ../../../library/numbers.rst:183 +#: ../../../library/numbers.rst:170 msgid "" "If ``A <: Complex`` and ``B <: Real`` without sharing any other knowledge, " "then the appropriate shared operation is the one involving the built in :" @@ -201,7 +200,7 @@ msgid "" "b+a``." msgstr "" -#: ../../../library/numbers.rst:188 +#: ../../../library/numbers.rst:175 msgid "" "Because most of the operations on any given type will be very similar, it " "can be useful to define a helper function which generates the forward and " diff --git a/main/locale/pot/LC_MESSAGES/library/os.pot b/main/locale/pot/LC_MESSAGES/library/os.pot index 6505fc2fa1e..33c07f09822 100644 --- a/main/locale/pot/LC_MESSAGES/library/os.pot +++ b/main/locale/pot/LC_MESSAGES/library/os.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -305,81 +305,82 @@ msgstr "" #: ../../../library/os.rst:1548 ../../../library/os.rst:1565 #: ../../../library/os.rst:1579 ../../../library/os.rst:1588 #: ../../../library/os.rst:1597 ../../../library/os.rst:1612 -#: ../../../library/os.rst:1624 ../../../library/os.rst:1653 -#: ../../../library/os.rst:1665 ../../../library/os.rst:1675 -#: ../../../library/os.rst:1689 ../../../library/os.rst:1768 -#: ../../../library/os.rst:1788 ../../../library/os.rst:1797 -#: ../../../library/os.rst:1809 ../../../library/os.rst:1863 -#: ../../../library/os.rst:1887 ../../../library/os.rst:1897 -#: ../../../library/os.rst:1905 ../../../library/os.rst:1914 -#: ../../../library/os.rst:1925 ../../../library/os.rst:1962 -#: ../../../library/os.rst:1989 ../../../library/os.rst:2041 -#: ../../../library/os.rst:2047 ../../../library/os.rst:2213 -#: ../../../library/os.rst:2290 ../../../library/os.rst:2307 -#: ../../../library/os.rst:2321 ../../../library/os.rst:2347 -#: ../../../library/os.rst:2365 ../../../library/os.rst:2381 -#: ../../../library/os.rst:2398 ../../../library/os.rst:2465 -#: ../../../library/os.rst:2489 ../../../library/os.rst:2509 -#: ../../../library/os.rst:2657 ../../../library/os.rst:2679 -#: ../../../library/os.rst:2730 ../../../library/os.rst:2742 -#: ../../../library/os.rst:2764 ../../../library/os.rst:3473 -#: ../../../library/os.rst:3505 ../../../library/os.rst:3515 -#: ../../../library/os.rst:3525 ../../../library/os.rst:3535 -#: ../../../library/os.rst:3609 ../../../library/os.rst:3619 -#: ../../../library/os.rst:3629 ../../../library/os.rst:3658 -#: ../../../library/os.rst:3718 ../../../library/os.rst:3730 -#: ../../../library/os.rst:3759 ../../../library/os.rst:3769 -#: ../../../library/os.rst:3778 ../../../library/os.rst:3790 -#: ../../../library/os.rst:3802 ../../../library/os.rst:3816 -#: ../../../library/os.rst:3902 ../../../library/os.rst:3910 -#: ../../../library/os.rst:3918 ../../../library/os.rst:3926 -#: ../../../library/os.rst:3934 ../../../library/os.rst:3942 -#: ../../../library/os.rst:3950 ../../../library/os.rst:3958 -#: ../../../library/os.rst:3966 ../../../library/os.rst:3974 -#: ../../../library/os.rst:4095 ../../../library/os.rst:4118 -#: ../../../library/os.rst:4132 ../../../library/os.rst:4356 -#: ../../../library/os.rst:4381 ../../../library/os.rst:4406 -#: ../../../library/os.rst:4460 ../../../library/os.rst:4469 -#: ../../../library/os.rst:4478 ../../../library/os.rst:4486 -#: ../../../library/os.rst:4495 ../../../library/os.rst:4504 -#: ../../../library/os.rst:4576 ../../../library/os.rst:4639 -#: ../../../library/os.rst:4649 ../../../library/os.rst:4667 -#: ../../../library/os.rst:4676 ../../../library/os.rst:4686 -#: ../../../library/os.rst:4696 ../../../library/os.rst:4706 -#: ../../../library/os.rst:4717 ../../../library/os.rst:4866 -#: ../../../library/os.rst:4935 ../../../library/os.rst:4970 -#: ../../../library/os.rst:4978 ../../../library/os.rst:4985 -#: ../../../library/os.rst:4992 ../../../library/os.rst:4999 -#: ../../../library/os.rst:5006 ../../../library/os.rst:5013 -#: ../../../library/os.rst:5020 ../../../library/os.rst:5028 -#: ../../../library/os.rst:5036 ../../../library/os.rst:5043 -#: ../../../library/os.rst:5050 ../../../library/os.rst:5059 -#: ../../../library/os.rst:5067 ../../../library/os.rst:5075 -#: ../../../library/os.rst:5082 ../../../library/os.rst:5089 -#: ../../../library/os.rst:5138 ../../../library/os.rst:5170 -#: ../../../library/os.rst:5193 ../../../library/os.rst:5209 -#: ../../../library/os.rst:5216 ../../../library/os.rst:5227 -#: ../../../library/os.rst:5237 ../../../library/os.rst:5250 -#: ../../../library/os.rst:5258 ../../../library/os.rst:5290 -#: ../../../library/os.rst:5401 ../../../library/os.rst:5417 -#: ../../../library/os.rst:5450 ../../../library/os.rst:5519 -#: ../../../library/os.rst:5541 ../../../library/os.rst:5552 -#: ../../../library/os.rst:5564 ../../../library/os.rst:5609 -#: ../../../library/os.rst:5646 ../../../library/os.rst:5669 -#: ../../../library/os.rst:5690 ../../../library/os.rst:5724 -#: ../../../library/os.rst:5765 ../../../library/os.rst:5785 -#: ../../../library/os.rst:5799 ../../../library/os.rst:5816 -#: ../../../library/os.rst:5831 ../../../library/os.rst:5842 -#: ../../../library/os.rst:5854 ../../../library/os.rst:5867 -#: ../../../library/os.rst:5876 ../../../library/os.rst:5886 -#: ../../../library/os.rst:5899 ../../../library/os.rst:5934 -#: ../../../library/os.rst:5950 ../../../library/os.rst:5961 -#: ../../../library/os.rst:5973 ../../../library/os.rst:5980 -#: ../../../library/os.rst:5989 ../../../library/os.rst:5998 -#: ../../../library/os.rst:6007 ../../../library/os.rst:6016 -#: ../../../library/os.rst:6180 ../../../library/os.rst:6189 -#: ../../../library/os.rst:6213 ../../../library/os.rst:6240 -#: ../../../library/os.rst:6249 ../../../library/os.rst:6372 +#: ../../../library/os.rst:1624 ../../../library/os.rst:1654 +#: ../../../library/os.rst:1666 ../../../library/os.rst:1676 +#: ../../../library/os.rst:1690 ../../../library/os.rst:1700 +#: ../../../library/os.rst:1779 ../../../library/os.rst:1799 +#: ../../../library/os.rst:1808 ../../../library/os.rst:1820 +#: ../../../library/os.rst:1874 ../../../library/os.rst:1898 +#: ../../../library/os.rst:1908 ../../../library/os.rst:1916 +#: ../../../library/os.rst:1925 ../../../library/os.rst:1936 +#: ../../../library/os.rst:1973 ../../../library/os.rst:2000 +#: ../../../library/os.rst:2052 ../../../library/os.rst:2058 +#: ../../../library/os.rst:2229 ../../../library/os.rst:2306 +#: ../../../library/os.rst:2323 ../../../library/os.rst:2337 +#: ../../../library/os.rst:2363 ../../../library/os.rst:2381 +#: ../../../library/os.rst:2397 ../../../library/os.rst:2414 +#: ../../../library/os.rst:2481 ../../../library/os.rst:2505 +#: ../../../library/os.rst:2525 ../../../library/os.rst:2673 +#: ../../../library/os.rst:2695 ../../../library/os.rst:2746 +#: ../../../library/os.rst:2758 ../../../library/os.rst:2780 +#: ../../../library/os.rst:3495 ../../../library/os.rst:3527 +#: ../../../library/os.rst:3537 ../../../library/os.rst:3547 +#: ../../../library/os.rst:3557 ../../../library/os.rst:3631 +#: ../../../library/os.rst:3641 ../../../library/os.rst:3651 +#: ../../../library/os.rst:3680 ../../../library/os.rst:3740 +#: ../../../library/os.rst:3752 ../../../library/os.rst:3781 +#: ../../../library/os.rst:3791 ../../../library/os.rst:3800 +#: ../../../library/os.rst:3812 ../../../library/os.rst:3824 +#: ../../../library/os.rst:3838 ../../../library/os.rst:3924 +#: ../../../library/os.rst:3932 ../../../library/os.rst:3940 +#: ../../../library/os.rst:3948 ../../../library/os.rst:3956 +#: ../../../library/os.rst:3964 ../../../library/os.rst:3972 +#: ../../../library/os.rst:3980 ../../../library/os.rst:3988 +#: ../../../library/os.rst:3996 ../../../library/os.rst:4117 +#: ../../../library/os.rst:4140 ../../../library/os.rst:4154 +#: ../../../library/os.rst:4378 ../../../library/os.rst:4403 +#: ../../../library/os.rst:4428 ../../../library/os.rst:4482 +#: ../../../library/os.rst:4491 ../../../library/os.rst:4500 +#: ../../../library/os.rst:4508 ../../../library/os.rst:4517 +#: ../../../library/os.rst:4526 ../../../library/os.rst:4598 +#: ../../../library/os.rst:4661 ../../../library/os.rst:4671 +#: ../../../library/os.rst:4689 ../../../library/os.rst:4698 +#: ../../../library/os.rst:4708 ../../../library/os.rst:4718 +#: ../../../library/os.rst:4728 ../../../library/os.rst:4739 +#: ../../../library/os.rst:4888 ../../../library/os.rst:4957 +#: ../../../library/os.rst:4992 ../../../library/os.rst:5000 +#: ../../../library/os.rst:5007 ../../../library/os.rst:5014 +#: ../../../library/os.rst:5021 ../../../library/os.rst:5028 +#: ../../../library/os.rst:5035 ../../../library/os.rst:5042 +#: ../../../library/os.rst:5050 ../../../library/os.rst:5058 +#: ../../../library/os.rst:5065 ../../../library/os.rst:5072 +#: ../../../library/os.rst:5081 ../../../library/os.rst:5089 +#: ../../../library/os.rst:5097 ../../../library/os.rst:5104 +#: ../../../library/os.rst:5111 ../../../library/os.rst:5160 +#: ../../../library/os.rst:5192 ../../../library/os.rst:5215 +#: ../../../library/os.rst:5231 ../../../library/os.rst:5238 +#: ../../../library/os.rst:5249 ../../../library/os.rst:5259 +#: ../../../library/os.rst:5272 ../../../library/os.rst:5280 +#: ../../../library/os.rst:5312 ../../../library/os.rst:5423 +#: ../../../library/os.rst:5439 ../../../library/os.rst:5472 +#: ../../../library/os.rst:5541 ../../../library/os.rst:5563 +#: ../../../library/os.rst:5574 ../../../library/os.rst:5586 +#: ../../../library/os.rst:5631 ../../../library/os.rst:5668 +#: ../../../library/os.rst:5691 ../../../library/os.rst:5712 +#: ../../../library/os.rst:5746 ../../../library/os.rst:5787 +#: ../../../library/os.rst:5807 ../../../library/os.rst:5821 +#: ../../../library/os.rst:5838 ../../../library/os.rst:5853 +#: ../../../library/os.rst:5864 ../../../library/os.rst:5876 +#: ../../../library/os.rst:5889 ../../../library/os.rst:5898 +#: ../../../library/os.rst:5908 ../../../library/os.rst:5921 +#: ../../../library/os.rst:5956 ../../../library/os.rst:5972 +#: ../../../library/os.rst:5983 ../../../library/os.rst:5995 +#: ../../../library/os.rst:6002 ../../../library/os.rst:6011 +#: ../../../library/os.rst:6020 ../../../library/os.rst:6029 +#: ../../../library/os.rst:6038 ../../../library/os.rst:6202 +#: ../../../library/os.rst:6211 ../../../library/os.rst:6235 +#: ../../../library/os.rst:6262 ../../../library/os.rst:6271 +#: ../../../library/os.rst:6394 msgid "Availability" msgstr "" @@ -928,7 +929,7 @@ msgstr "" msgid ":data:`sys.platform` which has finer granularity." msgstr "" -#: ../../../library/os.rst:818 ../../../library/os.rst:5671 +#: ../../../library/os.rst:818 ../../../library/os.rst:5693 msgid "" "Return type changed from a tuple to a tuple-like object with named " "attributes." @@ -1176,23 +1177,23 @@ msgid "" "this is equivalent to ``os.chmod(fd, mode)``." msgstr "" -#: ../../../library/os.rst:1068 ../../../library/os.rst:2262 -#: ../../../library/os.rst:2363 +#: ../../../library/os.rst:1068 ../../../library/os.rst:2278 +#: ../../../library/os.rst:2379 msgid "" "Raises an :ref:`auditing event ` ``os.chmod`` with arguments " "``path``, ``mode``, ``dir_fd``." msgstr "" #: ../../../library/os.rst:1072 ../../../library/os.rst:1090 -#: ../../../library/os.rst:1178 ../../../library/os.rst:1811 -#: ../../../library/os.rst:2259 ../../../library/os.rst:2292 -#: ../../../library/os.rst:4097 +#: ../../../library/os.rst:1178 ../../../library/os.rst:1822 +#: ../../../library/os.rst:2275 ../../../library/os.rst:2308 +#: ../../../library/os.rst:4119 msgid "" "The function is limited on WASI, see :ref:`wasm-availability` for more " "information." msgstr "" -#: ../../../library/os.rst:1075 ../../../library/os.rst:2370 +#: ../../../library/os.rst:1075 ../../../library/os.rst:2386 msgid "Added support on Windows." msgstr "" @@ -1203,8 +1204,8 @@ msgid "" "`chown`. As of Python 3.3, this is equivalent to ``os.chown(fd, uid, gid)``." msgstr "" -#: ../../../library/os.rst:1086 ../../../library/os.rst:2288 -#: ../../../library/os.rst:2379 +#: ../../../library/os.rst:1086 ../../../library/os.rst:2304 +#: ../../../library/os.rst:2395 msgid "" "Raises an :ref:`auditing event ` ``os.chown`` with arguments " "``path``, ``uid``, ``gid``, ``dir_fd``." @@ -1227,7 +1228,7 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: ../../../library/os.rst:1112 ../../../library/os.rst:2722 +#: ../../../library/os.rst:1112 ../../../library/os.rst:2738 msgid "" "If *name* is a string and is not known, :exc:`ValueError` is raised. If a " "specific value for *name* is not supported by the host system, even if it is " @@ -1249,7 +1250,7 @@ msgstr "" msgid "As of Python 3.3, this is equivalent to ``os.stat(fd)``." msgstr "" -#: ../../../library/os.rst:1131 ../../../library/os.rst:2531 +#: ../../../library/os.rst:1131 ../../../library/os.rst:2547 msgid "The :func:`.stat` function." msgstr "" @@ -1287,7 +1288,7 @@ msgid "" "``fd``, ``length``." msgstr "" -#: ../../../library/os.rst:1165 ../../../library/os.rst:4136 +#: ../../../library/os.rst:1165 ../../../library/os.rst:4158 msgid "Added support for Windows" msgstr "" @@ -1301,11 +1302,11 @@ msgstr "" msgid "See also :func:`set_blocking` and :meth:`socket.socket.setblocking`." msgstr "" -#: ../../../library/os.rst:1181 ../../../library/os.rst:1814 +#: ../../../library/os.rst:1181 ../../../library/os.rst:1825 msgid "On Windows, this function is limited to pipes." msgstr "" -#: ../../../library/os.rst:1185 ../../../library/os.rst:1818 +#: ../../../library/os.rst:1185 ../../../library/os.rst:1829 msgid "Added support for pipes on Windows." msgstr "" @@ -1488,37 +1489,37 @@ msgid "" "To wrap a file descriptor in a file object, use :func:`fdopen`." msgstr "" -#: ../../../library/os.rst:1334 ../../../library/os.rst:2536 -#: ../../../library/os.rst:2576 ../../../library/os.rst:2659 -#: ../../../library/os.rst:2681 ../../../library/os.rst:2769 -#: ../../../library/os.rst:2799 ../../../library/os.rst:2906 -#: ../../../library/os.rst:4152 +#: ../../../library/os.rst:1334 ../../../library/os.rst:2552 +#: ../../../library/os.rst:2592 ../../../library/os.rst:2675 +#: ../../../library/os.rst:2697 ../../../library/os.rst:2785 +#: ../../../library/os.rst:2815 ../../../library/os.rst:2922 +#: ../../../library/os.rst:4174 msgid "Added the *dir_fd* parameter." msgstr "" -#: ../../../library/os.rst:1337 ../../../library/os.rst:1709 -#: ../../../library/os.rst:1944 ../../../library/os.rst:5767 +#: ../../../library/os.rst:1337 ../../../library/os.rst:1720 +#: ../../../library/os.rst:1955 ../../../library/os.rst:5789 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the function now retries the system call instead of raising an :" "exc:`InterruptedError` exception (see :pep:`475` for the rationale)." msgstr "" -#: ../../../library/os.rst:1342 ../../../library/os.rst:2155 -#: ../../../library/os.rst:2187 ../../../library/os.rst:2218 -#: ../../../library/os.rst:2268 ../../../library/os.rst:2309 -#: ../../../library/os.rst:2349 ../../../library/os.rst:2367 -#: ../../../library/os.rst:2383 ../../../library/os.rst:2443 -#: ../../../library/os.rst:2539 ../../../library/os.rst:2579 -#: ../../../library/os.rst:2630 ../../../library/os.rst:2662 -#: ../../../library/os.rst:2684 ../../../library/os.rst:2732 -#: ../../../library/os.rst:2802 ../../../library/os.rst:2821 -#: ../../../library/os.rst:2909 ../../../library/os.rst:3206 -#: ../../../library/os.rst:3821 ../../../library/os.rst:4139 -#: ../../../library/os.rst:4155 ../../../library/os.rst:4196 -#: ../../../library/os.rst:4299 ../../../library/os.rst:4360 -#: ../../../library/os.rst:4757 ../../../library/os.rst:4941 -#: ../../../library/os.rst:5526 +#: ../../../library/os.rst:1342 ../../../library/os.rst:2166 +#: ../../../library/os.rst:2203 ../../../library/os.rst:2234 +#: ../../../library/os.rst:2284 ../../../library/os.rst:2325 +#: ../../../library/os.rst:2365 ../../../library/os.rst:2383 +#: ../../../library/os.rst:2399 ../../../library/os.rst:2459 +#: ../../../library/os.rst:2555 ../../../library/os.rst:2595 +#: ../../../library/os.rst:2646 ../../../library/os.rst:2678 +#: ../../../library/os.rst:2700 ../../../library/os.rst:2748 +#: ../../../library/os.rst:2818 ../../../library/os.rst:2837 +#: ../../../library/os.rst:2925 ../../../library/os.rst:3228 +#: ../../../library/os.rst:3843 ../../../library/os.rst:4161 +#: ../../../library/os.rst:4177 ../../../library/os.rst:4218 +#: ../../../library/os.rst:4321 ../../../library/os.rst:4382 +#: ../../../library/os.rst:4779 ../../../library/os.rst:4963 +#: ../../../library/os.rst:5548 msgid "Accepts a :term:`path-like object`." msgstr "" @@ -1626,7 +1627,7 @@ msgid "" "leaving the file offset unchanged." msgstr "" -#: ../../../library/os.rst:1501 ../../../library/os.rst:1698 +#: ../../../library/os.rst:1501 ../../../library/os.rst:1709 msgid "" "Return a bytestring containing the bytes read. If the end of the file " "referred to by *fd* has been reached, an empty bytes object is returned." @@ -1676,14 +1677,14 @@ msgstr "" msgid ":data:`RWF_DONTCACHE`" msgstr "" -#: ../../../library/os.rst:1540 ../../../library/os.rst:1881 +#: ../../../library/os.rst:1540 ../../../library/os.rst:1892 msgid "" "Return the total number of bytes actually read which can be less than the " "total capacity of all the objects." msgstr "" -#: ../../../library/os.rst:1543 ../../../library/os.rst:1648 -#: ../../../library/os.rst:1884 ../../../library/os.rst:1959 +#: ../../../library/os.rst:1543 ../../../library/os.rst:1649 +#: ../../../library/os.rst:1895 ../../../library/os.rst:1970 msgid "" "The operating system may set a limit (:func:`sysconf` value " "``'SC_IOV_MAX'``) on the number of buffers that can be used." @@ -1693,7 +1694,7 @@ msgstr "" msgid "Combine the functionality of :func:`os.readv` and :func:`os.pread`." msgstr "" -#: ../../../library/os.rst:1550 ../../../library/os.rst:1655 +#: ../../../library/os.rst:1550 ../../../library/os.rst:1656 msgid "Using flags requires Linux >= 4.6." msgstr "" @@ -1752,7 +1753,7 @@ msgid "" "*offset*, leaving the file offset unchanged." msgstr "" -#: ../../../library/os.rst:1622 ../../../library/os.rst:1934 +#: ../../../library/os.rst:1622 ../../../library/os.rst:1945 msgid "Return the number of bytes actually written." msgstr "" @@ -1781,27 +1782,31 @@ msgstr "" msgid ":data:`RWF_ATOMIC`" msgstr "" -#: ../../../library/os.rst:1646 +#: ../../../library/os.rst:1645 +msgid ":data:`RWF_NOSIGNAL`" +msgstr "" + +#: ../../../library/os.rst:1647 msgid "Return the total number of bytes actually written." msgstr "" -#: ../../../library/os.rst:1651 +#: ../../../library/os.rst:1652 msgid "Combine the functionality of :func:`os.writev` and :func:`os.pwrite`." msgstr "" -#: ../../../library/os.rst:1662 +#: ../../../library/os.rst:1663 msgid "" "Provide a per-write equivalent of the :data:`O_DSYNC` :func:`os.open` flag. " "This flag effect applies only to the data range written by the system call." msgstr "" -#: ../../../library/os.rst:1672 +#: ../../../library/os.rst:1673 msgid "" "Provide a per-write equivalent of the :data:`O_SYNC` :func:`os.open` flag. " "This flag effect applies only to the data range written by the system call." msgstr "" -#: ../../../library/os.rst:1682 +#: ../../../library/os.rst:1683 msgid "" "Provide a per-write equivalent of the :data:`O_APPEND` :func:`os.open` flag. " "This flag is meaningful only for :func:`os.pwritev`, and its effect applies " @@ -1811,11 +1816,17 @@ msgid "" "*offset* is updated." msgstr "" -#: ../../../library/os.rst:1696 +#: ../../../library/os.rst:1697 +msgid "" +"Prevent pipe and socket writes from raising :const:`~signal.SIGPIPE`. This " +"flag is meaningful only for :func:`os.pwritev`." +msgstr "" + +#: ../../../library/os.rst:1707 msgid "Read at most *n* bytes from file descriptor *fd*." msgstr "" -#: ../../../library/os.rst:1703 +#: ../../../library/os.rst:1714 msgid "" "This function is intended for low-level I/O and must be applied to a file " "descriptor as returned by :func:`os.open` or :func:`pipe`. To read a \"file " @@ -1824,13 +1835,13 @@ msgid "" "or :meth:`~io.IOBase.readline` methods." msgstr "" -#: ../../../library/os.rst:1717 +#: ../../../library/os.rst:1728 msgid "" "Read from a file descriptor *fd* into a mutable :ref:`buffer object " "` *buffer*." msgstr "" -#: ../../../library/os.rst:1720 +#: ../../../library/os.rst:1731 msgid "" "The *buffer* should be mutable and :term:`bytes-like `. " "On success, returns the number of bytes read. Less bytes may be read than " @@ -1839,14 +1850,14 @@ msgid "" "Other errors will not be retried and an error will be raised." msgstr "" -#: ../../../library/os.rst:1726 +#: ../../../library/os.rst:1737 msgid "" "Returns 0 if *fd* is at end of file or if the provided *buffer* has length 0 " "(which can be used to check for errors without reading data). Never returns " "negative." msgstr "" -#: ../../../library/os.rst:1732 +#: ../../../library/os.rst:1743 msgid "" "This function is intended for low-level I/O and must be applied to a file " "descriptor as returned by :func:`os.open` or :func:`os.pipe`. To read a " @@ -1855,26 +1866,26 @@ msgid "" "readinto`, :meth:`io.BufferedIOBase.read`, or :meth:`io.TextIOBase.read`" msgstr "" -#: ../../../library/os.rst:1745 +#: ../../../library/os.rst:1756 msgid "" "Copy *count* bytes from file descriptor *in_fd* to file descriptor *out_fd* " "starting at *offset*. Return the number of bytes sent. When EOF is reached " "return ``0``." msgstr "" -#: ../../../library/os.rst:1749 +#: ../../../library/os.rst:1760 msgid "" "The first function notation is supported by all platforms that define :func:" "`sendfile`." msgstr "" -#: ../../../library/os.rst:1752 +#: ../../../library/os.rst:1763 msgid "" "On Linux, if *offset* is given as ``None``, the bytes are read from the " "current position of *in_fd* and the position of *in_fd* is updated." msgstr "" -#: ../../../library/os.rst:1755 +#: ../../../library/os.rst:1766 msgid "" "The second case may be used on macOS and FreeBSD where *headers* and " "*trailers* are arbitrary sequences of buffers that are written before and " @@ -1882,91 +1893,91 @@ msgid "" "case." msgstr "" -#: ../../../library/os.rst:1759 +#: ../../../library/os.rst:1770 msgid "" "On macOS and FreeBSD, a value of ``0`` for *count* specifies to send until " "the end of *in_fd* is reached." msgstr "" -#: ../../../library/os.rst:1762 +#: ../../../library/os.rst:1773 msgid "" "All platforms support sockets as *out_fd* file descriptor, and some " "platforms allow other types (e.g. regular file, pipe) as well." msgstr "" -#: ../../../library/os.rst:1765 +#: ../../../library/os.rst:1776 msgid "" "Cross-platform applications should not use *headers*, *trailers* and *flags* " "arguments." msgstr "" -#: ../../../library/os.rst:1772 +#: ../../../library/os.rst:1783 msgid "" "For a higher-level wrapper of :func:`sendfile`, see :meth:`socket.socket." "sendfile`." msgstr "" -#: ../../../library/os.rst:1777 +#: ../../../library/os.rst:1788 msgid "Parameters *out* and *in* was renamed to *out_fd* and *in_fd*." msgstr "" -#: ../../../library/os.rst:1785 +#: ../../../library/os.rst:1796 msgid "" "Parameters to the :func:`sendfile` function, if the implementation supports " "them." msgstr "" -#: ../../../library/os.rst:1794 +#: ../../../library/os.rst:1805 msgid "" "Parameter to the :func:`sendfile` function, if the implementation supports " "it. The data won't be cached in the virtual memory and will be freed " "afterwards." msgstr "" -#: ../../../library/os.rst:1804 +#: ../../../library/os.rst:1815 msgid "" "Set the blocking mode of the specified file descriptor. Set the :data:" "`O_NONBLOCK` flag if blocking is ``False``, clear the flag otherwise." msgstr "" -#: ../../../library/os.rst:1807 +#: ../../../library/os.rst:1818 msgid "See also :func:`get_blocking` and :meth:`socket.socket.setblocking`." msgstr "" -#: ../../../library/os.rst:1824 +#: ../../../library/os.rst:1835 msgid "" "Transfer *count* bytes from file descriptor *src*, starting from offset " "*offset_src*, to file descriptor *dst*, starting from offset *offset_dst*." msgstr "" -#: ../../../library/os.rst:1827 +#: ../../../library/os.rst:1838 msgid "" "The splicing behaviour can be modified by specifying a *flags* value. Any of " "the following variables may used, combined using bitwise OR (the ``|`` " "operator):" msgstr "" -#: ../../../library/os.rst:1831 +#: ../../../library/os.rst:1842 msgid "" "If :const:`SPLICE_F_MOVE` is specified, the kernel is asked to move pages " "instead of copying, but pages may still be copied if the kernel cannot move " "the pages from the pipe." msgstr "" -#: ../../../library/os.rst:1835 +#: ../../../library/os.rst:1846 msgid "" "If :const:`SPLICE_F_NONBLOCK` is specified, the kernel is asked to not block " "on I/O. This makes the splice pipe operations nonblocking, but splice may " "nevertheless block because the spliced file descriptors may block." msgstr "" -#: ../../../library/os.rst:1840 +#: ../../../library/os.rst:1851 msgid "" "If :const:`SPLICE_F_MORE` is specified, it hints to the kernel that more " "data will be coming in a subsequent splice." msgstr "" -#: ../../../library/os.rst:1843 +#: ../../../library/os.rst:1854 msgid "" "At least one of the file descriptors must refer to a pipe. If *offset_src* " "is ``None``, then *src* is read from the current position; respectively for " @@ -1976,7 +1987,7 @@ msgid "" "`~OSError.errno` set to :const:`errno.EXDEV`." msgstr "" -#: ../../../library/os.rst:1850 +#: ../../../library/os.rst:1861 msgid "" "This copy is done without the additional cost of transferring data from the " "kernel to user space and then back into the kernel. Additionally, some " @@ -1984,7 +1995,7 @@ msgid "" "files are opened as binary." msgstr "" -#: ../../../library/os.rst:1855 +#: ../../../library/os.rst:1866 msgid "" "Upon successful completion, returns the number of bytes spliced to or from " "the pipe. A return value of 0 means end of input. If *src* refers to a pipe, " @@ -1993,11 +2004,11 @@ msgid "" "the pipe." msgstr "" -#: ../../../library/os.rst:1861 +#: ../../../library/os.rst:1872 msgid "The :manpage:`splice(2)` man page." msgstr "" -#: ../../../library/os.rst:1876 +#: ../../../library/os.rst:1887 msgid "" "Read from a file descriptor *fd* into a number of mutable :term:`bytes-like " "objects ` *buffers*. Transfer data into each buffer until " @@ -2005,41 +2016,41 @@ msgid "" "rest of the data." msgstr "" -#: ../../../library/os.rst:1894 +#: ../../../library/os.rst:1905 msgid "" "Return the process group associated with the terminal given by *fd* (an open " "file descriptor as returned by :func:`os.open`)." msgstr "" -#: ../../../library/os.rst:1902 +#: ../../../library/os.rst:1913 msgid "" "Set the process group associated with the terminal given by *fd* (an open " "file descriptor as returned by :func:`os.open`) to *pg*." msgstr "" -#: ../../../library/os.rst:1910 +#: ../../../library/os.rst:1921 msgid "" "Return a string which specifies the terminal device associated with file " "descriptor *fd*. If *fd* is not associated with a terminal device, an " "exception is raised." msgstr "" -#: ../../../library/os.rst:1919 +#: ../../../library/os.rst:1930 msgid "" "Unlock the slave pseudo-terminal device associated with the master pseudo-" "terminal device to which the file descriptor *fd* refers. The file " "descriptor *fd* is not closed upon failure." msgstr "" -#: ../../../library/os.rst:1923 +#: ../../../library/os.rst:1934 msgid "Calls the C standard library function :c:func:`unlockpt`." msgstr "" -#: ../../../library/os.rst:1932 +#: ../../../library/os.rst:1943 msgid "Write the bytestring in *str* to file descriptor *fd*." msgstr "" -#: ../../../library/os.rst:1938 +#: ../../../library/os.rst:1949 msgid "" "This function is intended for low-level I/O and must be applied to a file " "descriptor as returned by :func:`os.open` or :func:`pipe`. To write a " @@ -2048,7 +2059,7 @@ msgid "" "its :meth:`~io.TextIOBase.write` method." msgstr "" -#: ../../../library/os.rst:1952 +#: ../../../library/os.rst:1963 msgid "" "Write the contents of *buffers* to file descriptor *fd*. *buffers* must be a " "sequence of :term:`bytes-like objects `. Buffers are " @@ -2056,64 +2067,64 @@ msgid "" "before proceeding to the second, and so on." msgstr "" -#: ../../../library/os.rst:1957 +#: ../../../library/os.rst:1968 msgid "Returns the total number of bytes actually written." msgstr "" -#: ../../../library/os.rst:1970 +#: ../../../library/os.rst:1981 msgid "Querying the size of a terminal" msgstr "" -#: ../../../library/os.rst:1976 +#: ../../../library/os.rst:1987 msgid "" "Return the size of the terminal window as ``(columns, lines)``, tuple of " "type :class:`terminal_size`." msgstr "" -#: ../../../library/os.rst:1979 +#: ../../../library/os.rst:1990 msgid "" "The optional argument ``fd`` (default ``STDOUT_FILENO``, or standard output) " "specifies which file descriptor should be queried." msgstr "" -#: ../../../library/os.rst:1982 +#: ../../../library/os.rst:1993 msgid "" "If the file descriptor is not connected to a terminal, an :exc:`OSError` is " "raised." msgstr "" -#: ../../../library/os.rst:1985 +#: ../../../library/os.rst:1996 msgid "" ":func:`shutil.get_terminal_size` is the high-level function which should " "normally be used, ``os.get_terminal_size`` is the low-level implementation." msgstr "" -#: ../../../library/os.rst:1993 +#: ../../../library/os.rst:2004 msgid "" "A subclass of tuple, holding ``(columns, lines)`` of the terminal window " "size." msgstr "" -#: ../../../library/os.rst:1997 +#: ../../../library/os.rst:2008 msgid "Width of the terminal window in characters." msgstr "" -#: ../../../library/os.rst:2001 +#: ../../../library/os.rst:2012 msgid "Height of the terminal window in characters." msgstr "" -#: ../../../library/os.rst:2007 +#: ../../../library/os.rst:2018 msgid "Inheritance of File Descriptors" msgstr "" -#: ../../../library/os.rst:2011 +#: ../../../library/os.rst:2022 msgid "" "A file descriptor has an \"inheritable\" flag which indicates if the file " "descriptor can be inherited by child processes. Since Python 3.4, file " "descriptors created by Python are non-inheritable by default." msgstr "" -#: ../../../library/os.rst:2015 +#: ../../../library/os.rst:2026 msgid "" "On UNIX, non-inheritable file descriptors are closed in child processes at " "the execution of a new program, other file descriptors are inherited. Note " @@ -2121,7 +2132,7 @@ msgid "" "processes on :func:`os.fork`." msgstr "" -#: ../../../library/os.rst:2019 +#: ../../../library/os.rst:2030 msgid "" "On Windows, non-inheritable handles and file descriptors are closed in child " "processes, except for standard streams (file descriptors 0, 1 and 2: stdin, " @@ -2132,38 +2143,38 @@ msgid "" "only inherited if the *close_fds* parameter is ``False``." msgstr "" -#: ../../../library/os.rst:2027 +#: ../../../library/os.rst:2038 msgid "On WebAssembly platforms, the file descriptor cannot be modified." msgstr "" -#: ../../../library/os.rst:2031 +#: ../../../library/os.rst:2042 msgid "" "Get the \"inheritable\" flag of the specified file descriptor (a boolean)." msgstr "" -#: ../../../library/os.rst:2035 +#: ../../../library/os.rst:2046 msgid "Set the \"inheritable\" flag of the specified file descriptor." msgstr "" -#: ../../../library/os.rst:2039 +#: ../../../library/os.rst:2050 msgid "Get the \"inheritable\" flag of the specified handle (a boolean)." msgstr "" -#: ../../../library/os.rst:2045 +#: ../../../library/os.rst:2056 msgid "Set the \"inheritable\" flag of the specified handle." msgstr "" -#: ../../../library/os.rst:2053 +#: ../../../library/os.rst:2064 msgid "Files and Directories" msgstr "" -#: ../../../library/os.rst:2055 +#: ../../../library/os.rst:2066 msgid "" "On some Unix platforms, many of these functions support one or more of these " "features:" msgstr "" -#: ../../../library/os.rst:2060 +#: ../../../library/os.rst:2071 msgid "" "**specifying a file descriptor:** Normally the *path* argument provided to " "functions in the :mod:`!os` module must be a string specifying a file path. " @@ -2173,7 +2184,7 @@ msgid "" "function prefixed with ``f`` (e.g. call ``fchdir`` instead of ``chdir``)." msgstr "" -#: ../../../library/os.rst:2068 +#: ../../../library/os.rst:2079 msgid "" "You can check whether or not *path* can be specified as a file descriptor " "for a particular function on your platform using :data:`os.supports_fd`. If " @@ -2181,13 +2192,13 @@ msgid "" "`NotImplementedError`." msgstr "" -#: ../../../library/os.rst:2073 +#: ../../../library/os.rst:2084 msgid "" "If the function also supports *dir_fd* or *follow_symlinks* arguments, it's " "an error to specify one of those when supplying *path* as a file descriptor." msgstr "" -#: ../../../library/os.rst:2078 +#: ../../../library/os.rst:2089 msgid "" "**paths relative to directory descriptors:** If *dir_fd* is not ``None``, it " "should be a file descriptor referring to a directory, and the path to " @@ -2198,14 +2209,14 @@ msgid "" "``access``)." msgstr "" -#: ../../../library/os.rst:2085 +#: ../../../library/os.rst:2096 msgid "" "You can check whether or not *dir_fd* is supported for a particular function " "on your platform using :data:`os.supports_dir_fd`. If it's unavailable, " "using it will raise a :exc:`NotImplementedError`." msgstr "" -#: ../../../library/os.rst:2091 +#: ../../../library/os.rst:2102 msgid "" "**not following symlinks:** If *follow_symlinks* is ``False``, and the last " "element of the path to operate on is a symbolic link, the function will " @@ -2214,14 +2225,14 @@ msgid "" "function." msgstr "" -#: ../../../library/os.rst:2097 +#: ../../../library/os.rst:2108 msgid "" "You can check whether or not *follow_symlinks* is supported for a particular " "function on your platform using :data:`os.supports_follow_symlinks`. If it's " "unavailable, using it will raise a :exc:`NotImplementedError`." msgstr "" -#: ../../../library/os.rst:2105 +#: ../../../library/os.rst:2116 msgid "" "Use the real uid/gid to test for access to *path*. Note that most " "operations will use the effective uid/gid, therefore this routine can be " @@ -2233,13 +2244,13 @@ msgid "" "manpage:`access(2)` for more information." msgstr "" -#: ../../../library/os.rst:2114 +#: ../../../library/os.rst:2125 msgid "" "This function can support specifying :ref:`paths relative to directory " "descriptors ` and :ref:`not following symlinks `." msgstr "" -#: ../../../library/os.rst:2117 +#: ../../../library/os.rst:2128 msgid "" "If *effective_ids* is ``True``, :func:`access` will perform its access " "checks using the effective uid/gid instead of the real uid/gid. " @@ -2248,7 +2259,7 @@ msgid "" "unavailable, using it will raise a :exc:`NotImplementedError`." msgstr "" -#: ../../../library/os.rst:2125 +#: ../../../library/os.rst:2136 msgid "" "Using :func:`access` to check if a user is authorized to e.g. open a file " "before actually doing so using :func:`open` creates a security hole, because " @@ -2257,217 +2268,223 @@ msgid "" "For example::" msgstr "" -#: ../../../library/os.rst:2136 +#: ../../../library/os.rst:2147 msgid "is better written as::" msgstr "" -#: ../../../library/os.rst:2148 +#: ../../../library/os.rst:2159 msgid "" "I/O operations may fail even when :func:`access` indicates that they would " "succeed, particularly for operations on network filesystems which may have " "permissions semantics beyond the usual POSIX permission-bit model." msgstr "" -#: ../../../library/os.rst:2152 +#: ../../../library/os.rst:2163 msgid "Added the *dir_fd*, *effective_ids*, and *follow_symlinks* parameters." msgstr "" -#: ../../../library/os.rst:2164 +#: ../../../library/os.rst:2175 msgid "" "Values to pass as the *mode* parameter of :func:`access` to test the " "existence, readability, writability and executability of *path*, " "respectively." msgstr "" -#: ../../../library/os.rst:2173 +#: ../../../library/os.rst:2184 msgid "Change the current working directory to *path*." msgstr "" -#: ../../../library/os.rst:2175 +#: ../../../library/os.rst:2186 msgid "" "This function can support :ref:`specifying a file descriptor `. " "The descriptor must refer to an opened directory, not an open file." msgstr "" -#: ../../../library/os.rst:2178 +#: ../../../library/os.rst:2189 msgid "" "This function can raise :exc:`OSError` and subclasses such as :exc:" "`FileNotFoundError`, :exc:`PermissionError`, and :exc:`NotADirectoryError`." msgstr "" -#: ../../../library/os.rst:2181 ../../../library/os.rst:2319 +#: ../../../library/os.rst:2192 ../../../library/os.rst:2335 msgid "" "Raises an :ref:`auditing event ` ``os.chdir`` with argument " "``path``." msgstr "" -#: ../../../library/os.rst:2183 +#: ../../../library/os.rst:2196 +msgid "" +"The :func:`contextlib.chdir` context manager, which changes the current " +"working directory on entering and restores the previous one on exit." +msgstr "" + +#: ../../../library/os.rst:2199 msgid "" "Added support for specifying *path* as a file descriptor on some platforms." msgstr "" -#: ../../../library/os.rst:2193 +#: ../../../library/os.rst:2209 msgid "" "Set the flags of *path* to the numeric *flags*. *flags* may take a " "combination (bitwise OR) of the following values (as defined in the :mod:" "`stat` module):" msgstr "" -#: ../../../library/os.rst:2196 +#: ../../../library/os.rst:2212 msgid ":const:`stat.UF_NODUMP`" msgstr "" -#: ../../../library/os.rst:2197 +#: ../../../library/os.rst:2213 msgid ":const:`stat.UF_IMMUTABLE`" msgstr "" -#: ../../../library/os.rst:2198 +#: ../../../library/os.rst:2214 msgid ":const:`stat.UF_APPEND`" msgstr "" -#: ../../../library/os.rst:2199 +#: ../../../library/os.rst:2215 msgid ":const:`stat.UF_OPAQUE`" msgstr "" -#: ../../../library/os.rst:2200 +#: ../../../library/os.rst:2216 msgid ":const:`stat.UF_NOUNLINK`" msgstr "" -#: ../../../library/os.rst:2201 +#: ../../../library/os.rst:2217 msgid ":const:`stat.UF_COMPRESSED`" msgstr "" -#: ../../../library/os.rst:2202 +#: ../../../library/os.rst:2218 msgid ":const:`stat.UF_HIDDEN`" msgstr "" -#: ../../../library/os.rst:2203 +#: ../../../library/os.rst:2219 msgid ":const:`stat.SF_ARCHIVED`" msgstr "" -#: ../../../library/os.rst:2204 +#: ../../../library/os.rst:2220 msgid ":const:`stat.SF_IMMUTABLE`" msgstr "" -#: ../../../library/os.rst:2205 +#: ../../../library/os.rst:2221 msgid ":const:`stat.SF_APPEND`" msgstr "" -#: ../../../library/os.rst:2206 +#: ../../../library/os.rst:2222 msgid ":const:`stat.SF_NOUNLINK`" msgstr "" -#: ../../../library/os.rst:2207 +#: ../../../library/os.rst:2223 msgid ":const:`stat.SF_SNAPSHOT`" msgstr "" -#: ../../../library/os.rst:2209 +#: ../../../library/os.rst:2225 msgid "" "This function can support :ref:`not following symlinks `." msgstr "" -#: ../../../library/os.rst:2211 ../../../library/os.rst:2345 +#: ../../../library/os.rst:2227 ../../../library/os.rst:2361 msgid "" "Raises an :ref:`auditing event ` ``os.chflags`` with arguments " "``path``, ``flags``." msgstr "" -#: ../../../library/os.rst:2215 +#: ../../../library/os.rst:2231 msgid "Added the *follow_symlinks* parameter." msgstr "" -#: ../../../library/os.rst:2224 +#: ../../../library/os.rst:2240 msgid "" "Change the mode of *path* to the numeric *mode*. *mode* may take one of the " "following values (as defined in the :mod:`stat` module) or bitwise ORed " "combinations of them:" msgstr "" -#: ../../../library/os.rst:2228 +#: ../../../library/os.rst:2244 msgid ":const:`stat.S_ISUID`" msgstr "" -#: ../../../library/os.rst:2229 +#: ../../../library/os.rst:2245 msgid ":const:`stat.S_ISGID`" msgstr "" -#: ../../../library/os.rst:2230 +#: ../../../library/os.rst:2246 msgid ":const:`stat.S_ENFMT`" msgstr "" -#: ../../../library/os.rst:2231 +#: ../../../library/os.rst:2247 msgid ":const:`stat.S_ISVTX`" msgstr "" -#: ../../../library/os.rst:2232 +#: ../../../library/os.rst:2248 msgid ":const:`stat.S_IREAD`" msgstr "" -#: ../../../library/os.rst:2233 +#: ../../../library/os.rst:2249 msgid ":const:`stat.S_IWRITE`" msgstr "" -#: ../../../library/os.rst:2234 +#: ../../../library/os.rst:2250 msgid ":const:`stat.S_IEXEC`" msgstr "" -#: ../../../library/os.rst:2235 +#: ../../../library/os.rst:2251 msgid ":const:`stat.S_IRWXU`" msgstr "" -#: ../../../library/os.rst:2236 +#: ../../../library/os.rst:2252 msgid ":const:`stat.S_IRUSR`" msgstr "" -#: ../../../library/os.rst:2237 +#: ../../../library/os.rst:2253 msgid ":const:`stat.S_IWUSR`" msgstr "" -#: ../../../library/os.rst:2238 +#: ../../../library/os.rst:2254 msgid ":const:`stat.S_IXUSR`" msgstr "" -#: ../../../library/os.rst:2239 +#: ../../../library/os.rst:2255 msgid ":const:`stat.S_IRWXG`" msgstr "" -#: ../../../library/os.rst:2240 +#: ../../../library/os.rst:2256 msgid ":const:`stat.S_IRGRP`" msgstr "" -#: ../../../library/os.rst:2241 +#: ../../../library/os.rst:2257 msgid ":const:`stat.S_IWGRP`" msgstr "" -#: ../../../library/os.rst:2242 +#: ../../../library/os.rst:2258 msgid ":const:`stat.S_IXGRP`" msgstr "" -#: ../../../library/os.rst:2243 +#: ../../../library/os.rst:2259 msgid ":const:`stat.S_IRWXO`" msgstr "" -#: ../../../library/os.rst:2244 +#: ../../../library/os.rst:2260 msgid ":const:`stat.S_IROTH`" msgstr "" -#: ../../../library/os.rst:2245 +#: ../../../library/os.rst:2261 msgid ":const:`stat.S_IWOTH`" msgstr "" -#: ../../../library/os.rst:2246 +#: ../../../library/os.rst:2262 msgid ":const:`stat.S_IXOTH`" msgstr "" -#: ../../../library/os.rst:2248 ../../../library/os.rst:2281 -#: ../../../library/os.rst:4186 +#: ../../../library/os.rst:2264 ../../../library/os.rst:2297 +#: ../../../library/os.rst:4208 msgid "" "This function can support :ref:`specifying a file descriptor `, :" "ref:`paths relative to directory descriptors ` and :ref:`not " "following symlinks `." msgstr "" -#: ../../../library/os.rst:2254 +#: ../../../library/os.rst:2270 msgid "" "Although Windows supports :func:`chmod`, you can only set the file's read-" "only flag with it (via the ``stat.S_IWRITE`` and ``stat.S_IREAD`` constants " @@ -2475,68 +2492,68 @@ msgid "" "value of *follow_symlinks* is ``False`` on Windows." msgstr "" -#: ../../../library/os.rst:2264 ../../../library/os.rst:2295 +#: ../../../library/os.rst:2280 ../../../library/os.rst:2311 msgid "" "Added support for specifying *path* as an open file descriptor, and the " "*dir_fd* and *follow_symlinks* arguments." msgstr "" -#: ../../../library/os.rst:2271 +#: ../../../library/os.rst:2287 msgid "" "Added support for a file descriptor and the *follow_symlinks* argument on " "Windows." msgstr "" -#: ../../../library/os.rst:2278 +#: ../../../library/os.rst:2294 msgid "" "Change the owner and group id of *path* to the numeric *uid* and *gid*. To " "leave one of the ids unchanged, set it to -1." msgstr "" -#: ../../../library/os.rst:2285 +#: ../../../library/os.rst:2301 msgid "" "See :func:`shutil.chown` for a higher-level function that accepts names in " "addition to numeric ids." msgstr "" -#: ../../../library/os.rst:2299 +#: ../../../library/os.rst:2315 msgid "Supports a :term:`path-like object`." msgstr "" -#: ../../../library/os.rst:2305 +#: ../../../library/os.rst:2321 msgid "Change the root directory of the current process to *path*." msgstr "" -#: ../../../library/os.rst:2315 +#: ../../../library/os.rst:2331 msgid "" "Change the current working directory to the directory represented by the " "file descriptor *fd*. The descriptor must refer to an opened directory, not " "an open file. As of Python 3.3, this is equivalent to ``os.chdir(fd)``." msgstr "" -#: ../../../library/os.rst:2326 +#: ../../../library/os.rst:2342 msgid "Return a string representing the current working directory." msgstr "" -#: ../../../library/os.rst:2331 +#: ../../../library/os.rst:2347 msgid "Return a bytestring representing the current working directory." msgstr "" -#: ../../../library/os.rst:2333 +#: ../../../library/os.rst:2349 msgid "" "The function now uses the UTF-8 encoding on Windows, rather than the ANSI " "code page: see :pep:`529` for the rationale. The function is no longer " "deprecated on Windows." msgstr "" -#: ../../../library/os.rst:2341 +#: ../../../library/os.rst:2357 msgid "" "Set the flags of *path* to the numeric *flags*, like :func:`chflags`, but do " "not follow symbolic links. As of Python 3.3, this is equivalent to ``os." "chflags(path, flags, follow_symlinks=False)``." msgstr "" -#: ../../../library/os.rst:2355 +#: ../../../library/os.rst:2371 msgid "" "Change the mode of *path* to the numeric *mode*. If path is a symlink, this " "affects the symlink rather than the target. See the docs for :func:`chmod` " @@ -2544,24 +2561,24 @@ msgid "" "chmod(path, mode, follow_symlinks=False)``." msgstr "" -#: ../../../library/os.rst:2360 +#: ../../../library/os.rst:2376 msgid "" "``lchmod()`` is not part of POSIX, but Unix implementations may have it if " "changing the mode of symbolic links is supported." msgstr "" -#: ../../../library/os.rst:2375 +#: ../../../library/os.rst:2391 msgid "" "Change the owner and group id of *path* to the numeric *uid* and *gid*. " "This function will not follow symbolic links. As of Python 3.3, this is " "equivalent to ``os.chown(path, uid, gid, follow_symlinks=False)``." msgstr "" -#: ../../../library/os.rst:2389 +#: ../../../library/os.rst:2405 msgid "Create a hard link pointing to *src* named *dst*." msgstr "" -#: ../../../library/os.rst:2391 +#: ../../../library/os.rst:2407 msgid "" "This function can support specifying *src_dir_fd* and/or *dst_dir_fd* to " "supply :ref:`paths relative to directory descriptors `, and :ref:" @@ -2569,26 +2586,26 @@ msgid "" "*follow_symlinks* is ``False`` on Windows." msgstr "" -#: ../../../library/os.rst:2396 +#: ../../../library/os.rst:2412 msgid "" "Raises an :ref:`auditing event ` ``os.link`` with arguments " "``src``, ``dst``, ``src_dir_fd``, ``dst_dir_fd``." msgstr "" -#: ../../../library/os.rst:2400 ../../../library/os.rst:5195 +#: ../../../library/os.rst:2416 ../../../library/os.rst:5217 msgid "Added Windows support." msgstr "" -#: ../../../library/os.rst:2403 +#: ../../../library/os.rst:2419 msgid "Added the *src_dir_fd*, *dst_dir_fd*, and *follow_symlinks* parameters." msgstr "" -#: ../../../library/os.rst:2406 ../../../library/os.rst:2853 -#: ../../../library/os.rst:2890 ../../../library/os.rst:4107 +#: ../../../library/os.rst:2422 ../../../library/os.rst:2869 +#: ../../../library/os.rst:2906 ../../../library/os.rst:4129 msgid "Accepts a :term:`path-like object` for *src* and *dst*." msgstr "" -#: ../../../library/os.rst:2412 +#: ../../../library/os.rst:2428 msgid "" "Return a list containing the names of the entries in the directory given by " "*path*. The list is in arbitrary order, and does not include the special " @@ -2597,7 +2614,7 @@ msgid "" "function, whether a name for that file be included is unspecified." msgstr "" -#: ../../../library/os.rst:2418 +#: ../../../library/os.rst:2434 msgid "" "*path* may be a :term:`path-like object`. If *path* is of type ``bytes`` " "(directly or indirectly through the :class:`PathLike` interface), the " @@ -2605,47 +2622,47 @@ msgid "" "circumstances, they will be of type ``str``." msgstr "" -#: ../../../library/os.rst:2423 ../../../library/os.rst:2938 +#: ../../../library/os.rst:2439 ../../../library/os.rst:2954 msgid "" "This function can also support :ref:`specifying a file descriptor " "`; the file descriptor must refer to a directory." msgstr "" -#: ../../../library/os.rst:2426 +#: ../../../library/os.rst:2442 msgid "" "Raises an :ref:`auditing event ` ``os.listdir`` with argument " "``path``." msgstr "" -#: ../../../library/os.rst:2429 +#: ../../../library/os.rst:2445 msgid "To encode ``str`` filenames to ``bytes``, use :func:`~os.fsencode`." msgstr "" -#: ../../../library/os.rst:2433 +#: ../../../library/os.rst:2449 msgid "" "The :func:`scandir` function returns directory entries along with file " "attribute information, giving better performance for many common use cases." msgstr "" -#: ../../../library/os.rst:2437 +#: ../../../library/os.rst:2453 msgid "The *path* parameter became optional." msgstr "" -#: ../../../library/os.rst:2440 ../../../library/os.rst:3818 +#: ../../../library/os.rst:2456 ../../../library/os.rst:3840 msgid "Added support for specifying *path* as an open file descriptor." msgstr "" -#: ../../../library/os.rst:2446 +#: ../../../library/os.rst:2462 msgid "" "``os.listdir(-1)`` now fails with ``OSError(errno.EBADF)`` rather than " "listing the current directory." msgstr "" -#: ../../../library/os.rst:2453 +#: ../../../library/os.rst:2469 msgid "Return a list containing the names of drives on a Windows system." msgstr "" -#: ../../../library/os.rst:2455 +#: ../../../library/os.rst:2471 msgid "" "A drive name typically looks like ``'C:\\\\'``. Not every drive name will be " "associated with a volume, and some may be inaccessible for a variety of " @@ -2653,22 +2670,22 @@ msgid "" "function does not test for access." msgstr "" -#: ../../../library/os.rst:2460 +#: ../../../library/os.rst:2476 msgid "May raise :exc:`OSError` if an error occurs collecting the drive names." msgstr "" -#: ../../../library/os.rst:2463 +#: ../../../library/os.rst:2479 msgid "" "Raises an :ref:`auditing event ` ``os.listdrives`` with no " "arguments." msgstr "" -#: ../../../library/os.rst:2472 +#: ../../../library/os.rst:2488 msgid "" "Return a list containing the mount points for a volume on a Windows system." msgstr "" -#: ../../../library/os.rst:2475 +#: ../../../library/os.rst:2491 msgid "" "*volume* must be represented as a GUID path, like those returned by :func:" "`os.listvolumes`. Volumes may be mounted in multiple locations or not at " @@ -2676,29 +2693,29 @@ msgid "" "associated with a volume will not be returned by this function." msgstr "" -#: ../../../library/os.rst:2481 +#: ../../../library/os.rst:2497 msgid "" "The mount points return by this function will be absolute paths, and may be " "longer than the drive name." msgstr "" -#: ../../../library/os.rst:2484 +#: ../../../library/os.rst:2500 msgid "" "Raises :exc:`OSError` if the volume is not recognized or if an error occurs " "collecting the paths." msgstr "" -#: ../../../library/os.rst:2487 +#: ../../../library/os.rst:2503 msgid "" "Raises an :ref:`auditing event ` ``os.listmounts`` with argument " "``volume``." msgstr "" -#: ../../../library/os.rst:2496 +#: ../../../library/os.rst:2512 msgid "Return a list containing the volumes in the system." msgstr "" -#: ../../../library/os.rst:2498 +#: ../../../library/os.rst:2514 msgid "" "Volumes are typically represented as a GUID path that looks like ``\\\\?" "\\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\\``. Files can usually be " @@ -2707,49 +2724,49 @@ msgid "" "function is to retrieve mount points using :func:`os.listmounts`." msgstr "" -#: ../../../library/os.rst:2505 +#: ../../../library/os.rst:2521 msgid "May raise :exc:`OSError` if an error occurs collecting the volumes." msgstr "" -#: ../../../library/os.rst:2507 +#: ../../../library/os.rst:2523 msgid "" "Raises an :ref:`auditing event ` ``os.listvolumes`` with no " "arguments." msgstr "" -#: ../../../library/os.rst:2516 +#: ../../../library/os.rst:2532 msgid "" "Perform the equivalent of an :c:func:`!lstat` system call on the given path. " "Similar to :func:`~os.stat`, but does not follow symbolic links. Return a :" "class:`stat_result` object." msgstr "" -#: ../../../library/os.rst:2520 +#: ../../../library/os.rst:2536 msgid "" "On platforms that do not support symbolic links, this is an alias for :func:" "`~os.stat`." msgstr "" -#: ../../../library/os.rst:2523 +#: ../../../library/os.rst:2539 msgid "" "As of Python 3.3, this is equivalent to ``os.stat(path, dir_fd=dir_fd, " "follow_symlinks=False)``." msgstr "" -#: ../../../library/os.rst:2526 ../../../library/os.rst:2568 -#: ../../../library/os.rst:2648 ../../../library/os.rst:2676 -#: ../../../library/os.rst:2757 +#: ../../../library/os.rst:2542 ../../../library/os.rst:2584 +#: ../../../library/os.rst:2664 ../../../library/os.rst:2692 +#: ../../../library/os.rst:2773 msgid "" "This function can also support :ref:`paths relative to directory descriptors " "`." msgstr "" -#: ../../../library/os.rst:2533 ../../../library/os.rst:2766 -#: ../../../library/os.rst:4100 +#: ../../../library/os.rst:2549 ../../../library/os.rst:2782 +#: ../../../library/os.rst:4122 msgid "Added support for Windows 6.0 (Vista) symbolic links." msgstr "" -#: ../../../library/os.rst:2542 +#: ../../../library/os.rst:2558 msgid "" "On Windows, now opens reparse points that represent another path (name " "surrogates), including symbolic links and directory junctions. Other kinds " @@ -2757,18 +2774,18 @@ msgid "" "stat`." msgstr "" -#: ../../../library/os.rst:2551 +#: ../../../library/os.rst:2567 msgid "Create a directory named *path* with numeric mode *mode*." msgstr "" -#: ../../../library/os.rst:2553 +#: ../../../library/os.rst:2569 msgid "" "If the directory already exists, :exc:`FileExistsError` is raised. If a " "parent directory in the path does not exist, :exc:`FileNotFoundError` is " "raised." msgstr "" -#: ../../../library/os.rst:2558 +#: ../../../library/os.rst:2574 msgid "" "On some systems, *mode* is ignored. Where it is used, the current umask " "value is first masked out. If bits other than the last 9 (i.e. the last 3 " @@ -2777,36 +2794,36 @@ msgid "" "call :func:`chmod` explicitly to set them." msgstr "" -#: ../../../library/os.rst:2564 +#: ../../../library/os.rst:2580 msgid "" "On Windows, a *mode* of ``0o700`` is specifically handled to apply access " "control to the new directory such that only the current user and " "administrators have access. Other values of *mode* are ignored." msgstr "" -#: ../../../library/os.rst:2571 +#: ../../../library/os.rst:2587 msgid "" "It is also possible to create temporary directories; see the :mod:`tempfile` " "module's :func:`tempfile.mkdtemp` function." msgstr "" -#: ../../../library/os.rst:2574 ../../../library/os.rst:2618 +#: ../../../library/os.rst:2590 ../../../library/os.rst:2634 msgid "" "Raises an :ref:`auditing event ` ``os.mkdir`` with arguments " "``path``, ``mode``, ``dir_fd``." msgstr "" -#: ../../../library/os.rst:2582 +#: ../../../library/os.rst:2598 msgid "Windows now handles a *mode* of ``0o700``." msgstr "" -#: ../../../library/os.rst:2593 +#: ../../../library/os.rst:2609 msgid "" "Recursive directory creation function. Like :func:`mkdir`, but makes all " "intermediate-level directories needed to contain the leaf directory." msgstr "" -#: ../../../library/os.rst:2596 +#: ../../../library/os.rst:2612 msgid "" "The *mode* parameter is passed to :func:`mkdir` for creating the leaf " "directory; see :ref:`the mkdir() description ` for how it is " @@ -2815,13 +2832,13 @@ msgid "" "file permission bits of existing parent directories are not changed." msgstr "" -#: ../../../library/os.rst:2602 +#: ../../../library/os.rst:2618 msgid "" "If *exist_ok* is ``False`` (the default), a :exc:`FileExistsError` is raised " "if the target directory already exists." msgstr "" -#: ../../../library/os.rst:2605 +#: ../../../library/os.rst:2621 msgid "" "If *parent_mode* is not ``None``, it is used as the mode for any newly-" "created, intermediate-level directories. Like *mode*, it is combined with " @@ -2830,21 +2847,21 @@ msgid "" "default mode, which is also subject to the umask." msgstr "" -#: ../../../library/os.rst:2613 +#: ../../../library/os.rst:2629 msgid "" ":func:`makedirs` will become confused if the path elements to create " "include :data:`pardir` (eg. \"..\" on UNIX systems)." msgstr "" -#: ../../../library/os.rst:2616 +#: ../../../library/os.rst:2632 msgid "This function handles UNC paths correctly." msgstr "" -#: ../../../library/os.rst:2620 +#: ../../../library/os.rst:2636 msgid "Added the *exist_ok* parameter." msgstr "" -#: ../../../library/os.rst:2625 +#: ../../../library/os.rst:2641 msgid "" "Before Python 3.4.1, if *exist_ok* was ``True`` and the directory existed, :" "func:`makedirs` would still raise an error if *mode* did not match the mode " @@ -2852,26 +2869,26 @@ msgid "" "safely, it was removed in Python 3.4.1. See :issue:`21082`." msgstr "" -#: ../../../library/os.rst:2633 +#: ../../../library/os.rst:2649 msgid "" "The *mode* argument no longer affects the file permission bits of newly " "created intermediate-level directories." msgstr "" -#: ../../../library/os.rst:2637 +#: ../../../library/os.rst:2653 msgid "" "The *parent_mode* parameter. To match the behavior from Python 3.6 and " "earlier (where *mode* was applied to all created directories), pass " "``parent_mode=mode``." msgstr "" -#: ../../../library/os.rst:2645 +#: ../../../library/os.rst:2661 msgid "" "Create a FIFO (a named pipe) named *path* with numeric mode *mode*. The " "current umask value is first masked out from the mode." msgstr "" -#: ../../../library/os.rst:2651 +#: ../../../library/os.rst:2667 msgid "" "FIFOs are pipes that can be accessed like regular files. FIFOs exist until " "they are deleted (for example with :func:`os.unlink`). Generally, FIFOs are " @@ -2881,7 +2898,7 @@ msgid "" "rendezvous point." msgstr "" -#: ../../../library/os.rst:2668 +#: ../../../library/os.rst:2684 msgid "" "Create a filesystem node (file, device special file or named pipe) named " "*path*. *mode* specifies both the permissions to use and the type of node to " @@ -2892,29 +2909,29 @@ msgid "" "it is ignored." msgstr "" -#: ../../../library/os.rst:2690 +#: ../../../library/os.rst:2706 msgid "" "Extract the device major number from a raw device number (usually the :attr:" "`~stat_result.st_dev` or :attr:`~stat_result.st_rdev` field from :c:struct:" "`stat`)." msgstr "" -#: ../../../library/os.rst:2696 +#: ../../../library/os.rst:2712 msgid "" "Extract the device minor number from a raw device number (usually the :attr:" "`~stat_result.st_dev` or :attr:`~stat_result.st_rdev` field from :c:struct:" "`stat`)." msgstr "" -#: ../../../library/os.rst:2702 +#: ../../../library/os.rst:2718 msgid "Compose a raw device number from the major and minor device numbers." msgstr "" -#: ../../../library/os.rst:2707 +#: ../../../library/os.rst:2723 msgid "Non-existent device." msgstr "" -#: ../../../library/os.rst:2714 +#: ../../../library/os.rst:2730 msgid "" "Return system configuration information relevant to a named file. *name* " "specifies the configuration value to retrieve; it may be a string which is " @@ -2925,20 +2942,20 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: ../../../library/os.rst:2727 ../../../library/os.rst:3814 -#: ../../../library/os.rst:4128 +#: ../../../library/os.rst:2743 ../../../library/os.rst:3836 +#: ../../../library/os.rst:4150 msgid "" "This function can support :ref:`specifying a file descriptor `." msgstr "" -#: ../../../library/os.rst:2738 +#: ../../../library/os.rst:2754 msgid "" "Dictionary mapping names accepted by :func:`pathconf` and :func:`fpathconf` " "to the integer values defined for those names by the host operating system. " "This can be used to determine the set of names known to the system." msgstr "" -#: ../../../library/os.rst:2747 +#: ../../../library/os.rst:2763 msgid "" "Return a string representing the path to which the symbolic link points. " "The result may be either an absolute or relative pathname; if it is " @@ -2946,7 +2963,7 @@ msgid "" "join(os.path.dirname(path), result)``." msgstr "" -#: ../../../library/os.rst:2752 +#: ../../../library/os.rst:2768 msgid "" "If the *path* is a string object (directly or indirectly through a :class:" "`PathLike` interface), the result will also be a string object, and the call " @@ -2954,42 +2971,42 @@ msgid "" "indirectly), the result will be a bytes object." msgstr "" -#: ../../../library/os.rst:2760 +#: ../../../library/os.rst:2776 msgid "" "When trying to resolve a path that may contain links, use :func:`~os.path." "realpath` to properly handle recursion and platform differences." msgstr "" -#: ../../../library/os.rst:2772 +#: ../../../library/os.rst:2788 msgid "Accepts a :term:`path-like object` on Unix." msgstr "" -#: ../../../library/os.rst:2775 +#: ../../../library/os.rst:2791 msgid "Accepts a :term:`path-like object` and a bytes object on Windows." msgstr "" -#: ../../../library/os.rst:2778 +#: ../../../library/os.rst:2794 msgid "" "Added support for directory junctions, and changed to return the " "substitution path (which typically includes ``\\\\?\\`` prefix) rather than " "the optional \"print name\" field that was previously returned." msgstr "" -#: ../../../library/os.rst:2784 +#: ../../../library/os.rst:2800 msgid "" "Remove (delete) the file *path*. If *path* is a directory, an :exc:" "`OSError` is raised. Use :func:`rmdir` to remove directories. If the file " "does not exist, a :exc:`FileNotFoundError` is raised." msgstr "" -#: ../../../library/os.rst:2788 ../../../library/os.rst:2901 -#: ../../../library/os.rst:4079 +#: ../../../library/os.rst:2804 ../../../library/os.rst:2917 +#: ../../../library/os.rst:4101 msgid "" "This function can support :ref:`paths relative to directory descriptors " "`." msgstr "" -#: ../../../library/os.rst:2791 +#: ../../../library/os.rst:2807 msgid "" "On Windows, attempting to remove a file that is in use causes an exception " "to be raised; on Unix, the directory entry is removed but the storage " @@ -2997,18 +3014,18 @@ msgid "" "longer in use." msgstr "" -#: ../../../library/os.rst:2795 +#: ../../../library/os.rst:2811 msgid "This function is semantically identical to :func:`unlink`." msgstr "" -#: ../../../library/os.rst:2797 ../../../library/os.rst:2819 -#: ../../../library/os.rst:4150 +#: ../../../library/os.rst:2813 ../../../library/os.rst:2835 +#: ../../../library/os.rst:4172 msgid "" "Raises an :ref:`auditing event ` ``os.remove`` with arguments " "``path``, ``dir_fd``." msgstr "" -#: ../../../library/os.rst:2810 +#: ../../../library/os.rst:2826 msgid "" "Remove directories recursively. Works like :func:`rmdir` except that, if " "the leaf directory is successfully removed, :func:`removedirs` tries to " @@ -3020,20 +3037,20 @@ msgid "" "could not be successfully removed." msgstr "" -#: ../../../library/os.rst:2827 +#: ../../../library/os.rst:2843 msgid "" "Rename the file or directory *src* to *dst*. If *dst* exists, the operation " "will fail with an :exc:`OSError` subclass in a number of cases:" msgstr "" -#: ../../../library/os.rst:2830 +#: ../../../library/os.rst:2846 msgid "" "On Windows, if *dst* exists a :exc:`FileExistsError` is always raised. The " "operation may fail if *src* and *dst* are on different filesystems. Use :" "func:`shutil.move` to support moves to a different filesystem." msgstr "" -#: ../../../library/os.rst:2834 +#: ../../../library/os.rst:2850 msgid "" "On Unix, if *src* is a file and *dst* is a directory or vice-versa, an :exc:" "`IsADirectoryError` or a :exc:`NotADirectoryError` will be raised " @@ -3045,30 +3062,30 @@ msgid "" "operation (this is a POSIX requirement)." msgstr "" -#: ../../../library/os.rst:2843 ../../../library/os.rst:2883 +#: ../../../library/os.rst:2859 ../../../library/os.rst:2899 msgid "" "This function can support specifying *src_dir_fd* and/or *dst_dir_fd* to " "supply :ref:`paths relative to directory descriptors `." msgstr "" -#: ../../../library/os.rst:2846 +#: ../../../library/os.rst:2862 msgid "" "If you want cross-platform overwriting of the destination, use :func:" "`replace`." msgstr "" -#: ../../../library/os.rst:2848 ../../../library/os.rst:2869 -#: ../../../library/os.rst:2886 +#: ../../../library/os.rst:2864 ../../../library/os.rst:2885 +#: ../../../library/os.rst:2902 msgid "" "Raises an :ref:`auditing event ` ``os.rename`` with arguments " "``src``, ``dst``, ``src_dir_fd``, ``dst_dir_fd``." msgstr "" -#: ../../../library/os.rst:2850 +#: ../../../library/os.rst:2866 msgid "Added the *src_dir_fd* and *dst_dir_fd* parameters." msgstr "" -#: ../../../library/os.rst:2859 +#: ../../../library/os.rst:2875 msgid "" "Recursive directory or file renaming function. Works like :func:`rename`, " "except creation of any intermediate directories needed to make the new " @@ -3077,17 +3094,17 @@ msgid "" "using :func:`removedirs`." msgstr "" -#: ../../../library/os.rst:2866 +#: ../../../library/os.rst:2882 msgid "" "This function can fail with the new directory structure made if you lack " "permissions needed to remove the leaf directory or file." msgstr "" -#: ../../../library/os.rst:2871 +#: ../../../library/os.rst:2887 msgid "Accepts a :term:`path-like object` for *old* and *new*." msgstr "" -#: ../../../library/os.rst:2877 +#: ../../../library/os.rst:2893 msgid "" "Rename the file or directory *src* to *dst*. If *dst* is a non-empty " "directory, :exc:`OSError` will be raised. If *dst* exists and is a file, it " @@ -3096,7 +3113,7 @@ msgid "" "renaming will be an atomic operation (this is a POSIX requirement)." msgstr "" -#: ../../../library/os.rst:2896 +#: ../../../library/os.rst:2912 msgid "" "Remove (delete) the directory *path*. If the directory does not exist or is " "not empty, a :exc:`FileNotFoundError` or an :exc:`OSError` is raised " @@ -3104,13 +3121,13 @@ msgid "" "rmtree` can be used." msgstr "" -#: ../../../library/os.rst:2904 +#: ../../../library/os.rst:2920 msgid "" "Raises an :ref:`auditing event ` ``os.rmdir`` with arguments " "``path``, ``dir_fd``." msgstr "" -#: ../../../library/os.rst:2915 +#: ../../../library/os.rst:2931 msgid "" "Return an iterator of :class:`os.DirEntry` objects corresponding to the " "entries in the directory given by *path*. The entries are yielded in " @@ -3120,7 +3137,7 @@ msgid "" "unspecified." msgstr "" -#: ../../../library/os.rst:2922 +#: ../../../library/os.rst:2938 msgid "" "Using :func:`scandir` instead of :func:`listdir` can significantly increase " "the performance of code that also needs file type or file attribute " @@ -3132,7 +3149,7 @@ msgid "" "Unix but only requires one for symbolic links on Windows." msgstr "" -#: ../../../library/os.rst:2932 +#: ../../../library/os.rst:2948 msgid "" "*path* may be a :term:`path-like object`. If *path* is of type ``bytes`` " "(directly or indirectly through the :class:`PathLike` interface), the type " @@ -3141,30 +3158,30 @@ msgid "" "they will be of type ``str``." msgstr "" -#: ../../../library/os.rst:2941 +#: ../../../library/os.rst:2957 msgid "" "Raises an :ref:`auditing event ` ``os.scandir`` with argument " "``path``." msgstr "" -#: ../../../library/os.rst:2943 +#: ../../../library/os.rst:2959 msgid "" "The :func:`scandir` iterator supports the :term:`context manager` protocol " "and has the following method:" msgstr "" -#: ../../../library/os.rst:2948 +#: ../../../library/os.rst:2964 msgid "Close the iterator and free acquired resources." msgstr "" -#: ../../../library/os.rst:2950 +#: ../../../library/os.rst:2966 msgid "" "This is called automatically when the iterator is exhausted or garbage " "collected, or when an error happens during iterating. However it is " "advisable to call it explicitly or use the :keyword:`with` statement." msgstr "" -#: ../../../library/os.rst:2957 +#: ../../../library/os.rst:2973 msgid "" "The following example shows a simple use of :func:`scandir` to display all " "the files (excluding directories) in the given *path* that don't start with " @@ -3172,7 +3189,7 @@ msgid "" "system call::" msgstr "" -#: ../../../library/os.rst:2969 +#: ../../../library/os.rst:2985 msgid "" "On Unix-based systems, :func:`scandir` uses the system's `opendir() `_ and " @@ -3183,7 +3200,7 @@ msgid "" "desktop/aa364428(v=vs.85).aspx>`_ functions." msgstr "" -#: ../../../library/os.rst:2981 +#: ../../../library/os.rst:2997 msgid "" "Added support for the :term:`context manager` protocol and the :func:" "`~scandir.close` method. If a :func:`scandir` iterator is neither exhausted " @@ -3191,34 +3208,34 @@ msgid "" "destructor." msgstr "" -#: ../../../library/os.rst:2987 +#: ../../../library/os.rst:3003 msgid "The function accepts a :term:`path-like object`." msgstr "" -#: ../../../library/os.rst:2989 +#: ../../../library/os.rst:3005 msgid "Added support for :ref:`file descriptors ` on Unix." msgstr "" -#: ../../../library/os.rst:2992 +#: ../../../library/os.rst:3008 msgid "" "``os.scandir(-1)`` now fails with ``OSError(errno.EBADF)`` rather than " "listing the current directory." msgstr "" -#: ../../../library/os.rst:2999 +#: ../../../library/os.rst:3015 msgid "" "Object yielded by :func:`scandir` to expose the file path and other file " "attributes of a directory entry." msgstr "" -#: ../../../library/os.rst:3002 +#: ../../../library/os.rst:3018 msgid "" ":func:`scandir` will provide as much of this information as possible without " "making additional system calls. When a ``stat()`` or ``lstat()`` system call " "is made, the ``os.DirEntry`` object will cache the result." msgstr "" -#: ../../../library/os.rst:3006 +#: ../../../library/os.rst:3022 msgid "" "``os.DirEntry`` instances are not intended to be stored in long-lived data " "structures; if you know the file metadata has changed or if a long time has " @@ -3226,7 +3243,7 @@ msgid "" "up-to-date information." msgstr "" -#: ../../../library/os.rst:3011 +#: ../../../library/os.rst:3027 msgid "" "Because the ``os.DirEntry`` methods can make operating system calls, they " "may also raise :exc:`OSError`. If you need very fine-grained control over " @@ -3234,89 +3251,94 @@ msgid "" "methods and handle as appropriate." msgstr "" -#: ../../../library/os.rst:3016 +#: ../../../library/os.rst:3032 msgid "" "To be directly usable as a :term:`path-like object`, ``os.DirEntry`` " "implements the :class:`PathLike` interface." msgstr "" -#: ../../../library/os.rst:3019 +#: ../../../library/os.rst:3035 msgid "" ":class:`!DirEntry` objects are :ref:`generic ` over the type of " "the path (:class:`str` or :class:`bytes`)." msgstr "" -#: ../../../library/os.rst:3022 +#: ../../../library/os.rst:3038 msgid "Attributes and methods on a ``os.DirEntry`` instance are as follows:" msgstr "" -#: ../../../library/os.rst:3026 +#: ../../../library/os.rst:3042 msgid "" "The entry's base filename, relative to the :func:`scandir` *path* argument." msgstr "" -#: ../../../library/os.rst:3029 +#: ../../../library/os.rst:3045 msgid "" "The :attr:`name` attribute will be ``bytes`` if the :func:`scandir` *path* " "argument is of type ``bytes`` and ``str`` otherwise. Use :func:`~os." "fsdecode` to decode byte filenames." msgstr "" -#: ../../../library/os.rst:3035 +#: ../../../library/os.rst:3051 msgid "" -"The entry's full path name: equivalent to ``os.path.join(scandir_path, entry." -"name)`` where *scandir_path* is the :func:`scandir` *path* argument. The " -"path is only absolute if the :func:`scandir` *path* argument was absolute. " -"If the :func:`scandir` *path* argument was a :ref:`file descriptor " -"`, the :attr:`path` attribute is the same as the :attr:`name` " -"attribute." +"The entry's path name: equivalent to ``os.path.join(scandir_path, entry." +"name)`` where *scandir_path* is the original :func:`scandir` *path* " +"argument. Apart from the filename, the path preserves the original :func:" +"`scandir` argument. If the :func:`scandir` *path* argument was relative, " +"the :attr:`path` attribute is also relative. Changing the current working " +"directory after creating the :func:`scandir` iterator may cause later uses " +"of :attr:`path` to resolve differently. On some platforms, the constructed " +"path may not be valid if the original :func:`scandir` argument was usable " +"for enumeration but not for joining with the entry name. If the :func:" +"`scandir` *path* argument was a :ref:`file descriptor `, the :attr:" +"`path` attribute is the same as the :attr:`name` attribute." msgstr "" -#: ../../../library/os.rst:3042 +#: ../../../library/os.rst:3064 msgid "" "The :attr:`path` attribute will be ``bytes`` if the :func:`scandir` *path* " "argument is of type ``bytes`` and ``str`` otherwise. Use :func:`~os." "fsdecode` to decode byte filenames." msgstr "" -#: ../../../library/os.rst:3048 +#: ../../../library/os.rst:3070 msgid "Return the inode number of the entry." msgstr "" -#: ../../../library/os.rst:3050 +#: ../../../library/os.rst:3072 msgid "" "The result is cached on the ``os.DirEntry`` object. Use ``os.stat(entry." "path, follow_symlinks=False).st_ino`` to fetch up-to-date information." msgstr "" -#: ../../../library/os.rst:3054 +#: ../../../library/os.rst:3076 msgid "" "On the first, uncached call, a system call is required on Windows but not on " "Unix." msgstr "" -#: ../../../library/os.rst:3059 +#: ../../../library/os.rst:3081 msgid "" "Return ``True`` if this entry is a directory or a symbolic link pointing to " "a directory; return ``False`` if the entry is or points to any other kind of " "file, or if it doesn't exist anymore." msgstr "" -#: ../../../library/os.rst:3063 +#: ../../../library/os.rst:3085 msgid "" "If *follow_symlinks* is ``False``, return ``True`` only if this entry is a " "directory (without following symlinks); return ``False`` if the entry is any " "other kind of file or if it doesn't exist anymore." msgstr "" -#: ../../../library/os.rst:3067 +#: ../../../library/os.rst:3089 msgid "" "The result is cached on the ``os.DirEntry`` object, with a separate cache " "for *follow_symlinks* ``True`` and ``False``. Call :func:`os.stat` along " "with :func:`stat.S_ISDIR` to fetch up-to-date information." msgstr "" -#: ../../../library/os.rst:3071 +#: ../../../library/os.rst:3093 msgid "" "On the first, uncached call, no system call is required in most cases. " "Specifically, for non-symlinks, neither Windows or Unix require a system " @@ -3326,46 +3348,46 @@ msgid "" "is ``False``." msgstr "" -#: ../../../library/os.rst:3078 ../../../library/os.rst:3108 +#: ../../../library/os.rst:3100 ../../../library/os.rst:3130 msgid "" "This method can raise :exc:`OSError`, such as :exc:`PermissionError`, but :" "exc:`FileNotFoundError` is caught and not raised." msgstr "" -#: ../../../library/os.rst:3083 +#: ../../../library/os.rst:3105 msgid "" "Return ``True`` if this entry is a file or a symbolic link pointing to a " "file; return ``False`` if the entry is or points to a directory or other non-" "file entry, or if it doesn't exist anymore." msgstr "" -#: ../../../library/os.rst:3087 +#: ../../../library/os.rst:3109 msgid "" "If *follow_symlinks* is ``False``, return ``True`` only if this entry is a " "file (without following symlinks); return ``False`` if the entry is a " "directory or other non-file entry, or if it doesn't exist anymore." msgstr "" -#: ../../../library/os.rst:3091 +#: ../../../library/os.rst:3113 msgid "" "The result is cached on the ``os.DirEntry`` object. Caching, system calls " "made, and exceptions raised are as per :func:`~os.DirEntry.is_dir`." msgstr "" -#: ../../../library/os.rst:3096 +#: ../../../library/os.rst:3118 msgid "" "Return ``True`` if this entry is a symbolic link (even if broken); return " "``False`` if the entry points to a directory or any kind of file, or if it " "doesn't exist anymore." msgstr "" -#: ../../../library/os.rst:3100 +#: ../../../library/os.rst:3122 msgid "" "The result is cached on the ``os.DirEntry`` object. Call :func:`os.path." "islink` to fetch up-to-date information." msgstr "" -#: ../../../library/os.rst:3103 +#: ../../../library/os.rst:3125 msgid "" "On the first, uncached call, no system call is required in most cases. " "Specifically, neither Windows or Unix require a system call, except on " @@ -3373,48 +3395,48 @@ msgid "" "``dirent.d_type == DT_UNKNOWN``." msgstr "" -#: ../../../library/os.rst:3113 +#: ../../../library/os.rst:3135 msgid "" "Return ``True`` if this entry is a junction (even if broken); return " "``False`` if the entry points to a regular directory, any kind of file, a " "symlink, or if it doesn't exist anymore." msgstr "" -#: ../../../library/os.rst:3117 +#: ../../../library/os.rst:3139 msgid "" "The result is cached on the ``os.DirEntry`` object. Call :func:`os.path." "isjunction` to fetch up-to-date information." msgstr "" -#: ../../../library/os.rst:3124 +#: ../../../library/os.rst:3146 msgid "" "Return a :class:`stat_result` object for this entry. This method follows " "symbolic links by default; to stat a symbolic link add the " "``follow_symlinks=False`` argument." msgstr "" -#: ../../../library/os.rst:3128 +#: ../../../library/os.rst:3150 msgid "" "On Unix, this method always requires a system call. On Windows, it only " "requires a system call if *follow_symlinks* is ``True`` and the entry is a " "reparse point (for example, a symbolic link or directory junction)." msgstr "" -#: ../../../library/os.rst:3133 +#: ../../../library/os.rst:3155 msgid "" "On Windows, the ``st_ino``, ``st_dev`` and ``st_nlink`` attributes of the :" "class:`stat_result` are always set to zero. Call :func:`os.stat` to get " "these attributes." msgstr "" -#: ../../../library/os.rst:3137 +#: ../../../library/os.rst:3159 msgid "" "The result is cached on the ``os.DirEntry`` object, with a separate cache " "for *follow_symlinks* ``True`` and ``False``. Call :func:`os.stat` to fetch " "up-to-date information." msgstr "" -#: ../../../library/os.rst:3141 +#: ../../../library/os.rst:3163 msgid "" "Note that there is a nice correspondence between several attributes and " "methods of ``os.DirEntry`` and of :class:`pathlib.Path`. In particular, the " @@ -3422,13 +3444,13 @@ msgid "" "``is_file()``, ``is_symlink()``, ``is_junction()``, and ``stat()`` methods." msgstr "" -#: ../../../library/os.rst:3149 +#: ../../../library/os.rst:3171 msgid "" "Added support for the :class:`~os.PathLike` interface. Added support for :" "class:`bytes` paths on Windows." msgstr "" -#: ../../../library/os.rst:3153 +#: ../../../library/os.rst:3175 msgid "" "The ``st_ctime`` attribute of a stat result is deprecated on Windows. The " "file creation time is properly available as ``st_birthtime``, and in the " @@ -3436,7 +3458,7 @@ msgid "" "time, if available." msgstr "" -#: ../../../library/os.rst:3162 +#: ../../../library/os.rst:3184 msgid "" "Get the status of a file or a file descriptor. Perform the equivalent of a :" "c:func:`stat` system call on the given path. *path* may be specified as " @@ -3445,21 +3467,21 @@ msgid "" "`stat_result` object." msgstr "" -#: ../../../library/os.rst:3168 +#: ../../../library/os.rst:3190 msgid "" "This function normally follows symlinks; to stat a symlink add the argument " "``follow_symlinks=False``, or use :func:`lstat`." msgstr "" -#: ../../../library/os.rst:3171 ../../../library/os.rst:4736 -#: ../../../library/os.rst:4752 ../../../library/os.rst:4772 -#: ../../../library/os.rst:4792 +#: ../../../library/os.rst:3193 ../../../library/os.rst:4758 +#: ../../../library/os.rst:4774 ../../../library/os.rst:4794 +#: ../../../library/os.rst:4814 msgid "" "This function can support :ref:`specifying a file descriptor ` and :" "ref:`not following symlinks `." msgstr "" -#: ../../../library/os.rst:3174 +#: ../../../library/os.rst:3196 msgid "" "On Windows, passing ``follow_symlinks=False`` will disable following all " "name-surrogate reparse points, which includes symlinks and directory " @@ -3473,21 +3495,21 @@ msgid "" "junction points, which will raise the usual exceptions." msgstr "" -#: ../../../library/os.rst:3187 ../../../library/os.rst:4443 +#: ../../../library/os.rst:3209 ../../../library/os.rst:4465 msgid "Example::" msgstr "" -#: ../../../library/os.rst:3200 +#: ../../../library/os.rst:3222 msgid ":func:`fstat` and :func:`lstat` functions." msgstr "" -#: ../../../library/os.rst:3202 +#: ../../../library/os.rst:3224 msgid "" "Added the *dir_fd* and *follow_symlinks* parameters, specifying a file " "descriptor instead of a path." msgstr "" -#: ../../../library/os.rst:3209 +#: ../../../library/os.rst:3231 msgid "" "On Windows, all reparse points that can be resolved by the operating system " "are now followed, and passing ``follow_symlinks=False`` disables following " @@ -3497,122 +3519,122 @@ msgid "" "of raising an error." msgstr "" -#: ../../../library/os.rst:3220 +#: ../../../library/os.rst:3242 msgid "" "Object whose attributes correspond roughly to the members of the :c:struct:" "`stat` structure. It is used for the result of :func:`os.stat`, :func:`os." "fstat` and :func:`os.lstat`." msgstr "" -#: ../../../library/os.rst:3224 +#: ../../../library/os.rst:3246 msgid "Attributes:" msgstr "" -#: ../../../library/os.rst:3228 ../../../library/os.rst:3663 +#: ../../../library/os.rst:3250 ../../../library/os.rst:3685 msgid "File mode: file type and file mode bits (permissions)." msgstr "" -#: ../../../library/os.rst:3232 +#: ../../../library/os.rst:3254 msgid "" "Platform dependent, but if non-zero, uniquely identifies the file for a " "given value of ``st_dev``. Typically:" msgstr "" -#: ../../../library/os.rst:3235 +#: ../../../library/os.rst:3257 msgid "the inode number on Unix," msgstr "" -#: ../../../library/os.rst:3236 +#: ../../../library/os.rst:3258 msgid "" "the `file index `_ on " "Windows" msgstr "" -#: ../../../library/os.rst:3242 ../../../library/os.rst:3592 +#: ../../../library/os.rst:3264 ../../../library/os.rst:3614 msgid "Identifier of the device on which this file resides." msgstr "" -#: ../../../library/os.rst:3246 ../../../library/os.rst:3685 +#: ../../../library/os.rst:3268 ../../../library/os.rst:3707 msgid "Number of hard links." msgstr "" -#: ../../../library/os.rst:3250 ../../../library/os.rst:3723 +#: ../../../library/os.rst:3272 ../../../library/os.rst:3745 msgid "User identifier of the file owner." msgstr "" -#: ../../../library/os.rst:3254 ../../../library/os.rst:3634 +#: ../../../library/os.rst:3276 ../../../library/os.rst:3656 msgid "Group identifier of the file owner." msgstr "" -#: ../../../library/os.rst:3258 ../../../library/os.rst:3704 +#: ../../../library/os.rst:3280 ../../../library/os.rst:3726 msgid "" "Size of the file in bytes, if it is a regular file or a symbolic link. The " "size of a symbolic link is the length of the pathname it contains, without a " "terminating null byte." msgstr "" -#: ../../../library/os.rst:3262 +#: ../../../library/os.rst:3284 msgid "Timestamps:" msgstr "" -#: ../../../library/os.rst:3266 ../../../library/os.rst:3486 +#: ../../../library/os.rst:3288 ../../../library/os.rst:3508 msgid "Time of most recent access expressed in seconds." msgstr "" -#: ../../../library/os.rst:3270 ../../../library/os.rst:3670 +#: ../../../library/os.rst:3292 ../../../library/os.rst:3692 msgid "Time of most recent content modification expressed in seconds." msgstr "" -#: ../../../library/os.rst:3274 ../../../library/os.rst:3577 +#: ../../../library/os.rst:3296 ../../../library/os.rst:3599 msgid "Time of most recent metadata change expressed in seconds." msgstr "" -#: ../../../library/os.rst:3276 +#: ../../../library/os.rst:3298 msgid "" "``st_ctime`` is deprecated on Windows. Use ``st_birthtime`` for the file " "creation time. In the future, ``st_ctime`` will contain the time of the most " "recent metadata change, as for other platforms." msgstr "" -#: ../../../library/os.rst:3283 ../../../library/os.rst:3493 +#: ../../../library/os.rst:3305 ../../../library/os.rst:3515 msgid "Time of most recent access expressed in nanoseconds as an integer." msgstr "" -#: ../../../library/os.rst:3289 ../../../library/os.rst:3677 +#: ../../../library/os.rst:3311 ../../../library/os.rst:3699 msgid "" "Time of most recent content modification expressed in nanoseconds as an " "integer." msgstr "" -#: ../../../library/os.rst:3296 ../../../library/os.rst:3584 +#: ../../../library/os.rst:3318 ../../../library/os.rst:3606 msgid "" "Time of most recent metadata change expressed in nanoseconds as an integer." msgstr "" -#: ../../../library/os.rst:3301 +#: ../../../library/os.rst:3323 msgid "" "``st_ctime_ns`` is deprecated on Windows. Use ``st_birthtime_ns`` for the " "file creation time. In the future, ``st_ctime`` will contain the time of the " "most recent metadata change, as for other platforms." msgstr "" -#: ../../../library/os.rst:3308 +#: ../../../library/os.rst:3330 msgid "" "Time of file creation expressed in seconds. This attribute is not always " "available, and may raise :exc:`AttributeError`." msgstr "" -#: ../../../library/os.rst:3311 +#: ../../../library/os.rst:3333 msgid "``st_birthtime`` is now available on Windows." msgstr "" -#: ../../../library/os.rst:3316 +#: ../../../library/os.rst:3338 msgid "" "Time of file creation expressed in nanoseconds as an integer. This attribute " "is not always available, and may raise :exc:`AttributeError`." msgstr "" -#: ../../../library/os.rst:3324 +#: ../../../library/os.rst:3346 msgid "" "The exact meaning and resolution of the :attr:`st_atime`, :attr:`st_mtime`, :" "attr:`st_ctime` and :attr:`st_birthtime` attributes depend on the operating " @@ -3622,7 +3644,7 @@ msgid "" "details." msgstr "" -#: ../../../library/os.rst:3331 +#: ../../../library/os.rst:3353 msgid "" "Similarly, although :attr:`st_atime_ns`, :attr:`st_mtime_ns`, :attr:" "`st_ctime_ns` and :attr:`st_birthtime_ns` are always expressed in " @@ -3635,74 +3657,74 @@ msgid "" "`st_birthtime_ns`." msgstr "" -#: ../../../library/os.rst:3341 +#: ../../../library/os.rst:3363 msgid "" "On some Unix systems (such as Linux), the following attributes may also be " "available:" msgstr "" -#: ../../../library/os.rst:3346 +#: ../../../library/os.rst:3368 msgid "" "Number of 512-byte blocks allocated for file. This may be smaller than :attr:" "`st_size`/512 when the file has holes." msgstr "" -#: ../../../library/os.rst:3351 ../../../library/os.rst:3550 +#: ../../../library/os.rst:3373 ../../../library/os.rst:3572 msgid "" "\"Preferred\" blocksize for efficient file system I/O. Writing to a file in " "smaller chunks may cause an inefficient read-modify-rewrite." msgstr "" -#: ../../../library/os.rst:3356 ../../../library/os.rst:3692 +#: ../../../library/os.rst:3378 ../../../library/os.rst:3714 msgid "Type of device if an inode device." msgstr "" -#: ../../../library/os.rst:3360 +#: ../../../library/os.rst:3382 msgid "User defined flags for file." msgstr "" -#: ../../../library/os.rst:3362 +#: ../../../library/os.rst:3384 msgid "" "On other Unix systems (such as FreeBSD), the following attributes may be " "available (but may be only filled out if root tries to use them):" msgstr "" -#: ../../../library/os.rst:3367 +#: ../../../library/os.rst:3389 msgid "File generation number." msgstr "" -#: ../../../library/os.rst:3369 +#: ../../../library/os.rst:3391 msgid "" "On Solaris and derivatives, the following attributes may also be available:" msgstr "" -#: ../../../library/os.rst:3374 +#: ../../../library/os.rst:3396 msgid "" "String that uniquely identifies the type of the filesystem that contains the " "file." msgstr "" -#: ../../../library/os.rst:3377 +#: ../../../library/os.rst:3399 msgid "On macOS systems, the following attributes may also be available:" msgstr "" -#: ../../../library/os.rst:3381 +#: ../../../library/os.rst:3403 msgid "Real size of the file." msgstr "" -#: ../../../library/os.rst:3385 +#: ../../../library/os.rst:3407 msgid "Creator of the file." msgstr "" -#: ../../../library/os.rst:3389 +#: ../../../library/os.rst:3411 msgid "File type." msgstr "" -#: ../../../library/os.rst:3391 +#: ../../../library/os.rst:3413 msgid "On Windows systems, the following attributes are also available:" msgstr "" -#: ../../../library/os.rst:3395 +#: ../../../library/os.rst:3417 msgid "" "Windows file attributes: ``dwFileAttributes`` member of the " "``BY_HANDLE_FILE_INFORMATION`` structure returned by :c:func:`!" @@ -3710,7 +3732,7 @@ msgid "" "FILE_ATTRIBUTE_ARCHIVE>` constants in the :mod:`stat` module." msgstr "" -#: ../../../library/os.rst:3405 +#: ../../../library/os.rst:3427 msgid "" "When :attr:`st_file_attributes` has the :const:`~stat." "FILE_ATTRIBUTE_REPARSE_POINT` set, this field contains the tag identifying " @@ -3718,14 +3740,14 @@ msgid "" "IO_REPARSE_TAG_SYMLINK>` constants in the :mod:`stat` module." msgstr "" -#: ../../../library/os.rst:3410 +#: ../../../library/os.rst:3432 msgid "" "The standard module :mod:`stat` defines functions and constants that are " "useful for extracting information from a :c:struct:`stat` structure. (On " "Windows, some items are filled with dummy values.)" msgstr "" -#: ../../../library/os.rst:3414 +#: ../../../library/os.rst:3436 msgid "" "For backward compatibility, a :class:`stat_result` instance is also " "accessible as a tuple of at least 10 integers giving the most important (and " @@ -3737,56 +3759,56 @@ msgid "" "class:`stat_result` as a tuple always returns integers." msgstr "" -#: ../../../library/os.rst:3423 +#: ../../../library/os.rst:3445 msgid "Windows now returns the file index as :attr:`st_ino` when available." msgstr "" -#: ../../../library/os.rst:3427 +#: ../../../library/os.rst:3449 msgid "Added the :attr:`st_fstype` member to Solaris/derivatives." msgstr "" -#: ../../../library/os.rst:3430 +#: ../../../library/os.rst:3452 msgid "Added the :attr:`st_reparse_tag` member on Windows." msgstr "" -#: ../../../library/os.rst:3433 +#: ../../../library/os.rst:3455 msgid "" "On Windows, the :attr:`st_mode` member now identifies special files as :" "const:`~stat.S_IFCHR`, :const:`~stat.S_IFIFO` or :const:`~stat.S_IFBLK` as " "appropriate." msgstr "" -#: ../../../library/os.rst:3438 +#: ../../../library/os.rst:3460 msgid "" "On Windows, :attr:`st_ctime` is deprecated. Eventually, it will contain the " "last metadata change time, for consistency with other platforms, but for now " "still contains creation time. Use :attr:`st_birthtime` for the creation time." msgstr "" -#: ../../../library/os.rst:3444 +#: ../../../library/os.rst:3466 msgid "" "On Windows, :attr:`st_ino` may now be up to 128 bits, depending on the file " "system. Previously it would not be above 64 bits, and larger file " "identifiers would be arbitrarily packed." msgstr "" -#: ../../../library/os.rst:3448 +#: ../../../library/os.rst:3470 msgid "" "On Windows, :attr:`st_rdev` no longer returns a value. Previously it would " "contain the same as :attr:`st_dev`, which was incorrect." msgstr "" -#: ../../../library/os.rst:3451 +#: ../../../library/os.rst:3473 msgid "Added the :attr:`st_birthtime` member on Windows." msgstr "" -#: ../../../library/os.rst:3456 +#: ../../../library/os.rst:3478 msgid "" "Get the status of a file or file descriptor by performing a :c:func:`!statx` " "system call on the given path." msgstr "" -#: ../../../library/os.rst:3459 +#: ../../../library/os.rst:3481 msgid "" "*path* is a :term:`path-like object` or an open file descriptor. *mask* is a " "combination of the module-level :const:`STATX_* ` constants " @@ -3797,231 +3819,231 @@ msgid "" "retrieved (which may differ from *mask*)." msgstr "" -#: ../../../library/os.rst:3467 +#: ../../../library/os.rst:3489 msgid "" "This function supports :ref:`specifying a file descriptor `, :ref:" "`paths relative to directory descriptors `, and :ref:`not following " "symlinks `." msgstr "" -#: ../../../library/os.rst:3471 ../../../library/os.rst:3728 +#: ../../../library/os.rst:3493 ../../../library/os.rst:3750 msgid "The :manpage:`statx(2)` man page." msgstr "" -#: ../../../library/os.rst:3480 +#: ../../../library/os.rst:3502 msgid "Information about a file returned by :func:`os.statx`." msgstr "" -#: ../../../library/os.rst:3482 +#: ../../../library/os.rst:3504 msgid ":class:`!statx_result` has the following attributes:" msgstr "" -#: ../../../library/os.rst:3488 ../../../library/os.rst:3495 +#: ../../../library/os.rst:3510 ../../../library/os.rst:3517 msgid "" "Equal to ``None`` if :data:`STATX_ATIME` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3500 +#: ../../../library/os.rst:3522 msgid "Maximum iovecs for direct I/O with torn-write protection." msgstr "" -#: ../../../library/os.rst:3502 ../../../library/os.rst:3512 -#: ../../../library/os.rst:3522 ../../../library/os.rst:3532 +#: ../../../library/os.rst:3524 ../../../library/os.rst:3534 +#: ../../../library/os.rst:3544 ../../../library/os.rst:3554 msgid "" "Equal to ``None`` if :data:`STATX_WRITE_ATOMIC` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3510 +#: ../../../library/os.rst:3532 msgid "Maximum size for direct I/O with torn-write protection." msgstr "" -#: ../../../library/os.rst:3520 +#: ../../../library/os.rst:3542 msgid "Maximum optimized size for direct I/O with torn-write protection." msgstr "" -#: ../../../library/os.rst:3530 +#: ../../../library/os.rst:3552 msgid "Minimum size for direct I/O with torn-write protection." msgstr "" -#: ../../../library/os.rst:3540 +#: ../../../library/os.rst:3562 msgid "" "Bitmask of :const:`STATX_ATTR_* ` constants " "specifying the attributes of this file." msgstr "" -#: ../../../library/os.rst:3545 +#: ../../../library/os.rst:3567 msgid "" "A mask indicating which bits in :attr:`stx_attributes` are supported by the " "VFS and the filesystem." msgstr "" -#: ../../../library/os.rst:3555 +#: ../../../library/os.rst:3577 msgid "" "Number of 512-byte blocks allocated for file. This may be smaller than :attr:" "`stx_size`/512 when the file has holes." msgstr "" -#: ../../../library/os.rst:3558 +#: ../../../library/os.rst:3580 msgid "" "Equal to ``None`` if :data:`STATX_BLOCKS` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3563 +#: ../../../library/os.rst:3585 msgid "Time of file creation expressed in seconds." msgstr "" -#: ../../../library/os.rst:3565 ../../../library/os.rst:3572 +#: ../../../library/os.rst:3587 ../../../library/os.rst:3594 msgid "" "Equal to ``None`` if :data:`STATX_BTIME` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3570 +#: ../../../library/os.rst:3592 msgid "Time of file creation expressed in nanoseconds as an integer." msgstr "" -#: ../../../library/os.rst:3579 ../../../library/os.rst:3587 +#: ../../../library/os.rst:3601 ../../../library/os.rst:3609 msgid "" "Equal to ``None`` if :data:`STATX_CTIME` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3596 +#: ../../../library/os.rst:3618 msgid "Major number of the device on which this file resides." msgstr "" -#: ../../../library/os.rst:3600 +#: ../../../library/os.rst:3622 msgid "Minor number of the device on which this file resides." msgstr "" -#: ../../../library/os.rst:3604 +#: ../../../library/os.rst:3626 msgid "Direct I/O memory buffer alignment requirement." msgstr "" -#: ../../../library/os.rst:3606 ../../../library/os.rst:3616 +#: ../../../library/os.rst:3628 ../../../library/os.rst:3638 msgid "" "Equal to ``None`` if :data:`STATX_DIOALIGN` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3614 +#: ../../../library/os.rst:3636 msgid "Direct I/O file offset alignment requirement." msgstr "" -#: ../../../library/os.rst:3624 +#: ../../../library/os.rst:3646 msgid "Direct I/O file offset alignment requirement for reads." msgstr "" -#: ../../../library/os.rst:3626 +#: ../../../library/os.rst:3648 msgid "" "Equal to ``None`` if :data:`STATX_DIO_READ_ALIGN` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3636 +#: ../../../library/os.rst:3658 msgid "" "Equal to ``None`` if :data:`STATX_GID` is missing from :attr:`~statx_result." "stx_mask`." msgstr "" -#: ../../../library/os.rst:3641 +#: ../../../library/os.rst:3663 msgid "Inode number." msgstr "" -#: ../../../library/os.rst:3643 +#: ../../../library/os.rst:3665 msgid "" "Equal to ``None`` if :data:`STATX_INO` is missing from :attr:`~statx_result." "stx_mask`." msgstr "" -#: ../../../library/os.rst:3648 +#: ../../../library/os.rst:3670 msgid "" "Bitmask of :const:`STATX_* ` constants specifying the " "information retrieved, which may differ from what was requested." msgstr "" -#: ../../../library/os.rst:3653 +#: ../../../library/os.rst:3675 msgid "Mount identifier." msgstr "" -#: ../../../library/os.rst:3655 +#: ../../../library/os.rst:3677 msgid "" "Equal to ``None`` if :data:`STATX_MNT_ID` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3665 +#: ../../../library/os.rst:3687 msgid "" "Equal to ``None`` if :data:`STATX_TYPE | STATX_MODE ` is missing " "from :attr:`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3672 ../../../library/os.rst:3680 +#: ../../../library/os.rst:3694 ../../../library/os.rst:3702 msgid "" "Equal to ``None`` if :data:`STATX_MTIME` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3687 +#: ../../../library/os.rst:3709 msgid "" "Equal to ``None`` if :data:`STATX_NLINK` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3696 +#: ../../../library/os.rst:3718 msgid "Major number of the device this file represents." msgstr "" -#: ../../../library/os.rst:3700 +#: ../../../library/os.rst:3722 msgid "Minor number of the device this file represents." msgstr "" -#: ../../../library/os.rst:3708 +#: ../../../library/os.rst:3730 msgid "" "Equal to ``None`` if :data:`STATX_SIZE` is missing from :attr:`~statx_result." "stx_mask`." msgstr "" -#: ../../../library/os.rst:3713 +#: ../../../library/os.rst:3735 msgid "Subvolume identifier." msgstr "" -#: ../../../library/os.rst:3715 +#: ../../../library/os.rst:3737 msgid "" "Equal to ``None`` if :data:`STATX_SUBVOL` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3725 +#: ../../../library/os.rst:3747 msgid "" "Equal to ``None`` if :data:`STATX_UID` is missing from :attr:`~statx_result." "stx_mask`." msgstr "" -#: ../../../library/os.rst:3755 +#: ../../../library/os.rst:3777 msgid "" "Bitflags for use in the *mask* parameter to :func:`os.statx`. Some of these " "flags may be available even when their corresponding members in :class:" "`statx_result` are not available." msgstr "" -#: ../../../library/os.rst:3765 +#: ../../../library/os.rst:3787 msgid "" "A flag for the :func:`os.statx` function. Requests that the kernel return " "up-to-date information even when doing so is expensive (for example, " "requiring a round trip to the server for a file on a network filesystem)." msgstr "" -#: ../../../library/os.rst:3775 +#: ../../../library/os.rst:3797 msgid "" "A flag for the :func:`os.statx` function. Requests that the kernel return " "cached information if possible." msgstr "" -#: ../../../library/os.rst:3784 +#: ../../../library/os.rst:3806 msgid "" "A flag for the :func:`os.statx` function. This flag is defined as ``0``, so " "it has no effect, but it can be used to explicitly indicate neither :data:" @@ -4030,14 +4052,14 @@ msgid "" "as fresh as :func:`os.stat` would return." msgstr "" -#: ../../../library/os.rst:3797 +#: ../../../library/os.rst:3819 msgid "" "If the final component of a path is an automount point, operate on the " "automount point instead of performing the automount. On Linux, :func:`os." "stat`, :func:`os.fstat` and :func:`os.lstat` always behave this way." msgstr "" -#: ../../../library/os.rst:3809 +#: ../../../library/os.rst:3831 msgid "" "Perform a :manpage:`statvfs(3)` system call on the given path. The return " "value is a :class:`statvfs_result` whose attributes describe the filesystem " @@ -4045,47 +4067,47 @@ msgid "" "structure." msgstr "" -#: ../../../library/os.rst:3827 +#: ../../../library/os.rst:3849 msgid "" "Filesystem statistics returned by :func:`os.statvfs` and :func:`os." "fstatvfs`. See :manpage:`statvfs(3)` for more details." msgstr "" -#: ../../../library/os.rst:3832 +#: ../../../library/os.rst:3854 msgid "Block size." msgstr "" -#: ../../../library/os.rst:3836 +#: ../../../library/os.rst:3858 msgid "Fragment size." msgstr "" -#: ../../../library/os.rst:3840 +#: ../../../library/os.rst:3862 msgid "" "Number of :attr:`~statvfs_result.f_frsize` sized blocks the filesystem can " "contain." msgstr "" -#: ../../../library/os.rst:3845 +#: ../../../library/os.rst:3867 msgid "Number of free blocks." msgstr "" -#: ../../../library/os.rst:3849 +#: ../../../library/os.rst:3871 msgid "Number of free blocks for unprivileged users." msgstr "" -#: ../../../library/os.rst:3853 +#: ../../../library/os.rst:3875 msgid "Number of file entries, inodes, the filesystem can contain." msgstr "" -#: ../../../library/os.rst:3857 +#: ../../../library/os.rst:3879 msgid "Number of free files entries." msgstr "" -#: ../../../library/os.rst:3861 +#: ../../../library/os.rst:3883 msgid "Number of free file entries for unprivileged users." msgstr "" -#: ../../../library/os.rst:3865 +#: ../../../library/os.rst:3887 msgid "" "Bit-mask of mount flags. The following flags are defined: :data:" "`ST_RDONLY`, :data:`ST_NOSUID`, :data:`ST_NODEV`, :data:`ST_NOEXEC`, :data:" @@ -4094,70 +4116,70 @@ msgid "" "`ST_RELATIME`." msgstr "" -#: ../../../library/os.rst:3873 +#: ../../../library/os.rst:3895 msgid "" "Filesystem max filename length. OS specific limitations such as :ref:" "`Windows MAX_PATH ` and those described in Linux :manpage:" "`pathname(7)` may exist." msgstr "" -#: ../../../library/os.rst:3879 +#: ../../../library/os.rst:3901 msgid "Filesystem ID." msgstr "" -#: ../../../library/os.rst:3884 +#: ../../../library/os.rst:3906 msgid "The following flags are used in :attr:`statvfs_result.f_flag`." msgstr "" -#: ../../../library/os.rst:3888 +#: ../../../library/os.rst:3910 msgid "Read-only filesystem." msgstr "" -#: ../../../library/os.rst:3894 +#: ../../../library/os.rst:3916 msgid "Setuid/setgid bits are disabled or not supported." msgstr "" -#: ../../../library/os.rst:3900 +#: ../../../library/os.rst:3922 msgid "Disallow access to device special files." msgstr "" -#: ../../../library/os.rst:3908 +#: ../../../library/os.rst:3930 msgid "Disallow program execution." msgstr "" -#: ../../../library/os.rst:3916 +#: ../../../library/os.rst:3938 msgid "Writes are synced at once." msgstr "" -#: ../../../library/os.rst:3924 +#: ../../../library/os.rst:3946 msgid "Allow mandatory locks on an FS." msgstr "" -#: ../../../library/os.rst:3932 +#: ../../../library/os.rst:3954 msgid "Write on file/directory/symlink." msgstr "" -#: ../../../library/os.rst:3940 +#: ../../../library/os.rst:3962 msgid "Append-only file." msgstr "" -#: ../../../library/os.rst:3948 +#: ../../../library/os.rst:3970 msgid "Immutable file." msgstr "" -#: ../../../library/os.rst:3956 +#: ../../../library/os.rst:3978 msgid "Do not update access times." msgstr "" -#: ../../../library/os.rst:3964 +#: ../../../library/os.rst:3986 msgid "Do not update directory access times." msgstr "" -#: ../../../library/os.rst:3972 +#: ../../../library/os.rst:3994 msgid "Update atime relative to mtime/ctime." msgstr "" -#: ../../../library/os.rst:3981 +#: ../../../library/os.rst:4003 msgid "" "A :class:`set` object indicating which functions in the :mod:`!os` module " "accept an open file descriptor for their *dir_fd* parameter. Different " @@ -4169,7 +4191,7 @@ msgid "" "(Specifying ``None`` for *dir_fd* is always supported on all platforms.)" msgstr "" -#: ../../../library/os.rst:3991 +#: ../../../library/os.rst:4013 msgid "" "To check whether a particular function accepts an open file descriptor for " "its *dir_fd* parameter, use the ``in`` operator on ``supports_dir_fd``. As " @@ -4177,13 +4199,13 @@ msgid "" "open file descriptors for *dir_fd* on the local platform::" msgstr "" -#: ../../../library/os.rst:3998 +#: ../../../library/os.rst:4020 msgid "" "Currently *dir_fd* parameters only work on Unix platforms; none of them work " "on Windows." msgstr "" -#: ../../../library/os.rst:4006 +#: ../../../library/os.rst:4028 msgid "" "A :class:`set` object indicating whether :func:`os.access` permits " "specifying ``True`` for its *effective_ids* parameter on the local platform. " @@ -4192,19 +4214,19 @@ msgid "" "func:`os.access`; otherwise it will be empty." msgstr "" -#: ../../../library/os.rst:4012 +#: ../../../library/os.rst:4034 msgid "" "This expression evaluates to ``True`` if :func:`os.access` supports " "``effective_ids=True`` on the local platform::" msgstr "" -#: ../../../library/os.rst:4017 +#: ../../../library/os.rst:4039 msgid "" "Currently *effective_ids* is only supported on Unix platforms; it does not " "work on Windows." msgstr "" -#: ../../../library/os.rst:4025 +#: ../../../library/os.rst:4047 msgid "" "A :class:`set` object indicating which functions in the :mod:`!os` module " "permit specifying their *path* parameter as an open file descriptor on the " @@ -4213,7 +4235,7 @@ msgid "" "*path* arguments is not available on all platforms Python supports." msgstr "" -#: ../../../library/os.rst:4032 +#: ../../../library/os.rst:4054 msgid "" "To determine whether a particular function permits specifying an open file " "descriptor for its *path* parameter, use the ``in`` operator on " @@ -4222,7 +4244,7 @@ msgid "" "platform::" msgstr "" -#: ../../../library/os.rst:4045 +#: ../../../library/os.rst:4067 msgid "" "A :class:`set` object indicating which functions in the :mod:`!os` module " "accept ``False`` for their *follow_symlinks* parameter on the local " @@ -4235,7 +4257,7 @@ msgid "" "on all platforms.)" msgstr "" -#: ../../../library/os.rst:4055 +#: ../../../library/os.rst:4077 msgid "" "To check whether a particular function accepts ``False`` for its " "*follow_symlinks* parameter, use the ``in`` operator on " @@ -4244,17 +4266,17 @@ msgid "" "stat` on the local platform::" msgstr "" -#: ../../../library/os.rst:4068 +#: ../../../library/os.rst:4090 msgid "Create a symbolic link pointing to *src* named *dst*." msgstr "" -#: ../../../library/os.rst:4070 +#: ../../../library/os.rst:4092 msgid "" "The *src* parameter refers to the target of the link (the file or directory " "being linked to), and *dst* is the name of the link being created." msgstr "" -#: ../../../library/os.rst:4073 +#: ../../../library/os.rst:4095 msgid "" "On Windows, a symlink represents either a file or a directory, and does not " "morph to the target dynamically. If the target is present, the type of the " @@ -4264,7 +4286,7 @@ msgid "" "ignored." msgstr "" -#: ../../../library/os.rst:4084 +#: ../../../library/os.rst:4106 msgid "" "On newer versions of Windows 10, unprivileged accounts can create symlinks " "if Developer Mode is enabled. When Developer Mode is not available/enabled, " @@ -4272,84 +4294,84 @@ msgid "" "must be run as an administrator." msgstr "" -#: ../../../library/os.rst:4090 +#: ../../../library/os.rst:4112 msgid "" ":exc:`OSError` is raised when the function is called by an unprivileged user." msgstr "" -#: ../../../library/os.rst:4093 +#: ../../../library/os.rst:4115 msgid "" "Raises an :ref:`auditing event ` ``os.symlink`` with arguments " "``src``, ``dst``, ``dir_fd``." msgstr "" -#: ../../../library/os.rst:4103 +#: ../../../library/os.rst:4125 msgid "" "Added the *dir_fd* parameter, and now allow *target_is_directory* on non-" "Windows platforms." msgstr "" -#: ../../../library/os.rst:4110 +#: ../../../library/os.rst:4132 msgid "Added support for unelevated symlinks on Windows with Developer Mode." msgstr "" -#: ../../../library/os.rst:4116 +#: ../../../library/os.rst:4138 msgid "Force write of everything to disk." msgstr "" -#: ../../../library/os.rst:4125 +#: ../../../library/os.rst:4147 msgid "" "Truncate the file corresponding to *path*, so that it is at most *length* " "bytes in size." msgstr "" -#: ../../../library/os.rst:4130 +#: ../../../library/os.rst:4152 msgid "" "Raises an :ref:`auditing event ` ``os.truncate`` with arguments " "``path``, ``length``." msgstr "" -#: ../../../library/os.rst:4145 +#: ../../../library/os.rst:4167 msgid "" "Remove (delete) the file *path*. This function is semantically identical " "to :func:`remove`; the ``unlink`` name is its traditional Unix name. Please " "see the documentation for :func:`remove` for further information." msgstr "" -#: ../../../library/os.rst:4161 +#: ../../../library/os.rst:4183 msgid "Set the access and modified times of the file specified by *path*." msgstr "" -#: ../../../library/os.rst:4163 +#: ../../../library/os.rst:4185 msgid "" ":func:`utime` takes two optional parameters, *times* and *ns*. These specify " "the times set on *path* and are used as follows:" msgstr "" -#: ../../../library/os.rst:4166 +#: ../../../library/os.rst:4188 msgid "" "If *ns* is specified, it must be a 2-tuple of the form ``(atime_ns, " "mtime_ns)`` where each member is an int expressing nanoseconds." msgstr "" -#: ../../../library/os.rst:4169 +#: ../../../library/os.rst:4191 msgid "" "If *times* is not ``None``, it must be a 2-tuple of the form ``(atime, " "mtime)`` where each member is a real number expressing seconds, rounded down " "to nanoseconds." msgstr "" -#: ../../../library/os.rst:4173 +#: ../../../library/os.rst:4195 msgid "" "If *times* is ``None`` and *ns* is unspecified, this is equivalent to " "specifying ``ns=(atime_ns, mtime_ns)`` where both times are the current time." msgstr "" -#: ../../../library/os.rst:4177 +#: ../../../library/os.rst:4199 msgid "It is an error to specify tuples for both *times* and *ns*." msgstr "" -#: ../../../library/os.rst:4179 +#: ../../../library/os.rst:4201 msgid "" "Note that the exact times you set here may not be returned by a subsequent :" "func:`~os.stat` call, depending on the resolution with which your operating " @@ -4359,23 +4381,23 @@ msgid "" "func:`utime`." msgstr "" -#: ../../../library/os.rst:4190 +#: ../../../library/os.rst:4212 msgid "" "Raises an :ref:`auditing event ` ``os.utime`` with arguments " "``path``, ``times``, ``ns``, ``dir_fd``." msgstr "" -#: ../../../library/os.rst:4192 +#: ../../../library/os.rst:4214 msgid "" "Added support for specifying *path* as an open file descriptor, and the " "*dir_fd*, *follow_symlinks*, and *ns* parameters." msgstr "" -#: ../../../library/os.rst:4199 +#: ../../../library/os.rst:4221 msgid "Accepts any real numbers as *times*, not only integers or floats." msgstr "" -#: ../../../library/os.rst:4209 +#: ../../../library/os.rst:4231 msgid "" "Generate the file names in a directory tree by walking the tree either top-" "down or bottom-up. For each directory in the tree rooted at directory *top* " @@ -4383,7 +4405,7 @@ msgid "" "filenames)``." msgstr "" -#: ../../../library/os.rst:4214 +#: ../../../library/os.rst:4236 msgid "" "*dirpath* is a string, the path to the directory. *dirnames* is a list of " "the names of the subdirectories in *dirpath* (including symlinks to " @@ -4397,7 +4419,7 @@ msgid "" "unspecified." msgstr "" -#: ../../../library/os.rst:4225 +#: ../../../library/os.rst:4247 msgid "" "If optional argument *topdown* is ``True`` or not specified, the triple for " "a directory is generated before the triples for any of its subdirectories " @@ -4408,7 +4430,7 @@ msgid "" "its subdirectories are generated." msgstr "" -#: ../../../library/os.rst:4233 +#: ../../../library/os.rst:4255 msgid "" "When *topdown* is ``True``, the caller can modify the *dirnames* list in-" "place (perhaps using :keyword:`del` or slice assignment), and :func:`walk` " @@ -4421,7 +4443,7 @@ msgid "" "itself is generated." msgstr "" -#: ../../../library/os.rst:4242 +#: ../../../library/os.rst:4264 msgid "" "By default, errors from the :func:`scandir` call are ignored. If optional " "argument *onerror* is specified, it should be a function; it will be called " @@ -4431,66 +4453,66 @@ msgid "" "object." msgstr "" -#: ../../../library/os.rst:4248 +#: ../../../library/os.rst:4270 msgid "" "By default, :func:`walk` will not walk down into symbolic links that resolve " "to directories. Set *followlinks* to ``True`` to visit directories pointed " "to by symlinks, on systems that support them." msgstr "" -#: ../../../library/os.rst:4254 +#: ../../../library/os.rst:4276 msgid "" "Be aware that setting *followlinks* to ``True`` can lead to infinite " "recursion if a link points to a parent directory of itself. :func:`walk` " "does not keep track of the directories it visited already." msgstr "" -#: ../../../library/os.rst:4260 +#: ../../../library/os.rst:4282 msgid "" "If you pass a relative pathname, don't change the current working directory " "between resumptions of :func:`walk`. :func:`walk` never changes the current " "directory, and assumes that its caller doesn't either." msgstr "" -#: ../../../library/os.rst:4264 ../../../library/os.rst:4326 +#: ../../../library/os.rst:4286 ../../../library/os.rst:4348 msgid "" "This example displays the number of bytes taken by non-directory files in " "each directory under the starting directory, except that it doesn't look " "under any ``__pycache__`` subdirectory::" msgstr "" -#: ../../../library/os.rst:4277 +#: ../../../library/os.rst:4299 msgid "" "In the next example (simple implementation of :func:`shutil.rmtree`), " "walking the tree bottom-up is essential, :func:`rmdir` doesn't allow " "deleting a directory before the directory is empty::" msgstr "" -#: ../../../library/os.rst:4293 +#: ../../../library/os.rst:4315 msgid "" "Raises an :ref:`auditing event ` ``os.walk`` with arguments " "``top``, ``topdown``, ``onerror``, ``followlinks``." msgstr "" -#: ../../../library/os.rst:4295 +#: ../../../library/os.rst:4317 msgid "" "This function now calls :func:`os.scandir` instead of :func:`os.listdir`, " "making it faster by reducing the number of calls to :func:`os.stat`." msgstr "" -#: ../../../library/os.rst:4309 +#: ../../../library/os.rst:4331 msgid "" "This behaves exactly like :func:`walk`, except that it yields a 4-tuple " "``(dirpath, dirnames, filenames, dirfd)``, and it supports ``dir_fd``." msgstr "" -#: ../../../library/os.rst:4312 +#: ../../../library/os.rst:4334 msgid "" "*dirpath*, *dirnames* and *filenames* are identical to :func:`walk` output, " "and *dirfd* is a file descriptor referring to the directory *dirpath*." msgstr "" -#: ../../../library/os.rst:4315 +#: ../../../library/os.rst:4337 msgid "" "This function always supports :ref:`paths relative to directory descriptors " "` and :ref:`not following symlinks `. Note however " @@ -4498,30 +4520,30 @@ msgid "" "*follow_symlinks* is ``False``." msgstr "" -#: ../../../library/os.rst:4322 +#: ../../../library/os.rst:4344 msgid "" "Since :func:`fwalk` yields file descriptors, those are only valid until the " "next iteration step, so you should duplicate them (e.g. with :func:`dup`) if " "you want to keep them longer." msgstr "" -#: ../../../library/os.rst:4339 +#: ../../../library/os.rst:4361 msgid "" "In the next example, walking the tree bottom-up is essential: :func:`rmdir` " "doesn't allow deleting a directory before the directory is empty::" msgstr "" -#: ../../../library/os.rst:4354 +#: ../../../library/os.rst:4376 msgid "" "Raises an :ref:`auditing event ` ``os.fwalk`` with arguments " "``top``, ``topdown``, ``onerror``, ``follow_symlinks``, ``dir_fd``." msgstr "" -#: ../../../library/os.rst:4363 +#: ../../../library/os.rst:4385 msgid "Added support for :class:`bytes` paths." msgstr "" -#: ../../../library/os.rst:4369 +#: ../../../library/os.rst:4391 msgid "" "Create an anonymous file and return a file descriptor that refers to it. " "*flags* must be one of the ``os.MFD_*`` constants available on the system " @@ -4529,7 +4551,7 @@ msgid "" "descriptor is :ref:`non-inheritable `." msgstr "" -#: ../../../library/os.rst:4374 +#: ../../../library/os.rst:4396 msgid "" "The name supplied in *name* is used as a filename and will be displayed as " "the target of the corresponding symbolic link in the directory ``/proc/self/" @@ -4539,15 +4561,15 @@ msgid "" "side effects." msgstr "" -#: ../../../library/os.rst:4404 +#: ../../../library/os.rst:4426 msgid "These flags can be passed to :func:`memfd_create`." msgstr "" -#: ../../../library/os.rst:4408 +#: ../../../library/os.rst:4430 msgid "The ``MFD_HUGE*`` flags are only available since Linux 4.14." msgstr "" -#: ../../../library/os.rst:4415 +#: ../../../library/os.rst:4437 msgid "" "Create and return an event file descriptor. The file descriptors supports " "raw :func:`read` and :func:`write` with a buffer size of 8, :func:`~select." @@ -4556,7 +4578,7 @@ msgid "" "ref:`non-inheritable `." msgstr "" -#: ../../../library/os.rst:4421 +#: ../../../library/os.rst:4443 msgid "" "*initval* is the initial value of the event counter. The initial value must " "be a 32 bit unsigned integer. Please note that the initial value is limited " @@ -4564,96 +4586,96 @@ msgid "" "integer with a maximum value of 2\\ :sup:`64`\\ -\\ 2." msgstr "" -#: ../../../library/os.rst:4426 +#: ../../../library/os.rst:4448 msgid "" "*flags* can be constructed from :const:`EFD_CLOEXEC`, :const:`EFD_NONBLOCK`, " "and :const:`EFD_SEMAPHORE`." msgstr "" -#: ../../../library/os.rst:4429 +#: ../../../library/os.rst:4451 msgid "" "If :const:`EFD_SEMAPHORE` is specified and the event counter is non-zero, :" "func:`eventfd_read` returns 1 and decrements the counter by one." msgstr "" -#: ../../../library/os.rst:4432 +#: ../../../library/os.rst:4454 msgid "" "If :const:`EFD_SEMAPHORE` is not specified and the event counter is non-" "zero, :func:`eventfd_read` returns the current event counter value and " "resets the counter to zero." msgstr "" -#: ../../../library/os.rst:4436 +#: ../../../library/os.rst:4458 msgid "" "If the event counter is zero and :const:`EFD_NONBLOCK` is not specified, :" "func:`eventfd_read` blocks." msgstr "" -#: ../../../library/os.rst:4439 +#: ../../../library/os.rst:4461 msgid "" ":func:`eventfd_write` increments the event counter. Write blocks if the " "write operation would increment the counter to a value larger than 2\\ :sup:" "`64`\\ -\\ 2." msgstr "" -#: ../../../library/os.rst:4466 +#: ../../../library/os.rst:4488 msgid "" "Read value from an :func:`eventfd` file descriptor and return a 64 bit " "unsigned int. The function does not verify that *fd* is an :func:`eventfd`." msgstr "" -#: ../../../library/os.rst:4475 +#: ../../../library/os.rst:4497 msgid "" "Add value to an :func:`eventfd` file descriptor. *value* must be a 64 bit " "unsigned int. The function does not verify that *fd* is an :func:`eventfd`." msgstr "" -#: ../../../library/os.rst:4484 +#: ../../../library/os.rst:4506 msgid "Set close-on-exec flag for new :func:`eventfd` file descriptor." msgstr "" -#: ../../../library/os.rst:4492 +#: ../../../library/os.rst:4514 msgid "" "Set :const:`O_NONBLOCK` status flag for new :func:`eventfd` file descriptor." msgstr "" -#: ../../../library/os.rst:4501 +#: ../../../library/os.rst:4523 msgid "" "Provide semaphore-like semantics for reads from an :func:`eventfd` file " "descriptor. On read the internal counter is decremented by one." msgstr "" -#: ../../../library/os.rst:4512 +#: ../../../library/os.rst:4534 msgid "Timer File Descriptors" msgstr "" -#: ../../../library/os.rst:4516 +#: ../../../library/os.rst:4538 msgid "" "These functions provide support for Linux's *timer file descriptor* API. " "Naturally, they are all only available on Linux." msgstr "" -#: ../../../library/os.rst:4521 +#: ../../../library/os.rst:4543 msgid "Create and return a timer file descriptor (*timerfd*)." msgstr "" -#: ../../../library/os.rst:4523 +#: ../../../library/os.rst:4545 msgid "The file descriptor returned by :func:`timerfd_create` supports:" msgstr "" -#: ../../../library/os.rst:4525 +#: ../../../library/os.rst:4547 msgid ":func:`read`" msgstr "" -#: ../../../library/os.rst:4526 +#: ../../../library/os.rst:4548 msgid ":func:`~select.select`" msgstr "" -#: ../../../library/os.rst:4527 +#: ../../../library/os.rst:4549 msgid ":func:`~select.poll`" msgstr "" -#: ../../../library/os.rst:4529 +#: ../../../library/os.rst:4551 msgid "" "The file descriptor's :func:`read` method can be called with a buffer size " "of 8. If the timer has already expired one or more times, :func:`read` " @@ -4662,31 +4684,31 @@ msgid "" "byteorder)``." msgstr "" -#: ../../../library/os.rst:4534 +#: ../../../library/os.rst:4556 msgid "" ":func:`~select.select` and :func:`~select.poll` can be used to wait until " "timer expires and the file descriptor is readable." msgstr "" -#: ../../../library/os.rst:4537 +#: ../../../library/os.rst:4559 msgid "" "*clockid* must be a valid :ref:`clock ID `, as " "defined in the :py:mod:`time` module:" msgstr "" -#: ../../../library/os.rst:4540 +#: ../../../library/os.rst:4562 msgid ":const:`time.CLOCK_REALTIME`" msgstr "" -#: ../../../library/os.rst:4541 +#: ../../../library/os.rst:4563 msgid ":const:`time.CLOCK_MONOTONIC`" msgstr "" -#: ../../../library/os.rst:4542 +#: ../../../library/os.rst:4564 msgid ":const:`time.CLOCK_BOOTTIME` (Since Linux 3.15 for timerfd_create)" msgstr "" -#: ../../../library/os.rst:4544 +#: ../../../library/os.rst:4566 msgid "" "If *clockid* is :const:`time.CLOCK_REALTIME`, a settable system-wide real-" "time clock is used. If system clock is changed, timer setting need to be " @@ -4694,35 +4716,35 @@ msgid "" "`TFD_TIMER_CANCEL_ON_SET`." msgstr "" -#: ../../../library/os.rst:4549 +#: ../../../library/os.rst:4571 msgid "" "If *clockid* is :const:`time.CLOCK_MONOTONIC`, a non-settable monotonically " "increasing clock is used. Even if the system clock is changed, the timer " "setting will not be affected." msgstr "" -#: ../../../library/os.rst:4553 +#: ../../../library/os.rst:4575 msgid "" "If *clockid* is :const:`time.CLOCK_BOOTTIME`, same as :const:`time." "CLOCK_MONOTONIC` except it includes any time that the system is suspended." msgstr "" -#: ../../../library/os.rst:4556 +#: ../../../library/os.rst:4578 msgid "" "The file descriptor's behaviour can be modified by specifying a *flags* " "value. Any of the following variables may be used, combined using bitwise OR " "(the ``|`` operator):" msgstr "" -#: ../../../library/os.rst:4560 +#: ../../../library/os.rst:4582 msgid ":const:`TFD_NONBLOCK`" msgstr "" -#: ../../../library/os.rst:4561 +#: ../../../library/os.rst:4583 msgid ":const:`TFD_CLOEXEC`" msgstr "" -#: ../../../library/os.rst:4563 +#: ../../../library/os.rst:4585 msgid "" "If :const:`TFD_NONBLOCK` is not set as a flag, :func:`read` blocks until the " "timer expires. If it is set as a flag, :func:`read` doesn't block, but If " @@ -4730,46 +4752,46 @@ msgid "" "raises :class:`OSError` with ``errno`` is set to :const:`errno.EAGAIN`." msgstr "" -#: ../../../library/os.rst:4569 +#: ../../../library/os.rst:4591 msgid ":const:`TFD_CLOEXEC` is always set by Python automatically." msgstr "" -#: ../../../library/os.rst:4571 +#: ../../../library/os.rst:4593 msgid "" "The file descriptor must be closed with :func:`os.close` when it is no " "longer needed, or else the file descriptor will be leaked." msgstr "" -#: ../../../library/os.rst:4574 +#: ../../../library/os.rst:4596 msgid "The :manpage:`timerfd_create(2)` man page." msgstr "" -#: ../../../library/os.rst:4583 +#: ../../../library/os.rst:4605 msgid "" "Alter a timer file descriptor's internal timer. This function operates the " "same interval timer as :func:`timerfd_settime_ns`." msgstr "" -#: ../../../library/os.rst:4586 +#: ../../../library/os.rst:4608 msgid "*fd* must be a valid timer file descriptor." msgstr "" -#: ../../../library/os.rst:4588 +#: ../../../library/os.rst:4610 msgid "" "The timer's behaviour can be modified by specifying a *flags* value. Any of " "the following variables may be used, combined using bitwise OR (the ``|`` " "operator):" msgstr "" -#: ../../../library/os.rst:4592 +#: ../../../library/os.rst:4614 msgid ":const:`TFD_TIMER_ABSTIME`" msgstr "" -#: ../../../library/os.rst:4593 +#: ../../../library/os.rst:4615 msgid ":const:`TFD_TIMER_CANCEL_ON_SET`" msgstr "" -#: ../../../library/os.rst:4595 +#: ../../../library/os.rst:4617 msgid "" "The timer is disabled by setting *initial* to zero (``0``). If *initial* is " "equal to or greater than zero, the timer is enabled. If *initial* is less " @@ -4777,20 +4799,20 @@ msgid "" "const:`errno.EINVAL`" msgstr "" -#: ../../../library/os.rst:4600 +#: ../../../library/os.rst:4622 msgid "" "By default the timer will fire when *initial* seconds have elapsed. (If " "*initial* is zero, timer will fire immediately.)" msgstr "" -#: ../../../library/os.rst:4603 +#: ../../../library/os.rst:4625 msgid "" "However, if the :const:`TFD_TIMER_ABSTIME` flag is set, the timer will fire " "when the timer's clock (set by *clockid* in :func:`timerfd_create`) reaches " "*initial* seconds." msgstr "" -#: ../../../library/os.rst:4607 +#: ../../../library/os.rst:4629 msgid "" "The timer's interval is set by the *interval* real number. If *interval* is " "zero, the timer only fires once, on the initial expiration. If *interval* is " @@ -4799,7 +4821,7 @@ msgid "" "raises :class:`OSError` with ``errno`` set to :const:`errno.EINVAL`" msgstr "" -#: ../../../library/os.rst:4614 +#: ../../../library/os.rst:4636 msgid "" "If the :const:`TFD_TIMER_CANCEL_ON_SET` flag is set along with :const:" "`TFD_TIMER_ABSTIME` and the clock for this timer is :const:`time." @@ -4808,86 +4830,86 @@ msgid "" "ECANCELED." msgstr "" -#: ../../../library/os.rst:4620 +#: ../../../library/os.rst:4642 msgid "" "Linux manages system clock as UTC. A daylight-savings time transition is " "done by changing time offset only and doesn't cause discontinuous system " "clock change." msgstr "" -#: ../../../library/os.rst:4624 +#: ../../../library/os.rst:4646 msgid "" "Discontinuous system clock change will be caused by the following events:" msgstr "" -#: ../../../library/os.rst:4626 +#: ../../../library/os.rst:4648 msgid "``settimeofday``" msgstr "" -#: ../../../library/os.rst:4627 +#: ../../../library/os.rst:4649 msgid "``clock_settime``" msgstr "" -#: ../../../library/os.rst:4628 +#: ../../../library/os.rst:4650 msgid "set the system date and time by ``date`` command" msgstr "" -#: ../../../library/os.rst:4630 +#: ../../../library/os.rst:4652 msgid "" "Return a two-item tuple of (``next_expiration``, ``interval``) from the " "previous timer state, before this function executed." msgstr "" -#: ../../../library/os.rst:4635 +#: ../../../library/os.rst:4657 msgid "" ":manpage:`timerfd_create(2)`, :manpage:`timerfd_settime(2)`, :manpage:" "`settimeofday(2)`, :manpage:`clock_settime(2)`, and :manpage:`date(1)`." msgstr "" -#: ../../../library/os.rst:4646 +#: ../../../library/os.rst:4668 msgid "" "Similar to :func:`timerfd_settime`, but use time as nanoseconds. This " "function operates the same interval timer as :func:`timerfd_settime`." msgstr "" -#: ../../../library/os.rst:4656 +#: ../../../library/os.rst:4678 msgid "Return a two-item tuple of floats (``next_expiration``, ``interval``)." msgstr "" -#: ../../../library/os.rst:4658 +#: ../../../library/os.rst:4680 msgid "" "``next_expiration`` denotes the relative time until the timer next fires, " "regardless of if the :const:`TFD_TIMER_ABSTIME` flag is set." msgstr "" -#: ../../../library/os.rst:4661 +#: ../../../library/os.rst:4683 msgid "" "``interval`` denotes the timer's interval. If zero, the timer will only fire " "once, after ``next_expiration`` seconds have elapsed." msgstr "" -#: ../../../library/os.rst:4665 +#: ../../../library/os.rst:4687 msgid ":manpage:`timerfd_gettime(2)`" msgstr "" -#: ../../../library/os.rst:4674 +#: ../../../library/os.rst:4696 msgid "Similar to :func:`timerfd_gettime`, but return time as nanoseconds." msgstr "" -#: ../../../library/os.rst:4682 +#: ../../../library/os.rst:4704 msgid "" "A flag for the :func:`timerfd_create` function, which sets the :const:" "`O_NONBLOCK` status flag for the new timer file descriptor. If :const:" "`TFD_NONBLOCK` is not set as a flag, :func:`read` blocks." msgstr "" -#: ../../../library/os.rst:4692 +#: ../../../library/os.rst:4714 msgid "" "A flag for the :func:`timerfd_create` function, If :const:`TFD_CLOEXEC` is " "set as a flag, set close-on-exec flag for new file descriptor." msgstr "" -#: ../../../library/os.rst:4702 +#: ../../../library/os.rst:4724 msgid "" "A flag for the :func:`timerfd_settime` and :func:`timerfd_settime_ns` " "functions. If this flag is set, *initial* is interpreted as an absolute " @@ -4895,22 +4917,22 @@ msgid "" "Epoch)." msgstr "" -#: ../../../library/os.rst:4712 +#: ../../../library/os.rst:4734 msgid "" "A flag for the :func:`timerfd_settime` and :func:`timerfd_settime_ns` " "functions along with :const:`TFD_TIMER_ABSTIME`. The timer is cancelled when " "the time of the underlying clock changes discontinuously." msgstr "" -#: ../../../library/os.rst:4723 +#: ../../../library/os.rst:4745 msgid "Linux extended attributes" msgstr "" -#: ../../../library/os.rst:4727 +#: ../../../library/os.rst:4749 msgid "These functions are all available on Linux only." msgstr "" -#: ../../../library/os.rst:4731 +#: ../../../library/os.rst:4753 msgid "" "Return the value of the extended filesystem attribute *attribute* for " "*path*. *attribute* can be bytes or str (directly or indirectly through the :" @@ -4918,18 +4940,18 @@ msgid "" "encoding." msgstr "" -#: ../../../library/os.rst:4739 +#: ../../../library/os.rst:4761 msgid "" "Raises an :ref:`auditing event ` ``os.getxattr`` with arguments " "``path``, ``attribute``." msgstr "" -#: ../../../library/os.rst:4741 ../../../library/os.rst:4777 -#: ../../../library/os.rst:4802 +#: ../../../library/os.rst:4763 ../../../library/os.rst:4799 +#: ../../../library/os.rst:4824 msgid "Accepts a :term:`path-like object` for *path* and *attribute*." msgstr "" -#: ../../../library/os.rst:4747 +#: ../../../library/os.rst:4769 msgid "" "Return a list of the extended filesystem attributes on *path*. The " "attributes in the list are represented as strings decoded with the " @@ -4937,19 +4959,19 @@ msgid "" "the current directory." msgstr "" -#: ../../../library/os.rst:4755 +#: ../../../library/os.rst:4777 msgid "" "Raises an :ref:`auditing event ` ``os.listxattr`` with argument " "``path``." msgstr "" -#: ../../../library/os.rst:4760 +#: ../../../library/os.rst:4782 msgid "" "``os.listxattr(-1)`` now fails with ``OSError(errno.EBADF)`` rather than " "listing extended attributes of the current directory." msgstr "" -#: ../../../library/os.rst:4767 +#: ../../../library/os.rst:4789 msgid "" "Removes the extended filesystem attribute *attribute* from *path*. " "*attribute* should be bytes or str (directly or indirectly through the :" @@ -4957,13 +4979,13 @@ msgid "" "`filesystem encoding and error handler`." msgstr "" -#: ../../../library/os.rst:4775 +#: ../../../library/os.rst:4797 msgid "" "Raises an :ref:`auditing event ` ``os.removexattr`` with arguments " "``path``, ``attribute``." msgstr "" -#: ../../../library/os.rst:4783 +#: ../../../library/os.rst:4805 msgid "" "Set the extended filesystem attribute *attribute* on *path* to *value*. " "*attribute* must be a bytes or str with no embedded NULs (directly or " @@ -4975,45 +4997,45 @@ msgid "" "will not be created and ``EEXISTS`` will be raised." msgstr "" -#: ../../../library/os.rst:4797 +#: ../../../library/os.rst:4819 msgid "" "A bug in Linux kernel versions less than 2.6.39 caused the flags argument to " "be ignored on some filesystems." msgstr "" -#: ../../../library/os.rst:4800 +#: ../../../library/os.rst:4822 msgid "" "Raises an :ref:`auditing event ` ``os.setxattr`` with arguments " "``path``, ``attribute``, ``value``, ``flags``." msgstr "" -#: ../../../library/os.rst:4808 +#: ../../../library/os.rst:4830 msgid "" "The maximum size the value of an extended attribute can be. Currently, this " "is 64 KiB on Linux." msgstr "" -#: ../../../library/os.rst:4814 +#: ../../../library/os.rst:4836 msgid "" "This is a possible value for the flags argument in :func:`setxattr`. It " "indicates the operation must create an attribute." msgstr "" -#: ../../../library/os.rst:4820 +#: ../../../library/os.rst:4842 msgid "" "This is a possible value for the flags argument in :func:`setxattr`. It " "indicates the operation must replace an existing attribute." msgstr "" -#: ../../../library/os.rst:4827 +#: ../../../library/os.rst:4849 msgid "Process Management" msgstr "" -#: ../../../library/os.rst:4829 +#: ../../../library/os.rst:4851 msgid "These functions may be used to create and manage processes." msgstr "" -#: ../../../library/os.rst:4831 +#: ../../../library/os.rst:4853 msgid "" "The various :func:`exec\\* ` functions take a list of arguments for " "the new program loaded into the process. In each case, the first of these " @@ -5024,7 +5046,7 @@ msgid "" "standard output; ``foo`` will seem to be ignored." msgstr "" -#: ../../../library/os.rst:4842 +#: ../../../library/os.rst:4864 msgid "" "Generate a :const:`~signal.SIGABRT` signal to the current process. On Unix, " "the default behavior is to produce a core dump; on Windows, the process " @@ -5033,37 +5055,37 @@ msgid "" "`~signal.SIGABRT` with :func:`signal.signal`." msgstr "" -#: ../../../library/os.rst:4851 +#: ../../../library/os.rst:4873 msgid "Add a path to the DLL search path." msgstr "" -#: ../../../library/os.rst:4853 +#: ../../../library/os.rst:4875 msgid "" "This search path is used when resolving dependencies for imported extension " "modules (the module itself is resolved through :data:`sys.path`), and also " "by :mod:`ctypes`." msgstr "" -#: ../../../library/os.rst:4857 +#: ../../../library/os.rst:4879 msgid "" "Remove the directory by calling **close()** on the returned object or using " "it in a :keyword:`with` statement." msgstr "" -#: ../../../library/os.rst:4860 +#: ../../../library/os.rst:4882 msgid "" "See the `Microsoft documentation `_ for more information about how " "DLLs are loaded." msgstr "" -#: ../../../library/os.rst:4864 +#: ../../../library/os.rst:4886 msgid "" "Raises an :ref:`auditing event ` ``os.add_dll_directory`` with " "argument ``path``." msgstr "" -#: ../../../library/os.rst:4868 +#: ../../../library/os.rst:4890 msgid "" "Previous versions of CPython would resolve DLLs using the default behavior " "for the current process. This led to inconsistencies, such as only sometimes " @@ -5071,14 +5093,14 @@ msgid "" "such as ``AddDllDirectory`` having no effect." msgstr "" -#: ../../../library/os.rst:4875 +#: ../../../library/os.rst:4897 msgid "" "In 3.8, the two primary ways DLLs are loaded now explicitly override the " "process-wide behavior to ensure consistency. See the :ref:`porting notes " "` for information on updating libraries." msgstr "" -#: ../../../library/os.rst:4890 +#: ../../../library/os.rst:4912 msgid "" "These functions all execute a new program, replacing the current process; " "they do not return. On Unix, the new executable is loaded into the current " @@ -5086,7 +5108,7 @@ msgid "" "reported as :exc:`OSError` exceptions." msgstr "" -#: ../../../library/os.rst:4895 +#: ../../../library/os.rst:4917 msgid "" "The current process is replaced immediately. Open file objects and " "descriptors are not flushed, so if there may be data buffered on these open " @@ -5094,7 +5116,7 @@ msgid "" "fsync` before calling an :func:`exec\\* ` function." msgstr "" -#: ../../../library/os.rst:4901 +#: ../../../library/os.rst:4923 msgid "" "The \"l\" and \"v\" variants of the :func:`exec\\* ` functions differ " "in how command-line arguments are passed. The \"l\" variants are perhaps " @@ -5107,7 +5129,7 @@ msgid "" "is not enforced." msgstr "" -#: ../../../library/os.rst:4910 +#: ../../../library/os.rst:4932 msgid "" "The variants which include a \"p\" near the end (:func:`execlp`, :func:" "`execlpe`, :func:`execvp`, and :func:`execvpe`) will use the :envvar:`PATH` " @@ -5121,7 +5143,7 @@ msgid "" "even on Windows, as plain names will not be resolved." msgstr "" -#: ../../../library/os.rst:4921 +#: ../../../library/os.rst:4943 msgid "" "For :func:`execle`, :func:`execlpe`, :func:`execve`, and :func:`execvpe` " "(note that these all end in \"e\"), the *env* parameter must be a mapping " @@ -5131,7 +5153,7 @@ msgid "" "process to inherit the environment of the current process." msgstr "" -#: ../../../library/os.rst:4928 +#: ../../../library/os.rst:4950 msgid "" "For :func:`execve` on some platforms, *path* may also be specified as an " "open file descriptor. This functionality may not be supported on your " @@ -5140,31 +5162,31 @@ msgid "" "`NotImplementedError`." msgstr "" -#: ../../../library/os.rst:4933 +#: ../../../library/os.rst:4955 msgid "" "Raises an :ref:`auditing event ` ``os.exec`` with arguments " "``path``, ``args``, ``env``." msgstr "" -#: ../../../library/os.rst:4937 +#: ../../../library/os.rst:4959 msgid "" "Added support for specifying *path* as an open file descriptor for :func:" "`execve`." msgstr "" -#: ../../../library/os.rst:4946 +#: ../../../library/os.rst:4968 msgid "" "Exit the process with status *n*, without calling cleanup handlers, flushing " "stdio buffers, etc." msgstr "" -#: ../../../library/os.rst:4951 +#: ../../../library/os.rst:4973 msgid "" "The standard way to exit is :func:`sys.exit(n) `. :func:`!_exit` " "should normally only be used in the child process after a :func:`fork`." msgstr "" -#: ../../../library/os.rst:4954 +#: ../../../library/os.rst:4976 msgid "" "The following exit codes are defined and can be used with :func:`_exit`, " "although they are not required. These are typically used for system " @@ -5172,139 +5194,139 @@ msgid "" "delivery program." msgstr "" -#: ../../../library/os.rst:4960 +#: ../../../library/os.rst:4982 msgid "" "Some of these may not be available on all Unix platforms, since there is " "some variation. These constants are defined where they are defined by the " "underlying platform." msgstr "" -#: ../../../library/os.rst:4967 +#: ../../../library/os.rst:4989 msgid "" "Exit code that means no error occurred. May be taken from the defined value " "of ``EXIT_SUCCESS`` on some platforms. Generally has a value of zero." msgstr "" -#: ../../../library/os.rst:4975 +#: ../../../library/os.rst:4997 msgid "" "Exit code that means the command was used incorrectly, such as when the " "wrong number of arguments are given." msgstr "" -#: ../../../library/os.rst:4983 +#: ../../../library/os.rst:5005 msgid "Exit code that means the input data was incorrect." msgstr "" -#: ../../../library/os.rst:4990 +#: ../../../library/os.rst:5012 msgid "Exit code that means an input file did not exist or was not readable." msgstr "" -#: ../../../library/os.rst:4997 +#: ../../../library/os.rst:5019 msgid "Exit code that means a specified user did not exist." msgstr "" -#: ../../../library/os.rst:5004 +#: ../../../library/os.rst:5026 msgid "Exit code that means a specified host did not exist." msgstr "" -#: ../../../library/os.rst:5011 +#: ../../../library/os.rst:5033 msgid "Exit code that means that a required service is unavailable." msgstr "" -#: ../../../library/os.rst:5018 +#: ../../../library/os.rst:5040 msgid "Exit code that means an internal software error was detected." msgstr "" -#: ../../../library/os.rst:5025 +#: ../../../library/os.rst:5047 msgid "" "Exit code that means an operating system error was detected, such as the " "inability to fork or create a pipe." msgstr "" -#: ../../../library/os.rst:5033 +#: ../../../library/os.rst:5055 msgid "" "Exit code that means some system file did not exist, could not be opened, or " "had some other kind of error." msgstr "" -#: ../../../library/os.rst:5041 +#: ../../../library/os.rst:5063 msgid "Exit code that means a user specified output file could not be created." msgstr "" -#: ../../../library/os.rst:5048 +#: ../../../library/os.rst:5070 msgid "" "Exit code that means that an error occurred while doing I/O on some file." msgstr "" -#: ../../../library/os.rst:5055 +#: ../../../library/os.rst:5077 msgid "" "Exit code that means a temporary failure occurred. This indicates something " "that may not really be an error, such as a network connection that couldn't " "be made during a retryable operation." msgstr "" -#: ../../../library/os.rst:5064 +#: ../../../library/os.rst:5086 msgid "" "Exit code that means that a protocol exchange was illegal, invalid, or not " "understood." msgstr "" -#: ../../../library/os.rst:5072 +#: ../../../library/os.rst:5094 msgid "" "Exit code that means that there were insufficient permissions to perform the " "operation (but not intended for file system problems)." msgstr "" -#: ../../../library/os.rst:5080 +#: ../../../library/os.rst:5102 msgid "Exit code that means that some kind of configuration error occurred." msgstr "" -#: ../../../library/os.rst:5087 +#: ../../../library/os.rst:5109 msgid "Exit code that means something like \"an entry was not found\"." msgstr "" -#: ../../../library/os.rst:5094 +#: ../../../library/os.rst:5116 msgid "" "Fork a child process. Return ``0`` in the child and the child's process id " "in the parent. If an error occurs :exc:`OSError` is raised." msgstr "" -#: ../../../library/os.rst:5097 +#: ../../../library/os.rst:5119 msgid "" "Note that some platforms including FreeBSD <= 6.3 and Cygwin have known " "issues when using ``fork()`` from a thread." msgstr "" -#: ../../../library/os.rst:5100 +#: ../../../library/os.rst:5122 msgid "" "Raises an :ref:`auditing event ` ``os.fork`` with no arguments." msgstr "" -#: ../../../library/os.rst:5104 +#: ../../../library/os.rst:5126 msgid "" "If you use TLS sockets in an application calling ``fork()``, see the warning " "in the :mod:`ssl` documentation." msgstr "" -#: ../../../library/os.rst:5109 ../../../library/os.rst:5155 +#: ../../../library/os.rst:5131 ../../../library/os.rst:5177 msgid "" "On macOS the use of this function is unsafe when mixed with using higher-" "level system APIs, and that includes using :mod:`urllib.request`." msgstr "" -#: ../../../library/os.rst:5112 +#: ../../../library/os.rst:5134 msgid "" "Calling ``fork()`` in a subinterpreter is no longer supported (:exc:" "`RuntimeError` is raised)." msgstr "" -#: ../../../library/os.rst:5116 +#: ../../../library/os.rst:5138 msgid "" "If Python is able to detect that your process has multiple threads, :func:" "`os.fork` now raises a :exc:`DeprecationWarning`." msgstr "" -#: ../../../library/os.rst:5120 +#: ../../../library/os.rst:5142 msgid "" "We chose to surface this as a warning, when detectable, to better inform " "developers of a design problem that the POSIX platform specifically notes as " @@ -5315,21 +5337,21 @@ msgid "" "``free``)." msgstr "" -#: ../../../library/os.rst:5129 +#: ../../../library/os.rst:5151 msgid "" "Users of macOS or users of libc or malloc implementations other than those " "typically found in glibc to date are among those already more likely to " "experience deadlocks running such code." msgstr "" -#: ../../../library/os.rst:5133 +#: ../../../library/os.rst:5155 msgid "" "See `this discussion on fork being incompatible with threads `_ for technical details of why we're surfacing " "this longstanding platform compatibility problem to developers." msgstr "" -#: ../../../library/os.rst:5143 +#: ../../../library/os.rst:5165 msgid "" "Fork a child process, using a new pseudo-terminal as the child's controlling " "terminal. Return a pair of ``(pid, fd)``, where *pid* is ``0`` in the child, " @@ -5338,40 +5360,40 @@ msgid "" "the :mod:`pty` module. If an error occurs :exc:`OSError` is raised." msgstr "" -#: ../../../library/os.rst:5149 +#: ../../../library/os.rst:5171 msgid "" "The returned file descriptor *fd* is :ref:`non-inheritable `." msgstr "" -#: ../../../library/os.rst:5151 +#: ../../../library/os.rst:5173 msgid "" "Raises an :ref:`auditing event ` ``os.forkpty`` with no arguments." msgstr "" -#: ../../../library/os.rst:5158 +#: ../../../library/os.rst:5180 msgid "" "Calling ``forkpty()`` in a subinterpreter is no longer supported (:exc:" "`RuntimeError` is raised)." msgstr "" -#: ../../../library/os.rst:5162 +#: ../../../library/os.rst:5184 msgid "" "If Python is able to detect that your process has multiple threads, this now " "raises a :exc:`DeprecationWarning`. See the longer explanation on :func:`os." "fork`." msgstr "" -#: ../../../library/os.rst:5167 +#: ../../../library/os.rst:5189 msgid "The returned file descriptor is now made non-inheritable." msgstr "" -#: ../../../library/os.rst:5179 +#: ../../../library/os.rst:5201 msgid "" "Send signal *sig* to the process *pid*. Constants for the specific signals " "available on the host platform are defined in the :mod:`signal` module." msgstr "" -#: ../../../library/os.rst:5182 +#: ../../../library/os.rst:5204 msgid "" "Windows: The :const:`signal.CTRL_C_EVENT` and :const:`signal." "CTRL_BREAK_EVENT` signals are special signals which can only be sent to " @@ -5381,43 +5403,43 @@ msgid "" "be set to *sig*." msgstr "" -#: ../../../library/os.rst:5189 +#: ../../../library/os.rst:5211 msgid "See also :func:`signal.pthread_kill`." msgstr "" -#: ../../../library/os.rst:5191 +#: ../../../library/os.rst:5213 msgid "" "Raises an :ref:`auditing event ` ``os.kill`` with arguments " "``pid``, ``sig``." msgstr "" -#: ../../../library/os.rst:5205 +#: ../../../library/os.rst:5227 msgid "Send the signal *sig* to the process group *pgid*." msgstr "" -#: ../../../library/os.rst:5207 +#: ../../../library/os.rst:5229 msgid "" "Raises an :ref:`auditing event ` ``os.killpg`` with arguments " "``pgid``, ``sig``." msgstr "" -#: ../../../library/os.rst:5214 +#: ../../../library/os.rst:5236 msgid "" "Add *increment* to the process's \"niceness\". Return the new niceness." msgstr "" -#: ../../../library/os.rst:5221 +#: ../../../library/os.rst:5243 msgid "" "Return a file descriptor referring to the process *pid* with *flags* set. " "This descriptor can be used to perform process management without races and " "signals." msgstr "" -#: ../../../library/os.rst:5225 +#: ../../../library/os.rst:5247 msgid "See the :manpage:`pidfd_open(2)` man page for more details." msgstr "" -#: ../../../library/os.rst:5232 +#: ../../../library/os.rst:5254 msgid "" "This flag indicates that the file descriptor will be non-blocking. If the " "process referred to by the file descriptor has not yet terminated, then an " @@ -5425,28 +5447,28 @@ msgid "" "immediately return the error :const:`~errno.EAGAIN` rather than blocking." msgstr "" -#: ../../../library/os.rst:5242 +#: ../../../library/os.rst:5264 msgid "" "Duplicate *targetfd* from the process referred to by the process file " "descriptor *pidfd*, into the calling process. The returned file descriptor " "is :ref:`non-inheritable `." msgstr "" -#: ../../../library/os.rst:5246 +#: ../../../library/os.rst:5268 msgid "*flags* is reserved, and currently must be ``0``." msgstr "" -#: ../../../library/os.rst:5248 +#: ../../../library/os.rst:5270 msgid "See the :manpage:`pidfd_getfd(2)` man page for more details." msgstr "" -#: ../../../library/os.rst:5255 +#: ../../../library/os.rst:5277 msgid "" "Lock program segments into memory. The value of *op* (defined in ````) determines which segments are locked." msgstr "" -#: ../../../library/os.rst:5263 +#: ../../../library/os.rst:5285 msgid "" "Open a pipe to or from command *cmd*. The return value is an open file " "object connected to the pipe, which can be read or written depending on " @@ -5456,7 +5478,7 @@ msgid "" "rather than bytes." msgstr "" -#: ../../../library/os.rst:5271 +#: ../../../library/os.rst:5293 msgid "" "The ``close`` method returns :const:`None` if the subprocess exited " "successfully, or the subprocess's return code if there was an error. On " @@ -5468,61 +5490,61 @@ msgid "" "contains the signed integer return code from the child process." msgstr "" -#: ../../../library/os.rst:5281 +#: ../../../library/os.rst:5303 msgid "" "On Unix, :func:`waitstatus_to_exitcode` can be used to convert the ``close`` " "method result (exit status) into an exit code if it is not ``None``. On " "Windows, the ``close`` method result is directly the exit code (or ``None``)." msgstr "" -#: ../../../library/os.rst:5286 +#: ../../../library/os.rst:5308 msgid "" "This is implemented using :class:`subprocess.Popen`; see that class's " "documentation for more powerful ways to manage and communicate with " "subprocesses." msgstr "" -#: ../../../library/os.rst:5293 +#: ../../../library/os.rst:5315 msgid "" "The :ref:`Python UTF-8 Mode ` affects encodings used for *cmd* " "and pipe contents." msgstr "" -#: ../../../library/os.rst:5296 +#: ../../../library/os.rst:5318 msgid "" ":func:`popen` is a simple wrapper around :class:`subprocess.Popen`. Use :" "class:`subprocess.Popen` or :func:`subprocess.run` to control options like " "encodings." msgstr "" -#: ../../../library/os.rst:5300 ../../../library/os.rst:5529 +#: ../../../library/os.rst:5322 ../../../library/os.rst:5551 msgid "The :mod:`subprocess` module is recommended instead." msgstr "" -#: ../../../library/os.rst:5308 +#: ../../../library/os.rst:5330 msgid "Wraps the :c:func:`!posix_spawn` C library API for use from Python." msgstr "" -#: ../../../library/os.rst:5310 +#: ../../../library/os.rst:5332 msgid "" "Most users should use :func:`subprocess.run` instead of :func:`posix_spawn`." msgstr "" -#: ../../../library/os.rst:5312 +#: ../../../library/os.rst:5334 msgid "" "The positional-only arguments *path*, *args*, and *env* are similar to :func:" "`execve`. *env* is allowed to be ``None``, in which case current process' " "environment is used." msgstr "" -#: ../../../library/os.rst:5316 +#: ../../../library/os.rst:5338 msgid "" "The *path* parameter is the path to the executable file. The *path* should " "contain a directory. Use :func:`posix_spawnp` to pass an executable file " "without directory." msgstr "" -#: ../../../library/os.rst:5320 +#: ../../../library/os.rst:5342 msgid "" "The *file_actions* argument may be a sequence of tuples describing actions " "to take on specific file descriptors in the child process between the C " @@ -5531,39 +5553,39 @@ msgid "" "describing the remaining tuple elements:" msgstr "" -#: ../../../library/os.rst:5328 +#: ../../../library/os.rst:5350 msgid "(``os.POSIX_SPAWN_OPEN``, *fd*, *path*, *flags*, *mode*)" msgstr "" -#: ../../../library/os.rst:5330 +#: ../../../library/os.rst:5352 msgid "Performs ``os.dup2(os.open(path, flags, mode), fd)``." msgstr "" -#: ../../../library/os.rst:5334 +#: ../../../library/os.rst:5356 msgid "(``os.POSIX_SPAWN_CLOSE``, *fd*)" msgstr "" -#: ../../../library/os.rst:5336 +#: ../../../library/os.rst:5358 msgid "Performs ``os.close(fd)``." msgstr "" -#: ../../../library/os.rst:5340 +#: ../../../library/os.rst:5362 msgid "(``os.POSIX_SPAWN_DUP2``, *fd*, *new_fd*)" msgstr "" -#: ../../../library/os.rst:5342 +#: ../../../library/os.rst:5364 msgid "Performs ``os.dup2(fd, new_fd)``." msgstr "" -#: ../../../library/os.rst:5346 +#: ../../../library/os.rst:5368 msgid "(``os.POSIX_SPAWN_CLOSEFROM``, *fd*)" msgstr "" -#: ../../../library/os.rst:5348 +#: ../../../library/os.rst:5370 msgid "Performs ``os.closerange(fd, INF)``." msgstr "" -#: ../../../library/os.rst:5350 +#: ../../../library/os.rst:5372 msgid "" "These tuples correspond to the C library :c:func:`!" "posix_spawn_file_actions_addopen`, :c:func:`!" @@ -5573,7 +5595,7 @@ msgid "" "c:func:`!posix_spawn` call itself." msgstr "" -#: ../../../library/os.rst:5357 +#: ../../../library/os.rst:5379 msgid "" "The *setpgroup* argument will set the process group of the child to the " "value specified. If the value specified is 0, the child's process group ID " @@ -5582,7 +5604,7 @@ msgid "" "corresponds to the C library :c:macro:`!POSIX_SPAWN_SETPGROUP` flag." msgstr "" -#: ../../../library/os.rst:5363 +#: ../../../library/os.rst:5385 msgid "" "If the *resetids* argument is ``True`` it will reset the effective UID and " "GID of the child to the real UID and GID of the parent process. If the " @@ -5593,7 +5615,7 @@ msgid "" "library :c:macro:`!POSIX_SPAWN_RESETIDS` flag." msgstr "" -#: ../../../library/os.rst:5371 +#: ../../../library/os.rst:5393 msgid "" "If the *setsid* argument is ``True``, it will create a new session ID for " "``posix_spawn``. *setsid* requires :c:macro:`!POSIX_SPAWN_SETSID` or :c:" @@ -5601,7 +5623,7 @@ msgid "" "is raised." msgstr "" -#: ../../../library/os.rst:5376 +#: ../../../library/os.rst:5398 msgid "" "The *setsigmask* argument will set the signal mask to the signal set " "specified. If the parameter is not used, then the child inherits the " @@ -5609,14 +5631,14 @@ msgid "" "POSIX_SPAWN_SETSIGMASK` flag." msgstr "" -#: ../../../library/os.rst:5381 +#: ../../../library/os.rst:5403 msgid "" "The *sigdef* argument will reset the disposition of all signals in the set " "specified. This argument corresponds to the C library :c:macro:`!" "POSIX_SPAWN_SETSIGDEF` flag." msgstr "" -#: ../../../library/os.rst:5385 +#: ../../../library/os.rst:5407 msgid "" "The *scheduler* argument must be a tuple containing the (optional) scheduler " "policy and an instance of :class:`sched_param` with the scheduler " @@ -5626,85 +5648,85 @@ msgid "" "POSIX_SPAWN_SETSCHEDULER` flags." msgstr "" -#: ../../../library/os.rst:5392 ../../../library/os.rst:5413 +#: ../../../library/os.rst:5414 ../../../library/os.rst:5435 msgid "" "Raises an :ref:`auditing event ` ``os.posix_spawn`` with arguments " "``path``, ``argv``, ``env``." msgstr "" -#: ../../../library/os.rst:5396 +#: ../../../library/os.rst:5418 msgid "" "*env* parameter accepts ``None``. ``os.POSIX_SPAWN_CLOSEFROM`` is available " "on platforms where :c:func:`!posix_spawn_file_actions_addclosefrom_np` " "exists." msgstr "" -#: ../../../library/os.rst:5407 +#: ../../../library/os.rst:5429 msgid "Wraps the :c:func:`!posix_spawnp` C library API for use from Python." msgstr "" -#: ../../../library/os.rst:5409 +#: ../../../library/os.rst:5431 msgid "" "Similar to :func:`posix_spawn` except that the system searches for the " "*executable* file in the list of directories specified by the :envvar:`PATH` " "environment variable (in the same way as for ``execvp(3)``)." msgstr "" -#: ../../../library/os.rst:5419 +#: ../../../library/os.rst:5441 msgid "See :func:`posix_spawn` documentation." msgstr "" -#: ../../../library/os.rst:5425 +#: ../../../library/os.rst:5447 msgid "" "Register callables to be executed when a new child process is forked using :" "func:`os.fork` or similar process cloning APIs. The parameters are optional " "and keyword-only. Each specifies a different call point." msgstr "" -#: ../../../library/os.rst:5430 +#: ../../../library/os.rst:5452 msgid "*before* is a function called before forking a child process." msgstr "" -#: ../../../library/os.rst:5431 +#: ../../../library/os.rst:5453 msgid "" "*after_in_parent* is a function called from the parent process after forking " "a child process." msgstr "" -#: ../../../library/os.rst:5433 +#: ../../../library/os.rst:5455 msgid "*after_in_child* is a function called from the child process." msgstr "" -#: ../../../library/os.rst:5435 +#: ../../../library/os.rst:5457 msgid "" "These calls are only made if control is expected to return to the Python " "interpreter. A typical :mod:`subprocess` launch will not trigger them as " "the child is not going to re-enter the interpreter." msgstr "" -#: ../../../library/os.rst:5439 +#: ../../../library/os.rst:5461 msgid "" "Functions registered for execution before forking are called in reverse " "registration order. Functions registered for execution after forking " "(either in the parent or in the child) are called in registration order." msgstr "" -#: ../../../library/os.rst:5444 +#: ../../../library/os.rst:5466 msgid "" "Note that :c:func:`fork` calls made by third-party C code may not call those " "functions, unless it explicitly calls :c:func:`PyOS_BeforeFork`, :c:func:" "`PyOS_AfterFork_Parent` and :c:func:`PyOS_AfterFork_Child`." msgstr "" -#: ../../../library/os.rst:5448 +#: ../../../library/os.rst:5470 msgid "There is no way to unregister a function." msgstr "" -#: ../../../library/os.rst:5464 +#: ../../../library/os.rst:5486 msgid "Execute the program *path* in a new process." msgstr "" -#: ../../../library/os.rst:5466 +#: ../../../library/os.rst:5488 msgid "" "(Note that the :mod:`subprocess` module provides more powerful facilities " "for spawning new processes and retrieving their results; using that module " @@ -5712,7 +5734,7 @@ msgid "" "`subprocess-replacements` section.)" msgstr "" -#: ../../../library/os.rst:5471 +#: ../../../library/os.rst:5493 msgid "" "If *mode* is :const:`P_NOWAIT`, this function returns the process id of the " "new process; if *mode* is :const:`P_WAIT`, returns the process's exit code " @@ -5721,13 +5743,13 @@ msgid "" "handle, so can be used with the :func:`waitpid` function." msgstr "" -#: ../../../library/os.rst:5477 +#: ../../../library/os.rst:5499 msgid "" "Note on VxWorks, this function doesn't return ``-signal`` when the new " "process is killed. Instead it raises OSError exception." msgstr "" -#: ../../../library/os.rst:5480 +#: ../../../library/os.rst:5502 msgid "" "The \"l\" and \"v\" variants of the :func:`spawn\\* ` functions " "differ in how command-line arguments are passed. The \"l\" variants are " @@ -5739,7 +5761,7 @@ msgid "" "to the child process must start with the name of the command being run." msgstr "" -#: ../../../library/os.rst:5489 +#: ../../../library/os.rst:5511 msgid "" "The variants which include a second \"p\" near the end (:func:`spawnlp`, :" "func:`spawnlpe`, :func:`spawnvp`, and :func:`spawnvpe`) will use the :envvar:" @@ -5752,7 +5774,7 @@ msgid "" "appropriate absolute or relative path." msgstr "" -#: ../../../library/os.rst:5499 +#: ../../../library/os.rst:5521 msgid "" "For :func:`spawnle`, :func:`spawnlpe`, :func:`spawnve`, and :func:`spawnvpe` " "(note that these all end in \"e\"), the *env* parameter must be a mapping " @@ -5764,19 +5786,19 @@ msgid "" "values will cause the function to fail, with a return value of ``127``." msgstr "" -#: ../../../library/os.rst:5508 +#: ../../../library/os.rst:5530 msgid "" "As an example, the following calls to :func:`spawnlp` and :func:`spawnvpe` " "are equivalent::" msgstr "" -#: ../../../library/os.rst:5517 +#: ../../../library/os.rst:5539 msgid "" "Raises an :ref:`auditing event ` ``os.spawn`` with arguments " "``mode``, ``path``, ``args``, ``env``." msgstr "" -#: ../../../library/os.rst:5521 +#: ../../../library/os.rst:5543 msgid "" ":func:`spawnlp`, :func:`spawnlpe`, :func:`spawnvp` and :func:`spawnvpe` are " "not available on Windows. :func:`spawnle` and :func:`spawnve` are not " @@ -5784,7 +5806,7 @@ msgid "" "instead." msgstr "" -#: ../../../library/os.rst:5536 +#: ../../../library/os.rst:5558 msgid "" "Possible values for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. If either of these values is given, the :func:" @@ -5792,7 +5814,7 @@ msgid "" "been created, with the process id as the return value." msgstr "" -#: ../../../library/os.rst:5546 +#: ../../../library/os.rst:5568 msgid "" "Possible value for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. If this is given as *mode*, the :func:`spawn\\* " @@ -5801,7 +5823,7 @@ msgid "" "successful, or ``-signal`` if a signal kills the process." msgstr "" -#: ../../../library/os.rst:5558 +#: ../../../library/os.rst:5580 msgid "" "Possible values for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. These are less portable than those listed above. :" @@ -5811,11 +5833,11 @@ msgid "" "function will not return." msgstr "" -#: ../../../library/os.rst:5569 +#: ../../../library/os.rst:5591 msgid "Start a file with its associated application." msgstr "" -#: ../../../library/os.rst:5571 +#: ../../../library/os.rst:5593 msgid "" "When *operation* is not specified, this acts like double-clicking the file " "in Windows Explorer, or giving the file name as an argument to the :program:" @@ -5823,7 +5845,7 @@ msgid "" "whatever application (if any) its extension is associated." msgstr "" -#: ../../../library/os.rst:5576 +#: ../../../library/os.rst:5598 msgid "" "When another *operation* is given, it must be a \"command verb\" that " "specifies what should be done with the file. Common verbs documented by " @@ -5831,28 +5853,28 @@ msgid "" "as well as ``'explore'`` and ``'find'`` (to be used on directories)." msgstr "" -#: ../../../library/os.rst:5581 +#: ../../../library/os.rst:5603 msgid "" "When launching an application, specify *arguments* to be passed as a single " "string. This argument may have no effect when using this function to launch " "a document." msgstr "" -#: ../../../library/os.rst:5585 +#: ../../../library/os.rst:5607 msgid "" "The default working directory is inherited, but may be overridden by the " "*cwd* argument. This should be an absolute path. A relative *path* will be " "resolved against this argument." msgstr "" -#: ../../../library/os.rst:5589 +#: ../../../library/os.rst:5611 msgid "" "Use *show_cmd* to override the default window style. Whether this has any " "effect will depend on the application being launched. Values are integers as " "supported by the Win32 :c:func:`!ShellExecute` function." msgstr "" -#: ../../../library/os.rst:5593 +#: ../../../library/os.rst:5615 msgid "" ":func:`startfile` returns as soon as the associated application is launched. " "There is no option to wait for the application to close, and no way to " @@ -5863,32 +5885,32 @@ msgid "" "encoded for Win32." msgstr "" -#: ../../../library/os.rst:5601 +#: ../../../library/os.rst:5623 msgid "" "To reduce interpreter startup overhead, the Win32 :c:func:`!ShellExecute` " "function is not resolved until this function is first called. If the " "function cannot be resolved, :exc:`NotImplementedError` will be raised." msgstr "" -#: ../../../library/os.rst:5605 +#: ../../../library/os.rst:5627 msgid "" "Raises an :ref:`auditing event ` ``os.startfile`` with arguments " "``path``, ``operation``." msgstr "" -#: ../../../library/os.rst:5607 +#: ../../../library/os.rst:5629 msgid "" "Raises an :ref:`auditing event ` ``os.startfile/2`` with arguments " "``path``, ``operation``, ``arguments``, ``cwd``, ``show_cmd``." msgstr "" -#: ../../../library/os.rst:5611 +#: ../../../library/os.rst:5633 msgid "" "Added the *arguments*, *cwd* and *show_cmd* arguments, and the ``os." "startfile/2`` audit event." msgstr "" -#: ../../../library/os.rst:5618 +#: ../../../library/os.rst:5640 msgid "" "Execute the command (a string) in a subshell. This is implemented by " "calling the Standard C function :c:func:`system`, and has the same " @@ -5899,13 +5921,13 @@ msgid "" "value of the Python function is system-dependent." msgstr "" -#: ../../../library/os.rst:5626 +#: ../../../library/os.rst:5648 msgid "" "On Unix, the return value is the exit status of the process encoded in the " "format specified for :func:`wait`." msgstr "" -#: ../../../library/os.rst:5629 +#: ../../../library/os.rst:5651 msgid "" "On Windows, the return value is that returned by the system shell after " "running *command*. The shell is given by the Windows environment variable :" @@ -5914,7 +5936,7 @@ msgid "" "shell documentation." msgstr "" -#: ../../../library/os.rst:5635 +#: ../../../library/os.rst:5657 msgid "" "The :mod:`subprocess` module provides more powerful facilities for spawning " "new processes and retrieving their results; using that module is recommended " @@ -5922,53 +5944,53 @@ msgid "" "the :mod:`subprocess` documentation for some helpful recipes." msgstr "" -#: ../../../library/os.rst:5640 +#: ../../../library/os.rst:5662 msgid "" "On Unix, :func:`waitstatus_to_exitcode` can be used to convert the result " "(exit status) into an exit code. On Windows, the result is directly the exit " "code." msgstr "" -#: ../../../library/os.rst:5644 +#: ../../../library/os.rst:5666 msgid "" "Raises an :ref:`auditing event ` ``os.system`` with argument " "``command``." msgstr "" -#: ../../../library/os.rst:5651 +#: ../../../library/os.rst:5673 msgid "" "Returns the current global process times. The return value is an object with " "five attributes:" msgstr "" -#: ../../../library/os.rst:5654 +#: ../../../library/os.rst:5676 msgid ":attr:`!user` - user time" msgstr "" -#: ../../../library/os.rst:5655 +#: ../../../library/os.rst:5677 msgid ":attr:`!system` - system time" msgstr "" -#: ../../../library/os.rst:5656 +#: ../../../library/os.rst:5678 msgid ":attr:`!children_user` - user time of all child processes" msgstr "" -#: ../../../library/os.rst:5657 +#: ../../../library/os.rst:5679 msgid ":attr:`!children_system` - system time of all child processes" msgstr "" -#: ../../../library/os.rst:5658 +#: ../../../library/os.rst:5680 msgid ":attr:`!elapsed` - elapsed real time since a fixed point in the past" msgstr "" -#: ../../../library/os.rst:5660 +#: ../../../library/os.rst:5682 msgid "" "For backwards compatibility, this object also behaves like a five-tuple " "containing :attr:`!user`, :attr:`!system`, :attr:`!children_user`, :attr:`!" "children_system`, and :attr:`!elapsed` in that order." msgstr "" -#: ../../../library/os.rst:5664 +#: ../../../library/os.rst:5686 msgid "" "See the Unix manual page :manpage:`times(2)` and `times(3) `_ manual page on Unix or `the " @@ -5978,7 +6000,7 @@ msgid "" "attributes are zero." msgstr "" -#: ../../../library/os.rst:5678 +#: ../../../library/os.rst:5700 msgid "" "Wait for completion of a child process, and return a tuple containing its " "pid and exit status indication: a 16-bit number, whose low byte is the " @@ -5987,87 +6009,87 @@ msgid "" "if a core file was produced." msgstr "" -#: ../../../library/os.rst:5684 +#: ../../../library/os.rst:5706 msgid "" "If there are no children that could be waited for, :exc:`ChildProcessError` " "is raised." msgstr "" -#: ../../../library/os.rst:5687 ../../../library/os.rst:5762 +#: ../../../library/os.rst:5709 ../../../library/os.rst:5784 msgid "" ":func:`waitstatus_to_exitcode` can be used to convert the exit status into " "an exit code." msgstr "" -#: ../../../library/os.rst:5694 +#: ../../../library/os.rst:5716 msgid "" "The other :func:`!wait*` functions documented below can be used to wait for " "the completion of a specific child process and have more options. :func:" "`waitpid` is the only one also available on Windows." msgstr "" -#: ../../../library/os.rst:5701 +#: ../../../library/os.rst:5723 msgid "Wait for the completion of a child process." msgstr "" -#: ../../../library/os.rst:5703 +#: ../../../library/os.rst:5725 msgid "" "*idtype* can be :data:`P_PID`, :data:`P_PGID`, :data:`P_ALL`, or (on Linux) :" "data:`P_PIDFD`. The interpretation of *id* depends on it; see their " "individual descriptions." msgstr "" -#: ../../../library/os.rst:5706 +#: ../../../library/os.rst:5728 msgid "" "*options* is an OR combination of flags. At least one of :data:`WEXITED`, :" "data:`WSTOPPED` or :data:`WCONTINUED` is required; :data:`WNOHANG` and :data:" "`WNOWAIT` are additional optional flags." msgstr "" -#: ../../../library/os.rst:5710 +#: ../../../library/os.rst:5732 msgid "" "The return value is an object representing the data contained in the :c:type:" "`siginfo_t` structure with the following attributes:" msgstr "" -#: ../../../library/os.rst:5713 +#: ../../../library/os.rst:5735 msgid ":attr:`!si_pid` (process ID)" msgstr "" -#: ../../../library/os.rst:5714 +#: ../../../library/os.rst:5736 msgid ":attr:`!si_uid` (real user ID of the child)" msgstr "" -#: ../../../library/os.rst:5715 +#: ../../../library/os.rst:5737 msgid ":attr:`!si_signo` (always :const:`~signal.SIGCHLD`)" msgstr "" -#: ../../../library/os.rst:5716 +#: ../../../library/os.rst:5738 msgid "" ":attr:`!si_status` (the exit status or signal number, depending on :attr:`!" "si_code`)" msgstr "" -#: ../../../library/os.rst:5717 +#: ../../../library/os.rst:5739 msgid ":attr:`!si_code` (see :data:`CLD_EXITED` for possible values)" msgstr "" -#: ../../../library/os.rst:5719 +#: ../../../library/os.rst:5741 msgid "" "If :data:`WNOHANG` is specified and there are no matching children in the " "requested state, ``None`` is returned. Otherwise, if there are no matching " "children that could be waited for, :exc:`ChildProcessError` is raised." msgstr "" -#: ../../../library/os.rst:5728 +#: ../../../library/os.rst:5750 msgid "This function is now available on macOS as well." msgstr "" -#: ../../../library/os.rst:5734 +#: ../../../library/os.rst:5756 msgid "The details of this function differ on Unix and Windows." msgstr "" -#: ../../../library/os.rst:5736 +#: ../../../library/os.rst:5758 msgid "" "On Unix: Wait for completion of a child process given by process id *pid*, " "and return a tuple containing its process id and exit status indication " @@ -6076,7 +6098,7 @@ msgid "" "operation." msgstr "" -#: ../../../library/os.rst:5741 +#: ../../../library/os.rst:5763 msgid "" "If *pid* is greater than ``0``, :func:`waitpid` requests status information " "for that specific process. If *pid* is ``0``, the request is for the status " @@ -6086,7 +6108,7 @@ msgid "" "group ``-pid`` (the absolute value of *pid*)." msgstr "" -#: ../../../library/os.rst:5748 +#: ../../../library/os.rst:5770 msgid "" "*options* is an OR combination of flags. If it contains :data:`WNOHANG` and " "there are no matching children in the requested state, ``(0, 0)`` is " @@ -6095,7 +6117,7 @@ msgid "" "are :data:`WUNTRACED` and :data:`WCONTINUED`." msgstr "" -#: ../../../library/os.rst:5754 +#: ../../../library/os.rst:5776 msgid "" "On Windows: Wait for completion of a process given by process handle *pid*, " "and return a tuple containing *pid*, and its exit status shifted left by 8 " @@ -6107,7 +6129,7 @@ msgid "" "process handles." msgstr "" -#: ../../../library/os.rst:5775 +#: ../../../library/os.rst:5797 msgid "" "Similar to :func:`waitpid`, except no process id argument is given and a 3-" "element tuple containing the child's process id, exit status indication, and " @@ -6116,13 +6138,13 @@ msgid "" "same as that provided to :func:`waitpid` and :func:`wait4`." msgstr "" -#: ../../../library/os.rst:5782 ../../../library/os.rst:5796 +#: ../../../library/os.rst:5804 ../../../library/os.rst:5818 msgid "" ":func:`waitstatus_to_exitcode` can be used to convert the exit status into " "an exitcode." msgstr "" -#: ../../../library/os.rst:5790 +#: ../../../library/os.rst:5812 msgid "" "Similar to :func:`waitpid`, except a 3-element tuple, containing the child's " "process id, exit status indication, and resource usage information is " @@ -6131,118 +6153,118 @@ msgid "" "to :func:`waitpid`." msgstr "" -#: ../../../library/os.rst:5807 +#: ../../../library/os.rst:5829 msgid "" "These are the possible values for *idtype* in :func:`waitid`. They affect " "how *id* is interpreted:" msgstr "" -#: ../../../library/os.rst:5810 +#: ../../../library/os.rst:5832 msgid ":data:`!P_PID` - wait for the child whose PID is *id*." msgstr "" -#: ../../../library/os.rst:5811 +#: ../../../library/os.rst:5833 msgid ":data:`!P_PGID` - wait for any child whose progress group ID is *id*." msgstr "" -#: ../../../library/os.rst:5812 +#: ../../../library/os.rst:5834 msgid ":data:`!P_ALL` - wait for any child; *id* is ignored." msgstr "" -#: ../../../library/os.rst:5813 +#: ../../../library/os.rst:5835 msgid "" ":data:`!P_PIDFD` - wait for the child identified by the file descriptor *id* " "(a process file descriptor created with :func:`pidfd_open`)." msgstr "" -#: ../../../library/os.rst:5818 +#: ../../../library/os.rst:5840 msgid ":data:`!P_PIDFD` is only available on Linux >= 5.4." msgstr "" -#: ../../../library/os.rst:5821 +#: ../../../library/os.rst:5843 msgid "The :data:`!P_PIDFD` constant." msgstr "" -#: ../../../library/os.rst:5827 +#: ../../../library/os.rst:5849 msgid "" "This *options* flag for :func:`waitpid`, :func:`wait3`, :func:`wait4`, and :" "func:`waitid` causes child processes to be reported if they have been " "continued from a job control stop since they were last reported." msgstr "" -#: ../../../library/os.rst:5836 +#: ../../../library/os.rst:5858 msgid "" "This *options* flag for :func:`waitid` causes child processes that have " "terminated to be reported." msgstr "" -#: ../../../library/os.rst:5839 +#: ../../../library/os.rst:5861 msgid "" "The other ``wait*`` functions always report children that have terminated, " "so this option is not available for them." msgstr "" -#: ../../../library/os.rst:5849 +#: ../../../library/os.rst:5871 msgid "" "This *options* flag for :func:`waitid` causes child processes that have been " "stopped by the delivery of a signal to be reported." msgstr "" -#: ../../../library/os.rst:5852 ../../../library/os.rst:5884 +#: ../../../library/os.rst:5874 ../../../library/os.rst:5906 msgid "This option is not available for the other ``wait*`` functions." msgstr "" -#: ../../../library/os.rst:5861 +#: ../../../library/os.rst:5883 msgid "" "This *options* flag for :func:`waitpid`, :func:`wait3`, and :func:`wait4` " "causes child processes to also be reported if they have been stopped but " "their current state has not been reported since they were stopped." msgstr "" -#: ../../../library/os.rst:5865 +#: ../../../library/os.rst:5887 msgid "This option is not available for :func:`waitid`." msgstr "" -#: ../../../library/os.rst:5872 +#: ../../../library/os.rst:5894 msgid "" "This *options* flag causes :func:`waitpid`, :func:`wait3`, :func:`wait4`, " "and :func:`waitid` to return right away if no child process status is " "available immediately." msgstr "" -#: ../../../library/os.rst:5881 +#: ../../../library/os.rst:5903 msgid "" "This *options* flag causes :func:`waitid` to leave the child in a waitable " "state, so that a later :func:`!wait*` call can be used to retrieve the child " "status information again." msgstr "" -#: ../../../library/os.rst:5896 +#: ../../../library/os.rst:5918 msgid "" "These are the possible values for :attr:`!si_code` in the result returned " "by :func:`waitid`." msgstr "" -#: ../../../library/os.rst:5903 +#: ../../../library/os.rst:5925 msgid "Added :data:`CLD_KILLED` and :data:`CLD_STOPPED` values." msgstr "" -#: ../../../library/os.rst:5909 +#: ../../../library/os.rst:5931 msgid "Convert a wait status to an exit code." msgstr "" -#: ../../../library/os.rst:5911 +#: ../../../library/os.rst:5933 msgid "On Unix:" msgstr "" -#: ../../../library/os.rst:5913 +#: ../../../library/os.rst:5935 msgid "" "If the process exited normally (if ``WIFEXITED(status)`` is true), return " "the process exit status (return ``WEXITSTATUS(status)``): result greater " "than or equal to 0." msgstr "" -#: ../../../library/os.rst:5916 +#: ../../../library/os.rst:5938 msgid "" "If the process was terminated by a signal (if ``WIFSIGNALED(status)`` is " "true), return ``-signum`` where *signum* is the number of the signal that " @@ -6250,15 +6272,15 @@ msgid "" "than 0." msgstr "" -#: ../../../library/os.rst:5920 +#: ../../../library/os.rst:5942 msgid "Otherwise, raise a :exc:`ValueError`." msgstr "" -#: ../../../library/os.rst:5922 +#: ../../../library/os.rst:5944 msgid "On Windows, return *status* shifted right by 8 bits." msgstr "" -#: ../../../library/os.rst:5924 +#: ../../../library/os.rst:5946 msgid "" "On Unix, if the process is being traced or if :func:`waitpid` was called " "with :data:`WUNTRACED` option, the caller must first check if " @@ -6266,234 +6288,234 @@ msgid "" "``WIFSTOPPED(status)`` is true." msgstr "" -#: ../../../library/os.rst:5931 +#: ../../../library/os.rst:5953 msgid "" ":func:`WIFEXITED`, :func:`WEXITSTATUS`, :func:`WIFSIGNALED`, :func:" "`WTERMSIG`, :func:`WIFSTOPPED`, :func:`WSTOPSIG` functions." msgstr "" -#: ../../../library/os.rst:5939 +#: ../../../library/os.rst:5961 msgid "" "The following functions take a process status code as returned by :func:" "`system`, :func:`wait`, or :func:`waitpid` as a parameter. They may be used " "to determine the disposition of a process." msgstr "" -#: ../../../library/os.rst:5945 +#: ../../../library/os.rst:5967 msgid "" "Return ``True`` if a core dump was generated for the process, otherwise " "return ``False``." msgstr "" -#: ../../../library/os.rst:5948 ../../../library/os.rst:6014 +#: ../../../library/os.rst:5970 ../../../library/os.rst:6036 msgid "This function should be employed only if :func:`WIFSIGNALED` is true." msgstr "" -#: ../../../library/os.rst:5955 +#: ../../../library/os.rst:5977 msgid "" "Return ``True`` if a stopped child has been resumed by delivery of :const:" "`~signal.SIGCONT` (if the process has been continued from a job control " "stop), otherwise return ``False``." msgstr "" -#: ../../../library/os.rst:5959 +#: ../../../library/os.rst:5981 msgid "See :data:`WCONTINUED` option." msgstr "" -#: ../../../library/os.rst:5966 +#: ../../../library/os.rst:5988 msgid "" "Return ``True`` if the process was stopped by delivery of a signal, " "otherwise return ``False``." msgstr "" -#: ../../../library/os.rst:5969 +#: ../../../library/os.rst:5991 msgid "" ":func:`WIFSTOPPED` only returns ``True`` if the :func:`waitpid` call was " "done using :data:`WUNTRACED` option or when the process is being traced " "(see :manpage:`ptrace(2)`)." msgstr "" -#: ../../../library/os.rst:5977 +#: ../../../library/os.rst:5999 msgid "" "Return ``True`` if the process was terminated by a signal, otherwise return " "``False``." msgstr "" -#: ../../../library/os.rst:5985 +#: ../../../library/os.rst:6007 msgid "" "Return ``True`` if the process exited terminated normally, that is, by " "calling ``exit()`` or ``_exit()``, or by returning from ``main()``; " "otherwise return ``False``." msgstr "" -#: ../../../library/os.rst:5994 +#: ../../../library/os.rst:6016 msgid "Return the process exit status." msgstr "" -#: ../../../library/os.rst:5996 +#: ../../../library/os.rst:6018 msgid "This function should be employed only if :func:`WIFEXITED` is true." msgstr "" -#: ../../../library/os.rst:6003 +#: ../../../library/os.rst:6025 msgid "Return the signal which caused the process to stop." msgstr "" -#: ../../../library/os.rst:6005 +#: ../../../library/os.rst:6027 msgid "This function should be employed only if :func:`WIFSTOPPED` is true." msgstr "" -#: ../../../library/os.rst:6012 +#: ../../../library/os.rst:6034 msgid "Return the number of the signal that caused the process to terminate." msgstr "" -#: ../../../library/os.rst:6020 +#: ../../../library/os.rst:6042 msgid "Interface to the scheduler" msgstr "" -#: ../../../library/os.rst:6022 +#: ../../../library/os.rst:6044 msgid "" "These functions control how a process is allocated CPU time by the operating " "system. They are only available on some Unix platforms. For more detailed " "information, consult your Unix manpages." msgstr "" -#: ../../../library/os.rst:6028 +#: ../../../library/os.rst:6050 msgid "" "The following scheduling policies are exposed if they are supported by the " "operating system." msgstr "" -#: ../../../library/os.rst:6035 +#: ../../../library/os.rst:6057 msgid "The default scheduling policy." msgstr "" -#: ../../../library/os.rst:6039 +#: ../../../library/os.rst:6061 msgid "" "Scheduling policy for CPU-intensive processes that tries to preserve " "interactivity on the rest of the computer." msgstr "" -#: ../../../library/os.rst:6044 +#: ../../../library/os.rst:6066 msgid "Scheduling policy for tasks with deadline constraints." msgstr "" -#: ../../../library/os.rst:6050 +#: ../../../library/os.rst:6072 msgid "Scheduling policy for extremely low priority background tasks." msgstr "" -#: ../../../library/os.rst:6054 +#: ../../../library/os.rst:6076 msgid "Alias for :data:`SCHED_OTHER`." msgstr "" -#: ../../../library/os.rst:6060 +#: ../../../library/os.rst:6082 msgid "Scheduling policy for sporadic server programs." msgstr "" -#: ../../../library/os.rst:6064 +#: ../../../library/os.rst:6086 msgid "A First In First Out scheduling policy." msgstr "" -#: ../../../library/os.rst:6068 +#: ../../../library/os.rst:6090 msgid "A round-robin scheduling policy." msgstr "" -#: ../../../library/os.rst:6072 +#: ../../../library/os.rst:6094 msgid "" "This flag can be OR'ed with any other scheduling policy. When a process with " "this flag set forks, its child's scheduling policy and priority are reset to " "the default." msgstr "" -#: ../../../library/os.rst:6079 +#: ../../../library/os.rst:6101 msgid "" "This class represents tunable scheduling parameters used in :func:" "`sched_setparam`, :func:`sched_setscheduler`, and :func:`sched_getparam`. It " "is immutable." msgstr "" -#: ../../../library/os.rst:6083 +#: ../../../library/os.rst:6105 msgid "At the moment, there is only one possible parameter:" msgstr "" -#: ../../../library/os.rst:6087 +#: ../../../library/os.rst:6109 msgid "The scheduling priority for a scheduling policy." msgstr "" -#: ../../../library/os.rst:6092 +#: ../../../library/os.rst:6114 msgid "" "Get the minimum priority value for *policy*. *policy* is one of the " "scheduling policy constants above." msgstr "" -#: ../../../library/os.rst:6098 +#: ../../../library/os.rst:6120 msgid "" "Get the maximum priority value for *policy*. *policy* is one of the " "scheduling policy constants above." msgstr "" -#: ../../../library/os.rst:6104 +#: ../../../library/os.rst:6126 msgid "" "Set the scheduling policy for the process with PID *pid*. A *pid* of 0 means " "the calling process. *policy* is one of the scheduling policy constants " "above. *param* is a :class:`sched_param` instance." msgstr "" -#: ../../../library/os.rst:6111 +#: ../../../library/os.rst:6133 msgid "" "Return the scheduling policy for the process with PID *pid*. A *pid* of 0 " "means the calling process. The result is one of the scheduling policy " "constants above." msgstr "" -#: ../../../library/os.rst:6118 +#: ../../../library/os.rst:6140 msgid "" "Set the scheduling parameters for the process with PID *pid*. A *pid* of 0 " "means the calling process. *param* is a :class:`sched_param` instance." msgstr "" -#: ../../../library/os.rst:6124 +#: ../../../library/os.rst:6146 msgid "" "Return the scheduling parameters as a :class:`sched_param` instance for the " "process with PID *pid*. A *pid* of 0 means the calling process." msgstr "" -#: ../../../library/os.rst:6130 +#: ../../../library/os.rst:6152 msgid "" "Return the round-robin quantum in seconds for the process with PID *pid*. A " "*pid* of 0 means the calling process." msgstr "" -#: ../../../library/os.rst:6136 +#: ../../../library/os.rst:6158 msgid "" "Voluntarily relinquish the CPU. See :manpage:`sched_yield(2)` for details." msgstr "" -#: ../../../library/os.rst:6141 +#: ../../../library/os.rst:6163 msgid "" "Restrict the process with PID *pid* (or the current process if zero) to a " "set of CPUs. *mask* is an iterable of integers representing the set of CPUs " "to which the process should be restricted." msgstr "" -#: ../../../library/os.rst:6148 +#: ../../../library/os.rst:6170 msgid "Return the set of CPUs the process with PID *pid* is restricted to." msgstr "" -#: ../../../library/os.rst:6150 +#: ../../../library/os.rst:6172 msgid "" "If *pid* is zero, return the set of CPUs the calling thread of the current " "process is restricted to." msgstr "" -#: ../../../library/os.rst:6153 +#: ../../../library/os.rst:6175 msgid "See also the :func:`process_cpu_count` function." msgstr "" -#: ../../../library/os.rst:6159 +#: ../../../library/os.rst:6181 msgid "Miscellaneous System Information" msgstr "" -#: ../../../library/os.rst:6164 +#: ../../../library/os.rst:6186 msgid "" "Return string-valued system configuration values. *name* specifies the " "configuration value to retrieve; it may be a string which is the name of a " @@ -6504,13 +6526,13 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: ../../../library/os.rst:6172 +#: ../../../library/os.rst:6194 msgid "" "If the configuration value specified by *name* isn't defined, ``None`` is " "returned." msgstr "" -#: ../../../library/os.rst:6175 +#: ../../../library/os.rst:6197 msgid "" "If *name* is a string and is not known, :exc:`ValueError` is raised. If a " "specific value for *name* is not supported by the host system, even if it is " @@ -6518,62 +6540,62 @@ msgid "" "`errno.EINVAL` for the error number." msgstr "" -#: ../../../library/os.rst:6185 +#: ../../../library/os.rst:6207 msgid "" "Dictionary mapping names accepted by :func:`confstr` to the integer values " "defined for those names by the host operating system. This can be used to " "determine the set of names known to the system." msgstr "" -#: ../../../library/os.rst:6194 +#: ../../../library/os.rst:6216 msgid "" "Return the number of logical CPUs in the **system**. Returns ``None`` if " "undetermined." msgstr "" -#: ../../../library/os.rst:6197 +#: ../../../library/os.rst:6219 msgid "" "The :func:`process_cpu_count` function can be used to get the number of " "logical CPUs usable by the calling thread of the **current process**." msgstr "" -#: ../../../library/os.rst:6202 +#: ../../../library/os.rst:6224 msgid "" "If :option:`-X cpu_count <-X>` is given or :envvar:`PYTHON_CPU_COUNT` is " "set, :func:`cpu_count` returns the override value *n*." msgstr "" -#: ../../../library/os.rst:6209 +#: ../../../library/os.rst:6231 msgid "" "Return the number of processes in the system run queue averaged over the " "last 1, 5, and 15 minutes or raises :exc:`OSError` if the load average was " "unobtainable." msgstr "" -#: ../../../library/os.rst:6218 +#: ../../../library/os.rst:6240 msgid "" "Get the number of logical CPUs usable by the calling thread of the **current " "process**. Returns ``None`` if undetermined. It can be less than :func:" "`cpu_count` depending on the CPU affinity." msgstr "" -#: ../../../library/os.rst:6222 +#: ../../../library/os.rst:6244 msgid "" "The :func:`cpu_count` function can be used to get the number of logical CPUs " "in the **system**." msgstr "" -#: ../../../library/os.rst:6225 +#: ../../../library/os.rst:6247 msgid "" "If :option:`-X cpu_count <-X>` is given or :envvar:`PYTHON_CPU_COUNT` is " "set, :func:`process_cpu_count` returns the override value *n*." msgstr "" -#: ../../../library/os.rst:6228 +#: ../../../library/os.rst:6250 msgid "See also the :func:`sched_getaffinity` function." msgstr "" -#: ../../../library/os.rst:6235 +#: ../../../library/os.rst:6257 msgid "" "Return integer-valued system configuration values. If the configuration " "value specified by *name* isn't defined, ``-1`` is returned. The comments " @@ -6582,44 +6604,44 @@ msgid "" "``sysconf_names``." msgstr "" -#: ../../../library/os.rst:6245 +#: ../../../library/os.rst:6267 msgid "" "Dictionary mapping names accepted by :func:`sysconf` to the integer values " "defined for those names by the host operating system. This can be used to " "determine the set of names known to the system." msgstr "" -#: ../../../library/os.rst:6251 +#: ../../../library/os.rst:6273 msgid "Add ``'SC_MINSIGSTKSZ'`` name." msgstr "" -#: ../../../library/os.rst:6254 +#: ../../../library/os.rst:6276 msgid "" "The following data values are used to support path manipulation operations. " "These are defined for all platforms." msgstr "" -#: ../../../library/os.rst:6257 +#: ../../../library/os.rst:6279 msgid "" "Higher-level operations on pathnames are defined in the :mod:`os.path` " "module." msgstr "" -#: ../../../library/os.rst:6263 +#: ../../../library/os.rst:6285 msgid "" "The constant string used by the operating system to refer to the current " "directory. This is ``'.'`` for Windows and POSIX. Also available via :mod:" "`os.path`." msgstr "" -#: ../../../library/os.rst:6271 +#: ../../../library/os.rst:6293 msgid "" "The constant string used by the operating system to refer to the parent " "directory. This is ``'..'`` for Windows and POSIX. Also available via :mod:" "`os.path`." msgstr "" -#: ../../../library/os.rst:6280 +#: ../../../library/os.rst:6302 msgid "" "The character used by the operating system to separate pathname components. " "This is ``'/'`` for POSIX and ``'\\\\'`` for Windows. Note that knowing " @@ -6628,7 +6650,7 @@ msgid "" "useful. Also available via :mod:`os.path`." msgstr "" -#: ../../../library/os.rst:6290 +#: ../../../library/os.rst:6312 msgid "" "An alternative character used by the operating system to separate pathname " "components, or ``None`` if only one separator character exists. This is set " @@ -6636,27 +6658,27 @@ msgid "" "via :mod:`os.path`." msgstr "" -#: ../../../library/os.rst:6299 +#: ../../../library/os.rst:6321 msgid "" "The character which separates the base filename from the extension; for " "example, the ``'.'`` in :file:`os.py`. Also available via :mod:`os.path`." msgstr "" -#: ../../../library/os.rst:6307 +#: ../../../library/os.rst:6329 msgid "" "The character conventionally used by the operating system to separate search " "path components (as in :envvar:`PATH`), such as ``':'`` for POSIX or ``';'`` " "for Windows. Also available via :mod:`os.path`." msgstr "" -#: ../../../library/os.rst:6314 +#: ../../../library/os.rst:6336 msgid "" "The default search path used by :func:`exec\\*p\\* ` and :func:" "`spawn\\*p\\* ` if the environment doesn't have a ``'PATH'`` key. " "Also available via :mod:`os.path`." msgstr "" -#: ../../../library/os.rst:6321 +#: ../../../library/os.rst:6343 msgid "" "The string used to separate (or, rather, terminate) lines on the current " "platform. This may be a single character, such as ``'\\n'`` for POSIX, or " @@ -6665,36 +6687,36 @@ msgid "" "default); use a single ``'\\n'`` instead, on all platforms." msgstr "" -#: ../../../library/os.rst:6330 +#: ../../../library/os.rst:6352 msgid "" "The file path of the null device. For example: ``'/dev/null'`` for POSIX, " "``'nul'`` for Windows. Also available via :mod:`os.path`." msgstr "" -#: ../../../library/os.rst:6341 +#: ../../../library/os.rst:6363 msgid "" "Flags for use with the :func:`~sys.setdlopenflags` and :func:`~sys." "getdlopenflags` functions. See the Unix manual page :manpage:`dlopen(3)` " "for what the different flags mean." msgstr "" -#: ../../../library/os.rst:6349 +#: ../../../library/os.rst:6371 msgid "Random numbers" msgstr "" -#: ../../../library/os.rst:6354 +#: ../../../library/os.rst:6376 msgid "" "Get up to *size* random bytes. The function can return less bytes than " "requested." msgstr "" -#: ../../../library/os.rst:6357 +#: ../../../library/os.rst:6379 msgid "" "These bytes can be used to seed user-space random number generators or for " "cryptographic purposes." msgstr "" -#: ../../../library/os.rst:6360 +#: ../../../library/os.rst:6382 msgid "" "``getrandom()`` relies on entropy gathered from device drivers and other " "sources of environmental noise. Unnecessarily reading large quantities of " @@ -6702,32 +6724,32 @@ msgid "" "``/dev/urandom`` devices." msgstr "" -#: ../../../library/os.rst:6365 +#: ../../../library/os.rst:6387 msgid "" "The flags argument is a bit mask that can contain zero or more of the " "following values ORed together: :py:const:`os.GRND_RANDOM` and :py:data:" "`GRND_NONBLOCK`." msgstr "" -#: ../../../library/os.rst:6369 +#: ../../../library/os.rst:6391 msgid "" "See also the `Linux getrandom() manual page `_." msgstr "" -#: ../../../library/os.rst:6378 +#: ../../../library/os.rst:6400 msgid "" "Return a bytestring of *size* random bytes suitable for cryptographic use." msgstr "" -#: ../../../library/os.rst:6380 +#: ../../../library/os.rst:6402 msgid "" "This function returns random bytes from an OS-specific randomness source. " "The returned data should be unpredictable enough for cryptographic " "applications, though its exact quality depends on the OS implementation." msgstr "" -#: ../../../library/os.rst:6384 +#: ../../../library/os.rst:6406 msgid "" "On Linux, if the ``getrandom()`` syscall is available, it is used in " "blocking mode: block until the system urandom entropy pool is initialized " @@ -6737,63 +6759,63 @@ msgid "" "to poll until the system urandom entropy pool is initialized." msgstr "" -#: ../../../library/os.rst:6391 +#: ../../../library/os.rst:6413 msgid "" "On a Unix-like system, random bytes are read from the ``/dev/urandom`` " "device. If the ``/dev/urandom`` device is not available or not readable, " "the :exc:`NotImplementedError` exception is raised." msgstr "" -#: ../../../library/os.rst:6395 +#: ../../../library/os.rst:6417 msgid "On Windows, it will use ``BCryptGenRandom()``." msgstr "" -#: ../../../library/os.rst:6398 +#: ../../../library/os.rst:6420 msgid "" "The :mod:`secrets` module provides higher level functions. For an easy-to-" "use interface to the random number generator provided by your platform, " "please see :class:`random.SystemRandom`." msgstr "" -#: ../../../library/os.rst:6402 +#: ../../../library/os.rst:6424 msgid "" "On Linux 3.17 and newer, the ``getrandom()`` syscall is now used when " "available. On OpenBSD 5.6 and newer, the C ``getentropy()`` function is now " "used. These functions avoid the usage of an internal file descriptor." msgstr "" -#: ../../../library/os.rst:6408 +#: ../../../library/os.rst:6430 msgid "" "On Linux, if the ``getrandom()`` syscall blocks (the urandom entropy pool is " "not initialized yet), fall back on reading ``/dev/urandom``." msgstr "" -#: ../../../library/os.rst:6412 +#: ../../../library/os.rst:6434 msgid "" "On Linux, ``getrandom()`` is now used in blocking mode to increase the " "security." msgstr "" -#: ../../../library/os.rst:6416 +#: ../../../library/os.rst:6438 msgid "" "On Windows, ``BCryptGenRandom()`` is used instead of ``CryptGenRandom()`` " "which is deprecated." msgstr "" -#: ../../../library/os.rst:6422 +#: ../../../library/os.rst:6444 msgid "" "By default, when reading from ``/dev/random``, :func:`getrandom` blocks if " "no random bytes are available, and when reading from ``/dev/urandom``, it " "blocks if the entropy pool has not yet been initialized." msgstr "" -#: ../../../library/os.rst:6426 +#: ../../../library/os.rst:6448 msgid "" "If the :py:data:`GRND_NONBLOCK` flag is set, then :func:`getrandom` does not " "block in these cases, but instead immediately raises :exc:`BlockingIOError`." msgstr "" -#: ../../../library/os.rst:6433 +#: ../../../library/os.rst:6455 msgid "" "If this bit is set, then random bytes are drawn from the ``/dev/" "random`` pool instead of the ``/dev/urandom`` pool." @@ -6811,7 +6833,7 @@ msgstr "" #: ../../../library/os.rst:404 ../../../library/os.rst:470 #: ../../../library/os.rst:479 ../../../library/os.rst:488 #: ../../../library/os.rst:502 ../../../library/os.rst:700 -#: ../../../library/os.rst:5175 ../../../library/os.rst:5201 +#: ../../../library/os.rst:5197 ../../../library/os.rst:5223 msgid "process" msgstr "" @@ -6851,11 +6873,11 @@ msgstr "" msgid "gethostbyaddr() (in module socket)" msgstr "" -#: ../../../library/os.rst:860 ../../../library/os.rst:2808 +#: ../../../library/os.rst:860 ../../../library/os.rst:2824 msgid "deleting" msgstr "" -#: ../../../library/os.rst:1418 ../../../library/os.rst:3185 +#: ../../../library/os.rst:1418 ../../../library/os.rst:3207 msgid "module" msgstr "" @@ -6863,82 +6885,82 @@ msgstr "" msgid "pty" msgstr "" -#: ../../../library/os.rst:2171 ../../../library/os.rst:2589 -#: ../../../library/os.rst:2808 ../../../library/os.rst:4205 -#: ../../../library/os.rst:4305 +#: ../../../library/os.rst:2182 ../../../library/os.rst:2605 +#: ../../../library/os.rst:2824 ../../../library/os.rst:4227 +#: ../../../library/os.rst:4327 msgid "directory" msgstr "" -#: ../../../library/os.rst:2171 +#: ../../../library/os.rst:2182 msgid "changing" msgstr "" -#: ../../../library/os.rst:2589 +#: ../../../library/os.rst:2605 msgid "creating" msgstr "" -#: ../../../library/os.rst:2589 +#: ../../../library/os.rst:2605 msgid "UNC paths" msgstr "" -#: ../../../library/os.rst:2589 +#: ../../../library/os.rst:2605 msgid "and os.makedirs()" msgstr "" -#: ../../../library/os.rst:3185 +#: ../../../library/os.rst:3207 msgid "stat" msgstr "" -#: ../../../library/os.rst:4205 ../../../library/os.rst:4305 +#: ../../../library/os.rst:4227 ../../../library/os.rst:4327 msgid "walking" msgstr "" -#: ../../../library/os.rst:4205 ../../../library/os.rst:4305 +#: ../../../library/os.rst:4227 ../../../library/os.rst:4327 msgid "traversal" msgstr "" -#: ../../../library/os.rst:5175 ../../../library/os.rst:5201 +#: ../../../library/os.rst:5197 ../../../library/os.rst:5223 msgid "killing" msgstr "" -#: ../../../library/os.rst:5175 ../../../library/os.rst:5201 +#: ../../../library/os.rst:5197 ../../../library/os.rst:5223 msgid "signalling" msgstr "" -#: ../../../library/os.rst:6260 ../../../library/os.rst:6296 +#: ../../../library/os.rst:6282 ../../../library/os.rst:6318 msgid ". (dot)" msgstr "" -#: ../../../library/os.rst:6260 ../../../library/os.rst:6268 -#: ../../../library/os.rst:6276 ../../../library/os.rst:6287 -#: ../../../library/os.rst:6296 +#: ../../../library/os.rst:6282 ../../../library/os.rst:6290 +#: ../../../library/os.rst:6298 ../../../library/os.rst:6309 +#: ../../../library/os.rst:6318 msgid "in pathnames" msgstr "" -#: ../../../library/os.rst:6268 +#: ../../../library/os.rst:6290 msgid ".." msgstr "" -#: ../../../library/os.rst:6276 ../../../library/os.rst:6287 +#: ../../../library/os.rst:6298 ../../../library/os.rst:6309 msgid "/ (slash)" msgstr "" -#: ../../../library/os.rst:6277 +#: ../../../library/os.rst:6299 msgid "\\ (backslash)" msgstr "" -#: ../../../library/os.rst:6277 +#: ../../../library/os.rst:6299 msgid "in pathnames (Windows)" msgstr "" -#: ../../../library/os.rst:6303 +#: ../../../library/os.rst:6325 msgid ": (colon)" msgstr "" -#: ../../../library/os.rst:6303 +#: ../../../library/os.rst:6325 msgid "path separator (POSIX)" msgstr "" -#: ../../../library/os.rst:6303 +#: ../../../library/os.rst:6325 msgid "; (semicolon)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/queue.pot b/main/locale/pot/LC_MESSAGES/library/queue.pot index f5c62e5d6cd..2211f2c9122 100644 --- a/main/locale/pot/LC_MESSAGES/library/queue.pot +++ b/main/locale/pot/LC_MESSAGES/library/queue.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -209,8 +209,8 @@ msgid "" "the queue has been shut down immediately." msgstr "" -#: ../../../library/queue.rst:176 ../../../library/queue.rst:326 -msgid "Equivalent to ``get(False)``." +#: ../../../library/queue.rst:176 +msgid "Equivalent to ``get(block=False)``." msgstr "" #: ../../../library/queue.rst:178 @@ -360,6 +360,10 @@ msgid "" "meth:`Queue.put_nowait`." msgstr "" +#: ../../../library/queue.rst:326 +msgid "Equivalent to ``get(False)``." +msgstr "" + #: ../../../library/queue.rst:331 msgid "Class :class:`multiprocessing.Queue`" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/re.pot b/main/locale/pot/LC_MESSAGES/library/re.pot index 03f81582d81..cb1a25f6637 100644 --- a/main/locale/pot/LC_MESSAGES/library/re.pot +++ b/main/locale/pot/LC_MESSAGES/library/re.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -145,7 +145,7 @@ msgstr "" msgid "The special characters are:" msgstr "" -#: ../../../library/re.rst:98 ../../../library/re.rst:1703 +#: ../../../library/re.rst:98 ../../../library/re.rst:1771 msgid "``.``" msgstr "" @@ -392,25 +392,64 @@ msgstr "" #: ../../../library/re.rst:287 msgid "" -"Support of nested sets and set operations as in `Unicode Technical Standard " -"#18`_ might be added in the future. This would change the syntax, so to " -"facilitate this change a :exc:`FutureWarning` will be raised in ambiguous " -"cases for the time being. That includes sets starting with a literal ``'['`` " -"or containing literal character sequences ``'--'``, ``'&&'``, ``'~~'``, and " -"``'||'``. To avoid a warning escape them with a backslash." +"A character set may contain a nested set written in square brackets, and two " +"sets may be combined with a set operator, as in `Unicode Technical Standard " +"#18`_:" msgstr "" -#: ../../../library/re.rst:297 +#: ../../../library/re.rst:291 +msgid "" +"``[A--B]`` (*difference*) matches a character that is in *A* but not in *B*; " +"for example ``[a-z--[aeiou]]`` matches an ASCII lowercase consonant." +msgstr "" + +#: ../../../library/re.rst:294 +msgid "" +"``[A&&B]`` (*intersection*) matches a character that is in both *A* and *B*; " +"for example ``[\\w&&[a-z]]`` matches an ASCII lowercase letter." +msgstr "" + +#: ../../../library/re.rst:296 +msgid "" +"``[A||B]`` (*union*) matches a character that is in *A* or in *B*; this is " +"the same as listing the members of both sets in a single set, but allows " +"combining nested sets." +msgstr "" + +#: ../../../library/re.rst:300 +msgid "" +"Operators have no precedence and are applied from left to right. To group, " +"write a nested set as the operand after an operator, as in ``[a-z--" +"[aeiou]]``. A leading ``'^'`` complements the whole result. A ``'['`` " +"begins a nested set only immediately after a set operator; anywhere else -- " +"including at the start of a character set -- it is an ordinary character, so " +"existing patterns keep their meaning. Escape it as ``'\\['`` to include a " +"literal ``'['`` right after an operator." +msgstr "" + +#: ../../../library/re.rst:312 +msgid "" +"Symmetric difference (``A~~B``) is not yet supported; a literal ``'~~'`` in " +"a character set still raises a :exc:`FutureWarning`." +msgstr "" + +#: ../../../library/re.rst:315 msgid "" ":exc:`FutureWarning` is raised if a character set contains constructs that " "will change semantically in the future." msgstr "" -#: ../../../library/re.rst:303 +#: ../../../library/re.rst:319 +msgid "" +"Added support for nested sets and the set operators ``--``, ``&&`` and ``||" +"``." +msgstr "" + +#: ../../../library/re.rst:325 msgid "``|``" msgstr "" -#: ../../../library/re.rst:304 +#: ../../../library/re.rst:326 msgid "" "``A|B``, where *A* and *B* can be arbitrary REs, creates a regular " "expression that will match either *A* or *B*. An arbitrary number of REs " @@ -423,11 +462,11 @@ msgid "" "use ``\\|``, or enclose it inside a character class, as in ``[|]``." msgstr "" -#: ../../../library/re.rst:317 +#: ../../../library/re.rst:339 msgid "``(...)``" msgstr "" -#: ../../../library/re.rst:318 +#: ../../../library/re.rst:340 msgid "" "Matches whatever regular expression is inside the parentheses, and indicates " "the start and end of a group; the contents of a group can be retrieved after " @@ -437,11 +476,11 @@ msgid "" "character class: ``[(]``, ``[)]``." msgstr "" -#: ../../../library/re.rst:326 +#: ../../../library/re.rst:348 msgid "``(?...)``" msgstr "" -#: ../../../library/re.rst:327 +#: ../../../library/re.rst:349 msgid "" "This is an extension notation (a ``'?'`` following a ``'('`` is not " "meaningful otherwise). The first character after the ``'?'`` determines " @@ -450,46 +489,46 @@ msgid "" "rule. Following are the currently supported extensions." msgstr "" -#: ../../../library/re.rst:333 +#: ../../../library/re.rst:355 msgid "``(?aiLmsux)``" msgstr "" -#: ../../../library/re.rst:334 +#: ../../../library/re.rst:356 msgid "" "(One or more letters from the set ``'a'``, ``'i'``, ``'L'``, ``'m'``, " "``'s'``, ``'u'``, ``'x'``.) The group matches the empty string; the letters " "set the corresponding flags for the entire regular expression:" msgstr "" -#: ../../../library/re.rst:339 ../../../library/re.rst:371 +#: ../../../library/re.rst:361 ../../../library/re.rst:393 msgid ":const:`re.A` (ASCII-only matching)" msgstr "" -#: ../../../library/re.rst:340 ../../../library/re.rst:372 +#: ../../../library/re.rst:362 ../../../library/re.rst:394 msgid ":const:`re.I` (ignore case)" msgstr "" -#: ../../../library/re.rst:341 ../../../library/re.rst:373 +#: ../../../library/re.rst:363 ../../../library/re.rst:395 msgid ":const:`re.L` (locale dependent)" msgstr "" -#: ../../../library/re.rst:342 ../../../library/re.rst:374 +#: ../../../library/re.rst:364 ../../../library/re.rst:396 msgid ":const:`re.M` (multi-line)" msgstr "" -#: ../../../library/re.rst:343 ../../../library/re.rst:375 +#: ../../../library/re.rst:365 ../../../library/re.rst:397 msgid ":const:`re.S` (dot matches all)" msgstr "" -#: ../../../library/re.rst:344 ../../../library/re.rst:376 +#: ../../../library/re.rst:366 ../../../library/re.rst:398 msgid ":const:`re.U` (Unicode matching)" msgstr "" -#: ../../../library/re.rst:345 ../../../library/re.rst:377 +#: ../../../library/re.rst:367 ../../../library/re.rst:399 msgid ":const:`re.X` (verbose)" msgstr "" -#: ../../../library/re.rst:347 +#: ../../../library/re.rst:369 msgid "" "(The flags are described in :ref:`contents-of-module-re`.) This is useful if " "you wish to include the flags as part of the regular expression, instead of " @@ -497,15 +536,15 @@ msgid "" "be used first in the expression string." msgstr "" -#: ../../../library/re.rst:353 +#: ../../../library/re.rst:375 msgid "This construction can only be used at the start of the expression." msgstr "" -#: ../../../library/re.rst:358 +#: ../../../library/re.rst:380 msgid "``(?:...)``" msgstr "" -#: ../../../library/re.rst:359 +#: ../../../library/re.rst:381 msgid "" "A non-capturing version of regular parentheses. Matches whatever regular " "expression is inside the parentheses, but the substring matched by the group " @@ -513,11 +552,11 @@ msgid "" "pattern." msgstr "" -#: ../../../library/re.rst:364 +#: ../../../library/re.rst:386 msgid "``(?aiLmsux-imsx:...)``" msgstr "" -#: ../../../library/re.rst:365 +#: ../../../library/re.rst:387 msgid "" "(Zero or more letters from the set ``'a'``, ``'i'``, ``'L'``, ``'m'``, " "``'s'``, ``'u'``, ``'x'``, optionally followed by ``'-'`` followed by one or " @@ -525,11 +564,11 @@ msgid "" "or remove the corresponding flags for the part of the expression:" msgstr "" -#: ../../../library/re.rst:379 +#: ../../../library/re.rst:401 msgid "(The flags are described in :ref:`contents-of-module-re`.)" msgstr "" -#: ../../../library/re.rst:381 +#: ../../../library/re.rst:403 msgid "" "The letters ``'a'``, ``'L'`` and ``'u'`` are mutually exclusive when used as " "inline flags, so they can't be combined or follow ``'-'``. Instead, when " @@ -542,15 +581,15 @@ msgid "" "restored outside of the group." msgstr "" -#: ../../../library/re.rst:393 +#: ../../../library/re.rst:415 msgid "The letters ``'a'``, ``'L'`` and ``'u'`` also can be used in a group." msgstr "" -#: ../../../library/re.rst:396 +#: ../../../library/re.rst:418 msgid "``(?>...)``" msgstr "" -#: ../../../library/re.rst:397 +#: ../../../library/re.rst:419 msgid "" "Attempts to match ``...`` as if it was a separate regular expression, and if " "successful, continues to match the rest of the pattern following it. If the " @@ -564,11 +603,11 @@ msgid "" "thus fail to match." msgstr "" -#: ../../../library/re.rst:413 +#: ../../../library/re.rst:435 msgid "``(?P...)``" msgstr "" -#: ../../../library/re.rst:414 +#: ../../../library/re.rst:436 msgid "" "Similar to regular parentheses, but the substring matched by the group is " "accessible via the symbolic group name *name*. Group names must be valid " @@ -578,108 +617,108 @@ msgid "" "the group were not named." msgstr "" -#: ../../../library/re.rst:421 +#: ../../../library/re.rst:443 msgid "" "Named groups can be referenced in three contexts. If the pattern is ``(?" "P['\"]).*?(?P=quote)`` (i.e. matching a string quoted with either " "single or double quotes):" msgstr "" -#: ../../../library/re.rst:426 +#: ../../../library/re.rst:448 msgid "Context of reference to group \"quote\"" msgstr "" -#: ../../../library/re.rst:426 +#: ../../../library/re.rst:448 msgid "Ways to reference it" msgstr "" -#: ../../../library/re.rst:428 +#: ../../../library/re.rst:450 msgid "in the same pattern itself" msgstr "" -#: ../../../library/re.rst:428 +#: ../../../library/re.rst:450 msgid "``(?P=quote)`` (as shown)" msgstr "" -#: ../../../library/re.rst:429 ../../../library/re.rst:436 +#: ../../../library/re.rst:451 ../../../library/re.rst:458 msgid "``\\1``" msgstr "" -#: ../../../library/re.rst:431 +#: ../../../library/re.rst:453 msgid "when processing match object *m*" msgstr "" -#: ../../../library/re.rst:431 +#: ../../../library/re.rst:453 msgid "``m.group('quote')``" msgstr "" -#: ../../../library/re.rst:432 +#: ../../../library/re.rst:454 msgid "``m.end('quote')`` (etc.)" msgstr "" -#: ../../../library/re.rst:434 +#: ../../../library/re.rst:456 msgid "in a string passed to the *repl* argument of ``re.sub()``" msgstr "" -#: ../../../library/re.rst:434 +#: ../../../library/re.rst:456 msgid "``\\g``" msgstr "" -#: ../../../library/re.rst:435 +#: ../../../library/re.rst:457 msgid "``\\g<1>``" msgstr "" -#: ../../../library/re.rst:439 +#: ../../../library/re.rst:461 msgid "" "In :class:`bytes` patterns, group *name* can only contain bytes in the ASCII " "range (``b'\\x00'``-``b'\\x7f'``)." msgstr "" -#: ../../../library/re.rst:445 +#: ../../../library/re.rst:467 msgid "``(?P=name)``" msgstr "" -#: ../../../library/re.rst:446 +#: ../../../library/re.rst:468 msgid "" "A backreference to a named group; it matches whatever text was matched by " "the earlier group named *name*." msgstr "" -#: ../../../library/re.rst:451 +#: ../../../library/re.rst:473 msgid "``(?#...)``" msgstr "" -#: ../../../library/re.rst:452 +#: ../../../library/re.rst:474 msgid "A comment; the contents of the parentheses are simply ignored." msgstr "" -#: ../../../library/re.rst:456 +#: ../../../library/re.rst:478 msgid "``(?=...)``" msgstr "" -#: ../../../library/re.rst:457 +#: ../../../library/re.rst:479 msgid "" "Matches if ``...`` matches next, but doesn't consume any of the string. " "This is called a :dfn:`lookahead assertion`. For example, ``Isaac (?" "=Asimov)`` will match ``'Isaac '`` only if it's followed by ``'Asimov'``." msgstr "" -#: ../../../library/re.rst:463 +#: ../../../library/re.rst:485 msgid "``(?!...)``" msgstr "" -#: ../../../library/re.rst:464 +#: ../../../library/re.rst:486 msgid "" "Matches if ``...`` doesn't match next. This is a :dfn:`negative lookahead " "assertion`. For example, ``Isaac (?!Asimov)`` will match ``'Isaac '`` only " "if it's *not* followed by ``'Asimov'``." msgstr "" -#: ../../../library/re.rst:470 +#: ../../../library/re.rst:492 msgid "``(?<=...)``" msgstr "" -#: ../../../library/re.rst:471 +#: ../../../library/re.rst:493 msgid "" "Matches if the current position in the string is preceded by a match for " "``...`` that ends at the current position. This is called a :dfn:`positive " @@ -693,19 +732,19 @@ msgid "" "func:`match` function:" msgstr "" -#: ../../../library/re.rst:486 +#: ../../../library/re.rst:508 msgid "This example looks for a word following a hyphen:" msgstr "" -#: ../../../library/re.rst:492 +#: ../../../library/re.rst:514 msgid "Added support for group references of fixed length." msgstr "" -#: ../../../library/re.rst:497 +#: ../../../library/re.rst:519 msgid "``(?|$)`` is a poor email matching pattern, which will match with " -"``''`` as well as ``'user@host.com'``, but not with " -"``''``." +"(1)>|$)`` is a poor email matching pattern, which matches ``''`` as well as ``'user@host.com'``, but does not match ``''`` in their entirety (:func:`re.search` finds " +"only ``'user@host.com'`` in the former)." msgstr "" -#: ../../../library/re.rst:515 +#: ../../../library/re.rst:538 msgid "" "Group *id* can only contain ASCII digits. In :class:`bytes` patterns, group " "*name* can only contain bytes in the ASCII range (``b'\\x00'``-``b'\\x7f'``)." msgstr "" -#: ../../../library/re.rst:523 +#: ../../../library/re.rst:546 msgid "" "The special sequences consist of ``'\\'`` and a character from the list " "below. If the ordinary character is not an ASCII digit or an ASCII letter, " @@ -742,11 +782,11 @@ msgid "" "matches the character ``'$'``." msgstr "" -#: ../../../library/re.rst:530 +#: ../../../library/re.rst:553 msgid "``\\number``" msgstr "" -#: ../../../library/re.rst:531 +#: ../../../library/re.rst:554 msgid "" "Matches the contents of the group of the same number. Groups are numbered " "starting from 1. For example, ``(.+) \\1`` matches ``'the the'`` or ``'55 " @@ -758,19 +798,19 @@ msgid "" "escapes are treated as characters." msgstr "" -#: ../../../library/re.rst:542 +#: ../../../library/re.rst:565 msgid "``\\A``" msgstr "" -#: ../../../library/re.rst:543 +#: ../../../library/re.rst:566 msgid "Matches only at the start of the string." msgstr "" -#: ../../../library/re.rst:547 +#: ../../../library/re.rst:570 msgid "``\\b``" msgstr "" -#: ../../../library/re.rst:548 +#: ../../../library/re.rst:571 msgid "" "Matches the empty string, but only at the beginning or end of a word. A word " "is defined as a sequence of word characters. Note that formally, ``\\b`` is " @@ -780,7 +820,7 @@ msgid "" "``'as at ay'`` but not ``'attempt'`` or ``'atlas'``." msgstr "" -#: ../../../library/re.rst:556 +#: ../../../library/re.rst:579 msgid "" "The default word characters in Unicode (str) patterns are Unicode " "alphanumerics and the underscore, but this can be changed by using the :py:" @@ -788,17 +828,17 @@ msgid "" "if the :py:const:`~re.LOCALE` flag is used." msgstr "" -#: ../../../library/re.rst:564 +#: ../../../library/re.rst:587 msgid "" "Inside a character range, ``\\b`` represents the backspace character, for " "compatibility with Python's string literals." msgstr "" -#: ../../../library/re.rst:569 +#: ../../../library/re.rst:592 msgid "``\\B``" msgstr "" -#: ../../../library/re.rst:570 +#: ../../../library/re.rst:593 msgid "" "Matches the empty string, but only when it is *not* at the beginning or end " "of a word. This means that ``r'at\\B'`` matches ``'athens'``, ``'atom'``, " @@ -809,60 +849,60 @@ msgid "" "current locale if the :py:const:`~re.LOCALE` flag is used." msgstr "" -#: ../../../library/re.rst:581 +#: ../../../library/re.rst:604 msgid "``\\B`` now matches empty input string." msgstr "" -#: ../../../library/re.rst:586 +#: ../../../library/re.rst:609 msgid "``\\d``" msgstr "" -#: ../../../library/re.rst:587 ../../../library/re.rst:611 -#: ../../../library/re.rst:633 +#: ../../../library/re.rst:610 ../../../library/re.rst:634 +#: ../../../library/re.rst:656 msgid "For Unicode (str) patterns:" msgstr "" -#: ../../../library/re.rst:588 +#: ../../../library/re.rst:611 msgid "" "Matches any Unicode decimal digit (that is, any character in Unicode " "character category `[Nd]`__). This includes ``[0-9]``, and also many other " "digit characters." msgstr "" -#: ../../../library/re.rst:592 +#: ../../../library/re.rst:615 msgid "Matches ``[0-9]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: ../../../library/re.rst:596 ../../../library/re.rst:618 -#: ../../../library/re.rst:641 +#: ../../../library/re.rst:619 ../../../library/re.rst:641 +#: ../../../library/re.rst:664 msgid "For 8-bit (bytes) patterns:" msgstr "" -#: ../../../library/re.rst:597 +#: ../../../library/re.rst:620 msgid "" "Matches any decimal digit in the ASCII character set; this is equivalent to " "``[0-9]``." msgstr "" -#: ../../../library/re.rst:602 +#: ../../../library/re.rst:625 msgid "``\\D``" msgstr "" -#: ../../../library/re.rst:603 +#: ../../../library/re.rst:626 msgid "" "Matches any character which is not a decimal digit. This is the opposite of " "``\\d``." msgstr "" -#: ../../../library/re.rst:606 +#: ../../../library/re.rst:629 msgid "Matches ``[^0-9]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: ../../../library/re.rst:610 +#: ../../../library/re.rst:633 msgid "``\\s``" msgstr "" -#: ../../../library/re.rst:612 +#: ../../../library/re.rst:635 msgid "" "Matches Unicode whitespace characters (as defined by :py:meth:`str." "isspace`). This includes ``[ \\t\\n\\r\\f\\v]``, and also many other " @@ -870,48 +910,48 @@ msgid "" "in many languages." msgstr "" -#: ../../../library/re.rst:616 +#: ../../../library/re.rst:639 msgid "" "Matches ``[ \\t\\n\\r\\f\\v]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: ../../../library/re.rst:619 +#: ../../../library/re.rst:642 msgid "" "Matches characters considered whitespace in the ASCII character set; this is " "equivalent to ``[ \\t\\n\\r\\f\\v]``." msgstr "" -#: ../../../library/re.rst:624 +#: ../../../library/re.rst:647 msgid "``\\S``" msgstr "" -#: ../../../library/re.rst:625 +#: ../../../library/re.rst:648 msgid "" "Matches any character which is not a whitespace character. This is the " "opposite of ``\\s``." msgstr "" -#: ../../../library/re.rst:628 +#: ../../../library/re.rst:651 msgid "" "Matches ``[^ \\t\\n\\r\\f\\v]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: ../../../library/re.rst:632 +#: ../../../library/re.rst:655 msgid "``\\w``" msgstr "" -#: ../../../library/re.rst:634 +#: ../../../library/re.rst:657 msgid "" "Matches Unicode word characters; this includes all Unicode alphanumeric " "characters (as defined by :py:meth:`str.isalnum`), as well as the underscore " "(``_``)." msgstr "" -#: ../../../library/re.rst:639 +#: ../../../library/re.rst:662 msgid "Matches ``[a-zA-Z0-9_]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: ../../../library/re.rst:642 +#: ../../../library/re.rst:665 msgid "" "Matches characters considered alphanumeric in the ASCII character set; this " "is equivalent to ``[a-zA-Z0-9_]``. If the :py:const:`~re.LOCALE` flag is " @@ -919,63 +959,133 @@ msgid "" "the underscore." msgstr "" -#: ../../../library/re.rst:649 +#: ../../../library/re.rst:672 msgid "``\\W``" msgstr "" -#: ../../../library/re.rst:650 +#: ../../../library/re.rst:673 msgid "" "Matches any character which is not a word character. This is the opposite of " "``\\w``. By default, matches non-underscore (``_``) characters for which :py:" "meth:`str.isalnum` returns ``False``." msgstr "" -#: ../../../library/re.rst:655 +#: ../../../library/re.rst:678 msgid "Matches ``[^a-zA-Z0-9_]`` if the :py:const:`~re.ASCII` flag is used." msgstr "" -#: ../../../library/re.rst:657 +#: ../../../library/re.rst:680 msgid "" "If the :py:const:`~re.LOCALE` flag is used, matches characters which are " "neither alphanumeric in the current locale nor the underscore." msgstr "" -#: ../../../library/re.rst:664 +#: ../../../library/re.rst:687 +msgid "``\\p{property=value}``, ``\\p{value}``" +msgstr "" + +#: ../../../library/re.rst:688 +msgid "" +"Matches any character with the given Unicode property (see `Unicode " +"Technical Standard #18 `_, requirement " +"RL1.2 \"Properties\"). Property and value names are matched loosely: case, " +"whitespace, ``'-'`` and ``'_'`` are ignored. The following properties are " +"supported:" +msgstr "" + +#: ../../../library/re.rst:695 +msgid "" +"The ``General_Category`` property (short name ``gc``), spelled ``\\p{Lu}``, " +"``\\p{gc=Lu}`` or, for a one-letter group, ``\\p{L}``. The supported values " +"are the groups ``L``, ``N``, ``Z`` and ``C`` and the values ``Lu``, ``Lt``, " +"``Lm``, ``Nd``, ``Nl``, ``No``, ``Zs``, ``Zl``, ``Zp``, ``Cc``, ``Cf``, " +"``Cs``, ``Co`` and ``Cn``." +msgstr "" + +#: ../../../library/re.rst:700 +msgid "" +"The binary properties ``XID_Start``, ``XID_Continue``, ``Alphabetic``, " +"``Lowercase``, ``Uppercase``, ``Numeric``, ``Printable``, ``Cased`` and " +"``Case_Ignorable``. A binary property may also be spelled ``\\p{name=yes}`` " +"or ``\\p{name=no}``." +msgstr "" + +#: ../../../library/re.rst:704 +msgid "" +"The POSIX compatibility classes ``alpha``, ``alnum``, ``blank``, ``cntrl``, " +"``digit``, ``graph``, ``lower``, ``print``, ``space``, ``upper``, ``word`` " +"and ``xdigit``." +msgstr "" + +#: ../../../library/re.rst:707 +msgid "" +"The properties ``ASCII``, ``Any``, ``Assigned``, " +"``Noncharacter_Code_Point``, ``Join_Control``, ``Regional_Indicator``, " +"``ASCII_Hex_Digit``, ``Hex_Digit``, ``Pattern_Syntax`` and " +"``Pattern_White_Space``." +msgstr "" + +#: ../../../library/re.rst:712 +msgid "" +"Where a supported property corresponds to a :mod:`unicodedata` accessor or :" +"class:`str` method, the set of characters it matches is exactly the one they " +"report. For consistency with these, ``space`` follows :py:meth:`str." +"isspace` (like ``\\s``) and ``xdigit`` matches only the ASCII hexadecimal " +"digits." +msgstr "" + +#: ../../../library/re.rst:718 +msgid "" +"This is only recognized in Unicode (str) patterns. In bytes patterns it is " +"an error." +msgstr "" + +#: ../../../library/re.rst:723 +msgid "``\\P{...}``" +msgstr "" + +#: ../../../library/re.rst:724 +msgid "" +"Matches any character which does *not* have the given Unicode property. This " +"is the opposite of ``\\p``." +msgstr "" + +#: ../../../library/re.rst:732 msgid "``\\z``" msgstr "" -#: ../../../library/re.rst:665 +#: ../../../library/re.rst:733 msgid "Matches only at the end of the string." msgstr "" -#: ../../../library/re.rst:669 +#: ../../../library/re.rst:737 msgid "``\\Z``" msgstr "" -#: ../../../library/re.rst:670 +#: ../../../library/re.rst:738 msgid "The same as ``\\z``. For compatibility with old Python versions." msgstr "" -#: ../../../library/re.rst:686 +#: ../../../library/re.rst:754 msgid "" "Most of the :ref:`escape sequences ` supported by Python " "string literals are also accepted by the regular expression parser::" msgstr "" -#: ../../../library/re.rst:693 +#: ../../../library/re.rst:761 msgid "" "(Note that ``\\b`` is used to represent word boundaries, and means " "\"backspace\" only inside character classes.)" msgstr "" -#: ../../../library/re.rst:696 +#: ../../../library/re.rst:764 msgid "" "``'\\u'``, ``'\\U'``, and ``'\\N'`` escape sequences are only recognized in " "Unicode (str) patterns. In bytes patterns they are errors. Unknown escapes " "of ASCII letters are reserved for future use and treated as errors." msgstr "" -#: ../../../library/re.rst:702 +#: ../../../library/re.rst:770 msgid "" "Octal escapes are included in a limited form. If the first digit is a 0, or " "if there are three octal digits, it is considered an octal escape. " @@ -983,27 +1093,27 @@ msgid "" "are always at most three digits in length." msgstr "" -#: ../../../library/re.rst:707 +#: ../../../library/re.rst:775 msgid "The ``'\\u'`` and ``'\\U'`` escape sequences have been added." msgstr "" -#: ../../../library/re.rst:710 +#: ../../../library/re.rst:778 msgid "" "Unknown escapes consisting of ``'\\'`` and an ASCII letter now are errors." msgstr "" -#: ../../../library/re.rst:713 +#: ../../../library/re.rst:781 msgid "" "The :samp:`'\\\\N\\\\{{name}\\\\}'` escape sequence has been added. As in " "string literals, it expands to the named Unicode character (e.g. ``'\\N{EM " "DASH}'``)." msgstr "" -#: ../../../library/re.rst:721 +#: ../../../library/re.rst:789 msgid "Module contents" msgstr "" -#: ../../../library/re.rst:723 +#: ../../../library/re.rst:791 msgid "" "The module defines several functions, constants, and an exception. Some of " "the functions are simplified versions of the full featured methods for " @@ -1011,26 +1121,26 @@ msgid "" "compiled form." msgstr "" -#: ../../../library/re.rst:730 +#: ../../../library/re.rst:798 msgid "Flags" msgstr "" -#: ../../../library/re.rst:732 +#: ../../../library/re.rst:800 msgid "" "Flag constants are now instances of :class:`RegexFlag`, which is a subclass " "of :class:`enum.IntFlag`." msgstr "" -#: ../../../library/re.rst:739 +#: ../../../library/re.rst:807 msgid "" "An :class:`enum.IntFlag` class containing the regex options listed below." msgstr "" -#: ../../../library/re.rst:741 +#: ../../../library/re.rst:809 msgid "- added to ``__all__``" msgstr "" -#: ../../../library/re.rst:746 +#: ../../../library/re.rst:814 msgid "" "Make ``\\w``, ``\\W``, ``\\b``, ``\\B``, ``\\d``, ``\\D``, ``\\s`` and " "``\\S`` perform ASCII-only matching instead of full Unicode matching. This " @@ -1038,11 +1148,11 @@ msgid "" "patterns." msgstr "" -#: ../../../library/re.rst:750 +#: ../../../library/re.rst:818 msgid "Corresponds to the inline flag ``(?a)``." msgstr "" -#: ../../../library/re.rst:754 +#: ../../../library/re.rst:822 msgid "" "The :py:const:`~re.U` flag still exists for backward compatibility, but is " "redundant in Python 3 since matches are Unicode by default for ``str`` " @@ -1050,15 +1160,15 @@ msgid "" "`~re.UNICODE` and the inline flag ``(?u)`` are similarly redundant." msgstr "" -#: ../../../library/re.rst:763 +#: ../../../library/re.rst:831 msgid "Display debug information about compiled expression." msgstr "" -#: ../../../library/re.rst:765 +#: ../../../library/re.rst:833 msgid "No corresponding inline flag." msgstr "" -#: ../../../library/re.rst:771 +#: ../../../library/re.rst:839 msgid "" "Perform case-insensitive matching; expressions like ``[A-Z]`` will also " "match lowercase letters. Full Unicode matching (such as ``Ü`` matching " @@ -1067,11 +1177,11 @@ msgid "" "flag unless the :py:const:`~re.LOCALE` flag is also used." msgstr "" -#: ../../../library/re.rst:779 +#: ../../../library/re.rst:847 msgid "Corresponds to the inline flag ``(?i)``." msgstr "" -#: ../../../library/re.rst:781 +#: ../../../library/re.rst:849 msgid "" "Note that when the Unicode patterns ``[a-z]`` or ``[A-Z]`` are used in " "combination with the :const:`IGNORECASE` flag, they will match the 52 ASCII " @@ -1082,18 +1192,18 @@ msgid "" "'Z' are matched." msgstr "" -#: ../../../library/re.rst:792 +#: ../../../library/re.rst:860 msgid "" "Make ``\\w``, ``\\W``, ``\\b``, ``\\B`` and case-insensitive matching " "dependent on the current locale. This flag can be used only with bytes " "patterns." msgstr "" -#: ../../../library/re.rst:796 +#: ../../../library/re.rst:864 msgid "Corresponds to the inline flag ``(?L)``." msgstr "" -#: ../../../library/re.rst:800 +#: ../../../library/re.rst:868 msgid "" "This flag is discouraged; consider Unicode matching instead. The locale " "mechanism is very unreliable as it only handles one \"culture\" at a time " @@ -1102,20 +1212,20 @@ msgid "" "languages." msgstr "" -#: ../../../library/re.rst:807 +#: ../../../library/re.rst:875 msgid "" ":py:const:`~re.LOCALE` can be used only with bytes patterns and is not " "compatible with :py:const:`~re.ASCII`." msgstr "" -#: ../../../library/re.rst:811 +#: ../../../library/re.rst:879 msgid "" "Compiled regular expression objects with the :py:const:`~re.LOCALE` flag no " "longer depend on the locale at compile time. Only the locale at matching " "time affects the result of matching." msgstr "" -#: ../../../library/re.rst:820 +#: ../../../library/re.rst:888 msgid "" "When specified, the pattern character ``'^'`` matches at the beginning of " "the string and at the beginning of each line (immediately following each " @@ -1126,11 +1236,11 @@ msgid "" "the end of the string." msgstr "" -#: ../../../library/re.rst:827 +#: ../../../library/re.rst:895 msgid "Corresponds to the inline flag ``(?m)``." msgstr "" -#: ../../../library/re.rst:831 +#: ../../../library/re.rst:899 msgid "" "Indicates no flag being applied, the value is ``0``. This flag may be used " "as a default value for a function keyword argument or as a base value that " @@ -1138,29 +1248,29 @@ msgid "" "value::" msgstr "" -#: ../../../library/re.rst:844 +#: ../../../library/re.rst:912 msgid "" "Make the ``'.'`` special character match any character at all, including a " "newline; without this flag, ``'.'`` will match anything *except* a newline." msgstr "" -#: ../../../library/re.rst:847 +#: ../../../library/re.rst:915 msgid "Corresponds to the inline flag ``(?s)``." msgstr "" -#: ../../../library/re.rst:853 +#: ../../../library/re.rst:921 msgid "" "In Python 3, Unicode characters are matched by default for ``str`` patterns. " "This flag is therefore redundant with **no effect** and is only kept for " "backward compatibility." msgstr "" -#: ../../../library/re.rst:858 +#: ../../../library/re.rst:926 msgid "" "See :py:const:`~re.ASCII` to restrict matching to ASCII characters instead." msgstr "" -#: ../../../library/re.rst:865 +#: ../../../library/re.rst:933 msgid "" "This flag allows you to write regular expressions that look nicer and are " "more readable by allowing you to visually separate logical sections of the " @@ -1173,54 +1283,54 @@ msgid "" "ignored." msgstr "" -#: ../../../library/re.rst:875 +#: ../../../library/re.rst:943 msgid "" "This means that the two following regular expression objects that match a " "decimal number are functionally equal::" msgstr "" -#: ../../../library/re.rst:883 +#: ../../../library/re.rst:951 msgid "Corresponds to the inline flag ``(?x)``." msgstr "" -#: ../../../library/re.rst:887 +#: ../../../library/re.rst:955 msgid "Functions" msgstr "" -#: ../../../library/re.rst:891 +#: ../../../library/re.rst:959 msgid "" "Compile a regular expression pattern into a :ref:`regular expression object " "`, which can be used for matching using its :func:`~Pattern." "prefixmatch`, :func:`~Pattern.search`, and other methods, described below." msgstr "" -#: ../../../library/re.rst:896 ../../../library/re.rst:928 -#: ../../../library/re.rst:948 ../../../library/re.rst:976 -#: ../../../library/re.rst:1022 ../../../library/re.rst:1056 -#: ../../../library/re.rst:1071 ../../../library/re.rst:1133 -#: ../../../library/re.rst:1168 +#: ../../../library/re.rst:964 ../../../library/re.rst:996 +#: ../../../library/re.rst:1016 ../../../library/re.rst:1044 +#: ../../../library/re.rst:1090 ../../../library/re.rst:1124 +#: ../../../library/re.rst:1139 ../../../library/re.rst:1201 +#: ../../../library/re.rst:1236 msgid "" "The expression's behaviour can be modified by specifying a *flags* value. " "Values can be any of the `flags`_ variables, combined using bitwise OR (the " "``|`` operator)." msgstr "" -#: ../../../library/re.rst:900 +#: ../../../library/re.rst:968 msgid "The sequence ::" msgstr "" -#: ../../../library/re.rst:905 +#: ../../../library/re.rst:973 msgid "is equivalent to ::" msgstr "" -#: ../../../library/re.rst:909 +#: ../../../library/re.rst:977 msgid "" "but using :func:`re.compile` and saving the resulting regular expression " "object for reuse is more efficient when the expression will be used several " "times in a single program." msgstr "" -#: ../../../library/re.rst:915 +#: ../../../library/re.rst:983 msgid "" "The compiled versions of the most recent patterns passed to :func:`re." "compile` and the module-level matching functions are cached, so programs " @@ -1228,7 +1338,7 @@ msgid "" "compiling regular expressions." msgstr "" -#: ../../../library/re.rst:923 +#: ../../../library/re.rst:991 msgid "" "Scan through *string* looking for the first location where the regular " "expression *pattern* produces a match, and return a corresponding :class:" @@ -1237,7 +1347,7 @@ msgid "" "some point in the string." msgstr "" -#: ../../../library/re.rst:935 +#: ../../../library/re.rst:1003 msgid "" "If zero or more characters at the beginning of *string* match the regular " "expression *pattern*, return a corresponding :class:`~re.Match`. Return " @@ -1245,26 +1355,26 @@ msgid "" "different from a zero-length match." msgstr "" -#: ../../../library/re.rst:942 +#: ../../../library/re.rst:1010 msgid "" "Even in :const:`MULTILINE` mode, this will only match at the beginning of " "the string and not at the beginning of each line." msgstr "" -#: ../../../library/re.rst:945 +#: ../../../library/re.rst:1013 msgid "" "If you want to locate a match anywhere in *string*, use :func:`search` " "instead (see also :ref:`search-vs-match`)." msgstr "" -#: ../../../library/re.rst:952 +#: ../../../library/re.rst:1020 msgid "" "This function now has two names and has long been known as :func:`~re." "match`. Use that name when you need to retain compatibility with older " "Python versions." msgstr "" -#: ../../../library/re.rst:960 +#: ../../../library/re.rst:1028 msgid "" ":func:`~re.match` has been :term:`soft deprecated` in favor of the " "alternate :func:`~re.prefixmatch` name of this API which is more explicitly " @@ -1274,14 +1384,14 @@ msgid "" "ref:`prefixmatch-vs-match`." msgstr "" -#: ../../../library/re.rst:972 +#: ../../../library/re.rst:1040 msgid "" "If the whole *string* matches the regular expression *pattern*, return a " "corresponding :class:`~re.Match`. Return ``None`` if the string does not " "match the pattern; note that this is different from a zero-length match." msgstr "" -#: ../../../library/re.rst:985 +#: ../../../library/re.rst:1053 msgid "" "Split *string* by the occurrences of *pattern*. If capturing parentheses " "are used in *pattern*, then the text of all groups in the pattern are also " @@ -1290,49 +1400,49 @@ msgid "" "final element of the list. ::" msgstr "" -#: ../../../library/re.rst:1000 +#: ../../../library/re.rst:1068 msgid "" "If there are capturing groups in the separator and it matches at the start " "of the string, the result will start with an empty string. The same holds " "for the end of the string::" msgstr "" -#: ../../../library/re.rst:1007 +#: ../../../library/re.rst:1075 msgid "" "That way, separator components are always found at the same relative indices " "within the result list." msgstr "" -#: ../../../library/re.rst:1010 +#: ../../../library/re.rst:1078 msgid "" "Adjacent empty matches are not possible, but an empty match can occur " "immediately after a non-empty match." msgstr "" -#: ../../../library/re.rst:1026 ../../../library/re.rst:1137 +#: ../../../library/re.rst:1094 ../../../library/re.rst:1205 msgid "Added the optional flags argument." msgstr "" -#: ../../../library/re.rst:1029 +#: ../../../library/re.rst:1097 msgid "" "Added support of splitting on a pattern that could match an empty string." msgstr "" -#: ../../../library/re.rst:1032 +#: ../../../library/re.rst:1100 msgid "" "Passing *maxsplit* and *flags* as positional arguments is deprecated. In " "future Python versions they will be :ref:`keyword-only parameters `." msgstr "" -#: ../../../library/re.rst:1040 +#: ../../../library/re.rst:1108 msgid "" "Return all non-overlapping matches of *pattern* in *string*, as a list of " "strings or tuples. The *string* is scanned left-to-right, and matches are " "returned in the order found. Empty matches are included in the result." msgstr "" -#: ../../../library/re.rst:1044 +#: ../../../library/re.rst:1112 msgid "" "The result depends on the number of capturing groups in the pattern. If " "there are no groups, return a list of strings matching the whole pattern. " @@ -1342,11 +1452,11 @@ msgid "" "result." msgstr "" -#: ../../../library/re.rst:1060 ../../../library/re.rst:1075 +#: ../../../library/re.rst:1128 ../../../library/re.rst:1143 msgid "Non-empty matches can now start just after a previous empty match." msgstr "" -#: ../../../library/re.rst:1066 +#: ../../../library/re.rst:1134 msgid "" "Return an :term:`iterator` yielding :class:`~re.Match` objects over all non-" "overlapping matches for the RE *pattern* in *string*. The *string* is " @@ -1354,7 +1464,7 @@ msgid "" "matches are included in the result." msgstr "" -#: ../../../library/re.rst:1081 +#: ../../../library/re.rst:1149 msgid "" "Return the string obtained by replacing the leftmost non-overlapping " "occurrences of *pattern* in *string* by the replacement *repl*. If the " @@ -1368,32 +1478,32 @@ msgid "" "For example::" msgstr "" -#: ../../../library/re.rst:1097 +#: ../../../library/re.rst:1165 msgid "" "If *repl* is a function, it is called for every non-overlapping occurrence " "of *pattern*. The function takes a single :class:`~re.Match` argument, and " "returns the replacement string. For example::" msgstr "" -#: ../../../library/re.rst:1110 +#: ../../../library/re.rst:1178 msgid "The pattern may be a string or a :class:`~re.Pattern`." msgstr "" -#: ../../../library/re.rst:1112 +#: ../../../library/re.rst:1180 msgid "" "The optional argument *count* is the maximum number of pattern occurrences " "to be replaced; *count* must be a non-negative integer. If omitted or zero, " "all occurrences will be replaced." msgstr "" -#: ../../../library/re.rst:1116 +#: ../../../library/re.rst:1184 msgid "" "Adjacent empty matches are not possible, but an empty match can occur " "immediately after a non-empty match. As a result, ``sub('x*', '-', 'abxd')`` " "returns ``'-a-b--d-'`` instead of ``'-a-b-d-'``." msgstr "" -#: ../../../library/re.rst:1123 +#: ../../../library/re.rst:1191 msgid "" "In string-type *repl* arguments, in addition to the character escapes and " "backreferences described above, ``\\g`` will use the substring matched " @@ -1406,60 +1516,60 @@ msgid "" "RE." msgstr "" -#: ../../../library/re.rst:1140 ../../../library/re.rst:1442 +#: ../../../library/re.rst:1208 ../../../library/re.rst:1510 msgid "Unmatched groups are replaced with an empty string." msgstr "" -#: ../../../library/re.rst:1143 +#: ../../../library/re.rst:1211 msgid "" "Unknown escapes in *pattern* consisting of ``'\\'`` and an ASCII letter now " "are errors." msgstr "" -#: ../../../library/re.rst:1147 +#: ../../../library/re.rst:1215 msgid "" "Unknown escapes in *repl* consisting of ``'\\'`` and an ASCII letter now are " "errors. An empty match can occur immediately after a non-empty match." msgstr "" -#: ../../../library/re.rst:1152 +#: ../../../library/re.rst:1220 msgid "" "Group *id* can only contain ASCII digits. In :class:`bytes` replacement " "strings, group *name* can only contain bytes in the ASCII range " "(``b'\\x00'``-``b'\\x7f'``)." msgstr "" -#: ../../../library/re.rst:1157 +#: ../../../library/re.rst:1225 msgid "" "Passing *count* and *flags* as positional arguments is deprecated. In future " "Python versions they will be :ref:`keyword-only parameters `." msgstr "" -#: ../../../library/re.rst:1165 +#: ../../../library/re.rst:1233 msgid "" "Perform the same operation as :func:`sub`, but return a tuple ``(new_string, " "number_of_subs_made)``." msgstr "" -#: ../../../library/re.rst:1175 +#: ../../../library/re.rst:1243 msgid "" "Escape special characters in *pattern*. This is useful if you want to match " "an arbitrary literal string that may have regular expression metacharacters " "in it. For example::" msgstr "" -#: ../../../library/re.rst:1190 +#: ../../../library/re.rst:1258 msgid "" "This function must not be used for the replacement string in :func:`sub` " "and :func:`subn`, only backslashes should be escaped. For example::" msgstr "" -#: ../../../library/re.rst:1198 +#: ../../../library/re.rst:1266 msgid "The ``'_'`` character is no longer escaped." msgstr "" -#: ../../../library/re.rst:1201 +#: ../../../library/re.rst:1269 msgid "" "Only characters that can have special meaning in a regular expression are " "escaped. As a result, ``'!'``, ``'\"'``, ``'%'``, ``\"'\"``, ``','``, " @@ -1467,15 +1577,15 @@ msgid "" "are no longer escaped." msgstr "" -#: ../../../library/re.rst:1210 +#: ../../../library/re.rst:1278 msgid "Clear the regular expression cache." msgstr "" -#: ../../../library/re.rst:1214 +#: ../../../library/re.rst:1282 msgid "Exceptions" msgstr "" -#: ../../../library/re.rst:1218 +#: ../../../library/re.rst:1286 msgid "" "Exception raised when a string passed to one of the functions here is not a " "valid regular expression (for example, it might contain unmatched " @@ -1485,57 +1595,57 @@ msgid "" "attributes:" msgstr "" -#: ../../../library/re.rst:1226 +#: ../../../library/re.rst:1294 msgid "The unformatted error message." msgstr "" -#: ../../../library/re.rst:1230 +#: ../../../library/re.rst:1298 msgid "The regular expression pattern." msgstr "" -#: ../../../library/re.rst:1234 +#: ../../../library/re.rst:1302 msgid "The index in *pattern* where compilation failed (may be ``None``)." msgstr "" -#: ../../../library/re.rst:1238 +#: ../../../library/re.rst:1306 msgid "The line corresponding to *pos* (may be ``None``)." msgstr "" -#: ../../../library/re.rst:1242 +#: ../../../library/re.rst:1310 msgid "The column corresponding to *pos* (may be ``None``)." msgstr "" -#: ../../../library/re.rst:1244 +#: ../../../library/re.rst:1312 msgid "Added additional attributes." msgstr "" -#: ../../../library/re.rst:1247 +#: ../../../library/re.rst:1315 msgid "" "``PatternError`` was originally named ``error``; the latter is kept as an " "alias for backward compatibility." msgstr "" -#: ../../../library/re.rst:1254 +#: ../../../library/re.rst:1322 msgid "Regular expression objects" msgstr "" -#: ../../../library/re.rst:1258 +#: ../../../library/re.rst:1326 msgid "Compiled regular expression object returned by :func:`re.compile`." msgstr "" -#: ../../../library/re.rst:1260 +#: ../../../library/re.rst:1328 msgid "" "Patterns are :ref:`generic ` over the type of string they handle (:" "class:`str` or :class:`bytes`)." msgstr "" -#: ../../../library/re.rst:1263 +#: ../../../library/re.rst:1331 msgid "" ":py:class:`re.Pattern` supports ``[]`` to indicate a Unicode (str) or bytes " "pattern. See :ref:`types-genericalias`." msgstr "" -#: ../../../library/re.rst:1269 +#: ../../../library/re.rst:1337 msgid "" "Scan through *string* looking for the first location where this regular " "expression produces a match, and return a corresponding :class:`~re.Match`. " @@ -1544,7 +1654,7 @@ msgid "" "string." msgstr "" -#: ../../../library/re.rst:1274 +#: ../../../library/re.rst:1342 msgid "" "The optional second parameter *pos* gives an index in the string where the " "search is to start; it defaults to ``0``. This is not completely equivalent " @@ -1553,7 +1663,7 @@ msgid "" "necessarily at the index where the search is to start." msgstr "" -#: ../../../library/re.rst:1280 +#: ../../../library/re.rst:1348 msgid "" "The optional parameter *endpos* limits how far the string will be searched; " "it will be as if the string is *endpos* characters long, so only the " @@ -1563,7 +1673,7 @@ msgid "" "equivalent to ``rx.search(string[:50], 0)``. ::" msgstr "" -#: ../../../library/re.rst:1295 +#: ../../../library/re.rst:1363 msgid "" "If zero or more characters at the *beginning* of *string* match this regular " "expression, return a corresponding :class:`~re.Match`. Return ``None`` if " @@ -1571,32 +1681,32 @@ msgid "" "zero-length match." msgstr "" -#: ../../../library/re.rst:1300 +#: ../../../library/re.rst:1368 msgid "" "Note that even in :const:`MULTILINE` mode, this will only match at the " "beginning of the string and not at the beginning of each line." msgstr "" -#: ../../../library/re.rst:1303 ../../../library/re.rst:1338 +#: ../../../library/re.rst:1371 ../../../library/re.rst:1406 msgid "" "The optional *pos* and *endpos* parameters have the same meaning as for the :" "meth:`~Pattern.search` method. ::" msgstr "" -#: ../../../library/re.rst:1311 +#: ../../../library/re.rst:1379 msgid "" "If you want to locate a match anywhere in *string*, use :meth:`~Pattern." "search` instead (see also :ref:`search-vs-match`)." msgstr "" -#: ../../../library/re.rst:1314 +#: ../../../library/re.rst:1382 msgid "" "This method now has two names and has long been known as :meth:`~Pattern." "match`. Use that name when you need to retain compatibility with older " "Python versions." msgstr "" -#: ../../../library/re.rst:1322 +#: ../../../library/re.rst:1390 msgid "" ":meth:`~Pattern.match` has been :term:`soft deprecated` in favor of the " "alternate :meth:`~Pattern.prefixmatch` name of this API which is more " @@ -1606,95 +1716,95 @@ msgid "" "search`. See :ref:`prefixmatch-vs-match`." msgstr "" -#: ../../../library/re.rst:1334 +#: ../../../library/re.rst:1402 msgid "" "If the whole *string* matches this regular expression, return a " "corresponding :class:`~re.Match`. Return ``None`` if the string does not " "match the pattern; note that this is different from a zero-length match." msgstr "" -#: ../../../library/re.rst:1352 +#: ../../../library/re.rst:1420 msgid "Identical to the :func:`split` function, using the compiled pattern." msgstr "" -#: ../../../library/re.rst:1357 +#: ../../../library/re.rst:1425 msgid "" "Similar to the :func:`findall` function, using the compiled pattern, but " "also accepts optional *pos* and *endpos* parameters that limit the search " "region like for :meth:`search`." msgstr "" -#: ../../../library/re.rst:1364 +#: ../../../library/re.rst:1432 msgid "" "Similar to the :func:`finditer` function, using the compiled pattern, but " "also accepts optional *pos* and *endpos* parameters that limit the search " "region like for :meth:`search`." msgstr "" -#: ../../../library/re.rst:1371 +#: ../../../library/re.rst:1439 msgid "Identical to the :func:`sub` function, using the compiled pattern." msgstr "" -#: ../../../library/re.rst:1376 +#: ../../../library/re.rst:1444 msgid "Identical to the :func:`subn` function, using the compiled pattern." msgstr "" -#: ../../../library/re.rst:1381 +#: ../../../library/re.rst:1449 msgid "" "The regex matching flags. This is a combination of the flags given to :func:" "`.compile`, any ``(?...)`` inline flags in the pattern, and implicit flags " "such as :py:const:`~re.UNICODE` if the pattern is a Unicode string." msgstr "" -#: ../../../library/re.rst:1388 +#: ../../../library/re.rst:1456 msgid "The number of capturing groups in the pattern." msgstr "" -#: ../../../library/re.rst:1393 +#: ../../../library/re.rst:1461 msgid "" "A dictionary mapping any symbolic group names defined by ``(?P)`` to " "group numbers. The dictionary is empty if no symbolic groups were used in " "the pattern." msgstr "" -#: ../../../library/re.rst:1400 +#: ../../../library/re.rst:1468 msgid "The pattern string from which the pattern object was compiled." msgstr "" -#: ../../../library/re.rst:1403 +#: ../../../library/re.rst:1471 msgid "" "Added support of :func:`copy.copy` and :func:`copy.deepcopy`. Compiled " "regular expression objects are considered atomic." msgstr "" -#: ../../../library/re.rst:1411 +#: ../../../library/re.rst:1479 msgid "Match objects" msgstr "" -#: ../../../library/re.rst:1413 +#: ../../../library/re.rst:1481 msgid "" "Match objects always have a boolean value of ``True``. Since :meth:`~Pattern." "match` and :meth:`~Pattern.search` return ``None`` when there is no match, " "you can test whether there was a match with a simple ``if`` statement::" msgstr "" -#: ../../../library/re.rst:1423 +#: ../../../library/re.rst:1491 msgid "Match object returned by successful ``match``\\ es and ``search``\\ es." msgstr "" -#: ../../../library/re.rst:1425 +#: ../../../library/re.rst:1493 msgid "" "Matches are :ref:`generic ` over the type of string which was " "matched (:class:`str` or :class:`bytes`)." msgstr "" -#: ../../../library/re.rst:1428 +#: ../../../library/re.rst:1496 msgid "" ":py:class:`re.Match` supports ``[]`` to indicate a Unicode (str) or bytes " "match. See :ref:`types-genericalias`." msgstr "" -#: ../../../library/re.rst:1434 +#: ../../../library/re.rst:1502 msgid "" "Return the string obtained by doing backslash substitution on the template " "string *template*, as done by the :meth:`~Pattern.sub` method. Escapes such " @@ -1704,7 +1814,7 @@ msgid "" "backreference ``\\g<0>`` will be replaced by the entire match." msgstr "" -#: ../../../library/re.rst:1447 +#: ../../../library/re.rst:1515 msgid "" "Returns one or more subgroups of the match. If there is a single argument, " "the result is a single string; if there are multiple arguments, the result " @@ -1719,7 +1829,7 @@ msgid "" "matched multiple times, the last match is returned. ::" msgstr "" -#: ../../../library/re.rst:1469 +#: ../../../library/re.rst:1537 msgid "" "If the regular expression uses the ``(?P...)`` syntax, the *groupN* " "arguments may also be strings identifying groups by their group name. If a " @@ -1727,54 +1837,54 @@ msgid "" "`IndexError` exception is raised." msgstr "" -#: ../../../library/re.rst:1474 +#: ../../../library/re.rst:1542 msgid "A moderately complicated example::" msgstr "" -#: ../../../library/re.rst:1482 +#: ../../../library/re.rst:1550 msgid "Named groups can also be referred to by their index::" msgstr "" -#: ../../../library/re.rst:1489 +#: ../../../library/re.rst:1557 msgid "If a group matches multiple times, only the last match is accessible::" msgstr "" -#: ../../../library/re.rst:1498 +#: ../../../library/re.rst:1566 msgid "" "This is identical to ``m.group(g)``. This allows easier access to an " "individual group from a match::" msgstr "" -#: ../../../library/re.rst:1509 +#: ../../../library/re.rst:1577 msgid "Named groups are supported as well::" msgstr "" -#: ../../../library/re.rst:1522 +#: ../../../library/re.rst:1590 msgid "" "Return a tuple containing all the subgroups of the match, from 1 up to " "however many groups are in the pattern. The *default* argument is used for " "groups that did not participate in the match; it defaults to ``None``." msgstr "" -#: ../../../library/re.rst:1526 ../../../library/re.rst:1753 +#: ../../../library/re.rst:1594 ../../../library/re.rst:1821 msgid "For example::" msgstr "" -#: ../../../library/re.rst:1532 +#: ../../../library/re.rst:1600 msgid "" "If we make the decimal place and everything after it optional, not all " "groups might participate in the match. These groups will default to " "``None`` unless the *default* argument is given::" msgstr "" -#: ../../../library/re.rst:1545 +#: ../../../library/re.rst:1613 msgid "" "Return a dictionary containing all the *named* subgroups of the match, keyed " "by the subgroup name. The *default* argument is used for groups that did " "not participate in the match; it defaults to ``None``. For example::" msgstr "" -#: ../../../library/re.rst:1557 +#: ../../../library/re.rst:1625 msgid "" "Return the indices of the start and end of the substring matched by *group*; " "*group* defaults to zero (meaning the whole matched substring). Return " @@ -1783,7 +1893,7 @@ msgid "" "matched by group *g* (equivalent to ``m.group(g)``) is ::" msgstr "" -#: ../../../library/re.rst:1565 +#: ../../../library/re.rst:1633 msgid "" "Note that ``m.start(group)`` will equal ``m.end(group)`` if *group* matched " "a null string. For example, after ``m = re.search('b(c?)', 'cba')``, ``m." @@ -1791,32 +1901,32 @@ msgid "" "2, and ``m.start(2)`` raises an :exc:`IndexError` exception." msgstr "" -#: ../../../library/re.rst:1570 +#: ../../../library/re.rst:1638 msgid "An example that will remove *remove_this* from email addresses::" msgstr "" -#: ../../../library/re.rst:1580 +#: ../../../library/re.rst:1648 msgid "" "For a match *m*, return the 2-tuple ``(m.start(group), m.end(group))``. Note " "that if *group* did not contribute to the match, this is ``(-1, -1)``. " "*group* defaults to zero, the entire match." msgstr "" -#: ../../../library/re.rst:1587 +#: ../../../library/re.rst:1655 msgid "" "The value of *pos* which was passed to the :meth:`~Pattern.search` or :meth:" "`~Pattern.match` method of a :ref:`regex object `. This is the " "index into the string at which the RE engine started looking for a match." msgstr "" -#: ../../../library/re.rst:1594 +#: ../../../library/re.rst:1662 msgid "" "The value of *endpos* which was passed to the :meth:`~Pattern.search` or :" "meth:`~Pattern.match` method of a :ref:`regex object `. This is " "the index into the string beyond which the RE engine will not go." msgstr "" -#: ../../../library/re.rst:1601 +#: ../../../library/re.rst:1669 msgid "" "The integer index of the last matched capturing group, or ``None`` if no " "group was matched at all. For example, the expressions ``(a)b``, ``((a)" @@ -1825,43 +1935,43 @@ msgid "" "applied to the same string." msgstr "" -#: ../../../library/re.rst:1610 +#: ../../../library/re.rst:1678 msgid "" "The name of the last matched capturing group, or ``None`` if the group " "didn't have a name, or if no group was matched at all." msgstr "" -#: ../../../library/re.rst:1616 +#: ../../../library/re.rst:1684 msgid "" "The :ref:`regular expression object ` whose :meth:`~Pattern." "match` or :meth:`~Pattern.search` method produced this match instance." msgstr "" -#: ../../../library/re.rst:1622 +#: ../../../library/re.rst:1690 msgid "The string passed to :meth:`~Pattern.match` or :meth:`~Pattern.search`." msgstr "" -#: ../../../library/re.rst:1625 +#: ../../../library/re.rst:1693 msgid "" "Added support of :func:`copy.copy` and :func:`copy.deepcopy`. Match objects " "are considered atomic." msgstr "" -#: ../../../library/re.rst:1633 +#: ../../../library/re.rst:1701 msgid "Regular expression examples" msgstr "" -#: ../../../library/re.rst:1637 +#: ../../../library/re.rst:1705 msgid "Checking for a pair" msgstr "" -#: ../../../library/re.rst:1639 +#: ../../../library/re.rst:1707 msgid "" "In this example, we'll use the following helper function to display match " "objects a little more gracefully::" msgstr "" -#: ../../../library/re.rst:1647 +#: ../../../library/re.rst:1715 msgid "" "Suppose you are writing a poker program where a player's hand is represented " "as a 5-character string with each character representing a card, \"a\" for " @@ -1869,28 +1979,28 @@ msgid "" "\"2\" through \"9\" representing the card with that value." msgstr "" -#: ../../../library/re.rst:1652 +#: ../../../library/re.rst:1720 msgid "To see if a given string is a valid hand, one could do the following::" msgstr "" -#: ../../../library/re.rst:1662 +#: ../../../library/re.rst:1730 msgid "" "That last hand, ``\"727ak\"``, contained a pair, or two of the same valued " "cards. To match this with a regular expression, one could use backreferences " "as such::" msgstr "" -#: ../../../library/re.rst:1672 +#: ../../../library/re.rst:1740 msgid "" "To find out what card the pair consists of, one could use the :meth:`~Match." "group` method of the match object in the following manner::" msgstr "" -#: ../../../library/re.rst:1690 +#: ../../../library/re.rst:1758 msgid "Simulating scanf()" msgstr "" -#: ../../../library/re.rst:1694 +#: ../../../library/re.rst:1762 msgid "" "Python does not currently have an equivalent to :c:func:`!scanf`. Regular " "expressions are generally more powerful, though also more verbose, than :c:" @@ -1899,125 +2009,125 @@ msgid "" "expressions." msgstr "" -#: ../../../library/re.rst:1701 +#: ../../../library/re.rst:1769 msgid ":c:func:`!scanf` Token" msgstr "" -#: ../../../library/re.rst:1701 +#: ../../../library/re.rst:1769 msgid "Regular Expression" msgstr "" -#: ../../../library/re.rst:1703 +#: ../../../library/re.rst:1771 msgid "``%c``" msgstr "" -#: ../../../library/re.rst:1705 +#: ../../../library/re.rst:1773 msgid "``%5c``" msgstr "" -#: ../../../library/re.rst:1705 +#: ../../../library/re.rst:1773 msgid "``.{5}``" msgstr "" -#: ../../../library/re.rst:1707 +#: ../../../library/re.rst:1775 msgid "``%d``" msgstr "" -#: ../../../library/re.rst:1707 +#: ../../../library/re.rst:1775 msgid "``[-+]?\\d+``" msgstr "" -#: ../../../library/re.rst:1709 +#: ../../../library/re.rst:1777 msgid "``%e``, ``%E``, ``%f``, ``%g``" msgstr "" -#: ../../../library/re.rst:1709 +#: ../../../library/re.rst:1777 msgid "``[-+]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?``" msgstr "" -#: ../../../library/re.rst:1711 +#: ../../../library/re.rst:1779 msgid "``%i``" msgstr "" -#: ../../../library/re.rst:1711 +#: ../../../library/re.rst:1779 msgid "``[-+]?(0[xX][\\dA-Fa-f]+|0[0-7]*|\\d+)``" msgstr "" -#: ../../../library/re.rst:1713 +#: ../../../library/re.rst:1781 msgid "``%o``" msgstr "" -#: ../../../library/re.rst:1713 +#: ../../../library/re.rst:1781 msgid "``[-+]?[0-7]+``" msgstr "" -#: ../../../library/re.rst:1715 +#: ../../../library/re.rst:1783 msgid "``%s``" msgstr "" -#: ../../../library/re.rst:1715 +#: ../../../library/re.rst:1783 msgid "``\\S+``" msgstr "" -#: ../../../library/re.rst:1717 +#: ../../../library/re.rst:1785 msgid "``%u``" msgstr "" -#: ../../../library/re.rst:1717 +#: ../../../library/re.rst:1785 msgid "``\\d+``" msgstr "" -#: ../../../library/re.rst:1719 +#: ../../../library/re.rst:1787 msgid "``%x``, ``%X``" msgstr "" -#: ../../../library/re.rst:1719 +#: ../../../library/re.rst:1787 msgid "``[-+]?(0[xX])?[\\dA-Fa-f]+``" msgstr "" -#: ../../../library/re.rst:1722 +#: ../../../library/re.rst:1790 msgid "To extract the filename and numbers from a string like:" msgstr "" -#: ../../../library/re.rst:1728 +#: ../../../library/re.rst:1796 msgid "you would use a :c:func:`!scanf` format like:" msgstr "" -#: ../../../library/re.rst:1734 +#: ../../../library/re.rst:1802 msgid "The equivalent regular expression would be:" msgstr "" -#: ../../../library/re.rst:1744 +#: ../../../library/re.rst:1812 msgid "search() vs. prefixmatch()" msgstr "" -#: ../../../library/re.rst:1746 +#: ../../../library/re.rst:1814 msgid "" "Python offers different primitive operations based on regular expressions:" msgstr "" -#: ../../../library/re.rst:1748 +#: ../../../library/re.rst:1816 msgid "" ":func:`re.prefixmatch` checks for a match only at the beginning of the string" msgstr "" -#: ../../../library/re.rst:1749 +#: ../../../library/re.rst:1817 msgid "" ":func:`re.search` checks for a match anywhere in the string (this is what " "Perl does by default)" msgstr "" -#: ../../../library/re.rst:1751 +#: ../../../library/re.rst:1819 msgid ":func:`re.fullmatch` checks for entire string to be a match" msgstr "" -#: ../../../library/re.rst:1762 +#: ../../../library/re.rst:1830 msgid "" "Regular expressions beginning with ``'^'`` can be used with :func:`search` " "to restrict the match at the beginning of the string::" msgstr "" -#: ../../../library/re.rst:1770 +#: ../../../library/re.rst:1838 msgid "" "Note however that in :const:`MULTILINE` mode :func:`prefixmatch` only " "matches at the beginning of the string, whereas using :func:`search` with a " @@ -2025,17 +2135,17 @@ msgid "" "each line. ::" msgstr "" -#: ../../../library/re.rst:1781 +#: ../../../library/re.rst:1849 msgid "prefixmatch() vs. match()" msgstr "" -#: ../../../library/re.rst:1783 +#: ../../../library/re.rst:1851 msgid "" "Why is the :func:`~re.match` function and method discouraged in favor of the " "longer :func:`~re.prefixmatch` spelling?" msgstr "" -#: ../../../library/re.rst:1786 +#: ../../../library/re.rst:1854 msgid "" "Many other languages have gained regex support libraries since regular " "expressions were added to Python. However in the most popular of those, they " @@ -2046,7 +2156,7 @@ msgid "" "industry norm." msgstr "" -#: ../../../library/re.rst:1794 +#: ../../../library/re.rst:1862 msgid "" "Quoting from the Zen Of Python (``python3 -m this``): *\"Explicit is better " "than implicit\"*. Anyone reading the name :func:`!prefixmatch` is likely to " @@ -2055,7 +2165,7 @@ msgid "" "with this old Python gotcha." msgstr "" -#: ../../../library/re.rst:1800 +#: ../../../library/re.rst:1868 msgid "" "We **do not** plan to remove the older :func:`!match` name, as it has been " "used in code for over 30 years. It has been :term:`soft deprecated`: code " @@ -2063,19 +2173,19 @@ msgid "" "while new code should prefer :func:`!prefixmatch`." msgstr "" -#: ../../../library/re.rst:1806 +#: ../../../library/re.rst:1874 msgid ":func:`!prefixmatch`" msgstr "" -#: ../../../library/re.rst:1809 +#: ../../../library/re.rst:1877 msgid ":func:`!match`" msgstr "" -#: ../../../library/re.rst:1813 +#: ../../../library/re.rst:1881 msgid "Making a phonebook" msgstr "" -#: ../../../library/re.rst:1815 +#: ../../../library/re.rst:1883 msgid "" ":func:`split` splits a string into a list delimited by the passed pattern. " "The method is invaluable for converting textual data into data structures " @@ -2083,37 +2193,37 @@ msgid "" "following example that creates a phonebook." msgstr "" -#: ../../../library/re.rst:1820 +#: ../../../library/re.rst:1888 msgid "" "First, here is the input. Normally it may come from a file, here we are " "using triple-quoted string syntax" msgstr "" -#: ../../../library/re.rst:1833 +#: ../../../library/re.rst:1901 msgid "" "The entries are separated by one or more newlines. Now we convert the string " "into a list with each nonempty line having its own entry:" msgstr "" -#: ../../../library/re.rst:1846 +#: ../../../library/re.rst:1914 msgid "" "Finally, split each entry into a list with first name, last name, telephone " "number, and address. We use the ``maxsplit`` parameter of :func:`split` " "because the address has spaces, our splitting pattern, in it:" msgstr "" -#: ../../../library/re.rst:1859 +#: ../../../library/re.rst:1927 msgid "" "The ``:?`` pattern matches the colon after the last name, so that it does " "not occur in the result list. With a ``maxsplit`` of ``4``, we could " "separate the house number from the street name:" msgstr "" -#: ../../../library/re.rst:1874 +#: ../../../library/re.rst:1942 msgid "Text munging" msgstr "" -#: ../../../library/re.rst:1876 +#: ../../../library/re.rst:1944 msgid "" ":func:`sub` replaces every occurrence of a pattern with a string or the " "result of a function. This example demonstrates using :func:`sub` with a " @@ -2121,11 +2231,11 @@ msgid "" "each word of a sentence except for the first and last characters::" msgstr "" -#: ../../../library/re.rst:1894 +#: ../../../library/re.rst:1962 msgid "Finding all adverbs" msgstr "" -#: ../../../library/re.rst:1896 +#: ../../../library/re.rst:1964 msgid "" ":func:`findall` matches *all* occurrences of a pattern, not just the first " "one as :func:`search` does. For example, if a writer wanted to find all of " @@ -2133,11 +2243,11 @@ msgid "" "manner::" msgstr "" -#: ../../../library/re.rst:1907 +#: ../../../library/re.rst:1975 msgid "Finding all adverbs and their positions" msgstr "" -#: ../../../library/re.rst:1909 +#: ../../../library/re.rst:1977 msgid "" "If one wants more information about all matches of a pattern than the " "matched text, :func:`finditer` is useful as it provides :class:`~re.Match` " @@ -2146,11 +2256,11 @@ msgid "" "they would use :func:`finditer` in the following manner::" msgstr "" -#: ../../../library/re.rst:1923 +#: ../../../library/re.rst:1991 msgid "Raw string notation" msgstr "" -#: ../../../library/re.rst:1925 +#: ../../../library/re.rst:1993 msgid "" "Raw string notation (``r\"text\"``) keeps regular expressions sane. Without " "it, every backslash (``'\\'``) in a regular expression would have to be " @@ -2158,7 +2268,7 @@ msgid "" "lines of code are functionally identical::" msgstr "" -#: ../../../library/re.rst:1935 +#: ../../../library/re.rst:2003 msgid "" "When one wants to match a literal backslash, it must be escaped in the " "regular expression. With raw string notation, this means ``r\"\\\\\"``. " @@ -2166,29 +2276,29 @@ msgid "" "following lines of code functionally identical::" msgstr "" -#: ../../../library/re.rst:1947 +#: ../../../library/re.rst:2015 msgid "Writing a tokenizer" msgstr "" -#: ../../../library/re.rst:1949 +#: ../../../library/re.rst:2017 msgid "" "A `tokenizer or scanner `_ " "analyzes a string to categorize groups of characters. This is a useful " "first step in writing a compiler or interpreter." msgstr "" -#: ../../../library/re.rst:1953 +#: ../../../library/re.rst:2021 msgid "" "The text categories are specified with regular expressions. The technique " "is to combine those into a single master regular expression and to loop over " "successive matches::" msgstr "" -#: ../../../library/re.rst:2009 +#: ../../../library/re.rst:2077 msgid "The tokenizer produces the following output::" msgstr "" -#: ../../../library/re.rst:2032 +#: ../../../library/re.rst:2100 msgid "" "Friedl, Jeffrey. Mastering Regular Expressions. 3rd ed., O'Reilly Media, " "2009. The third edition of the book no longer covers Python at all, but the " @@ -2207,19 +2317,20 @@ msgstr "" #: ../../../library/re.rst:178 ../../../library/re.rst:217 #: ../../../library/re.rst:232 ../../../library/re.rst:241 #: ../../../library/re.rst:255 ../../../library/re.rst:268 -#: ../../../library/re.rst:301 ../../../library/re.rst:314 -#: ../../../library/re.rst:324 ../../../library/re.rst:356 -#: ../../../library/re.rst:411 ../../../library/re.rst:443 -#: ../../../library/re.rst:449 ../../../library/re.rst:454 -#: ../../../library/re.rst:461 ../../../library/re.rst:468 -#: ../../../library/re.rst:495 ../../../library/re.rst:505 -#: ../../../library/re.rst:528 ../../../library/re.rst:540 -#: ../../../library/re.rst:545 ../../../library/re.rst:567 -#: ../../../library/re.rst:584 ../../../library/re.rst:600 -#: ../../../library/re.rst:608 ../../../library/re.rst:622 -#: ../../../library/re.rst:630 ../../../library/re.rst:647 -#: ../../../library/re.rst:661 ../../../library/re.rst:672 -#: ../../../library/re.rst:863 ../../../library/re.rst:1121 +#: ../../../library/re.rst:282 ../../../library/re.rst:323 +#: ../../../library/re.rst:336 ../../../library/re.rst:346 +#: ../../../library/re.rst:378 ../../../library/re.rst:433 +#: ../../../library/re.rst:465 ../../../library/re.rst:471 +#: ../../../library/re.rst:476 ../../../library/re.rst:483 +#: ../../../library/re.rst:490 ../../../library/re.rst:517 +#: ../../../library/re.rst:527 ../../../library/re.rst:551 +#: ../../../library/re.rst:563 ../../../library/re.rst:568 +#: ../../../library/re.rst:590 ../../../library/re.rst:607 +#: ../../../library/re.rst:623 ../../../library/re.rst:631 +#: ../../../library/re.rst:645 ../../../library/re.rst:653 +#: ../../../library/re.rst:670 ../../../library/re.rst:684 +#: ../../../library/re.rst:729 ../../../library/re.rst:740 +#: ../../../library/re.rst:931 ../../../library/re.rst:1189 msgid "in regular expressions" msgstr "" @@ -2272,7 +2383,7 @@ msgid "{} (curly brackets)" msgstr "" #: ../../../library/re.rst:217 ../../../library/re.rst:255 -#: ../../../library/re.rst:528 +#: ../../../library/re.rst:551 msgid "\\ (backslash)" msgstr "" @@ -2284,150 +2395,170 @@ msgstr "" msgid "- (minus)" msgstr "" -#: ../../../library/re.rst:301 +#: ../../../library/re.rst:282 +msgid "--" +msgstr "" + +#: ../../../library/re.rst:282 +msgid "&&" +msgstr "" + +#: ../../../library/re.rst:282 +msgid "||" +msgstr "" + +#: ../../../library/re.rst:323 msgid "| (vertical bar)" msgstr "" -#: ../../../library/re.rst:314 +#: ../../../library/re.rst:336 msgid "() (parentheses)" msgstr "" -#: ../../../library/re.rst:324 +#: ../../../library/re.rst:346 msgid "(?" msgstr "" -#: ../../../library/re.rst:356 +#: ../../../library/re.rst:378 msgid "(?:" msgstr "" -#: ../../../library/re.rst:411 +#: ../../../library/re.rst:433 msgid "(?P<" msgstr "" -#: ../../../library/re.rst:443 +#: ../../../library/re.rst:465 msgid "(?P=" msgstr "" -#: ../../../library/re.rst:449 +#: ../../../library/re.rst:471 msgid "(?#" msgstr "" -#: ../../../library/re.rst:454 +#: ../../../library/re.rst:476 msgid "(?=" msgstr "" -#: ../../../library/re.rst:461 +#: ../../../library/re.rst:483 msgid "(?!" msgstr "" -#: ../../../library/re.rst:468 +#: ../../../library/re.rst:490 msgid "(?<=" msgstr "" -#: ../../../library/re.rst:495 +#: ../../../library/re.rst:517 msgid "(?\n" "Language-Team: LANGUAGE \n" @@ -155,9 +155,9 @@ msgstr "" msgid "" "Return ``True`` if strings or :term:`bytes-like objects ` " "*a* and *b* are equal, otherwise ``False``, using a \"constant-time " -"compare\" to reduce the risk of `timing attacks `_. See :func:`hmac.compare_digest` for additional " -"details." +"compare\" to reduce the risk of `timing attacks `__. " +"See :func:`hmac.compare_digest` for additional details." msgstr "" #: ../../../library/secrets.rst:145 diff --git a/main/locale/pot/LC_MESSAGES/library/shutil.pot b/main/locale/pot/LC_MESSAGES/library/shutil.pot index b81c6566df2..d06dcb7bca2 100644 --- a/main/locale/pot/LC_MESSAGES/library/shutil.pot +++ b/main/locale/pot/LC_MESSAGES/library/shutil.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -93,8 +93,8 @@ msgstr "" msgid "" "The destination location must be writable; otherwise, an :exc:`OSError` " "exception will be raised. If *dst* already exists, it will be replaced. " -"Special files such as character or block devices and pipes cannot be copied " -"with this function." +"Special files such as character or block devices, pipes, and sockets cannot " +"be copied with this function." msgstr "" #: ../../../library/shutil.rst:70 @@ -103,8 +103,8 @@ msgid "" "link will be created instead of copying the file *src* points to." msgstr "" -#: ../../../library/shutil.rst:74 ../../../library/shutil.rst:188 -#: ../../../library/shutil.rst:219 +#: ../../../library/shutil.rst:74 ../../../library/shutil.rst:191 +#: ../../../library/shutil.rst:222 msgid "" "Raises an :ref:`auditing event ` ``shutil.copyfile`` with " "arguments ``src``, ``dst``." @@ -122,28 +122,33 @@ msgid "" "subclass of the latter, this change is backward compatible." msgstr "" -#: ../../../library/shutil.rst:85 ../../../library/shutil.rst:196 -#: ../../../library/shutil.rst:228 ../../../library/shutil.rst:298 -#: ../../../library/shutil.rst:415 +#: ../../../library/shutil.rst:85 ../../../library/shutil.rst:199 +#: ../../../library/shutil.rst:231 ../../../library/shutil.rst:301 +#: ../../../library/shutil.rst:418 msgid "" "Platform-specific fast-copy syscalls may be used internally in order to copy " "the file more efficiently. See :ref:`shutil-platform-dependent-efficient-" "copy-operations` section." msgstr "" -#: ../../../library/shutil.rst:92 +#: ../../../library/shutil.rst:90 +msgid "" +":exc:`SpecialFileError` is now also raised for sockets and device files." +msgstr "" + +#: ../../../library/shutil.rst:95 msgid "" "This exception is raised when :func:`copyfile` or :func:`copytree` attempt " -"to copy a named pipe." +"to copy a named pipe, socket, or device file." msgstr "" -#: ../../../library/shutil.rst:99 +#: ../../../library/shutil.rst:102 msgid "" "This exception is raised if source and destination in :func:`copyfile` are " "the same file." msgstr "" -#: ../../../library/shutil.rst:107 +#: ../../../library/shutil.rst:110 msgid "" "Copy the permission bits from *src* to *dst*. The file contents, owner, and " "group are unaffected. *src* and *dst* are :term:`path-like objects ` ``shutil.copymode`` with " "arguments ``src``, ``dst``." msgstr "" -#: ../../../library/shutil.rst:119 +#: ../../../library/shutil.rst:122 msgid "Added *follow_symlinks* argument." msgstr "" -#: ../../../library/shutil.rst:124 +#: ../../../library/shutil.rst:127 msgid "" "Copy the permission bits, last access time, last modification time, and " "flags from *src* to *dst*. On Linux, :func:`copystat` also copies the " @@ -175,7 +180,7 @@ msgid "" "object>` or path names given as strings." msgstr "" -#: ../../../library/shutil.rst:130 +#: ../../../library/shutil.rst:133 msgid "" "If *follow_symlinks* is false, and *src* and *dst* both refer to symbolic " "links, :func:`copystat` will operate on the symbolic links themselves rather " @@ -183,54 +188,54 @@ msgid "" "*src* symbolic link, and writing the information to the *dst* symbolic link." msgstr "" -#: ../../../library/shutil.rst:139 +#: ../../../library/shutil.rst:142 msgid "" "Not all platforms provide the ability to examine and modify symbolic links. " "Python itself can tell you what functionality is locally available." msgstr "" -#: ../../../library/shutil.rst:143 +#: ../../../library/shutil.rst:146 msgid "" "If ``os.chmod in os.supports_follow_symlinks`` is ``True``, :func:`copystat` " "can modify the permission bits of a symbolic link." msgstr "" -#: ../../../library/shutil.rst:147 +#: ../../../library/shutil.rst:150 msgid "" "If ``os.utime in os.supports_follow_symlinks`` is ``True``, :func:`copystat` " "can modify the last access and modification times of a symbolic link." msgstr "" -#: ../../../library/shutil.rst:151 +#: ../../../library/shutil.rst:154 msgid "" "If ``os.chflags in os.supports_follow_symlinks`` is ``True``, :func:" "`copystat` can modify the flags of a symbolic link. (``os.chflags`` is not " "available on all platforms.)" msgstr "" -#: ../../../library/shutil.rst:156 +#: ../../../library/shutil.rst:159 msgid "" "On platforms where some or all of this functionality is unavailable, when " "asked to modify a symbolic link, :func:`copystat` will copy everything it " "can. :func:`copystat` never returns failure." msgstr "" -#: ../../../library/shutil.rst:161 +#: ../../../library/shutil.rst:164 msgid "Please see :data:`os.supports_follow_symlinks` for more information." msgstr "" -#: ../../../library/shutil.rst:164 ../../../library/shutil.rst:221 +#: ../../../library/shutil.rst:167 ../../../library/shutil.rst:224 msgid "" "Raises an :ref:`auditing event ` ``shutil.copystat`` with " "arguments ``src``, ``dst``." msgstr "" -#: ../../../library/shutil.rst:166 +#: ../../../library/shutil.rst:169 msgid "" "Added *follow_symlinks* argument and support for Linux extended attributes." msgstr "" -#: ../../../library/shutil.rst:171 +#: ../../../library/shutil.rst:174 msgid "" "Copies the file *src* to the file or directory *dst*. *src* and *dst* " "should be :term:`path-like objects ` or strings. If *dst* " @@ -239,14 +244,14 @@ msgid "" "be replaced. Returns the path to the newly created file." msgstr "" -#: ../../../library/shutil.rst:177 +#: ../../../library/shutil.rst:180 msgid "" "If *follow_symlinks* is false, and *src* is a symbolic link, *dst* will be " "created as a symbolic link. If *follow_symlinks* is true and *src* is a " "symbolic link, *dst* will be a copy of the file *src* refers to." msgstr "" -#: ../../../library/shutil.rst:182 +#: ../../../library/shutil.rst:185 msgid "" ":func:`~shutil.copy` copies the file data and the file's permission mode " "(see :func:`os.chmod`). Other metadata, like the file's creation and " @@ -254,18 +259,18 @@ msgid "" "original, use :func:`~shutil.copy2` instead." msgstr "" -#: ../../../library/shutil.rst:192 +#: ../../../library/shutil.rst:195 msgid "" "Added *follow_symlinks* argument. Now returns path to the newly created file." msgstr "" -#: ../../../library/shutil.rst:203 +#: ../../../library/shutil.rst:206 msgid "" "Identical to :func:`~shutil.copy` except that :func:`copy2` also attempts to " "preserve file metadata." msgstr "" -#: ../../../library/shutil.rst:206 +#: ../../../library/shutil.rst:209 msgid "" "When *follow_symlinks* is false, and *src* is a symbolic link, :func:`copy2` " "attempts to copy all metadata from the *src* symbolic link to the newly " @@ -275,41 +280,41 @@ msgid "" "`copy2` never raises an exception because it cannot preserve file metadata." msgstr "" -#: ../../../library/shutil.rst:215 +#: ../../../library/shutil.rst:218 msgid "" ":func:`copy2` uses :func:`copystat` to copy the file metadata. Please see :" "func:`copystat` for more information about platform support for modifying " "symbolic link metadata." msgstr "" -#: ../../../library/shutil.rst:223 +#: ../../../library/shutil.rst:226 msgid "" "Added *follow_symlinks* argument, try to copy extended file system " "attributes too (currently Linux only). Now returns path to the newly created " "file." msgstr "" -#: ../../../library/shutil.rst:235 +#: ../../../library/shutil.rst:238 msgid "" "This factory function creates a function that can be used as a callable for :" "func:`copytree`\\'s *ignore* argument, ignoring files and directories that " "match one of the glob-style *patterns* provided. See the example below." msgstr "" -#: ../../../library/shutil.rst:244 +#: ../../../library/shutil.rst:247 msgid "" "Recursively copy an entire directory tree rooted at *src* to a directory " "named *dst* and return the destination directory. All intermediate " "directories needed to contain *dst* will also be created by default." msgstr "" -#: ../../../library/shutil.rst:248 +#: ../../../library/shutil.rst:251 msgid "" "Permissions and times of directories are copied with :func:`copystat`, " "individual files are copied using :func:`~shutil.copy2`." msgstr "" -#: ../../../library/shutil.rst:251 +#: ../../../library/shutil.rst:254 msgid "" "If *symlinks* is true, symbolic links in the source tree are represented as " "symbolic links in the new tree and the metadata of the original links will " @@ -317,7 +322,7 @@ msgid "" "and metadata of the linked files are copied to the new tree." msgstr "" -#: ../../../library/shutil.rst:256 +#: ../../../library/shutil.rst:259 msgid "" "When *symlinks* is false, if the file pointed to by the symlink doesn't " "exist, an exception will be added in the list of errors raised in an :exc:" @@ -327,7 +332,7 @@ msgid "" "support :func:`os.symlink`." msgstr "" -#: ../../../library/shutil.rst:263 +#: ../../../library/shutil.rst:266 msgid "" "If *ignore* is given, it must be a callable that will receive as its " "arguments the directory being visited by :func:`copytree`, and a list of its " @@ -340,12 +345,12 @@ msgid "" "ignores names based on glob-style patterns." msgstr "" -#: ../../../library/shutil.rst:273 +#: ../../../library/shutil.rst:276 msgid "" "If exception(s) occur, an :exc:`Error` is raised with a list of reasons." msgstr "" -#: ../../../library/shutil.rst:275 +#: ../../../library/shutil.rst:278 msgid "" "If *copy_function* is given, it must be a callable that will be used to copy " "each file. It will be called with the source path and the destination path " @@ -353,7 +358,7 @@ msgid "" "that supports the same signature (like :func:`~shutil.copy`) can be used." msgstr "" -#: ../../../library/shutil.rst:280 +#: ../../../library/shutil.rst:283 msgid "" "If *dirs_exist_ok* is false (the default) and *dst* already exists, a :exc:" "`FileExistsError` is raised. If *dirs_exist_ok* is true, the copying " @@ -362,28 +367,28 @@ msgid "" "*src* tree." msgstr "" -#: ../../../library/shutil.rst:286 +#: ../../../library/shutil.rst:289 msgid "" "Raises an :ref:`auditing event ` ``shutil.copytree`` with " "arguments ``src``, ``dst``." msgstr "" -#: ../../../library/shutil.rst:288 +#: ../../../library/shutil.rst:291 msgid "" "Added the *copy_function* argument to be able to provide a custom copy " "function. Added the *ignore_dangling_symlinks* argument to silence dangling " "symlinks errors when *symlinks* is false." msgstr "" -#: ../../../library/shutil.rst:294 +#: ../../../library/shutil.rst:297 msgid "Copy metadata when *symlinks* is false. Now returns *dst*." msgstr "" -#: ../../../library/shutil.rst:303 +#: ../../../library/shutil.rst:306 msgid "Added the *dirs_exist_ok* parameter." msgstr "" -#: ../../../library/shutil.rst:310 +#: ../../../library/shutil.rst:313 msgid "" "Delete an entire directory tree; *path* must point to a directory (but not a " "symbolic link to a directory). If *ignore_errors* is true, errors resulting " @@ -392,13 +397,13 @@ msgid "" "are omitted, exceptions are propagated to the caller." msgstr "" -#: ../../../library/shutil.rst:316 +#: ../../../library/shutil.rst:319 msgid "" "This function can support :ref:`paths relative to directory descriptors " "`." msgstr "" -#: ../../../library/shutil.rst:321 +#: ../../../library/shutil.rst:324 msgid "" "On platforms that support the necessary fd-based functions a symlink attack " "resistant version of :func:`rmtree` is used by default. On other platforms, " @@ -409,13 +414,13 @@ msgid "" "attribute to determine which case applies." msgstr "" -#: ../../../library/shutil.rst:329 +#: ../../../library/shutil.rst:332 msgid "" "If *onexc* is provided, it must be a callable that accepts three parameters: " "*function*, *path*, and *excinfo*." msgstr "" -#: ../../../library/shutil.rst:332 +#: ../../../library/shutil.rst:335 msgid "" "The first parameter, *function*, is the function which raised the exception; " "it depends on the platform and implementation. The second parameter, " @@ -424,78 +429,78 @@ msgid "" "will not be caught." msgstr "" -#: ../../../library/shutil.rst:338 +#: ../../../library/shutil.rst:341 msgid "" "The deprecated *onerror* is similar to *onexc*, except that the third " "parameter it receives is the tuple returned from :func:`sys.exc_info`." msgstr "" -#: ../../../library/shutil.rst:342 +#: ../../../library/shutil.rst:345 msgid "" ":ref:`shutil-rmtree-example` for an example of handling the removal of a " "directory tree that contains read-only files." msgstr "" -#: ../../../library/shutil.rst:345 +#: ../../../library/shutil.rst:348 msgid "" "Raises an :ref:`auditing event ` ``shutil.rmtree`` with arguments " "``path``, ``dir_fd``." msgstr "" -#: ../../../library/shutil.rst:347 +#: ../../../library/shutil.rst:350 msgid "" "Added a symlink attack resistant version that is used automatically if " "platform supports fd-based functions." msgstr "" -#: ../../../library/shutil.rst:351 +#: ../../../library/shutil.rst:354 msgid "" "On Windows, will no longer delete the contents of a directory junction " "before removing the junction." msgstr "" -#: ../../../library/shutil.rst:355 +#: ../../../library/shutil.rst:358 msgid "Added the *dir_fd* parameter." msgstr "" -#: ../../../library/shutil.rst:358 +#: ../../../library/shutil.rst:361 msgid "Added the *onexc* parameter, deprecated *onerror*." msgstr "" -#: ../../../library/shutil.rst:361 +#: ../../../library/shutil.rst:364 msgid "" ":func:`!rmtree` now ignores :exc:`FileNotFoundError` exceptions for all but " "the top-level path. Exceptions other than :exc:`OSError` and subclasses of :" "exc:`!OSError` are now always propagated to the caller." msgstr "" -#: ../../../library/shutil.rst:369 +#: ../../../library/shutil.rst:372 msgid "" "Indicates whether the current platform and implementation provides a symlink " "attack resistant version of :func:`rmtree`. Currently this is only true for " "platforms supporting fd-based directory access functions." msgstr "" -#: ../../../library/shutil.rst:378 +#: ../../../library/shutil.rst:381 msgid "" "Recursively move a file or directory (*src*) to another location and return " "the destination." msgstr "" -#: ../../../library/shutil.rst:381 +#: ../../../library/shutil.rst:384 msgid "" "If *dst* is an existing directory or a symlink to a directory, then *src* is " "moved inside that directory. The destination path in that directory must not " "already exist." msgstr "" -#: ../../../library/shutil.rst:385 +#: ../../../library/shutil.rst:388 msgid "" "If *dst* already exists but is not a directory, it may be overwritten " "depending on :func:`os.rename` semantics." msgstr "" -#: ../../../library/shutil.rst:388 +#: ../../../library/shutil.rst:391 msgid "" ":func:`os.rename` is preferably used internally when *src* and the " "destination are on the same filesystem. In case :func:`os.rename` fails due " @@ -505,13 +510,13 @@ msgid "" "*copy_function* and then removed." msgstr "" -#: ../../../library/shutil.rst:394 +#: ../../../library/shutil.rst:397 msgid "" "In case of symlinks, a new symlink pointing to the target of *src* will be " "created in or as the destination, and *src* will be removed." msgstr "" -#: ../../../library/shutil.rst:397 +#: ../../../library/shutil.rst:400 msgid "" "If *copy_function* is given, it must be a callable that takes two arguments, " "*src* and the destination, and will be used to copy *src* to the destination " @@ -522,85 +527,85 @@ msgid "" "copy the metadata, at the expense of not copying any of the metadata." msgstr "" -#: ../../../library/shutil.rst:405 +#: ../../../library/shutil.rst:408 msgid "" "Raises an :ref:`auditing event ` ``shutil.move`` with arguments " "``src``, ``dst``." msgstr "" -#: ../../../library/shutil.rst:407 +#: ../../../library/shutil.rst:410 msgid "" "Added explicit symlink handling for foreign filesystems, thus adapting it to " "the behavior of GNU's :program:`mv`. Now returns *dst*." msgstr "" -#: ../../../library/shutil.rst:412 +#: ../../../library/shutil.rst:415 msgid "Added the *copy_function* keyword argument." msgstr "" -#: ../../../library/shutil.rst:420 +#: ../../../library/shutil.rst:423 msgid "Accepts a :term:`path-like object` for both *src* and *dst*." msgstr "" -#: ../../../library/shutil.rst:425 +#: ../../../library/shutil.rst:428 msgid "" "Return disk usage statistics about the given path as a :term:`named tuple` " "with the attributes *total*, *used* and *free*, which are the amount of " "total, used and free space, in bytes. *path* may be a file or a directory." msgstr "" -#: ../../../library/shutil.rst:432 +#: ../../../library/shutil.rst:435 msgid "" "On Unix filesystems, *path* must point to a path within a **mounted** " "filesystem partition. On those platforms, CPython doesn't attempt to " "retrieve disk usage information from non-mounted filesystems." msgstr "" -#: ../../../library/shutil.rst:438 +#: ../../../library/shutil.rst:441 msgid "On Windows, *path* can now be a file or directory." msgstr "" -#: ../../../library/shutil.rst:441 ../../../library/shutil.rst:455 +#: ../../../library/shutil.rst:444 ../../../library/shutil.rst:458 msgid "Availability" msgstr "" -#: ../../../library/shutil.rst:446 +#: ../../../library/shutil.rst:449 msgid "Change owner *user* and/or *group* of the given *path*." msgstr "" -#: ../../../library/shutil.rst:448 +#: ../../../library/shutil.rst:451 msgid "" "*user* can be a system user name or a uid; the same applies to *group*. At " "least one argument is required." msgstr "" -#: ../../../library/shutil.rst:451 +#: ../../../library/shutil.rst:454 msgid "See also :func:`os.chown`, the underlying function." msgstr "" -#: ../../../library/shutil.rst:453 +#: ../../../library/shutil.rst:456 msgid "" "Raises an :ref:`auditing event ` ``shutil.chown`` with arguments " "``path``, ``user``, ``group``." msgstr "" -#: ../../../library/shutil.rst:459 +#: ../../../library/shutil.rst:462 msgid "Added *dir_fd* and *follow_symlinks* parameters." msgstr "" -#: ../../../library/shutil.rst:465 +#: ../../../library/shutil.rst:468 msgid "" "Return the path to an executable which would be run if the given *cmd* was " "called. If no *cmd* would be called, return ``None``." msgstr "" -#: ../../../library/shutil.rst:468 +#: ../../../library/shutil.rst:471 msgid "" "*mode* is a permission mask passed to :func:`os.access`, by default " "determining if the file exists and is executable." msgstr "" -#: ../../../library/shutil.rst:471 +#: ../../../library/shutil.rst:474 msgid "" "*path* is a \"``PATH`` string\" specifying the directories to look in, " "delimited by :data:`os.pathsep`. When no *path* is specified, the :envvar:" @@ -608,14 +613,14 @@ msgid "" "to :data:`os.defpath` if it is not set." msgstr "" -#: ../../../library/shutil.rst:476 +#: ../../../library/shutil.rst:479 msgid "" "If *cmd* contains a directory component, :func:`!which` only checks the " "specified path directly and does not search the directories listed in *path* " "or in the system's :envvar:`PATH` environment variable." msgstr "" -#: ../../../library/shutil.rst:480 +#: ../../../library/shutil.rst:483 msgid "" "On Windows, the current directory is prepended to the *path* if *mode* does " "not include ``os.X_OK``. When the *mode* does include ``os.X_OK``, the " @@ -625,7 +630,7 @@ msgid "" "environment variable ``NoDefaultCurrentDirectoryInExePath``." msgstr "" -#: ../../../library/shutil.rst:487 +#: ../../../library/shutil.rst:490 msgid "" "Also on Windows, the :envvar:`PATHEXT` environment variable is used to " "resolve commands that may not already include an extension. For example, if " @@ -634,19 +639,19 @@ msgid "" "directories. For example, on Windows::" msgstr "" -#: ../../../library/shutil.rst:496 +#: ../../../library/shutil.rst:499 msgid "" "This is also applied when *cmd* is a path that contains a directory " "component::" msgstr "" -#: ../../../library/shutil.rst:504 +#: ../../../library/shutil.rst:507 msgid "" "The :class:`bytes` type is now accepted. If *cmd* type is :class:`bytes`, " "the result type is also :class:`bytes`." msgstr "" -#: ../../../library/shutil.rst:508 +#: ../../../library/shutil.rst:511 msgid "" "On Windows, the current directory is no longer prepended to the search path " "if *mode* includes ``os.X_OK`` and WinAPI " @@ -657,18 +662,18 @@ msgid "" "now be found." msgstr "" -#: ../../../library/shutil.rst:519 +#: ../../../library/shutil.rst:522 msgid "" "Subclass of :exc:`OSError` collecting exceptions raised during a multi-file " "operation. For :func:`copytree`, the exception argument is a list of 3-" "tuples (*srcname*, *dstname*, *exception*)." msgstr "" -#: ../../../library/shutil.rst:526 +#: ../../../library/shutil.rst:529 msgid "Platform-dependent efficient copy operations" msgstr "" -#: ../../../library/shutil.rst:528 +#: ../../../library/shutil.rst:531 msgid "" "Starting from Python 3.8, all functions involving a file copy (:func:" "`copyfile`, :func:`~shutil.copy`, :func:`copy2`, :func:`copytree`, and :func:" @@ -678,19 +683,19 @@ msgid "" "buffers in Python as in \"``outfd.write(infd.read())``\"." msgstr "" -#: ../../../library/shutil.rst:536 +#: ../../../library/shutil.rst:539 msgid "On macOS `fcopyfile`_ is used to copy the file content (not metadata)." msgstr "" -#: ../../../library/shutil.rst:538 +#: ../../../library/shutil.rst:541 msgid "On Linux :func:`os.copy_file_range` or :func:`os.sendfile` is used." msgstr "" -#: ../../../library/shutil.rst:540 +#: ../../../library/shutil.rst:543 msgid "On Solaris :func:`os.sendfile` is used." msgstr "" -#: ../../../library/shutil.rst:542 +#: ../../../library/shutil.rst:545 msgid "" "On Windows :func:`shutil.copyfile` uses a bigger default buffer size (1 MiB " "instead of 64 KiB) and a :func:`memoryview`-based variant of :func:`shutil." @@ -699,46 +704,46 @@ msgid "" "efficient method, supports copy-on-write, and preserves metadata." msgstr "" -#: ../../../library/shutil.rst:548 +#: ../../../library/shutil.rst:551 msgid "" "If the fast-copy operation fails and no data was written in the destination " "file then shutil will silently fall back to less efficient :func:" "`copyfileobj` function internally." msgstr "" -#: ../../../library/shutil.rst:554 +#: ../../../library/shutil.rst:557 msgid "Solaris now uses :func:`os.sendfile`." msgstr "" -#: ../../../library/shutil.rst:557 +#: ../../../library/shutil.rst:560 msgid "" "Copy-on-write or server-side copy may be used internally via :func:`os." "copy_file_range` on supported Linux filesystems." msgstr "" -#: ../../../library/shutil.rst:564 +#: ../../../library/shutil.rst:567 msgid "copytree example" msgstr "" -#: ../../../library/shutil.rst:566 +#: ../../../library/shutil.rst:569 msgid "An example that uses the :func:`ignore_patterns` helper::" msgstr "" -#: ../../../library/shutil.rst:572 +#: ../../../library/shutil.rst:575 msgid "" "This will copy everything except ``.pyc`` files and files or directories " "whose name starts with ``tmp``." msgstr "" -#: ../../../library/shutil.rst:575 +#: ../../../library/shutil.rst:578 msgid "Another example that uses the *ignore* argument to add a logging call::" msgstr "" -#: ../../../library/shutil.rst:590 +#: ../../../library/shutil.rst:593 msgid "rmtree example" msgstr "" -#: ../../../library/shutil.rst:592 +#: ../../../library/shutil.rst:595 msgid "" "This example shows how to remove a directory tree on Windows where some of " "the files have their read-only bit set. It uses the onexc callback to clear " @@ -746,31 +751,31 @@ msgid "" "propagate. ::" msgstr "" -#: ../../../library/shutil.rst:610 +#: ../../../library/shutil.rst:613 msgid "Archiving operations" msgstr "" -#: ../../../library/shutil.rst:614 +#: ../../../library/shutil.rst:617 msgid "Added support for the *xztar* format." msgstr "" -#: ../../../library/shutil.rst:618 +#: ../../../library/shutil.rst:621 msgid "" "High-level utilities to create and read compressed and archived files are " "also provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules." msgstr "" -#: ../../../library/shutil.rst:623 +#: ../../../library/shutil.rst:626 msgid "Create an archive file (such as zip or tar) and return its name." msgstr "" -#: ../../../library/shutil.rst:625 +#: ../../../library/shutil.rst:628 msgid "" "*base_name* is a string or :term:`path-like object` specifying the name of " "the file to create, including the path, minus any format-specific extension." msgstr "" -#: ../../../library/shutil.rst:628 +#: ../../../library/shutil.rst:631 msgid "" "*format* is the archive format: one of \"zip\" (if the :mod:`zlib` module is " "available), \"tar\", \"gztar\" (if the :mod:`zlib` module is available), " @@ -779,7 +784,7 @@ msgid "" "module is available)." msgstr "" -#: ../../../library/shutil.rst:634 +#: ../../../library/shutil.rst:637 msgid "" "*root_dir* is a string or :term:`path-like object` specifying a directory " "that will be the root directory of the archive, all paths in the archive " @@ -787,7 +792,7 @@ msgid "" "before creating the archive." msgstr "" -#: ../../../library/shutil.rst:639 +#: ../../../library/shutil.rst:642 msgid "" "*base_dir* is a string or :term:`path-like object` specifying a directory " "where we start archiving from; i.e. *base_dir* will be the common prefix of " @@ -796,39 +801,39 @@ msgid "" "use *base_dir* and *root_dir* together." msgstr "" -#: ../../../library/shutil.rst:645 +#: ../../../library/shutil.rst:648 msgid "*root_dir* and *base_dir* both default to the current directory." msgstr "" -#: ../../../library/shutil.rst:647 +#: ../../../library/shutil.rst:650 msgid "" "If *dry_run* is true, no archive is created, but the operations that would " "be executed are logged to *logger*." msgstr "" -#: ../../../library/shutil.rst:650 +#: ../../../library/shutil.rst:653 msgid "" "*owner* and *group* are used when creating a tar archive. By default, uses " "the current owner and group." msgstr "" -#: ../../../library/shutil.rst:653 +#: ../../../library/shutil.rst:656 msgid "" "*logger* must be an object compatible with :pep:`282`, usually an instance " "of :class:`logging.Logger`." msgstr "" -#: ../../../library/shutil.rst:656 +#: ../../../library/shutil.rst:659 msgid "The *verbose* argument is unused and deprecated." msgstr "" -#: ../../../library/shutil.rst:658 +#: ../../../library/shutil.rst:661 msgid "" "Raises an :ref:`auditing event ` ``shutil.make_archive`` with " "arguments ``base_name``, ``format``, ``root_dir``, ``base_dir``." msgstr "" -#: ../../../library/shutil.rst:662 +#: ../../../library/shutil.rst:665 msgid "" "This function is not thread-safe when custom archivers registered with :func:" "`register_archive_format` do not support the *root_dir* argument. In this " @@ -836,72 +841,72 @@ msgid "" "*root_dir* to perform archiving." msgstr "" -#: ../../../library/shutil.rst:668 +#: ../../../library/shutil.rst:671 msgid "" "The modern pax (POSIX.1-2001) format is now used instead of the legacy GNU " "format for archives created with ``format=\"tar\"``." msgstr "" -#: ../../../library/shutil.rst:672 +#: ../../../library/shutil.rst:675 msgid "" "This function is now made thread-safe during creation of standard ``.zip`` " "and tar archives." msgstr "" -#: ../../../library/shutil.rst:676 +#: ../../../library/shutil.rst:679 msgid "" "Accepts a :term:`path-like object` for *base_name*, *root_dir* and " "*base_dir*." msgstr "" -#: ../../../library/shutil.rst:682 +#: ../../../library/shutil.rst:685 msgid "" "Return a list of supported formats for archiving. Each element of the " "returned sequence is a tuple ``(name, description)``." msgstr "" -#: ../../../library/shutil.rst:685 ../../../library/shutil.rst:802 +#: ../../../library/shutil.rst:688 ../../../library/shutil.rst:805 msgid "By default :mod:`!shutil` provides these formats:" msgstr "" -#: ../../../library/shutil.rst:687 +#: ../../../library/shutil.rst:690 msgid "*zip*: ZIP file (if the :mod:`zlib` module is available)." msgstr "" -#: ../../../library/shutil.rst:688 +#: ../../../library/shutil.rst:691 msgid "" "*tar*: Uncompressed tar file. Uses POSIX.1-2001 pax format for new archives." msgstr "" -#: ../../../library/shutil.rst:689 ../../../library/shutil.rst:807 +#: ../../../library/shutil.rst:692 ../../../library/shutil.rst:810 msgid "*gztar*: gzip'ed tar-file (if the :mod:`zlib` module is available)." msgstr "" -#: ../../../library/shutil.rst:690 ../../../library/shutil.rst:808 +#: ../../../library/shutil.rst:693 ../../../library/shutil.rst:811 msgid "*bztar*: bzip2'ed tar-file (if the :mod:`bz2` module is available)." msgstr "" -#: ../../../library/shutil.rst:691 ../../../library/shutil.rst:809 +#: ../../../library/shutil.rst:694 ../../../library/shutil.rst:812 msgid "*xztar*: xz'ed tar-file (if the :mod:`lzma` module is available)." msgstr "" -#: ../../../library/shutil.rst:692 ../../../library/shutil.rst:810 +#: ../../../library/shutil.rst:695 ../../../library/shutil.rst:813 msgid "" "*zstdtar*: Zstandard compressed tar-file (if the :mod:`compression.zstd` " "module is available)." msgstr "" -#: ../../../library/shutil.rst:695 +#: ../../../library/shutil.rst:698 msgid "" "You can register new formats or provide your own archiver for any existing " "formats, by using :func:`register_archive_format`." msgstr "" -#: ../../../library/shutil.rst:701 +#: ../../../library/shutil.rst:704 msgid "Register an archiver for the format *name*." msgstr "" -#: ../../../library/shutil.rst:703 +#: ../../../library/shutil.rst:706 msgid "" "*function* is the callable that will be used to create archives. The " "callable will receive the *base_name* of the file to create, followed by the " @@ -910,7 +915,7 @@ msgid "" "*dry_run* and *logger* (as passed in :func:`make_archive`)." msgstr "" -#: ../../../library/shutil.rst:709 +#: ../../../library/shutil.rst:712 msgid "" "If *function* has the custom attribute ``function.supports_root_dir`` set to " "``True``, the *root_dir* argument is passed as a keyword argument. Otherwise " @@ -919,37 +924,37 @@ msgid "" "not thread-safe." msgstr "" -#: ../../../library/shutil.rst:715 +#: ../../../library/shutil.rst:718 msgid "" "If given, *extra_args* is a sequence of ``(name, value)`` pairs that will be " "used as extra keywords arguments when the archiver callable is used." msgstr "" -#: ../../../library/shutil.rst:718 +#: ../../../library/shutil.rst:721 msgid "" "*description* is used by :func:`get_archive_formats` which returns the list " "of archivers. Defaults to an empty string." msgstr "" -#: ../../../library/shutil.rst:721 +#: ../../../library/shutil.rst:724 msgid "Added support for functions supporting the *root_dir* argument." msgstr "" -#: ../../../library/shutil.rst:727 +#: ../../../library/shutil.rst:730 msgid "Remove the archive format *name* from the list of supported formats." msgstr "" -#: ../../../library/shutil.rst:732 +#: ../../../library/shutil.rst:735 msgid "Unpack an archive. *filename* is the full path of the archive." msgstr "" -#: ../../../library/shutil.rst:734 +#: ../../../library/shutil.rst:737 msgid "" "*extract_dir* is the name of the target directory where the archive is " "unpacked. If not provided, the current working directory is used." msgstr "" -#: ../../../library/shutil.rst:737 +#: ../../../library/shutil.rst:740 msgid "" "*format* is the archive format: one of \"zip\", \"tar\", \"gztar\", " "\"bztar\", \"xztar\", or \"zstdtar\". Or any other format registered with :" @@ -958,7 +963,7 @@ msgid "" "for that extension. In case none is found, a :exc:`ValueError` is raised." msgstr "" -#: ../../../library/shutil.rst:744 +#: ../../../library/shutil.rst:747 msgid "" "The keyword-only *filter* argument is passed to the underlying unpacking " "function. For zip files, *filter* is not accepted. For tar files, it is " @@ -967,13 +972,13 @@ msgid "" "extraction-filter` for details.)" msgstr "" -#: ../../../library/shutil.rst:750 +#: ../../../library/shutil.rst:753 msgid "" "Raises an :ref:`auditing event ` ``shutil.unpack_archive`` with " "arguments ``filename``, ``extract_dir``, ``format``." msgstr "" -#: ../../../library/shutil.rst:754 +#: ../../../library/shutil.rst:757 msgid "" "Never extract archives from untrusted sources without prior inspection. It " "is possible that files are created outside of the path specified in the " @@ -981,7 +986,7 @@ msgid "" "filenames with \"..\" components." msgstr "" -#: ../../../library/shutil.rst:759 +#: ../../../library/shutil.rst:762 msgid "" "Since Python 3.14, the defaults for both built-in formats (zip and tar " "files) will prevent the most dangerous of such security issues, but will not " @@ -989,138 +994,138 @@ msgid "" "verification` section for tar-specific details." msgstr "" -#: ../../../library/shutil.rst:765 +#: ../../../library/shutil.rst:768 msgid "Accepts a :term:`path-like object` for *filename* and *extract_dir*." msgstr "" -#: ../../../library/shutil.rst:768 +#: ../../../library/shutil.rst:771 msgid "Added the *filter* argument." msgstr "" -#: ../../../library/shutil.rst:773 +#: ../../../library/shutil.rst:776 msgid "" "Registers an unpack format. *name* is the name of the format and " "*extensions* is a list of extensions corresponding to the format, like ``." "zip`` for Zip files." msgstr "" -#: ../../../library/shutil.rst:777 +#: ../../../library/shutil.rst:780 msgid "" "*function* is the callable that will be used to unpack archives. The " "callable will receive:" msgstr "" -#: ../../../library/shutil.rst:780 +#: ../../../library/shutil.rst:783 msgid "the path of the archive, as a positional argument;" msgstr "" -#: ../../../library/shutil.rst:781 +#: ../../../library/shutil.rst:784 msgid "" "the directory the archive must be extracted to, as a positional argument;" msgstr "" -#: ../../../library/shutil.rst:782 +#: ../../../library/shutil.rst:785 msgid "" "possibly a *filter* keyword argument, if it was given to :func:" "`unpack_archive`;" msgstr "" -#: ../../../library/shutil.rst:784 +#: ../../../library/shutil.rst:787 msgid "" "additional keyword arguments, specified by *extra_args* as a sequence of " "``(name, value)`` tuples." msgstr "" -#: ../../../library/shutil.rst:787 +#: ../../../library/shutil.rst:790 msgid "" "*description* can be provided to describe the format, and will be returned " "by the :func:`get_unpack_formats` function." msgstr "" -#: ../../../library/shutil.rst:793 +#: ../../../library/shutil.rst:796 msgid "Unregister an unpack format. *name* is the name of the format." msgstr "" -#: ../../../library/shutil.rst:798 +#: ../../../library/shutil.rst:801 msgid "" "Return a list of all registered formats for unpacking. Each element of the " "returned sequence is a tuple ``(name, extensions, description)``." msgstr "" -#: ../../../library/shutil.rst:804 +#: ../../../library/shutil.rst:807 msgid "" "*zip*: ZIP file (unpacking compressed files works only if the corresponding " "module is available)." msgstr "" -#: ../../../library/shutil.rst:806 +#: ../../../library/shutil.rst:809 msgid "*tar*: uncompressed tar file." msgstr "" -#: ../../../library/shutil.rst:813 +#: ../../../library/shutil.rst:816 msgid "" "You can register new formats or provide your own unpacker for any existing " "formats, by using :func:`register_unpack_format`." msgstr "" -#: ../../../library/shutil.rst:820 +#: ../../../library/shutil.rst:823 msgid "Archiving example" msgstr "" -#: ../../../library/shutil.rst:822 +#: ../../../library/shutil.rst:825 msgid "" "In this example, we create a gzip'ed tar-file archive containing all files " "found in the :file:`.ssh` directory of the user::" msgstr "" -#: ../../../library/shutil.rst:832 +#: ../../../library/shutil.rst:835 msgid "The resulting archive contains:" msgstr "" -#: ../../../library/shutil.rst:850 +#: ../../../library/shutil.rst:853 msgid "Archiving example with *base_dir*" msgstr "" -#: ../../../library/shutil.rst:852 +#: ../../../library/shutil.rst:855 msgid "" "In this example, similar to the `one above `_, we " "show how to use :func:`make_archive`, but this time with the usage of " "*base_dir*. We now have the following directory structure:" msgstr "" -#: ../../../library/shutil.rst:866 +#: ../../../library/shutil.rst:869 msgid "" "In the final archive, :file:`please_add.txt` should be included, but :file:" "`do_not_add.txt` should not. Therefore we use the following::" msgstr "" -#: ../../../library/shutil.rst:880 +#: ../../../library/shutil.rst:883 msgid "Listing the files in the resulting archive gives us:" msgstr "" -#: ../../../library/shutil.rst:890 +#: ../../../library/shutil.rst:893 msgid "Querying the size of the output terminal" msgstr "" -#: ../../../library/shutil.rst:894 +#: ../../../library/shutil.rst:897 msgid "Get the size of the terminal window." msgstr "" -#: ../../../library/shutil.rst:896 +#: ../../../library/shutil.rst:899 msgid "" "For each of the two dimensions, the environment variable, ``COLUMNS`` and " "``LINES`` respectively, is checked. If the variable is defined and the value " "is a positive integer, it is used." msgstr "" -#: ../../../library/shutil.rst:900 +#: ../../../library/shutil.rst:903 msgid "" "When ``COLUMNS`` or ``LINES`` is not defined, which is the common case, the " "terminal connected to :data:`sys.__stdout__` is queried by invoking :func:" "`os.get_terminal_size`." msgstr "" -#: ../../../library/shutil.rst:904 +#: ../../../library/shutil.rst:907 msgid "" "If the terminal size cannot be successfully queried, either because the " "system doesn't support querying, or because we are not connected to a " @@ -1129,17 +1134,17 @@ msgid "" "emulators." msgstr "" -#: ../../../library/shutil.rst:910 +#: ../../../library/shutil.rst:913 msgid "The value returned is a named tuple of type :class:`os.terminal_size`." msgstr "" -#: ../../../library/shutil.rst:912 +#: ../../../library/shutil.rst:915 msgid "" "See also: The Single UNIX Specification, Version 2, `Other Environment " "Variables`_." msgstr "" -#: ../../../library/shutil.rst:917 +#: ../../../library/shutil.rst:920 msgid "" "The ``fallback`` values are also used if :func:`os.get_terminal_size` " "returns zeroes." @@ -1157,10 +1162,10 @@ msgstr "" msgid "copying files" msgstr "" -#: ../../../library/shutil.rst:308 +#: ../../../library/shutil.rst:311 msgid "directory" msgstr "" -#: ../../../library/shutil.rst:308 +#: ../../../library/shutil.rst:311 msgid "deleting" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/stdtypes.pot b/main/locale/pot/LC_MESSAGES/library/stdtypes.pot index 4bad75b63d9..8e877fae282 100644 --- a/main/locale/pot/LC_MESSAGES/library/stdtypes.pot +++ b/main/locale/pot/LC_MESSAGES/library/stdtypes.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -116,8 +116,8 @@ msgstr "" #: ../../../library/stdtypes.rst:88 ../../../library/stdtypes.rst:292 #: ../../../library/stdtypes.rst:432 ../../../library/stdtypes.rst:1015 -#: ../../../library/stdtypes.rst:1237 ../../../library/stdtypes.rst:3202 -#: ../../../library/stdtypes.rst:4499 +#: ../../../library/stdtypes.rst:1237 ../../../library/stdtypes.rst:3206 +#: ../../../library/stdtypes.rst:4503 msgid "Notes" msgstr "" @@ -131,7 +131,7 @@ msgstr "" #: ../../../library/stdtypes.rst:90 ../../../library/stdtypes.rst:1017 #: ../../../library/stdtypes.rst:1020 ../../../library/stdtypes.rst:1252 -#: ../../../library/stdtypes.rst:3208 ../../../library/stdtypes.rst:4505 +#: ../../../library/stdtypes.rst:3212 ../../../library/stdtypes.rst:4509 msgid "\\(1)" msgstr "" @@ -145,8 +145,8 @@ msgstr "" #: ../../../library/stdtypes.rst:93 ../../../library/stdtypes.rst:305 #: ../../../library/stdtypes.rst:325 ../../../library/stdtypes.rst:1263 -#: ../../../library/stdtypes.rst:3212 ../../../library/stdtypes.rst:3214 -#: ../../../library/stdtypes.rst:4509 ../../../library/stdtypes.rst:4511 +#: ../../../library/stdtypes.rst:3216 ../../../library/stdtypes.rst:3218 +#: ../../../library/stdtypes.rst:4513 ../../../library/stdtypes.rst:4515 msgid "\\(2)" msgstr "" @@ -158,18 +158,18 @@ msgstr "" msgid "if *x* is false, then ``True``, else ``False``" msgstr "" -#: ../../../library/stdtypes.rst:96 ../../../library/stdtypes.rst:3216 -#: ../../../library/stdtypes.rst:3218 ../../../library/stdtypes.rst:3220 -#: ../../../library/stdtypes.rst:3222 ../../../library/stdtypes.rst:4513 -#: ../../../library/stdtypes.rst:4515 ../../../library/stdtypes.rst:4517 -#: ../../../library/stdtypes.rst:4519 +#: ../../../library/stdtypes.rst:96 ../../../library/stdtypes.rst:3220 +#: ../../../library/stdtypes.rst:3222 ../../../library/stdtypes.rst:3224 +#: ../../../library/stdtypes.rst:3226 ../../../library/stdtypes.rst:4517 +#: ../../../library/stdtypes.rst:4519 ../../../library/stdtypes.rst:4521 +#: ../../../library/stdtypes.rst:4523 msgid "\\(3)" msgstr "" #: ../../../library/stdtypes.rst:105 ../../../library/stdtypes.rst:336 #: ../../../library/stdtypes.rst:450 ../../../library/stdtypes.rst:1059 -#: ../../../library/stdtypes.rst:1267 ../../../library/stdtypes.rst:3252 -#: ../../../library/stdtypes.rst:4549 +#: ../../../library/stdtypes.rst:1267 ../../../library/stdtypes.rst:3256 +#: ../../../library/stdtypes.rst:4553 msgid "Notes:" msgstr "" @@ -208,9 +208,9 @@ msgstr "" msgid "This table summarizes the comparison operations:" msgstr "" -#: ../../../library/stdtypes.rst:146 ../../../library/stdtypes.rst:3179 -#: ../../../library/stdtypes.rst:3202 ../../../library/stdtypes.rst:4476 -#: ../../../library/stdtypes.rst:4499 +#: ../../../library/stdtypes.rst:146 ../../../library/stdtypes.rst:3183 +#: ../../../library/stdtypes.rst:3206 ../../../library/stdtypes.rst:4480 +#: ../../../library/stdtypes.rst:4503 msgid "Meaning" msgstr "" @@ -519,8 +519,8 @@ msgid "" "zero." msgstr "" -#: ../../../library/stdtypes.rst:318 ../../../library/stdtypes.rst:3210 -#: ../../../library/stdtypes.rst:4536 +#: ../../../library/stdtypes.rst:318 ../../../library/stdtypes.rst:3214 +#: ../../../library/stdtypes.rst:4540 msgid "\\(6)" msgstr "" @@ -557,9 +557,9 @@ msgid "*x* to the power *y*" msgstr "" #: ../../../library/stdtypes.rst:327 ../../../library/stdtypes.rst:329 -#: ../../../library/stdtypes.rst:3235 ../../../library/stdtypes.rst:3238 -#: ../../../library/stdtypes.rst:3241 ../../../library/stdtypes.rst:4532 -#: ../../../library/stdtypes.rst:4539 +#: ../../../library/stdtypes.rst:3239 ../../../library/stdtypes.rst:3242 +#: ../../../library/stdtypes.rst:3245 ../../../library/stdtypes.rst:4536 +#: ../../../library/stdtypes.rst:4543 msgid "\\(5)" msgstr "" @@ -697,9 +697,9 @@ msgid "bitwise :dfn:`or` of *x* and *y*" msgstr "" #: ../../../library/stdtypes.rst:434 ../../../library/stdtypes.rst:437 -#: ../../../library/stdtypes.rst:440 ../../../library/stdtypes.rst:3224 -#: ../../../library/stdtypes.rst:3228 ../../../library/stdtypes.rst:4521 -#: ../../../library/stdtypes.rst:4525 +#: ../../../library/stdtypes.rst:440 ../../../library/stdtypes.rst:3228 +#: ../../../library/stdtypes.rst:3232 ../../../library/stdtypes.rst:4525 +#: ../../../library/stdtypes.rst:4529 msgid "\\(4)" msgstr "" @@ -2394,112 +2394,128 @@ msgid ":meth:`bytes.rstrip`" msgstr "" #: ../../../library/stdtypes.rst:1724 -msgid "Translation and Encoding" +msgid ":meth:`str.removeprefix`" msgstr "" #: ../../../library/stdtypes.rst:1724 +msgid ":meth:`bytes.removeprefix`" +msgstr "" + +#: ../../../library/stdtypes.rst:1726 +msgid ":meth:`str.removesuffix`" +msgstr "" + +#: ../../../library/stdtypes.rst:1726 +msgid ":meth:`bytes.removesuffix`" +msgstr "" + +#: ../../../library/stdtypes.rst:1728 +msgid "Translation and Encoding" +msgstr "" + +#: ../../../library/stdtypes.rst:1728 msgid ":meth:`str.translate`" msgstr "" -#: ../../../library/stdtypes.rst:1724 +#: ../../../library/stdtypes.rst:1728 msgid ":meth:`bytes.translate`" msgstr "" -#: ../../../library/stdtypes.rst:1726 +#: ../../../library/stdtypes.rst:1730 msgid ":meth:`str.maketrans`" msgstr "" -#: ../../../library/stdtypes.rst:1726 +#: ../../../library/stdtypes.rst:1730 msgid ":meth:`bytes.maketrans`" msgstr "" -#: ../../../library/stdtypes.rst:1728 +#: ../../../library/stdtypes.rst:1732 msgid ":meth:`str.encode`" msgstr "" -#: ../../../library/stdtypes.rst:1730 +#: ../../../library/stdtypes.rst:1734 msgid ":meth:`bytes.decode`" msgstr "" -#: ../../../library/stdtypes.rst:1736 +#: ../../../library/stdtypes.rst:1740 msgid "Text Sequence Type --- :class:`str`" msgstr "" -#: ../../../library/stdtypes.rst:1738 +#: ../../../library/stdtypes.rst:1742 msgid "" "Textual data in Python is handled with :class:`str` objects, or :dfn:" "`strings`. Strings are immutable :ref:`sequences ` of Unicode code " "points. String literals are written in a variety of ways:" msgstr "" -#: ../../../library/stdtypes.rst:1743 +#: ../../../library/stdtypes.rst:1747 msgid "Single quotes: ``'allows embedded \"double\" quotes'``" msgstr "" -#: ../../../library/stdtypes.rst:1744 +#: ../../../library/stdtypes.rst:1748 msgid "Double quotes: ``\"allows embedded 'single' quotes\"``" msgstr "" -#: ../../../library/stdtypes.rst:1745 +#: ../../../library/stdtypes.rst:1749 msgid "" "Triple quoted: ``'''Three single quotes'''``, ``\"\"\"Three double " "quotes\"\"\"``" msgstr "" -#: ../../../library/stdtypes.rst:1747 +#: ../../../library/stdtypes.rst:1751 msgid "" "Triple quoted strings may span multiple lines - all associated whitespace " "will be included in the string literal." msgstr "" -#: ../../../library/stdtypes.rst:1750 +#: ../../../library/stdtypes.rst:1754 msgid "" "String literals that are part of a single expression and have only " "whitespace between them will be implicitly converted to a single string " "literal. That is, ``(\"spam \" \"eggs\") == \"spam eggs\"``." msgstr "" -#: ../../../library/stdtypes.rst:1754 +#: ../../../library/stdtypes.rst:1758 msgid "" "See :ref:`strings` for more about the various forms of string literal, " "including supported :ref:`escape sequences `, and the " "``r`` (\"raw\") prefix that disables most escape sequence processing." msgstr "" -#: ../../../library/stdtypes.rst:1758 +#: ../../../library/stdtypes.rst:1762 msgid "" "Strings may also be created from other objects using the :class:`str` " "constructor." msgstr "" -#: ../../../library/stdtypes.rst:1761 +#: ../../../library/stdtypes.rst:1765 msgid "" "Since there is no separate \"character\" type, indexing a string produces " "strings of length 1. That is, for a non-empty string *s*, ``s[0] == s[0:1]``." msgstr "" -#: ../../../library/stdtypes.rst:1767 +#: ../../../library/stdtypes.rst:1771 msgid "" "There is also no mutable string type, but :meth:`str.join` or :class:`io." "StringIO` can be used to efficiently construct strings from multiple " "fragments." msgstr "" -#: ../../../library/stdtypes.rst:1771 +#: ../../../library/stdtypes.rst:1775 msgid "" "For backwards compatibility with the Python 2 series, the ``u`` prefix is " "once again permitted on string literals. It has no effect on the meaning of " "string literals and cannot be combined with the ``r`` prefix." msgstr "" -#: ../../../library/stdtypes.rst:1785 +#: ../../../library/stdtypes.rst:1789 msgid "" "Return a :ref:`string ` version of *object*. If *object* is not " "provided, returns the empty string. Otherwise, the behavior of ``str()`` " "depends on whether *encoding* or *errors* is given, as follows." msgstr "" -#: ../../../library/stdtypes.rst:1789 +#: ../../../library/stdtypes.rst:1793 msgid "" "If neither *encoding* nor *errors* is given, ``str(object)`` returns :meth:" "`type(object).__str__(object) `, which is the \"informal\" " @@ -2509,7 +2525,7 @@ msgid "" "`repr(object) `." msgstr "" -#: ../../../library/stdtypes.rst:1801 +#: ../../../library/stdtypes.rst:1805 msgid "" "If at least one of *encoding* or *errors* is given, *object* should be a :" "term:`bytes-like object` (e.g. :class:`bytes` or :class:`bytearray`). In " @@ -2521,7 +2537,7 @@ msgid "" "buffer objects." msgstr "" -#: ../../../library/stdtypes.rst:1810 +#: ../../../library/stdtypes.rst:1814 msgid "" "Passing a :class:`bytes` object to :func:`str` without the *encoding* or " "*errors* arguments falls under the first case of returning the informal " @@ -2529,7 +2545,7 @@ msgid "" "Python). For example::" msgstr "" -#: ../../../library/stdtypes.rst:1818 +#: ../../../library/stdtypes.rst:1822 msgid "" "For more information on the ``str`` class and its methods, see :ref:" "`textseq` and the :ref:`string-methods` section below. To output formatted " @@ -2537,17 +2553,17 @@ msgid "" "addition, see the :ref:`stringservices` section." msgstr "" -#: ../../../library/stdtypes.rst:1830 +#: ../../../library/stdtypes.rst:1834 msgid "String Methods" msgstr "" -#: ../../../library/stdtypes.rst:1835 +#: ../../../library/stdtypes.rst:1839 msgid "" "Strings implement all of the :ref:`common ` sequence " "operations, along with the additional methods described below." msgstr "" -#: ../../../library/stdtypes.rst:1838 +#: ../../../library/stdtypes.rst:1842 msgid "" "Strings also support two styles of string formatting, one providing a large " "degree of flexibility and customization (see :meth:`str.format`, :ref:" @@ -2557,33 +2573,33 @@ msgid "" "handle (:ref:`old-string-formatting`)." msgstr "" -#: ../../../library/stdtypes.rst:1845 +#: ../../../library/stdtypes.rst:1849 msgid "" "The :ref:`textservices` section of the standard library covers a number of " "other modules that provide various text related utilities (including regular " "expression support in the :mod:`re` module)." msgstr "" -#: ../../../library/stdtypes.rst:1851 +#: ../../../library/stdtypes.rst:1855 msgid "" "Return a copy of the string with its first character capitalized and the " "rest lowercased." msgstr "" -#: ../../../library/stdtypes.rst:1854 +#: ../../../library/stdtypes.rst:1858 msgid "" "The first character is now put into titlecase rather than uppercase. This " "means that characters like digraphs will only have their first letter " "capitalized, instead of the full character." msgstr "" -#: ../../../library/stdtypes.rst:1861 +#: ../../../library/stdtypes.rst:1865 msgid "" "Return a casefolded copy of the string. Casefolded strings may be used for " "caseless matching." msgstr "" -#: ../../../library/stdtypes.rst:1864 +#: ../../../library/stdtypes.rst:1868 msgid "" "Casefolding is similar to lowercasing but more aggressive because it is " "intended to remove all case distinctions in a string. For example, the " @@ -2592,44 +2608,44 @@ msgid "" "`casefold` converts it to ``\"ss\"``. For example:" msgstr "" -#: ../../../library/stdtypes.rst:1878 +#: ../../../library/stdtypes.rst:1882 msgid "" "The casefolding algorithm is `described in section 3.13.3 'Default Case " "Folding' of the Unicode Standard `__." msgstr "" -#: ../../../library/stdtypes.rst:1887 +#: ../../../library/stdtypes.rst:1891 msgid "" "Return centered in a string of length *width*. Padding is done using the " "specified *fillchar* (default is an ASCII space). The original string is " "returned if *width* is less than or equal to ``len(s)``. For example::" msgstr "" -#: ../../../library/stdtypes.rst:1901 +#: ../../../library/stdtypes.rst:1905 msgid "" "Return the number of non-overlapping occurrences of substring *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " "interpreted as in slice notation." msgstr "" -#: ../../../library/stdtypes.rst:1905 +#: ../../../library/stdtypes.rst:1909 msgid "" "If *sub* is empty, returns the number of empty strings between characters " "which is the length of the string plus one. For example::" msgstr "" -#: ../../../library/stdtypes.rst:1921 +#: ../../../library/stdtypes.rst:1925 msgid "Return the string encoded to :class:`bytes`." msgstr "" -#: ../../../library/stdtypes.rst:1923 ../../../library/stdtypes.rst:3671 +#: ../../../library/stdtypes.rst:1927 ../../../library/stdtypes.rst:3675 msgid "" "*encoding* defaults to ``'utf-8'``; see :ref:`standard-encodings` for " "possible values." msgstr "" -#: ../../../library/stdtypes.rst:1926 +#: ../../../library/stdtypes.rst:1930 msgid "" "*errors* controls how encoding errors are handled. If ``'strict'`` (the " "default), a :exc:`UnicodeError` exception is raised. Other possible values " @@ -2638,24 +2654,24 @@ msgid "" "register_error`. See :ref:`error-handlers` for details." msgstr "" -#: ../../../library/stdtypes.rst:1933 +#: ../../../library/stdtypes.rst:1937 msgid "" "For performance reasons, the value of *errors* is not checked for validity " "unless an encoding error actually occurs, :ref:`devmode` is enabled or a :" "ref:`debug build ` is used. For example::" msgstr "" -#: ../../../library/stdtypes.rst:1946 ../../../library/stdtypes.rst:3690 +#: ../../../library/stdtypes.rst:1950 ../../../library/stdtypes.rst:3694 msgid "Added support for keyword arguments." msgstr "" -#: ../../../library/stdtypes.rst:1949 ../../../library/stdtypes.rst:3693 +#: ../../../library/stdtypes.rst:1953 ../../../library/stdtypes.rst:3697 msgid "" "The value of the *errors* argument is now checked in :ref:`devmode` and in :" "ref:`debug mode `." msgstr "" -#: ../../../library/stdtypes.rst:1956 +#: ../../../library/stdtypes.rst:1960 msgid "" "Return ``True`` if the string ends with the specified *suffix*, otherwise " "return ``False``. *suffix* can also be a tuple of suffixes to look for. " @@ -2664,11 +2680,11 @@ msgid "" "equivalent to ``str[start:end].endswith(suffix)``. For example::" msgstr "" -#: ../../../library/stdtypes.rst:1971 +#: ../../../library/stdtypes.rst:1975 msgid "See also :meth:`startswith` and :meth:`removesuffix`." msgstr "" -#: ../../../library/stdtypes.rst:1976 +#: ../../../library/stdtypes.rst:1980 msgid "" "Return a copy of the string where all tab characters are replaced by one or " "more spaces, depending on the current column and the given tab size. Tab " @@ -2684,7 +2700,7 @@ msgid "" "printed. For example::" msgstr "" -#: ../../../library/stdtypes.rst:2000 +#: ../../../library/stdtypes.rst:2004 msgid "" "Return the lowest index in the string where substring *sub* is found within " "the slice ``s[start:end]``. Optional arguments *start* and *end* are " @@ -2692,18 +2708,18 @@ msgid "" "example::" msgstr "" -#: ../../../library/stdtypes.rst:2010 +#: ../../../library/stdtypes.rst:2014 msgid "See also :meth:`rfind` and :meth:`index`." msgstr "" -#: ../../../library/stdtypes.rst:2014 +#: ../../../library/stdtypes.rst:2018 msgid "" "The :meth:`~str.find` method should be used only if you need to know the " "position of *sub*. To check if *sub* is a substring or not, use the :" "keyword:`in` operator::" msgstr "" -#: ../../../library/stdtypes.rst:2024 +#: ../../../library/stdtypes.rst:2028 msgid "" "Perform a string formatting operation. The string on which this method is " "called can contain literal text or replacement fields delimited by braces " @@ -2713,13 +2729,13 @@ msgid "" "the corresponding argument. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2040 +#: ../../../library/stdtypes.rst:2044 msgid "" "See :ref:`formatstrings` for a description of the various formatting options " "that can be specified in format strings." msgstr "" -#: ../../../library/stdtypes.rst:2044 +#: ../../../library/stdtypes.rst:2048 msgid "" "When formatting a number (:class:`int`, :class:`float`, :class:`complex`, :" "class:`decimal.Decimal` and subclasses) with the ``n`` type (ex: ``'{:n}'." @@ -2730,30 +2746,30 @@ msgid "" "This temporary change affects other threads." msgstr "" -#: ../../../library/stdtypes.rst:2053 +#: ../../../library/stdtypes.rst:2057 msgid "" "When formatting a number with the ``n`` type, the function sets temporarily " "the ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale in some cases." msgstr "" -#: ../../../library/stdtypes.rst:2061 +#: ../../../library/stdtypes.rst:2065 msgid "" "Similar to ``str.format(**mapping)``, except that ``mapping`` is used " "directly and not copied to a :class:`dict`. This is useful if for example " "``mapping`` is a dict subclass:" msgstr "" -#: ../../../library/stdtypes.rst:2077 +#: ../../../library/stdtypes.rst:2081 msgid "" "Like :meth:`~str.find`, but raise :exc:`ValueError` when the substring is " "not found. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2091 +#: ../../../library/stdtypes.rst:2095 msgid "See also :meth:`rindex`." msgstr "" -#: ../../../library/stdtypes.rst:2096 +#: ../../../library/stdtypes.rst:2100 msgid "" "Return ``True`` if all characters in the string are alphanumeric and there " "is at least one character, ``False`` otherwise. A character ``c`` is " @@ -2761,7 +2777,7 @@ msgid "" "isdecimal()``, ``c.isdigit()``, or ``c.isnumeric()``. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2115 +#: ../../../library/stdtypes.rst:2119 msgid "" "Return ``True`` if all characters in the string are alphabetic and there is " "at least one character, ``False`` otherwise. Alphabetic characters are " @@ -2773,18 +2789,18 @@ msgid "" "spec/chapter-4/#G91002>`__. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2133 +#: ../../../library/stdtypes.rst:2137 msgid "See :ref:`unicode-properties`." msgstr "" -#: ../../../library/stdtypes.rst:2138 +#: ../../../library/stdtypes.rst:2142 msgid "" "Return ``True`` if the string is empty or all characters in the string are " "ASCII, ``False`` otherwise. ASCII characters have code points in the range " "U+0000-U+007F. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2154 +#: ../../../library/stdtypes.rst:2158 msgid "" "Return ``True`` if all characters in the string are decimal characters and " "there is at least one character, ``False`` otherwise. Decimal characters are " @@ -2793,7 +2809,7 @@ msgid "" "Unicode General Category \"Nd\". For example:" msgstr "" -#: ../../../library/stdtypes.rst:2173 +#: ../../../library/stdtypes.rst:2177 msgid "" "Return ``True`` if all characters in the string are digits and there is at " "least one character, ``False`` otherwise. Digits include decimal characters " @@ -2804,44 +2820,44 @@ msgid "" "property value Numeric_Type=Digit or Numeric_Type=Decimal." msgstr "" -#: ../../../library/stdtypes.rst:2181 ../../../library/stdtypes.rst:2262 -#: ../../../library/stdtypes.rst:2279 ../../../library/stdtypes.rst:2306 -#: ../../../library/stdtypes.rst:2361 ../../../library/stdtypes.rst:2439 -#: ../../../library/stdtypes.rst:2550 ../../../library/stdtypes.rst:2571 -#: ../../../library/stdtypes.rst:2636 ../../../library/stdtypes.rst:2656 -#: ../../../library/stdtypes.rst:2670 ../../../library/stdtypes.rst:2757 -#: ../../../library/stdtypes.rst:2779 ../../../library/stdtypes.rst:2793 -#: ../../../library/stdtypes.rst:2908 +#: ../../../library/stdtypes.rst:2185 ../../../library/stdtypes.rst:2266 +#: ../../../library/stdtypes.rst:2283 ../../../library/stdtypes.rst:2310 +#: ../../../library/stdtypes.rst:2365 ../../../library/stdtypes.rst:2443 +#: ../../../library/stdtypes.rst:2554 ../../../library/stdtypes.rst:2575 +#: ../../../library/stdtypes.rst:2640 ../../../library/stdtypes.rst:2660 +#: ../../../library/stdtypes.rst:2674 ../../../library/stdtypes.rst:2761 +#: ../../../library/stdtypes.rst:2783 ../../../library/stdtypes.rst:2797 +#: ../../../library/stdtypes.rst:2912 msgid "For example:" msgstr "" -#: ../../../library/stdtypes.rst:2194 +#: ../../../library/stdtypes.rst:2198 msgid "See also :meth:`isdecimal` and :meth:`isnumeric`." msgstr "" -#: ../../../library/stdtypes.rst:2199 +#: ../../../library/stdtypes.rst:2203 msgid "" "Return ``True`` if the string is a valid identifier according to the " "language definition, section :ref:`identifiers`." msgstr "" -#: ../../../library/stdtypes.rst:2202 +#: ../../../library/stdtypes.rst:2206 msgid "" ":func:`keyword.iskeyword` can be used to test whether string ``s`` is a " "reserved identifier, such as :keyword:`def` and :keyword:`class`." msgstr "" -#: ../../../library/stdtypes.rst:2205 +#: ../../../library/stdtypes.rst:2209 msgid "Example: ::" msgstr "" -#: ../../../library/stdtypes.rst:2218 +#: ../../../library/stdtypes.rst:2222 msgid "" "Return ``True`` if all cased characters [4]_ in the string are lowercase and " "there is at least one cased character, ``False`` otherwise." msgstr "" -#: ../../../library/stdtypes.rst:2224 +#: ../../../library/stdtypes.rst:2228 msgid "" "Return ``True`` if all characters in the string are numeric characters, and " "there is at least one character, ``False`` otherwise. Numeric characters " @@ -2851,17 +2867,17 @@ msgid "" "Numeric_Type=Decimal or Numeric_Type=Numeric. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2243 +#: ../../../library/stdtypes.rst:2247 msgid "See also :meth:`isdecimal` and :meth:`isdigit`." msgstr "" -#: ../../../library/stdtypes.rst:2248 +#: ../../../library/stdtypes.rst:2252 msgid "" "Return ``True`` if all characters in the string are printable, ``False`` if " "it contains at least one non-printable character." msgstr "" -#: ../../../library/stdtypes.rst:2251 +#: ../../../library/stdtypes.rst:2255 msgid "" "Here \"printable\" means the character is suitable for :func:`repr` to use " "in its output; \"non-printable\" means that :func:`repr` on built-in types " @@ -2869,7 +2885,7 @@ msgid "" "written to :data:`sys.stdout` or :data:`sys.stderr`." msgstr "" -#: ../../../library/stdtypes.rst:2256 +#: ../../../library/stdtypes.rst:2260 msgid "" "The printable characters are those which in the Unicode character database " "(see :mod:`unicodedata`) have a general category in group Letter, Mark, " @@ -2878,28 +2894,28 @@ msgid "" "C), except the ASCII space." msgstr "" -#: ../../../library/stdtypes.rst:2271 +#: ../../../library/stdtypes.rst:2275 msgid "See also :meth:`isspace`." msgstr "" -#: ../../../library/stdtypes.rst:2276 +#: ../../../library/stdtypes.rst:2280 msgid "" "Return ``True`` if there are only whitespace characters in the string and " "there is at least one character, ``False`` otherwise." msgstr "" -#: ../../../library/stdtypes.rst:2292 +#: ../../../library/stdtypes.rst:2296 msgid "" "A character is *whitespace* if in the Unicode character database (see :mod:" "`unicodedata`), either its general category is ``Zs`` (\"Separator, " "space\"), or its bidirectional class is one of ``WS``, ``B``, or ``S``." msgstr "" -#: ../../../library/stdtypes.rst:2297 +#: ../../../library/stdtypes.rst:2301 msgid "See also :meth:`isprintable`." msgstr "" -#: ../../../library/stdtypes.rst:2302 +#: ../../../library/stdtypes.rst:2306 msgid "" "Return ``True`` if the string is a titlecased string and there is at least " "one character, for example uppercase characters may only follow uncased " @@ -2907,17 +2923,17 @@ msgid "" "otherwise." msgstr "" -#: ../../../library/stdtypes.rst:2317 +#: ../../../library/stdtypes.rst:2321 msgid "See also :meth:`title`." msgstr "" -#: ../../../library/stdtypes.rst:2322 +#: ../../../library/stdtypes.rst:2326 msgid "" "Return ``True`` if all cased characters [4]_ in the string are uppercase and " "there is at least one cased character, ``False`` otherwise." msgstr "" -#: ../../../library/stdtypes.rst:2340 +#: ../../../library/stdtypes.rst:2344 msgid "" "Return a string which is the concatenation of the strings in *iterable*. A :" "exc:`TypeError` will be raised if there are any non-string values in " @@ -2925,35 +2941,35 @@ msgid "" "elements is the string providing this method. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2352 +#: ../../../library/stdtypes.rst:2356 msgid "See also :meth:`split`." msgstr "" -#: ../../../library/stdtypes.rst:2357 +#: ../../../library/stdtypes.rst:2361 msgid "" "Return the string left justified in a string of length *width*. Padding is " "done using the specified *fillchar* (default is an ASCII space). The " "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:2372 ../../../library/stdtypes.rst:2917 +#: ../../../library/stdtypes.rst:2376 ../../../library/stdtypes.rst:2921 msgid "See also :meth:`rjust`." msgstr "" -#: ../../../library/stdtypes.rst:2377 +#: ../../../library/stdtypes.rst:2381 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "lowercase. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2385 +#: ../../../library/stdtypes.rst:2389 msgid "" "The lowercasing algorithm used is `described in section 3.13.2 'Default Case " "Conversion' of the Unicode Standard `__." msgstr "" -#: ../../../library/stdtypes.rst:2392 +#: ../../../library/stdtypes.rst:2396 msgid "" "Return a copy of the string with leading characters removed. The *chars* " "argument is a string specifying the set of characters to be removed. If " @@ -2963,19 +2979,19 @@ msgid "" "stripped::" msgstr "" -#: ../../../library/stdtypes.rst:2403 +#: ../../../library/stdtypes.rst:2407 msgid "" "See :meth:`str.removeprefix` for a method that will remove a single prefix " "string rather than all of a set of characters. For example::" msgstr "" -#: ../../../library/stdtypes.rst:2415 +#: ../../../library/stdtypes.rst:2419 msgid "" "This static method returns a translation table usable for :meth:`str." "translate`." msgstr "" -#: ../../../library/stdtypes.rst:2417 +#: ../../../library/stdtypes.rst:2421 msgid "" "If there is only one argument, it must be a dictionary mapping Unicode " "ordinals (integers) or characters (strings of length 1) to Unicode ordinals, " @@ -2983,7 +2999,7 @@ msgid "" "converted to ordinals." msgstr "" -#: ../../../library/stdtypes.rst:2422 +#: ../../../library/stdtypes.rst:2426 msgid "" "If there are two arguments, they must be strings of equal length, and in the " "resulting dictionary, each character in *from* will be mapped to the " @@ -2991,11 +3007,11 @@ msgid "" "must be a string, whose characters will be mapped to ``None`` in the result." msgstr "" -#: ../../../library/stdtypes.rst:2429 +#: ../../../library/stdtypes.rst:2433 msgid "*dict* can now be a :class:`frozendict`." msgstr "" -#: ../../../library/stdtypes.rst:2434 +#: ../../../library/stdtypes.rst:2438 msgid "" "Split the string at the first occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself, and the part " @@ -3003,32 +3019,32 @@ msgid "" "containing the string itself, followed by two empty strings." msgstr "" -#: ../../../library/stdtypes.rst:2450 +#: ../../../library/stdtypes.rst:2454 msgid "See also :meth:`rpartition`." msgstr "" -#: ../../../library/stdtypes.rst:2455 +#: ../../../library/stdtypes.rst:2459 msgid "" "If the string starts with the *prefix* string, return " "``string[len(prefix):]``. Otherwise, return a copy of the original string:" msgstr "" -#: ../../../library/stdtypes.rst:2468 +#: ../../../library/stdtypes.rst:2472 msgid "See also :meth:`removesuffix` and :meth:`startswith`." msgstr "" -#: ../../../library/stdtypes.rst:2473 +#: ../../../library/stdtypes.rst:2477 msgid "" "If the string ends with the *suffix* string and that *suffix* is not empty, " "return ``string[:-len(suffix)]``. Otherwise, return a copy of the original " "string:" msgstr "" -#: ../../../library/stdtypes.rst:2486 +#: ../../../library/stdtypes.rst:2490 msgid "See also :meth:`removeprefix` and :meth:`endswith`." msgstr "" -#: ../../../library/stdtypes.rst:2491 +#: ../../../library/stdtypes.rst:2495 msgid "" "Return a copy of the string with all occurrences of substring *old* replaced " "by *new*. If *count* is given, only the first *count* occurrences are " @@ -3036,11 +3052,11 @@ msgid "" "replaced. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2503 ../../../library/stdtypes.rst:3797 +#: ../../../library/stdtypes.rst:2507 ../../../library/stdtypes.rst:3801 msgid "*count* is now supported as a keyword argument." msgstr "" -#: ../../../library/stdtypes.rst:2509 +#: ../../../library/stdtypes.rst:2513 msgid "" "Return the highest index in the string where substring *sub* is found, such " "that *sub* is contained within ``s[start:end]``. Optional arguments *start* " @@ -3048,32 +3064,32 @@ msgid "" "For example:" msgstr "" -#: ../../../library/stdtypes.rst:2521 +#: ../../../library/stdtypes.rst:2525 msgid "See also :meth:`find` and :meth:`rindex`." msgstr "" -#: ../../../library/stdtypes.rst:2526 +#: ../../../library/stdtypes.rst:2530 msgid "" "Like :meth:`rfind` but raises :exc:`ValueError` when the substring *sub* is " "not found. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2541 +#: ../../../library/stdtypes.rst:2545 msgid "See also :meth:`index` and :meth:`find`." msgstr "" -#: ../../../library/stdtypes.rst:2546 +#: ../../../library/stdtypes.rst:2550 msgid "" "Return the string right justified in a string of length *width*. Padding is " "done using the specified *fillchar* (default is an ASCII space). The " "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:2561 +#: ../../../library/stdtypes.rst:2565 msgid "See also :meth:`ljust` and :meth:`zfill`." msgstr "" -#: ../../../library/stdtypes.rst:2566 +#: ../../../library/stdtypes.rst:2570 msgid "" "Split the string at the last occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself, and the part " @@ -3081,11 +3097,11 @@ msgid "" "containing two empty strings, followed by the string itself." msgstr "" -#: ../../../library/stdtypes.rst:2582 +#: ../../../library/stdtypes.rst:2586 msgid "See also :meth:`partition`." msgstr "" -#: ../../../library/stdtypes.rst:2587 +#: ../../../library/stdtypes.rst:2591 msgid "" "Return a list of the words in the string, using *sep* as the delimiter " "string. If *maxsplit* is given, at most *maxsplit* splits are done, the " @@ -3094,7 +3110,7 @@ msgid "" "behaves like :meth:`split` which is described in detail below." msgstr "" -#: ../../../library/stdtypes.rst:2596 +#: ../../../library/stdtypes.rst:2600 msgid "" "Return a copy of the string with trailing characters removed. The *chars* " "argument is a string specifying the set of characters to be removed. If " @@ -3104,17 +3120,17 @@ msgid "" "stripped. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2610 +#: ../../../library/stdtypes.rst:2614 msgid "" "See :meth:`removesuffix` for a method that will remove a single suffix " "string rather than all of a set of characters. For example::" msgstr "" -#: ../../../library/stdtypes.rst:2618 +#: ../../../library/stdtypes.rst:2622 msgid "See also :meth:`strip`." msgstr "" -#: ../../../library/stdtypes.rst:2623 +#: ../../../library/stdtypes.rst:2627 msgid "" "Return a list of the words in the string, using *sep* as the delimiter " "string. If *maxsplit* is given, at most *maxsplit* splits are done (thus, " @@ -3123,7 +3139,7 @@ msgid "" "possible splits are made)." msgstr "" -#: ../../../library/stdtypes.rst:2629 +#: ../../../library/stdtypes.rst:2633 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty strings (for example, ``'1,,2'.split(',')`` returns " @@ -3133,7 +3149,7 @@ msgid "" "``['']``." msgstr "" -#: ../../../library/stdtypes.rst:2649 +#: ../../../library/stdtypes.rst:2653 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive whitespace are regarded as a single separator, " @@ -3143,153 +3159,153 @@ msgid "" "returns ``[]``." msgstr "" -#: ../../../library/stdtypes.rst:2667 +#: ../../../library/stdtypes.rst:2671 msgid "" "If *sep* is not specified or is ``None`` and *maxsplit* is ``0``, only " "leading runs of consecutive whitespace are considered." msgstr "" -#: ../../../library/stdtypes.rst:2681 +#: ../../../library/stdtypes.rst:2685 msgid "See also :meth:`join` and :meth:`rsplit`." msgstr "" -#: ../../../library/stdtypes.rst:2689 +#: ../../../library/stdtypes.rst:2693 msgid "" "Return a list of the lines in the string, breaking at line boundaries. Line " "breaks are not included in the resulting list unless *keepends* is given and " "true." msgstr "" -#: ../../../library/stdtypes.rst:2693 +#: ../../../library/stdtypes.rst:2697 msgid "" "This method splits on the following line boundaries. In particular, the " "boundaries are a superset of :term:`universal newlines`." msgstr "" -#: ../../../library/stdtypes.rst:2697 +#: ../../../library/stdtypes.rst:2701 msgid "Representation" msgstr "" -#: ../../../library/stdtypes.rst:2697 +#: ../../../library/stdtypes.rst:2701 msgid "Description" msgstr "" -#: ../../../library/stdtypes.rst:2699 +#: ../../../library/stdtypes.rst:2703 msgid "``\\n``" msgstr "" -#: ../../../library/stdtypes.rst:2699 +#: ../../../library/stdtypes.rst:2703 msgid "Line Feed" msgstr "" -#: ../../../library/stdtypes.rst:2701 +#: ../../../library/stdtypes.rst:2705 msgid "``\\r``" msgstr "" -#: ../../../library/stdtypes.rst:2701 +#: ../../../library/stdtypes.rst:2705 msgid "Carriage Return" msgstr "" -#: ../../../library/stdtypes.rst:2703 +#: ../../../library/stdtypes.rst:2707 msgid "``\\r\\n``" msgstr "" -#: ../../../library/stdtypes.rst:2703 +#: ../../../library/stdtypes.rst:2707 msgid "Carriage Return + Line Feed" msgstr "" -#: ../../../library/stdtypes.rst:2705 +#: ../../../library/stdtypes.rst:2709 msgid "``\\v`` or ``\\x0b``" msgstr "" -#: ../../../library/stdtypes.rst:2705 +#: ../../../library/stdtypes.rst:2709 msgid "Line Tabulation" msgstr "" -#: ../../../library/stdtypes.rst:2707 +#: ../../../library/stdtypes.rst:2711 msgid "``\\f`` or ``\\x0c``" msgstr "" -#: ../../../library/stdtypes.rst:2707 +#: ../../../library/stdtypes.rst:2711 msgid "Form Feed" msgstr "" -#: ../../../library/stdtypes.rst:2709 +#: ../../../library/stdtypes.rst:2713 msgid "``\\x1c``" msgstr "" -#: ../../../library/stdtypes.rst:2709 +#: ../../../library/stdtypes.rst:2713 msgid "File Separator" msgstr "" -#: ../../../library/stdtypes.rst:2711 +#: ../../../library/stdtypes.rst:2715 msgid "``\\x1d``" msgstr "" -#: ../../../library/stdtypes.rst:2711 +#: ../../../library/stdtypes.rst:2715 msgid "Group Separator" msgstr "" -#: ../../../library/stdtypes.rst:2713 +#: ../../../library/stdtypes.rst:2717 msgid "``\\x1e``" msgstr "" -#: ../../../library/stdtypes.rst:2713 +#: ../../../library/stdtypes.rst:2717 msgid "Record Separator" msgstr "" -#: ../../../library/stdtypes.rst:2715 +#: ../../../library/stdtypes.rst:2719 msgid "``\\x85``" msgstr "" -#: ../../../library/stdtypes.rst:2715 +#: ../../../library/stdtypes.rst:2719 msgid "Next Line (C1 Control Code)" msgstr "" -#: ../../../library/stdtypes.rst:2717 +#: ../../../library/stdtypes.rst:2721 msgid "``\\u2028``" msgstr "" -#: ../../../library/stdtypes.rst:2717 +#: ../../../library/stdtypes.rst:2721 msgid "Line Separator" msgstr "" -#: ../../../library/stdtypes.rst:2719 +#: ../../../library/stdtypes.rst:2723 msgid "``\\u2029``" msgstr "" -#: ../../../library/stdtypes.rst:2719 +#: ../../../library/stdtypes.rst:2723 msgid "Paragraph Separator" msgstr "" -#: ../../../library/stdtypes.rst:2724 +#: ../../../library/stdtypes.rst:2728 msgid "``\\v`` and ``\\f`` added to list of line boundaries." msgstr "" -#: ../../../library/stdtypes.rst:2726 ../../../library/stdtypes.rst:2830 -#: ../../../library/stdtypes.rst:3007 ../../../library/stdtypes.rst:4010 -#: ../../../library/stdtypes.rst:4028 ../../../library/stdtypes.rst:4118 -#: ../../../library/stdtypes.rst:4134 ../../../library/stdtypes.rst:4159 -#: ../../../library/stdtypes.rst:4173 ../../../library/stdtypes.rst:4201 -#: ../../../library/stdtypes.rst:4215 ../../../library/stdtypes.rst:4233 -#: ../../../library/stdtypes.rst:4260 ../../../library/stdtypes.rst:4283 -#: ../../../library/stdtypes.rst:4310 ../../../library/stdtypes.rst:4352 -#: ../../../library/stdtypes.rst:4376 +#: ../../../library/stdtypes.rst:2730 ../../../library/stdtypes.rst:2834 +#: ../../../library/stdtypes.rst:3011 ../../../library/stdtypes.rst:4014 +#: ../../../library/stdtypes.rst:4032 ../../../library/stdtypes.rst:4122 +#: ../../../library/stdtypes.rst:4138 ../../../library/stdtypes.rst:4163 +#: ../../../library/stdtypes.rst:4177 ../../../library/stdtypes.rst:4205 +#: ../../../library/stdtypes.rst:4219 ../../../library/stdtypes.rst:4237 +#: ../../../library/stdtypes.rst:4264 ../../../library/stdtypes.rst:4287 +#: ../../../library/stdtypes.rst:4314 ../../../library/stdtypes.rst:4356 +#: ../../../library/stdtypes.rst:4380 msgid "For example::" msgstr "" -#: ../../../library/stdtypes.rst:2733 +#: ../../../library/stdtypes.rst:2737 msgid "" "Unlike :meth:`~str.split` when a delimiter string *sep* is given, this " "method returns an empty list for the empty string, and a terminal line break " "does not result in an extra line::" msgstr "" -#: ../../../library/stdtypes.rst:2742 +#: ../../../library/stdtypes.rst:2746 msgid "For comparison, ``split('\\n')`` gives::" msgstr "" -#: ../../../library/stdtypes.rst:2752 +#: ../../../library/stdtypes.rst:2756 msgid "" "Return ``True`` if string starts with the *prefix*, otherwise return " "``False``. *prefix* can also be a tuple of prefixes to look for. With " @@ -3297,11 +3313,11 @@ msgid "" "*end*, stop comparing string at that position." msgstr "" -#: ../../../library/stdtypes.rst:2768 +#: ../../../library/stdtypes.rst:2772 msgid "See also :meth:`endswith` and :meth:`removeprefix`." msgstr "" -#: ../../../library/stdtypes.rst:2773 +#: ../../../library/stdtypes.rst:2777 msgid "" "Return a copy of the string with the leading and trailing characters " "removed. The *chars* argument is a string specifying the set of characters " @@ -3311,7 +3327,7 @@ msgid "" "combinations of its values are stripped." msgstr "" -#: ../../../library/stdtypes.rst:2788 +#: ../../../library/stdtypes.rst:2792 msgid "" "The outermost leading and trailing *chars* argument values are stripped from " "the string. Characters are removed from the leading end until reaching a " @@ -3319,33 +3335,33 @@ msgid "" "A similar action takes place on the trailing end." msgstr "" -#: ../../../library/stdtypes.rst:2801 +#: ../../../library/stdtypes.rst:2805 msgid "See also :meth:`rstrip`." msgstr "" -#: ../../../library/stdtypes.rst:2806 +#: ../../../library/stdtypes.rst:2810 msgid "" "Return a copy of the string with uppercase characters converted to lowercase " "and vice versa. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2814 +#: ../../../library/stdtypes.rst:2818 msgid "" "Note that it is not necessarily true that ``s.swapcase().swapcase() == s``. " "For example:" msgstr "" -#: ../../../library/stdtypes.rst:2822 +#: ../../../library/stdtypes.rst:2826 msgid "See also :meth:`str.lower` and :meth:`str.upper`." msgstr "" -#: ../../../library/stdtypes.rst:2827 +#: ../../../library/stdtypes.rst:2831 msgid "" "Return a titlecased version of the string where words start with an " "uppercase character and the remaining characters are lowercase." msgstr "" -#: ../../../library/stdtypes.rst:2835 ../../../library/stdtypes.rst:4320 +#: ../../../library/stdtypes.rst:2839 ../../../library/stdtypes.rst:4324 msgid "" "The algorithm uses a simple language-independent definition of a word as " "groups of consecutive letters. The definition works in many contexts but it " @@ -3353,23 +3369,23 @@ msgid "" "which may not be the desired result::" msgstr "" -#: ../../../library/stdtypes.rst:2843 +#: ../../../library/stdtypes.rst:2847 msgid "" "The :func:`string.capwords` function does not have this problem, as it " "splits words on spaces only." msgstr "" -#: ../../../library/stdtypes.rst:2846 +#: ../../../library/stdtypes.rst:2850 msgid "" "Alternatively, a workaround for apostrophes can be constructed using regular " "expressions::" msgstr "" -#: ../../../library/stdtypes.rst:2858 +#: ../../../library/stdtypes.rst:2862 msgid "See also :meth:`istitle`." msgstr "" -#: ../../../library/stdtypes.rst:2863 +#: ../../../library/stdtypes.rst:2867 msgid "" "Return a copy of the string in which each character has been mapped through " "the given translation table. The table must be an object that implements " @@ -3381,25 +3397,25 @@ msgid "" "exception, to map the character to itself." msgstr "" -#: ../../../library/stdtypes.rst:2872 +#: ../../../library/stdtypes.rst:2876 msgid "" "You can use :meth:`str.maketrans` to create a translation map from character-" "to-character mappings in different formats." msgstr "" -#: ../../../library/stdtypes.rst:2875 +#: ../../../library/stdtypes.rst:2879 msgid "" "The following example uses a mapping to replace ``'a'`` with ``'X'``, " "``'b'`` with ``'Y'``, and delete ``'c'``:" msgstr "" -#: ../../../library/stdtypes.rst:2883 +#: ../../../library/stdtypes.rst:2887 msgid "" "See also the :mod:`codecs` module for a more flexible approach to custom " "character mappings." msgstr "" -#: ../../../library/stdtypes.rst:2889 +#: ../../../library/stdtypes.rst:2893 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "uppercase. Note that ``s.upper().isupper()`` might be ``False`` if ``s`` " @@ -3408,14 +3424,14 @@ msgid "" "titlecase)." msgstr "" -#: ../../../library/stdtypes.rst:2895 +#: ../../../library/stdtypes.rst:2899 msgid "" "The uppercasing algorithm used is `described in section 3.13.2 'Default Case " "Conversion' of the Unicode Standard `__." msgstr "" -#: ../../../library/stdtypes.rst:2902 +#: ../../../library/stdtypes.rst:2906 msgid "" "Return a copy of the string left filled with ASCII ``'0'`` digits to make a " "string of length *width*. A leading sign prefix (``'+'``/``'-'``) is handled " @@ -3423,27 +3439,27 @@ msgid "" "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:2937 +#: ../../../library/stdtypes.rst:2941 msgid "Formatted String Literals (f-strings)" msgstr "" -#: ../../../library/stdtypes.rst:2940 +#: ../../../library/stdtypes.rst:2944 msgid "" "The :keyword:`await` and :keyword:`async for` can be used in expressions " "within f-strings." msgstr "" -#: ../../../library/stdtypes.rst:2943 +#: ../../../library/stdtypes.rst:2947 msgid "Added the debug specifier (``=``)" msgstr "" -#: ../../../library/stdtypes.rst:2945 +#: ../../../library/stdtypes.rst:2949 msgid "" "Many restrictions on expressions within f-strings have been removed. " "Notably, nested strings, comments, and backslashes are now permitted." msgstr "" -#: ../../../library/stdtypes.rst:2949 +#: ../../../library/stdtypes.rst:2953 msgid "" "An :dfn:`f-string` (formally a :dfn:`formatted string literal`) is a string " "literal that is prefixed with ``f`` or ``F``. This type of string literal " @@ -3452,29 +3468,29 @@ msgid "" "replacement field must contain an expression, optionally followed by:" msgstr "" -#: ../../../library/stdtypes.rst:2956 +#: ../../../library/stdtypes.rst:2960 msgid "a *debug specifier* -- an equal sign (``=``);" msgstr "" -#: ../../../library/stdtypes.rst:2957 +#: ../../../library/stdtypes.rst:2961 msgid "a *conversion specifier* -- ``!s``, ``!r`` or ``!a``; and/or" msgstr "" -#: ../../../library/stdtypes.rst:2958 +#: ../../../library/stdtypes.rst:2962 msgid "a *format specifier* prefixed with a colon (``:``)." msgstr "" -#: ../../../library/stdtypes.rst:2960 +#: ../../../library/stdtypes.rst:2964 msgid "" "See the :ref:`Lexical Analysis section on f-strings ` for details " "on the syntax of these fields." msgstr "" -#: ../../../library/stdtypes.rst:2964 +#: ../../../library/stdtypes.rst:2968 msgid "Debug specifier" msgstr "" -#: ../../../library/stdtypes.rst:2968 +#: ../../../library/stdtypes.rst:2972 msgid "" "If a debug specifier -- an equal sign (``=``) -- appears after the " "replacement field expression, the resulting f-string will contain the " @@ -3482,50 +3498,50 @@ msgid "" "is often useful for debugging::" msgstr "" -#: ../../../library/stdtypes.rst:2977 +#: ../../../library/stdtypes.rst:2981 msgid "" "Whitespace before, inside and after the expression, as well as whitespace " "after the equal sign, is significant --- it is retained in the result::" msgstr "" -#: ../../../library/stdtypes.rst:2985 +#: ../../../library/stdtypes.rst:2989 msgid "Conversion specifier" msgstr "" -#: ../../../library/stdtypes.rst:2987 +#: ../../../library/stdtypes.rst:2991 msgid "" "By default, the value of a replacement field expression is converted to a " "string using :func:`str`::" msgstr "" -#: ../../../library/stdtypes.rst:2995 +#: ../../../library/stdtypes.rst:2999 msgid "" "When a debug specifier but no format specifier is used, the default " "conversion instead uses :func:`repr`::" msgstr "" -#: ../../../library/stdtypes.rst:3001 +#: ../../../library/stdtypes.rst:3005 msgid "" "The conversion can be specified explicitly using one of these specifiers:" msgstr "" -#: ../../../library/stdtypes.rst:3003 +#: ../../../library/stdtypes.rst:3007 msgid "``!s`` for :func:`str`" msgstr "" -#: ../../../library/stdtypes.rst:3004 +#: ../../../library/stdtypes.rst:3008 msgid "``!r`` for :func:`repr`" msgstr "" -#: ../../../library/stdtypes.rst:3005 +#: ../../../library/stdtypes.rst:3009 msgid "``!a`` for :func:`ascii`" msgstr "" -#: ../../../library/stdtypes.rst:3026 +#: ../../../library/stdtypes.rst:3030 msgid "Format specifier" msgstr "" -#: ../../../library/stdtypes.rst:3028 +#: ../../../library/stdtypes.rst:3032 msgid "" "After the expression has been evaluated, and possibly converted using an " "explicit conversion specifier, it is formatted using the :func:`format` " @@ -3535,29 +3551,29 @@ msgid "" "the replacement field. For example::" msgstr "" -#: ../../../library/stdtypes.rst:3049 +#: ../../../library/stdtypes.rst:3053 msgid "Template String Literals (t-strings)" msgstr "" -#: ../../../library/stdtypes.rst:3051 +#: ../../../library/stdtypes.rst:3055 msgid "" "An :dfn:`t-string` (formally a :dfn:`template string literal`) is a string " "literal that is prefixed with ``t`` or ``T``." msgstr "" -#: ../../../library/stdtypes.rst:3054 +#: ../../../library/stdtypes.rst:3058 msgid "" "These strings follow the same syntax and evaluation rules as :ref:`formatted " "string literals `, with for the following differences:" msgstr "" -#: ../../../library/stdtypes.rst:3058 +#: ../../../library/stdtypes.rst:3062 msgid "" "Rather than evaluating to a ``str`` object, template string literals " "evaluate to a :class:`string.templatelib.Template` object." msgstr "" -#: ../../../library/stdtypes.rst:3061 +#: ../../../library/stdtypes.rst:3065 msgid "" "The :func:`format` protocol is not used. Instead, the format specifier and " "conversions (if any) are passed to a new :class:`~string.templatelib." @@ -3566,7 +3582,7 @@ msgid "" "Template` object to decide how to handle format specifiers and conversions." msgstr "" -#: ../../../library/stdtypes.rst:3068 +#: ../../../library/stdtypes.rst:3072 msgid "" "Format specifiers containing nested replacement fields are evaluated " "eagerly, prior to being passed to the :class:`~string.templatelib." @@ -3576,7 +3592,7 @@ msgid "" "to be ``2``, the resulting format specifier would be ``'.2f'``." msgstr "" -#: ../../../library/stdtypes.rst:3076 +#: ../../../library/stdtypes.rst:3080 msgid "" "When the equals sign ``'='`` is provided in an interpolation expression, the " "text of the expression is appended to the literal string that precedes the " @@ -3588,18 +3604,18 @@ msgid "" "behaviour." msgstr "" -#: ../../../library/stdtypes.rst:3090 +#: ../../../library/stdtypes.rst:3094 msgid "``printf``-style String Formatting" msgstr "" -#: ../../../library/stdtypes.rst:3103 +#: ../../../library/stdtypes.rst:3107 msgid "" "The formatting operations described here exhibit a variety of quirks that " "lead to a number of common errors (such as failing to display tuples and " "dictionaries correctly)." msgstr "" -#: ../../../library/stdtypes.rst:3107 +#: ../../../library/stdtypes.rst:3111 msgid "" "Using :ref:`formatted string literals `, the :meth:`str.format` " "interface, or :class:`string.Template` may help avoid these errors. Each of " @@ -3607,7 +3623,7 @@ msgid "" "flexibility, and/or extensibility." msgstr "" -#: ../../../library/stdtypes.rst:3112 +#: ../../../library/stdtypes.rst:3116 msgid "" "String objects have one unique built-in operation: the ``%`` operator " "(modulo). This is also known as the string *formatting* or *interpolation* " @@ -3617,7 +3633,7 @@ msgid "" "function in the C language. For example:" msgstr "" -#: ../../../library/stdtypes.rst:3124 +#: ../../../library/stdtypes.rst:3128 msgid "" "If *format* requires a single argument, *values* may be a single non-tuple " "object. [5]_ Otherwise, *values* must be a tuple with exactly the number of " @@ -3625,36 +3641,36 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../../library/stdtypes.rst:3134 ../../../library/stdtypes.rst:4431 +#: ../../../library/stdtypes.rst:3138 ../../../library/stdtypes.rst:4435 msgid "" "A conversion specifier contains two or more characters and has the following " "components, which must occur in this order:" msgstr "" -#: ../../../library/stdtypes.rst:3137 ../../../library/stdtypes.rst:4434 +#: ../../../library/stdtypes.rst:3141 ../../../library/stdtypes.rst:4438 msgid "The ``'%'`` character, which marks the start of the specifier." msgstr "" -#: ../../../library/stdtypes.rst:3139 ../../../library/stdtypes.rst:4436 +#: ../../../library/stdtypes.rst:3143 ../../../library/stdtypes.rst:4440 msgid "" "Mapping key (optional), consisting of a parenthesised sequence of characters " "(for example, ``(somename)``)." msgstr "" -#: ../../../library/stdtypes.rst:3142 ../../../library/stdtypes.rst:4439 +#: ../../../library/stdtypes.rst:3146 ../../../library/stdtypes.rst:4443 msgid "" "Conversion flags (optional), which affect the result of some conversion " "types." msgstr "" -#: ../../../library/stdtypes.rst:3145 ../../../library/stdtypes.rst:4442 +#: ../../../library/stdtypes.rst:3149 ../../../library/stdtypes.rst:4446 msgid "" "Minimum field width (optional). If specified as an ``'*'`` (asterisk), the " "actual width is read from the next element of the tuple in *values*, and the " "object to convert comes after the minimum field width and optional precision." msgstr "" -#: ../../../library/stdtypes.rst:3149 ../../../library/stdtypes.rst:4446 +#: ../../../library/stdtypes.rst:3153 ../../../library/stdtypes.rst:4450 msgid "" "Precision (optional), given as a ``'.'`` (dot) followed by the precision. " "If specified as ``'*'`` (an asterisk), the actual precision is read from the " @@ -3662,15 +3678,15 @@ msgid "" "the precision." msgstr "" -#: ../../../library/stdtypes.rst:3154 ../../../library/stdtypes.rst:4451 +#: ../../../library/stdtypes.rst:3158 ../../../library/stdtypes.rst:4455 msgid "Length modifier (optional)." msgstr "" -#: ../../../library/stdtypes.rst:3156 ../../../library/stdtypes.rst:4453 +#: ../../../library/stdtypes.rst:3160 ../../../library/stdtypes.rst:4457 msgid "Conversion type." msgstr "" -#: ../../../library/stdtypes.rst:3158 +#: ../../../library/stdtypes.rst:3162 msgid "" "When the right argument is a dictionary (or other mapping type), then the " "formats in the string *must* include a parenthesised mapping key into that " @@ -3678,286 +3694,286 @@ msgid "" "selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../../library/stdtypes.rst:3167 ../../../library/stdtypes.rst:4464 +#: ../../../library/stdtypes.rst:3171 ../../../library/stdtypes.rst:4468 msgid "" "In this case no ``*`` specifiers may occur in a format (since they require a " "sequential parameter list)." msgstr "" -#: ../../../library/stdtypes.rst:3170 ../../../library/stdtypes.rst:4467 +#: ../../../library/stdtypes.rst:3174 ../../../library/stdtypes.rst:4471 msgid "The conversion flag characters are:" msgstr "" -#: ../../../library/stdtypes.rst:3179 ../../../library/stdtypes.rst:4476 +#: ../../../library/stdtypes.rst:3183 ../../../library/stdtypes.rst:4480 msgid "Flag" msgstr "" -#: ../../../library/stdtypes.rst:3181 ../../../library/stdtypes.rst:4478 +#: ../../../library/stdtypes.rst:3185 ../../../library/stdtypes.rst:4482 msgid "``'#'``" msgstr "" -#: ../../../library/stdtypes.rst:3181 ../../../library/stdtypes.rst:4478 +#: ../../../library/stdtypes.rst:3185 ../../../library/stdtypes.rst:4482 msgid "" "The value conversion will use the \"alternate form\" (where defined below)." msgstr "" -#: ../../../library/stdtypes.rst:3184 ../../../library/stdtypes.rst:4481 +#: ../../../library/stdtypes.rst:3188 ../../../library/stdtypes.rst:4485 msgid "``'0'``" msgstr "" -#: ../../../library/stdtypes.rst:3184 ../../../library/stdtypes.rst:4481 +#: ../../../library/stdtypes.rst:3188 ../../../library/stdtypes.rst:4485 msgid "The conversion will be zero padded for numeric values." msgstr "" -#: ../../../library/stdtypes.rst:3186 ../../../library/stdtypes.rst:4483 +#: ../../../library/stdtypes.rst:3190 ../../../library/stdtypes.rst:4487 msgid "``'-'``" msgstr "" -#: ../../../library/stdtypes.rst:3186 ../../../library/stdtypes.rst:4483 +#: ../../../library/stdtypes.rst:3190 ../../../library/stdtypes.rst:4487 msgid "" "The converted value is left adjusted (overrides the ``'0'`` conversion if " "both are given)." msgstr "" -#: ../../../library/stdtypes.rst:3189 ../../../library/stdtypes.rst:4486 +#: ../../../library/stdtypes.rst:3193 ../../../library/stdtypes.rst:4490 msgid "``' '``" msgstr "" -#: ../../../library/stdtypes.rst:3189 ../../../library/stdtypes.rst:4486 +#: ../../../library/stdtypes.rst:3193 ../../../library/stdtypes.rst:4490 msgid "" "(a space) A blank should be left before a positive number (or empty string) " "produced by a signed conversion." msgstr "" -#: ../../../library/stdtypes.rst:3192 ../../../library/stdtypes.rst:4489 +#: ../../../library/stdtypes.rst:3196 ../../../library/stdtypes.rst:4493 msgid "``'+'``" msgstr "" -#: ../../../library/stdtypes.rst:3192 ../../../library/stdtypes.rst:4489 +#: ../../../library/stdtypes.rst:3196 ../../../library/stdtypes.rst:4493 msgid "" "A sign character (``'+'`` or ``'-'``) will precede the conversion (overrides " "a \"space\" flag)." msgstr "" -#: ../../../library/stdtypes.rst:3196 ../../../library/stdtypes.rst:4493 +#: ../../../library/stdtypes.rst:3200 ../../../library/stdtypes.rst:4497 msgid "" "A length modifier (``h``, ``l``, or ``L``) may be present, but is ignored as " "it is not necessary for Python -- so e.g. ``%ld`` is identical to ``%d``." msgstr "" -#: ../../../library/stdtypes.rst:3199 ../../../library/stdtypes.rst:4496 +#: ../../../library/stdtypes.rst:3203 ../../../library/stdtypes.rst:4500 msgid "The conversion types are:" msgstr "" -#: ../../../library/stdtypes.rst:3202 ../../../library/stdtypes.rst:4499 +#: ../../../library/stdtypes.rst:3206 ../../../library/stdtypes.rst:4503 msgid "Conversion" msgstr "" -#: ../../../library/stdtypes.rst:3204 ../../../library/stdtypes.rst:4501 +#: ../../../library/stdtypes.rst:3208 ../../../library/stdtypes.rst:4505 msgid "``'d'``" msgstr "" -#: ../../../library/stdtypes.rst:3204 ../../../library/stdtypes.rst:3206 -#: ../../../library/stdtypes.rst:4501 ../../../library/stdtypes.rst:4503 +#: ../../../library/stdtypes.rst:3208 ../../../library/stdtypes.rst:3210 +#: ../../../library/stdtypes.rst:4505 ../../../library/stdtypes.rst:4507 msgid "Signed integer decimal." msgstr "" -#: ../../../library/stdtypes.rst:3206 ../../../library/stdtypes.rst:4503 +#: ../../../library/stdtypes.rst:3210 ../../../library/stdtypes.rst:4507 msgid "``'i'``" msgstr "" -#: ../../../library/stdtypes.rst:3208 ../../../library/stdtypes.rst:4505 +#: ../../../library/stdtypes.rst:3212 ../../../library/stdtypes.rst:4509 msgid "``'o'``" msgstr "" -#: ../../../library/stdtypes.rst:3208 ../../../library/stdtypes.rst:4505 +#: ../../../library/stdtypes.rst:3212 ../../../library/stdtypes.rst:4509 msgid "Signed octal value." msgstr "" -#: ../../../library/stdtypes.rst:3210 ../../../library/stdtypes.rst:4507 +#: ../../../library/stdtypes.rst:3214 ../../../library/stdtypes.rst:4511 msgid "``'u'``" msgstr "" -#: ../../../library/stdtypes.rst:3210 ../../../library/stdtypes.rst:4507 +#: ../../../library/stdtypes.rst:3214 ../../../library/stdtypes.rst:4511 msgid "Obsolete type -- it is identical to ``'d'``." msgstr "" -#: ../../../library/stdtypes.rst:3212 ../../../library/stdtypes.rst:4509 +#: ../../../library/stdtypes.rst:3216 ../../../library/stdtypes.rst:4513 msgid "``'x'``" msgstr "" -#: ../../../library/stdtypes.rst:3212 ../../../library/stdtypes.rst:4509 +#: ../../../library/stdtypes.rst:3216 ../../../library/stdtypes.rst:4513 msgid "Signed hexadecimal (lowercase)." msgstr "" -#: ../../../library/stdtypes.rst:3214 ../../../library/stdtypes.rst:4511 +#: ../../../library/stdtypes.rst:3218 ../../../library/stdtypes.rst:4515 msgid "``'X'``" msgstr "" -#: ../../../library/stdtypes.rst:3214 ../../../library/stdtypes.rst:4511 +#: ../../../library/stdtypes.rst:3218 ../../../library/stdtypes.rst:4515 msgid "Signed hexadecimal (uppercase)." msgstr "" -#: ../../../library/stdtypes.rst:3216 ../../../library/stdtypes.rst:4513 +#: ../../../library/stdtypes.rst:3220 ../../../library/stdtypes.rst:4517 msgid "``'e'``" msgstr "" -#: ../../../library/stdtypes.rst:3216 ../../../library/stdtypes.rst:4513 +#: ../../../library/stdtypes.rst:3220 ../../../library/stdtypes.rst:4517 msgid "Floating-point exponential format (lowercase)." msgstr "" -#: ../../../library/stdtypes.rst:3218 ../../../library/stdtypes.rst:4515 +#: ../../../library/stdtypes.rst:3222 ../../../library/stdtypes.rst:4519 msgid "``'E'``" msgstr "" -#: ../../../library/stdtypes.rst:3218 ../../../library/stdtypes.rst:4515 +#: ../../../library/stdtypes.rst:3222 ../../../library/stdtypes.rst:4519 msgid "Floating-point exponential format (uppercase)." msgstr "" -#: ../../../library/stdtypes.rst:3220 ../../../library/stdtypes.rst:4517 +#: ../../../library/stdtypes.rst:3224 ../../../library/stdtypes.rst:4521 msgid "``'f'``" msgstr "" -#: ../../../library/stdtypes.rst:3220 ../../../library/stdtypes.rst:3222 -#: ../../../library/stdtypes.rst:4517 ../../../library/stdtypes.rst:4519 +#: ../../../library/stdtypes.rst:3224 ../../../library/stdtypes.rst:3226 +#: ../../../library/stdtypes.rst:4521 ../../../library/stdtypes.rst:4523 msgid "Floating-point decimal format." msgstr "" -#: ../../../library/stdtypes.rst:3222 ../../../library/stdtypes.rst:4519 +#: ../../../library/stdtypes.rst:3226 ../../../library/stdtypes.rst:4523 msgid "``'F'``" msgstr "" -#: ../../../library/stdtypes.rst:3224 ../../../library/stdtypes.rst:4521 +#: ../../../library/stdtypes.rst:3228 ../../../library/stdtypes.rst:4525 msgid "``'g'``" msgstr "" -#: ../../../library/stdtypes.rst:3224 ../../../library/stdtypes.rst:4521 +#: ../../../library/stdtypes.rst:3228 ../../../library/stdtypes.rst:4525 msgid "" "Floating-point format. Uses lowercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -#: ../../../library/stdtypes.rst:3228 ../../../library/stdtypes.rst:4525 +#: ../../../library/stdtypes.rst:3232 ../../../library/stdtypes.rst:4529 msgid "``'G'``" msgstr "" -#: ../../../library/stdtypes.rst:3228 ../../../library/stdtypes.rst:4525 +#: ../../../library/stdtypes.rst:3232 ../../../library/stdtypes.rst:4529 msgid "" "Floating-point format. Uses uppercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -#: ../../../library/stdtypes.rst:3232 ../../../library/stdtypes.rst:4529 +#: ../../../library/stdtypes.rst:3236 ../../../library/stdtypes.rst:4533 msgid "``'c'``" msgstr "" -#: ../../../library/stdtypes.rst:3232 +#: ../../../library/stdtypes.rst:3236 msgid "Single character (accepts integer or single character string)." msgstr "" -#: ../../../library/stdtypes.rst:3235 ../../../library/stdtypes.rst:4542 +#: ../../../library/stdtypes.rst:3239 ../../../library/stdtypes.rst:4546 msgid "``'r'``" msgstr "" -#: ../../../library/stdtypes.rst:3235 +#: ../../../library/stdtypes.rst:3239 msgid "String (converts any Python object using :func:`repr`)." msgstr "" -#: ../../../library/stdtypes.rst:3238 ../../../library/stdtypes.rst:4536 +#: ../../../library/stdtypes.rst:3242 ../../../library/stdtypes.rst:4540 msgid "``'s'``" msgstr "" -#: ../../../library/stdtypes.rst:3238 +#: ../../../library/stdtypes.rst:3242 msgid "String (converts any Python object using :func:`str`)." msgstr "" -#: ../../../library/stdtypes.rst:3241 ../../../library/stdtypes.rst:4539 +#: ../../../library/stdtypes.rst:3245 ../../../library/stdtypes.rst:4543 msgid "``'a'``" msgstr "" -#: ../../../library/stdtypes.rst:3241 +#: ../../../library/stdtypes.rst:3245 msgid "String (converts any Python object using :func:`ascii`)." msgstr "" -#: ../../../library/stdtypes.rst:3244 ../../../library/stdtypes.rst:4545 +#: ../../../library/stdtypes.rst:3248 ../../../library/stdtypes.rst:4549 msgid "``'%'``" msgstr "" -#: ../../../library/stdtypes.rst:3244 ../../../library/stdtypes.rst:4545 +#: ../../../library/stdtypes.rst:3248 ../../../library/stdtypes.rst:4549 msgid "No argument is converted, results in a ``'%'`` character in the result." msgstr "" -#: ../../../library/stdtypes.rst:3248 +#: ../../../library/stdtypes.rst:3252 msgid "" "For floating-point formats, the result should be correctly rounded to a " "given precision ``p`` of digits after the decimal point. The rounding mode " "matches that of the :func:`round` builtin." msgstr "" -#: ../../../library/stdtypes.rst:3255 ../../../library/stdtypes.rst:4552 +#: ../../../library/stdtypes.rst:3259 ../../../library/stdtypes.rst:4556 msgid "" "The alternate form causes a leading octal specifier (``'0o'``) to be " "inserted before the first digit." msgstr "" -#: ../../../library/stdtypes.rst:3259 ../../../library/stdtypes.rst:4556 +#: ../../../library/stdtypes.rst:3263 ../../../library/stdtypes.rst:4560 msgid "" "The alternate form causes a leading ``'0x'`` or ``'0X'`` (depending on " "whether the ``'x'`` or ``'X'`` format was used) to be inserted before the " "first digit." msgstr "" -#: ../../../library/stdtypes.rst:3263 ../../../library/stdtypes.rst:4560 +#: ../../../library/stdtypes.rst:3267 ../../../library/stdtypes.rst:4564 msgid "" "The alternate form causes the result to always contain a decimal point, even " "if no digits follow it." msgstr "" -#: ../../../library/stdtypes.rst:3266 ../../../library/stdtypes.rst:4563 +#: ../../../library/stdtypes.rst:3270 ../../../library/stdtypes.rst:4567 msgid "" "The precision determines the number of digits after the decimal point and " "defaults to 6." msgstr "" -#: ../../../library/stdtypes.rst:3270 ../../../library/stdtypes.rst:4567 +#: ../../../library/stdtypes.rst:3274 ../../../library/stdtypes.rst:4571 msgid "" "The alternate form causes the result to always contain a decimal point, and " "trailing zeroes are not removed as they would otherwise be." msgstr "" -#: ../../../library/stdtypes.rst:3273 ../../../library/stdtypes.rst:4570 +#: ../../../library/stdtypes.rst:3277 ../../../library/stdtypes.rst:4574 msgid "" "The precision determines the number of significant digits before and after " "the decimal point and defaults to 6." msgstr "" -#: ../../../library/stdtypes.rst:3277 ../../../library/stdtypes.rst:4574 +#: ../../../library/stdtypes.rst:3281 ../../../library/stdtypes.rst:4578 msgid "If precision is ``N``, the output is truncated to ``N`` characters." msgstr "" -#: ../../../library/stdtypes.rst:3280 ../../../library/stdtypes.rst:4583 +#: ../../../library/stdtypes.rst:3284 ../../../library/stdtypes.rst:4587 msgid "See :pep:`237`." msgstr "" -#: ../../../library/stdtypes.rst:3282 +#: ../../../library/stdtypes.rst:3286 msgid "" "Since Python strings have an explicit length, ``%s`` conversions do not " "assume that ``'\\0'`` is the end of the string." msgstr "" -#: ../../../library/stdtypes.rst:3287 +#: ../../../library/stdtypes.rst:3291 msgid "" "``%f`` conversions for numbers whose absolute value is over 1e50 are no " "longer replaced by ``%g`` conversions." msgstr "" -#: ../../../library/stdtypes.rst:3298 +#: ../../../library/stdtypes.rst:3302 msgid "" "Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, :class:" "`memoryview`" msgstr "" -#: ../../../library/stdtypes.rst:3306 +#: ../../../library/stdtypes.rst:3310 msgid "" "The core built-in types for manipulating binary data are :class:`bytes` and :" "class:`bytearray`. They are supported by :class:`memoryview` which uses the :" @@ -3965,17 +3981,17 @@ msgid "" "objects without needing to make a copy." msgstr "" -#: ../../../library/stdtypes.rst:3311 +#: ../../../library/stdtypes.rst:3315 msgid "" "The :mod:`array` module supports efficient storage of basic data types like " "32-bit integers and IEEE754 double-precision floating values." msgstr "" -#: ../../../library/stdtypes.rst:3317 +#: ../../../library/stdtypes.rst:3321 msgid "Bytes Objects" msgstr "" -#: ../../../library/stdtypes.rst:3321 +#: ../../../library/stdtypes.rst:3325 msgid "" "Bytes objects are immutable sequences of single bytes. Since many major " "binary protocols are based on the ASCII text encoding, bytes objects offer " @@ -3983,40 +3999,40 @@ msgid "" "and are closely related to string objects in a variety of other ways." msgstr "" -#: ../../../library/stdtypes.rst:3329 +#: ../../../library/stdtypes.rst:3333 msgid "" "Firstly, the syntax for bytes literals is largely the same as that for " "string literals, except that a ``b`` prefix is added:" msgstr "" -#: ../../../library/stdtypes.rst:3332 +#: ../../../library/stdtypes.rst:3336 msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``" msgstr "" -#: ../../../library/stdtypes.rst:3333 +#: ../../../library/stdtypes.rst:3337 msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``" msgstr "" -#: ../../../library/stdtypes.rst:3334 +#: ../../../library/stdtypes.rst:3338 msgid "" "Triple quoted: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``" msgstr "" -#: ../../../library/stdtypes.rst:3336 +#: ../../../library/stdtypes.rst:3340 msgid "" "Only ASCII characters are permitted in bytes literals (regardless of the " "declared source code encoding). Any binary values over 127 must be entered " "into bytes literals using the appropriate escape sequence." msgstr "" -#: ../../../library/stdtypes.rst:3340 +#: ../../../library/stdtypes.rst:3344 msgid "" "As with string literals, bytes literals may also use a ``r`` prefix to " "disable processing of escape sequences. See :ref:`strings` for more about " "the various forms of bytes literal, including supported escape sequences." msgstr "" -#: ../../../library/stdtypes.rst:3344 +#: ../../../library/stdtypes.rst:3348 msgid "" "While bytes literals and representations are based on ASCII text, bytes " "objects actually behave like immutable sequences of integers, with each " @@ -4029,29 +4045,29 @@ msgid "" "compatible will usually lead to data corruption)." msgstr "" -#: ../../../library/stdtypes.rst:3354 +#: ../../../library/stdtypes.rst:3358 msgid "" "In addition to the literal forms, bytes objects can be created in a number " "of other ways:" msgstr "" -#: ../../../library/stdtypes.rst:3357 +#: ../../../library/stdtypes.rst:3361 msgid "A zero-filled bytes object of a specified length: ``bytes(10)``" msgstr "" -#: ../../../library/stdtypes.rst:3358 +#: ../../../library/stdtypes.rst:3362 msgid "From an iterable of integers: ``bytes(range(20))``" msgstr "" -#: ../../../library/stdtypes.rst:3359 +#: ../../../library/stdtypes.rst:3363 msgid "Copying existing binary data via the buffer protocol: ``bytes(obj)``" msgstr "" -#: ../../../library/stdtypes.rst:3361 +#: ../../../library/stdtypes.rst:3365 msgid "Also see the :ref:`bytes ` built-in." msgstr "" -#: ../../../library/stdtypes.rst:3363 +#: ../../../library/stdtypes.rst:3367 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -4059,38 +4075,38 @@ msgid "" "that format:" msgstr "" -#: ../../../library/stdtypes.rst:3369 +#: ../../../library/stdtypes.rst:3373 msgid "" "This :class:`bytes` class method returns a bytes object, decoding the given " "string object. The string must contain two hexadecimal digits per byte, " "with ASCII whitespace being ignored." msgstr "" -#: ../../../library/stdtypes.rst:3376 +#: ../../../library/stdtypes.rst:3380 msgid "" ":meth:`bytes.fromhex` now skips all ASCII whitespace in the string, not just " "spaces." msgstr "" -#: ../../../library/stdtypes.rst:3380 +#: ../../../library/stdtypes.rst:3384 msgid "" ":meth:`bytes.fromhex` now accepts ASCII :class:`bytes` and :term:`bytes-like " "objects ` as input." msgstr "" -#: ../../../library/stdtypes.rst:3384 +#: ../../../library/stdtypes.rst:3388 msgid "" "A reverse conversion function exists to transform a bytes object into its " "hexadecimal representation." msgstr "" -#: ../../../library/stdtypes.rst:3390 ../../../library/stdtypes.rst:3481 +#: ../../../library/stdtypes.rst:3394 ../../../library/stdtypes.rst:3485 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the instance." msgstr "" -#: ../../../library/stdtypes.rst:3396 +#: ../../../library/stdtypes.rst:3400 msgid "" "If you want to make the hex string easier to read, you can specify a single " "character separator *sep* parameter to include in the output. By default, " @@ -4099,13 +4115,13 @@ msgid "" "the separator position from the right, negative values from the left." msgstr "" -#: ../../../library/stdtypes.rst:3413 +#: ../../../library/stdtypes.rst:3417 msgid "" ":meth:`bytes.hex` now supports optional *sep* and *bytes_per_sep* parameters " "to insert separators between bytes in the hex output." msgstr "" -#: ../../../library/stdtypes.rst:3417 +#: ../../../library/stdtypes.rst:3421 msgid "" "Since bytes objects are sequences of integers (akin to a tuple), for a bytes " "object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be a bytes " @@ -4113,58 +4129,58 @@ msgid "" "and slicing will produce a string of length 1)" msgstr "" -#: ../../../library/stdtypes.rst:3422 +#: ../../../library/stdtypes.rst:3426 msgid "" "The representation of bytes objects uses the literal format (``b'...'``) " "since it is often more useful than e.g. ``bytes([46, 46, 46])``. You can " "always convert a bytes object into a list of integers using ``list(b)``." msgstr "" -#: ../../../library/stdtypes.rst:3430 +#: ../../../library/stdtypes.rst:3434 msgid "Bytearray Objects" msgstr "" -#: ../../../library/stdtypes.rst:3434 +#: ../../../library/stdtypes.rst:3438 msgid "" ":class:`bytearray` objects are a mutable counterpart to :class:`bytes` " "objects." msgstr "" -#: ../../../library/stdtypes.rst:3440 +#: ../../../library/stdtypes.rst:3444 msgid "" "There is no dedicated literal syntax for bytearray objects, instead they are " "always created by calling the constructor:" msgstr "" -#: ../../../library/stdtypes.rst:3443 +#: ../../../library/stdtypes.rst:3447 msgid "Creating an empty instance: ``bytearray()``" msgstr "" -#: ../../../library/stdtypes.rst:3444 +#: ../../../library/stdtypes.rst:3448 msgid "Creating a zero-filled instance with a given length: ``bytearray(10)``" msgstr "" -#: ../../../library/stdtypes.rst:3445 +#: ../../../library/stdtypes.rst:3449 msgid "From an iterable of integers: ``bytearray(range(20))``" msgstr "" -#: ../../../library/stdtypes.rst:3446 +#: ../../../library/stdtypes.rst:3450 msgid "" "Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``" msgstr "" -#: ../../../library/stdtypes.rst:3448 +#: ../../../library/stdtypes.rst:3452 msgid "" "As bytearray objects are mutable, they support the :ref:`mutable ` sequence operations in addition to the common bytes and bytearray " "operations described in :ref:`bytes-methods`." msgstr "" -#: ../../../library/stdtypes.rst:3452 +#: ../../../library/stdtypes.rst:3456 msgid "Also see the :ref:`bytearray ` built-in." msgstr "" -#: ../../../library/stdtypes.rst:3454 +#: ../../../library/stdtypes.rst:3458 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -4172,77 +4188,77 @@ msgid "" "in that format:" msgstr "" -#: ../../../library/stdtypes.rst:3460 +#: ../../../library/stdtypes.rst:3464 msgid "" "This :class:`bytearray` class method returns bytearray object, decoding the " "given string object. The string must contain two hexadecimal digits per " "byte, with ASCII whitespace being ignored." msgstr "" -#: ../../../library/stdtypes.rst:3467 +#: ../../../library/stdtypes.rst:3471 msgid "" ":meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not " "just spaces." msgstr "" -#: ../../../library/stdtypes.rst:3471 +#: ../../../library/stdtypes.rst:3475 msgid "" ":meth:`bytearray.fromhex` now accepts ASCII :class:`bytes` and :term:`bytes-" "like objects ` as input." msgstr "" -#: ../../../library/stdtypes.rst:3475 +#: ../../../library/stdtypes.rst:3479 msgid "" "A reverse conversion function exists to transform a bytearray object into " "its hexadecimal representation." msgstr "" -#: ../../../library/stdtypes.rst:3489 +#: ../../../library/stdtypes.rst:3493 msgid "" "Similar to :meth:`bytes.hex`, :meth:`bytearray.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " "the hex output." msgstr "" -#: ../../../library/stdtypes.rst:3496 +#: ../../../library/stdtypes.rst:3500 msgid "" "Resize the :class:`bytearray` to contain *size* bytes. *size* must be " "greater than or equal to 0." msgstr "" -#: ../../../library/stdtypes.rst:3499 +#: ../../../library/stdtypes.rst:3503 msgid "" "If the :class:`bytearray` needs to shrink, bytes beyond *size* are truncated." msgstr "" -#: ../../../library/stdtypes.rst:3501 +#: ../../../library/stdtypes.rst:3505 msgid "" "If the :class:`bytearray` needs to grow, all new bytes, those beyond *size*, " "will be set to null bytes." msgstr "" -#: ../../../library/stdtypes.rst:3505 +#: ../../../library/stdtypes.rst:3509 msgid "This is equivalent to:" msgstr "" -#: ../../../library/stdtypes.rst:3513 +#: ../../../library/stdtypes.rst:3517 msgid "Examples:" msgstr "" -#: ../../../library/stdtypes.rst:3528 +#: ../../../library/stdtypes.rst:3532 msgid "" "Remove the first *n* bytes from the bytearray and return them as an " "immutable :class:`bytes`. By default (if *n* is ``None``), return all bytes " "and clear the bytearray." msgstr "" -#: ../../../library/stdtypes.rst:3532 +#: ../../../library/stdtypes.rst:3536 msgid "" "If *n* is negative, index from the end and take the first :func:`len` plus " "*n* bytes. If *n* is out of bounds, raise :exc:`IndexError`." msgstr "" -#: ../../../library/stdtypes.rst:3535 +#: ../../../library/stdtypes.rst:3539 msgid "" "Taking less than the full length will leave remaining bytes in the :class:" "`bytearray`, which requires a copy. If the remaining bytes should be " @@ -4250,18 +4266,18 @@ msgid "" "func:`~bytearray.take_bytes` without a size." msgstr "" -#: ../../../library/stdtypes.rst:3542 +#: ../../../library/stdtypes.rst:3546 msgid "Taking all bytes is a zero-copy operation." msgstr "" -#: ../../../library/stdtypes.rst:3546 +#: ../../../library/stdtypes.rst:3550 msgid "" "See the :ref:`What's New ` entry for " "common code patterns which can be optimized with :meth:`bytearray." "take_bytes`." msgstr "" -#: ../../../library/stdtypes.rst:3550 +#: ../../../library/stdtypes.rst:3554 msgid "" "Since bytearray objects are sequences of integers (akin to a list), for a " "bytearray object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be " @@ -4269,7 +4285,7 @@ msgid "" "both indexing and slicing will produce a string of length 1)" msgstr "" -#: ../../../library/stdtypes.rst:3555 +#: ../../../library/stdtypes.rst:3559 msgid "" "The representation of bytearray objects uses the bytes literal format " "(``bytearray(b'...')``) since it is often more useful than e.g. " @@ -4277,17 +4293,17 @@ msgid "" "a list of integers using ``list(b)``." msgstr "" -#: ../../../library/stdtypes.rst:3562 +#: ../../../library/stdtypes.rst:3566 msgid "" "For detailed information on thread-safety guarantees for :class:`bytearray` " "objects, see :ref:`thread-safety-bytearray`." msgstr "" -#: ../../../library/stdtypes.rst:3569 +#: ../../../library/stdtypes.rst:3573 msgid "Bytes and Bytearray Operations" msgstr "" -#: ../../../library/stdtypes.rst:3574 +#: ../../../library/stdtypes.rst:3578 msgid "" "Both bytes and bytearray objects support the :ref:`common ` " "sequence operations. They interoperate not just with operands of the same " @@ -4296,104 +4312,104 @@ msgid "" "return type of the result may depend on the order of operands." msgstr "" -#: ../../../library/stdtypes.rst:3582 +#: ../../../library/stdtypes.rst:3586 msgid "" "The methods on bytes and bytearray objects don't accept strings as their " "arguments, just as the methods on strings don't accept bytes as their " "arguments. For example, you have to write::" msgstr "" -#: ../../../library/stdtypes.rst:3589 +#: ../../../library/stdtypes.rst:3593 msgid "and::" msgstr "" -#: ../../../library/stdtypes.rst:3594 +#: ../../../library/stdtypes.rst:3598 msgid "" "Some bytes and bytearray operations assume the use of ASCII compatible " "binary formats, and hence should be avoided when working with arbitrary " "binary data. These restrictions are covered below." msgstr "" -#: ../../../library/stdtypes.rst:3599 +#: ../../../library/stdtypes.rst:3603 msgid "" "Using these ASCII based operations to manipulate binary data that is not " "stored in an ASCII based format may lead to data corruption." msgstr "" -#: ../../../library/stdtypes.rst:3602 +#: ../../../library/stdtypes.rst:3606 msgid "" "The following methods on bytes and bytearray objects can be used with " "arbitrary binary data." msgstr "" -#: ../../../library/stdtypes.rst:3608 +#: ../../../library/stdtypes.rst:3612 msgid "" "Return the number of non-overlapping occurrences of subsequence *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " "interpreted as in slice notation." msgstr "" -#: ../../../library/stdtypes.rst:3612 ../../../library/stdtypes.rst:3717 -#: ../../../library/stdtypes.rst:3739 ../../../library/stdtypes.rst:3809 -#: ../../../library/stdtypes.rst:3822 +#: ../../../library/stdtypes.rst:3616 ../../../library/stdtypes.rst:3721 +#: ../../../library/stdtypes.rst:3743 ../../../library/stdtypes.rst:3813 +#: ../../../library/stdtypes.rst:3826 msgid "" "The subsequence to search for may be any :term:`bytes-like object` or an " "integer in the range 0 to 255." msgstr "" -#: ../../../library/stdtypes.rst:3615 +#: ../../../library/stdtypes.rst:3619 msgid "" "If *sub* is empty, returns the number of empty slices between characters " "which is the length of the bytes object plus one." msgstr "" -#: ../../../library/stdtypes.rst:3618 ../../../library/stdtypes.rst:3729 -#: ../../../library/stdtypes.rst:3742 ../../../library/stdtypes.rst:3812 -#: ../../../library/stdtypes.rst:3825 +#: ../../../library/stdtypes.rst:3622 ../../../library/stdtypes.rst:3733 +#: ../../../library/stdtypes.rst:3746 ../../../library/stdtypes.rst:3816 +#: ../../../library/stdtypes.rst:3829 msgid "Also accept an integer in the range 0 to 255 as the subsequence." msgstr "" -#: ../../../library/stdtypes.rst:3625 +#: ../../../library/stdtypes.rst:3629 msgid "" "If the binary data starts with the *prefix* string, return " "``bytes[len(prefix):]``. Otherwise, return a copy of the original binary " "data::" msgstr "" -#: ../../../library/stdtypes.rst:3634 +#: ../../../library/stdtypes.rst:3638 msgid "The *prefix* may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3638 ../../../library/stdtypes.rst:3660 -#: ../../../library/stdtypes.rst:3794 ../../../library/stdtypes.rst:3890 -#: ../../../library/stdtypes.rst:3904 ../../../library/stdtypes.rst:3934 -#: ../../../library/stdtypes.rst:3948 ../../../library/stdtypes.rst:3989 -#: ../../../library/stdtypes.rst:4059 ../../../library/stdtypes.rst:4077 -#: ../../../library/stdtypes.rst:4105 ../../../library/stdtypes.rst:4244 -#: ../../../library/stdtypes.rst:4299 ../../../library/stdtypes.rst:4342 -#: ../../../library/stdtypes.rst:4363 ../../../library/stdtypes.rst:4385 -#: ../../../library/stdtypes.rst:4587 +#: ../../../library/stdtypes.rst:3642 ../../../library/stdtypes.rst:3664 +#: ../../../library/stdtypes.rst:3798 ../../../library/stdtypes.rst:3894 +#: ../../../library/stdtypes.rst:3908 ../../../library/stdtypes.rst:3938 +#: ../../../library/stdtypes.rst:3952 ../../../library/stdtypes.rst:3993 +#: ../../../library/stdtypes.rst:4063 ../../../library/stdtypes.rst:4081 +#: ../../../library/stdtypes.rst:4109 ../../../library/stdtypes.rst:4248 +#: ../../../library/stdtypes.rst:4303 ../../../library/stdtypes.rst:4346 +#: ../../../library/stdtypes.rst:4367 ../../../library/stdtypes.rst:4389 +#: ../../../library/stdtypes.rst:4591 msgid "" "The bytearray version of this method does *not* operate in place - it always " "produces a new object, even if no changes were made." msgstr "" -#: ../../../library/stdtypes.rst:3647 +#: ../../../library/stdtypes.rst:3651 msgid "" "If the binary data ends with the *suffix* string and that *suffix* is not " "empty, return ``bytes[:-len(suffix)]``. Otherwise, return a copy of the " "original binary data::" msgstr "" -#: ../../../library/stdtypes.rst:3656 +#: ../../../library/stdtypes.rst:3660 msgid "The *suffix* may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3669 +#: ../../../library/stdtypes.rst:3673 msgid "Return the bytes decoded to a :class:`str`." msgstr "" -#: ../../../library/stdtypes.rst:3674 +#: ../../../library/stdtypes.rst:3678 msgid "" "*errors* controls how decoding errors are handled. If ``'strict'`` (the " "default), a :exc:`UnicodeError` exception is raised. Other possible values " @@ -4401,21 +4417,21 @@ msgid "" "`codecs.register_error`. See :ref:`error-handlers` for details." msgstr "" -#: ../../../library/stdtypes.rst:3680 +#: ../../../library/stdtypes.rst:3684 msgid "" "For performance reasons, the value of *errors* is not checked for validity " "unless a decoding error actually occurs, :ref:`devmode` is enabled or a :ref:" "`debug build ` is used." msgstr "" -#: ../../../library/stdtypes.rst:3686 +#: ../../../library/stdtypes.rst:3690 msgid "" "Passing the *encoding* argument to :class:`str` allows decoding any :term:" "`bytes-like object` directly, without needing to make a temporary :class:`!" "bytes` or :class:`!bytearray` object." msgstr "" -#: ../../../library/stdtypes.rst:3701 +#: ../../../library/stdtypes.rst:3705 msgid "" "Return ``True`` if the binary data ends with the specified *suffix*, " "otherwise return ``False``. *suffix* can also be a tuple of suffixes to " @@ -4423,11 +4439,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../../library/stdtypes.rst:3706 +#: ../../../library/stdtypes.rst:3710 msgid "The suffix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3712 +#: ../../../library/stdtypes.rst:3716 msgid "" "Return the lowest index in the data where the subsequence *sub* is found, " "such that *sub* is contained in the slice ``s[start:end]``. Optional " @@ -4435,20 +4451,20 @@ msgid "" "``-1`` if *sub* is not found." msgstr "" -#: ../../../library/stdtypes.rst:3722 +#: ../../../library/stdtypes.rst:3726 msgid "" "The :meth:`~bytes.find` method should be used only if you need to know the " "position of *sub*. To check if *sub* is a substring or not, use the :" "keyword:`in` operator::" msgstr "" -#: ../../../library/stdtypes.rst:3736 +#: ../../../library/stdtypes.rst:3740 msgid "" "Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence " "is not found." msgstr "" -#: ../../../library/stdtypes.rst:3749 +#: ../../../library/stdtypes.rst:3753 msgid "" "Return a bytes or bytearray object which is the concatenation of the binary " "data sequences in *iterable*. A :exc:`TypeError` will be raised if there " @@ -4458,7 +4474,7 @@ msgid "" "method." msgstr "" -#: ../../../library/stdtypes.rst:3760 +#: ../../../library/stdtypes.rst:3764 msgid "" "This static method returns a translation table usable for :meth:`bytes." "translate` that will map each character in *from* into the character at the " @@ -4466,7 +4482,7 @@ msgid "" "objects ` and have the same length." msgstr "" -#: ../../../library/stdtypes.rst:3771 +#: ../../../library/stdtypes.rst:3775 msgid "" "Split the sequence at the first occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself or its " @@ -4475,11 +4491,11 @@ msgid "" "by two empty bytes or bytearray objects." msgstr "" -#: ../../../library/stdtypes.rst:3778 ../../../library/stdtypes.rst:3839 +#: ../../../library/stdtypes.rst:3782 ../../../library/stdtypes.rst:3843 msgid "The separator to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3784 +#: ../../../library/stdtypes.rst:3788 msgid "" "Return a copy of the sequence with all occurrences of subsequence *old* " "replaced by *new*. If *count* is given, only the first *count* occurrences " @@ -4487,13 +4503,13 @@ msgid "" "are replaced." msgstr "" -#: ../../../library/stdtypes.rst:3789 +#: ../../../library/stdtypes.rst:3793 msgid "" "The subsequence to search for and its replacement may be any :term:`bytes-" "like object`." msgstr "" -#: ../../../library/stdtypes.rst:3804 +#: ../../../library/stdtypes.rst:3808 msgid "" "Return the highest index in the sequence where the subsequence *sub* is " "found, such that *sub* is contained within ``s[start:end]``. Optional " @@ -4501,13 +4517,13 @@ msgid "" "``-1`` on failure." msgstr "" -#: ../../../library/stdtypes.rst:3819 +#: ../../../library/stdtypes.rst:3823 msgid "" "Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the subsequence " "*sub* is not found." msgstr "" -#: ../../../library/stdtypes.rst:3832 +#: ../../../library/stdtypes.rst:3836 msgid "" "Split the sequence at the last occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself or its " @@ -4516,7 +4532,7 @@ msgid "" "followed by a copy of the original sequence." msgstr "" -#: ../../../library/stdtypes.rst:3845 +#: ../../../library/stdtypes.rst:3849 msgid "" "Return ``True`` if the binary data starts with the specified *prefix*, " "otherwise return ``False``. *prefix* can also be a tuple of prefixes to " @@ -4524,11 +4540,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../../library/stdtypes.rst:3850 +#: ../../../library/stdtypes.rst:3854 msgid "The prefix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3856 +#: ../../../library/stdtypes.rst:3860 msgid "" "Return a copy of the bytes or bytearray object where all bytes occurring in " "the optional argument *delete* are removed, and the remaining bytes have " @@ -4536,22 +4552,22 @@ msgid "" "object of length 256." msgstr "" -#: ../../../library/stdtypes.rst:3861 +#: ../../../library/stdtypes.rst:3865 msgid "" "You can use the :func:`bytes.maketrans` method to create a translation table." msgstr "" -#: ../../../library/stdtypes.rst:3864 +#: ../../../library/stdtypes.rst:3868 msgid "" "Set the *table* argument to ``None`` for translations that only delete " "characters::" msgstr "" -#: ../../../library/stdtypes.rst:3870 +#: ../../../library/stdtypes.rst:3874 msgid "*delete* is now supported as a keyword argument." msgstr "" -#: ../../../library/stdtypes.rst:3874 +#: ../../../library/stdtypes.rst:3878 msgid "" "The following methods on bytes and bytearray objects have default behaviours " "that assume the use of ASCII compatible binary formats, but can still be " @@ -4560,7 +4576,7 @@ msgid "" "instead produce new objects." msgstr "" -#: ../../../library/stdtypes.rst:3883 +#: ../../../library/stdtypes.rst:3887 msgid "" "Return a copy of the object centered in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -4568,7 +4584,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:3897 +#: ../../../library/stdtypes.rst:3901 msgid "" "Return a copy of the object left justified in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -4576,7 +4592,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:3911 +#: ../../../library/stdtypes.rst:3915 msgid "" "Return a copy of the sequence with specified leading bytes removed. The " "*bytes* argument is a binary sequence specifying the set of byte values to " @@ -4585,14 +4601,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../../library/stdtypes.rst:3922 +#: ../../../library/stdtypes.rst:3926 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`. See :meth:`~bytes.removeprefix` for a method that will remove a " "single prefix string rather than all of a set of characters. For example::" msgstr "" -#: ../../../library/stdtypes.rst:3941 +#: ../../../library/stdtypes.rst:3945 msgid "" "Return a copy of the object right justified in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -4600,7 +4616,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:3955 +#: ../../../library/stdtypes.rst:3959 msgid "" "Split the binary sequence into subsequences of the same type, using *sep* as " "the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are " @@ -4610,7 +4626,7 @@ msgid "" "described in detail below." msgstr "" -#: ../../../library/stdtypes.rst:3966 +#: ../../../library/stdtypes.rst:3970 msgid "" "Return a copy of the sequence with specified trailing bytes removed. The " "*bytes* argument is a binary sequence specifying the set of byte values to " @@ -4619,14 +4635,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../../library/stdtypes.rst:3977 +#: ../../../library/stdtypes.rst:3981 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`. See :meth:`~bytes.removesuffix` for a method that will remove a " "single suffix string rather than all of a set of characters. For example::" msgstr "" -#: ../../../library/stdtypes.rst:3996 +#: ../../../library/stdtypes.rst:4000 msgid "" "Split the binary sequence into subsequences of the same type, using *sep* as " "the delimiter string. If *maxsplit* is given and non-negative, at most " @@ -4635,7 +4651,7 @@ msgid "" "limit on the number of splits (all possible splits are made)." msgstr "" -#: ../../../library/stdtypes.rst:4002 +#: ../../../library/stdtypes.rst:4006 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty subsequences (for example, ``b'1,,2'.split(b',')`` " @@ -4646,7 +4662,7 @@ msgid "" "like object`." msgstr "" -#: ../../../library/stdtypes.rst:4021 +#: ../../../library/stdtypes.rst:4025 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive ASCII whitespace are regarded as a single " @@ -4656,7 +4672,7 @@ msgid "" "without a specified separator returns ``[]``." msgstr "" -#: ../../../library/stdtypes.rst:4042 +#: ../../../library/stdtypes.rst:4046 msgid "" "Return a copy of the sequence with specified leading and trailing bytes " "removed. The *bytes* argument is a binary sequence specifying the set of " @@ -4665,13 +4681,13 @@ msgid "" "or suffix; rather, all combinations of its values are stripped::" msgstr "" -#: ../../../library/stdtypes.rst:4054 +#: ../../../library/stdtypes.rst:4058 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`." msgstr "" -#: ../../../library/stdtypes.rst:4063 +#: ../../../library/stdtypes.rst:4067 msgid "" "The following methods on bytes and bytearray objects assume the use of ASCII " "compatible binary formats and should not be applied to arbitrary binary " @@ -4679,14 +4695,14 @@ msgid "" "operate in place, and instead produce new objects." msgstr "" -#: ../../../library/stdtypes.rst:4071 +#: ../../../library/stdtypes.rst:4075 msgid "" "Return a copy of the sequence with each byte interpreted as an ASCII " "character, and the first byte capitalized and the rest lowercased. Non-ASCII " "byte values are passed through unchanged." msgstr "" -#: ../../../library/stdtypes.rst:4084 +#: ../../../library/stdtypes.rst:4088 msgid "" "Return a copy of the sequence where all ASCII tab characters are replaced by " "one or more ASCII spaces, depending on the current column and the given tab " @@ -4702,7 +4718,7 @@ msgid "" "by one regardless of how the byte value is represented when printed::" msgstr "" -#: ../../../library/stdtypes.rst:4112 +#: ../../../library/stdtypes.rst:4116 msgid "" "Return ``True`` if all bytes in the sequence are alphabetical ASCII " "characters or ASCII decimal digits and the sequence is not empty, ``False`` " @@ -4711,7 +4727,7 @@ msgid "" "digits are those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../../library/stdtypes.rst:4129 +#: ../../../library/stdtypes.rst:4133 msgid "" "Return ``True`` if all bytes in the sequence are alphabetic ASCII characters " "and the sequence is not empty, ``False`` otherwise. Alphabetic ASCII " @@ -4719,35 +4735,35 @@ msgid "" "``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../../library/stdtypes.rst:4145 +#: ../../../library/stdtypes.rst:4149 msgid "" "Return ``True`` if the sequence is empty or all bytes in the sequence are " "ASCII, ``False`` otherwise. ASCII bytes are in the range 0-0x7F." msgstr "" -#: ../../../library/stdtypes.rst:4155 +#: ../../../library/stdtypes.rst:4159 msgid "" "Return ``True`` if all bytes in the sequence are ASCII decimal digits and " "the sequence is not empty, ``False`` otherwise. ASCII decimal digits are " "those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../../library/stdtypes.rst:4170 +#: ../../../library/stdtypes.rst:4174 msgid "" "Return ``True`` if there is at least one lowercase ASCII character in the " "sequence and no uppercase ASCII characters, ``False`` otherwise." msgstr "" -#: ../../../library/stdtypes.rst:4180 ../../../library/stdtypes.rst:4222 -#: ../../../library/stdtypes.rst:4238 ../../../library/stdtypes.rst:4288 -#: ../../../library/stdtypes.rst:4357 +#: ../../../library/stdtypes.rst:4184 ../../../library/stdtypes.rst:4226 +#: ../../../library/stdtypes.rst:4242 ../../../library/stdtypes.rst:4292 +#: ../../../library/stdtypes.rst:4361 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " "values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../../library/stdtypes.rst:4188 +#: ../../../library/stdtypes.rst:4192 msgid "" "Return ``True`` if all bytes in the sequence are ASCII whitespace and the " "sequence is not empty, ``False`` otherwise. ASCII whitespace characters are " @@ -4755,27 +4771,27 @@ msgid "" "newline, carriage return, vertical tab, form feed)." msgstr "" -#: ../../../library/stdtypes.rst:4197 +#: ../../../library/stdtypes.rst:4201 msgid "" "Return ``True`` if the sequence is ASCII titlecase and the sequence is not " "empty, ``False`` otherwise. See :meth:`bytes.title` for more details on the " "definition of \"titlecase\"." msgstr "" -#: ../../../library/stdtypes.rst:4212 +#: ../../../library/stdtypes.rst:4216 msgid "" "Return ``True`` if there is at least one uppercase alphabetic ASCII " "character in the sequence and no lowercase ASCII characters, ``False`` " "otherwise." msgstr "" -#: ../../../library/stdtypes.rst:4230 +#: ../../../library/stdtypes.rst:4234 msgid "" "Return a copy of the sequence with all the uppercase ASCII characters " "converted to their corresponding lowercase counterpart." msgstr "" -#: ../../../library/stdtypes.rst:4255 +#: ../../../library/stdtypes.rst:4259 msgid "" "Return a list of the lines in the binary sequence, breaking at ASCII line " "boundaries. This method uses the :term:`universal newlines` approach to " @@ -4783,20 +4799,20 @@ msgid "" "*keepends* is given and true." msgstr "" -#: ../../../library/stdtypes.rst:4267 +#: ../../../library/stdtypes.rst:4271 msgid "" "Unlike :meth:`~bytes.split` when a delimiter string *sep* is given, this " "method returns an empty list for the empty string, and a terminal line break " "does not result in an extra line::" msgstr "" -#: ../../../library/stdtypes.rst:4280 +#: ../../../library/stdtypes.rst:4284 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart and vice-versa." msgstr "" -#: ../../../library/stdtypes.rst:4292 +#: ../../../library/stdtypes.rst:4296 msgid "" "Unlike :func:`str.swapcase`, it is always the case that ``bin.swapcase()." "swapcase() == bin`` for the binary versions. Case conversions are " @@ -4804,14 +4820,14 @@ msgid "" "Unicode code points." msgstr "" -#: ../../../library/stdtypes.rst:4306 +#: ../../../library/stdtypes.rst:4310 msgid "" "Return a titlecased version of the binary sequence where words start with an " "uppercase ASCII character and the remaining characters are lowercase. " "Uncased byte values are left unmodified." msgstr "" -#: ../../../library/stdtypes.rst:4315 +#: ../../../library/stdtypes.rst:4319 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " @@ -4819,18 +4835,18 @@ msgid "" "values are uncased." msgstr "" -#: ../../../library/stdtypes.rst:4328 +#: ../../../library/stdtypes.rst:4332 msgid "" "A workaround for apostrophes can be constructed using regular expressions::" msgstr "" -#: ../../../library/stdtypes.rst:4349 +#: ../../../library/stdtypes.rst:4353 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart." msgstr "" -#: ../../../library/stdtypes.rst:4370 +#: ../../../library/stdtypes.rst:4374 msgid "" "Return a copy of the sequence left filled with ASCII ``b'0'`` digits to make " "a sequence of length *width*. A leading sign prefix (``b'+'``/ ``b'-'``) is " @@ -4839,11 +4855,11 @@ msgid "" "*width* is less than or equal to ``len(seq)``." msgstr "" -#: ../../../library/stdtypes.rst:4392 +#: ../../../library/stdtypes.rst:4396 msgid "``printf``-style Bytes Formatting" msgstr "" -#: ../../../library/stdtypes.rst:4409 +#: ../../../library/stdtypes.rst:4413 msgid "" "The formatting operations described here exhibit a variety of quirks that " "lead to a number of common errors (such as failing to display tuples and " @@ -4851,7 +4867,7 @@ msgid "" "dictionary, wrap it in a tuple." msgstr "" -#: ../../../library/stdtypes.rst:4414 +#: ../../../library/stdtypes.rst:4418 msgid "" "Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: " "the ``%`` operator (modulo). This is also known as the bytes *formatting* or " @@ -4861,7 +4877,7 @@ msgid "" "func:`sprintf` in the C language." msgstr "" -#: ../../../library/stdtypes.rst:4421 +#: ../../../library/stdtypes.rst:4425 msgid "" "If *format* requires a single argument, *values* may be a single non-tuple " "object. [5]_ Otherwise, *values* must be a tuple with exactly the number of " @@ -4869,7 +4885,7 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../../library/stdtypes.rst:4455 +#: ../../../library/stdtypes.rst:4459 msgid "" "When the right argument is a dictionary (or other mapping type), then the " "formats in the bytes object *must* include a parenthesised mapping key into " @@ -4877,77 +4893,77 @@ msgid "" "mapping key selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../../library/stdtypes.rst:4507 +#: ../../../library/stdtypes.rst:4511 msgid "\\(8)" msgstr "" -#: ../../../library/stdtypes.rst:4529 +#: ../../../library/stdtypes.rst:4533 msgid "Single byte (accepts integer or single byte objects)." msgstr "" -#: ../../../library/stdtypes.rst:4532 +#: ../../../library/stdtypes.rst:4536 msgid "``'b'``" msgstr "" -#: ../../../library/stdtypes.rst:4532 +#: ../../../library/stdtypes.rst:4536 msgid "" "Bytes (any object that follows the :ref:`buffer protocol ` or " "has :meth:`~object.__bytes__`)." msgstr "" -#: ../../../library/stdtypes.rst:4536 +#: ../../../library/stdtypes.rst:4540 msgid "" "``'s'`` is an alias for ``'b'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../../library/stdtypes.rst:4539 +#: ../../../library/stdtypes.rst:4543 msgid "" "Bytes (converts any Python object using ``repr(obj).encode('ascii', " "'backslashreplace')``)." msgstr "" -#: ../../../library/stdtypes.rst:4542 +#: ../../../library/stdtypes.rst:4546 msgid "" "``'r'`` is an alias for ``'a'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../../library/stdtypes.rst:4542 +#: ../../../library/stdtypes.rst:4546 msgid "\\(7)" msgstr "" -#: ../../../library/stdtypes.rst:4577 +#: ../../../library/stdtypes.rst:4581 msgid "``b'%s'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../../library/stdtypes.rst:4580 +#: ../../../library/stdtypes.rst:4584 msgid "``b'%r'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../../library/stdtypes.rst:4592 +#: ../../../library/stdtypes.rst:4596 msgid ":pep:`461` - Adding % formatting to bytes and bytearray" msgstr "" -#: ../../../library/stdtypes.rst:4599 +#: ../../../library/stdtypes.rst:4603 msgid "Memory Views" msgstr "" -#: ../../../library/stdtypes.rst:4601 +#: ../../../library/stdtypes.rst:4605 msgid "" ":class:`memoryview` objects allow Python code to access the internal data of " "an object that supports the :ref:`buffer protocol ` without " "copying." msgstr "" -#: ../../../library/stdtypes.rst:4607 +#: ../../../library/stdtypes.rst:4611 msgid "" "Create a :class:`memoryview` that references *object*. *object* must " "support the buffer protocol. Built-in objects that support the buffer " "protocol include :class:`bytes` and :class:`bytearray`." msgstr "" -#: ../../../library/stdtypes.rst:4611 +#: ../../../library/stdtypes.rst:4615 msgid "" "A :class:`memoryview` has the notion of an *element*, which is the atomic " "memory unit handled by the originating *object*. For many simple types such " @@ -4955,38 +4971,38 @@ msgid "" "other types such as :class:`array.array` may have bigger elements." msgstr "" -#: ../../../library/stdtypes.rst:4616 +#: ../../../library/stdtypes.rst:4620 msgid "" ":class:`!memoryview`\\s are :ref:`generic ` over the type of their " "underlying data." msgstr "" -#: ../../../library/stdtypes.rst:4619 +#: ../../../library/stdtypes.rst:4623 msgid "" "``len(view)`` is equal to the length of :meth:`~memoryview.tolist`, which is " "the nested list representation of the view. If ``view.ndim = 1``, this is " "equal to the number of elements in the view." msgstr "" -#: ../../../library/stdtypes.rst:4623 +#: ../../../library/stdtypes.rst:4627 msgid "" "If ``view.ndim == 0``, ``len(view)`` now raises :exc:`TypeError` instead of " "returning 1." msgstr "" -#: ../../../library/stdtypes.rst:4626 +#: ../../../library/stdtypes.rst:4630 msgid "" "The :class:`~memoryview.itemsize` attribute will give you the number of " "bytes in a single element." msgstr "" -#: ../../../library/stdtypes.rst:4629 +#: ../../../library/stdtypes.rst:4633 msgid "" "A :class:`memoryview` supports slicing and indexing to expose its data. One-" "dimensional slicing will result in a subview::" msgstr "" -#: ../../../library/stdtypes.rst:4642 +#: ../../../library/stdtypes.rst:4646 msgid "" "If :class:`~memoryview.format` is one of the native format specifiers from " "the :mod:`struct` module, indexing with an integer or a tuple of integers is " @@ -4997,86 +5013,86 @@ msgid "" "memoryviews can be indexed with the empty tuple." msgstr "" -#: ../../../library/stdtypes.rst:4651 +#: ../../../library/stdtypes.rst:4655 msgid "Here is an example with a non-byte format::" msgstr "" -#: ../../../library/stdtypes.rst:4663 +#: ../../../library/stdtypes.rst:4667 msgid "" "If the underlying object is writable, the memoryview supports one-" "dimensional slice assignment. Resizing is not allowed::" msgstr "" -#: ../../../library/stdtypes.rst:4684 +#: ../../../library/stdtypes.rst:4688 msgid "" "One-dimensional memoryviews of :term:`hashable` (read-only) types with " "formats 'B', 'b' or 'c' are also hashable. The hash is defined as ``hash(m) " "== hash(m.tobytes())``::" msgstr "" -#: ../../../library/stdtypes.rst:4696 +#: ../../../library/stdtypes.rst:4700 msgid "" "One-dimensional memoryviews can now be sliced. One-dimensional memoryviews " "with formats 'B', 'b' or 'c' are now :term:`hashable`." msgstr "" -#: ../../../library/stdtypes.rst:4700 +#: ../../../library/stdtypes.rst:4704 msgid "" "memoryview is now registered automatically with :class:`collections.abc." "Sequence`" msgstr "" -#: ../../../library/stdtypes.rst:4704 +#: ../../../library/stdtypes.rst:4708 msgid "memoryviews can now be indexed with tuple of integers." msgstr "" -#: ../../../library/stdtypes.rst:4707 +#: ../../../library/stdtypes.rst:4711 msgid "memoryview is now a :term:`generic type`." msgstr "" -#: ../../../library/stdtypes.rst:4710 +#: ../../../library/stdtypes.rst:4714 msgid ":class:`memoryview` has several methods:" msgstr "" -#: ../../../library/stdtypes.rst:4714 +#: ../../../library/stdtypes.rst:4718 msgid "" "A memoryview and a :pep:`3118` exporter are equal if their shapes are " "equivalent and if all corresponding values are equal when the operands' " "respective format codes are interpreted using :mod:`struct` syntax." msgstr "" -#: ../../../library/stdtypes.rst:4718 +#: ../../../library/stdtypes.rst:4722 msgid "" "For the subset of :mod:`struct` format strings currently supported by :meth:" "`tolist`, ``v`` and ``w`` are equal if ``v.tolist() == w.tolist()``::" msgstr "" -#: ../../../library/stdtypes.rst:4737 +#: ../../../library/stdtypes.rst:4741 msgid "" "If either format string is not supported by the :mod:`struct` module, then " "the objects will always compare as unequal (even if the format strings and " "buffer contents are identical)::" msgstr "" -#: ../../../library/stdtypes.rst:4753 +#: ../../../library/stdtypes.rst:4757 msgid "" "Note that, as with floating-point numbers, ``v is w`` does *not* imply ``v " "== w`` for memoryview objects." msgstr "" -#: ../../../library/stdtypes.rst:4756 +#: ../../../library/stdtypes.rst:4760 msgid "" "Previous versions compared the raw memory disregarding the item format and " "the logical array structure." msgstr "" -#: ../../../library/stdtypes.rst:4762 +#: ../../../library/stdtypes.rst:4766 msgid "" "Return the data in the buffer as a bytestring. This is equivalent to " "calling the :class:`bytes` constructor on the memoryview. ::" msgstr "" -#: ../../../library/stdtypes.rst:4771 +#: ../../../library/stdtypes.rst:4775 msgid "" "For non-contiguous arrays the result is equal to the flattened list " "representation with all elements converted to bytes. :meth:`tobytes` " @@ -5084,7 +5100,7 @@ msgid "" "module syntax." msgstr "" -#: ../../../library/stdtypes.rst:4776 +#: ../../../library/stdtypes.rst:4780 msgid "" "*order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data of the " "original array is converted to C or Fortran order. For contiguous views, 'A' " @@ -5093,36 +5109,36 @@ msgid "" "to C first. *order=None* is the same as *order='C'*." msgstr "" -#: ../../../library/stdtypes.rst:4786 +#: ../../../library/stdtypes.rst:4790 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the buffer. ::" msgstr "" -#: ../../../library/stdtypes.rst:4795 +#: ../../../library/stdtypes.rst:4799 msgid "" "Similar to :meth:`bytes.hex`, :meth:`memoryview.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " "the hex output." msgstr "" -#: ../../../library/stdtypes.rst:4802 +#: ../../../library/stdtypes.rst:4806 msgid "Return the data in the buffer as a list of elements. ::" msgstr "" -#: ../../../library/stdtypes.rst:4812 +#: ../../../library/stdtypes.rst:4816 msgid "" ":meth:`tolist` now supports all single character native formats in :mod:" "`struct` module syntax as well as multi-dimensional representations." msgstr "" -#: ../../../library/stdtypes.rst:4819 +#: ../../../library/stdtypes.rst:4823 msgid "" "Return a readonly version of the memoryview object. The original memoryview " "object is unchanged. ::" msgstr "" -#: ../../../library/stdtypes.rst:4838 +#: ../../../library/stdtypes.rst:4842 msgid "" "Release the underlying buffer exposed by the memoryview object. Many " "objects take special actions when a view is held on them (for example, a :" @@ -5131,20 +5147,20 @@ msgid "" "resources) as soon as possible." msgstr "" -#: ../../../library/stdtypes.rst:4844 +#: ../../../library/stdtypes.rst:4848 msgid "" "After this method has been called, any further operation on the view raises " "a :class:`ValueError` (except :meth:`release` itself which can be called " "multiple times)::" msgstr "" -#: ../../../library/stdtypes.rst:4855 +#: ../../../library/stdtypes.rst:4859 msgid "" "The context management protocol can be used for a similar effect, using the " "``with`` statement::" msgstr "" -#: ../../../library/stdtypes.rst:4872 +#: ../../../library/stdtypes.rst:4876 msgid "" "Cast a memoryview to a new format or shape. *shape* defaults to " "``[byte_length//new_itemsize]``, which means that the result view will be " @@ -5153,7 +5169,7 @@ msgid "" "contiguous -> 1D." msgstr "" -#: ../../../library/stdtypes.rst:4878 +#: ../../../library/stdtypes.rst:4882 msgid "" "The destination format is restricted to a single element native format in :" "mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or " @@ -5161,64 +5177,64 @@ msgid "" "Note that all byte lengths may depend on the operating system." msgstr "" -#: ../../../library/stdtypes.rst:4884 +#: ../../../library/stdtypes.rst:4888 msgid "Cast 1D/long to 1D/unsigned bytes::" msgstr "" -#: ../../../library/stdtypes.rst:4907 +#: ../../../library/stdtypes.rst:4911 msgid "Cast 1D/unsigned bytes to 1D/char::" msgstr "" -#: ../../../library/stdtypes.rst:4920 +#: ../../../library/stdtypes.rst:4924 msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::" msgstr "" -#: ../../../library/stdtypes.rst:4946 +#: ../../../library/stdtypes.rst:4950 msgid "Cast 1D/unsigned long to 2D/unsigned long::" msgstr "" -#: ../../../library/stdtypes.rst:4960 +#: ../../../library/stdtypes.rst:4964 msgid "The source format is no longer restricted when casting to a byte view." msgstr "" -#: ../../../library/stdtypes.rst:4965 +#: ../../../library/stdtypes.rst:4969 msgid "Count the number of occurrences of *value*." msgstr "" -#: ../../../library/stdtypes.rst:4971 +#: ../../../library/stdtypes.rst:4975 msgid "" "Return the index of the first occurrence of *value* (at or after index " "*start* and before index *stop*)." msgstr "" -#: ../../../library/stdtypes.rst:4974 +#: ../../../library/stdtypes.rst:4978 msgid "Raises a :exc:`ValueError` if *value* cannot be found." msgstr "" -#: ../../../library/stdtypes.rst:4978 +#: ../../../library/stdtypes.rst:4982 msgid "There are also several readonly attributes available:" msgstr "" -#: ../../../library/stdtypes.rst:4982 +#: ../../../library/stdtypes.rst:4986 msgid "The underlying object of the memoryview::" msgstr "" -#: ../../../library/stdtypes.rst:4993 +#: ../../../library/stdtypes.rst:4997 msgid "" "``nbytes == product(shape) * itemsize == len(m.tobytes())``. This is the " "amount of space in bytes that the array would use in a contiguous " "representation. It is not necessarily equal to ``len(m)``::" msgstr "" -#: ../../../library/stdtypes.rst:5012 +#: ../../../library/stdtypes.rst:5016 msgid "Multi-dimensional arrays::" msgstr "" -#: ../../../library/stdtypes.rst:5029 +#: ../../../library/stdtypes.rst:5033 msgid "A bool indicating whether the memory is read only." msgstr "" -#: ../../../library/stdtypes.rst:5033 +#: ../../../library/stdtypes.rst:5037 msgid "" "A string containing the format (in :mod:`struct` module style) for each " "element in the view. A memoryview can be created from exporters with " @@ -5226,65 +5242,65 @@ msgid "" "restricted to native single element formats." msgstr "" -#: ../../../library/stdtypes.rst:5038 +#: ../../../library/stdtypes.rst:5042 msgid "" "format ``'B'`` is now handled according to the struct module syntax. This " "means that ``memoryview(b'abc')[0] == b'abc'[0] == 97``." msgstr "" -#: ../../../library/stdtypes.rst:5044 +#: ../../../library/stdtypes.rst:5048 msgid "The size in bytes of each element of the memoryview::" msgstr "" -#: ../../../library/stdtypes.rst:5057 +#: ../../../library/stdtypes.rst:5061 msgid "" "An integer indicating how many dimensions of a multi-dimensional array the " "memory represents." msgstr "" -#: ../../../library/stdtypes.rst:5062 +#: ../../../library/stdtypes.rst:5066 msgid "" "A tuple of integers the length of :attr:`ndim` giving the shape of the " "memory as an N-dimensional array." msgstr "" -#: ../../../library/stdtypes.rst:5065 ../../../library/stdtypes.rst:5073 +#: ../../../library/stdtypes.rst:5069 ../../../library/stdtypes.rst:5077 msgid "An empty tuple instead of ``None`` when ndim = 0." msgstr "" -#: ../../../library/stdtypes.rst:5070 +#: ../../../library/stdtypes.rst:5074 msgid "" "A tuple of integers the length of :attr:`ndim` giving the size in bytes to " "access each element for each dimension of the array." msgstr "" -#: ../../../library/stdtypes.rst:5078 +#: ../../../library/stdtypes.rst:5082 msgid "Used internally for PIL-style arrays. The value is informational only." msgstr "" -#: ../../../library/stdtypes.rst:5082 +#: ../../../library/stdtypes.rst:5086 msgid "A bool indicating whether the memory is C-:term:`contiguous`." msgstr "" -#: ../../../library/stdtypes.rst:5088 +#: ../../../library/stdtypes.rst:5092 msgid "A bool indicating whether the memory is Fortran :term:`contiguous`." msgstr "" -#: ../../../library/stdtypes.rst:5094 +#: ../../../library/stdtypes.rst:5098 msgid "A bool indicating whether the memory is :term:`contiguous`." msgstr "" -#: ../../../library/stdtypes.rst:5098 +#: ../../../library/stdtypes.rst:5102 msgid "" "For information on the thread safety of :class:`memoryview` objects in the :" "term:`free-threaded build`, see :ref:`thread-safety-memoryview`." msgstr "" -#: ../../../library/stdtypes.rst:5105 +#: ../../../library/stdtypes.rst:5109 msgid "Set Types --- :class:`set`, :class:`frozenset`" msgstr "" -#: ../../../library/stdtypes.rst:5109 +#: ../../../library/stdtypes.rst:5113 msgid "" "A :dfn:`set` object is an unordered collection of distinct :term:`hashable` " "objects. Common uses include membership testing, removing duplicates from a " @@ -5294,7 +5310,7 @@ msgid "" "`collections` module.)" msgstr "" -#: ../../../library/stdtypes.rst:5116 +#: ../../../library/stdtypes.rst:5120 msgid "" "Like other collections, sets support ``x in set``, ``len(set)``, and ``for x " "in set``. Being an unordered collection, sets do not record element " @@ -5302,7 +5318,7 @@ msgid "" "slicing, or other sequence-like behavior." msgstr "" -#: ../../../library/stdtypes.rst:5121 +#: ../../../library/stdtypes.rst:5125 msgid "" "There are currently two built-in set types, :class:`set` and :class:" "`frozenset`. The :class:`set` type is mutable --- the contents can be " @@ -5314,18 +5330,18 @@ msgid "" "of another set." msgstr "" -#: ../../../library/stdtypes.rst:5130 +#: ../../../library/stdtypes.rst:5134 msgid "" "Non-empty sets (not frozensets) can be created by placing a comma-separated " "list of elements within braces, for example: ``{'jack', 'sjoerd'}``, in " "addition to the :class:`set` constructor." msgstr "" -#: ../../../library/stdtypes.rst:5134 +#: ../../../library/stdtypes.rst:5138 msgid "The constructors for both classes work the same:" msgstr "" -#: ../../../library/stdtypes.rst:5139 +#: ../../../library/stdtypes.rst:5143 msgid "" "Return a new set or frozenset object whose elements are taken from " "*iterable*. The elements of a set must be :term:`hashable`. To represent " @@ -5333,92 +5349,92 @@ msgid "" "*iterable* is not specified, a new empty set is returned." msgstr "" -#: ../../../library/stdtypes.rst:5145 +#: ../../../library/stdtypes.rst:5149 msgid "Sets can be created by several means:" msgstr "" -#: ../../../library/stdtypes.rst:5147 +#: ../../../library/stdtypes.rst:5151 msgid "" "Use a comma-separated list of elements within braces: ``{'jack', 'sjoerd'}``" msgstr "" -#: ../../../library/stdtypes.rst:5148 +#: ../../../library/stdtypes.rst:5152 msgid "" "Use a set comprehension: ``{c for c in 'abracadabra' if c not in 'abc'}``" msgstr "" -#: ../../../library/stdtypes.rst:5149 +#: ../../../library/stdtypes.rst:5153 msgid "" "Use the type constructor: ``set()``, ``set('foobar')``, ``set(['a', 'b', " "'foo'])``" msgstr "" -#: ../../../library/stdtypes.rst:5151 +#: ../../../library/stdtypes.rst:5155 msgid "" "Instances of :class:`set` and :class:`frozenset` provide the following " "operations:" msgstr "" -#: ../../../library/stdtypes.rst:5156 +#: ../../../library/stdtypes.rst:5160 msgid "Return the number of elements in set *s* (cardinality of *s*)." msgstr "" -#: ../../../library/stdtypes.rst:5160 +#: ../../../library/stdtypes.rst:5164 msgid "Test *x* for membership in *s*." msgstr "" -#: ../../../library/stdtypes.rst:5164 +#: ../../../library/stdtypes.rst:5168 msgid "Test *x* for non-membership in *s*." msgstr "" -#: ../../../library/stdtypes.rst:5169 +#: ../../../library/stdtypes.rst:5173 msgid "" "Return ``True`` if the set has no elements in common with *other*. Sets are " "disjoint if and only if their intersection is the empty set." msgstr "" -#: ../../../library/stdtypes.rst:5176 +#: ../../../library/stdtypes.rst:5180 msgid "Test whether every element in the set is in *other*." msgstr "" -#: ../../../library/stdtypes.rst:5180 +#: ../../../library/stdtypes.rst:5184 msgid "" "Test whether the set is a proper subset of *other*, that is, ``set <= other " "and set != other``." msgstr "" -#: ../../../library/stdtypes.rst:5187 +#: ../../../library/stdtypes.rst:5191 msgid "Test whether every element in *other* is in the set." msgstr "" -#: ../../../library/stdtypes.rst:5191 +#: ../../../library/stdtypes.rst:5195 msgid "" "Test whether the set is a proper superset of *other*, that is, ``set >= " "other and set != other``." msgstr "" -#: ../../../library/stdtypes.rst:5198 +#: ../../../library/stdtypes.rst:5202 msgid "Return a new set with elements from the set and all others." msgstr "" -#: ../../../library/stdtypes.rst:5204 +#: ../../../library/stdtypes.rst:5208 msgid "Return a new set with elements common to the set and all others." msgstr "" -#: ../../../library/stdtypes.rst:5210 +#: ../../../library/stdtypes.rst:5214 msgid "Return a new set with elements in the set that are not in the others." msgstr "" -#: ../../../library/stdtypes.rst:5216 +#: ../../../library/stdtypes.rst:5220 msgid "" "Return a new set with elements in either the set or *other* but not both." msgstr "" -#: ../../../library/stdtypes.rst:5221 +#: ../../../library/stdtypes.rst:5225 msgid "Return a shallow copy of the set." msgstr "" -#: ../../../library/stdtypes.rst:5224 +#: ../../../library/stdtypes.rst:5228 msgid "" "Note, the non-operator versions of :meth:`~frozenset.union`, :meth:" "`~frozenset.intersection`, :meth:`~frozenset.difference`, :meth:`~frozenset." @@ -5429,7 +5445,7 @@ msgid "" "the more readable ``set('abc').intersection('cbs')``." msgstr "" -#: ../../../library/stdtypes.rst:5231 +#: ../../../library/stdtypes.rst:5235 msgid "" "Both :class:`set` and :class:`frozenset` support set to set comparisons. Two " "sets are equal if and only if every element of each set is contained in the " @@ -5439,14 +5455,14 @@ msgid "" "set is a proper superset of the second set (is a superset, but is not equal)." msgstr "" -#: ../../../library/stdtypes.rst:5238 +#: ../../../library/stdtypes.rst:5242 msgid "" "Instances of :class:`set` are compared to instances of :class:`frozenset` " "based on their members. For example, ``set('abc') == frozenset('abc')`` " "returns ``True`` and so does ``set('abc') in set([frozenset('abc')])``." msgstr "" -#: ../../../library/stdtypes.rst:5242 +#: ../../../library/stdtypes.rst:5246 msgid "" "The subset and equality comparisons do not generalize to a total ordering " "function. For example, any two nonempty disjoint sets are not equal and are " @@ -5454,78 +5470,78 @@ msgid "" "``ab``." msgstr "" -#: ../../../library/stdtypes.rst:5247 +#: ../../../library/stdtypes.rst:5251 msgid "" "Since sets only define partial ordering (subset relationships), the output " "of the :meth:`list.sort` method is undefined for lists of sets." msgstr "" -#: ../../../library/stdtypes.rst:5250 +#: ../../../library/stdtypes.rst:5254 msgid "Set elements, like dictionary keys, must be :term:`hashable`." msgstr "" -#: ../../../library/stdtypes.rst:5252 +#: ../../../library/stdtypes.rst:5256 msgid "" "Binary operations that mix :class:`set` instances with :class:`frozenset` " "return the type of the first operand. For example: ``frozenset('ab') | " "set('bc')`` returns an instance of :class:`frozenset`." msgstr "" -#: ../../../library/stdtypes.rst:5256 +#: ../../../library/stdtypes.rst:5260 msgid "" "The following table lists operations available for :class:`set` that do not " "apply to immutable instances of :class:`frozenset`:" msgstr "" -#: ../../../library/stdtypes.rst:5262 +#: ../../../library/stdtypes.rst:5266 msgid "Update the set, adding elements from all others." msgstr "" -#: ../../../library/stdtypes.rst:5267 +#: ../../../library/stdtypes.rst:5271 msgid "Update the set, keeping only elements found in it and all others." msgstr "" -#: ../../../library/stdtypes.rst:5272 +#: ../../../library/stdtypes.rst:5276 msgid "Update the set, removing elements found in others." msgstr "" -#: ../../../library/stdtypes.rst:5277 +#: ../../../library/stdtypes.rst:5281 msgid "" "Update the set, keeping only elements found in either set, but not in both." msgstr "" -#: ../../../library/stdtypes.rst:5281 +#: ../../../library/stdtypes.rst:5285 msgid "Add element *elem* to the set." msgstr "" -#: ../../../library/stdtypes.rst:5285 +#: ../../../library/stdtypes.rst:5289 msgid "" "Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not " "contained in the set." msgstr "" -#: ../../../library/stdtypes.rst:5290 +#: ../../../library/stdtypes.rst:5294 msgid "Remove element *elem* from the set if it is present." msgstr "" -#: ../../../library/stdtypes.rst:5294 +#: ../../../library/stdtypes.rst:5298 msgid "" "Remove and return an arbitrary element from the set. Raises :exc:`KeyError` " "if the set is empty." msgstr "" -#: ../../../library/stdtypes.rst:5299 +#: ../../../library/stdtypes.rst:5303 msgid "Remove all elements from the set." msgstr "" -#: ../../../library/stdtypes.rst:5302 +#: ../../../library/stdtypes.rst:5306 msgid "" "Note, the non-operator versions of the :meth:`~set.update`, :meth:`~set." "intersection_update`, :meth:`~set.difference_update`, and :meth:`~set." "symmetric_difference_update` methods will accept any iterable as an argument." msgstr "" -#: ../../../library/stdtypes.rst:5307 +#: ../../../library/stdtypes.rst:5311 msgid "" "Note, the *elem* argument to the :meth:`~object.__contains__`, :meth:`~set." "remove`, and :meth:`~set.discard` methods may be a set. To support " @@ -5533,23 +5549,23 @@ msgid "" "*elem*." msgstr "" -#: ../../../library/stdtypes.rst:5312 +#: ../../../library/stdtypes.rst:5316 msgid "" "Sets and frozensets are :ref:`generic ` over the type of their " "elements." msgstr "" -#: ../../../library/stdtypes.rst:5316 +#: ../../../library/stdtypes.rst:5320 msgid "" "For detailed information on thread-safety guarantees for :class:`set` " "objects, see :ref:`thread-safety-set`." msgstr "" -#: ../../../library/stdtypes.rst:5323 +#: ../../../library/stdtypes.rst:5327 msgid "Mapping types --- :class:`!dict`, :class:`!frozendict`" msgstr "" -#: ../../../library/stdtypes.rst:5333 +#: ../../../library/stdtypes.rst:5337 msgid "" "A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. " "There are currently two standard mapping types, the :dfn:`dictionary` and :" @@ -5557,7 +5573,7 @@ msgid "" "class:`set`, and :class:`tuple` classes, and the :mod:`collections` module.)" msgstr "" -#: ../../../library/stdtypes.rst:5340 +#: ../../../library/stdtypes.rst:5344 msgid "" "A dictionary's keys are *almost* arbitrary values. Values that are not :" "term:`hashable`, that is, values containing lists, dictionaries or other " @@ -5566,33 +5582,33 @@ msgid "" "and ``True``) can be used interchangeably to index the same dictionary entry." msgstr "" -#: ../../../library/stdtypes.rst:5351 +#: ../../../library/stdtypes.rst:5355 msgid "" "Return a new dictionary initialized from an optional positional argument and " "a possibly empty set of keyword arguments." msgstr "" -#: ../../../library/stdtypes.rst:5354 +#: ../../../library/stdtypes.rst:5358 msgid "Dictionaries can be created by several means:" msgstr "" -#: ../../../library/stdtypes.rst:5356 +#: ../../../library/stdtypes.rst:5360 msgid "" "Use a comma-separated list of ``key: value`` pairs within braces: ``{'jack': " "4098, 'sjoerd': 4127}`` or ``{4098: 'jack', 4127: 'sjoerd'}``" msgstr "" -#: ../../../library/stdtypes.rst:5358 +#: ../../../library/stdtypes.rst:5362 msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" msgstr "" -#: ../../../library/stdtypes.rst:5359 +#: ../../../library/stdtypes.rst:5363 msgid "" "Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " "200)])``, ``dict(foo=100, bar=200)``" msgstr "" -#: ../../../library/stdtypes.rst:5362 +#: ../../../library/stdtypes.rst:5366 msgid "" "If no positional argument is given, an empty dictionary is created. If a " "positional argument is given and it defines a ``keys()`` method, a " @@ -5605,7 +5621,7 @@ msgid "" "that key becomes the corresponding value in the new dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5372 +#: ../../../library/stdtypes.rst:5376 msgid "" "If keyword arguments are given, the keyword arguments and their values are " "added to the dictionary created from the positional argument. If a key " @@ -5613,7 +5629,7 @@ msgid "" "the value from the positional argument." msgstr "" -#: ../../../library/stdtypes.rst:5377 +#: ../../../library/stdtypes.rst:5381 msgid "" "Dictionaries compare equal if and only if they have the same ``(key, " "value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', " @@ -5622,51 +5638,51 @@ msgid "" "``{\"one\": 1, \"two\": 2, \"three\": 3}``::" msgstr "" -#: ../../../library/stdtypes.rst:5392 +#: ../../../library/stdtypes.rst:5396 msgid "" "Providing keyword arguments as in the first example only works for keys that " "are valid Python identifiers. Otherwise, any valid keys can be used." msgstr "" -#: ../../../library/stdtypes.rst:5395 +#: ../../../library/stdtypes.rst:5399 msgid "" "Dictionaries preserve insertion order. Note that updating a key does not " "affect the order. Keys added after deletion are inserted at the end. ::" msgstr "" -#: ../../../library/stdtypes.rst:5413 +#: ../../../library/stdtypes.rst:5417 msgid "" "Dictionary order is guaranteed to be insertion order. This behavior was an " "implementation detail of CPython from 3.6." msgstr "" -#: ../../../library/stdtypes.rst:5417 +#: ../../../library/stdtypes.rst:5421 msgid "" "Dictionaries are :ref:`generic ` over two types, signifying " "(respectively) the types of the dictionary's keys and values." msgstr "" -#: ../../../library/stdtypes.rst:5420 +#: ../../../library/stdtypes.rst:5424 msgid "" "These are the operations that dictionaries support (and therefore, custom " "mapping types should support too):" msgstr "" -#: ../../../library/stdtypes.rst:5425 +#: ../../../library/stdtypes.rst:5429 msgid "Return a list of all the keys used in the dictionary *d*." msgstr "" -#: ../../../library/stdtypes.rst:5429 +#: ../../../library/stdtypes.rst:5433 msgid "Return the number of items in the dictionary *d*." msgstr "" -#: ../../../library/stdtypes.rst:5433 +#: ../../../library/stdtypes.rst:5437 msgid "" "Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is " "not in the map." msgstr "" -#: ../../../library/stdtypes.rst:5438 +#: ../../../library/stdtypes.rst:5442 msgid "" "If a subclass of dict defines a method :meth:`~object.__missing__` and *key* " "is not present, the ``d[key]`` operation calls that method with the key " @@ -5677,51 +5693,51 @@ msgid "" "__missing__` must be a method; it cannot be an instance variable::" msgstr "" -#: ../../../library/stdtypes.rst:5457 +#: ../../../library/stdtypes.rst:5461 msgid "" "The example above shows part of the implementation of :class:`collections." "Counter`. A different :meth:`!__missing__` method is used by :class:" "`collections.defaultdict`." msgstr "" -#: ../../../library/stdtypes.rst:5464 +#: ../../../library/stdtypes.rst:5468 msgid "Set ``d[key]`` to *value*." msgstr "" -#: ../../../library/stdtypes.rst:5468 +#: ../../../library/stdtypes.rst:5472 msgid "" "Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the " "map." msgstr "" -#: ../../../library/stdtypes.rst:5473 +#: ../../../library/stdtypes.rst:5477 msgid "Return ``True`` if *d* has a key *key*, else ``False``." msgstr "" -#: ../../../library/stdtypes.rst:5477 +#: ../../../library/stdtypes.rst:5481 msgid "Equivalent to ``not key in d``." msgstr "" -#: ../../../library/stdtypes.rst:5481 +#: ../../../library/stdtypes.rst:5485 msgid "" "Return an iterator over the keys of the dictionary. This is a shortcut for " "``iter(d.keys())``." msgstr "" -#: ../../../library/stdtypes.rst:5486 +#: ../../../library/stdtypes.rst:5490 msgid "Remove all items from the dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5490 +#: ../../../library/stdtypes.rst:5494 msgid "Return a shallow copy of the dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5494 +#: ../../../library/stdtypes.rst:5498 msgid "" "Create a new dictionary with keys from *iterable* and values set to *value*." msgstr "" -#: ../../../library/stdtypes.rst:5496 +#: ../../../library/stdtypes.rst:5500 msgid "" ":meth:`fromkeys` is a class method that returns a new dictionary. *value* " "defaults to ``None``. All of the values refer to just a single instance, so " @@ -5730,70 +5746,70 @@ msgid "" "` instead." msgstr "" -#: ../../../library/stdtypes.rst:5504 +#: ../../../library/stdtypes.rst:5508 msgid "" "Return the value for *key* if *key* is in the dictionary, else *default*. If " "*default* is not given, it defaults to ``None``, so that this method never " "raises a :exc:`KeyError`." msgstr "" -#: ../../../library/stdtypes.rst:5510 +#: ../../../library/stdtypes.rst:5514 msgid "" "Return a new view of the dictionary's items (``(key, value)`` pairs). See " "the :ref:`documentation of view objects `." msgstr "" -#: ../../../library/stdtypes.rst:5515 +#: ../../../library/stdtypes.rst:5519 msgid "" "Return a new view of the dictionary's keys. See the :ref:`documentation of " "view objects `." msgstr "" -#: ../../../library/stdtypes.rst:5521 +#: ../../../library/stdtypes.rst:5525 msgid "" "If *key* is in the dictionary, remove it and return its value, else return " "*default*. If *default* is not given and *key* is not in the dictionary, a :" "exc:`KeyError` is raised." msgstr "" -#: ../../../library/stdtypes.rst:5527 +#: ../../../library/stdtypes.rst:5531 msgid "" "Remove and return a ``(key, value)`` pair from the dictionary. Pairs are " "returned in :abbr:`LIFO (last-in, first-out)` order." msgstr "" -#: ../../../library/stdtypes.rst:5530 +#: ../../../library/stdtypes.rst:5534 msgid "" ":meth:`popitem` is useful to destructively iterate over a dictionary, as " "often used in set algorithms. If the dictionary is empty, calling :meth:" "`popitem` raises a :exc:`KeyError`." msgstr "" -#: ../../../library/stdtypes.rst:5534 +#: ../../../library/stdtypes.rst:5538 msgid "" "LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " "return an arbitrary key/value pair." msgstr "" -#: ../../../library/stdtypes.rst:5540 +#: ../../../library/stdtypes.rst:5544 msgid "" "Return a reverse iterator over the keys of the dictionary. This is a " "shortcut for ``reversed(d.keys())``." msgstr "" -#: ../../../library/stdtypes.rst:5547 +#: ../../../library/stdtypes.rst:5551 msgid "" "If *key* is in the dictionary, return its value. If not, insert *key* with " "a value of *default* and return *default*. *default* defaults to ``None``." msgstr "" -#: ../../../library/stdtypes.rst:5555 +#: ../../../library/stdtypes.rst:5559 msgid "" "Update the dictionary with the key/value pairs from *mapping* or *iterable* " "and *kwargs*, overwriting existing keys. Return ``None``." msgstr "" -#: ../../../library/stdtypes.rst:5558 +#: ../../../library/stdtypes.rst:5562 msgid "" ":meth:`update` accepts either another object with a ``keys()`` method (in " "which case :meth:`~object.__getitem__` is called with every key returned " @@ -5802,58 +5818,58 @@ msgid "" "is then updated with those key/value pairs: ``d.update(red=1, blue=2)``." msgstr "" -#: ../../../library/stdtypes.rst:5566 +#: ../../../library/stdtypes.rst:5570 msgid "" "Return a new view of the dictionary's values. See the :ref:`documentation " "of view objects `." msgstr "" -#: ../../../library/stdtypes.rst:5569 +#: ../../../library/stdtypes.rst:5573 msgid "" "An equality comparison between one ``dict.values()`` view and another will " "always return ``False``. This also applies when comparing ``dict.values()`` " "to itself::" msgstr "" -#: ../../../library/stdtypes.rst:5579 +#: ../../../library/stdtypes.rst:5583 msgid "" "Create a new dictionary with the merged keys and values of *d* and *other*, " "which must both be dictionaries. The values of *other* take priority when " "*d* and *other* share keys." msgstr "" -#: ../../../library/stdtypes.rst:5587 +#: ../../../library/stdtypes.rst:5591 msgid "" "Update the dictionary *d* with keys and values from *other*, which may be " "either a :term:`mapping` or an :term:`iterable` of key/value pairs. The " "values of *other* take priority when *d* and *other* share keys." msgstr "" -#: ../../../library/stdtypes.rst:5593 +#: ../../../library/stdtypes.rst:5597 msgid "Dictionaries and dictionary views are reversible. ::" msgstr "" -#: ../../../library/stdtypes.rst:5605 +#: ../../../library/stdtypes.rst:5609 msgid "Dictionaries are now reversible." msgstr "" -#: ../../../library/stdtypes.rst:5610 +#: ../../../library/stdtypes.rst:5614 msgid "" ":class:`frozendict` and :class:`types.MappingProxyType` can be used to " "create a read-only view of a :class:`dict`." msgstr "" -#: ../../../library/stdtypes.rst:5615 +#: ../../../library/stdtypes.rst:5619 msgid "" "For detailed information on thread-safety guarantees for :class:`dict` " "objects, see :ref:`thread-safety-dict`." msgstr "" -#: ../../../library/stdtypes.rst:5622 +#: ../../../library/stdtypes.rst:5626 msgid "Dictionary view objects" msgstr "" -#: ../../../library/stdtypes.rst:5624 +#: ../../../library/stdtypes.rst:5628 msgid "" "The objects returned by :meth:`dict.keys`, :meth:`dict.values` and :meth:" "`dict.items` are *view objects*. They provide a dynamic view on the " @@ -5861,23 +5877,23 @@ msgid "" "reflects these changes." msgstr "" -#: ../../../library/stdtypes.rst:5629 +#: ../../../library/stdtypes.rst:5633 msgid "" "Dictionary views can be iterated over to yield their respective data, and " "support membership tests:" msgstr "" -#: ../../../library/stdtypes.rst:5634 +#: ../../../library/stdtypes.rst:5638 msgid "Return the number of entries in the dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5638 +#: ../../../library/stdtypes.rst:5642 msgid "" "Return an iterator over the keys, values or items (represented as tuples of " "``(key, value)``) in the dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5641 +#: ../../../library/stdtypes.rst:5645 msgid "" "Keys and values are iterated over in insertion order. This allows the " "creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d." @@ -5885,39 +5901,39 @@ msgid "" "[(v, k) for (k, v) in d.items()]``." msgstr "" -#: ../../../library/stdtypes.rst:5646 +#: ../../../library/stdtypes.rst:5650 msgid "" "Iterating views while adding or deleting entries in the dictionary may raise " "a :exc:`RuntimeError` or fail to iterate over all entries." msgstr "" -#: ../../../library/stdtypes.rst:5649 +#: ../../../library/stdtypes.rst:5653 msgid "Dictionary order is guaranteed to be insertion order." msgstr "" -#: ../../../library/stdtypes.rst:5654 +#: ../../../library/stdtypes.rst:5658 msgid "" "Return ``True`` if *x* is in the underlying dictionary's keys, values or " "items (in the latter case, *x* should be a ``(key, value)`` tuple)." msgstr "" -#: ../../../library/stdtypes.rst:5659 +#: ../../../library/stdtypes.rst:5663 msgid "" "Return a reverse iterator over the keys, values or items of the dictionary. " "The view will be iterated in reverse order of the insertion." msgstr "" -#: ../../../library/stdtypes.rst:5662 +#: ../../../library/stdtypes.rst:5666 msgid "Dictionary views are now reversible." msgstr "" -#: ../../../library/stdtypes.rst:5667 +#: ../../../library/stdtypes.rst:5671 msgid "" "Return a :class:`types.MappingProxyType` that wraps the original dictionary " "to which the view refers." msgstr "" -#: ../../../library/stdtypes.rst:5672 +#: ../../../library/stdtypes.rst:5676 msgid "" "Keys views are set-like since their entries are unique and :term:`hashable`. " "Items views also have set-like operations since the (key, value) pairs are " @@ -5931,87 +5947,94 @@ msgid "" "input." msgstr "" -#: ../../../library/stdtypes.rst:5684 +#: ../../../library/stdtypes.rst:5688 msgid "An example of dictionary view usage::" msgstr "" -#: ../../../library/stdtypes.rst:5726 +#: ../../../library/stdtypes.rst:5730 msgid "Frozen dictionaries" msgstr "" -#: ../../../library/stdtypes.rst:5732 +#: ../../../library/stdtypes.rst:5736 msgid "" "Return a new frozen dictionary initialized from an optional positional " "argument and a possibly empty set of keyword arguments." msgstr "" -#: ../../../library/stdtypes.rst:5735 +#: ../../../library/stdtypes.rst:5739 msgid "" "A :class:`!frozendict` has a similar API to the :class:`dict` API, with the " "following differences:" msgstr "" -#: ../../../library/stdtypes.rst:5738 +#: ../../../library/stdtypes.rst:5742 msgid ":class:`!dict` has more methods than :class:`!frozendict`:" msgstr "" -#: ../../../library/stdtypes.rst:5740 +#: ../../../library/stdtypes.rst:5744 msgid ":meth:`!__delitem__`" msgstr "" -#: ../../../library/stdtypes.rst:5741 +#: ../../../library/stdtypes.rst:5745 msgid ":meth:`!__setitem__`" msgstr "" -#: ../../../library/stdtypes.rst:5742 +#: ../../../library/stdtypes.rst:5746 msgid ":meth:`~dict.clear`" msgstr "" -#: ../../../library/stdtypes.rst:5743 +#: ../../../library/stdtypes.rst:5747 msgid ":meth:`~dict.pop`" msgstr "" -#: ../../../library/stdtypes.rst:5744 +#: ../../../library/stdtypes.rst:5748 msgid ":meth:`~dict.popitem`" msgstr "" -#: ../../../library/stdtypes.rst:5745 +#: ../../../library/stdtypes.rst:5749 msgid ":meth:`~dict.setdefault`" msgstr "" -#: ../../../library/stdtypes.rst:5746 +#: ../../../library/stdtypes.rst:5750 msgid ":meth:`~dict.update`" msgstr "" -#: ../../../library/stdtypes.rst:5748 +#: ../../../library/stdtypes.rst:5752 msgid "" "A :class:`!frozendict` can be hashed with ``hash(frozendict)`` if all keys " "and values can be hashed." msgstr "" -#: ../../../library/stdtypes.rst:5751 +#: ../../../library/stdtypes.rst:5755 msgid "" "``frozendict |= other`` does not modify the :class:`!frozendict` in-place " "but creates a new frozen dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5754 +#: ../../../library/stdtypes.rst:5758 msgid "" ":class:`!frozendict` is not a :class:`!dict` subclass but inherits directly " "from ``object``." msgstr "" -#: ../../../library/stdtypes.rst:5757 +#: ../../../library/stdtypes.rst:5761 msgid "" "Like dictionaries, frozendicts are :ref:`generic ` over two types, " "signifying (respectively) the types of the frozendict's keys and values." msgstr "" #: ../../../library/stdtypes.rst:5766 +msgid "" +"Similar to :meth:`dict.fromkeys`, but call again the type constructor with " +"an initialized :class:`frozendict` if the type is a :class:`frozendict` " +"subclass or if the constructor returned a :class:`frozendict`." +msgstr "" + +#: ../../../library/stdtypes.rst:5777 msgid "Context Manager Types" msgstr "" -#: ../../../library/stdtypes.rst:5773 +#: ../../../library/stdtypes.rst:5784 msgid "" "Python's :keyword:`with` statement supports the concept of a runtime context " "defined by a context manager. This is implemented using a pair of methods " @@ -6019,7 +6042,7 @@ msgid "" "before the statement body is executed and exited when the statement ends:" msgstr "" -#: ../../../library/stdtypes.rst:5781 +#: ../../../library/stdtypes.rst:5792 msgid "" "Enter the runtime context and return either this object or another object " "related to the runtime context. The value returned by this method is bound " @@ -6027,14 +6050,14 @@ msgid "" "using this context manager." msgstr "" -#: ../../../library/stdtypes.rst:5786 +#: ../../../library/stdtypes.rst:5797 msgid "" "An example of a context manager that returns itself is a :term:`file " "object`. File objects return themselves from __enter__() to allow :func:" "`open` to be used as the context expression in a :keyword:`with` statement." msgstr "" -#: ../../../library/stdtypes.rst:5790 +#: ../../../library/stdtypes.rst:5801 msgid "" "An example of a context manager that returns a related object is the one " "returned by :func:`decimal.localcontext`. These managers set the active " @@ -6044,7 +6067,7 @@ msgid "" "the :keyword:`!with` statement." msgstr "" -#: ../../../library/stdtypes.rst:5800 +#: ../../../library/stdtypes.rst:5811 msgid "" "Exit the runtime context and return a Boolean flag indicating if any " "exception that occurred should be suppressed. If an exception occurred while " @@ -6053,7 +6076,7 @@ msgid "" "arguments are ``None``." msgstr "" -#: ../../../library/stdtypes.rst:5805 +#: ../../../library/stdtypes.rst:5816 msgid "" "Returning a true value from this method will cause the :keyword:`with` " "statement to suppress the exception and continue execution with the " @@ -6061,14 +6084,14 @@ msgid "" "the exception continues propagating after this method has finished executing." msgstr "" -#: ../../../library/stdtypes.rst:5810 +#: ../../../library/stdtypes.rst:5821 msgid "" "If this method raises an exception while handling an earlier exception from " "the :keyword:`with` block, the new exception is raised, and the original " "exception is stored in its :attr:`~BaseException.__context__` attribute." msgstr "" -#: ../../../library/stdtypes.rst:5814 +#: ../../../library/stdtypes.rst:5825 msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -6077,7 +6100,7 @@ msgid "" "__exit__` method has actually failed." msgstr "" -#: ../../../library/stdtypes.rst:5820 +#: ../../../library/stdtypes.rst:5831 msgid "" "Python defines several context managers to support easy thread " "synchronisation, prompt closure of files or other objects, and simpler " @@ -6086,7 +6109,7 @@ msgid "" "management protocol. See the :mod:`contextlib` module for some examples." msgstr "" -#: ../../../library/stdtypes.rst:5826 +#: ../../../library/stdtypes.rst:5837 msgid "" "Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " "decorator provide a convenient way to implement these protocols. If a " @@ -6096,7 +6119,7 @@ msgid "" "rather than the iterator produced by an undecorated generator function." msgstr "" -#: ../../../library/stdtypes.rst:5833 +#: ../../../library/stdtypes.rst:5844 msgid "" "Note that there is no specific slot for any of these methods in the type " "structure for Python objects in the Python/C API. Extension types wanting to " @@ -6105,23 +6128,23 @@ msgid "" "a single class dictionary lookup is negligible." msgstr "" -#: ../../../library/stdtypes.rst:5841 +#: ../../../library/stdtypes.rst:5852 msgid "" "Type Annotation Types --- :ref:`Generic Alias `, :ref:" "`Union `" msgstr "" -#: ../../../library/stdtypes.rst:5846 +#: ../../../library/stdtypes.rst:5857 msgid "" "The core built-in types for :term:`type annotations ` are :ref:" "`Generic Alias ` and :ref:`Union `." msgstr "" -#: ../../../library/stdtypes.rst:5853 +#: ../../../library/stdtypes.rst:5864 msgid "Generic Alias Type" msgstr "" -#: ../../../library/stdtypes.rst:5859 +#: ../../../library/stdtypes.rst:5870 msgid "" "``GenericAlias`` objects are generally created by :ref:`subscripting " "` a class. They are most often used with :ref:`container " @@ -6131,19 +6154,19 @@ msgid "" "are intended primarily for use with :term:`type annotations `." msgstr "" -#: ../../../library/stdtypes.rst:5869 +#: ../../../library/stdtypes.rst:5880 msgid "" "It is generally only possible to subscript a class if the class implements " "the special method :meth:`~object.__class_getitem__`." msgstr "" -#: ../../../library/stdtypes.rst:5872 +#: ../../../library/stdtypes.rst:5883 msgid "" "A ``GenericAlias`` object acts as a proxy for a :term:`generic type`, " "implementing *parameterized generics*." msgstr "" -#: ../../../library/stdtypes.rst:5875 +#: ../../../library/stdtypes.rst:5886 msgid "" "For a container class, the argument(s) supplied to a :ref:`subscription " "` of the class may indicate the type(s) of the elements an " @@ -6152,7 +6175,7 @@ msgid "" "`bytes`." msgstr "" -#: ../../../library/stdtypes.rst:5881 +#: ../../../library/stdtypes.rst:5892 msgid "" "For a class which defines :meth:`~object.__class_getitem__` but is not a " "container, the argument(s) supplied to a subscription of the class will " @@ -6161,7 +6184,7 @@ msgid "" "the :class:`str` data type and the :class:`bytes` data type:" msgstr "" -#: ../../../library/stdtypes.rst:5887 +#: ../../../library/stdtypes.rst:5898 msgid "" "If ``x = re.search('foo', 'foo')``, ``x`` will be a :ref:`re.Match ` object where the return values of ``x.group(0)`` and ``x[0]`` will " @@ -6169,7 +6192,7 @@ msgid "" "annotations with the ``GenericAlias`` ``re.Match[str]``." msgstr "" -#: ../../../library/stdtypes.rst:5893 +#: ../../../library/stdtypes.rst:5904 msgid "" "If ``y = re.search(b'bar', b'bar')``, (note the ``b`` for :class:`bytes`), " "``y`` will also be an instance of ``re.Match``, but the return values of ``y." @@ -6178,7 +6201,7 @@ msgid "" "objects>` objects with ``re.Match[bytes]``." msgstr "" -#: ../../../library/stdtypes.rst:5899 +#: ../../../library/stdtypes.rst:5910 msgid "" "``GenericAlias`` objects are instances of the class :class:`types." "GenericAlias`, which can also be used to create ``GenericAlias`` objects " @@ -6187,14 +6210,14 @@ msgid "" "provide similar functionality." msgstr "" -#: ../../../library/stdtypes.rst:5906 +#: ../../../library/stdtypes.rst:5917 msgid "" "Creates a ``GenericAlias`` representing a type ``T`` parameterized by types " "*X*, *Y*, and more depending on the ``T`` used. For example, a function " "expecting a :class:`list` containing :class:`float` elements::" msgstr "" -#: ../../../library/stdtypes.rst:5914 +#: ../../../library/stdtypes.rst:5925 msgid "" "Another example for :term:`mapping` objects, using a :class:`dict`, which is " "a generic type expecting two type parameters representing the key type and " @@ -6202,13 +6225,13 @@ msgid "" "of type :class:`str` and values of type :class:`int`::" msgstr "" -#: ../../../library/stdtypes.rst:5922 +#: ../../../library/stdtypes.rst:5933 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" msgstr "" -#: ../../../library/stdtypes.rst:5930 +#: ../../../library/stdtypes.rst:5941 msgid "" "The Python runtime does not enforce :term:`type annotations `. " "This extends to generic types and their type parameters. When creating a " @@ -6217,354 +6240,354 @@ msgid "" "discouraged, but will run without errors::" msgstr "" -#: ../../../library/stdtypes.rst:5940 +#: ../../../library/stdtypes.rst:5951 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" msgstr "" -#: ../../../library/stdtypes.rst:5952 +#: ../../../library/stdtypes.rst:5963 msgid "" "Instances of ``GenericAlias`` are not classes at runtime, even though they " "behave like classes (they can be instantiated and subclassed)::" msgstr "" -#: ../../../library/stdtypes.rst:5958 +#: ../../../library/stdtypes.rst:5969 msgid "" "This is true for :ref:`user-defined generics ` also." msgstr "" -#: ../../../library/stdtypes.rst:5960 +#: ../../../library/stdtypes.rst:5971 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" msgstr "" -#: ../../../library/stdtypes.rst:5968 +#: ../../../library/stdtypes.rst:5979 msgid "" "The :meth:`~object.__getitem__` method of generic containers will raise an " "exception to disallow mistakes like ``dict[str][str]``::" msgstr "" -#: ../../../library/stdtypes.rst:5976 +#: ../../../library/stdtypes.rst:5987 msgid "" "However, such expressions are valid when :ref:`type variables ` " "are used. The index must have as many elements as there are type variable " "items in the ``GenericAlias`` object's :attr:`~genericalias.__args__`. ::" msgstr "" -#: ../../../library/stdtypes.rst:5987 +#: ../../../library/stdtypes.rst:5998 msgid "Standard Generic Classes" msgstr "" -#: ../../../library/stdtypes.rst:5989 +#: ../../../library/stdtypes.rst:6000 msgid "" "The following standard library classes support parameterized generics. This " "list is non-exhaustive." msgstr "" -#: ../../../library/stdtypes.rst:5992 +#: ../../../library/stdtypes.rst:6003 msgid ":class:`tuple`" msgstr "" -#: ../../../library/stdtypes.rst:5993 +#: ../../../library/stdtypes.rst:6004 msgid ":class:`list`" msgstr "" -#: ../../../library/stdtypes.rst:5994 +#: ../../../library/stdtypes.rst:6005 msgid ":class:`dict`" msgstr "" -#: ../../../library/stdtypes.rst:5995 +#: ../../../library/stdtypes.rst:6006 msgid ":class:`set`" msgstr "" -#: ../../../library/stdtypes.rst:5996 +#: ../../../library/stdtypes.rst:6007 msgid ":class:`frozendict`" msgstr "" -#: ../../../library/stdtypes.rst:5997 +#: ../../../library/stdtypes.rst:6008 msgid ":class:`frozenset`" msgstr "" -#: ../../../library/stdtypes.rst:5998 +#: ../../../library/stdtypes.rst:6009 msgid ":class:`type`" msgstr "" -#: ../../../library/stdtypes.rst:5999 +#: ../../../library/stdtypes.rst:6010 msgid ":class:`asyncio.Future`" msgstr "" -#: ../../../library/stdtypes.rst:6000 +#: ../../../library/stdtypes.rst:6011 msgid ":class:`asyncio.Task`" msgstr "" -#: ../../../library/stdtypes.rst:6001 +#: ../../../library/stdtypes.rst:6012 msgid ":class:`collections.deque`" msgstr "" -#: ../../../library/stdtypes.rst:6002 +#: ../../../library/stdtypes.rst:6013 msgid ":class:`collections.defaultdict`" msgstr "" -#: ../../../library/stdtypes.rst:6003 +#: ../../../library/stdtypes.rst:6014 msgid ":class:`collections.OrderedDict`" msgstr "" -#: ../../../library/stdtypes.rst:6004 +#: ../../../library/stdtypes.rst:6015 msgid ":class:`collections.Counter`" msgstr "" -#: ../../../library/stdtypes.rst:6005 +#: ../../../library/stdtypes.rst:6016 msgid ":class:`collections.ChainMap`" msgstr "" -#: ../../../library/stdtypes.rst:6006 +#: ../../../library/stdtypes.rst:6017 msgid ":class:`collections.abc.Awaitable`" msgstr "" -#: ../../../library/stdtypes.rst:6007 +#: ../../../library/stdtypes.rst:6018 msgid ":class:`collections.abc.Coroutine`" msgstr "" -#: ../../../library/stdtypes.rst:6008 +#: ../../../library/stdtypes.rst:6019 msgid ":class:`collections.abc.AsyncIterable`" msgstr "" -#: ../../../library/stdtypes.rst:6009 +#: ../../../library/stdtypes.rst:6020 msgid ":class:`collections.abc.AsyncIterator`" msgstr "" -#: ../../../library/stdtypes.rst:6010 +#: ../../../library/stdtypes.rst:6021 msgid ":class:`collections.abc.AsyncGenerator`" msgstr "" -#: ../../../library/stdtypes.rst:6011 +#: ../../../library/stdtypes.rst:6022 msgid ":class:`collections.abc.Iterable`" msgstr "" -#: ../../../library/stdtypes.rst:6012 +#: ../../../library/stdtypes.rst:6023 msgid ":class:`collections.abc.Iterator`" msgstr "" -#: ../../../library/stdtypes.rst:6013 +#: ../../../library/stdtypes.rst:6024 msgid ":class:`collections.abc.Generator`" msgstr "" -#: ../../../library/stdtypes.rst:6014 +#: ../../../library/stdtypes.rst:6025 msgid ":class:`collections.abc.Reversible`" msgstr "" -#: ../../../library/stdtypes.rst:6015 +#: ../../../library/stdtypes.rst:6026 msgid ":class:`collections.abc.Container`" msgstr "" -#: ../../../library/stdtypes.rst:6016 +#: ../../../library/stdtypes.rst:6027 msgid ":class:`collections.abc.Collection`" msgstr "" -#: ../../../library/stdtypes.rst:6017 +#: ../../../library/stdtypes.rst:6028 msgid ":class:`collections.abc.Callable`" msgstr "" -#: ../../../library/stdtypes.rst:6018 +#: ../../../library/stdtypes.rst:6029 msgid ":class:`collections.abc.Set`" msgstr "" -#: ../../../library/stdtypes.rst:6019 +#: ../../../library/stdtypes.rst:6030 msgid ":class:`collections.abc.MutableSet`" msgstr "" -#: ../../../library/stdtypes.rst:6020 +#: ../../../library/stdtypes.rst:6031 msgid ":class:`collections.abc.Mapping`" msgstr "" -#: ../../../library/stdtypes.rst:6021 +#: ../../../library/stdtypes.rst:6032 msgid ":class:`collections.abc.MutableMapping`" msgstr "" -#: ../../../library/stdtypes.rst:6022 +#: ../../../library/stdtypes.rst:6033 msgid ":class:`collections.abc.Sequence`" msgstr "" -#: ../../../library/stdtypes.rst:6023 +#: ../../../library/stdtypes.rst:6034 msgid ":class:`collections.abc.MutableSequence`" msgstr "" -#: ../../../library/stdtypes.rst:6024 +#: ../../../library/stdtypes.rst:6035 msgid ":class:`collections.abc.ByteString`" msgstr "" -#: ../../../library/stdtypes.rst:6025 +#: ../../../library/stdtypes.rst:6036 msgid ":class:`collections.abc.MappingView`" msgstr "" -#: ../../../library/stdtypes.rst:6026 +#: ../../../library/stdtypes.rst:6037 msgid ":class:`collections.abc.KeysView`" msgstr "" -#: ../../../library/stdtypes.rst:6027 +#: ../../../library/stdtypes.rst:6038 msgid ":class:`collections.abc.ItemsView`" msgstr "" -#: ../../../library/stdtypes.rst:6028 +#: ../../../library/stdtypes.rst:6039 msgid ":class:`collections.abc.ValuesView`" msgstr "" -#: ../../../library/stdtypes.rst:6029 +#: ../../../library/stdtypes.rst:6040 msgid ":class:`contextlib.AbstractContextManager`" msgstr "" -#: ../../../library/stdtypes.rst:6030 +#: ../../../library/stdtypes.rst:6041 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr "" -#: ../../../library/stdtypes.rst:6031 +#: ../../../library/stdtypes.rst:6042 msgid ":class:`dataclasses.Field`" msgstr "" -#: ../../../library/stdtypes.rst:6032 +#: ../../../library/stdtypes.rst:6043 msgid ":class:`functools.cached_property`" msgstr "" -#: ../../../library/stdtypes.rst:6033 +#: ../../../library/stdtypes.rst:6044 msgid ":class:`functools.partialmethod`" msgstr "" -#: ../../../library/stdtypes.rst:6034 +#: ../../../library/stdtypes.rst:6045 msgid ":class:`os.PathLike`" msgstr "" -#: ../../../library/stdtypes.rst:6035 +#: ../../../library/stdtypes.rst:6046 msgid ":class:`queue.LifoQueue`" msgstr "" -#: ../../../library/stdtypes.rst:6036 +#: ../../../library/stdtypes.rst:6047 msgid ":class:`queue.Queue`" msgstr "" -#: ../../../library/stdtypes.rst:6037 +#: ../../../library/stdtypes.rst:6048 msgid ":class:`queue.PriorityQueue`" msgstr "" -#: ../../../library/stdtypes.rst:6038 +#: ../../../library/stdtypes.rst:6049 msgid ":class:`queue.SimpleQueue`" msgstr "" -#: ../../../library/stdtypes.rst:6039 +#: ../../../library/stdtypes.rst:6050 msgid ":ref:`re.Pattern `" msgstr "" -#: ../../../library/stdtypes.rst:6040 +#: ../../../library/stdtypes.rst:6051 msgid ":ref:`re.Match `" msgstr "" -#: ../../../library/stdtypes.rst:6041 +#: ../../../library/stdtypes.rst:6052 msgid ":class:`shelve.BsdDbShelf`" msgstr "" -#: ../../../library/stdtypes.rst:6042 +#: ../../../library/stdtypes.rst:6053 msgid ":class:`shelve.DbfilenameShelf`" msgstr "" -#: ../../../library/stdtypes.rst:6043 +#: ../../../library/stdtypes.rst:6054 msgid ":class:`shelve.Shelf`" msgstr "" -#: ../../../library/stdtypes.rst:6044 +#: ../../../library/stdtypes.rst:6055 msgid ":class:`types.MappingProxyType`" msgstr "" -#: ../../../library/stdtypes.rst:6045 +#: ../../../library/stdtypes.rst:6056 msgid ":class:`weakref.WeakKeyDictionary`" msgstr "" -#: ../../../library/stdtypes.rst:6046 +#: ../../../library/stdtypes.rst:6057 msgid ":class:`weakref.WeakMethod`" msgstr "" -#: ../../../library/stdtypes.rst:6047 +#: ../../../library/stdtypes.rst:6058 msgid ":class:`weakref.WeakSet`" msgstr "" -#: ../../../library/stdtypes.rst:6048 +#: ../../../library/stdtypes.rst:6059 msgid ":class:`weakref.WeakValueDictionary`" msgstr "" -#: ../../../library/stdtypes.rst:6053 +#: ../../../library/stdtypes.rst:6064 msgid "Special Attributes of ``GenericAlias`` objects" msgstr "" -#: ../../../library/stdtypes.rst:6055 +#: ../../../library/stdtypes.rst:6066 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: ../../../library/stdtypes.rst:6059 +#: ../../../library/stdtypes.rst:6070 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: ../../../library/stdtypes.rst:6067 +#: ../../../library/stdtypes.rst:6078 msgid "" "This attribute is a :class:`tuple` (possibly of length 1) of generic types " "passed to the original :meth:`~object.__class_getitem__` of the generic " "class::" msgstr "" -#: ../../../library/stdtypes.rst:6077 +#: ../../../library/stdtypes.rst:6088 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: ../../../library/stdtypes.rst:6088 +#: ../../../library/stdtypes.rst:6099 msgid "" "A ``GenericAlias`` object with :class:`typing.ParamSpec` parameters may not " "have correct ``__parameters__`` after substitution because :class:`typing." "ParamSpec` is intended primarily for static type checking." msgstr "" -#: ../../../library/stdtypes.rst:6095 +#: ../../../library/stdtypes.rst:6106 msgid "" "A boolean that is true if the alias has been unpacked using the ``*`` " "operator (see :data:`~typing.TypeVarTuple`)." msgstr "" -#: ../../../library/stdtypes.rst:6103 +#: ../../../library/stdtypes.rst:6114 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../../library/stdtypes.rst:6104 +#: ../../../library/stdtypes.rst:6115 msgid "Introducing Python's framework for type annotations." msgstr "" -#: ../../../library/stdtypes.rst:6106 +#: ../../../library/stdtypes.rst:6117 msgid ":pep:`585` - Type Hinting Generics In Standard Collections" msgstr "" -#: ../../../library/stdtypes.rst:6107 +#: ../../../library/stdtypes.rst:6118 msgid "" "Introducing the ability to natively parameterize standard-library classes, " "provided they implement the special class method :meth:`~object." "__class_getitem__`." msgstr "" -#: ../../../library/stdtypes.rst:6111 +#: ../../../library/stdtypes.rst:6122 msgid "" ":ref:`Generics`, :ref:`user-defined generics ` and :" "class:`typing.Generic`" msgstr "" -#: ../../../library/stdtypes.rst:6112 +#: ../../../library/stdtypes.rst:6123 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../../library/stdtypes.rst:6121 +#: ../../../library/stdtypes.rst:6132 msgid "Union Type" msgstr "" -#: ../../../library/stdtypes.rst:6127 +#: ../../../library/stdtypes.rst:6138 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -6573,7 +6596,7 @@ msgid "" "class:`typing.Union`." msgstr "" -#: ../../../library/stdtypes.rst:6134 +#: ../../../library/stdtypes.rst:6145 msgid "" "Defines a union object which holds types *X*, *Y*, and so forth. ``X | Y`` " "means either X or Y. It is equivalent to ``typing.Union[X, Y]``. For " @@ -6581,7 +6604,7 @@ msgid "" "class:`float`::" msgstr "" -#: ../../../library/stdtypes.rst:6144 +#: ../../../library/stdtypes.rst:6155 msgid "" "The ``|`` operand cannot be used at runtime to define unions where one or " "more members is a forward reference. For example, ``int | \"Foo\"``, where " @@ -6590,82 +6613,82 @@ msgid "" "a string, e.g. ``\"int | Foo\"``." msgstr "" -#: ../../../library/stdtypes.rst:6152 +#: ../../../library/stdtypes.rst:6163 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" -#: ../../../library/stdtypes.rst:6154 +#: ../../../library/stdtypes.rst:6165 msgid "Unions of unions are flattened::" msgstr "" -#: ../../../library/stdtypes.rst:6158 +#: ../../../library/stdtypes.rst:6169 msgid "Redundant types are removed::" msgstr "" -#: ../../../library/stdtypes.rst:6162 +#: ../../../library/stdtypes.rst:6173 msgid "When comparing unions, the order is ignored::" msgstr "" -#: ../../../library/stdtypes.rst:6166 +#: ../../../library/stdtypes.rst:6177 msgid "It creates instances of :class:`typing.Union`::" msgstr "" -#: ../../../library/stdtypes.rst:6171 +#: ../../../library/stdtypes.rst:6182 msgid "Optional types can be spelled as a union with ``None``::" msgstr "" -#: ../../../library/stdtypes.rst:6178 +#: ../../../library/stdtypes.rst:6189 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" msgstr "" -#: ../../../library/stdtypes.rst:6184 +#: ../../../library/stdtypes.rst:6195 msgid "" "However, :ref:`parameterized generics ` in union objects " "cannot be checked::" msgstr "" -#: ../../../library/stdtypes.rst:6194 +#: ../../../library/stdtypes.rst:6205 msgid "" "The user-exposed type for the union object can be accessed from :class:" "`typing.Union` and used for :func:`isinstance` checks::" msgstr "" -#: ../../../library/stdtypes.rst:6206 +#: ../../../library/stdtypes.rst:6217 msgid "" "The :meth:`!__or__` method for type objects was added to support the syntax " "``X | Y``. If a metaclass implements :meth:`!__or__`, the Union may " "override it:" msgstr "" -#: ../../../library/stdtypes.rst:6226 +#: ../../../library/stdtypes.rst:6237 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" -#: ../../../library/stdtypes.rst:6232 +#: ../../../library/stdtypes.rst:6243 msgid "" "Union objects are now instances of :class:`typing.Union`. Previously, they " "were instances of :class:`types.UnionType`, which remains an alias for :" "class:`typing.Union`." msgstr "" -#: ../../../library/stdtypes.rst:6239 +#: ../../../library/stdtypes.rst:6250 msgid "Other Built-in Types" msgstr "" -#: ../../../library/stdtypes.rst:6241 +#: ../../../library/stdtypes.rst:6252 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." msgstr "" -#: ../../../library/stdtypes.rst:6248 +#: ../../../library/stdtypes.rst:6259 msgid "Modules" msgstr "" -#: ../../../library/stdtypes.rst:6250 +#: ../../../library/stdtypes.rst:6261 msgid "" "The only special operation on a module is attribute access: ``m.name``, " "where *m* is a module and *name* accesses a name defined in *m*'s symbol " @@ -6676,7 +6699,7 @@ msgid "" "*foo* somewhere.)" msgstr "" -#: ../../../library/stdtypes.rst:6257 +#: ../../../library/stdtypes.rst:6268 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -6687,32 +6710,32 @@ msgid "" "recommended." msgstr "" -#: ../../../library/stdtypes.rst:6265 +#: ../../../library/stdtypes.rst:6276 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" -#: ../../../library/stdtypes.rst:6273 +#: ../../../library/stdtypes.rst:6284 msgid "Classes and Class Instances" msgstr "" -#: ../../../library/stdtypes.rst:6275 +#: ../../../library/stdtypes.rst:6286 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "" -#: ../../../library/stdtypes.rst:6281 +#: ../../../library/stdtypes.rst:6292 msgid "Functions" msgstr "" -#: ../../../library/stdtypes.rst:6283 +#: ../../../library/stdtypes.rst:6294 msgid "" "Function objects are created by function definitions. The only operation on " "a function object is to call it: ``func(argument-list)``." msgstr "" -#: ../../../library/stdtypes.rst:6286 +#: ../../../library/stdtypes.rst:6297 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -6720,15 +6743,15 @@ msgid "" "types." msgstr "" -#: ../../../library/stdtypes.rst:6290 +#: ../../../library/stdtypes.rst:6301 msgid "See :ref:`function` for more information." msgstr "" -#: ../../../library/stdtypes.rst:6296 +#: ../../../library/stdtypes.rst:6307 msgid "Methods" msgstr "" -#: ../../../library/stdtypes.rst:6300 +#: ../../../library/stdtypes.rst:6311 msgid "" "Methods are functions that are called using the attribute notation. There " "are two flavors: :ref:`built-in methods ` (such as :meth:" @@ -6736,7 +6759,7 @@ msgid "" "methods>`. Built-in methods are described with the types that support them." msgstr "" -#: ../../../library/stdtypes.rst:6306 +#: ../../../library/stdtypes.rst:6317 msgid "" "If you access a method (a function defined in a class namespace) through an " "instance, you get a special object: a :dfn:`bound method` (also called :ref:" @@ -6749,7 +6772,7 @@ msgid "" "arg-2, ..., arg-n)``." msgstr "" -#: ../../../library/stdtypes.rst:6317 +#: ../../../library/stdtypes.rst:6328 msgid "" "Like :ref:`function objects `, bound method objects " "support getting arbitrary attributes. However, since method attributes are " @@ -6760,15 +6783,15 @@ msgid "" "underlying function object:" msgstr "" -#: ../../../library/stdtypes.rst:6340 +#: ../../../library/stdtypes.rst:6351 msgid "See :ref:`instance-methods` for more information." msgstr "" -#: ../../../library/stdtypes.rst:6348 +#: ../../../library/stdtypes.rst:6359 msgid "Code Objects" msgstr "" -#: ../../../library/stdtypes.rst:6354 +#: ../../../library/stdtypes.rst:6365 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -6778,28 +6801,28 @@ msgid "" "`~function.__code__` attribute. See also the :mod:`code` module." msgstr "" -#: ../../../library/stdtypes.rst:6361 +#: ../../../library/stdtypes.rst:6372 msgid "" "Accessing :attr:`~function.__code__` raises an :ref:`auditing event " "` ``object.__getattr__`` with arguments ``obj`` and " "``\"__code__\"``." msgstr "" -#: ../../../library/stdtypes.rst:6368 +#: ../../../library/stdtypes.rst:6379 msgid "" "A code object can be executed or evaluated by passing it (instead of a " "source string) to the :func:`exec` or :func:`eval` built-in functions." msgstr "" -#: ../../../library/stdtypes.rst:6371 +#: ../../../library/stdtypes.rst:6382 msgid "See :ref:`types` for more information." msgstr "" -#: ../../../library/stdtypes.rst:6377 +#: ../../../library/stdtypes.rst:6388 msgid "Type Objects" msgstr "" -#: ../../../library/stdtypes.rst:6383 +#: ../../../library/stdtypes.rst:6394 msgid "" "Type objects represent the various object types. An object's type is " "accessed by the built-in function :func:`type`. There are no special " @@ -6807,30 +6830,30 @@ msgid "" "standard built-in types." msgstr "" -#: ../../../library/stdtypes.rst:6388 +#: ../../../library/stdtypes.rst:6399 msgid "Types are written like this: ````." msgstr "" -#: ../../../library/stdtypes.rst:6394 +#: ../../../library/stdtypes.rst:6405 msgid "The Null Object" msgstr "" -#: ../../../library/stdtypes.rst:6396 +#: ../../../library/stdtypes.rst:6407 msgid "" "This object is returned by functions that don't explicitly return a value. " "It supports no special operations. There is exactly one null object, named " "``None`` (a built-in name). ``type(None)()`` produces the same singleton." msgstr "" -#: ../../../library/stdtypes.rst:6400 +#: ../../../library/stdtypes.rst:6411 msgid "It is written as ``None``." msgstr "" -#: ../../../library/stdtypes.rst:6407 +#: ../../../library/stdtypes.rst:6418 msgid "The Ellipsis Object" msgstr "" -#: ../../../library/stdtypes.rst:6409 +#: ../../../library/stdtypes.rst:6420 msgid "" "This object is commonly used to indicate that something is omitted. It " "supports no special operations. There is exactly one ellipsis object, " @@ -6838,63 +6861,63 @@ msgid "" "the :const:`Ellipsis` singleton." msgstr "" -#: ../../../library/stdtypes.rst:6414 +#: ../../../library/stdtypes.rst:6425 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "" -#: ../../../library/stdtypes.rst:6416 +#: ../../../library/stdtypes.rst:6427 msgid "" "In typical use, ``...`` as the ``Ellipsis`` object appears in a few " "different places, for instance:" msgstr "" -#: ../../../library/stdtypes.rst:6419 +#: ../../../library/stdtypes.rst:6430 msgid "" "In type annotations, such as :ref:`callable arguments ` or :ref:`tuple elements `." msgstr "" -#: ../../../library/stdtypes.rst:6422 +#: ../../../library/stdtypes.rst:6433 msgid "" "As the body of a function instead of a :ref:`pass statement `." msgstr "" -#: ../../../library/stdtypes.rst:6424 +#: ../../../library/stdtypes.rst:6435 msgid "" "In third-party libraries, such as `Numpy's slicing and striding `_." msgstr "" -#: ../../../library/stdtypes.rst:6427 +#: ../../../library/stdtypes.rst:6438 msgid "" "Python also uses three dots in ways that are not ``Ellipsis`` objects, for " "instance:" msgstr "" -#: ../../../library/stdtypes.rst:6429 +#: ../../../library/stdtypes.rst:6440 msgid "" "Doctest's :const:`ELLIPSIS `, as a pattern for missing " "content." msgstr "" -#: ../../../library/stdtypes.rst:6431 +#: ../../../library/stdtypes.rst:6442 msgid "" "The default Python prompt of the :term:`interactive` shell when partial " "input is incomplete." msgstr "" -#: ../../../library/stdtypes.rst:6433 +#: ../../../library/stdtypes.rst:6444 msgid "" "Lastly, the Python documentation often uses three dots in conventional " "English usage to mean omitted content, even in code examples that also use " "them as the ``Ellipsis``." msgstr "" -#: ../../../library/stdtypes.rst:6441 +#: ../../../library/stdtypes.rst:6452 msgid "The NotImplemented Object" msgstr "" -#: ../../../library/stdtypes.rst:6443 +#: ../../../library/stdtypes.rst:6454 msgid "" "This object is returned from comparisons and binary operations when they are " "asked to operate on types they don't support. See :ref:`comparisons` for " @@ -6902,64 +6925,64 @@ msgid "" "`type(NotImplemented)()` produces the singleton instance." msgstr "" -#: ../../../library/stdtypes.rst:6448 +#: ../../../library/stdtypes.rst:6459 msgid "It is written as :code:`NotImplemented`." msgstr "" -#: ../../../library/stdtypes.rst:6454 +#: ../../../library/stdtypes.rst:6465 msgid "Internal Objects" msgstr "" -#: ../../../library/stdtypes.rst:6456 +#: ../../../library/stdtypes.rst:6467 msgid "" "See :ref:`types` for this information. It describes :ref:`stack frame " "objects `, :ref:`traceback objects `, and " "slice objects." msgstr "" -#: ../../../library/stdtypes.rst:6464 +#: ../../../library/stdtypes.rst:6475 msgid "Special Attributes" msgstr "" -#: ../../../library/stdtypes.rst:6466 +#: ../../../library/stdtypes.rst:6477 msgid "" "The implementation adds a few special read-only attributes to several object " "types, where they are relevant. Some of these are not reported by the :func:" "`dir` built-in function." msgstr "" -#: ../../../library/stdtypes.rst:6473 +#: ../../../library/stdtypes.rst:6484 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" -#: ../../../library/stdtypes.rst:6479 +#: ../../../library/stdtypes.rst:6490 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." msgstr "" -#: ../../../library/stdtypes.rst:6487 +#: ../../../library/stdtypes.rst:6498 msgid "The name of the module in which a class or function was defined." msgstr "" -#: ../../../library/stdtypes.rst:6492 +#: ../../../library/stdtypes.rst:6503 msgid "" "The documentation string of a class or function, or ``None`` if undefined." msgstr "" -#: ../../../library/stdtypes.rst:6497 +#: ../../../library/stdtypes.rst:6508 msgid "" "The :ref:`type parameters ` of generic classes, functions, and :" "ref:`type aliases `. For classes and functions that are not " "generic, this will be an empty tuple." msgstr "" -#: ../../../library/stdtypes.rst:6507 +#: ../../../library/stdtypes.rst:6518 msgid "Integer string conversion length limitation" msgstr "" -#: ../../../library/stdtypes.rst:6509 +#: ../../../library/stdtypes.rst:6520 msgid "" "CPython has a global limit for converting between :class:`int` and :class:" "`str` to mitigate denial of service attacks. This limit *only* applies to " @@ -6967,7 +6990,7 @@ msgid "" "binary conversions are unlimited. The limit can be configured." msgstr "" -#: ../../../library/stdtypes.rst:6514 +#: ../../../library/stdtypes.rst:6525 msgid "" "The :class:`int` type in CPython is an arbitrary length number stored in " "binary form (commonly known as a \"bignum\"). There exists no algorithm that " @@ -6977,24 +7000,24 @@ msgid "" "value such as ``int('1' * 500_000)`` can take over a second on a fast CPU." msgstr "" -#: ../../../library/stdtypes.rst:6521 +#: ../../../library/stdtypes.rst:6532 msgid "" "Limiting conversion size offers a practical way to avoid :cve:`2020-10735`." msgstr "" -#: ../../../library/stdtypes.rst:6523 +#: ../../../library/stdtypes.rst:6534 msgid "" "The limit is applied to the number of digit characters in the input or " "output string when a non-linear conversion algorithm would be involved. " "Underscores and the sign are not counted towards the limit." msgstr "" -#: ../../../library/stdtypes.rst:6527 +#: ../../../library/stdtypes.rst:6538 msgid "" "When an operation would exceed the limit, a :exc:`ValueError` is raised:" msgstr "" -#: ../../../library/stdtypes.rst:6549 +#: ../../../library/stdtypes.rst:6560 msgid "" "The default limit is 4300 digits as provided in :data:`sys.int_info." "default_max_str_digits `. The lowest limit that can be " @@ -7002,94 +7025,94 @@ msgid "" "str_digits_check_threshold `." msgstr "" -#: ../../../library/stdtypes.rst:6554 +#: ../../../library/stdtypes.rst:6565 msgid "Verification:" msgstr "" -#: ../../../library/stdtypes.rst:6569 +#: ../../../library/stdtypes.rst:6580 msgid "Affected APIs" msgstr "" -#: ../../../library/stdtypes.rst:6571 +#: ../../../library/stdtypes.rst:6582 msgid "" "The limitation only applies to potentially slow conversions between :class:" "`int` and :class:`str` or :class:`bytes`:" msgstr "" -#: ../../../library/stdtypes.rst:6574 +#: ../../../library/stdtypes.rst:6585 msgid "``int(string)`` with default base 10." msgstr "" -#: ../../../library/stdtypes.rst:6575 +#: ../../../library/stdtypes.rst:6586 msgid "``int(string, base)`` for all bases that are not a power of 2." msgstr "" -#: ../../../library/stdtypes.rst:6576 +#: ../../../library/stdtypes.rst:6587 msgid "``str(integer)``." msgstr "" -#: ../../../library/stdtypes.rst:6577 +#: ../../../library/stdtypes.rst:6588 msgid "``repr(integer)``." msgstr "" -#: ../../../library/stdtypes.rst:6578 +#: ../../../library/stdtypes.rst:6589 msgid "" "any other string conversion to base 10, for example ``f\"{integer}\"``, " "``\"{}\".format(integer)``, or ``b\"%d\" % integer``." msgstr "" -#: ../../../library/stdtypes.rst:6581 +#: ../../../library/stdtypes.rst:6592 msgid "The limitations do not apply to functions with a linear algorithm:" msgstr "" -#: ../../../library/stdtypes.rst:6583 +#: ../../../library/stdtypes.rst:6594 msgid "``int(string, base)`` with base 2, 4, 8, 16, or 32." msgstr "" -#: ../../../library/stdtypes.rst:6584 +#: ../../../library/stdtypes.rst:6595 msgid ":func:`int.from_bytes` and :func:`int.to_bytes`." msgstr "" -#: ../../../library/stdtypes.rst:6585 +#: ../../../library/stdtypes.rst:6596 msgid ":func:`hex`, :func:`oct`, :func:`bin`." msgstr "" -#: ../../../library/stdtypes.rst:6586 +#: ../../../library/stdtypes.rst:6597 msgid ":ref:`formatspec` for hex, octal, and binary numbers." msgstr "" -#: ../../../library/stdtypes.rst:6587 +#: ../../../library/stdtypes.rst:6598 msgid ":class:`str` to :class:`float`." msgstr "" -#: ../../../library/stdtypes.rst:6588 +#: ../../../library/stdtypes.rst:6599 msgid ":class:`str` to :class:`decimal.Decimal`." msgstr "" -#: ../../../library/stdtypes.rst:6591 +#: ../../../library/stdtypes.rst:6602 msgid "Configuring the limit" msgstr "" -#: ../../../library/stdtypes.rst:6593 +#: ../../../library/stdtypes.rst:6604 msgid "" "Before Python starts up you can use an environment variable or an " "interpreter command line flag to configure the limit:" msgstr "" -#: ../../../library/stdtypes.rst:6596 +#: ../../../library/stdtypes.rst:6607 msgid "" ":envvar:`PYTHONINTMAXSTRDIGITS`, e.g. ``PYTHONINTMAXSTRDIGITS=640 python3`` " "to set the limit to 640 or ``PYTHONINTMAXSTRDIGITS=0 python3`` to disable " "the limitation." msgstr "" -#: ../../../library/stdtypes.rst:6599 +#: ../../../library/stdtypes.rst:6610 msgid "" ":option:`-X int_max_str_digits <-X>`, e.g. ``python3 -X " "int_max_str_digits=640``" msgstr "" -#: ../../../library/stdtypes.rst:6601 +#: ../../../library/stdtypes.rst:6612 msgid "" ":data:`sys.flags.int_max_str_digits` contains the value of :envvar:" "`PYTHONINTMAXSTRDIGITS` or :option:`-X int_max_str_digits <-X>`. If both the " @@ -7098,38 +7121,38 @@ msgid "" "int_info.default_max_str_digits` was used during initialization." msgstr "" -#: ../../../library/stdtypes.rst:6607 +#: ../../../library/stdtypes.rst:6618 msgid "" "From code, you can inspect the current limit and set a new one using these :" "mod:`sys` APIs:" msgstr "" -#: ../../../library/stdtypes.rst:6610 +#: ../../../library/stdtypes.rst:6621 msgid "" ":func:`sys.get_int_max_str_digits` and :func:`sys.set_int_max_str_digits` " "are a getter and setter for the interpreter-wide limit. Subinterpreters have " "their own limit." msgstr "" -#: ../../../library/stdtypes.rst:6614 +#: ../../../library/stdtypes.rst:6625 msgid "" "Information about the default and minimum can be found in :data:`sys." "int_info`:" msgstr "" -#: ../../../library/stdtypes.rst:6616 +#: ../../../library/stdtypes.rst:6627 msgid "" ":data:`sys.int_info.default_max_str_digits ` is the compiled-" "in default limit." msgstr "" -#: ../../../library/stdtypes.rst:6618 +#: ../../../library/stdtypes.rst:6629 msgid "" ":data:`sys.int_info.str_digits_check_threshold ` is the lowest " "accepted value for the limit (other than 0 which disables it)." msgstr "" -#: ../../../library/stdtypes.rst:6625 +#: ../../../library/stdtypes.rst:6636 msgid "" "Setting a low limit *can* lead to problems. While rare, code exists that " "contains integer constants in decimal in their source that exceed the " @@ -7141,7 +7164,7 @@ msgid "" "constants is to convert them to ``0x`` hexadecimal form as it has no limit." msgstr "" -#: ../../../library/stdtypes.rst:6634 +#: ../../../library/stdtypes.rst:6645 msgid "" "Test your application thoroughly if you use a low limit. Ensure your tests " "run with the limit set early via the environment or flag so that it applies " @@ -7149,11 +7172,11 @@ msgid "" "to precompile ``.py`` sources to ``.pyc`` files." msgstr "" -#: ../../../library/stdtypes.rst:6640 +#: ../../../library/stdtypes.rst:6651 msgid "Recommended configuration" msgstr "" -#: ../../../library/stdtypes.rst:6642 +#: ../../../library/stdtypes.rst:6653 msgid "" "The default :data:`sys.int_info.default_max_str_digits` is expected to be " "reasonable for most applications. If your application requires a different " @@ -7161,42 +7184,42 @@ msgid "" "as these APIs were added in security patch releases in versions before 3.12." msgstr "" -#: ../../../library/stdtypes.rst:6647 +#: ../../../library/stdtypes.rst:6658 msgid "Example::" msgstr "" -#: ../../../library/stdtypes.rst:6659 +#: ../../../library/stdtypes.rst:6670 msgid "If you need to disable it entirely, set it to ``0``." msgstr "" -#: ../../../library/stdtypes.rst:6663 +#: ../../../library/stdtypes.rst:6674 msgid "Footnotes" msgstr "" -#: ../../../library/stdtypes.rst:6664 +#: ../../../library/stdtypes.rst:6675 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." msgstr "" -#: ../../../library/stdtypes.rst:6667 +#: ../../../library/stdtypes.rst:6678 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." msgstr "" -#: ../../../library/stdtypes.rst:6670 +#: ../../../library/stdtypes.rst:6681 msgid "They must have since the parser can't tell the type of the operands." msgstr "" -#: ../../../library/stdtypes.rst:6672 +#: ../../../library/stdtypes.rst:6683 msgid "" "Cased characters are those with general category property being one of " "\"Lu\" (Letter, uppercase), \"Ll\" (Letter, lowercase), or \"Lt\" (Letter, " "titlecase)." msgstr "" -#: ../../../library/stdtypes.rst:6675 +#: ../../../library/stdtypes.rst:6686 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." @@ -7209,13 +7232,13 @@ msgstr "" #: ../../../library/stdtypes.rst:13 ../../../library/stdtypes.rst:332 #: ../../../library/stdtypes.rst:409 ../../../library/stdtypes.rst:1002 #: ../../../library/stdtypes.rst:1192 ../../../library/stdtypes.rst:1214 -#: ../../../library/stdtypes.rst:1229 ../../../library/stdtypes.rst:5325 -#: ../../../library/stdtypes.rst:6379 +#: ../../../library/stdtypes.rst:1229 ../../../library/stdtypes.rst:5329 +#: ../../../library/stdtypes.rst:6390 msgid "types" msgstr "" #: ../../../library/stdtypes.rst:34 ../../../library/stdtypes.rst:1229 -#: ../../../library/stdtypes.rst:5325 +#: ../../../library/stdtypes.rst:5329 msgid "statement" msgstr "" @@ -7336,12 +7359,12 @@ msgstr "" #: ../../../library/stdtypes.rst:986 ../../../library/stdtypes.rst:1192 #: ../../../library/stdtypes.rst:1214 ../../../library/stdtypes.rst:1379 #: ../../../library/stdtypes.rst:1465 ../../../library/stdtypes.rst:1513 -#: ../../../library/stdtypes.rst:1634 ../../../library/stdtypes.rst:1764 -#: ../../../library/stdtypes.rst:3300 ../../../library/stdtypes.rst:3319 -#: ../../../library/stdtypes.rst:3432 ../../../library/stdtypes.rst:5107 -#: ../../../library/stdtypes.rst:5325 ../../../library/stdtypes.rst:5855 -#: ../../../library/stdtypes.rst:6123 ../../../library/stdtypes.rst:6298 -#: ../../../library/stdtypes.rst:6343 +#: ../../../library/stdtypes.rst:1634 ../../../library/stdtypes.rst:1768 +#: ../../../library/stdtypes.rst:3304 ../../../library/stdtypes.rst:3323 +#: ../../../library/stdtypes.rst:3436 ../../../library/stdtypes.rst:5111 +#: ../../../library/stdtypes.rst:5329 ../../../library/stdtypes.rst:5866 +#: ../../../library/stdtypes.rst:6134 ../../../library/stdtypes.rst:6309 +#: ../../../library/stdtypes.rst:6354 msgid "object" msgstr "" @@ -7433,9 +7456,9 @@ msgid "arithmetic" msgstr "" #: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:1002 -#: ../../../library/stdtypes.rst:1192 ../../../library/stdtypes.rst:5325 -#: ../../../library/stdtypes.rst:6350 ../../../library/stdtypes.rst:6364 -#: ../../../library/stdtypes.rst:6379 +#: ../../../library/stdtypes.rst:1192 ../../../library/stdtypes.rst:5329 +#: ../../../library/stdtypes.rst:6361 ../../../library/stdtypes.rst:6375 +#: ../../../library/stdtypes.rst:6390 msgid "built-in function" msgstr "" @@ -7451,8 +7474,8 @@ msgstr "" msgid "complex" msgstr "" -#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3172 -#: ../../../library/stdtypes.rst:4469 +#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3176 +#: ../../../library/stdtypes.rst:4473 msgid "+ (plus)" msgstr "" @@ -7464,13 +7487,13 @@ msgstr "" msgid "binary operator" msgstr "" -#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3172 -#: ../../../library/stdtypes.rst:4469 +#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3176 +#: ../../../library/stdtypes.rst:4473 msgid "- (minus)" msgstr "" -#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3129 -#: ../../../library/stdtypes.rst:4426 +#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3133 +#: ../../../library/stdtypes.rst:4430 msgid "* (asterisk)" msgstr "" @@ -7482,8 +7505,8 @@ msgstr "" msgid "//" msgstr "" -#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3092 -#: ../../../library/stdtypes.rst:4394 +#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3096 +#: ../../../library/stdtypes.rst:4398 msgid "% (percent)" msgstr "" @@ -7493,7 +7516,7 @@ msgstr "" #: ../../../library/stdtypes.rst:332 ../../../library/stdtypes.rst:409 #: ../../../library/stdtypes.rst:1002 ../../../library/stdtypes.rst:1229 -#: ../../../library/stdtypes.rst:5325 +#: ../../../library/stdtypes.rst:5329 msgid "operations on" msgstr "" @@ -7501,8 +7524,8 @@ msgstr "" msgid "conjugate() (complex number method)" msgstr "" -#: ../../../library/stdtypes.rst:351 ../../../library/stdtypes.rst:1832 -#: ../../../library/stdtypes.rst:3300 ../../../library/stdtypes.rst:6379 +#: ../../../library/stdtypes.rst:351 ../../../library/stdtypes.rst:1836 +#: ../../../library/stdtypes.rst:3304 ../../../library/stdtypes.rst:6390 msgid "module" msgstr "" @@ -7570,7 +7593,7 @@ msgstr "" msgid "iterator protocol" msgstr "" -#: ../../../library/stdtypes.rst:899 ../../../library/stdtypes.rst:5768 +#: ../../../library/stdtypes.rst:899 ../../../library/stdtypes.rst:5779 msgid "protocol" msgstr "" @@ -7596,7 +7619,7 @@ msgstr "" msgid "iteration over" msgstr "" -#: ../../../library/stdtypes.rst:1002 ../../../library/stdtypes.rst:5325 +#: ../../../library/stdtypes.rst:1002 ../../../library/stdtypes.rst:5329 msgid "len" msgstr "" @@ -7665,14 +7688,14 @@ msgstr "" msgid "list" msgstr "" -#: ../../../library/stdtypes.rst:1214 ../../../library/stdtypes.rst:3300 -#: ../../../library/stdtypes.rst:3432 ../../../library/stdtypes.rst:3571 -#: ../../../library/stdtypes.rst:4394 +#: ../../../library/stdtypes.rst:1214 ../../../library/stdtypes.rst:3304 +#: ../../../library/stdtypes.rst:3436 ../../../library/stdtypes.rst:3575 +#: ../../../library/stdtypes.rst:4398 msgid "bytearray" msgstr "" -#: ../../../library/stdtypes.rst:1229 ../../../library/stdtypes.rst:5325 -#: ../../../library/stdtypes.rst:6123 ../../../library/stdtypes.rst:6379 +#: ../../../library/stdtypes.rst:1229 ../../../library/stdtypes.rst:5329 +#: ../../../library/stdtypes.rst:6134 ../../../library/stdtypes.rst:6390 msgid "type" msgstr "" @@ -7680,7 +7703,7 @@ msgstr "" msgid "assignment" msgstr "" -#: ../../../library/stdtypes.rst:1229 ../../../library/stdtypes.rst:5325 +#: ../../../library/stdtypes.rst:1229 ../../../library/stdtypes.rst:5329 msgid "del" msgstr "" @@ -7688,9 +7711,9 @@ msgstr "" msgid "range" msgstr "" -#: ../../../library/stdtypes.rst:1634 ../../../library/stdtypes.rst:1777 -#: ../../../library/stdtypes.rst:1824 ../../../library/stdtypes.rst:2920 -#: ../../../library/stdtypes.rst:3092 +#: ../../../library/stdtypes.rst:1634 ../../../library/stdtypes.rst:1781 +#: ../../../library/stdtypes.rst:1828 ../../../library/stdtypes.rst:2924 +#: ../../../library/stdtypes.rst:3096 msgid "string" msgstr "" @@ -7698,8 +7721,8 @@ msgstr "" msgid "text sequence type" msgstr "" -#: ../../../library/stdtypes.rst:1634 ../../../library/stdtypes.rst:1777 -#: ../../../library/stdtypes.rst:1797 +#: ../../../library/stdtypes.rst:1634 ../../../library/stdtypes.rst:1781 +#: ../../../library/stdtypes.rst:1801 msgid "str (built-in class)" msgstr "" @@ -7707,261 +7730,261 @@ msgstr "" msgid "(see also string)" msgstr "" -#: ../../../library/stdtypes.rst:1764 +#: ../../../library/stdtypes.rst:1768 msgid "io.StringIO" msgstr "" -#: ../../../library/stdtypes.rst:1797 ../../../library/stdtypes.rst:3292 +#: ../../../library/stdtypes.rst:1801 ../../../library/stdtypes.rst:3296 msgid "buffer protocol" msgstr "" -#: ../../../library/stdtypes.rst:1797 ../../../library/stdtypes.rst:3300 -#: ../../../library/stdtypes.rst:3319 ../../../library/stdtypes.rst:3571 -#: ../../../library/stdtypes.rst:4394 +#: ../../../library/stdtypes.rst:1801 ../../../library/stdtypes.rst:3304 +#: ../../../library/stdtypes.rst:3323 ../../../library/stdtypes.rst:3575 +#: ../../../library/stdtypes.rst:4398 msgid "bytes" msgstr "" -#: ../../../library/stdtypes.rst:1824 ../../../library/stdtypes.rst:3571 +#: ../../../library/stdtypes.rst:1828 ../../../library/stdtypes.rst:3575 msgid "methods" msgstr "" -#: ../../../library/stdtypes.rst:1832 +#: ../../../library/stdtypes.rst:1836 msgid "re" msgstr "" -#: ../../../library/stdtypes.rst:2684 ../../../library/stdtypes.rst:4248 +#: ../../../library/stdtypes.rst:2688 ../../../library/stdtypes.rst:4252 msgid "universal newlines" msgstr "" -#: ../../../library/stdtypes.rst:2684 +#: ../../../library/stdtypes.rst:2688 msgid "str.splitlines method" msgstr "" -#: ../../../library/stdtypes.rst:2920 +#: ../../../library/stdtypes.rst:2924 msgid "! formatted string literal" msgstr "" -#: ../../../library/stdtypes.rst:2920 +#: ../../../library/stdtypes.rst:2924 msgid "formatted string literals" msgstr "" -#: ../../../library/stdtypes.rst:2920 +#: ../../../library/stdtypes.rst:2924 msgid "! f-string" msgstr "" -#: ../../../library/stdtypes.rst:2920 +#: ../../../library/stdtypes.rst:2924 msgid "f-strings" msgstr "" -#: ../../../library/stdtypes.rst:2920 +#: ../../../library/stdtypes.rst:2924 msgid "fstring" msgstr "" -#: ../../../library/stdtypes.rst:2920 +#: ../../../library/stdtypes.rst:2924 msgid "interpolated string literal" msgstr "" -#: ../../../library/stdtypes.rst:2920 +#: ../../../library/stdtypes.rst:2924 msgid "formatted literal" msgstr "" -#: ../../../library/stdtypes.rst:2920 +#: ../../../library/stdtypes.rst:2924 msgid "interpolated literal" msgstr "" -#: ../../../library/stdtypes.rst:2920 +#: ../../../library/stdtypes.rst:2924 msgid "{} (curly brackets)" msgstr "" -#: ../../../library/stdtypes.rst:2920 +#: ../../../library/stdtypes.rst:2924 msgid "in formatted string literal" msgstr "" -#: ../../../library/stdtypes.rst:2920 +#: ../../../library/stdtypes.rst:2924 msgid "! (exclamation mark)" msgstr "" -#: ../../../library/stdtypes.rst:2920 +#: ../../../library/stdtypes.rst:2924 msgid ": (colon)" msgstr "" -#: ../../../library/stdtypes.rst:2920 +#: ../../../library/stdtypes.rst:2924 msgid "= (equals)" msgstr "" -#: ../../../library/stdtypes.rst:2920 +#: ../../../library/stdtypes.rst:2924 msgid "for help in debugging using string literals" msgstr "" -#: ../../../library/stdtypes.rst:3092 +#: ../../../library/stdtypes.rst:3096 msgid "formatting, string (%)" msgstr "" -#: ../../../library/stdtypes.rst:3092 +#: ../../../library/stdtypes.rst:3096 msgid "interpolation, string (%)" msgstr "" -#: ../../../library/stdtypes.rst:3092 +#: ../../../library/stdtypes.rst:3096 msgid "formatting, printf" msgstr "" -#: ../../../library/stdtypes.rst:3092 +#: ../../../library/stdtypes.rst:3096 msgid "interpolation, printf" msgstr "" -#: ../../../library/stdtypes.rst:3092 ../../../library/stdtypes.rst:4394 +#: ../../../library/stdtypes.rst:3096 ../../../library/stdtypes.rst:4398 msgid "printf-style formatting" msgstr "" -#: ../../../library/stdtypes.rst:3092 ../../../library/stdtypes.rst:4394 +#: ../../../library/stdtypes.rst:3096 ../../../library/stdtypes.rst:4398 msgid "sprintf-style formatting" msgstr "" -#: ../../../library/stdtypes.rst:3129 ../../../library/stdtypes.rst:4426 +#: ../../../library/stdtypes.rst:3133 ../../../library/stdtypes.rst:4430 msgid "() (parentheses)" msgstr "" -#: ../../../library/stdtypes.rst:3129 ../../../library/stdtypes.rst:3172 -#: ../../../library/stdtypes.rst:4426 ../../../library/stdtypes.rst:4469 +#: ../../../library/stdtypes.rst:3133 ../../../library/stdtypes.rst:3176 +#: ../../../library/stdtypes.rst:4430 ../../../library/stdtypes.rst:4473 msgid "in printf-style formatting" msgstr "" -#: ../../../library/stdtypes.rst:3129 ../../../library/stdtypes.rst:4426 +#: ../../../library/stdtypes.rst:3133 ../../../library/stdtypes.rst:4430 msgid ". (dot)" msgstr "" -#: ../../../library/stdtypes.rst:3172 ../../../library/stdtypes.rst:4469 +#: ../../../library/stdtypes.rst:3176 ../../../library/stdtypes.rst:4473 msgid "# (hash)" msgstr "" -#: ../../../library/stdtypes.rst:3172 ../../../library/stdtypes.rst:4469 +#: ../../../library/stdtypes.rst:3176 ../../../library/stdtypes.rst:4473 msgid "space" msgstr "" -#: ../../../library/stdtypes.rst:3292 +#: ../../../library/stdtypes.rst:3296 msgid "binary sequence types" msgstr "" -#: ../../../library/stdtypes.rst:3300 +#: ../../../library/stdtypes.rst:3304 msgid "memoryview" msgstr "" -#: ../../../library/stdtypes.rst:3300 +#: ../../../library/stdtypes.rst:3304 msgid "array" msgstr "" -#: ../../../library/stdtypes.rst:4248 +#: ../../../library/stdtypes.rst:4252 msgid "bytes.splitlines method" msgstr "" -#: ../../../library/stdtypes.rst:4248 +#: ../../../library/stdtypes.rst:4252 msgid "bytearray.splitlines method" msgstr "" -#: ../../../library/stdtypes.rst:4394 +#: ../../../library/stdtypes.rst:4398 msgid "formatting" msgstr "" -#: ../../../library/stdtypes.rst:4394 +#: ../../../library/stdtypes.rst:4398 msgid "bytes (%)" msgstr "" -#: ../../../library/stdtypes.rst:4394 +#: ../../../library/stdtypes.rst:4398 msgid "bytearray (%)" msgstr "" -#: ../../../library/stdtypes.rst:4394 +#: ../../../library/stdtypes.rst:4398 msgid "interpolation" msgstr "" -#: ../../../library/stdtypes.rst:5107 +#: ../../../library/stdtypes.rst:5111 msgid "set" msgstr "" -#: ../../../library/stdtypes.rst:5325 +#: ../../../library/stdtypes.rst:5329 msgid "mapping" msgstr "" -#: ../../../library/stdtypes.rst:5325 +#: ../../../library/stdtypes.rst:5329 msgid "dictionary" msgstr "" -#: ../../../library/stdtypes.rst:5436 +#: ../../../library/stdtypes.rst:5440 msgid "__missing__()" msgstr "" -#: ../../../library/stdtypes.rst:5768 +#: ../../../library/stdtypes.rst:5779 msgid "context manager" msgstr "" -#: ../../../library/stdtypes.rst:5768 +#: ../../../library/stdtypes.rst:5779 msgid "context management protocol" msgstr "" -#: ../../../library/stdtypes.rst:5768 +#: ../../../library/stdtypes.rst:5779 msgid "context management" msgstr "" -#: ../../../library/stdtypes.rst:5843 +#: ../../../library/stdtypes.rst:5854 msgid "annotation" msgstr "" -#: ../../../library/stdtypes.rst:5843 +#: ../../../library/stdtypes.rst:5854 msgid "type annotation; type hint" msgstr "" -#: ../../../library/stdtypes.rst:5855 +#: ../../../library/stdtypes.rst:5866 msgid "GenericAlias" msgstr "" -#: ../../../library/stdtypes.rst:5855 +#: ../../../library/stdtypes.rst:5866 msgid "Generic" msgstr "" -#: ../../../library/stdtypes.rst:5855 +#: ../../../library/stdtypes.rst:5866 msgid "Alias" msgstr "" -#: ../../../library/stdtypes.rst:6123 +#: ../../../library/stdtypes.rst:6134 msgid "Union" msgstr "" -#: ../../../library/stdtypes.rst:6123 +#: ../../../library/stdtypes.rst:6134 msgid "union" msgstr "" -#: ../../../library/stdtypes.rst:6298 +#: ../../../library/stdtypes.rst:6309 msgid "method" msgstr "" -#: ../../../library/stdtypes.rst:6343 +#: ../../../library/stdtypes.rst:6354 msgid "code" msgstr "" -#: ../../../library/stdtypes.rst:6343 +#: ../../../library/stdtypes.rst:6354 msgid "code object" msgstr "" -#: ../../../library/stdtypes.rst:6350 +#: ../../../library/stdtypes.rst:6361 msgid "compile" msgstr "" -#: ../../../library/stdtypes.rst:6350 +#: ../../../library/stdtypes.rst:6361 msgid "__code__ (function object attribute)" msgstr "" -#: ../../../library/stdtypes.rst:6364 +#: ../../../library/stdtypes.rst:6375 msgid "exec" msgstr "" -#: ../../../library/stdtypes.rst:6364 +#: ../../../library/stdtypes.rst:6375 msgid "eval" msgstr "" -#: ../../../library/stdtypes.rst:6403 +#: ../../../library/stdtypes.rst:6414 msgid "..." msgstr "" -#: ../../../library/stdtypes.rst:6403 +#: ../../../library/stdtypes.rst:6414 msgid "ellipsis literal" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/string.pot b/main/locale/pot/LC_MESSAGES/library/string.pot index d6278a1fc70..ca1e49396d7 100644 --- a/main/locale/pot/LC_MESSAGES/library/string.pot +++ b/main/locale/pot/LC_MESSAGES/library/string.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1153,46 +1153,46 @@ msgstr "" msgid "" "Alternatively, you can provide the entire regular expression pattern by " "overriding the class attribute *pattern*. If you do this, the value must be " -"a regular expression object with four named capturing groups. The capturing " -"groups correspond to the rules given above, along with the invalid " -"placeholder rule:" +"a regular expression pattern string, or a compiled regular expression " +"object, with four named capturing groups. The capturing groups correspond " +"to the rules given above, along with the invalid placeholder rule:" msgstr "" -#: ../../../library/string.rst:978 +#: ../../../library/string.rst:979 msgid "" "*escaped* -- This group matches the escape sequence, e.g. ``$$``, in the " "default pattern." msgstr "" -#: ../../../library/string.rst:981 +#: ../../../library/string.rst:982 msgid "" "*named* -- This group matches the unbraced placeholder name; it should not " "include the delimiter in capturing group." msgstr "" -#: ../../../library/string.rst:984 +#: ../../../library/string.rst:985 msgid "" "*braced* -- This group matches the brace enclosed placeholder name; it " "should not include either the delimiter or braces in the capturing group." msgstr "" -#: ../../../library/string.rst:987 +#: ../../../library/string.rst:988 msgid "" "*invalid* -- This group matches any other delimiter pattern (usually a " "single delimiter), and it should appear last in the regular expression." msgstr "" -#: ../../../library/string.rst:990 +#: ../../../library/string.rst:991 msgid "" "The methods on this class will raise :exc:`ValueError` if the pattern " "matches the template without one of these named groups matching." msgstr "" -#: ../../../library/string.rst:995 +#: ../../../library/string.rst:996 msgid "Helper functions" msgstr "" -#: ../../../library/string.rst:999 +#: ../../../library/string.rst:1000 msgid "" "Split the argument into words using :meth:`str.split`, capitalize each word " "using :meth:`str.capitalize`, and join the capitalized words using :meth:" diff --git a/main/locale/pot/LC_MESSAGES/library/struct.pot b/main/locale/pot/LC_MESSAGES/library/struct.pot index 6bbc652e66c..a075edc96ca 100644 --- a/main/locale/pot/LC_MESSAGES/library/struct.pot +++ b/main/locale/pot/LC_MESSAGES/library/struct.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -84,10 +84,11 @@ msgstr "" msgid "" "Pack the values *v1*, *v2*, ... according to the format string *format* and " "write the packed bytes into the writable buffer *buffer* starting at " -"position *offset*. Note that *offset* is a required argument." +"position *offset*. Note that *offset* is a required argument. A negative " +"*offset* counts from the end of *buffer*." msgstr "" -#: ../../../library/struct.rst:75 +#: ../../../library/struct.rst:76 msgid "" "Unpack from the buffer *buffer* (presumably packed by ``pack(format, ...)``) " "according to the format string *format*. The result is a tuple even if it " @@ -95,15 +96,16 @@ msgid "" "required by the format, as reflected by :func:`calcsize`." msgstr "" -#: ../../../library/struct.rst:83 +#: ../../../library/struct.rst:84 msgid "" "Unpack from *buffer* starting at position *offset*, according to the format " "string *format*. The result is a tuple even if it contains exactly one " "item. The buffer's size in bytes, starting at position *offset*, must be at " -"least the size required by the format, as reflected by :func:`calcsize`." +"least the size required by the format, as reflected by :func:`calcsize`. A " +"negative *offset* counts from the end of *buffer*." msgstr "" -#: ../../../library/struct.rst:91 +#: ../../../library/struct.rst:93 msgid "" "Iteratively unpack from the buffer *buffer* according to the format string " "*format*. This function returns an iterator which will read equally sized " @@ -112,21 +114,21 @@ msgid "" "format, as reflected by :func:`calcsize`." msgstr "" -#: ../../../library/struct.rst:97 +#: ../../../library/struct.rst:99 msgid "Each iteration yields a tuple as specified by the format string." msgstr "" -#: ../../../library/struct.rst:104 +#: ../../../library/struct.rst:106 msgid "" "Return the size of the struct (and hence of the bytes object produced by " "``pack(format, ...)``) corresponding to the format string *format*." msgstr "" -#: ../../../library/struct.rst:111 +#: ../../../library/struct.rst:113 msgid "Format Strings" msgstr "" -#: ../../../library/struct.rst:113 +#: ../../../library/struct.rst:115 msgid "" "Format strings describe the data layout when packing and unpacking data. " "They are built up from :ref:`type codes `, which specify the " @@ -137,11 +139,11 @@ msgid "" "actual data values and padding." msgstr "" -#: ../../../library/struct.rst:125 +#: ../../../library/struct.rst:127 msgid "Byte Order, Size, and Alignment" msgstr "" -#: ../../../library/struct.rst:127 +#: ../../../library/struct.rst:129 msgid "" "By default, C types are represented in the machine's native format and byte " "order, and properly aligned by skipping pad bytes if necessary (according to " @@ -151,98 +153,98 @@ msgid "" "standard formats depends on the application." msgstr "" -#: ../../../library/struct.rst:143 +#: ../../../library/struct.rst:145 msgid "" "Alternatively, the first character of the format string can be used to " "indicate the byte order, size and alignment of the packed data, according to " "the following table:" msgstr "" -#: ../../../library/struct.rst:148 +#: ../../../library/struct.rst:150 msgid "Character" msgstr "" -#: ../../../library/struct.rst:148 +#: ../../../library/struct.rst:150 msgid "Byte order" msgstr "" -#: ../../../library/struct.rst:148 +#: ../../../library/struct.rst:150 msgid "Size" msgstr "" -#: ../../../library/struct.rst:148 +#: ../../../library/struct.rst:150 msgid "Alignment" msgstr "" -#: ../../../library/struct.rst:150 +#: ../../../library/struct.rst:152 msgid "``@``" msgstr "" -#: ../../../library/struct.rst:150 ../../../library/struct.rst:152 +#: ../../../library/struct.rst:152 ../../../library/struct.rst:154 msgid "native" msgstr "" -#: ../../../library/struct.rst:152 +#: ../../../library/struct.rst:154 msgid "``=``" msgstr "" -#: ../../../library/struct.rst:152 ../../../library/struct.rst:154 -#: ../../../library/struct.rst:156 ../../../library/struct.rst:158 +#: ../../../library/struct.rst:154 ../../../library/struct.rst:156 +#: ../../../library/struct.rst:158 ../../../library/struct.rst:160 msgid "standard" msgstr "" -#: ../../../library/struct.rst:152 ../../../library/struct.rst:154 -#: ../../../library/struct.rst:156 ../../../library/struct.rst:158 +#: ../../../library/struct.rst:154 ../../../library/struct.rst:156 +#: ../../../library/struct.rst:158 ../../../library/struct.rst:160 msgid "none" msgstr "" -#: ../../../library/struct.rst:154 +#: ../../../library/struct.rst:156 msgid "``<``" msgstr "" -#: ../../../library/struct.rst:154 +#: ../../../library/struct.rst:156 msgid "little-endian" msgstr "" -#: ../../../library/struct.rst:156 +#: ../../../library/struct.rst:158 msgid "``>``" msgstr "" -#: ../../../library/struct.rst:156 +#: ../../../library/struct.rst:158 msgid "big-endian" msgstr "" -#: ../../../library/struct.rst:158 +#: ../../../library/struct.rst:160 msgid "``!``" msgstr "" -#: ../../../library/struct.rst:158 +#: ../../../library/struct.rst:160 msgid "network (= big-endian)" msgstr "" -#: ../../../library/struct.rst:161 +#: ../../../library/struct.rst:163 msgid "If the first character is not one of these, ``'@'`` is assumed." msgstr "" -#: ../../../library/struct.rst:165 +#: ../../../library/struct.rst:167 msgid "" "The number 1023 (``0x3ff`` in hexadecimal) has the following byte " "representations:" msgstr "" -#: ../../../library/struct.rst:167 +#: ../../../library/struct.rst:169 msgid "``03 ff`` in big-endian (``>``)" msgstr "" -#: ../../../library/struct.rst:168 +#: ../../../library/struct.rst:170 msgid "``ff 03`` in little-endian (``<``)" msgstr "" -#: ../../../library/struct.rst:170 +#: ../../../library/struct.rst:172 msgid "Python example:" msgstr "" -#: ../../../library/struct.rst:178 +#: ../../../library/struct.rst:180 msgid "" "Native byte order is big-endian or little-endian, depending on the host " "system. For example, Intel x86, AMD64 (x86-64), and Apple M1 are little-" @@ -250,64 +252,64 @@ msgid "" "byteorder` to check the endianness of your system." msgstr "" -#: ../../../library/struct.rst:183 +#: ../../../library/struct.rst:185 msgid "" "Native size and alignment are determined using the C compiler's ``sizeof`` " "expression. This is always combined with native byte order." msgstr "" -#: ../../../library/struct.rst:186 +#: ../../../library/struct.rst:188 msgid "" "Standard size depends only on the type code; see the table in the :ref:" "`type-codes` section." msgstr "" -#: ../../../library/struct.rst:189 +#: ../../../library/struct.rst:191 msgid "" "Note the difference between ``'@'`` and ``'='``: both use native byte order, " "but the size and alignment of the latter is standardized." msgstr "" -#: ../../../library/struct.rst:192 +#: ../../../library/struct.rst:194 msgid "" "The form ``'!'`` represents the network byte order which is always big-" "endian as defined in `IETF RFC 1700 `_." msgstr "" -#: ../../../library/struct.rst:195 +#: ../../../library/struct.rst:197 msgid "" "There is no way to indicate non-native byte order (force byte-swapping); use " "the appropriate choice of ``'<'`` or ``'>'``." msgstr "" -#: ../../../library/struct.rst:198 ../../../library/struct.rst:298 +#: ../../../library/struct.rst:200 ../../../library/struct.rst:299 msgid "Notes:" msgstr "" -#: ../../../library/struct.rst:200 +#: ../../../library/struct.rst:202 msgid "" "Padding is only automatically added between successive structure members. No " "padding is added at the beginning or the end of the encoded struct." msgstr "" -#: ../../../library/struct.rst:203 +#: ../../../library/struct.rst:205 msgid "" "No padding is added when using non-native size and alignment, e.g. with '<', " "'>', '=', and '!'." msgstr "" -#: ../../../library/struct.rst:206 +#: ../../../library/struct.rst:208 msgid "" "To align the end of a structure to the alignment requirement of a particular " "type, end the format with the code for that type with a repeat count of " "zero. See :ref:`struct-examples`." msgstr "" -#: ../../../library/struct.rst:215 +#: ../../../library/struct.rst:217 msgid "Type Codes" msgstr "" -#: ../../../library/struct.rst:217 +#: ../../../library/struct.rst:219 msgid "" "Type codes (or format codes) have the following meaning; the conversion " "between C and Python values should be obvious given their types. The " @@ -317,338 +319,331 @@ msgid "" "the packed value is platform-dependent." msgstr "" -#: ../../../library/struct.rst:225 +#: ../../../library/struct.rst:227 msgid "Format" msgstr "" -#: ../../../library/struct.rst:225 +#: ../../../library/struct.rst:227 msgid "C Type" msgstr "" -#: ../../../library/struct.rst:225 +#: ../../../library/struct.rst:227 msgid "Python type" msgstr "" -#: ../../../library/struct.rst:225 +#: ../../../library/struct.rst:227 msgid "Standard size" msgstr "" -#: ../../../library/struct.rst:225 +#: ../../../library/struct.rst:227 msgid "Notes" msgstr "" -#: ../../../library/struct.rst:227 +#: ../../../library/struct.rst:229 msgid "``x``" msgstr "" -#: ../../../library/struct.rst:227 +#: ../../../library/struct.rst:229 msgid "pad byte" msgstr "" -#: ../../../library/struct.rst:227 +#: ../../../library/struct.rst:229 msgid "no value" msgstr "" -#: ../../../library/struct.rst:227 +#: ../../../library/struct.rst:229 msgid "\\(7)" msgstr "" -#: ../../../library/struct.rst:229 +#: ../../../library/struct.rst:231 msgid "``c``" msgstr "" -#: ../../../library/struct.rst:229 +#: ../../../library/struct.rst:231 msgid ":c:expr:`char`" msgstr "" -#: ../../../library/struct.rst:229 +#: ../../../library/struct.rst:231 msgid "bytes of length 1" msgstr "" -#: ../../../library/struct.rst:229 ../../../library/struct.rst:231 -#: ../../../library/struct.rst:233 ../../../library/struct.rst:235 +#: ../../../library/struct.rst:231 ../../../library/struct.rst:233 +#: ../../../library/struct.rst:235 ../../../library/struct.rst:237 msgid "1" msgstr "" -#: ../../../library/struct.rst:231 +#: ../../../library/struct.rst:233 msgid "``b``" msgstr "" -#: ../../../library/struct.rst:231 +#: ../../../library/struct.rst:233 msgid ":c:expr:`signed char`" msgstr "" -#: ../../../library/struct.rst:231 ../../../library/struct.rst:233 -#: ../../../library/struct.rst:237 ../../../library/struct.rst:239 -#: ../../../library/struct.rst:241 ../../../library/struct.rst:243 -#: ../../../library/struct.rst:245 ../../../library/struct.rst:247 -#: ../../../library/struct.rst:249 ../../../library/struct.rst:251 -#: ../../../library/struct.rst:254 ../../../library/struct.rst:256 -#: ../../../library/struct.rst:276 +#: ../../../library/struct.rst:233 ../../../library/struct.rst:235 +#: ../../../library/struct.rst:239 ../../../library/struct.rst:241 +#: ../../../library/struct.rst:243 ../../../library/struct.rst:245 +#: ../../../library/struct.rst:247 ../../../library/struct.rst:249 +#: ../../../library/struct.rst:251 ../../../library/struct.rst:253 +#: ../../../library/struct.rst:256 ../../../library/struct.rst:258 +#: ../../../library/struct.rst:274 msgid "int" msgstr "" -#: ../../../library/struct.rst:231 ../../../library/struct.rst:233 -#: ../../../library/struct.rst:237 ../../../library/struct.rst:239 -#: ../../../library/struct.rst:241 ../../../library/struct.rst:243 -#: ../../../library/struct.rst:245 ../../../library/struct.rst:247 -#: ../../../library/struct.rst:249 ../../../library/struct.rst:251 +#: ../../../library/struct.rst:233 ../../../library/struct.rst:235 +#: ../../../library/struct.rst:239 ../../../library/struct.rst:241 +#: ../../../library/struct.rst:243 ../../../library/struct.rst:245 +#: ../../../library/struct.rst:247 ../../../library/struct.rst:249 +#: ../../../library/struct.rst:251 ../../../library/struct.rst:253 msgid "\\(2)" msgstr "" -#: ../../../library/struct.rst:233 +#: ../../../library/struct.rst:235 msgid "``B``" msgstr "" -#: ../../../library/struct.rst:233 +#: ../../../library/struct.rst:235 msgid ":c:expr:`unsigned char`" msgstr "" -#: ../../../library/struct.rst:235 +#: ../../../library/struct.rst:237 msgid "``?``" msgstr "" -#: ../../../library/struct.rst:235 +#: ../../../library/struct.rst:237 msgid ":c:expr:`_Bool`" msgstr "" -#: ../../../library/struct.rst:235 +#: ../../../library/struct.rst:237 msgid "bool" msgstr "" -#: ../../../library/struct.rst:235 +#: ../../../library/struct.rst:237 msgid "\\(1)" msgstr "" -#: ../../../library/struct.rst:237 +#: ../../../library/struct.rst:239 msgid "``h``" msgstr "" -#: ../../../library/struct.rst:237 +#: ../../../library/struct.rst:239 msgid ":c:expr:`short`" msgstr "" -#: ../../../library/struct.rst:237 ../../../library/struct.rst:239 -#: ../../../library/struct.rst:258 +#: ../../../library/struct.rst:239 ../../../library/struct.rst:241 +#: ../../../library/struct.rst:260 msgid "2" msgstr "" -#: ../../../library/struct.rst:239 +#: ../../../library/struct.rst:241 msgid "``H``" msgstr "" -#: ../../../library/struct.rst:239 +#: ../../../library/struct.rst:241 msgid ":c:expr:`unsigned short`" msgstr "" -#: ../../../library/struct.rst:241 +#: ../../../library/struct.rst:243 msgid "``i``" msgstr "" -#: ../../../library/struct.rst:241 +#: ../../../library/struct.rst:243 msgid ":c:expr:`int`" msgstr "" -#: ../../../library/struct.rst:241 ../../../library/struct.rst:243 -#: ../../../library/struct.rst:245 ../../../library/struct.rst:247 -#: ../../../library/struct.rst:260 +#: ../../../library/struct.rst:243 ../../../library/struct.rst:245 +#: ../../../library/struct.rst:247 ../../../library/struct.rst:249 +#: ../../../library/struct.rst:262 msgid "4" msgstr "" -#: ../../../library/struct.rst:243 +#: ../../../library/struct.rst:245 msgid "``I``" msgstr "" -#: ../../../library/struct.rst:243 +#: ../../../library/struct.rst:245 msgid ":c:expr:`unsigned int`" msgstr "" -#: ../../../library/struct.rst:245 +#: ../../../library/struct.rst:247 msgid "``l``" msgstr "" -#: ../../../library/struct.rst:245 +#: ../../../library/struct.rst:247 msgid ":c:expr:`long`" msgstr "" -#: ../../../library/struct.rst:247 +#: ../../../library/struct.rst:249 msgid "``L``" msgstr "" -#: ../../../library/struct.rst:247 +#: ../../../library/struct.rst:249 msgid ":c:expr:`unsigned long`" msgstr "" -#: ../../../library/struct.rst:249 +#: ../../../library/struct.rst:251 msgid "``q``" msgstr "" -#: ../../../library/struct.rst:249 +#: ../../../library/struct.rst:251 msgid ":c:expr:`long long`" msgstr "" -#: ../../../library/struct.rst:249 ../../../library/struct.rst:251 -#: ../../../library/struct.rst:262 ../../../library/struct.rst:264 -#: ../../../library/struct.rst:268 +#: ../../../library/struct.rst:251 ../../../library/struct.rst:253 +#: ../../../library/struct.rst:264 ../../../library/struct.rst:266 msgid "8" msgstr "" -#: ../../../library/struct.rst:251 +#: ../../../library/struct.rst:253 msgid "``Q``" msgstr "" -#: ../../../library/struct.rst:251 +#: ../../../library/struct.rst:253 msgid ":c:expr:`unsigned long long`" msgstr "" -#: ../../../library/struct.rst:254 +#: ../../../library/struct.rst:256 msgid "``n``" msgstr "" -#: ../../../library/struct.rst:254 +#: ../../../library/struct.rst:256 msgid ":c:type:`ssize_t`" msgstr "" -#: ../../../library/struct.rst:254 ../../../library/struct.rst:256 +#: ../../../library/struct.rst:256 ../../../library/struct.rst:258 msgid "\\(2), \\(3)" msgstr "" -#: ../../../library/struct.rst:256 +#: ../../../library/struct.rst:258 msgid "``N``" msgstr "" -#: ../../../library/struct.rst:256 +#: ../../../library/struct.rst:258 msgid ":c:type:`size_t`" msgstr "" -#: ../../../library/struct.rst:258 +#: ../../../library/struct.rst:260 msgid "``e``" msgstr "" -#: ../../../library/struct.rst:258 +#: ../../../library/struct.rst:260 msgid ":c:expr:`_Float16`" msgstr "" -#: ../../../library/struct.rst:258 ../../../library/struct.rst:260 -#: ../../../library/struct.rst:262 +#: ../../../library/struct.rst:260 ../../../library/struct.rst:262 +#: ../../../library/struct.rst:264 msgid "float" msgstr "" -#: ../../../library/struct.rst:258 +#: ../../../library/struct.rst:260 msgid "\\(4), \\(6)" msgstr "" -#: ../../../library/struct.rst:260 +#: ../../../library/struct.rst:262 msgid "``f``" msgstr "" -#: ../../../library/struct.rst:260 +#: ../../../library/struct.rst:262 msgid ":c:expr:`float`" msgstr "" -#: ../../../library/struct.rst:260 ../../../library/struct.rst:262 +#: ../../../library/struct.rst:262 ../../../library/struct.rst:264 msgid "\\(4)" msgstr "" -#: ../../../library/struct.rst:262 +#: ../../../library/struct.rst:264 msgid "``d``" msgstr "" -#: ../../../library/struct.rst:262 +#: ../../../library/struct.rst:264 msgid ":c:expr:`double`" msgstr "" -#: ../../../library/struct.rst:264 -msgid "``F``" +#: ../../../library/struct.rst:266 +msgid "``Zf``" msgstr "" -#: ../../../library/struct.rst:264 ../../../library/struct.rst:268 +#: ../../../library/struct.rst:266 msgid ":c:expr:`float complex`" msgstr "" -#: ../../../library/struct.rst:264 ../../../library/struct.rst:266 -#: ../../../library/struct.rst:268 ../../../library/struct.rst:270 +#: ../../../library/struct.rst:266 ../../../library/struct.rst:268 msgid "complex" msgstr "" -#: ../../../library/struct.rst:264 ../../../library/struct.rst:266 -#: ../../../library/struct.rst:268 ../../../library/struct.rst:270 +#: ../../../library/struct.rst:266 ../../../library/struct.rst:268 msgid "\\(10)" msgstr "" -#: ../../../library/struct.rst:266 -msgid "``D``" +#: ../../../library/struct.rst:268 +msgid "``Zd``" msgstr "" -#: ../../../library/struct.rst:266 ../../../library/struct.rst:270 +#: ../../../library/struct.rst:268 msgid ":c:expr:`double complex`" msgstr "" -#: ../../../library/struct.rst:266 ../../../library/struct.rst:270 -msgid "16" -msgstr "" - #: ../../../library/struct.rst:268 -msgid "``Zf``" +msgid "16" msgstr "" #: ../../../library/struct.rst:270 -msgid "``Zd``" -msgstr "" - -#: ../../../library/struct.rst:272 msgid "``s``" msgstr "" -#: ../../../library/struct.rst:272 ../../../library/struct.rst:274 +#: ../../../library/struct.rst:270 ../../../library/struct.rst:272 msgid ":c:expr:`char[]`" msgstr "" -#: ../../../library/struct.rst:272 ../../../library/struct.rst:274 +#: ../../../library/struct.rst:270 ../../../library/struct.rst:272 msgid "bytes" msgstr "" -#: ../../../library/struct.rst:272 +#: ../../../library/struct.rst:270 msgid "\\(9)" msgstr "" -#: ../../../library/struct.rst:274 +#: ../../../library/struct.rst:272 msgid "``p``" msgstr "" -#: ../../../library/struct.rst:274 +#: ../../../library/struct.rst:272 msgid "\\(8)" msgstr "" -#: ../../../library/struct.rst:276 +#: ../../../library/struct.rst:274 msgid "``P``" msgstr "" -#: ../../../library/struct.rst:276 +#: ../../../library/struct.rst:274 msgid ":c:expr:`void \\*`" msgstr "" -#: ../../../library/struct.rst:276 +#: ../../../library/struct.rst:274 msgid "\\(2), \\(5)" msgstr "" -#: ../../../library/struct.rst:279 +#: ../../../library/struct.rst:277 msgid "Added support for the ``'n'`` and ``'N'`` formats." msgstr "" -#: ../../../library/struct.rst:282 +#: ../../../library/struct.rst:280 msgid "Added support for the ``'e'`` format." msgstr "" -#: ../../../library/struct.rst:285 +#: ../../../library/struct.rst:283 msgid "Added support for the ``'F'`` and ``'D'`` formats." msgstr "" -#: ../../../library/struct.rst:288 +#: ../../../library/struct.rst:286 msgid "Added support for the ``'Zf'`` and ``'Zd'`` formats." msgstr "" -#: ../../../library/struct.rst:293 +#: ../../../library/struct.rst:289 +msgid "``'F'`` and ``'D'`` formats are deprecated." +msgstr "" + +#: ../../../library/struct.rst:294 msgid "" "The :mod:`array` and :ref:`ctypes ` modules, " "as well as third-party modules like `numpy `_. It has a sign " @@ -712,11 +707,11 @@ msgid "" "information." msgstr "" -#: ../../../library/struct.rst:347 +#: ../../../library/struct.rst:348 msgid "When packing, ``'x'`` inserts one NUL byte." msgstr "" -#: ../../../library/struct.rst:350 +#: ../../../library/struct.rst:351 msgid "" "The ``'p'`` type code encodes a \"Pascal string\", meaning a short variable-" "length string stored in a *fixed number of bytes*, given by the count. The " @@ -731,7 +726,7 @@ msgid "" "`bytes` and :class:`bytearray` are accepted." msgstr "" -#: ../../../library/struct.rst:364 +#: ../../../library/struct.rst:365 msgid "" "For the ``'s'`` type code, the count is interpreted as the length of the " "byte string, not a repeat count like for the other type codes; for example, " @@ -747,30 +742,31 @@ msgid "" "arguments of types :class:`bytes` and :class:`bytearray` are accepted." msgstr "" -#: ../../../library/struct.rst:380 +#: ../../../library/struct.rst:381 msgid "" -"For the ``'F'`` and ``'D'`` type codes, the packed representation uses the " +"For the ``'Zf'`` and ``'Zd'`` type codes, the packed representation uses the " "IEEE 754 binary32 and binary64 format for components of the complex number, " "regardless of the floating-point format used by the platform. Note that " -"complex types (``F``/``Zf`` and ``D``/``Zd``) are available unconditionally, " -"despite complex types being an optional feature in C. As specified in the " -"C11 standard, each complex type is represented by a two-element C array " -"containing, respectively, the real and imaginary parts." +"complex types are available unconditionally, despite complex types being an " +"optional feature in C. As specified in the C11 standard, each complex type " +"is represented by a two-element C array containing, respectively, the real " +"and imaginary parts. The ``'F'`` and ``'D'`` (for ``'Zf'`` and ``'Zd'``, " +"respectively) format characters are supported for compatibility." msgstr "" -#: ../../../library/struct.rst:389 +#: ../../../library/struct.rst:392 msgid "" "A type code may be preceded by an integral repeat count. For example, the " "format string ``'4h'`` means exactly the same as ``'hhhh'``." msgstr "" -#: ../../../library/struct.rst:392 +#: ../../../library/struct.rst:395 msgid "" "Whitespace characters between formats are ignored; a count and its format " "must not contain whitespace though." msgstr "" -#: ../../../library/struct.rst:395 +#: ../../../library/struct.rst:398 msgid "" "When packing a value ``x`` using one of the integer formats (``'b'``, " "``'B'``, ``'h'``, ``'H'``, ``'i'``, ``'I'``, ``'l'``, ``'L'``, ``'q'``, " @@ -778,13 +774,13 @@ msgid "" "`struct.error` is raised." msgstr "" -#: ../../../library/struct.rst:400 +#: ../../../library/struct.rst:403 msgid "" "Previously, some of the integer formats wrapped out-of-range values and " "raised :exc:`DeprecationWarning` instead of :exc:`struct.error`." msgstr "" -#: ../../../library/struct.rst:406 +#: ../../../library/struct.rst:409 msgid "" "For the ``'?'`` type code, the return value is either :const:`True` or :" "const:`False`. When packing, the truth value of the argument object is used. " @@ -792,39 +788,39 @@ msgid "" "and any non-zero value will be ``True`` when unpacking." msgstr "" -#: ../../../library/struct.rst:416 +#: ../../../library/struct.rst:419 msgid "Examples" msgstr "" -#: ../../../library/struct.rst:419 +#: ../../../library/struct.rst:422 msgid "" "Native byte order examples (designated by the ``'@'`` format prefix or lack " "of any prefix character) may not match what the reader's machine produces as " "that depends on the platform and compiler." msgstr "" -#: ../../../library/struct.rst:424 +#: ../../../library/struct.rst:427 msgid "" "Pack and unpack integers of three different sizes, using big endian " "ordering::" msgstr "" -#: ../../../library/struct.rst:435 +#: ../../../library/struct.rst:438 msgid "Attempt to pack an integer which is too large for the defined field::" msgstr "" -#: ../../../library/struct.rst:442 +#: ../../../library/struct.rst:445 msgid "" "Demonstrate the difference between ``'s'`` and ``'c'`` format characters::" msgstr "" -#: ../../../library/struct.rst:450 +#: ../../../library/struct.rst:453 msgid "" "Unpacked fields can be named by assigning them to variables or by wrapping " "the result in a named tuple::" msgstr "" -#: ../../../library/struct.rst:461 +#: ../../../library/struct.rst:464 msgid "" "The ordering of type codes may have an impact on size in native mode since " "padding is implicit. In standard mode, the user is responsible for inserting " @@ -834,41 +830,41 @@ msgid "" "endian machine::" msgstr "" -#: ../../../library/struct.rst:478 +#: ../../../library/struct.rst:481 msgid "" "The following format ``'llh0l'`` results in two pad bytes being added at the " "end, assuming the platform's longs are aligned on 4-byte boundaries::" msgstr "" -#: ../../../library/struct.rst:487 +#: ../../../library/struct.rst:490 msgid "Module :mod:`array`" msgstr "" -#: ../../../library/struct.rst:488 +#: ../../../library/struct.rst:491 msgid "Packed binary storage of homogeneous data." msgstr "" -#: ../../../library/struct.rst:490 +#: ../../../library/struct.rst:493 msgid "Module :mod:`json`" msgstr "" -#: ../../../library/struct.rst:491 +#: ../../../library/struct.rst:494 msgid "JSON encoder and decoder." msgstr "" -#: ../../../library/struct.rst:493 +#: ../../../library/struct.rst:496 msgid "Module :mod:`pickle`" msgstr "" -#: ../../../library/struct.rst:494 +#: ../../../library/struct.rst:497 msgid "Python object serialization." msgstr "" -#: ../../../library/struct.rst:500 +#: ../../../library/struct.rst:503 msgid "Applications" msgstr "" -#: ../../../library/struct.rst:502 +#: ../../../library/struct.rst:505 msgid "" "Two main applications for the :mod:`!struct` module exist, data interchange " "between Python and C code within an application or another application " @@ -878,11 +874,11 @@ msgid "" "speaking, the format strings constructed for these two domains are distinct." msgstr "" -#: ../../../library/struct.rst:513 +#: ../../../library/struct.rst:516 msgid "Native Formats" msgstr "" -#: ../../../library/struct.rst:515 +#: ../../../library/struct.rst:518 msgid "" "When constructing format strings which mimic native layouts, the compiler " "and machine architecture determine byte ordering and padding. In such cases, " @@ -893,35 +889,35 @@ msgid "" "of consecutive chunks of data." msgstr "" -#: ../../../library/struct.rst:523 +#: ../../../library/struct.rst:526 msgid "" "Consider these two simple examples (on a 64-bit, little-endian machine)::" msgstr "" -#: ../../../library/struct.rst:531 +#: ../../../library/struct.rst:534 msgid "" "Data is not padded to an 8-byte boundary at the end of the second format " "string without the use of extra padding. A zero-repeat format code solves " "that problem::" msgstr "" -#: ../../../library/struct.rst:538 +#: ../../../library/struct.rst:541 msgid "" "The ``'x'`` type code can be used to specify the repeat, but for native " "formats it is better to use a zero-repeat format like ``'0l'``." msgstr "" -#: ../../../library/struct.rst:541 +#: ../../../library/struct.rst:544 msgid "" "By default, native byte ordering and alignment is used, but it is better to " "be explicit and use the ``'@'`` prefix character." msgstr "" -#: ../../../library/struct.rst:548 +#: ../../../library/struct.rst:551 msgid "Standard Formats" msgstr "" -#: ../../../library/struct.rst:550 +#: ../../../library/struct.rst:553 msgid "" "When exchanging data beyond your process such as networking or storage, be " "precise. Specify the exact byte order, size, and alignment. Do not assume " @@ -935,22 +931,22 @@ msgid "" "from the previous section, we have::" msgstr "" -#: ../../../library/struct.rst:577 +#: ../../../library/struct.rst:580 msgid "" "The above results (executed on a 64-bit machine) aren't guaranteed to match " "when executed on different machines. For example, the examples below were " "executed on a 32-bit machine::" msgstr "" -#: ../../../library/struct.rst:592 +#: ../../../library/struct.rst:595 msgid "Classes" msgstr "" -#: ../../../library/struct.rst:594 +#: ../../../library/struct.rst:597 msgid "The :mod:`!struct` module also defines the following type:" msgstr "" -#: ../../../library/struct.rst:599 +#: ../../../library/struct.rst:602 msgid "" "Return a new Struct object which writes and reads binary data according to " "the format string *format*. Creating a ``Struct`` object once and calling " @@ -958,61 +954,61 @@ msgid "" "same format since the format string is only compiled once." msgstr "" -#: ../../../library/struct.rst:606 +#: ../../../library/struct.rst:609 msgid "" "The compiled versions of the most recent format strings passed to the module-" "level functions are cached, so programs that use only a few format strings " "needn't worry about reusing a single :class:`Struct` instance." msgstr "" -#: ../../../library/struct.rst:611 +#: ../../../library/struct.rst:614 msgid "Compiled Struct objects support the following methods and attributes:" msgstr "" -#: ../../../library/struct.rst:615 +#: ../../../library/struct.rst:618 msgid "" "Identical to the :func:`pack` function, using the compiled format. " "(``len(result)`` will equal :attr:`size`.)" msgstr "" -#: ../../../library/struct.rst:621 +#: ../../../library/struct.rst:624 msgid "Identical to the :func:`pack_into` function, using the compiled format." msgstr "" -#: ../../../library/struct.rst:626 +#: ../../../library/struct.rst:629 msgid "" "Identical to the :func:`unpack` function, using the compiled format. The " "buffer's size in bytes must equal :attr:`size`." msgstr "" -#: ../../../library/struct.rst:632 +#: ../../../library/struct.rst:635 msgid "" "Identical to the :func:`unpack_from` function, using the compiled format. " "The buffer's size in bytes, starting at position *offset*, must be at least :" "attr:`size`." msgstr "" -#: ../../../library/struct.rst:639 +#: ../../../library/struct.rst:642 msgid "" "Identical to the :func:`iter_unpack` function, using the compiled format. " "The buffer's size in bytes must be a multiple of :attr:`size`." msgstr "" -#: ../../../library/struct.rst:646 +#: ../../../library/struct.rst:649 msgid "The format string used to construct this Struct object." msgstr "" -#: ../../../library/struct.rst:648 +#: ../../../library/struct.rst:651 msgid "The format string type is now :class:`str` instead of :class:`bytes`." msgstr "" -#: ../../../library/struct.rst:653 +#: ../../../library/struct.rst:656 msgid "" "The calculated size of the struct (and hence of the bytes object produced by " "the :meth:`pack` method) corresponding to :attr:`format`." msgstr "" -#: ../../../library/struct.rst:656 +#: ../../../library/struct.rst:659 msgid "The *repr()* of structs has changed. It is now:" msgstr "" @@ -1036,31 +1032,31 @@ msgstr "" msgid "data" msgstr "" -#: ../../../library/struct.rst:136 +#: ../../../library/struct.rst:138 msgid "@ (at)" msgstr "" -#: ../../../library/struct.rst:136 ../../../library/struct.rst:301 -#: ../../../library/struct.rst:404 +#: ../../../library/struct.rst:138 ../../../library/struct.rst:302 +#: ../../../library/struct.rst:407 msgid "in struct format strings" msgstr "" -#: ../../../library/struct.rst:136 +#: ../../../library/struct.rst:138 msgid "= (equals)" msgstr "" -#: ../../../library/struct.rst:136 +#: ../../../library/struct.rst:138 msgid "< (less)" msgstr "" -#: ../../../library/struct.rst:136 +#: ../../../library/struct.rst:138 msgid "> (greater)" msgstr "" -#: ../../../library/struct.rst:136 +#: ../../../library/struct.rst:138 msgid "! (exclamation)" msgstr "" -#: ../../../library/struct.rst:301 ../../../library/struct.rst:404 +#: ../../../library/struct.rst:302 ../../../library/struct.rst:407 msgid "? (question mark)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/symtable.pot b/main/locale/pot/LC_MESSAGES/library/symtable.pot index d43edb96e23..96fe4f386ce 100644 --- a/main/locale/pot/LC_MESSAGES/library/symtable.pot +++ b/main/locale/pot/LC_MESSAGES/library/symtable.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -40,58 +40,63 @@ msgstr "" #: ../../../library/symtable.rst:22 msgid "" "Return the toplevel :class:`SymbolTable` for the Python source *code*. " -"*filename* is the name of the file containing the code. *compile_type* is " -"like the *mode* argument to :func:`compile`. The optional argument *module* " -"specifies the module name. It is needed to unambiguous :ref:`filter ` syntax warnings by module name." +"*code* can be a string, a bytes object, or an AST object, as for the " +"builtin :func:`compile`. *filename* is the name of the file containing the " +"code. *compile_type* is like the *mode* argument to :func:`compile`. The " +"optional argument *module* specifies the module name. It is needed to " +"unambiguous :ref:`filter ` syntax warnings by module name." msgstr "" -#: ../../../library/symtable.rst:29 +#: ../../../library/symtable.rst:31 msgid "Added the *module* parameter." msgstr "" #: ../../../library/symtable.rst:34 +msgid "*code* can now be an AST object." +msgstr "" + +#: ../../../library/symtable.rst:39 msgid "Examining Symbol Tables" msgstr "" -#: ../../../library/symtable.rst:38 +#: ../../../library/symtable.rst:43 msgid "An enumeration indicating the type of a :class:`SymbolTable` object." msgstr "" -#: ../../../library/symtable.rst:43 +#: ../../../library/symtable.rst:48 msgid "Used for the symbol table of a module." msgstr "" -#: ../../../library/symtable.rst:48 +#: ../../../library/symtable.rst:53 msgid "Used for the symbol table of a function." msgstr "" -#: ../../../library/symtable.rst:53 +#: ../../../library/symtable.rst:58 msgid "Used for the symbol table of a class." msgstr "" -#: ../../../library/symtable.rst:55 +#: ../../../library/symtable.rst:60 msgid "" "The following members refer to different flavors of :ref:`annotation scopes " "`." msgstr "" -#: ../../../library/symtable.rst:61 +#: ../../../library/symtable.rst:66 msgid "" "Used for annotations if ``from __future__ import annotations`` is active." msgstr "" -#: ../../../library/symtable.rst:66 +#: ../../../library/symtable.rst:71 msgid "Used for the symbol table of :keyword:`type` constructions." msgstr "" -#: ../../../library/symtable.rst:71 +#: ../../../library/symtable.rst:76 msgid "" "Used for the symbol table of :ref:`generic functions ` " "or :ref:`generic classes `." msgstr "" -#: ../../../library/symtable.rst:77 +#: ../../../library/symtable.rst:82 msgid "" "Used for the symbol table of the bound, the constraint tuple or the default " "value of a single type variable in the formal sense, i.e., a TypeVar, a " @@ -99,38 +104,38 @@ msgid "" "a constraint tuple)." msgstr "" -#: ../../../library/symtable.rst:86 +#: ../../../library/symtable.rst:91 msgid "A namespace table for a block. The constructor is not public." msgstr "" -#: ../../../library/symtable.rst:90 +#: ../../../library/symtable.rst:95 msgid "" "Return the type of the symbol table. Possible values are members of the :" "class:`SymbolTableType` enumeration." msgstr "" -#: ../../../library/symtable.rst:93 +#: ../../../library/symtable.rst:98 msgid "" "Added ``'annotation'``, ``'TypeVar bound'``, ``'type alias'``, and ``'type " "parameter'`` as possible return values." msgstr "" -#: ../../../library/symtable.rst:97 +#: ../../../library/symtable.rst:102 msgid "Return values are members of the :class:`SymbolTableType` enumeration." msgstr "" -#: ../../../library/symtable.rst:100 +#: ../../../library/symtable.rst:105 msgid "" "The exact values of the returned string may change in the future, and thus, " "it is recommended to use :class:`SymbolTableType` members instead of hard-" "coded strings." msgstr "" -#: ../../../library/symtable.rst:106 +#: ../../../library/symtable.rst:111 msgid "Return the table's identifier." msgstr "" -#: ../../../library/symtable.rst:110 +#: ../../../library/symtable.rst:115 msgid "" "Return the table's name. This is the name of the class if the table is for " "a class, the name of the function if the table is for a function, or " @@ -141,212 +146,212 @@ msgid "" "`~typing.TypeVar` bound scopes, it is the name of the ``TypeVar``." msgstr "" -#: ../../../library/symtable.rst:120 +#: ../../../library/symtable.rst:125 msgid "Return the number of the first line in the block this table represents." msgstr "" -#: ../../../library/symtable.rst:124 +#: ../../../library/symtable.rst:129 msgid "Return ``True`` if the locals in this table can be optimized." msgstr "" -#: ../../../library/symtable.rst:128 +#: ../../../library/symtable.rst:133 msgid "Return ``True`` if the block is a nested class or function." msgstr "" -#: ../../../library/symtable.rst:132 +#: ../../../library/symtable.rst:137 msgid "" "Return ``True`` if the block has nested namespaces within it. These can be " "obtained with :meth:`get_children`." msgstr "" -#: ../../../library/symtable.rst:137 +#: ../../../library/symtable.rst:142 msgid "" "Return a view object containing the names of symbols in the table. See the :" "ref:`documentation of view objects `." msgstr "" -#: ../../../library/symtable.rst:142 +#: ../../../library/symtable.rst:147 msgid "Lookup *name* in the table and return a :class:`Symbol` instance." msgstr "" -#: ../../../library/symtable.rst:146 +#: ../../../library/symtable.rst:151 msgid "Return a list of :class:`Symbol` instances for names in the table." msgstr "" -#: ../../../library/symtable.rst:150 +#: ../../../library/symtable.rst:155 msgid "Return a list of the nested symbol tables." msgstr "" -#: ../../../library/symtable.rst:155 +#: ../../../library/symtable.rst:160 msgid "" "A namespace for a function or method. This class inherits from :class:" "`SymbolTable`." msgstr "" -#: ../../../library/symtable.rst:160 +#: ../../../library/symtable.rst:165 msgid "Return a tuple containing names of parameters to this function." msgstr "" -#: ../../../library/symtable.rst:164 +#: ../../../library/symtable.rst:169 msgid "Return a tuple containing names of locals in this function." msgstr "" -#: ../../../library/symtable.rst:168 +#: ../../../library/symtable.rst:173 msgid "Return a tuple containing names of globals in this function." msgstr "" -#: ../../../library/symtable.rst:172 +#: ../../../library/symtable.rst:177 msgid "" "Return a tuple containing names of explicitly declared nonlocals in this " "function." msgstr "" -#: ../../../library/symtable.rst:176 +#: ../../../library/symtable.rst:181 msgid "" "Return a tuple containing names of :term:`free (closure) variables ` in this function." msgstr "" -#: ../../../library/symtable.rst:181 +#: ../../../library/symtable.rst:186 msgid "" "Return a tuple containing names of :term:`cell variables ` " "in this table." msgstr "" -#: ../../../library/symtable.rst:188 +#: ../../../library/symtable.rst:193 msgid "A namespace of a class. This class inherits from :class:`SymbolTable`." msgstr "" -#: ../../../library/symtable.rst:193 +#: ../../../library/symtable.rst:198 msgid "" "An entry in a :class:`SymbolTable` corresponding to an identifier in the " "source. The constructor is not public." msgstr "" -#: ../../../library/symtable.rst:198 +#: ../../../library/symtable.rst:203 msgid "Return the symbol's name." msgstr "" -#: ../../../library/symtable.rst:202 +#: ../../../library/symtable.rst:207 msgid "Return ``True`` if the symbol is used in its block." msgstr "" -#: ../../../library/symtable.rst:206 +#: ../../../library/symtable.rst:211 msgid "Return ``True`` if the symbol is created from an import statement." msgstr "" -#: ../../../library/symtable.rst:210 +#: ../../../library/symtable.rst:215 msgid "Return ``True`` if the symbol is a parameter." msgstr "" -#: ../../../library/symtable.rst:214 +#: ../../../library/symtable.rst:219 msgid "Return ``True`` if the symbol is a type parameter." msgstr "" -#: ../../../library/symtable.rst:220 +#: ../../../library/symtable.rst:225 msgid "Return ``True`` if the symbol is global." msgstr "" -#: ../../../library/symtable.rst:224 +#: ../../../library/symtable.rst:229 msgid "Return ``True`` if the symbol is nonlocal." msgstr "" -#: ../../../library/symtable.rst:228 +#: ../../../library/symtable.rst:233 msgid "" "Return ``True`` if the symbol is declared global with a global statement." msgstr "" -#: ../../../library/symtable.rst:232 +#: ../../../library/symtable.rst:237 msgid "Return ``True`` if the symbol is local to its block." msgstr "" -#: ../../../library/symtable.rst:236 +#: ../../../library/symtable.rst:241 msgid "Return ``True`` if the symbol is annotated." msgstr "" -#: ../../../library/symtable.rst:242 +#: ../../../library/symtable.rst:247 msgid "" "Return ``True`` if the symbol is referenced in its block, but not assigned " "to." msgstr "" -#: ../../../library/symtable.rst:247 +#: ../../../library/symtable.rst:252 msgid "" "Return ``True`` if the symbol is referenced but not assigned in a nested " "block." msgstr "" -#: ../../../library/symtable.rst:253 +#: ../../../library/symtable.rst:258 msgid "" "Return *True* if a class-scoped symbol is free from the perspective of a " "method." msgstr "" -#: ../../../library/symtable.rst:256 +#: ../../../library/symtable.rst:261 msgid "Consider the following example::" msgstr "" -#: ../../../library/symtable.rst:265 +#: ../../../library/symtable.rst:270 msgid "" "In this example, the class-scoped symbol ``x`` is considered to be free from " "the perspective of ``C.method``, thereby allowing the latter to return *1* " "at runtime and not *2*." msgstr "" -#: ../../../library/symtable.rst:273 +#: ../../../library/symtable.rst:278 msgid "Return ``True`` if the symbol is assigned to in its block." msgstr "" -#: ../../../library/symtable.rst:277 +#: ../../../library/symtable.rst:282 msgid "Return ``True`` if the symbol is a comprehension iteration variable." msgstr "" -#: ../../../library/symtable.rst:283 +#: ../../../library/symtable.rst:288 msgid "Return ``True`` if the symbol is a cell in an inlined comprehension." msgstr "" -#: ../../../library/symtable.rst:289 +#: ../../../library/symtable.rst:294 msgid "Return ``True`` if name binding introduces new namespace." msgstr "" -#: ../../../library/symtable.rst:291 +#: ../../../library/symtable.rst:296 msgid "" "If the name is used as the target of a function or class statement, this " "will be true." msgstr "" -#: ../../../library/symtable.rst:294 +#: ../../../library/symtable.rst:299 msgid "For example::" msgstr "" -#: ../../../library/symtable.rst:300 +#: ../../../library/symtable.rst:305 msgid "" "Note that a single name can be bound to multiple objects. If the result is " "``True``, the name may also be bound to other objects, like an int or list, " "that does not introduce a new namespace." msgstr "" -#: ../../../library/symtable.rst:306 +#: ../../../library/symtable.rst:311 msgid "Return a list of namespaces bound to this name." msgstr "" -#: ../../../library/symtable.rst:310 +#: ../../../library/symtable.rst:315 msgid "" "Return the namespace bound to this name. If more than one or no namespace is " "bound to this name, a :exc:`ValueError` is raised." msgstr "" -#: ../../../library/symtable.rst:317 +#: ../../../library/symtable.rst:322 msgid "Command-Line Usage" msgstr "" -#: ../../../library/symtable.rst:321 +#: ../../../library/symtable.rst:326 msgid "" "The :mod:`!symtable` module can be executed as a script from the command " "line." msgstr "" -#: ../../../library/symtable.rst:327 +#: ../../../library/symtable.rst:332 msgid "" "Symbol tables are generated for the specified Python source files and dumped " "to stdout. If no input file is specified, the content is read from stdin." diff --git a/main/locale/pot/LC_MESSAGES/library/sys.pot b/main/locale/pot/LC_MESSAGES/library/sys.pot index 195a99e4249..900bb82d0ef 100644 --- a/main/locale/pot/LC_MESSAGES/library/sys.pot +++ b/main/locale/pot/LC_MESSAGES/library/sys.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -90,7 +90,7 @@ msgstr "" #: ../../../library/sys.rst:853 ../../../library/sys.rst:1129 #: ../../../library/sys.rst:1754 ../../../library/sys.rst:2052 #: ../../../library/sys.rst:2067 ../../../library/sys.rst:2075 -#: ../../../library/sys.rst:2116 ../../../library/sys.rst:2360 +#: ../../../library/sys.rst:2116 ../../../library/sys.rst:2361 msgid "Availability" msgstr "" @@ -2617,7 +2617,7 @@ msgstr "" #: ../../../library/sys.rst:2138 msgid "" -"The encoding and error handling are is initialized from :c:member:`PyConfig." +"The encoding and error handling are initialized from :c:member:`PyConfig." "stdio_encoding` and :c:member:`PyConfig.stdio_errors`." msgstr "" @@ -2758,24 +2758,32 @@ msgid "The name of the lock implementation:" msgstr "" #: ../../../library/sys.rst:2243 -msgid "``\"semaphore\"``: a lock uses a semaphore" +msgid "``\"semaphore\"``: a lock uses a semaphore (Python 3.14 and older)" msgstr "" #: ../../../library/sys.rst:2244 -msgid "``\"mutex+cond\"``: a lock uses a mutex and a condition variable" +msgid "" +"``\"mutex+cond\"``: a lock uses a mutex and a condition variable (Python " +"3.14 and older)" msgstr "" #: ../../../library/sys.rst:2245 +msgid "" +"``\"pymutex\"``: a lock uses the :c:type:`PyMutex` implementation (Python " +"3.15 and newer)" +msgstr "" + +#: ../../../library/sys.rst:2246 msgid "``None`` if this information is unknown" msgstr "" -#: ../../../library/sys.rst:2249 +#: ../../../library/sys.rst:2250 msgid "" "The name and version of the thread library. It is a string, or ``None`` if " "this information is unknown." msgstr "" -#: ../../../library/sys.rst:2257 +#: ../../../library/sys.rst:2258 msgid "" "When this variable is set to an integer value, it determines the maximum " "number of levels of traceback information printed when an unhandled " @@ -2784,42 +2792,42 @@ msgid "" "are printed." msgstr "" -#: ../../../library/sys.rst:2265 +#: ../../../library/sys.rst:2266 msgid "Handle an unraisable exception." msgstr "" -#: ../../../library/sys.rst:2267 +#: ../../../library/sys.rst:2268 msgid "" "Called when an exception has occurred but there is no way for Python to " "handle it. For example, when a destructor raises an exception or during " "garbage collection (:func:`gc.collect`)." msgstr "" -#: ../../../library/sys.rst:2271 +#: ../../../library/sys.rst:2272 msgid "The *unraisable* argument has the following attributes:" msgstr "" -#: ../../../library/sys.rst:2273 +#: ../../../library/sys.rst:2274 msgid ":attr:`!exc_type`: Exception type." msgstr "" -#: ../../../library/sys.rst:2274 +#: ../../../library/sys.rst:2275 msgid ":attr:`!exc_value`: Exception value, can be ``None``." msgstr "" -#: ../../../library/sys.rst:2275 +#: ../../../library/sys.rst:2276 msgid ":attr:`!exc_traceback`: Exception traceback, can be ``None``." msgstr "" -#: ../../../library/sys.rst:2276 +#: ../../../library/sys.rst:2277 msgid ":attr:`!err_msg`: Error message, can be ``None``." msgstr "" -#: ../../../library/sys.rst:2277 +#: ../../../library/sys.rst:2278 msgid ":attr:`!object`: Object causing the exception, can be ``None``." msgstr "" -#: ../../../library/sys.rst:2279 +#: ../../../library/sys.rst:2280 msgid "" "The default hook formats :attr:`!err_msg` and :attr:`!object` as: " "``f'{err_msg}: {object!r}'``; use \"Exception ignored in\" error message if :" @@ -2828,35 +2836,35 @@ msgid "" "`environment variables `." msgstr "" -#: ../../../library/sys.rst:2285 +#: ../../../library/sys.rst:2286 msgid "" ":func:`sys.unraisablehook` can be overridden to control how unraisable " "exceptions are handled." msgstr "" -#: ../../../library/sys.rst:2288 +#: ../../../library/sys.rst:2289 msgid "Exceptions are now printed with colorful text." msgstr "" -#: ../../../library/sys.rst:2293 +#: ../../../library/sys.rst:2294 msgid ":func:`excepthook` which handles uncaught exceptions." msgstr "" -#: ../../../library/sys.rst:2297 +#: ../../../library/sys.rst:2298 msgid "" "Storing :attr:`!exc_value` using a custom hook can create a reference cycle. " "It should be cleared explicitly to break the reference cycle when the " "exception is no longer needed." msgstr "" -#: ../../../library/sys.rst:2301 +#: ../../../library/sys.rst:2302 msgid "" "Storing :attr:`!object` using a custom hook can resurrect it if it is set to " "an object which is being finalized. Avoid storing :attr:`!object` after the " "custom hook completes to avoid resurrecting objects." msgstr "" -#: ../../../library/sys.rst:2305 ../../../library/sys.rst:2307 +#: ../../../library/sys.rst:2306 ../../../library/sys.rst:2308 msgid "" "Raise an auditing event ``sys.unraisablehook`` with arguments *hook*, " "*unraisable* when an exception that cannot be handled occurs. The " @@ -2864,7 +2872,7 @@ msgid "" "hook has been set, *hook* may be ``None``." msgstr "" -#: ../../../library/sys.rst:2316 +#: ../../../library/sys.rst:2317 msgid "" "A string containing the version number of the Python interpreter plus " "additional information on the build number and compiler used. This string " @@ -2873,19 +2881,19 @@ msgid "" "functions provided by the :mod:`platform` module." msgstr "" -#: ../../../library/sys.rst:2325 +#: ../../../library/sys.rst:2326 msgid "" "The C API version, equivalent to the C macro :c:macro:`PYTHON_API_VERSION`. " "Defined for backwards compatibility." msgstr "" -#: ../../../library/sys.rst:2328 +#: ../../../library/sys.rst:2329 msgid "" "Currently, this constant is not updated in new Python versions, and is not " "useful for versioning. This may change in the future." msgstr "" -#: ../../../library/sys.rst:2334 +#: ../../../library/sys.rst:2335 msgid "" "A tuple containing the five components of the version number: *major*, " "*minor*, *micro*, *releaselevel*, and *serial*. All values except " @@ -2896,18 +2904,18 @@ msgid "" "version_info.major`` and so on." msgstr "" -#: ../../../library/sys.rst:2342 +#: ../../../library/sys.rst:2343 msgid "Added named component attributes." msgstr "" -#: ../../../library/sys.rst:2347 +#: ../../../library/sys.rst:2348 msgid "" "This is an implementation detail of the warnings framework; do not modify " "this value. Refer to the :mod:`warnings` module for more information on the " "warnings framework." msgstr "" -#: ../../../library/sys.rst:2354 +#: ../../../library/sys.rst:2355 msgid "" "The version number used to form registry keys on Windows platforms. This is " "stored as string resource 1000 in the Python DLL. The value is normally the " @@ -2916,31 +2924,31 @@ msgid "" "has no effect on the registry keys used by Python." msgstr "" -#: ../../../library/sys.rst:2366 +#: ../../../library/sys.rst:2367 msgid "" "Namespace containing functions and constants for register callbacks and " "controlling monitoring events. See :mod:`sys.monitoring` for details." msgstr "" -#: ../../../library/sys.rst:2372 +#: ../../../library/sys.rst:2373 msgid "" "A dictionary of the various implementation-specific flags passed through " "the :option:`-X` command-line option. Option names are either mapped to " "their values, if given explicitly, or to :const:`True`. Example:" msgstr "" -#: ../../../library/sys.rst:2388 +#: ../../../library/sys.rst:2389 msgid "" "This is a CPython-specific way of accessing options passed through :option:`-" "X`. Other implementations may export them through other means, or not at " "all." msgstr "" -#: ../../../library/sys.rst:2396 +#: ../../../library/sys.rst:2397 msgid "Citations" msgstr "" -#: ../../../library/sys.rst:2397 +#: ../../../library/sys.rst:2398 msgid "" "ISO/IEC 9899:1999. \"Programming languages -- C.\" A public draft of this " "standard is available at https://www.open-std.org/jtc1/sc22/wg14/www/docs/" diff --git a/main/locale/pot/LC_MESSAGES/library/tarfile.pot b/main/locale/pot/LC_MESSAGES/library/tarfile.pot index 3edb46e89c1..210485ed166 100644 --- a/main/locale/pot/LC_MESSAGES/library/tarfile.pot +++ b/main/locale/pot/LC_MESSAGES/library/tarfile.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-15 14:52+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1578,44 +1578,50 @@ msgstr "" #: ../../../library/tarfile.rst:1198 msgid "" +"Check for platform-specific filename semantics. For example, on Windows some " +"names can have reserved meanings." +msgstr "" + +#: ../../../library/tarfile.rst:1200 +msgid "" "Check that filenames have expected extensions (discouraging files that " "execute when you “click on them”, or extension-less files like Windows " "special device names)." msgstr "" -#: ../../../library/tarfile.rst:1201 +#: ../../../library/tarfile.rst:1203 msgid "" "Limit the number of extracted files, total size of extracted data, filename " "length (including symlink length), and size of individual files." msgstr "" -#: ../../../library/tarfile.rst:1203 +#: ../../../library/tarfile.rst:1205 msgid "Check for files that would be shadowed on case-insensitive filesystems." msgstr "" -#: ../../../library/tarfile.rst:1205 +#: ../../../library/tarfile.rst:1207 msgid "Also note that:" msgstr "" -#: ../../../library/tarfile.rst:1207 +#: ../../../library/tarfile.rst:1209 msgid "" "Tar files may contain multiple versions of the same file. Later ones are " "expected to overwrite any earlier ones. This feature is crucial to allow " "updating tape archives, but can be abused maliciously." msgstr "" -#: ../../../library/tarfile.rst:1211 +#: ../../../library/tarfile.rst:1213 msgid "" "*tarfile* does not protect against issues with “live” data, e.g. an attacker " "tinkering with the destination (or source) directory while extraction (or " "archiving) is in progress." msgstr "" -#: ../../../library/tarfile.rst:1217 +#: ../../../library/tarfile.rst:1219 msgid "Supporting older Python versions" msgstr "" -#: ../../../library/tarfile.rst:1219 +#: ../../../library/tarfile.rst:1221 msgid "" "Extraction filters were added to Python 3.12, but may be backported to older " "versions as security updates. To check whether the feature is available, use " @@ -1623,177 +1629,177 @@ msgid "" "version." msgstr "" -#: ../../../library/tarfile.rst:1224 +#: ../../../library/tarfile.rst:1226 msgid "" "The following examples show how to support Python versions with and without " "the feature. Note that setting ``extraction_filter`` will affect any " "subsequent operations." msgstr "" -#: ../../../library/tarfile.rst:1228 +#: ../../../library/tarfile.rst:1230 msgid "Fully trusted archive::" msgstr "" -#: ../../../library/tarfile.rst:1233 +#: ../../../library/tarfile.rst:1235 msgid "" "Use the ``'data'`` filter if available, but revert to Python 3.11 behavior " "(``'fully_trusted'``) if this feature is not available::" msgstr "" -#: ../../../library/tarfile.rst:1240 +#: ../../../library/tarfile.rst:1242 msgid "Use the ``'data'`` filter; *fail* if it is not available::" msgstr "" -#: ../../../library/tarfile.rst:1244 +#: ../../../library/tarfile.rst:1246 msgid "or::" msgstr "" -#: ../../../library/tarfile.rst:1249 +#: ../../../library/tarfile.rst:1251 msgid "Use the ``'data'`` filter; *warn* if it is not available::" msgstr "" -#: ../../../library/tarfile.rst:1260 +#: ../../../library/tarfile.rst:1262 msgid "Stateful extraction filter example" msgstr "" -#: ../../../library/tarfile.rst:1262 +#: ../../../library/tarfile.rst:1264 msgid "" "While *tarfile*'s extraction methods take a simple *filter* callable, custom " "filters may be more complex objects with an internal state. It may be useful " "to write these as context managers, to be used like this::" msgstr "" -#: ../../../library/tarfile.rst:1269 +#: ../../../library/tarfile.rst:1271 msgid "Such a filter can be written as, for example::" msgstr "" -#: ../../../library/tarfile.rst:1291 +#: ../../../library/tarfile.rst:1293 msgid "Command-Line Interface" msgstr "" -#: ../../../library/tarfile.rst:1295 +#: ../../../library/tarfile.rst:1297 msgid "" "The :mod:`!tarfile` module provides a simple command-line interface to " "interact with tar archives." msgstr "" -#: ../../../library/tarfile.rst:1298 +#: ../../../library/tarfile.rst:1300 msgid "" "If you want to create a new tar archive, specify its name after the :option:" "`-c` option and then list the filename(s) that should be included:" msgstr "" -#: ../../../library/tarfile.rst:1305 +#: ../../../library/tarfile.rst:1307 msgid "Passing a directory is also acceptable:" msgstr "" -#: ../../../library/tarfile.rst:1311 +#: ../../../library/tarfile.rst:1313 msgid "" "If you want to extract a tar archive into the current directory, use the :" "option:`-e` option:" msgstr "" -#: ../../../library/tarfile.rst:1318 +#: ../../../library/tarfile.rst:1320 msgid "" "You can also extract a tar archive into a different directory by passing the " "directory's name:" msgstr "" -#: ../../../library/tarfile.rst:1325 +#: ../../../library/tarfile.rst:1327 msgid "For a list of the files in a tar archive, use the :option:`-l` option:" msgstr "" -#: ../../../library/tarfile.rst:1333 +#: ../../../library/tarfile.rst:1335 msgid "Command-line options" msgstr "" -#: ../../../library/tarfile.rst:1338 +#: ../../../library/tarfile.rst:1340 msgid "List files in a tarfile." msgstr "" -#: ../../../library/tarfile.rst:1343 +#: ../../../library/tarfile.rst:1345 msgid "Create tarfile from source files." msgstr "" -#: ../../../library/tarfile.rst:1348 +#: ../../../library/tarfile.rst:1350 msgid "" "Extract tarfile into the current directory if *output_dir* is not specified." msgstr "" -#: ../../../library/tarfile.rst:1353 +#: ../../../library/tarfile.rst:1355 msgid "Test whether the tarfile is valid or not." msgstr "" -#: ../../../library/tarfile.rst:1357 +#: ../../../library/tarfile.rst:1359 msgid "Verbose output." msgstr "" -#: ../../../library/tarfile.rst:1361 +#: ../../../library/tarfile.rst:1363 msgid "" "Specifies the *filter* for ``--extract``. See :ref:`tarfile-extraction-" "filter` for details. Only string names are accepted (that is, " "``fully_trusted``, ``tar``, and ``data``)." msgstr "" -#: ../../../library/tarfile.rst:1369 +#: ../../../library/tarfile.rst:1371 msgid "Examples" msgstr "" -#: ../../../library/tarfile.rst:1372 +#: ../../../library/tarfile.rst:1374 msgid "Reading examples" msgstr "" -#: ../../../library/tarfile.rst:1374 +#: ../../../library/tarfile.rst:1376 msgid "How to extract an entire tar archive to the current working directory::" msgstr "" -#: ../../../library/tarfile.rst:1381 +#: ../../../library/tarfile.rst:1383 msgid "" "How to extract a subset of a tar archive with :meth:`TarFile.extractall` " "using a generator function instead of a list::" msgstr "" -#: ../../../library/tarfile.rst:1396 +#: ../../../library/tarfile.rst:1398 msgid "" "How to read a gzip compressed tar archive and display some member " "information::" msgstr "" -#: ../../../library/tarfile.rst:1411 +#: ../../../library/tarfile.rst:1413 msgid "Writing examples" msgstr "" -#: ../../../library/tarfile.rst:1413 +#: ../../../library/tarfile.rst:1415 msgid "How to create an uncompressed tar archive from a list of filenames::" msgstr "" -#: ../../../library/tarfile.rst:1421 +#: ../../../library/tarfile.rst:1423 msgid "The same example using the :keyword:`with` statement::" msgstr "" -#: ../../../library/tarfile.rst:1428 +#: ../../../library/tarfile.rst:1430 msgid "" "How to create and write an archive to stdout using :data:`sys.stdout.buffer " "` in the *fileobj* parameter in :meth:`TarFile.add`::" msgstr "" -#: ../../../library/tarfile.rst:1438 +#: ../../../library/tarfile.rst:1440 msgid "" "How to create an archive and reset the user information using the *filter* " "parameter in :meth:`TarFile.add`::" msgstr "" -#: ../../../library/tarfile.rst:1454 +#: ../../../library/tarfile.rst:1456 msgid "Supported tar formats" msgstr "" -#: ../../../library/tarfile.rst:1456 +#: ../../../library/tarfile.rst:1458 msgid "" "There are three tar formats that can be created with the :mod:`!tarfile` " "module:" msgstr "" -#: ../../../library/tarfile.rst:1458 +#: ../../../library/tarfile.rst:1460 msgid "" "The POSIX.1-1988 ustar format (:const:`USTAR_FORMAT`). It supports filenames " "up to a length of at best 256 characters and linknames up to 100 characters. " @@ -1801,7 +1807,7 @@ msgid "" "supported format." msgstr "" -#: ../../../library/tarfile.rst:1463 +#: ../../../library/tarfile.rst:1465 msgid "" "The GNU tar format (:const:`GNU_FORMAT`). It supports long filenames and " "linknames, files bigger than 8 GiB and sparse files. It is the de facto " @@ -1809,7 +1815,7 @@ msgid "" "extensions for long names, sparse file support is read-only." msgstr "" -#: ../../../library/tarfile.rst:1468 +#: ../../../library/tarfile.rst:1470 msgid "" "The POSIX.1-2001 pax format (:const:`PAX_FORMAT`). It is the most flexible " "format with virtually no limits. It supports long filenames and linknames, " @@ -1820,7 +1826,7 @@ msgid "" "*ustar* format. It is the current default format for new archives." msgstr "" -#: ../../../library/tarfile.rst:1476 +#: ../../../library/tarfile.rst:1478 msgid "" "It extends the existing *ustar* format with extra headers for information " "that cannot be stored otherwise. There are two flavours of pax headers: " @@ -1829,13 +1835,13 @@ msgid "" "in a pax header is encoded in *UTF-8* for portability reasons." msgstr "" -#: ../../../library/tarfile.rst:1482 +#: ../../../library/tarfile.rst:1484 msgid "" "There are some more variants of the tar format which can be read, but not " "created:" msgstr "" -#: ../../../library/tarfile.rst:1485 +#: ../../../library/tarfile.rst:1487 msgid "" "The ancient V7 format. This is the first tar format from Unix Seventh " "Edition, storing only regular files and directories. Names must not be " @@ -1844,17 +1850,17 @@ msgid "" "ASCII characters." msgstr "" -#: ../../../library/tarfile.rst:1490 +#: ../../../library/tarfile.rst:1492 msgid "" "The SunOS tar extended format. This format is a variant of the POSIX.1-2001 " "pax format, but is not compatible." msgstr "" -#: ../../../library/tarfile.rst:1496 +#: ../../../library/tarfile.rst:1498 msgid "Unicode issues" msgstr "" -#: ../../../library/tarfile.rst:1498 +#: ../../../library/tarfile.rst:1500 msgid "" "The tar format was originally conceived to make backups on tape drives with " "the main focus on preserving file system information. Nowadays tar archives " @@ -1869,13 +1875,13 @@ msgid "" "It stores non-ASCII metadata using the universal character encoding *UTF-8*." msgstr "" -#: ../../../library/tarfile.rst:1510 +#: ../../../library/tarfile.rst:1512 msgid "" "The details of character conversion in :mod:`!tarfile` are controlled by the " "*encoding* and *errors* keyword arguments of the :class:`TarFile` class." msgstr "" -#: ../../../library/tarfile.rst:1513 +#: ../../../library/tarfile.rst:1515 msgid "" "*encoding* defines the character encoding to use for the metadata in the " "archive. The default value is :func:`sys.getfilesystemencoding` or " @@ -1884,7 +1890,7 @@ msgid "" "not set appropriately, this conversion may fail." msgstr "" -#: ../../../library/tarfile.rst:1519 +#: ../../../library/tarfile.rst:1521 msgid "" "The *errors* argument defines how characters are treated that cannot be " "converted. Possible values are listed in section :ref:`error-handlers`. The " @@ -1892,7 +1898,7 @@ msgid "" "system calls, see :ref:`os-filenames`." msgstr "" -#: ../../../library/tarfile.rst:1524 +#: ../../../library/tarfile.rst:1526 msgid "" "For :const:`PAX_FORMAT` archives (the default), *encoding* is generally not " "needed because all the metadata is stored using *UTF-8*. *encoding* is only " diff --git a/main/locale/pot/LC_MESSAGES/library/tempfile.pot b/main/locale/pot/LC_MESSAGES/library/tempfile.pot index 5ebc81f3664..5d2feefffc1 100644 --- a/main/locale/pot/LC_MESSAGES/library/tempfile.pot +++ b/main/locale/pot/LC_MESSAGES/library/tempfile.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,13 +29,14 @@ msgstr "" msgid "" "This module creates temporary files and directories. It works on all " "supported platforms. :class:`TemporaryFile`, :class:`NamedTemporaryFile`, :" -"class:`TemporaryDirectory`, and :class:`SpooledTemporaryFile` are high-level " -"interfaces which provide automatic cleanup and can be used as :term:`context " -"managers `. :func:`mkstemp` and :func:`mkdtemp` are lower-" -"level functions which require manual cleanup." +"class:`TemporaryFileWrapper`, :class:`TemporaryDirectory`, and :class:" +"`SpooledTemporaryFile` are high-level interfaces which provide automatic " +"cleanup and can be used as :term:`context managers `. :func:" +"`mkstemp` and :func:`mkdtemp` are lower-level functions which require manual " +"cleanup." msgstr "" -#: ../../../library/tempfile.rst:22 +#: ../../../library/tempfile.rst:23 msgid "" "All the user-callable functions and constructors take additional arguments " "which allow direct control over the location and name of temporary files and " @@ -46,11 +47,11 @@ msgid "" "clarity." msgstr "" -#: ../../../library/tempfile.rst:30 +#: ../../../library/tempfile.rst:31 msgid "The module defines the following user-callable items:" msgstr "" -#: ../../../library/tempfile.rst:34 +#: ../../../library/tempfile.rst:35 msgid "" "Return a :term:`file-like object` that can be used as a temporary storage " "area. The file is created securely, using the same rules as :func:`mkstemp`. " @@ -62,14 +63,14 @@ msgid "" "visible name in the file system." msgstr "" -#: ../../../library/tempfile.rst:42 +#: ../../../library/tempfile.rst:43 msgid "" "The resulting object can be used as a :term:`context manager` (see :ref:" "`tempfile-examples`). On completion of the context or destruction of the " "file object the temporary file will be removed from the filesystem." msgstr "" -#: ../../../library/tempfile.rst:47 +#: ../../../library/tempfile.rst:48 msgid "" "The *mode* parameter defaults to ``'w+b'`` so that the file created can be " "read and written without being closed. Binary mode is used so that it " @@ -78,78 +79,79 @@ msgid "" "for :func:`open`." msgstr "" -#: ../../../library/tempfile.rst:53 +#: ../../../library/tempfile.rst:54 msgid "" "The *dir*, *prefix* and *suffix* parameters have the same meaning and " "defaults as with :func:`mkstemp`." msgstr "" -#: ../../../library/tempfile.rst:56 +#: ../../../library/tempfile.rst:57 msgid "" "The returned object is a true file object on POSIX platforms. On other " "platforms, it is a file-like object whose :attr:`!file` attribute is the " "underlying true file object." msgstr "" -#: ../../../library/tempfile.rst:60 +#: ../../../library/tempfile.rst:61 msgid "" "The :py:const:`os.O_TMPFILE` flag is used if it is available and works " "(Linux-specific, requires Linux kernel 3.11 or later)." msgstr "" -#: ../../../library/tempfile.rst:63 +#: ../../../library/tempfile.rst:64 msgid "" "On platforms that are neither Posix nor Cygwin, TemporaryFile is an alias " "for NamedTemporaryFile." msgstr "" -#: ../../../library/tempfile.rst:66 ../../../library/tempfile.rst:135 -#: ../../../library/tempfile.rst:263 +#: ../../../library/tempfile.rst:67 ../../../library/tempfile.rst:136 +#: ../../../library/tempfile.rst:292 msgid "" "Raises an :ref:`auditing event ` ``tempfile.mkstemp`` with " "argument ``fullpath``." msgstr "" -#: ../../../library/tempfile.rst:70 +#: ../../../library/tempfile.rst:71 msgid "The :py:const:`os.O_TMPFILE` flag is now used if available." msgstr "" -#: ../../../library/tempfile.rst:72 ../../../library/tempfile.rst:137 -#: ../../../library/tempfile.rst:167 +#: ../../../library/tempfile.rst:73 ../../../library/tempfile.rst:138 +#: ../../../library/tempfile.rst:196 msgid "Added *errors* parameter." msgstr "" -#: ../../../library/tempfile.rst:78 +#: ../../../library/tempfile.rst:79 msgid "" "This function operates exactly as :func:`TemporaryFile` does, except the " "following differences:" msgstr "" -#: ../../../library/tempfile.rst:81 +#: ../../../library/tempfile.rst:82 msgid "" "This function returns a file that is guaranteed to have a visible name in " "the file system." msgstr "" -#: ../../../library/tempfile.rst:83 +#: ../../../library/tempfile.rst:84 msgid "" "To manage the named file, it extends the parameters of :func:`TemporaryFile` " "with *delete* and *delete_on_close* parameters that determine whether and " "how the named file should be automatically deleted." msgstr "" -#: ../../../library/tempfile.rst:87 +#: ../../../library/tempfile.rst:88 msgid "" -"The returned object is always a :term:`file-like object` whose :attr:`!file` " -"attribute is the underlying true file object. This file-like object can be " -"used in a :keyword:`with` statement, just like a normal file. The name of " -"the temporary file can be retrieved from the :attr:`!name` attribute of the " +"The returned object is always a :class:`TemporaryFileWrapper` instance (a :" +"term:`file-like object`) whose :attr:`~TemporaryFileWrapper.file` attribute " +"is the underlying true file object. This file-like object can be used in a :" +"keyword:`with` statement, just like a normal file. The name of the " +"temporary file can be retrieved from the :attr:`!name` attribute of the " "returned file-like object. On Unix, unlike with the :func:`TemporaryFile`, " "the directory entry does not get unlinked immediately after the file " "creation." msgstr "" -#: ../../../library/tempfile.rst:95 +#: ../../../library/tempfile.rst:96 msgid "" "If *delete* is true (the default) and *delete_on_close* is true (the " "default), the file is deleted as soon as it is closed. If *delete* is true " @@ -159,7 +161,7 @@ msgid "" "is false, the value of *delete_on_close* is ignored." msgstr "" -#: ../../../library/tempfile.rst:102 +#: ../../../library/tempfile.rst:103 msgid "" "Therefore to use the name of the temporary file to reopen the file after " "closing it, either make sure not to delete the file upon closure (set the " @@ -169,33 +171,33 @@ msgid "" "automatic cleaning of the temporary file upon the context manager exit." msgstr "" -#: ../../../library/tempfile.rst:109 +#: ../../../library/tempfile.rst:110 msgid "" "Opening the temporary file again by its name while it is still open works as " "follows:" msgstr "" -#: ../../../library/tempfile.rst:112 +#: ../../../library/tempfile.rst:113 msgid "On POSIX the file can always be opened again." msgstr "" -#: ../../../library/tempfile.rst:113 +#: ../../../library/tempfile.rst:114 msgid "" "On Windows, make sure that at least one of the following conditions are " "fulfilled:" msgstr "" -#: ../../../library/tempfile.rst:116 +#: ../../../library/tempfile.rst:117 msgid "*delete* is false" msgstr "" -#: ../../../library/tempfile.rst:117 +#: ../../../library/tempfile.rst:118 msgid "" "additional open shares delete access (e.g. by calling :func:`os.open` with " "the flag ``O_TEMPORARY``)" msgstr "" -#: ../../../library/tempfile.rst:119 +#: ../../../library/tempfile.rst:120 msgid "" "*delete* is true but *delete_on_close* is false. Note, that in this case the " "additional opens that do not share delete access (e.g. created via builtin :" @@ -204,7 +206,7 @@ msgid "" "`PermissionError`." msgstr "" -#: ../../../library/tempfile.rst:125 +#: ../../../library/tempfile.rst:126 msgid "" "On Windows, if *delete_on_close* is false, and the file is created in a " "directory for which the user lacks delete access, then the :func:`os.unlink` " @@ -214,18 +216,45 @@ msgid "" "not granted." msgstr "" -#: ../../../library/tempfile.rst:132 +#: ../../../library/tempfile.rst:133 msgid "" "On POSIX (only), a process that is terminated abruptly with SIGKILL cannot " "automatically delete any NamedTemporaryFiles it created." msgstr "" -#: ../../../library/tempfile.rst:140 +#: ../../../library/tempfile.rst:141 msgid "Added *delete_on_close* parameter." msgstr "" #: ../../../library/tempfile.rst:146 msgid "" +"A mutable wrapper returned by :func:`NamedTemporaryFile`. It wraps the " +"underlying file object, delegating attribute access to it, and ensures the " +"temporary file is deleted when appropriate." +msgstr "" + +#: ../../../library/tempfile.rst:152 +msgid "The underlying :term:`file-like object`." +msgstr "" + +#: ../../../library/tempfile.rst:156 +msgid "The file name of the temporary file." +msgstr "" + +#: ../../../library/tempfile.rst:160 +msgid "" +"Close the temporary file, possibly deleting it depending on the *delete* and " +"*delete_on_close* arguments passed to :func:`NamedTemporaryFile`." +msgstr "" + +#: ../../../library/tempfile.rst:166 +msgid "" +"``tempfile._TemporaryFileWrapper`` is kept as a backwards compatible " +"deprecated alias for this class. It will be removed in Python 3.21" +msgstr "" + +#: ../../../library/tempfile.rst:175 +msgid "" "This class operates exactly as :func:`TemporaryFile` does, except that data " "is spooled in memory until the file size exceeds *max_size*, or until the " "file's :func:`~io.IOBase.fileno` method is called, at which point the " @@ -233,13 +262,13 @@ msgid "" "`TemporaryFile`." msgstr "" -#: ../../../library/tempfile.rst:154 +#: ../../../library/tempfile.rst:183 msgid "" "The resulting file has one additional method, :meth:`!rollover`, which " "causes the file to roll over to an on-disk file regardless of its size." msgstr "" -#: ../../../library/tempfile.rst:157 +#: ../../../library/tempfile.rst:186 msgid "" "The returned object is a file-like object whose :attr:`!_file` attribute is " "either an :class:`io.BytesIO` or :class:`io.TextIOWrapper` object (depending " @@ -248,18 +277,18 @@ msgid "" "object can be used in a :keyword:`with` statement, just like a normal file." msgstr "" -#: ../../../library/tempfile.rst:164 +#: ../../../library/tempfile.rst:193 msgid "the truncate method now accepts a *size* argument." msgstr "" -#: ../../../library/tempfile.rst:170 +#: ../../../library/tempfile.rst:199 msgid "" "Fully implements the :class:`io.BufferedIOBase` and :class:`io.TextIOBase` " "abstract base classes (depending on whether binary or text *mode* was " "specified)." msgstr "" -#: ../../../library/tempfile.rst:178 +#: ../../../library/tempfile.rst:207 msgid "" "This class securely creates a temporary directory using the same rules as :" "func:`mkdtemp`. The resulting object can be used as a :term:`context " @@ -268,7 +297,7 @@ msgid "" "directory and all its contents are removed from the filesystem." msgstr "" -#: ../../../library/tempfile.rst:186 +#: ../../../library/tempfile.rst:215 msgid "" "The directory name can be retrieved from the :attr:`!name` attribute of the " "returned object. When the returned object is used as a :term:`context " @@ -276,7 +305,7 @@ msgid "" "as` clause in the :keyword:`with` statement, if there is one." msgstr "" -#: ../../../library/tempfile.rst:193 +#: ../../../library/tempfile.rst:222 msgid "" "The directory can be explicitly cleaned up by calling the :meth:`!cleanup` " "method. If *ignore_cleanup_errors* is true, any unhandled exceptions during " @@ -288,7 +317,7 @@ msgid "" "shutdown)." msgstr "" -#: ../../../library/tempfile.rst:202 +#: ../../../library/tempfile.rst:231 msgid "" "The *delete* parameter can be used to disable cleanup of the directory tree " "upon exiting the context. While it may seem unusual for a context manager " @@ -297,21 +326,21 @@ msgid "" "based on other logic." msgstr "" -#: ../../../library/tempfile.rst:208 ../../../library/tempfile.rst:289 +#: ../../../library/tempfile.rst:237 ../../../library/tempfile.rst:318 msgid "" "Raises an :ref:`auditing event ` ``tempfile.mkdtemp`` with " "argument ``fullpath``." msgstr "" -#: ../../../library/tempfile.rst:212 +#: ../../../library/tempfile.rst:241 msgid "Added *ignore_cleanup_errors* parameter." msgstr "" -#: ../../../library/tempfile.rst:215 +#: ../../../library/tempfile.rst:244 msgid "Added the *delete* parameter." msgstr "" -#: ../../../library/tempfile.rst:221 +#: ../../../library/tempfile.rst:250 msgid "" "Creates a temporary file in the most secure manner possible. There are no " "race conditions in the file's creation, assuming that the platform properly " @@ -321,19 +350,19 @@ msgid "" "executable by no one." msgstr "" -#: ../../../library/tempfile.rst:228 +#: ../../../library/tempfile.rst:257 msgid "" "The file descriptor is :ref:`not inherited by child processes " "`." msgstr "" -#: ../../../library/tempfile.rst:230 +#: ../../../library/tempfile.rst:259 msgid "" "Unlike :func:`TemporaryFile`, the user of :func:`mkstemp` is responsible for " "deleting the temporary file when done with it." msgstr "" -#: ../../../library/tempfile.rst:233 +#: ../../../library/tempfile.rst:262 msgid "" "If *suffix* is not ``None``, the file name will end with that suffix, " "otherwise there will be no suffix. :func:`mkstemp` does not put a dot " @@ -341,14 +370,14 @@ msgid "" "beginning of *suffix*." msgstr "" -#: ../../../library/tempfile.rst:238 +#: ../../../library/tempfile.rst:267 msgid "" "If *prefix* is not ``None``, the file name will begin with that prefix; " "otherwise, a default prefix is used. The default is the return value of :" "func:`gettempprefix` or :func:`gettempprefixb`, as appropriate." msgstr "" -#: ../../../library/tempfile.rst:242 +#: ../../../library/tempfile.rst:271 msgid "" "If *dir* is not ``None``, the file will be created in that directory; " "otherwise, a default directory is used. The default directory is chosen " @@ -359,7 +388,7 @@ msgid "" "commands via ``os.popen()``." msgstr "" -#: ../../../library/tempfile.rst:250 +#: ../../../library/tempfile.rst:279 msgid "" "If any of *suffix*, *prefix*, and *dir* are not ``None``, they must be the " "same type. If they are bytes, the returned name will be bytes instead of " @@ -367,20 +396,20 @@ msgid "" "behavior, pass ``suffix=b''``." msgstr "" -#: ../../../library/tempfile.rst:256 +#: ../../../library/tempfile.rst:285 msgid "" "If *text* is specified and true, the file is opened in text mode. Otherwise, " "(the default) the file is opened in binary mode." msgstr "" -#: ../../../library/tempfile.rst:259 +#: ../../../library/tempfile.rst:288 msgid "" ":func:`mkstemp` returns a tuple containing an OS-level handle to an open " "file (as would be returned by :func:`os.open`) and the absolute pathname of " "that file, in that order." msgstr "" -#: ../../../library/tempfile.rst:265 ../../../library/tempfile.rst:291 +#: ../../../library/tempfile.rst:294 ../../../library/tempfile.rst:320 msgid "" "*suffix*, *prefix*, and *dir* may now be supplied in bytes in order to " "obtain a bytes return value. Prior to this, only str was allowed. *suffix* " @@ -388,110 +417,110 @@ msgid "" "default value to be used." msgstr "" -#: ../../../library/tempfile.rst:271 ../../../library/tempfile.rst:297 +#: ../../../library/tempfile.rst:300 ../../../library/tempfile.rst:326 msgid "The *dir* parameter now accepts a :term:`path-like object`." msgstr "" -#: ../../../library/tempfile.rst:277 +#: ../../../library/tempfile.rst:306 msgid "" "Creates a temporary directory in the most secure manner possible. There are " "no race conditions in the directory's creation. The directory is readable, " "writable, and searchable only by the creating user ID." msgstr "" -#: ../../../library/tempfile.rst:281 +#: ../../../library/tempfile.rst:310 msgid "" "The user of :func:`mkdtemp` is responsible for deleting the temporary " "directory and its contents when done with it." msgstr "" -#: ../../../library/tempfile.rst:284 +#: ../../../library/tempfile.rst:313 msgid "" "The *prefix*, *suffix*, and *dir* arguments are the same as for :func:" "`mkstemp`." msgstr "" -#: ../../../library/tempfile.rst:287 +#: ../../../library/tempfile.rst:316 msgid ":func:`mkdtemp` returns the absolute pathname of the new directory." msgstr "" -#: ../../../library/tempfile.rst:300 +#: ../../../library/tempfile.rst:329 msgid "" ":func:`mkdtemp` now always returns an absolute path, even if *dir* is " "relative." msgstr "" -#: ../../../library/tempfile.rst:306 +#: ../../../library/tempfile.rst:335 msgid "" "Return the name of the directory used for temporary files. This defines the " "default value for the *dir* argument to all functions in this module." msgstr "" -#: ../../../library/tempfile.rst:310 +#: ../../../library/tempfile.rst:339 msgid "" "Python searches a standard list of directories to find one which the calling " "user can create files in. The list is:" msgstr "" -#: ../../../library/tempfile.rst:313 +#: ../../../library/tempfile.rst:342 msgid "The directory named by the :envvar:`TMPDIR` environment variable." msgstr "" -#: ../../../library/tempfile.rst:315 +#: ../../../library/tempfile.rst:344 msgid "The directory named by the :envvar:`TEMP` environment variable." msgstr "" -#: ../../../library/tempfile.rst:317 +#: ../../../library/tempfile.rst:346 msgid "The directory named by the :envvar:`TMP` environment variable." msgstr "" -#: ../../../library/tempfile.rst:319 +#: ../../../library/tempfile.rst:348 msgid "A platform-specific location:" msgstr "" -#: ../../../library/tempfile.rst:321 +#: ../../../library/tempfile.rst:350 msgid "" "On Windows, the directories :file:`C:\\\\TEMP`, :file:`C:\\\\TMP`, :file:`\\" "\\TEMP`, and :file:`\\\\TMP`, in that order." msgstr "" -#: ../../../library/tempfile.rst:324 +#: ../../../library/tempfile.rst:353 msgid "" "On all other platforms, the directories :file:`/tmp`, :file:`/var/tmp`, and :" "file:`/usr/tmp`, in that order." msgstr "" -#: ../../../library/tempfile.rst:327 +#: ../../../library/tempfile.rst:356 msgid "As a last resort, the current working directory." msgstr "" -#: ../../../library/tempfile.rst:329 +#: ../../../library/tempfile.rst:358 msgid "" "The result of this search is cached, see the description of :data:`tempdir` " "below." msgstr "" -#: ../../../library/tempfile.rst:334 +#: ../../../library/tempfile.rst:363 msgid "" "Always returns a str. Previously it would return any :data:`tempdir` value " "regardless of type so long as it was not ``None``." msgstr "" -#: ../../../library/tempfile.rst:339 +#: ../../../library/tempfile.rst:368 msgid "Same as :func:`gettempdir` but the return value is in bytes." msgstr "" -#: ../../../library/tempfile.rst:345 +#: ../../../library/tempfile.rst:374 msgid "" "Return the filename prefix used to create temporary files. This does not " "contain the directory component." msgstr "" -#: ../../../library/tempfile.rst:350 +#: ../../../library/tempfile.rst:379 msgid "Same as :func:`gettempprefix` but the return value is in bytes." msgstr "" -#: ../../../library/tempfile.rst:354 +#: ../../../library/tempfile.rst:383 msgid "" "The module uses a global variable to store the name of the directory used " "for temporary files returned by :func:`gettempdir`. It can be set directly " @@ -501,21 +530,21 @@ msgid "" "unsuspecting code by changing global API behavior." msgstr "" -#: ../../../library/tempfile.rst:363 +#: ../../../library/tempfile.rst:392 msgid "" "When set to a value other than ``None``, this variable defines the default " "value for the *dir* argument to the functions defined in this module, " "including its type, bytes or str. It cannot be a :term:`path-like object`." msgstr "" -#: ../../../library/tempfile.rst:368 +#: ../../../library/tempfile.rst:397 msgid "" "If ``tempdir`` is ``None`` (the default) at any call to any of the above " "functions except :func:`gettempprefix` it is initialized following the " "algorithm described in :func:`gettempdir`." msgstr "" -#: ../../../library/tempfile.rst:374 +#: ../../../library/tempfile.rst:403 msgid "" "Beware that if you set ``tempdir`` to a bytes value, there is a nasty side " "effect: The global default return type of :func:`mkstemp` and :func:" @@ -525,20 +554,20 @@ msgid "" "compatibility with the historical implementation." msgstr "" -#: ../../../library/tempfile.rst:385 +#: ../../../library/tempfile.rst:414 msgid "Examples" msgstr "" -#: ../../../library/tempfile.rst:387 +#: ../../../library/tempfile.rst:416 msgid "" "Here are some examples of typical usage of the :mod:`!tempfile` module::" msgstr "" -#: ../../../library/tempfile.rst:432 +#: ../../../library/tempfile.rst:461 msgid "Deprecated functions and variables" msgstr "" -#: ../../../library/tempfile.rst:434 +#: ../../../library/tempfile.rst:463 msgid "" "A historical way to create temporary files was to first generate a file name " "with the :func:`mktemp` function and then create a file using this name. " @@ -549,11 +578,11 @@ msgid "" "used by :func:`mkstemp` and the other functions described above." msgstr "" -#: ../../../library/tempfile.rst:445 +#: ../../../library/tempfile.rst:474 msgid "Use :func:`mkstemp` instead." msgstr "" -#: ../../../library/tempfile.rst:448 +#: ../../../library/tempfile.rst:477 msgid "" "Return an absolute pathname of a file that did not exist at the time the " "call is made. The *prefix*, *suffix*, and *dir* arguments are similar to " @@ -561,7 +590,7 @@ msgid "" "``prefix=None`` are not supported." msgstr "" -#: ../../../library/tempfile.rst:455 +#: ../../../library/tempfile.rst:484 msgid "" "Use of this function may introduce a security hole in your program. By the " "time you get around to doing anything with the file name it returns, someone " diff --git a/main/locale/pot/LC_MESSAGES/library/tkinter.dnd.pot b/main/locale/pot/LC_MESSAGES/library/tkinter.dnd.pot index 3a4e6b4652e..2f15355b4ff 100644 --- a/main/locale/pot/LC_MESSAGES/library/tkinter.dnd.pot +++ b/main/locale/pot/LC_MESSAGES/library/tkinter.dnd.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -38,8 +38,8 @@ msgid "" "enable an object to be dragged, you must create an event binding for it that " "starts the drag-and-drop process. Typically, you bind a ButtonPress event to " "a callback function that you write (see :ref:`Bindings-and-Events`). The " -"function should call :func:`dnd_start`, where 'source' is the object to be " -"dragged, and 'event' is the event that invoked the call (the argument to " +"function should call :func:`dnd_start`, where *source* is the object to be " +"dragged, and *event* is the event that invoked the call (the argument to " "your callback function)." msgstr "" @@ -48,69 +48,70 @@ msgid "Selection of a target object occurs as follows:" msgstr "" #: ../../../library/tkinter.dnd.rst:24 -msgid "Top-down search of area under mouse for target widget" +msgid "Top-down search of the area under the mouse for a target widget:" msgstr "" #: ../../../library/tkinter.dnd.rst:26 -msgid "Target widget should have a callable *dnd_accept* attribute" +msgid "the target widget should have a callable *dnd_accept* attribute;" msgstr "" #: ../../../library/tkinter.dnd.rst:27 msgid "" -"If *dnd_accept* is not present or returns ``None``, search moves to parent " -"widget" +"if *dnd_accept* is not present or returns ``None``, the search moves to the " +"parent widget;" msgstr "" -#: ../../../library/tkinter.dnd.rst:28 -msgid "If no target widget is found, then the target object is ``None``" -msgstr "" - -#: ../../../library/tkinter.dnd.rst:30 -msgid "Call to *.dnd_leave(source, event)*" +#: ../../../library/tkinter.dnd.rst:29 +msgid "if no target widget is found, the target object is ``None``." msgstr "" #: ../../../library/tkinter.dnd.rst:31 -msgid "Call to *.dnd_enter(source, event)*" +msgid "Call to ``.dnd_leave(source, event)``." msgstr "" #: ../../../library/tkinter.dnd.rst:32 -msgid "Call to *.dnd_commit(source, event)* to notify of drop" +msgid "Call to ``.dnd_enter(source, event)``." msgstr "" #: ../../../library/tkinter.dnd.rst:33 +msgid "Call to ``.dnd_commit(source, event)`` to notify of the drop." +msgstr "" + +#: ../../../library/tkinter.dnd.rst:34 msgid "" -"Call to *.dnd_end(target, event)* to signal end of drag-and-drop" +"Call to ``.dnd_end(target, event)`` to signal the end of drag-and-" +"drop." msgstr "" -#: ../../../library/tkinter.dnd.rst:38 +#: ../../../library/tkinter.dnd.rst:39 msgid "" "The *DndHandler* class handles drag-and-drop events tracking Motion and " "ButtonRelease events on the root of the event widget." msgstr "" -#: ../../../library/tkinter.dnd.rst:43 +#: ../../../library/tkinter.dnd.rst:44 msgid "Cancel the drag-and-drop process." msgstr "" -#: ../../../library/tkinter.dnd.rst:47 +#: ../../../library/tkinter.dnd.rst:48 msgid "Execute end of drag-and-drop functions." msgstr "" -#: ../../../library/tkinter.dnd.rst:51 +#: ../../../library/tkinter.dnd.rst:52 msgid "Inspect area below mouse for target objects while a drag is performed." msgstr "" -#: ../../../library/tkinter.dnd.rst:56 +#: ../../../library/tkinter.dnd.rst:57 msgid "Signal end of drag when the release pattern is triggered." msgstr "" -#: ../../../library/tkinter.dnd.rst:60 +#: ../../../library/tkinter.dnd.rst:61 msgid "" "Factory function for the drag-and-drop process. Return the :class:" "`DndHandler` instance managing the drag, or ``None`` if a drag could not be " "started." msgstr "" -#: ../../../library/tkinter.dnd.rst:66 +#: ../../../library/tkinter.dnd.rst:67 msgid ":ref:`Bindings-and-Events`" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/tkinter.font.pot b/main/locale/pot/LC_MESSAGES/library/tkinter.font.pot index 6b980a1f33f..e35d61a5142 100644 --- a/main/locale/pot/LC_MESSAGES/library/tkinter.font.pot +++ b/main/locale/pot/LC_MESSAGES/library/tkinter.font.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -37,37 +37,42 @@ msgstr "" #: ../../../library/tkinter.font.rst:23 msgid "" -"The :class:`Font` class represents a named font. *Font* instances are given " -"unique names and can be specified by their family, size, and style " -"configuration. Named fonts are Tk's method of creating and identifying fonts " -"as a single object, rather than specifying a font by its attributes with " -"each occurrence." +"The :class:`Font` class represents a font used by Tk widgets. It either " +"creates a new *named font* or refers to an existing font. A named font is " +"Tk's way of identifying a font as a single object that can be referred to by " +"name and reconfigured in place, rather than respecifying its attributes at " +"each use." msgstr "" #: ../../../library/tkinter.font.rst:29 msgid "" -"Two fonts now compare equal (``==``) only when both are :class:`Font` " -"instances with the same name belonging to the same Tcl interpreter." -msgstr "" - -#: ../../../library/tkinter.font.rst:33 -msgid "arguments:" -msgstr "" - -#: ../../../library/tkinter.font.rst:0 -msgid "*font* - font specifier tuple (family, size, options)" +"With *exists* false (the default), a new named font is created. Its " +"attributes are taken from the font description *font* if it is given, " +"overridden by any keyword *options*. The new font is named *name*, or a " +"generated unique name if *name* is omitted." msgstr "" -#: ../../../library/tkinter.font.rst:0 -msgid "*name* - unique font name" +#: ../../../library/tkinter.font.rst:35 +msgid "" +"With *exists* true, an existing font is referred to instead of being " +"created. If *name* is given, it is the name of the font, which is " +"reconfigured by *font* and *options* if either is given. If *name* is " +"omitted, the font description *font* is wrapped as is, without creating a " +"named font, so that it is used without loss of precision by :meth:`actual`, :" +"meth:`measure` and :meth:`metrics`. In this case no keyword options are " +"accepted, and the :attr:`!name` attribute is the description itself rather " +"than a string." msgstr "" -#: ../../../library/tkinter.font.rst:0 -msgid "*exists* - self points to existing named font if true" +#: ../../../library/tkinter.font.rst:47 +msgid "" +"The font description *font* is a tuple of the family name, the size and zero " +"or more styles, or any other form accepted by Tk, such as the name of a " +"named font." msgstr "" -#: ../../../library/tkinter.font.rst:39 -msgid "additional keyword options (ignored if *font* is specified):" +#: ../../../library/tkinter.font.rst:51 +msgid "The keyword *options* are:" msgstr "" #: ../../../library/tkinter.font.rst:0 @@ -106,85 +111,109 @@ msgstr "" msgid "*overstrike* - font strikeout (0 - none, 1 - strikeout)" msgstr "" -#: ../../../library/tkinter.font.rst:53 +#: ../../../library/tkinter.font.rst:63 +msgid "" +"Two fonts now compare equal (``==``) only when both are :class:`Font` " +"instances with the same name belonging to the same Tcl interpreter." +msgstr "" + +#: ../../../library/tkinter.font.rst:67 +msgid "" +"A font description can now be wrapped without creating a new named font, and " +"keyword options now override the attributes of the specified *font*." +msgstr "" + +#: ../../../library/tkinter.font.rst:73 msgid "" "Return the actual attributes of the font, which may differ from the " "requested ones because of platform limitations. With no *option*, return a " "dictionary of all the attributes; if *option* is given, return the value of " -"that single attribute." +"that single attribute. The attributes are resolved on the display of the " +"*displayof* widget, or the main application window if it is not specified." msgstr "" -#: ../../../library/tkinter.font.rst:60 +#: ../../../library/tkinter.font.rst:82 msgid "Retrieve an attribute of the font." msgstr "" -#: ../../../library/tkinter.font.rst:67 +#: ../../../library/tkinter.font.rst:86 +msgid "" +":meth:`!cget` and :meth:`configure` operate on a named font and raise :exc:" +"`~tkinter.TclError` for a wrapped font description. Use :meth:`actual` to " +"query the attributes of the latter." +msgstr "" + +#: ../../../library/tkinter.font.rst:95 msgid "" "Modify one or more attributes of the font. With no arguments, return a " "dictionary of the current attributes." msgstr "" -#: ../../../library/tkinter.font.rst:70 +#: ../../../library/tkinter.font.rst:98 msgid ":meth:`config` is an alias of :meth:`!configure`." msgstr "" -#: ../../../library/tkinter.font.rst:74 -msgid "Return new instance of the current font." +#: ../../../library/tkinter.font.rst:102 +msgid "" +"Return a distinct copy of the current font: a new named font with the same " +"attributes but a different name, which can be reconfigured independently of " +"the original. If the current font wraps a font description, the copy is " +"instead a named font with its resolved attributes." msgstr "" -#: ../../../library/tkinter.font.rst:78 +#: ../../../library/tkinter.font.rst:110 msgid "" "Return amount of space the text would occupy on the specified display when " "formatted in the current font, as an integer number of pixels. If no display " "is specified then the main application window is assumed." msgstr "" -#: ../../../library/tkinter.font.rst:84 +#: ../../../library/tkinter.font.rst:116 msgid "" "Return font-specific data. With no options, return a dictionary mapping each " "metric name to its integer value; if one option name is given, return that " "metric's value as an integer. Options include:" msgstr "" -#: ../../../library/tkinter.font.rst:90 +#: ../../../library/tkinter.font.rst:122 msgid "*ascent* - distance between baseline and highest point that a" msgstr "" -#: ../../../library/tkinter.font.rst:91 ../../../library/tkinter.font.rst:94 +#: ../../../library/tkinter.font.rst:123 ../../../library/tkinter.font.rst:126 msgid "character of the font can occupy" msgstr "" -#: ../../../library/tkinter.font.rst:93 +#: ../../../library/tkinter.font.rst:125 msgid "*descent* - distance between baseline and lowest point that a" msgstr "" -#: ../../../library/tkinter.font.rst:96 +#: ../../../library/tkinter.font.rst:128 msgid "*linespace* - minimum vertical separation necessary between any two" msgstr "" -#: ../../../library/tkinter.font.rst:97 +#: ../../../library/tkinter.font.rst:129 msgid "characters of the font that ensures no vertical overlap between lines." msgstr "" -#: ../../../library/tkinter.font.rst:99 +#: ../../../library/tkinter.font.rst:131 msgid "*fixed* - 1 if font is fixed-width else 0" msgstr "" -#: ../../../library/tkinter.font.rst:103 +#: ../../../library/tkinter.font.rst:135 msgid "Return a tuple of the names of the available font families." msgstr "" -#: ../../../library/tkinter.font.rst:107 +#: ../../../library/tkinter.font.rst:139 msgid "Return a tuple of the names of all the defined fonts." msgstr "" -#: ../../../library/tkinter.font.rst:111 +#: ../../../library/tkinter.font.rst:143 msgid "" "Return a :class:`Font` representation of the existing named font *name*. " "*root* is the widget whose Tcl interpreter owns the font; if omitted, the " "default root window is used." msgstr "" -#: ../../../library/tkinter.font.rst:115 +#: ../../../library/tkinter.font.rst:147 msgid "The *root* parameter was added." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/tkinter.fontchooser.pot b/main/locale/pot/LC_MESSAGES/library/tkinter.fontchooser.pot new file mode 100644 index 00000000000..dc7734f05ab --- /dev/null +++ b/main/locale/pot/LC_MESSAGES/library/tkinter.fontchooser.pot @@ -0,0 +1,150 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 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.16\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-07-20 11:48+0000\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" + +#: ../../../library/tkinter.fontchooser.rst:2 +msgid ":mod:`!tkinter.fontchooser` --- Font selection dialog" +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:9 +msgid "**Source code:** :source:`Lib/tkinter/fontchooser.py`" +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:13 +msgid "" +"The :mod:`!tkinter.fontchooser` module provides the :class:`FontChooser` " +"class as an interface to the native font selection dialog." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:16 +msgid "" +"The font dialog is application-global: there is a single font dialog per Tcl " +"interpreter, and all :class:`FontChooser` instances configure the same " +"dialog." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:20 +msgid "" +"Depending on the platform, the dialog may be modal or modeless, so :meth:" +"`~FontChooser.show` may return immediately. The selected font is not " +"returned: it is passed as a :class:`~tkinter.font.Font` object to the " +"callback specified with the *command* option." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:26 +msgid "" +"The dialog also generates two virtual events on the parent window (see the " +"*parent* option):" +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:29 +msgid "``<>``" +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:30 +msgid "" +"Generated when the dialog is shown or hidden. Query the *visible* option to " +"tell which." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:33 +msgid "``<>``" +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:34 +msgid "Generated when the selected font changes." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:38 +msgid "" +"The *command* callback is the only reliable way to obtain the selected font. " +"On some platforms the *font* option is not updated to the user's choice." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:43 +msgid "The class implementing the font selection dialog." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:45 +msgid "" +"*master* is the widget whose Tcl interpreter owns the dialog. If omitted, it " +"defaults to *parent* if that is given, or to the default root window " +"otherwise." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:49 +msgid "The supported configuration options are:" +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:51 +msgid "" +"*parent* --- the window to which the dialog and its virtual events are " +"related. It defaults to the main window; on macOS the dialog is shown as a " +"sheet attached to it, rather than as a free-standing panel." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:55 +msgid "*title* --- the title of the dialog." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:56 +msgid "*font* --- the font that is currently selected in the dialog." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:57 +msgid "" +"*command* --- a callback that is called with a :class:`~tkinter.font.Font` " +"object wrapping the selected font when the user selects a font." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:60 +msgid "*visible* --- whether the dialog is currently displayed (read-only)." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:62 +msgid "" +"The *font* option accepts the forms supported by :class:`tkinter.font.Font`." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:67 +msgid "" +"Query or modify the options of the font dialog. With no arguments, return a " +"dict of all option values. With a string argument, return the value of that " +"option. Otherwise, set the given options." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:74 +msgid "Return the value of the given option of the font dialog." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:78 +msgid "" +"Display the font dialog. Depending on the platform, this method may return " +"immediately or only once the dialog has been withdrawn." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:84 +msgid "Hide the font dialog if it is displayed." +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:89 +msgid "Module :mod:`tkinter.font`" +msgstr "" + +#: ../../../library/tkinter.fontchooser.rst:90 +msgid "Tkinter font-handling utilities" +msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/tkinter.messagebox.pot b/main/locale/pot/LC_MESSAGES/library/tkinter.messagebox.pot index edfc58b5da9..88ef2fc9537 100644 --- a/main/locale/pot/LC_MESSAGES/library/tkinter.messagebox.pot +++ b/main/locale/pot/LC_MESSAGES/library/tkinter.messagebox.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -32,38 +32,37 @@ msgid "" "message boxes are modal: each blocks until the user responds, then returns a " "value that depends on the function. The ``show*`` functions and :meth:" "`Message.show` return the symbolic name of the button the user pressed, as a " -"string (such as :data:`OK` or :data:`YES`), while the ``ask*`` functions " -"return a :class:`bool` or ``None`` (see each function below). Common message " -"box styles and layouts include but are not limited to:" +"string (such as :data:`OK` or :data:`YES`). Common message box styles and " +"layouts include but are not limited to:" msgstr "" -#: ../../../library/tkinter.messagebox.rst:25 +#: ../../../library/tkinter.messagebox.rst:23 msgid "" "Create a message window with an application-specified message, an icon and a " "set of buttons. Each of the buttons in the message window is identified by a " "unique symbolic name (see the *type* options)." msgstr "" -#: ../../../library/tkinter.messagebox.rst:29 +#: ../../../library/tkinter.messagebox.rst:27 msgid "The following options are supported:" msgstr "" -#: ../../../library/tkinter.messagebox.rst:31 +#: ../../../library/tkinter.messagebox.rst:29 msgid "*command*" msgstr "" -#: ../../../library/tkinter.messagebox.rst:32 +#: ../../../library/tkinter.messagebox.rst:30 msgid "" "Specifies the function to invoke when the user closes the dialog. The name " "of the button clicked by the user to close the dialog is passed as argument. " "This is only available on macOS." msgstr "" -#: ../../../library/tkinter.messagebox.rst:37 +#: ../../../library/tkinter.messagebox.rst:35 msgid "*default*" msgstr "" -#: ../../../library/tkinter.messagebox.rst:38 +#: ../../../library/tkinter.messagebox.rst:36 msgid "" "Gives the :ref:`symbolic name ` of the default button " "for this message window (:data:`OK`, :data:`CANCEL`, and so on). If this " @@ -71,180 +70,180 @@ msgid "" "default." msgstr "" -#: ../../../library/tkinter.messagebox.rst:43 +#: ../../../library/tkinter.messagebox.rst:41 msgid "*detail*" msgstr "" -#: ../../../library/tkinter.messagebox.rst:44 +#: ../../../library/tkinter.messagebox.rst:42 msgid "" "Specifies an auxiliary message to the main message given by the *message* " "option. The message detail will be presented beneath the main message and, " "where supported by the OS, in a less emphasized font than the main message." msgstr "" -#: ../../../library/tkinter.messagebox.rst:50 +#: ../../../library/tkinter.messagebox.rst:48 msgid "*icon*" msgstr "" -#: ../../../library/tkinter.messagebox.rst:51 +#: ../../../library/tkinter.messagebox.rst:49 msgid "" "Specifies an :ref:`icon ` to display. If this option is " "not specified, then the :data:`INFO` icon will be displayed." msgstr "" -#: ../../../library/tkinter.messagebox.rst:55 +#: ../../../library/tkinter.messagebox.rst:53 msgid "*message*" msgstr "" -#: ../../../library/tkinter.messagebox.rst:56 +#: ../../../library/tkinter.messagebox.rst:54 msgid "" "Specifies the message to display in this message box. The default value is " "an empty string." msgstr "" -#: ../../../library/tkinter.messagebox.rst:59 +#: ../../../library/tkinter.messagebox.rst:57 msgid "*parent*" msgstr "" -#: ../../../library/tkinter.messagebox.rst:60 +#: ../../../library/tkinter.messagebox.rst:58 msgid "" "Makes the specified window the logical parent of the message box. The " "message box is displayed on top of its parent window." msgstr "" -#: ../../../library/tkinter.messagebox.rst:63 +#: ../../../library/tkinter.messagebox.rst:61 msgid "*title*" msgstr "" -#: ../../../library/tkinter.messagebox.rst:64 +#: ../../../library/tkinter.messagebox.rst:62 msgid "" "Specifies a string to display as the title of the message box. This option " "is ignored on macOS, where platform guidelines forbid the use of a title on " "this kind of dialog." msgstr "" -#: ../../../library/tkinter.messagebox.rst:68 +#: ../../../library/tkinter.messagebox.rst:66 msgid "*type*" msgstr "" -#: ../../../library/tkinter.messagebox.rst:69 +#: ../../../library/tkinter.messagebox.rst:67 msgid "" "Arranges for a :ref:`predefined set of buttons ` to be " "displayed." msgstr "" -#: ../../../library/tkinter.messagebox.rst:74 +#: ../../../library/tkinter.messagebox.rst:72 msgid "Tk 8.6 added the *command* option." msgstr "" -#: ../../../library/tkinter.messagebox.rst:78 +#: ../../../library/tkinter.messagebox.rst:76 msgid "" "Display a message window and wait for the user to select one of the buttons. " "Then return the symbolic name of the selected button. Keyword arguments can " "override options specified in the constructor." msgstr "" -#: ../../../library/tkinter.messagebox.rst:82 +#: ../../../library/tkinter.messagebox.rst:80 msgid "**Information message box**" msgstr "" -#: ../../../library/tkinter.messagebox.rst:86 +#: ../../../library/tkinter.messagebox.rst:84 msgid "" "Creates and displays an information message box with the specified title and " "message." msgstr "" -#: ../../../library/tkinter.messagebox.rst:89 +#: ../../../library/tkinter.messagebox.rst:87 msgid "**Warning message boxes**" msgstr "" -#: ../../../library/tkinter.messagebox.rst:93 +#: ../../../library/tkinter.messagebox.rst:91 msgid "" "Creates and displays a warning message box with the specified title and " "message." msgstr "" -#: ../../../library/tkinter.messagebox.rst:98 +#: ../../../library/tkinter.messagebox.rst:96 msgid "" "Creates and displays an error message box with the specified title and " "message." msgstr "" -#: ../../../library/tkinter.messagebox.rst:101 +#: ../../../library/tkinter.messagebox.rst:99 msgid "**Question message boxes**" msgstr "" -#: ../../../library/tkinter.messagebox.rst:105 +#: ../../../library/tkinter.messagebox.rst:103 msgid "" "Ask a question. By default shows buttons :data:`YES` and :data:`NO`. Returns " "the symbolic name of the selected button." msgstr "" -#: ../../../library/tkinter.messagebox.rst:110 +#: ../../../library/tkinter.messagebox.rst:108 msgid "" "Ask if operation should proceed. Shows buttons :data:`OK` and :data:" "`CANCEL`. Returns ``True`` if the answer is ok and ``False`` otherwise." msgstr "" -#: ../../../library/tkinter.messagebox.rst:115 +#: ../../../library/tkinter.messagebox.rst:113 msgid "" "Ask if operation should be retried. Shows buttons :data:`RETRY` and :data:" -"`CANCEL`. Return ``True`` if the answer is yes and ``False`` otherwise." +"`CANCEL`. Return ``True`` if the answer is retry and ``False`` otherwise." msgstr "" -#: ../../../library/tkinter.messagebox.rst:120 +#: ../../../library/tkinter.messagebox.rst:118 msgid "" "Ask a question. Shows buttons :data:`YES` and :data:`NO`. Returns ``True`` " "if the answer is yes and ``False`` otherwise." msgstr "" -#: ../../../library/tkinter.messagebox.rst:125 +#: ../../../library/tkinter.messagebox.rst:123 msgid "" "Ask a question. Shows buttons :data:`YES`, :data:`NO` and :data:`CANCEL`. " "Return ``True`` if the answer is yes, ``None`` if cancelled, and ``False`` " "otherwise." msgstr "" -#: ../../../library/tkinter.messagebox.rst:132 +#: ../../../library/tkinter.messagebox.rst:130 msgid "Symbolic names of buttons:" msgstr "" -#: ../../../library/tkinter.messagebox.rst:151 +#: ../../../library/tkinter.messagebox.rst:149 msgid "Predefined sets of buttons:" msgstr "" -#: ../../../library/tkinter.messagebox.rst:156 +#: ../../../library/tkinter.messagebox.rst:154 msgid "" "Displays three buttons whose symbolic names are :data:`ABORT`, :data:`RETRY` " "and :data:`IGNORE`." msgstr "" -#: ../../../library/tkinter.messagebox.rst:163 +#: ../../../library/tkinter.messagebox.rst:161 msgid "Displays one button whose symbolic name is :data:`OK`." msgstr "" -#: ../../../library/tkinter.messagebox.rst:168 +#: ../../../library/tkinter.messagebox.rst:166 msgid "" "Displays two buttons whose symbolic names are :data:`OK` and :data:`CANCEL`." msgstr "" -#: ../../../library/tkinter.messagebox.rst:174 +#: ../../../library/tkinter.messagebox.rst:172 msgid "" "Displays two buttons whose symbolic names are :data:`RETRY` and :data:" "`CANCEL`." msgstr "" -#: ../../../library/tkinter.messagebox.rst:180 +#: ../../../library/tkinter.messagebox.rst:178 msgid "" "Displays two buttons whose symbolic names are :data:`YES` and :data:`NO`." msgstr "" -#: ../../../library/tkinter.messagebox.rst:186 +#: ../../../library/tkinter.messagebox.rst:184 msgid "" "Displays three buttons whose symbolic names are :data:`YES`, :data:`NO` and :" "data:`CANCEL`." msgstr "" -#: ../../../library/tkinter.messagebox.rst:191 +#: ../../../library/tkinter.messagebox.rst:189 msgid "Icon images:" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/tkinter.pot b/main/locale/pot/LC_MESSAGES/library/tkinter.pot index 45d21a20323..5131f9620ed 100644 --- a/main/locale/pot/LC_MESSAGES/library/tkinter.pot +++ b/main/locale/pot/LC_MESSAGES/library/tkinter.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -65,9 +65,9 @@ msgstr "" #: ../../../library/tkinter.rst:37 msgid "" "Tcl/Tk 8.5 (2007) introduced a modern set of themed user interface " -"components along with a new API to use them. Both old and new APIs are still " -"available. Most documentation you will find online still uses the old API " -"and can be woefully outdated." +"components along with a new API to use them (see :mod:`tkinter.ttk`). Both " +"old and new APIs are still available. Most documentation you will find " +"online still uses the old API and can be woefully outdated." msgstr "" #: ../../../includes/optional-module.rst:1 @@ -78,97 +78,97 @@ msgid "" "module-requirements`." msgstr "" -#: ../../../library/tkinter.rst:46 +#: ../../../library/tkinter.rst:47 msgid "`TkDocs `_" msgstr "" -#: ../../../library/tkinter.rst:47 +#: ../../../library/tkinter.rst:48 msgid "" "Extensive tutorial on creating user interfaces with Tkinter. Explains key " "concepts, and illustrates recommended approaches using the modern API." msgstr "" -#: ../../../library/tkinter.rst:50 +#: ../../../library/tkinter.rst:51 msgid "" "`Tkinter 8.5 reference: a GUI for Python `_" msgstr "" -#: ../../../library/tkinter.rst:51 +#: ../../../library/tkinter.rst:52 msgid "" "Reference documentation for Tkinter 8.5 detailing available classes, " "methods, and options." msgstr "" -#: ../../../library/tkinter.rst:53 +#: ../../../library/tkinter.rst:54 msgid "Tcl/Tk Resources:" msgstr "" -#: ../../../library/tkinter.rst:55 +#: ../../../library/tkinter.rst:56 msgid "`Tk commands `_" msgstr "" -#: ../../../library/tkinter.rst:56 +#: ../../../library/tkinter.rst:57 msgid "" "Comprehensive reference to each of the underlying Tcl/Tk commands used by " "Tkinter." msgstr "" -#: ../../../library/tkinter.rst:58 +#: ../../../library/tkinter.rst:59 msgid "`Tcl/Tk Home Page `_" msgstr "" -#: ../../../library/tkinter.rst:59 +#: ../../../library/tkinter.rst:60 msgid "Additional documentation, and links to Tcl/Tk core development." msgstr "" -#: ../../../library/tkinter.rst:61 +#: ../../../library/tkinter.rst:62 msgid "Books:" msgstr "" -#: ../../../library/tkinter.rst:63 +#: ../../../library/tkinter.rst:64 msgid "" "`Modern Tkinter for Busy Python Developers `_" msgstr "" -#: ../../../library/tkinter.rst:64 +#: ../../../library/tkinter.rst:65 msgid "By Mark Roseman. (ISBN 978-1999149567)" msgstr "" -#: ../../../library/tkinter.rst:66 +#: ../../../library/tkinter.rst:67 msgid "" "`Python GUI programming with Tkinter `_" msgstr "" -#: ../../../library/tkinter.rst:67 +#: ../../../library/tkinter.rst:68 msgid "By Alan D. Moore. (ISBN 978-1788835886)" msgstr "" -#: ../../../library/tkinter.rst:69 +#: ../../../library/tkinter.rst:70 msgid "`Programming Python `_" msgstr "" -#: ../../../library/tkinter.rst:70 +#: ../../../library/tkinter.rst:71 msgid "By Mark Lutz; has excellent coverage of Tkinter. (ISBN 978-0596158101)" msgstr "" -#: ../../../library/tkinter.rst:72 +#: ../../../library/tkinter.rst:73 msgid "" "`Tcl and the Tk Toolkit (2nd edition) `_" msgstr "" -#: ../../../library/tkinter.rst:73 +#: ../../../library/tkinter.rst:74 msgid "" "By John Ousterhout, inventor of Tcl/Tk, and Ken Jones; does not cover " "Tkinter. (ISBN 978-0321336330)" msgstr "" -#: ../../../library/tkinter.rst:77 +#: ../../../library/tkinter.rst:78 msgid "Architecture" msgstr "" -#: ../../../library/tkinter.rst:79 +#: ../../../library/tkinter.rst:80 msgid "" "Tcl/Tk is not a single library but rather consists of a few distinct " "modules, each with separate functionality and its own official " @@ -176,11 +176,11 @@ msgid "" "with it." msgstr "" -#: ../../../library/tkinter.rst:84 +#: ../../../library/tkinter.rst:85 msgid "Tcl" msgstr "" -#: ../../../library/tkinter.rst:85 +#: ../../../library/tkinter.rst:86 msgid "" "Tcl is a dynamic interpreted programming language, just like Python. Though " "it can be used on its own as a general-purpose programming language, it is " @@ -194,11 +194,11 @@ msgid "" "difference (see `Threading model`_ for details)." msgstr "" -#: ../../../library/tkinter.rst:97 ../../../library/tkinter.rst:973 +#: ../../../library/tkinter.rst:98 ../../../library/tkinter.rst:913 msgid "Tk" msgstr "" -#: ../../../library/tkinter.rst:98 +#: ../../../library/tkinter.rst:99 msgid "" "Tk is a `Tcl package `_ implemented in C " "that adds custom commands to create and manipulate GUI widgets. Each :class:" @@ -207,11 +207,11 @@ msgid "" "appearance. Tk uses Tcl's event queue to generate and process GUI events." msgstr "" -#: ../../../library/tkinter.rst:104 +#: ../../../library/tkinter.rst:105 msgid "Ttk" msgstr "" -#: ../../../library/tkinter.rst:105 +#: ../../../library/tkinter.rst:106 msgid "" "Themed Tk (Ttk) is a newer family of Tk widgets that provide a much better " "appearance on different platforms than many of the classic Tk widgets. Ttk " @@ -219,13 +219,13 @@ msgid "" "are provided in a separate module, :mod:`tkinter.ttk`." msgstr "" -#: ../../../library/tkinter.rst:110 +#: ../../../library/tkinter.rst:111 msgid "" "Internally, Tk and Ttk use facilities of the underlying operating system, " "that is, Xlib on Unix/X11, Cocoa on macOS, GDI on Windows." msgstr "" -#: ../../../library/tkinter.rst:113 +#: ../../../library/tkinter.rst:114 msgid "" "When your Python application uses a class in Tkinter, for example, to create " "a widget, the :mod:`!tkinter` module first assembles a Tcl/Tk command " @@ -235,262 +235,120 @@ msgid "" "turn make calls to Xlib, Cocoa, or GDI." msgstr "" -#: ../../../library/tkinter.rst:121 +#: ../../../library/tkinter.rst:122 msgid "Tkinter modules" msgstr "" -#: ../../../library/tkinter.rst:123 +#: ../../../library/tkinter.rst:124 msgid "" "Support for Tkinter is spread across several modules. Most applications will " "need the main :mod:`!tkinter` module, as well as the :mod:`tkinter.ttk` " "module, which provides the modern themed widget set and API::" msgstr "" -#: ../../../library/tkinter.rst:134 -msgid "" -"Construct a toplevel Tk widget, which is usually the main window of an " -"application, and initialize a Tcl interpreter for this widget. Each " -"instance has its own associated Tcl interpreter." -msgstr "" - -#: ../../../library/tkinter.rst:138 -msgid "" -"The :class:`Tk` class is typically instantiated using all default values. " -"However, the following keyword arguments are currently recognized:" -msgstr "" - -#: ../../../library/tkinter.rst:141 -msgid "*screenName*" -msgstr "" - -#: ../../../library/tkinter.rst:142 -msgid "" -"When given (as a string), sets the :envvar:`DISPLAY` environment variable. " -"(X11 only)" -msgstr "" - -#: ../../../library/tkinter.rst:144 -msgid "*baseName*" -msgstr "" - -#: ../../../library/tkinter.rst:145 -msgid "" -"Name of the profile file. By default, *baseName* is derived from the " -"program name (``sys.argv[0]``)." -msgstr "" - -#: ../../../library/tkinter.rst:147 -msgid "*className*" -msgstr "" - -#: ../../../library/tkinter.rst:148 -msgid "" -"Name of the widget class. Used as a profile file and also as the name with " -"which Tcl is invoked (*argv0* in *interp*)." -msgstr "" - -#: ../../../library/tkinter.rst:150 -msgid "*useTk*" -msgstr "" - -#: ../../../library/tkinter.rst:151 -msgid "" -"If ``True``, initialize the Tk subsystem. The :func:`tkinter.Tcl() ` " -"function sets this to ``False``." -msgstr "" - -#: ../../../library/tkinter.rst:153 -msgid "*sync*" -msgstr "" - -#: ../../../library/tkinter.rst:154 -msgid "" -"If ``True``, execute all X server commands synchronously, so that errors are " -"reported immediately. Can be used for debugging. (X11 only)" -msgstr "" - -#: ../../../library/tkinter.rst:156 -msgid "*use*" -msgstr "" - -#: ../../../library/tkinter.rst:157 -msgid "" -"Specifies the *id* of the window in which to embed the application, instead " -"of it being created as an independent toplevel window. *id* must be " -"specified in the same way as the value for the -use option for toplevel " -"widgets (that is, it has a form like that returned by :meth:`~Misc." -"winfo_id`)." -msgstr "" - -#: ../../../library/tkinter.rst:163 -msgid "" -"Note that on some platforms this will only work correctly if *id* refers to " -"a Tk frame or toplevel that has its -container option enabled." -msgstr "" - -#: ../../../library/tkinter.rst:166 -msgid "" -":class:`Tk` reads and interprets profile files, named :file:`.{className}." -"tcl` and :file:`.{baseName}.tcl`, into the Tcl interpreter and calls :func:" -"`exec` on the contents of :file:`.{className}.py` and :file:`.{baseName}." -"py`. The path for the profile files is the :envvar:`HOME` environment " -"variable or, if that isn't defined, then :data:`os.curdir`." -msgstr "" - -#: ../../../library/tkinter.rst:175 -msgid "" -"The Tk application object created by instantiating :class:`Tk`. This " -"provides access to the Tcl interpreter. Each widget that is attached the " -"same instance of :class:`Tk` has the same value for its :attr:`tk` attribute." -msgstr "" - -#: ../../../library/tkinter.rst:182 -msgid "" -"The widget object that contains this widget. For :class:`Tk`, the :attr:`!" -"master` is :const:`None` because it is the main window. The terms *master* " -"and *parent* are similar and sometimes used interchangeably as argument " -"names; however, calling :meth:`~Misc.winfo_parent` returns a string of the " -"widget name whereas :attr:`!master` returns the object. *parent*/*child* " -"reflects the tree-like relationship while *master* (or *container*)/" -"*content* reflects the container structure." -msgstr "" - -#: ../../../library/tkinter.rst:194 -msgid "" -"The immediate descendants of this widget as a :class:`dict` with the child " -"widget names as the keys and the child instance objects as the values." -msgstr "" - -#: ../../../library/tkinter.rst:200 -msgid "" -"Destroy this and all descendant widgets and, for the main window, end the " -"connection to the underlying Tcl interpreter." -msgstr "" - -#: ../../../library/tkinter.rst:205 -msgid "" -"Finish loading and initializing the Tk subsystem. This is needed only when " -"the interpreter was created without Tk (for example through :func:`Tcl`); it " -"is called automatically when *useTk* is true." -msgstr "" - -#: ../../../library/tkinter.rst:212 -msgid "" -"Read and source the user's profile files :file:`.{className}.tcl` and :file:" -"`.{baseName}.tcl` into the Tcl interpreter, and execute the corresponding :" -"file:`.{className}.py` and :file:`.{baseName}.py` files. This is called " -"during initialization; see the description of the constructor above." -msgstr "" - -#: ../../../library/tkinter.rst:220 -msgid "" -"Report a callback exception. This is called when an exception propagates out " -"of a Tkinter callback; *exc*, *val* and *tb* are the exception type, value " -"and traceback as returned by :func:`sys.exc_info`. The default " -"implementation prints a traceback to :data:`sys.stderr`. It can be " -"overridden to customize error handling, for example to display the traceback " -"in a dialog." -msgstr "" - -#: ../../../library/tkinter.rst:231 -msgid "" -"The :func:`Tcl` function is a factory function which creates an object much " -"like that created by the :class:`Tk` class, except that it does not " -"initialize the Tk subsystem. This is most often useful when driving the Tcl " -"interpreter in an environment where one doesn't want to create extraneous " -"toplevel windows, or where one cannot (such as Unix/Linux systems without an " -"X server). An object created by the :func:`Tcl` object can have a Toplevel " -"window created (and the Tk subsystem initialized) by calling its :meth:`~Tk." -"loadtk` method." -msgstr "" - -#: ../../../library/tkinter.rst:242 +#: ../../../library/tkinter.rst:133 msgid "The modules that provide Tk support include:" msgstr "" -#: ../../../library/tkinter.rst:244 +#: ../../../library/tkinter.rst:135 msgid ":mod:`!tkinter`" msgstr "" -#: ../../../library/tkinter.rst:245 +#: ../../../library/tkinter.rst:136 msgid "Main Tkinter module." msgstr "" -#: ../../../library/tkinter.rst:247 +#: ../../../library/tkinter.rst:138 msgid ":mod:`tkinter.colorchooser`" msgstr "" -#: ../../../library/tkinter.rst:248 +#: ../../../library/tkinter.rst:139 msgid "Dialog to let the user choose a color." msgstr "" -#: ../../../library/tkinter.rst:250 +#: ../../../library/tkinter.rst:141 msgid ":mod:`tkinter.commondialog`" msgstr "" -#: ../../../library/tkinter.rst:251 +#: ../../../library/tkinter.rst:142 msgid "Base class for the dialogs defined in the other modules listed here." msgstr "" -#: ../../../library/tkinter.rst:253 +#: ../../../library/tkinter.rst:144 msgid ":mod:`tkinter.filedialog`" msgstr "" -#: ../../../library/tkinter.rst:254 +#: ../../../library/tkinter.rst:145 msgid "Common dialogs to allow the user to specify a file to open or save." msgstr "" -#: ../../../library/tkinter.rst:256 +#: ../../../library/tkinter.rst:147 msgid ":mod:`tkinter.font`" msgstr "" -#: ../../../library/tkinter.rst:257 +#: ../../../library/tkinter.rst:148 msgid "Utilities to help work with fonts." msgstr "" -#: ../../../library/tkinter.rst:259 +#: ../../../library/tkinter.rst:150 +msgid ":mod:`tkinter.fontchooser`" +msgstr "" + +#: ../../../library/tkinter.rst:151 +msgid "Dialog to let the user choose a font." +msgstr "" + +#: ../../../library/tkinter.rst:153 msgid ":mod:`tkinter.messagebox`" msgstr "" -#: ../../../library/tkinter.rst:260 +#: ../../../library/tkinter.rst:154 msgid "Access to standard Tk dialog boxes." msgstr "" -#: ../../../library/tkinter.rst:262 +#: ../../../library/tkinter.rst:156 msgid ":mod:`tkinter.scrolledtext`" msgstr "" -#: ../../../library/tkinter.rst:263 +#: ../../../library/tkinter.rst:157 msgid "Text widget with a vertical scroll bar built in." msgstr "" -#: ../../../library/tkinter.rst:265 +#: ../../../library/tkinter.rst:159 msgid ":mod:`tkinter.simpledialog`" msgstr "" -#: ../../../library/tkinter.rst:266 +#: ../../../library/tkinter.rst:160 msgid "Basic dialogs and convenience functions." msgstr "" -#: ../../../library/tkinter.rst:268 +#: ../../../library/tkinter.rst:162 +msgid ":mod:`tkinter.systray`" +msgstr "" + +#: ../../../library/tkinter.rst:163 +msgid "System tray icon and desktop notifications." +msgstr "" + +#: ../../../library/tkinter.rst:165 msgid ":mod:`tkinter.ttk`" msgstr "" -#: ../../../library/tkinter.rst:269 +#: ../../../library/tkinter.rst:166 msgid "" "Themed widget set introduced in Tk 8.5, providing modern alternatives for " "many of the classic widgets in the main :mod:`!tkinter` module." msgstr "" -#: ../../../library/tkinter.rst:272 +#: ../../../library/tkinter.rst:169 msgid "Additional modules:" msgstr "" -#: ../../../library/tkinter.rst:277 +#: ../../../library/tkinter.rst:174 msgid ":mod:`_tkinter`" msgstr "" -#: ../../../library/tkinter.rst:278 +#: ../../../library/tkinter.rst:175 msgid "" "A binary module that contains the low-level interface to Tcl/Tk. It is " "automatically imported by the main :mod:`!tkinter` module, and should never " @@ -499,50 +357,50 @@ msgid "" "interpreter." msgstr "" -#: ../../../library/tkinter.rst:284 +#: ../../../library/tkinter.rst:181 msgid ":mod:`idlelib`" msgstr "" -#: ../../../library/tkinter.rst:285 +#: ../../../library/tkinter.rst:182 msgid "" "Python's Integrated Development and Learning Environment (IDLE). Based on :" "mod:`!tkinter`." msgstr "" -#: ../../../library/tkinter.rst:288 +#: ../../../library/tkinter.rst:185 msgid ":mod:`!tkinter.constants`" msgstr "" -#: ../../../library/tkinter.rst:289 +#: ../../../library/tkinter.rst:186 msgid "" "Symbolic constants that can be used in place of strings when passing various " "parameters to Tkinter calls. Automatically imported by the main :mod:`!" "tkinter` module." msgstr "" -#: ../../../library/tkinter.rst:293 +#: ../../../library/tkinter.rst:190 msgid ":mod:`tkinter.dnd`" msgstr "" -#: ../../../library/tkinter.rst:294 +#: ../../../library/tkinter.rst:191 msgid "" "(experimental) Drag-and-drop support for :mod:`!tkinter`. This will become " "deprecated when it is replaced with the Tk DND." msgstr "" -#: ../../../library/tkinter.rst:297 +#: ../../../library/tkinter.rst:194 msgid ":mod:`turtle`" msgstr "" -#: ../../../library/tkinter.rst:298 +#: ../../../library/tkinter.rst:195 msgid "Turtle graphics in a Tk window." msgstr "" -#: ../../../library/tkinter.rst:304 +#: ../../../library/tkinter.rst:201 msgid "Tkinter life preserver" msgstr "" -#: ../../../library/tkinter.rst:306 +#: ../../../library/tkinter.rst:203 msgid "" "This section is not designed to be an exhaustive tutorial on either Tk or " "Tkinter. For that, refer to one of the external resources noted earlier. " @@ -551,7 +409,7 @@ msgid "" "how the Tkinter wrapper is structured." msgstr "" -#: ../../../library/tkinter.rst:312 +#: ../../../library/tkinter.rst:209 msgid "" "The remainder of this section will help you to identify the classes, " "methods, and options you'll need in your Tkinter application, and where to " @@ -559,18 +417,18 @@ msgid "" "reference manual." msgstr "" -#: ../../../library/tkinter.rst:319 +#: ../../../library/tkinter.rst:216 msgid "A Hello World program" msgstr "" -#: ../../../library/tkinter.rst:321 +#: ../../../library/tkinter.rst:218 msgid "" "We'll start by walking through a \"Hello World\" application in Tkinter. " "This isn't the smallest one we could write, but has enough to illustrate " "some key concepts you'll need to know." msgstr "" -#: ../../../library/tkinter.rst:337 +#: ../../../library/tkinter.rst:234 msgid "" "After the imports, the next line creates an instance of the :class:`Tk` " "class, which initializes Tk and creates its associated Tcl interpreter. It " @@ -578,56 +436,56 @@ msgid "" "the main window of the application." msgstr "" -#: ../../../library/tkinter.rst:342 +#: ../../../library/tkinter.rst:239 msgid "" "The following line creates a frame widget, which in this case will contain a " "label and a button we'll create next. The frame is fit inside the root " "window." msgstr "" -#: ../../../library/tkinter.rst:346 +#: ../../../library/tkinter.rst:243 msgid "" "The next line creates a label widget holding a static text string. The :meth:" "`~Grid.grid` method is used to specify the relative layout (position) of the " "label within its containing frame widget, similar to how tables in HTML work." msgstr "" -#: ../../../library/tkinter.rst:351 +#: ../../../library/tkinter.rst:248 msgid "" "A button widget is then created, and placed to the right of the label. When " "pressed, it will call the :meth:`~Misc.destroy` method of the root window." msgstr "" -#: ../../../library/tkinter.rst:354 +#: ../../../library/tkinter.rst:251 msgid "" "Finally, the :meth:`mainloop` method puts everything on the display, and " "responds to user input until the program terminates." msgstr "" -#: ../../../library/tkinter.rst:360 +#: ../../../library/tkinter.rst:257 msgid "Important Tk concepts" msgstr "" -#: ../../../library/tkinter.rst:362 +#: ../../../library/tkinter.rst:259 msgid "Even this simple program illustrates the following key Tk concepts:" msgstr "" -#: ../../../library/tkinter.rst:364 +#: ../../../library/tkinter.rst:261 msgid "widgets" msgstr "" -#: ../../../library/tkinter.rst:365 +#: ../../../library/tkinter.rst:262 msgid "" "A Tkinter user interface is made up of individual *widgets*. Each widget is " "represented as a Python object, instantiated from classes like :class:`ttk." "Frame`, :class:`ttk.Label`, and :class:`ttk.Button`." msgstr "" -#: ../../../library/tkinter.rst:369 +#: ../../../library/tkinter.rst:266 msgid "widget hierarchy" msgstr "" -#: ../../../library/tkinter.rst:370 +#: ../../../library/tkinter.rst:267 msgid "" "Widgets are arranged in a *hierarchy*. The label and button were contained " "within a frame, which in turn was contained within the root window. When " @@ -635,44 +493,44 @@ msgid "" "argument to the widget constructor." msgstr "" -#: ../../../library/tkinter.rst:375 +#: ../../../library/tkinter.rst:272 msgid "configuration options" msgstr "" -#: ../../../library/tkinter.rst:376 +#: ../../../library/tkinter.rst:273 msgid "" "Widgets have *configuration options*, which modify their appearance and " "behavior, such as the text to display in a label or button. Different " "classes of widgets will have different sets of options." msgstr "" -#: ../../../library/tkinter.rst:380 +#: ../../../library/tkinter.rst:277 msgid "geometry management" msgstr "" -#: ../../../library/tkinter.rst:381 +#: ../../../library/tkinter.rst:278 msgid "" "Widgets aren't automatically added to the user interface when they are " "created. A *geometry manager* like ``grid`` controls where in the user " "interface they are placed." msgstr "" -#: ../../../library/tkinter.rst:385 +#: ../../../library/tkinter.rst:282 msgid "event loop" msgstr "" -#: ../../../library/tkinter.rst:386 +#: ../../../library/tkinter.rst:283 msgid "" "Tkinter reacts to user input, changes from your program, and even refreshes " "the display only when actively running an *event loop*. If your program " "isn't running the event loop, your user interface won't update." msgstr "" -#: ../../../library/tkinter.rst:392 +#: ../../../library/tkinter.rst:289 msgid "Understanding how Tkinter wraps Tcl/Tk" msgstr "" -#: ../../../library/tkinter.rst:394 +#: ../../../library/tkinter.rst:291 msgid "" "When your application uses Tkinter's classes and methods, internally Tkinter " "is assembling strings representing Tcl/Tk commands, and executing those " @@ -680,7 +538,7 @@ msgid "" "instance." msgstr "" -#: ../../../library/tkinter.rst:399 +#: ../../../library/tkinter.rst:296 msgid "" "Whether it's trying to navigate reference documentation, trying to find the " "right method or option, adapting some existing code, or debugging your " @@ -688,13 +546,13 @@ msgid "" "what those underlying Tcl/Tk commands look like." msgstr "" -#: ../../../library/tkinter.rst:404 +#: ../../../library/tkinter.rst:301 msgid "" "To illustrate, here is the Tcl/Tk equivalent of the main part of the Tkinter " "script above." msgstr "" -#: ../../../library/tkinter.rst:415 +#: ../../../library/tkinter.rst:312 msgid "" "Tcl's syntax is similar to many shell languages, where the first word is the " "command to be executed, with arguments to that command following it, " @@ -702,25 +560,25 @@ msgid "" "following:" msgstr "" -#: ../../../library/tkinter.rst:419 +#: ../../../library/tkinter.rst:316 msgid "" "The commands used to create widgets (like ``ttk::frame``) correspond to " "widget classes in Tkinter." msgstr "" -#: ../../../library/tkinter.rst:422 +#: ../../../library/tkinter.rst:319 msgid "" "Tcl widget options (like ``-text``) correspond to keyword arguments in " "Tkinter." msgstr "" -#: ../../../library/tkinter.rst:425 +#: ../../../library/tkinter.rst:322 msgid "" "Widgets are referred to by a *pathname* in Tcl (like ``.frm.btn``), whereas " "Tkinter doesn't use names but object references." msgstr "" -#: ../../../library/tkinter.rst:428 +#: ../../../library/tkinter.rst:325 msgid "" "A widget's place in the widget hierarchy is encoded in its (hierarchical) " "pathname, which uses a ``.`` (dot) as a path separator. The pathname for the " @@ -728,7 +586,7 @@ msgid "" "pathname but by specifying the parent widget when creating each child widget." msgstr "" -#: ../../../library/tkinter.rst:434 +#: ../../../library/tkinter.rst:331 msgid "" "Operations which are implemented as separate *commands* in Tcl (like " "``grid`` or ``destroy``) are represented as *methods* on Tkinter widget " @@ -737,18 +595,18 @@ msgid "" "Tkinter." msgstr "" -#: ../../../library/tkinter.rst:442 +#: ../../../library/tkinter.rst:339 msgid "How do I...? What option does...?" msgstr "" -#: ../../../library/tkinter.rst:444 +#: ../../../library/tkinter.rst:341 msgid "" "If you're not sure how to do something in Tkinter, and you can't immediately " "find it in the tutorial or reference documentation you're using, there are a " "few strategies that can be helpful." msgstr "" -#: ../../../library/tkinter.rst:448 +#: ../../../library/tkinter.rst:345 msgid "" "First, remember that the details of how individual widgets work may vary " "across different versions of both Tkinter and Tcl/Tk. If you're searching " @@ -756,7 +614,7 @@ msgid "" "installed on your system." msgstr "" -#: ../../../library/tkinter.rst:453 +#: ../../../library/tkinter.rst:350 msgid "" "When searching for how to use an API, it helps to know the exact name of the " "class, option, or method that you're using. Introspection, either in an " @@ -764,7 +622,7 @@ msgid "" "you need." msgstr "" -#: ../../../library/tkinter.rst:458 +#: ../../../library/tkinter.rst:355 msgid "" "To find out what configuration options are available on any widget, call " "its :meth:`~Misc.configure` method, which returns a dictionary containing a " @@ -772,7 +630,7 @@ msgid "" "values. Use :meth:`~Misc.keys` to get just the names of each option." msgstr "" -#: ../../../library/tkinter.rst:468 +#: ../../../library/tkinter.rst:365 msgid "" "As most widgets have many configuration options in common, it can be useful " "to find out which are specific to a particular widget class. Comparing the " @@ -780,7 +638,7 @@ msgid "" "that." msgstr "" -#: ../../../library/tkinter.rst:477 +#: ../../../library/tkinter.rst:374 msgid "" "Similarly, you can find the available methods for a widget object using the " "standard :func:`dir` function. If you try it, you'll see there are over 200 " @@ -788,11 +646,11 @@ msgid "" "is helpful." msgstr "" -#: ../../../library/tkinter.rst:489 +#: ../../../library/tkinter.rst:386 msgid "Navigating the Tcl/Tk reference manual" msgstr "" -#: ../../../library/tkinter.rst:491 +#: ../../../library/tkinter.rst:388 msgid "" "As noted, the official `Tk commands `_ reference manual (man pages) is often the most accurate " @@ -801,7 +659,7 @@ msgid "" "places to look." msgstr "" -#: ../../../library/tkinter.rst:498 +#: ../../../library/tkinter.rst:395 msgid "" "While all operations in Tkinter are implemented as method calls on widget " "objects, you've seen that many Tcl/Tk operations appear as commands that " @@ -809,7 +667,7 @@ msgid "" "parameters, for example" msgstr "" -#: ../../../library/tkinter.rst:508 +#: ../../../library/tkinter.rst:405 msgid "" "Others, however, look more like methods called on a widget object (in fact, " "when you create a widget in Tcl/Tk, it creates a Tcl command with the name " @@ -817,7 +675,7 @@ msgid "" "name of a method to call)." msgstr "" -#: ../../../library/tkinter.rst:519 +#: ../../../library/tkinter.rst:416 msgid "" "In the official Tcl/Tk reference documentation, you'll find most operations " "that look like method calls on the man page for a specific widget (for " @@ -828,7 +686,7 @@ msgid "" "TkCmd/grid.html>`_)." msgstr "" -#: ../../../library/tkinter.rst:527 +#: ../../../library/tkinter.rst:424 msgid "" "You'll find many common options and methods in the `options `_ or `ttk::widget `_ man page." msgstr "" -#: ../../../library/tkinter.rst:539 +#: ../../../library/tkinter.rst:436 msgid "" "Somewhat confusingly, there are also methods on all Tkinter widgets that " "don't actually operate on the widget, but operate at a global scope, " @@ -853,18 +711,18 @@ msgid "" "class:`Widget` class that all Tkinter widgets inherit from)." msgstr "" -#: ../../../library/tkinter.rst:548 +#: ../../../library/tkinter.rst:445 msgid "Threading model" msgstr "" -#: ../../../library/tkinter.rst:550 +#: ../../../library/tkinter.rst:447 msgid "" "Python and Tcl/Tk have very different threading models, which :mod:`!" "tkinter` tries to bridge. If you use threads, you may need to be aware of " "this." msgstr "" -#: ../../../library/tkinter.rst:553 +#: ../../../library/tkinter.rst:450 msgid "" "A Python interpreter may have many threads associated with it. In Tcl, " "multiple threads can be created, but each thread has a separate Tcl " @@ -873,7 +731,7 @@ msgid "" "by the one thread that created it." msgstr "" -#: ../../../library/tkinter.rst:558 +#: ../../../library/tkinter.rst:455 msgid "" "Each :class:`Tk` object created by :mod:`!tkinter` contains a Tcl " "interpreter. It also keeps track of which thread created that interpreter. " @@ -883,7 +741,7 @@ msgid "" "executed, the result is returned to the calling Python thread." msgstr "" -#: ../../../library/tkinter.rst:565 +#: ../../../library/tkinter.rst:462 msgid "" "Tcl/Tk applications are normally event-driven, meaning that after " "initialization, the interpreter runs an event loop (that is, :meth:`Tk." @@ -896,18 +754,18 @@ msgid "" "from all application code including event handlers." msgstr "" -#: ../../../library/tkinter.rst:576 +#: ../../../library/tkinter.rst:473 msgid "" "If the Tcl interpreter is not running the event loop and processing events, " "any :mod:`!tkinter` calls made from threads other than the one running the " "Tcl interpreter will fail." msgstr "" -#: ../../../library/tkinter.rst:580 +#: ../../../library/tkinter.rst:477 msgid "A number of special cases exist:" msgstr "" -#: ../../../library/tkinter.rst:582 +#: ../../../library/tkinter.rst:479 msgid "" "Tcl/Tk libraries built without thread support are now rare: Tcl/Tk 9.0 (the " "bundled version) is always thread-aware, so this case only arises with some " @@ -917,7 +775,7 @@ msgid "" "ensures only one call occurs at a time." msgstr "" -#: ../../../library/tkinter.rst:589 +#: ../../../library/tkinter.rst:486 msgid "" "While :mod:`!tkinter` allows you to create more than one instance of a :" "class:`Tk` object (with its own interpreter), all interpreters that are part " @@ -927,7 +785,7 @@ msgid "" "running a thread-aware Tcl/Tk build." msgstr "" -#: ../../../library/tkinter.rst:595 +#: ../../../library/tkinter.rst:492 msgid "" "Blocking event handlers are not the only way to prevent the Tcl interpreter " "from reentering the event loop. It is even possible to run multiple nested " @@ -935,47 +793,57 @@ msgid "" "tricky when it comes to events or threads, be aware of these possibilities." msgstr "" -#: ../../../library/tkinter.rst:600 +#: ../../../library/tkinter.rst:497 msgid "" "There are a few select :mod:`!tkinter` functions that presently work only " "when called from the thread that created the Tcl interpreter." msgstr "" -#: ../../../library/tkinter.rst:605 +#: ../../../library/tkinter.rst:502 msgid "Handy reference" msgstr "" -#: ../../../library/tkinter.rst:611 +#: ../../../library/tkinter.rst:508 msgid "Setting options" msgstr "" -#: ../../../library/tkinter.rst:613 +#: ../../../library/tkinter.rst:510 msgid "" "Options control things like the color and border width of a widget. Options " "can be set in three ways:" msgstr "" -#: ../../../library/tkinter.rst:616 +#: ../../../library/tkinter.rst:513 msgid "At object creation time, using keyword arguments" msgstr "" -#: ../../../library/tkinter.rst:621 +#: ../../../library/tkinter.rst:518 msgid "After object creation, treating the option name like a dictionary index" msgstr "" -#: ../../../library/tkinter.rst:627 +#: ../../../library/tkinter.rst:524 msgid "" "Use the config() method to update multiple attrs subsequent to object " "creation" msgstr "" -#: ../../../library/tkinter.rst:632 +#: ../../../library/tkinter.rst:531 +msgid "" +"The ``fg`` and ``bg`` options used here, and other options that control a " +"widget's appearance, belong to the classic :mod:`!tkinter` widgets. The " +"themed :mod:`tkinter.ttk` widgets recommended in the introduction do not " +"accept them; style a themed widget through the :class:`ttk.Style ` class instead. The three ways of setting an option shown above " +"apply to both widget sets." +msgstr "" + +#: ../../../library/tkinter.rst:540 msgid "" "For a complete explanation of a given option and its behavior, see the Tk " "man pages for the widget in question." msgstr "" -#: ../../../library/tkinter.rst:635 +#: ../../../library/tkinter.rst:543 msgid "" "Note that the man pages list \"STANDARD OPTIONS\" and \"WIDGET SPECIFIC " "OPTIONS\" for each widget. The former is a list of options that are common " @@ -984,7 +852,7 @@ msgid "" "`options(3)` man page." msgstr "" -#: ../../../library/tkinter.rst:641 +#: ../../../library/tkinter.rst:549 msgid "" "No distinction between standard and widget-specific options is made in this " "document. Some options don't apply to some kinds of widgets. Whether a " @@ -992,7 +860,7 @@ msgid "" "widget; buttons have a ``command`` option, labels do not." msgstr "" -#: ../../../library/tkinter.rst:646 +#: ../../../library/tkinter.rst:554 msgid "" "The options supported by a given widget are listed in that widget's man " "page, or can be queried at runtime by calling the :meth:`~Misc.config` " @@ -1002,278 +870,271 @@ msgid "" "values are 5-tuples." msgstr "" -#: ../../../library/tkinter.rst:652 +#: ../../../library/tkinter.rst:560 msgid "" -"Some options, like ``bg`` are synonyms for common options with long names " -"(``bg`` is shorthand for \"background\"). Passing the ``config()`` method " -"the name of a shorthand option will return a 2-tuple, not 5-tuple. The 2-" -"tuple passed back will contain the name of the synonym and the \"real\" " -"option (such as ``('bg', 'background')``)." +"Some options, like ``bg``, are synonyms for common options with long names " +"(``bg`` is shorthand for \"background\")." msgstr "" -#: ../../../library/tkinter.rst:659 +#: ../../../library/tkinter.rst:564 msgid "Index" msgstr "" -#: ../../../library/tkinter.rst:659 +#: ../../../library/tkinter.rst:564 msgid "Meaning" msgstr "" -#: ../../../library/tkinter.rst:659 +#: ../../../library/tkinter.rst:564 msgid "Example" msgstr "" -#: ../../../library/tkinter.rst:661 +#: ../../../library/tkinter.rst:566 msgid "0" msgstr "" -#: ../../../library/tkinter.rst:661 +#: ../../../library/tkinter.rst:566 msgid "option name" msgstr "" -#: ../../../library/tkinter.rst:661 ../../../library/tkinter.rst:663 +#: ../../../library/tkinter.rst:566 ../../../library/tkinter.rst:568 msgid "``'relief'``" msgstr "" -#: ../../../library/tkinter.rst:663 +#: ../../../library/tkinter.rst:568 msgid "1" msgstr "" -#: ../../../library/tkinter.rst:663 +#: ../../../library/tkinter.rst:568 msgid "option name for database lookup" msgstr "" -#: ../../../library/tkinter.rst:665 +#: ../../../library/tkinter.rst:570 msgid "2" msgstr "" -#: ../../../library/tkinter.rst:665 +#: ../../../library/tkinter.rst:570 msgid "option class for database lookup" msgstr "" -#: ../../../library/tkinter.rst:665 +#: ../../../library/tkinter.rst:570 msgid "``'Relief'``" msgstr "" -#: ../../../library/tkinter.rst:668 +#: ../../../library/tkinter.rst:573 msgid "3" msgstr "" -#: ../../../library/tkinter.rst:668 +#: ../../../library/tkinter.rst:573 msgid "default value" msgstr "" -#: ../../../library/tkinter.rst:668 +#: ../../../library/tkinter.rst:573 msgid "``'raised'``" msgstr "" -#: ../../../library/tkinter.rst:670 +#: ../../../library/tkinter.rst:575 msgid "4" msgstr "" -#: ../../../library/tkinter.rst:670 +#: ../../../library/tkinter.rst:575 msgid "current value" msgstr "" -#: ../../../library/tkinter.rst:670 +#: ../../../library/tkinter.rst:575 msgid "``'groove'``" msgstr "" -#: ../../../library/tkinter.rst:673 +#: ../../../library/tkinter.rst:578 msgid "Example::" msgstr "" -#: ../../../library/tkinter.rst:678 +#: ../../../library/tkinter.rst:583 msgid "" "Of course, the dictionary printed will include all the options available and " "their values. This is meant only as an example." msgstr "" -#: ../../../library/tkinter.rst:685 -msgid "The packer" +#: ../../../library/tkinter.rst:593 +msgid "Geometry management" msgstr "" -#: ../../../library/tkinter.rst:689 +#: ../../../library/tkinter.rst:599 msgid "" -"The packer is one of Tk's geometry-management mechanisms. Geometry " -"managers are used to specify the relative positioning of widgets within " -"their container. In contrast to the more cumbersome *placer* (which is used " -"less commonly, and we do not cover here), the packer takes qualitative " -"relationship specification - *above*, *to the left of*, *filling*, etc - and " -"works everything out to determine the exact placement coordinates for you." +"Creating a widget does not display it. A widget appears only after it has " +"been handed to a *geometry manager*, which works out its size and position " +"inside its container and keeps the layout up to date as the container is " +"resized or its content changes. Forgetting to call a geometry manager is a " +"common early mistake: the widget is created, but nothing shows up." msgstr "" -#: ../../../library/tkinter.rst:696 +#: ../../../library/tkinter.rst:606 msgid "" -"The size of any container widget is determined by the size of the \"content " -"widgets\" inside. The packer is used to control where content widgets " -"appear inside the container into which they are packed. You can pack " -"widgets into frames, and frames into other frames, in order to achieve the " -"kind of layout you desire. Additionally, the arrangement is dynamically " -"adjusted to accommodate incremental changes to the configuration, once it is " -"packed." +"Tk provides three geometry managers. Each is inherited by every widget, so " +"any widget can be managed by any of them (but see the warning below about " +"the incompatibility of grid and pack). The choice depends on the kind of " +"layout you want." msgstr "" -#: ../../../library/tkinter.rst:703 -msgid "" -"Note that widgets do not appear until they have had their geometry specified " -"with a geometry manager. It's a common early mistake to leave out the " -"geometry specification, and then be surprised when the widget is created but " -"nothing appears. A widget will appear only after it has had, for example, " -"the packer's :meth:`~Pack.pack` method applied to it." +#: ../../../library/tkinter.rst:611 +msgid ":meth:`grid `" msgstr "" -#: ../../../library/tkinter.rst:710 +#: ../../../library/tkinter.rst:612 msgid "" -"The pack() method can be called with keyword-option/value pairs that control " -"where the widget is to appear within its container, and how it is to behave " -"when the main application window is resized. Here are some examples::" +"Arranges widgets in a two-dimensional table of rows and columns. It is the " +"most flexible manager and the one to reach for by default: layouts that " +"would otherwise need several nested frames can often be expressed as a " +"single grid, and rows and columns can be told how to absorb extra space." msgstr "" -#: ../../../library/tkinter.rst:720 -msgid "Packer options" +#: ../../../library/tkinter.rst:624 +msgid ":meth:`pack `" msgstr "" -#: ../../../library/tkinter.rst:722 +#: ../../../library/tkinter.rst:625 msgid "" -"For more extensive information on the packer and the options that it can " -"take, see the man pages and page 183 of John Ousterhout's book." +"Stacks widgets against one side of their container -- ``\"top\"`` (the " +"default), ``\"bottom\"``, ``\"left\"`` or ``\"right\"`` -- and can make them " +"fill or expand into the space that is left. It is convenient for simple " +"arrangements, such as a single row or column of widgets or a content area " +"framed by a toolbar and a status bar." msgstr "" -#: ../../../library/tkinter.rst:725 ../../../library/tkinter.rst:852 -msgid "anchor" +#: ../../../library/tkinter.rst:638 +msgid ":meth:`place `" msgstr "" -#: ../../../library/tkinter.rst:726 +#: ../../../library/tkinter.rst:639 msgid "" -"Anchor type. Denotes where the packer is to place each content in its " -"parcel." -msgstr "" - -#: ../../../library/tkinter.rst:728 -msgid "expand" -msgstr "" - -#: ../../../library/tkinter.rst:729 -msgid "boolean, ``0`` or ``1``." -msgstr "" - -#: ../../../library/tkinter.rst:731 -msgid "fill" -msgstr "" - -#: ../../../library/tkinter.rst:732 -msgid "Legal values: ``'x'``, ``'y'``, ``'both'``, ``'none'``." -msgstr "" - -#: ../../../library/tkinter.rst:734 -msgid "ipadx and ipady" -msgstr "" - -#: ../../../library/tkinter.rst:735 -msgid "A distance - designating internal padding on each side of the content." +"Positions each widget at an explicit spot, given either as absolute screen " +"distances or as a fraction of the container's size. It offers the most " +"control but the least automatic behavior, and is used the least; it suits " +"special cases such as overlapping widgets or precise custom layouts." msgstr "" -#: ../../../library/tkinter.rst:737 -msgid "padx and pady" +#: ../../../library/tkinter.rst:649 +msgid "" +"Layouts are built up by nesting: grid or pack widgets, including frames, " +"inside a frame or toplevel. Toplevels are managed by the OS window manager. " +"Classic and themed :mod:`tkinter.ttk` widgets can be managed interchangeably." msgstr "" -#: ../../../library/tkinter.rst:738 -msgid "A distance - designating external padding on each side of the content." +#: ../../../library/tkinter.rst:656 +msgid "" +"Do not apply :meth:`!pack` and :meth:`!grid` to two widgets that share the " +"same container. The two managers negotiate sizes in incompatible ways, and " +"the application can hang as they repeatedly resize the container against " +"each other. To combine them, keep each manager's widgets in a separate frame." msgstr "" -#: ../../../library/tkinter.rst:740 -msgid "side" +#: ../../../library/tkinter.rst:661 +msgid "" +"The full set of options accepted by each manager, with their values and " +"defaults, is documented under :meth:`Grid.grid_configure`, :meth:`Pack." +"pack_configure` and :meth:`Place.place_configure`; see also the :manpage:" +"`grid(3tk)`, :manpage:`pack(3tk)` and :manpage:`place(3tk)` man pages." msgstr "" -#: ../../../library/tkinter.rst:741 -msgid "Legal values are: ``'left'``, ``'right'``, ``'top'``, ``'bottom'``." +#: ../../../library/tkinter.rst:671 +msgid "Coupling widget variables" msgstr "" -#: ../../../library/tkinter.rst:747 -msgid "Coupling widget variables" +#: ../../../library/tkinter.rst:673 +msgid "" +"Some widgets can tie their current value directly to a program variable, so " +"that the two stay in sync. Options such as ``variable``, ``textvariable``, " +"``value``, ``onvalue`` and ``offvalue`` set up this connection: when the " +"user changes the widget the variable is updated, and when the variable is " +"set the widget redraws to match." msgstr "" -#: ../../../library/tkinter.rst:749 +#: ../../../library/tkinter.rst:680 msgid "" -"The current-value setting of some widgets (like text entry widgets) can be " -"connected directly to application variables by using special options. These " -"options are ``variable``, ``textvariable``, ``onvalue``, ``offvalue``, and " -"``value``. This connection works both ways: if the variable changes for any " -"reason, the widget it's connected to will be updated to reflect the new " -"value." +"A widget can be linked only to a :class:`Variable` object, not to an " +"ordinary Python variable. This is not a limitation of :mod:`!tkinter` but a " +"consequence of how the two languages differ: the link relies on Tcl being " +"notified every time the value changes, and Python offers no way to react " +"when a plain variable is reassigned. A :class:`Variable` sidesteps this by " +"keeping its value inside the Tcl interpreter and exposing it through " +"explicit :meth:`~Variable.get` and :meth:`~Variable.set` methods." msgstr "" -#: ../../../library/tkinter.rst:755 +#: ../../../library/tkinter.rst:689 msgid "" -"Unfortunately, in the current implementation of :mod:`!tkinter` it is not " -"possible to hand over an arbitrary Python variable to a widget through a " -"``variable`` or ``textvariable`` option. The only kinds of variables for " -"which this works are variables that are subclassed from a class called " -"Variable, defined in :mod:`!tkinter`." +"Ready-made subclasses cover the common types: :class:`StringVar`, :class:" +"`IntVar`, :class:`DoubleVar` and :class:`BooleanVar`. Pass one as a widget's " +"``textvariable`` (or ``variable``) option, then read and update it with :" +"meth:`~Variable.get` and :meth:`~Variable.set`; the widget tracks it with no " +"further work on your part." msgstr "" -#: ../../../library/tkinter.rst:761 +#: ../../../library/tkinter.rst:695 msgid "" -"There are many useful subclasses of Variable already defined: :class:" -"`StringVar`, :class:`IntVar`, :class:`DoubleVar`, and :class:`BooleanVar`. " -"To read the current value of such a variable, call the :meth:`~Variable.get` " -"method on it, and to change its value you call the :meth:`!set` method. If " -"you follow this protocol, the widget will always track the value of the " -"variable, with no further intervention on your part." +"Keep a reference to the variable for as long as the widget uses it -- for " +"example by storing it as an attribute. A :class:`Variable` that is garbage " +"collected removes its underlying Tcl variable, breaking the connection to " +"the widget (see :class:`Variable`)." msgstr "" -#: ../../../library/tkinter.rst:769 ../../../library/tkinter.rst:960 +#: ../../../library/tkinter.rst:700 ../../../library/tkinter.rst:750 +#: ../../../library/tkinter.rst:900 msgid "For example::" msgstr "" -#: ../../../library/tkinter.rst:802 +#: ../../../library/tkinter.rst:732 msgid "The window manager" msgstr "" -#: ../../../library/tkinter.rst:806 +#: ../../../library/tkinter.rst:736 msgid "" -"In Tk, there is a utility command, ``wm``, for interacting with the window " -"manager. Options to the ``wm`` command allow you to control things like " -"titles, placement, icon bitmaps, and the like. In :mod:`!tkinter`, these " -"commands have been implemented as methods on the :class:`Wm` class. " -"Toplevel widgets are subclassed from the :class:`Wm` class, and so can call " -"the :class:`Wm` methods directly." +"The *window manager* is the part of the desktop responsible for the title " +"bar, border and controls drawn around each top-level window, and for such " +"things as its title, position, size and icon. Tk gives access to these " +"through the :class:`Wm` mixin, which is inherited by the :class:`Tk` root " +"window and by every :class:`Toplevel`. You therefore call the window-manager " +"methods directly on a top-level window. Each has a short name and an " +"equivalent ``wm_``-prefixed name, for example :meth:`~Wm.title` and :meth:" +"`~Wm.wm_title`." msgstr "" -#: ../../../library/tkinter.rst:813 +#: ../../../library/tkinter.rst:745 msgid "" -"To get at the toplevel window that contains a given widget, you can often " -"just refer to the widget's :attr:`~Tk.master`. Of course if the widget has " -"been packed inside of a frame, the :attr:`!master` won't represent a " -"toplevel window. To get at the toplevel window that contains an arbitrary " -"widget, you can call the :meth:`~Misc.winfo_toplevel` method. There is also " -"a :meth:`!_root` method; it begins with an underscore to denote the fact " -"that this function is part of the implementation, and not an interface to Tk " -"functionality. It returns the application's root window rather than the " -"nearest enclosing toplevel." +"These methods act on the top-level window whether its content is built from " +"the classic widgets or the themed :mod:`tkinter.ttk` widgets. To reach the " +"top-level window containing an arbitrary widget, call its :meth:`~Misc." +"winfo_toplevel` method." msgstr "" -#: ../../../library/tkinter.rst:825 -msgid "Here are some examples of typical usage::" +#: ../../../library/tkinter.rst:764 +msgid "See :class:`Wm` for the full set of window-manager methods." msgstr "" -#: ../../../library/tkinter.rst:848 +#: ../../../library/tkinter.rst:770 msgid "Tk option data types" msgstr "" -#: ../../../library/tkinter.rst:853 +#: ../../../library/tkinter.rst:774 +msgid "" +"Many widget options documented in the reference accept values of a small " +"number of common types, described here." +msgstr "" + +#: ../../../library/tkinter.rst:777 +msgid "anchor" +msgstr "" + +#: ../../../library/tkinter.rst:778 msgid "" "Legal values are points of the compass: ``\"n\"``, ``\"ne\"``, ``\"e\"``, " "``\"se\"``, ``\"s\"``, ``\"sw\"``, ``\"w\"``, ``\"nw\"``, and also " "``\"center\"``." msgstr "" -#: ../../../library/tkinter.rst:856 +#: ../../../library/tkinter.rst:781 msgid "bitmap" msgstr "" -#: ../../../library/tkinter.rst:857 +#: ../../../library/tkinter.rst:782 msgid "" "There are ten built-in, named bitmaps: ``'error'``, ``'gray12'``, " "``'gray25'``, ``'gray50'``, ``'gray75'``, ``'hourglass'``, ``'info'``, " @@ -1282,52 +1143,58 @@ msgid "" "``\"@/usr/contrib/bitmap/gumby.bit\"``." msgstr "" -#: ../../../library/tkinter.rst:863 +#: ../../../library/tkinter.rst:788 msgid "boolean" msgstr "" -#: ../../../library/tkinter.rst:864 +#: ../../../library/tkinter.rst:789 msgid "You can pass integers 0 or 1 or the strings ``\"yes\"`` or ``\"no\"``." msgstr "" -#: ../../../library/tkinter.rst:866 +#: ../../../library/tkinter.rst:791 msgid "callback" msgstr "" -#: ../../../library/tkinter.rst:867 +#: ../../../library/tkinter.rst:792 msgid "This is any Python function that takes no arguments. For example::" msgstr "" -#: ../../../library/tkinter.rst:873 +#: ../../../library/tkinter.rst:798 msgid "color" msgstr "" -#: ../../../library/tkinter.rst:874 +#: ../../../library/tkinter.rst:799 msgid "" "Colors can be given as the names of X colors in the rgb.txt file, or as " "strings representing RGB values in 4 bit: ``\"#RGB\"``, 8 bit: " "``\"#RRGGBB\"``, 12 bit: ``\"#RRRGGGBBB\"``, or 16 bit: " "``\"#RRRRGGGGBBBB\"`` ranges, where R,G,B here represent any legal hex " -"digit. See page 160 of Ousterhout's book for details." +"digit. See the :manpage:`colors(3tk)` man page for the list of named colors." msgstr "" -#: ../../../library/tkinter.rst:879 +#: ../../../library/tkinter.rst:805 msgid "cursor" msgstr "" -#: ../../../library/tkinter.rst:880 +#: ../../../library/tkinter.rst:806 msgid "" -"The standard X cursor names from :file:`cursorfont.h` can be used, without " -"the ``XC_`` prefix. For example to get a hand cursor (``XC_hand2``), use " -"the string ``\"hand2\"``. You can also specify a bitmap and mask file of " -"your own. See page 179 of Ousterhout's book." +"The name of the mouse cursor to display while the pointer is over the " +"widget. Tk provides a portable set of cursor names available on all " +"platforms (for example ``\"arrow\"``, ``\"watch\"``, ``\"cross\"``, or " +"``\"hand2\"``); the standard X cursor names from :file:`cursorfont.h` may " +"also be used, without the ``XC_`` prefix (so ``XC_hand2`` becomes " +"``\"hand2\"``). The full list of names, including the platform-specific " +"ones, is given in the :manpage:`cursors(3tk)` manual page. You can also " +"specify a bitmap and mask file of your own. On Windows a cursor file (:file:" +"`.cur` or :file:`.ani`) may be used directly, giving its path preceded with " +"an ``@``, as in ``\"@C:/cursors/bart.ani\"``." msgstr "" -#: ../../../library/tkinter.rst:885 +#: ../../../library/tkinter.rst:817 msgid "distance" msgstr "" -#: ../../../library/tkinter.rst:886 +#: ../../../library/tkinter.rst:818 msgid "" "Screen distances can be specified in either pixels or absolute distances. " "Pixels are given as numbers and absolute distances as strings, with the " @@ -1336,11 +1203,25 @@ msgid "" "is expressed as ``\"3.5i\"``." msgstr "" -#: ../../../library/tkinter.rst:892 +#: ../../../library/tkinter.rst:824 +msgid "" +"When a screen distance option is read back (for example with :meth:`!cget`), " +"a distance with no unit suffix is returned as an :class:`int` or a :class:" +"`float`. A distance with a unit suffix depends on the screen resolution and " +"is returned as an opaque Tcl object that can be passed back to Tk." +msgstr "" + +#: ../../../library/tkinter.rst:829 +msgid "" +"Screen distances with no unit suffix are returned as an :class:`int` or a :" +"class:`float`." +msgstr "" + +#: ../../../library/tkinter.rst:833 msgid "font" msgstr "" -#: ../../../library/tkinter.rst:893 +#: ../../../library/tkinter.rst:834 msgid "" "Tk uses a font description such as ``{courier 10 bold}``; in :mod:`!tkinter` " "this is most naturally passed as a tuple of ``(family, size, *styles)`` (or " @@ -1349,112 +1230,111 @@ msgid "" "pixels." msgstr "" -#: ../../../library/tkinter.rst:899 +#: ../../../library/tkinter.rst:840 msgid "geometry" msgstr "" -#: ../../../library/tkinter.rst:900 +#: ../../../library/tkinter.rst:841 msgid "" "This is a string of the form ``widthxheight``, where width and height are " "measured in pixels for most widgets (in characters for widgets displaying " "text). For example: ``fred[\"geometry\"] = \"200x100\"``." msgstr "" -#: ../../../library/tkinter.rst:904 +#: ../../../library/tkinter.rst:845 msgid "justify" msgstr "" -#: ../../../library/tkinter.rst:905 +#: ../../../library/tkinter.rst:846 msgid "" "Legal values are the strings: ``\"left\"``, ``\"center\"``, and " "``\"right\"``." msgstr "" -#: ../../../library/tkinter.rst:907 +#: ../../../library/tkinter.rst:848 msgid "region" msgstr "" -#: ../../../library/tkinter.rst:908 +#: ../../../library/tkinter.rst:849 msgid "" "This is a string with four space-delimited elements, each of which is a " "legal distance (see above). For example: ``\"2 3 4 5\"`` and ``\"3i 2i 4.5i " "2i\"`` and ``\"3c 2c 4c 10.43c\"`` are all legal regions." msgstr "" -#: ../../../library/tkinter.rst:912 +#: ../../../library/tkinter.rst:853 msgid "relief" msgstr "" -#: ../../../library/tkinter.rst:913 +#: ../../../library/tkinter.rst:854 msgid "" "Determines what the border style of a widget will be. Legal values are: " "``\"raised\"``, ``\"sunken\"``, ``\"flat\"``, ``\"groove\"``, ``\"ridge\"``, " "and ``\"solid\"``." msgstr "" -#: ../../../library/tkinter.rst:917 +#: ../../../library/tkinter.rst:858 msgid "scrollcommand" msgstr "" -#: ../../../library/tkinter.rst:918 +#: ../../../library/tkinter.rst:859 msgid "" "This is almost always the :meth:`!set` method of some scrollbar widget, but " "can be any widget method that takes a single argument." msgstr "" -#: ../../../library/tkinter.rst:921 +#: ../../../library/tkinter.rst:862 msgid "wrap" msgstr "" -#: ../../../library/tkinter.rst:922 +#: ../../../library/tkinter.rst:863 msgid "Must be one of: ``\"none\"``, ``\"char\"``, or ``\"word\"``." msgstr "" -#: ../../../library/tkinter.rst:927 +#: ../../../library/tkinter.rst:868 msgid "Bindings and events" msgstr "" -#: ../../../library/tkinter.rst:933 +#: ../../../library/tkinter.rst:874 msgid "" "The bind method from the widget command allows you to watch for certain " "events and to have a callback function trigger when that event type occurs. " "The form of the bind method is::" msgstr "" -#: ../../../library/tkinter.rst:939 +#: ../../../library/tkinter.rst:880 msgid "where:" msgstr "" -#: ../../../library/tkinter.rst:941 +#: ../../../library/tkinter.rst:882 msgid "sequence" msgstr "" -#: ../../../library/tkinter.rst:942 +#: ../../../library/tkinter.rst:883 msgid "" "is a string that denotes the target kind of event. Physical events use the " "```` form (for example ``\"\"`` or " "``\"\"``); application-defined virtual events use double " "angle brackets, as in ``\"<>\"``. (See the :manpage:`bind(3tk)` man " -"page, and page 201 of John Ousterhout's book, :title-reference:`Tcl and the " -"Tk Toolkit (2nd edition)`, for details)." +"page for details.)" msgstr "" -#: ../../../library/tkinter.rst:949 +#: ../../../library/tkinter.rst:889 msgid "func" msgstr "" -#: ../../../library/tkinter.rst:950 +#: ../../../library/tkinter.rst:890 msgid "" "is a Python function, taking one argument, to be invoked when the event " "occurs. An Event instance will be passed as the argument. (Functions " "deployed this way are commonly known as *callbacks*.)" msgstr "" -#: ../../../library/tkinter.rst:954 +#: ../../../library/tkinter.rst:894 msgid "add" msgstr "" -#: ../../../library/tkinter.rst:955 +#: ../../../library/tkinter.rst:895 msgid "" "is optional, either ``''`` or ``'+'``. Passing an empty string denotes that " "this binding is to replace any other bindings that this event is associated " @@ -1462,7 +1342,7 @@ msgid "" "of functions bound to this event type." msgstr "" -#: ../../../library/tkinter.rst:967 +#: ../../../library/tkinter.rst:907 msgid "" "Notice how the widget field of the event is being accessed in the " "``turn_red()`` callback. This field contains the widget that caught the X " @@ -1471,241 +1351,296 @@ msgid "" "pages." msgstr "" -#: ../../../library/tkinter.rst:973 +#: ../../../library/tkinter.rst:913 msgid "Tkinter Event Field" msgstr "" -#: ../../../library/tkinter.rst:975 +#: ../../../library/tkinter.rst:915 msgid "%f" msgstr "" -#: ../../../library/tkinter.rst:975 +#: ../../../library/tkinter.rst:915 msgid "focus" msgstr "" -#: ../../../library/tkinter.rst:975 +#: ../../../library/tkinter.rst:915 msgid "%A" msgstr "" -#: ../../../library/tkinter.rst:975 +#: ../../../library/tkinter.rst:915 msgid "char" msgstr "" -#: ../../../library/tkinter.rst:977 +#: ../../../library/tkinter.rst:917 msgid "%h" msgstr "" -#: ../../../library/tkinter.rst:977 +#: ../../../library/tkinter.rst:917 msgid "height" msgstr "" -#: ../../../library/tkinter.rst:977 +#: ../../../library/tkinter.rst:917 msgid "%E" msgstr "" -#: ../../../library/tkinter.rst:977 +#: ../../../library/tkinter.rst:917 msgid "send_event" msgstr "" -#: ../../../library/tkinter.rst:979 +#: ../../../library/tkinter.rst:919 msgid "%k" msgstr "" -#: ../../../library/tkinter.rst:979 +#: ../../../library/tkinter.rst:919 msgid "keycode" msgstr "" -#: ../../../library/tkinter.rst:979 +#: ../../../library/tkinter.rst:919 msgid "%K" msgstr "" -#: ../../../library/tkinter.rst:979 +#: ../../../library/tkinter.rst:919 msgid "keysym" msgstr "" -#: ../../../library/tkinter.rst:981 +#: ../../../library/tkinter.rst:921 msgid "%s" msgstr "" -#: ../../../library/tkinter.rst:981 +#: ../../../library/tkinter.rst:921 msgid "state" msgstr "" -#: ../../../library/tkinter.rst:981 +#: ../../../library/tkinter.rst:921 msgid "%N" msgstr "" -#: ../../../library/tkinter.rst:981 +#: ../../../library/tkinter.rst:921 msgid "keysym_num" msgstr "" -#: ../../../library/tkinter.rst:983 +#: ../../../library/tkinter.rst:923 msgid "%t" msgstr "" -#: ../../../library/tkinter.rst:983 +#: ../../../library/tkinter.rst:923 msgid "time" msgstr "" -#: ../../../library/tkinter.rst:983 +#: ../../../library/tkinter.rst:923 msgid "%T" msgstr "" -#: ../../../library/tkinter.rst:983 +#: ../../../library/tkinter.rst:923 msgid "type" msgstr "" -#: ../../../library/tkinter.rst:985 +#: ../../../library/tkinter.rst:925 msgid "%w" msgstr "" -#: ../../../library/tkinter.rst:985 +#: ../../../library/tkinter.rst:925 msgid "width" msgstr "" -#: ../../../library/tkinter.rst:985 +#: ../../../library/tkinter.rst:925 msgid "%W" msgstr "" -#: ../../../library/tkinter.rst:985 +#: ../../../library/tkinter.rst:925 msgid "widget" msgstr "" -#: ../../../library/tkinter.rst:987 +#: ../../../library/tkinter.rst:927 msgid "%x" msgstr "" -#: ../../../library/tkinter.rst:987 +#: ../../../library/tkinter.rst:927 msgid "x" msgstr "" -#: ../../../library/tkinter.rst:987 +#: ../../../library/tkinter.rst:927 msgid "%X" msgstr "" -#: ../../../library/tkinter.rst:987 +#: ../../../library/tkinter.rst:927 msgid "x_root" msgstr "" -#: ../../../library/tkinter.rst:989 +#: ../../../library/tkinter.rst:929 msgid "%y" msgstr "" -#: ../../../library/tkinter.rst:989 +#: ../../../library/tkinter.rst:929 msgid "y" msgstr "" -#: ../../../library/tkinter.rst:989 +#: ../../../library/tkinter.rst:929 msgid "%Y" msgstr "" -#: ../../../library/tkinter.rst:989 +#: ../../../library/tkinter.rst:929 msgid "y_root" msgstr "" -#: ../../../library/tkinter.rst:991 +#: ../../../library/tkinter.rst:931 msgid "%#" msgstr "" -#: ../../../library/tkinter.rst:991 +#: ../../../library/tkinter.rst:931 msgid "serial" msgstr "" -#: ../../../library/tkinter.rst:991 +#: ../../../library/tkinter.rst:931 msgid "%b" msgstr "" -#: ../../../library/tkinter.rst:991 +#: ../../../library/tkinter.rst:931 msgid "num" msgstr "" -#: ../../../library/tkinter.rst:993 +#: ../../../library/tkinter.rst:933 msgid "%d" msgstr "" -#: ../../../library/tkinter.rst:993 +#: ../../../library/tkinter.rst:933 msgid "detail" msgstr "" -#: ../../../library/tkinter.rst:993 +#: ../../../library/tkinter.rst:933 msgid "%D" msgstr "" -#: ../../../library/tkinter.rst:993 +#: ../../../library/tkinter.rst:933 msgid "delta" msgstr "" -#: ../../../library/tkinter.rst:998 +#: ../../../library/tkinter.rst:936 +msgid "" +"The ``add`` parameter above only affects the bindings you make yourself. " +"Every widget also inherits *class bindings* that implement its standard " +"behavior -- for example a :class:`Text` widget binds :kbd:`Control-t` to " +"transpose two characters. These are described in the bindings section of the " +"widget's Tk man page (such as :manpage:`text(3tk)` or :manpage:`entry(3tk)`)." +msgstr "" + +#: ../../../library/tkinter.rst:944 +msgid "" +"Class bindings are processed separately from your own, so binding an event " +"yourself does not replace the default; both run. To suppress an unwanted " +"default binding, bind the event on the widget and return the string " +"``\"break\"`` from your callback." +msgstr "" + +#: ../../../library/tkinter.rst:952 msgid "The index parameter" msgstr "" -#: ../../../library/tkinter.rst:1000 +#: ../../../library/tkinter.rst:954 msgid "" "A number of widgets require \"index\" parameters to be passed. These are " "used to point at a specific place in a Text widget, or to particular " "characters in an Entry widget, or to particular menu items in a Menu widget." msgstr "" -#: ../../../library/tkinter.rst:1004 +#: ../../../library/tkinter.rst:958 msgid "Entry widget indexes (index, view index, etc.)" msgstr "" -#: ../../../library/tkinter.rst:1005 +#: ../../../library/tkinter.rst:959 msgid "" -"Entry widgets have options that refer to character positions in the text " -"being displayed. You can use these :mod:`!tkinter` functions to access " -"these special points in text widgets:" +"Entry widgets have methods and options that refer to character positions in " +"the text being displayed. Anytime an index is needed, you may pass in:" msgstr "" -#: ../../../library/tkinter.rst:1009 +#: ../../../library/tkinter.rst:963 +msgid "" +"an integer which refers to the numeric position of a character, counted from " +"the beginning of the text, starting with 0;" +msgstr "" + +#: ../../../library/tkinter.rst:966 +msgid "" +"the string ``\"anchor\"``, which refers to the anchor point of the " +"selection, set with the widget's selection methods;" +msgstr "" + +#: ../../../library/tkinter.rst:970 +msgid "" +"the string ``\"end\"``, which refers to the position just after the last " +"character;" +msgstr "" + +#: ../../../library/tkinter.rst:973 +msgid "" +"the string ``\"insert\"``, which refers to the character just after the " +"insertion cursor;" +msgstr "" + +#: ../../../library/tkinter.rst:976 +msgid "" +"the strings ``\"sel.first\"`` and ``\"sel.last\"``, which refer to the first " +"character in the selection and the position just after the last (it is an " +"error to use these if there is no selection);" +msgstr "" + +#: ../../../library/tkinter.rst:981 +msgid "" +"a string consisting of ``@`` followed by an integer, as in ``\"@6\"``, where " +"the integer is interpreted as an x pixel coordinate in the entry's " +"coordinate system, selecting the character spanning that point." +msgstr "" + +#: ../../../library/tkinter.rst:986 msgid "Text widget indexes" msgstr "" -#: ../../../library/tkinter.rst:1010 +#: ../../../library/tkinter.rst:987 msgid "" "The index notation for Text widgets is very rich and is best described in " "the Tk man pages." msgstr "" -#: ../../../library/tkinter.rst:1013 +#: ../../../library/tkinter.rst:990 msgid "Menu indexes (menu.invoke(), menu.entryconfig(), etc.)" msgstr "" -#: ../../../library/tkinter.rst:1014 +#: ../../../library/tkinter.rst:991 msgid "" "Some options and methods for menus manipulate specific menu entries. Anytime " "a menu index is needed for an option or a parameter, you may pass in:" msgstr "" -#: ../../../library/tkinter.rst:1017 +#: ../../../library/tkinter.rst:994 msgid "" "an integer which refers to the numeric position of the entry in the widget, " "counted from the top, starting with 0;" msgstr "" -#: ../../../library/tkinter.rst:1020 +#: ../../../library/tkinter.rst:997 msgid "" "the string ``\"active\"``, which refers to the menu position that is " "currently under the cursor;" msgstr "" -#: ../../../library/tkinter.rst:1023 +#: ../../../library/tkinter.rst:1000 msgid "the string ``\"last\"`` which refers to the last menu item;" msgstr "" -#: ../../../library/tkinter.rst:1025 +#: ../../../library/tkinter.rst:1002 msgid "" -"An integer preceded by ``@``, as in ``@6``, where the integer is interpreted " -"as a y pixel coordinate in the menu's coordinate system;" +"a string consisting of ``@`` followed by an integer, as in ``\"@6\"``, where " +"the integer is interpreted as a y pixel coordinate in the menu's coordinate " +"system;" msgstr "" -#: ../../../library/tkinter.rst:1028 +#: ../../../library/tkinter.rst:1006 msgid "" "the string ``\"none\"``, which indicates no menu entry at all, most often " "used with menu.activate() to deactivate all entries, and finally," msgstr "" -#: ../../../library/tkinter.rst:1031 +#: ../../../library/tkinter.rst:1009 msgid "" "a text string that is pattern matched against the label of the menu entry, " "as scanned from the top of the menu to the bottom. Note that this index " @@ -1714,33 +1649,33 @@ msgid "" "above literals, instead." msgstr "" -#: ../../../library/tkinter.rst:1039 +#: ../../../library/tkinter.rst:1017 msgid "Images" msgstr "" -#: ../../../library/tkinter.rst:1041 +#: ../../../library/tkinter.rst:1019 msgid "" "Images of different formats can be created through the corresponding " "subclass of :class:`tkinter.Image`:" msgstr "" -#: ../../../library/tkinter.rst:1044 +#: ../../../library/tkinter.rst:1022 msgid ":class:`BitmapImage` for images in XBM format." msgstr "" -#: ../../../library/tkinter.rst:1046 +#: ../../../library/tkinter.rst:1024 msgid "" ":class:`PhotoImage` for images in PGM, PPM, GIF and PNG formats. The latter " "is supported starting with Tk 8.6." msgstr "" -#: ../../../library/tkinter.rst:1049 +#: ../../../library/tkinter.rst:1027 msgid "" "Either type of image is created through either the ``file`` or the ``data`` " "option (other options are available as well)." msgstr "" -#: ../../../library/tkinter.rst:1052 +#: ../../../library/tkinter.rst:1030 msgid "" "Added the :class:`!PhotoImage` method :meth:`!copy_replace` to copy a region " "from one image to other image, possibly with pixel zooming and/or " @@ -1749,7 +1684,7 @@ msgid "" "*subsample* parameters to :class:`!PhotoImage` method :meth:`!copy`." msgstr "" -#: ../../../library/tkinter.rst:1061 +#: ../../../library/tkinter.rst:1039 msgid "" "The image object can then be used wherever an ``image`` option is supported " "by some widget (for example, labels, buttons, menus). In these cases, Tk " @@ -1758,60 +1693,17 @@ msgid "" "display an empty box wherever the image was used." msgstr "" -#: ../../../library/tkinter.rst:1069 +#: ../../../library/tkinter.rst:1047 msgid "" "The `Pillow `_ package adds support for formats " "such as BMP, JPEG, TIFF, and WebP, among others." msgstr "" -#: ../../../library/tkinter.rst:1075 -msgid "File handlers" -msgstr "" - -#: ../../../library/tkinter.rst:1077 -msgid "" -"Tk allows you to register and unregister a callback function which will be " -"called from the Tk mainloop when I/O is possible on a file descriptor. Only " -"one handler may be registered per file descriptor. Example code::" -msgstr "" - -#: ../../../library/tkinter.rst:1088 -msgid "This feature is not available on Windows." -msgstr "" - -#: ../../../library/tkinter.rst:1090 -msgid "" -"Since you don't know how many bytes are available for reading, you may not " -"want to use the :class:`~io.BufferedIOBase` or :class:`~io.TextIOBase` :meth:" -"`~io.BufferedIOBase.read` or :meth:`~io.IOBase.readline` methods, since " -"these will insist on reading a predefined number of bytes. For sockets, the :" -"meth:`~socket.socket.recv` or :meth:`~socket.socket.recvfrom` methods will " -"work fine; for other files, use raw reads or ``os.read(file.fileno(), " -"maxbytecount)``." -msgstr "" - -#: ../../../library/tkinter.rst:1101 -msgid "" -"Registers the file handler callback function *func*. The *file* argument may " -"either be an object with a :meth:`~io.IOBase.fileno` method (such as a file " -"or socket object), or an integer file descriptor. The *mask* argument is an " -"ORed combination of any of the three constants below. The callback is called " -"as follows::" -msgstr "" - -#: ../../../library/tkinter.rst:1112 -msgid "Unregisters a file handler." -msgstr "" - -#: ../../../library/tkinter.rst:1119 -msgid "Constants used in the *mask* arguments." -msgstr "" - -#: ../../../library/tkinter.rst:1123 +#: ../../../library/tkinter.rst:1052 msgid "Reference" msgstr "" -#: ../../../library/tkinter.rst:1127 +#: ../../../library/tkinter.rst:1056 msgid "" "This section documents the classes, methods, functions and constants of the :" "mod:`!tkinter` module. Most of them wrap Tcl/Tk commands; consult the " @@ -1819,17 +1711,17 @@ msgid "" "details." msgstr "" -#: ../../../library/tkinter.rst:1134 +#: ../../../library/tkinter.rst:1063 msgid "" "The exception raised when a call into the Tcl interpreter fails, for example " "when a widget is given an unknown option or an invalid value." msgstr "" -#: ../../../library/tkinter.rst:1138 +#: ../../../library/tkinter.rst:1067 msgid "Base and mixin classes" msgstr "" -#: ../../../library/tkinter.rst:1142 +#: ../../../library/tkinter.rst:1071 msgid "" "The :class:`!Misc` class is a mix-in inherited by :class:`Tk` and, through :" "class:`BaseWidget`, by every widget. It provides the large set of methods " @@ -1841,14 +1733,14 @@ msgid "" "object, and are documented here once rather than repeated for each widget." msgstr "" -#: ../../../library/tkinter.rst:1154 +#: ../../../library/tkinter.rst:1083 msgid "" "Return the current value of the configuration option named *key* for this " "widget, as a string. The expression ``widget[key]`` is equivalent and may be " "used instead." msgstr "" -#: ../../../library/tkinter.rst:1163 +#: ../../../library/tkinter.rst:1092 msgid "" "Query or modify the configuration options of the widget. With no arguments, " "return a dictionary mapping every available option name to a tuple " @@ -1860,15 +1752,15 @@ msgid "" "same way." msgstr "" -#: ../../../library/tkinter.rst:1173 +#: ../../../library/tkinter.rst:1102 msgid ":meth:`config` is an alias of :meth:`!configure`." msgstr "" -#: ../../../library/tkinter.rst:1177 +#: ../../../library/tkinter.rst:1106 msgid "Return a list of the names of all configuration options of this widget." msgstr "" -#: ../../../library/tkinter.rst:1181 +#: ../../../library/tkinter.rst:1110 msgid "" "Interpret the string *s* as a Tcl boolean and return the corresponding :" "class:`bool`. Tcl accepts values such as ``'1'``, ``'0'``, ``'yes'``, " @@ -1876,27 +1768,27 @@ msgid "" "a valid boolean." msgstr "" -#: ../../../library/tkinter.rst:1189 +#: ../../../library/tkinter.rst:1118 msgid "" "Interpret the string *s* as a Tcl floating-point number and return it as a :" "class:`float`. Raise :exc:`ValueError` if *s* is not a valid number." msgstr "" -#: ../../../library/tkinter.rst:1198 +#: ../../../library/tkinter.rst:1127 msgid "" "Interpret the string *s* as a Tcl integer and return it as an :class:`int`. " "Raise :exc:`ValueError` if *s* is not a valid integer." msgstr "" -#: ../../../library/tkinter.rst:1204 +#: ../../../library/tkinter.rst:1133 msgid "Return the value of the Tcl global variable named *name*." msgstr "" -#: ../../../library/tkinter.rst:1208 +#: ../../../library/tkinter.rst:1137 msgid "Set the Tcl global variable named *name* to *value*." msgstr "" -#: ../../../library/tkinter.rst:1210 +#: ../../../library/tkinter.rst:1139 msgid "" "The :meth:`!getvar` and :meth:`!setvar` methods give direct access to Tcl " "variables. In most code you will instead use a :class:`Variable` subclass " @@ -1904,7 +1796,7 @@ msgid "" "and converts its value to and from a Python type." msgstr "" -#: ../../../library/tkinter.rst:1218 +#: ../../../library/tkinter.rst:1147 msgid "" "Register the Python callable *func* as a Tcl command and return the name of " "the new command as a string. Whenever Tcl invokes that command, *func* is " @@ -1914,73 +1806,73 @@ msgid "" "is false, the command is deleted automatically when the widget is destroyed." msgstr "" -#: ../../../library/tkinter.rst:1227 +#: ../../../library/tkinter.rst:1156 msgid "The arguments passed to *func* are no longer converted to strings." msgstr "" -#: ../../../library/tkinter.rst:1232 +#: ../../../library/tkinter.rst:1161 msgid "" "Delete the Tcl command named *name*, such as one previously returned by :" "meth:`register`." msgstr "" -#: ../../../library/tkinter.rst:1237 +#: ../../../library/tkinter.rst:1166 msgid "Return the widget instance corresponding to the Tk pathname *name*." msgstr "" -#: ../../../library/tkinter.rst:1241 +#: ../../../library/tkinter.rst:1170 msgid "" "Send the Tcl command *cmd*, with the given *args*, to the Tcl interpreter " "registered under the name *interp*, and return its result. This is not " "available on all platforms." msgstr "" -#: ../../../library/tkinter.rst:1247 +#: ../../../library/tkinter.rst:1176 msgid "" "Destroy this widget and all of its descendant widgets, and delete the Tcl " "commands associated with them." msgstr "" -#: ../../../library/tkinter.rst:1255 +#: ../../../library/tkinter.rst:1184 msgid "" "Raise this widget in the stacking order so that it is drawn on top of its " "siblings. If *aboveThis* is given, the widget is moved to be just above it " "in the stacking order instead." msgstr "" -#: ../../../library/tkinter.rst:1260 +#: ../../../library/tkinter.rst:1189 msgid ":meth:`lift` is an alias of :meth:`!tkraise`." msgstr "" -#: ../../../library/tkinter.rst:1264 +#: ../../../library/tkinter.rst:1193 msgid "" "Lower this widget in the stacking order so that it is drawn beneath its " "siblings. If *belowThis* is given, the widget is moved to be just below it " "in the stacking order instead." msgstr "" -#: ../../../library/tkinter.rst:1269 +#: ../../../library/tkinter.rst:1198 msgid "" ":meth:`tkraise`/:meth:`lift` and :meth:`lower` are overridden by the :class:" "`Canvas` widget, where they restack canvas items instead." msgstr "" -#: ../../../library/tkinter.rst:1275 +#: ../../../library/tkinter.rst:1204 msgid "" "Return the names of all images that currently exist in the Tcl interpreter." msgstr "" -#: ../../../library/tkinter.rst:1278 +#: ../../../library/tkinter.rst:1207 msgid "" "This is overridden by the :class:`Text` widget, where :meth:`!image_names` " "returns the names of its embedded images instead." msgstr "" -#: ../../../library/tkinter.rst:1284 +#: ../../../library/tkinter.rst:1213 msgid "Return the available image types, such as ``'photo'`` and ``'bitmap'``." msgstr "" -#: ../../../library/tkinter.rst:1291 +#: ../../../library/tkinter.rst:1220 msgid "" "Set the anchor that controls where the grid is placed inside this container " "when the container is larger than the grid and no row or column has a non-" @@ -1989,11 +1881,11 @@ msgid "" "effect." msgstr "" -#: ../../../library/tkinter.rst:1298 +#: ../../../library/tkinter.rst:1227 msgid ":meth:`anchor` is an alias of :meth:`!grid_anchor`." msgstr "" -#: ../../../library/tkinter.rst:1307 +#: ../../../library/tkinter.rst:1236 msgid "" "Return the bounding box, in pixels, of a region of the grid laid out in this " "container, as a 4-tuple ``(xoffset, yoffset, width, height)``. With no " @@ -2003,7 +1895,7 @@ msgid "" "*row*) to the cell (*col2*, *row2*)." msgstr "" -#: ../../../library/tkinter.rst:1314 +#: ../../../library/tkinter.rst:1243 msgid "" ":meth:`bbox` is an alias of :meth:`!grid_bbox`, except on :class:`Canvas`, :" "class:`Listbox`, :class:`Spinbox`, :class:`Text`, :class:`ttk.Entry `, which provide their own :" "meth:`!size` method." msgstr "" -#: ../../../library/tkinter.rst:1400 +#: ../../../library/tkinter.rst:1329 msgid "" "Return a list of the child widgets managed in this container's grid, most " "recently managed first. If *row* or *column* is given, only the children in " "that row or column are returned." msgstr "" -#: ../../../library/tkinter.rst:1407 +#: ../../../library/tkinter.rst:1336 msgid "" "Same as :meth:`grid_slaves`: return the child widgets managed in this " "container's grid, optionally restricted to a given *row* or *column*." msgstr "" -#: ../../../library/tkinter.rst:1420 +#: ../../../library/tkinter.rst:1349 msgid "" "Enable or disable geometry propagation for this container when it manages " "its children with the pack geometry manager. When *flag* is true, the " @@ -2133,48 +2025,54 @@ msgid "" "return the current setting as a boolean." msgstr "" -#: ../../../library/tkinter.rst:1427 +#: ../../../library/tkinter.rst:1356 msgid ":meth:`propagate` is an alias of :meth:`!pack_propagate`." msgstr "" -#: ../../../library/tkinter.rst:1434 +#: ../../../library/tkinter.rst:1363 msgid "" "Return a list of the child widgets managed by this container with the pack " "geometry manager, in packing order." msgstr "" -#: ../../../library/tkinter.rst:1437 +#: ../../../library/tkinter.rst:1366 msgid ":meth:`slaves` is an alias of :meth:`!pack_slaves`." msgstr "" -#: ../../../library/tkinter.rst:1444 +#: ../../../library/tkinter.rst:1373 msgid "" "Same as :meth:`pack_slaves`: return the child widgets managed by this " "container with the pack geometry manager, in packing order." msgstr "" -#: ../../../library/tkinter.rst:1447 +#: ../../../library/tkinter.rst:1376 msgid ":meth:`content` is an alias of :meth:`!pack_content`." msgstr "" -#: ../../../library/tkinter.rst:1454 +#: ../../../library/tkinter.rst:1383 msgid "" "Return a list of the child widgets managed by this container with the place " "geometry manager." msgstr "" -#: ../../../library/tkinter.rst:1459 +#: ../../../library/tkinter.rst:1388 msgid "" "Same as :meth:`place_slaves`: return the child widgets managed by this " "container with the place geometry manager." msgstr "" -#: ../../../library/tkinter.rst:1466 +#: ../../../library/tkinter.rst:1393 +msgid "" +"The methods with the ``bind`` and ``unbind`` prefixes associate event " +"patterns with callbacks and remove those associations." +msgstr "" + +#: ../../../library/tkinter.rst:1398 msgid "" "Bind the event pattern *sequence* on this widget to the callable *func*." msgstr "" -#: ../../../library/tkinter.rst:1468 +#: ../../../library/tkinter.rst:1400 msgid "" "*sequence* is an event pattern, such as ``''`` (a mouse click) or " "``''``, optionally a concatenation of several such patterns that " @@ -2184,28 +2082,28 @@ msgid "" "are invoked." msgstr "" -#: ../../../library/tkinter.rst:1475 +#: ../../../library/tkinter.rst:1407 msgid "" "If *add* is true, *func* is added to any functions already bound to " "*sequence*; otherwise it replaces them. The binding applies only to this " "widget." msgstr "" -#: ../../../library/tkinter.rst:1479 +#: ../../../library/tkinter.rst:1411 msgid "" ":meth:`!bind` returns a string identifier (a *funcid*) that can later be " "passed to :meth:`unbind` to remove the binding without leaking the " "associated Tcl command." msgstr "" -#: ../../../library/tkinter.rst:1483 +#: ../../../library/tkinter.rst:1415 msgid "" "If *func* is omitted, return the binding currently associated with " "*sequence*; if *sequence* is also omitted, return a list of all the " "sequences for which bindings exist on this widget." msgstr "" -#: ../../../library/tkinter.rst:1489 +#: ../../../library/tkinter.rst:1421 msgid "" "Like :meth:`bind`, but bind *func* to the binding tag *className* rather " "than to a single widget, so that the binding applies to every widget having " @@ -2215,21 +2113,21 @@ msgid "" "`bindtags`." msgstr "" -#: ../../../library/tkinter.rst:1497 ../../../library/tkinter.rst:1504 +#: ../../../library/tkinter.rst:1429 ../../../library/tkinter.rst:1436 msgid "The remaining arguments and the return value are as for :meth:`bind`." msgstr "" -#: ../../../library/tkinter.rst:1501 +#: ../../../library/tkinter.rst:1433 msgid "" "Like :meth:`bind`, but bind *func* to the special binding tag ``'all'``, so " "that the binding applies to every widget in the application." msgstr "" -#: ../../../library/tkinter.rst:1508 +#: ../../../library/tkinter.rst:1440 msgid "Remove bindings for the event pattern *sequence* on this widget." msgstr "" -#: ../../../library/tkinter.rst:1510 +#: ../../../library/tkinter.rst:1442 msgid "" "If *funcid* is given, only the function identified by it (a value returned " "from a previous call to :meth:`bind`) is removed, and its associated Tcl " @@ -2237,25 +2135,25 @@ msgid "" "leaving it unbound." msgstr "" -#: ../../../library/tkinter.rst:1515 +#: ../../../library/tkinter.rst:1447 msgid "" "If *funcid* is given, only that callback is unbound; other callbacks bound " "to *sequence* are kept." msgstr "" -#: ../../../library/tkinter.rst:1522 +#: ../../../library/tkinter.rst:1454 msgid "" "Remove all bindings for the event pattern *sequence* from the binding tag " "*className*. See :meth:`bind_class`." msgstr "" -#: ../../../library/tkinter.rst:1528 +#: ../../../library/tkinter.rst:1460 msgid "" "Remove all bindings for the event pattern *sequence* from the special " "binding tag ``'all'``. See :meth:`bind_all`." msgstr "" -#: ../../../library/tkinter.rst:1534 +#: ../../../library/tkinter.rst:1466 msgid "" "If *tagList* is omitted, return a tuple of the binding tags associated with " "this widget. When an event occurs in a widget, it is applied to each of the " @@ -2265,14 +2163,20 @@ msgid "" "and ``'all'``, in that order." msgstr "" -#: ../../../library/tkinter.rst:1543 +#: ../../../library/tkinter.rst:1475 msgid "" "If *tagList* is given, it must be a sequence of strings; the widget's " "binding tags are set to its elements, which determines the order in which " "bindings are evaluated." msgstr "" -#: ../../../library/tkinter.rst:1549 +#: ../../../library/tkinter.rst:1479 +msgid "" +"The methods with the ``event_`` prefix define virtual events and generate " +"events programmatically." +msgstr "" + +#: ../../../library/tkinter.rst:1484 msgid "" "Associate the virtual event *virtual*, whose name has the form " "``'<>'``, with each of the physical event patterns given by " @@ -2281,7 +2185,7 @@ msgid "" "ones." msgstr "" -#: ../../../library/tkinter.rst:1558 +#: ../../../library/tkinter.rst:1493 msgid "" "Remove each of *sequences* from those associated with the virtual event " "*virtual*. Sequences that are not currently associated with *virtual* are " @@ -2289,7 +2193,7 @@ msgid "" "removed, so that *virtual* no longer triggers." msgstr "" -#: ../../../library/tkinter.rst:1566 +#: ../../../library/tkinter.rst:1501 msgid "" "Generate the event *sequence* on this widget and arrange for it to be " "processed just as if it had come from the window system. *sequence* must be " @@ -2300,7 +2204,7 @@ msgid "" "for the full list." msgstr "" -#: ../../../library/tkinter.rst:1576 +#: ../../../library/tkinter.rst:1511 msgid "" "If *virtual* is omitted, return a tuple of all the virtual events that are " "currently defined. If *virtual* is given, return a tuple of the physical " @@ -2308,28 +2212,34 @@ msgid "" "defined." msgstr "" -#: ../../../library/tkinter.rst:1583 +#: ../../../library/tkinter.rst:1516 +msgid "" +"The methods with the ``after`` prefix schedule callbacks to run after a " +"delay or when the application is idle." +msgstr "" + +#: ../../../library/tkinter.rst:1521 msgid "" "Schedule the callable *func* to be called after *ms* milliseconds, with " "*args* and *kw* passed to it as positional and keyword arguments. Return an " "identifier that can be passed to :meth:`after_cancel` to cancel the call." msgstr "" -#: ../../../library/tkinter.rst:1588 +#: ../../../library/tkinter.rst:1526 msgid "" "If *func* is omitted, sleep for *ms* milliseconds instead, processing no " "events during that time, and return ``None``." msgstr "" -#: ../../../library/tkinter.rst:1591 +#: ../../../library/tkinter.rst:1529 msgid "*func* can now be any callable object, not only a function." msgstr "" -#: ../../../library/tkinter.rst:1594 ../../../library/tkinter.rst:1619 +#: ../../../library/tkinter.rst:1532 ../../../library/tkinter.rst:1557 msgid "Keyword arguments are now passed to *func*." msgstr "" -#: ../../../library/tkinter.rst:1600 +#: ../../../library/tkinter.rst:1538 msgid "" "Cancel a callback previously scheduled with :meth:`after` or :meth:" "`after_idle`. *id* must be an identifier returned by one of those methods; " @@ -2337,12 +2247,12 @@ msgid "" "the callback has already run or been cancelled, this has no effect." msgstr "" -#: ../../../library/tkinter.rst:1606 +#: ../../../library/tkinter.rst:1544 msgid "" "Passing ``None`` (or any false value) as *id* now raises :exc:`ValueError`." msgstr "" -#: ../../../library/tkinter.rst:1613 +#: ../../../library/tkinter.rst:1551 msgid "" "Schedule the callable *func* to be called, with *args* and *kw* passed to " "it, when the Tk main loop next becomes idle, that is, when it has no other " @@ -2350,14 +2260,14 @@ msgid "" "`after_cancel` to cancel the call." msgstr "" -#: ../../../library/tkinter.rst:1625 +#: ../../../library/tkinter.rst:1563 msgid "" "If *id* is omitted, return a tuple of the identifiers of all callbacks " "currently scheduled with :meth:`after` and :meth:`after_idle` for this " "interpreter." msgstr "" -#: ../../../library/tkinter.rst:1629 +#: ../../../library/tkinter.rst:1567 msgid "" "If *id* is given, it must identify a callback that has not yet run or been " "cancelled, and the return value is a tuple ``(script, type)``, where " @@ -2365,32 +2275,32 @@ msgid "" "or ``'timer'``. A :exc:`TclError` is raised if *id* does not exist." msgstr "" -#: ../../../library/tkinter.rst:1640 +#: ../../../library/tkinter.rst:1578 msgid "" "Enter the Tk event loop, which processes events until all windows are " "destroyed. This is normally called once, on the root window, to run the " "application." msgstr "" -#: ../../../library/tkinter.rst:1646 +#: ../../../library/tkinter.rst:1584 msgid "Quit the Tcl interpreter, causing :meth:`mainloop` to return." msgstr "" -#: ../../../library/tkinter.rst:1650 +#: ../../../library/tkinter.rst:1588 msgid "" "Enter the event loop until all pending events, including idle callbacks, " "have been processed. This brings the display up to date and handles any " "events that are already queued, then returns." msgstr "" -#: ../../../library/tkinter.rst:1657 +#: ../../../library/tkinter.rst:1595 msgid "" "Enter the event loop until all pending idle callbacks have been called. This " "updates the display of windows, for example after geometry changes, but does " "not process events caused by the user." msgstr "" -#: ../../../library/tkinter.rst:1666 +#: ../../../library/tkinter.rst:1604 msgid "" "Wait until the Tcl variable *name* is modified, continuing to process events " "in the meantime so that the application stays responsive. *name* is usually " @@ -2398,18 +2308,18 @@ msgid "" "`StringVar`." msgstr "" -#: ../../../library/tkinter.rst:1671 +#: ../../../library/tkinter.rst:1609 msgid ":meth:`waitvar` is an alias of :meth:`!wait_variable`." msgstr "" -#: ../../../library/tkinter.rst:1675 +#: ../../../library/tkinter.rst:1613 msgid "" "Wait until *window* is destroyed, continuing to process events in the " "meantime. If *window* is omitted, this widget is used. This is typically " "used to wait for the user to finish interacting with a dialog box." msgstr "" -#: ../../../library/tkinter.rst:1683 +#: ../../../library/tkinter.rst:1621 msgid "" "Wait until the visibility state of *window* changes, for example when it " "first appears on the screen, continuing to process events in the meantime. " @@ -2417,7 +2327,11 @@ msgid "" "for a newly created window to become visible before acting on it." msgstr "" -#: ../../../library/tkinter.rst:1694 +#: ../../../library/tkinter.rst:1628 +msgid "The methods with the ``focus_`` prefix manage the keyboard focus." +msgstr "" + +#: ../../../library/tkinter.rst:1635 msgid "" "Direct the keyboard input focus for this widget's display to this widget. If " "the application does not currently have the input focus on this widget's " @@ -2428,7 +2342,7 @@ msgid "" "Treeview>` widgets, which provide their own :meth:`!focus` method." msgstr "" -#: ../../../library/tkinter.rst:1706 +#: ../../../library/tkinter.rst:1647 msgid "" "Direct the keyboard input focus to this widget even if the application does " "not currently have the input focus for the widget's display. This method " @@ -2436,21 +2350,21 @@ msgid "" "the window manager to give it the focus rather than claiming it." msgstr "" -#: ../../../library/tkinter.rst:1714 +#: ../../../library/tkinter.rst:1655 msgid "" "Return the widget that currently has the keyboard focus in the application, " "or ``None`` if no widget in the application has the focus. Use :meth:" "`focus_displayof` to work correctly with several displays." msgstr "" -#: ../../../library/tkinter.rst:1720 +#: ../../../library/tkinter.rst:1661 msgid "" "Return the widget that currently has the keyboard focus on the display where " "this widget is located, or ``None`` if no widget in the application has the " "focus on that display." msgstr "" -#: ../../../library/tkinter.rst:1726 +#: ../../../library/tkinter.rst:1667 msgid "" "Return the most recent widget to have had the keyboard focus among all the " "widgets in the same top level as this widget; this is the widget that will " @@ -2459,14 +2373,14 @@ msgid "" "most recent focus widget has been deleted, the top level itself is returned." msgstr "" -#: ../../../library/tkinter.rst:1735 +#: ../../../library/tkinter.rst:1676 msgid "" "Reconfigure Tk to use an implicit focus model in which the focus is set to a " "widget whenever the mouse pointer enters it. This cannot easily be disabled " "once enabled." msgstr "" -#: ../../../library/tkinter.rst:1741 +#: ../../../library/tkinter.rst:1682 msgid "" "Return the next widget after this one in the keyboard traversal order, or " "``None`` if there is none. The traversal order goes first to the next child, " @@ -2476,7 +2390,7 @@ msgid "" "kbd:`Tab` key." msgstr "" -#: ../../../library/tkinter.rst:1751 +#: ../../../library/tkinter.rst:1692 msgid "" "Return the previous widget before this one in the keyboard traversal order, " "or ``None`` if there is none. See :meth:`tk_focusNext` for how the order is " @@ -2484,7 +2398,13 @@ msgid "" "Tab` key." msgstr "" -#: ../../../library/tkinter.rst:1758 +#: ../../../library/tkinter.rst:1697 +msgid "" +"The methods with the ``grab_`` prefix set and query the input grab, which " +"directs all input events to a single widget." +msgstr "" + +#: ../../../library/tkinter.rst:1702 msgid "" "Set a local grab on this widget. A grab confines pointer events to this " "widget and its descendants: while the pointer is outside the widget's " @@ -2497,7 +2417,7 @@ msgid "" "windows of the application." msgstr "" -#: ../../../library/tkinter.rst:1772 +#: ../../../library/tkinter.rst:1716 msgid "" "Set a global grab on this widget. A global grab is like the local grab set " "by :meth:`grab_set`, but it locks out all other applications on the screen, " @@ -2507,23 +2427,29 @@ msgid "" "until it is released." msgstr "" -#: ../../../library/tkinter.rst:1783 +#: ../../../library/tkinter.rst:1727 msgid "Release the grab on this widget if there is one; otherwise do nothing." msgstr "" -#: ../../../library/tkinter.rst:1787 +#: ../../../library/tkinter.rst:1731 msgid "" "Return the widget that currently holds the grab in this application for this " "widget's display, or ``None`` if there is no such widget." msgstr "" -#: ../../../library/tkinter.rst:1792 +#: ../../../library/tkinter.rst:1736 msgid "" "Return ``None`` if no grab is currently set on this widget, ``\"local\"`` if " "a local grab is set, or ``\"global\"`` if a global grab is set." msgstr "" -#: ../../../library/tkinter.rst:1797 +#: ../../../library/tkinter.rst:1739 +msgid "" +"The methods with the ``selection_`` prefix retrieve and manage the X " +"selection." +msgstr "" + +#: ../../../library/tkinter.rst:1744 msgid "" "Clear the X selection, so that no window owns it anymore. The selection to " "clear is given by the keyword argument *selection*, an atom name such as " @@ -2532,14 +2458,14 @@ msgid "" "which to operate, and defaults to this widget." msgstr "" -#: ../../../library/tkinter.rst:1804 +#: ../../../library/tkinter.rst:1751 msgid "" "This is overridden by the :class:`Entry`, :class:`Listbox` and :class:" "`Spinbox` widgets, where :meth:`!selection_clear` clears the widget's own " "selection instead." msgstr "" -#: ../../../library/tkinter.rst:1810 +#: ../../../library/tkinter.rst:1757 msgid "" "Return the contents of the current X selection. The keyword argument " "*selection* names the selection and defaults to ``PRIMARY``. The keyword " @@ -2551,7 +2477,7 @@ msgid "" "which to retrieve the selection, and defaults to this widget." msgstr "" -#: ../../../library/tkinter.rst:1824 +#: ../../../library/tkinter.rst:1771 msgid "" "Register *command* as a handler to supply the X selection owned by this " "widget when another application requests it. When the selection is " @@ -2564,14 +2490,14 @@ msgid "" "supplies (such as ``'STRING'`` or ``'FILE_NAME'``, default ``STRING``)." msgstr "" -#: ../../../library/tkinter.rst:1838 +#: ../../../library/tkinter.rst:1785 msgid "" "Make this widget the owner of the X selection on its display. The previous " "owner, if any, is notified that it has lost the selection. The keyword " "argument *selection* names the selection and defaults to ``PRIMARY``." msgstr "" -#: ../../../library/tkinter.rst:1845 +#: ../../../library/tkinter.rst:1792 msgid "" "Return the widget in this application that owns the X selection on the " "display containing this widget, or ``None`` if no widget in this application " @@ -2580,7 +2506,11 @@ msgid "" "that determines the display to query, and defaults to this widget." msgstr "" -#: ../../../library/tkinter.rst:1855 +#: ../../../library/tkinter.rst:1800 +msgid "The methods with the ``clipboard_`` prefix manage the clipboard." +msgstr "" + +#: ../../../library/tkinter.rst:1804 msgid "" "Append *string* to the Tk clipboard and claim ownership of the clipboard on " "this widget's display. Before appending, the clipboard should be emptied " @@ -2594,14 +2524,14 @@ msgid "" "retrieved with :meth:`clipboard_get` or :meth:`selection_get`." msgstr "" -#: ../../../library/tkinter.rst:1871 +#: ../../../library/tkinter.rst:1820 msgid "" "Claim ownership of the clipboard on this widget's display and remove any " "previous contents. The *displayof* keyword argument names a widget that " "determines the target display, and defaults to this widget." msgstr "" -#: ../../../library/tkinter.rst:1878 +#: ../../../library/tkinter.rst:1827 msgid "" "Retrieve data from the clipboard on this widget's display. The keyword " "argument *type* specifies the form in which the data is to be returned, an " @@ -2612,7 +2542,13 @@ msgid "" "application. This is equivalent to ``selection_get(selection='CLIPBOARD')``." msgstr "" -#: ../../../library/tkinter.rst:1889 +#: ../../../library/tkinter.rst:1836 +msgid "" +"The methods with the ``option_`` prefix query and modify the Tk option " +"database." +msgstr "" + +#: ../../../library/tkinter.rst:1841 msgid "" "Add an option to the Tk option database that associates *value* with " "*pattern*. *pattern* consists of names and/or classes separated by asterisks " @@ -2622,7 +2558,7 @@ msgid "" "``interactive``." msgstr "" -#: ../../../library/tkinter.rst:1899 +#: ../../../library/tkinter.rst:1851 msgid "" "Clear the Tk option database. Default options from the :envvar:`!" "RESOURCE_MANAGER` property or the :file:`.Xdefaults` file are reloaded " @@ -2630,7 +2566,7 @@ msgid "" "database." msgstr "" -#: ../../../library/tkinter.rst:1906 +#: ../../../library/tkinter.rst:1858 msgid "" "Return the value of the option matching this widget under *name* and " "*className* from the Tk option database, or an empty string if there is no " @@ -2639,7 +2575,7 @@ msgid "" "added one." msgstr "" -#: ../../../library/tkinter.rst:1915 +#: ../../../library/tkinter.rst:1867 msgid "" "Read the file named *fileName*, which should have the standard format for an " "X resource database such as :file:`.Xdefaults`, and add all the options it " @@ -2647,7 +2583,7 @@ msgid "" "`option_add` and defaults to ``interactive``." msgstr "" -#: ../../../library/tkinter.rst:1923 +#: ../../../library/tkinter.rst:1875 msgid "" "Ring the bell on the display for this widget, using the display's current " "bell-related settings, and reset the screen saver for the screen. If " @@ -2655,7 +2591,7 @@ msgid "" "instead." msgstr "" -#: ../../../library/tkinter.rst:1931 +#: ../../../library/tkinter.rst:1883 msgid "" "Set a new color scheme for all Tk widget elements. Existing widgets are " "updated and the option database is changed so that future widgets use the " @@ -2670,20 +2606,44 @@ msgid "" "for any that are not specified." msgstr "" -#: ../../../library/tkinter.rst:1947 +#: ../../../library/tkinter.rst:1899 msgid "" "Restore the application's colors to the light brown (bisque) color scheme " "used in Tk 3.6 and earlier versions. Provided for backward compatibility." msgstr "" -#: ../../../library/tkinter.rst:1953 +#: ../../../library/tkinter.rst:1905 msgid "" "Query or set whether Tk's look and feel should strictly adhere to Motif. A " "true *boolean* value enables strict Motif compliance (for example, no color " "change when the mouse passes over a slider). Return the resulting setting." msgstr "" -#: ../../../library/tkinter.rst:1960 +#: ../../../library/tkinter.rst:1912 +msgid "" +"Query or set the name used to communicate with this application through the " +"``send`` command. With no argument, return the current name; otherwise " +"change it to *name* and return the actual name set, which may have a suffix " +"appended to keep it unique among the applications on the display." +msgstr "" + +#: ../../../library/tkinter.rst:1922 +msgid "" +"Query or set whether Tk uses the X Input Methods (XIM) for filtering events, " +"and return the resulting state. This is significant only on X11; if XIM " +"support is not available it always returns ``False``." +msgstr "" + +#: ../../../library/tkinter.rst:1931 +msgid "" +"Set or query the caret location for the widget's display. The caret is the " +"per-display insertion position used for global focus indication (for " +"accessibility) and for placing the input method (XIM or IME) window. With no " +"argument, return the current location as a dictionary with the keys ``'x'``, " +"``'y'`` and ``'height'``; otherwise update the given coordinates." +msgstr "" + +#: ../../../library/tkinter.rst:1943 msgid "" "Query or set the scaling factor used by Tk to convert between physical units " "(such as points, inches or millimeters) and pixels, expressed as the number " @@ -2691,7 +2651,7 @@ msgid "" "the current factor; otherwise set it to the floating-point *number*." msgstr "" -#: ../../../library/tkinter.rst:1970 +#: ../../../library/tkinter.rst:1953 msgid "" "Return the number of milliseconds since the last time the user interacted " "with the system, or ``-1`` if the windowing system does not support this. If " @@ -2699,7 +2659,13 @@ msgid "" "``None``." msgstr "" -#: ../../../library/tkinter.rst:1988 +#: ../../../library/tkinter.rst:1960 +msgid "" +"The methods with the ``busy_`` prefix manage the busy state of a window, " +"which shows a busy cursor and ignores user input." +msgstr "" + +#: ../../../library/tkinter.rst:1974 msgid "" "Make this widget appear busy. A transparent window is placed in front of the " "widget, so that it and all of its descendants in the widget hierarchy are " @@ -2708,20 +2674,20 @@ msgid "" "operation is in effect before the application starts its processing." msgstr "" -#: ../../../library/tkinter.rst:1996 +#: ../../../library/tkinter.rst:1982 msgid "" "The only supported configuration option is *cursor*, the cursor to be " "displayed while the widget is busy; it may have any of the values accepted " "by :meth:`!configure`." msgstr "" -#: ../../../library/tkinter.rst:2000 +#: ../../../library/tkinter.rst:1986 msgid "" ":meth:`busy_hold`, :meth:`busy` and :meth:`tk_busy` are aliases of :meth:`!" "tk_busy_hold`." msgstr "" -#: ../../../library/tkinter.rst:2017 +#: ../../../library/tkinter.rst:2003 msgid "" "Query or modify the configuration options of the busy window. The widget " "must have been previously made busy by :meth:`tk_busy_hold`. With no " @@ -2731,31 +2697,31 @@ msgid "" "the values accepted by :meth:`tk_busy_hold`." msgstr "" -#: ../../../library/tkinter.rst:2025 +#: ../../../library/tkinter.rst:2011 msgid "" "The option database is referenced through the widget name or class. For " "example, if a :class:`Frame` widget named ``frame`` is to be made busy, the " "busy cursor can be specified for it by either of the calls::" msgstr "" -#: ../../../library/tkinter.rst:2032 +#: ../../../library/tkinter.rst:2018 msgid "" ":meth:`busy_configure`, :meth:`busy_config` and :meth:`tk_busy_config` are " "aliases of :meth:`!tk_busy_configure`." msgstr "" -#: ../../../library/tkinter.rst:2043 +#: ../../../library/tkinter.rst:2029 msgid "" "Return the current value of the busy configuration *option*. The widget must " "have been previously made busy by :meth:`tk_busy_hold`, and *option* may " "have any of the values accepted by that method." msgstr "" -#: ../../../library/tkinter.rst:2047 +#: ../../../library/tkinter.rst:2033 msgid ":meth:`busy_cget` is an alias of :meth:`!tk_busy_cget`." msgstr "" -#: ../../../library/tkinter.rst:2057 +#: ../../../library/tkinter.rst:2043 msgid "" "Make this widget no longer busy, releasing the resources (including the " "transparent window) allocated when it was made busy. User events will again " @@ -2763,29 +2729,35 @@ msgid "" "is destroyed." msgstr "" -#: ../../../library/tkinter.rst:2062 +#: ../../../library/tkinter.rst:2048 msgid ":meth:`busy_forget` is an alias of :meth:`!tk_busy_forget`." msgstr "" -#: ../../../library/tkinter.rst:2072 +#: ../../../library/tkinter.rst:2058 msgid "Return ``True`` if the widget is currently busy, ``False`` otherwise." msgstr "" -#: ../../../library/tkinter.rst:2074 +#: ../../../library/tkinter.rst:2060 msgid ":meth:`busy_status` is an alias of :meth:`!tk_busy_status`." msgstr "" -#: ../../../library/tkinter.rst:2084 +#: ../../../library/tkinter.rst:2070 msgid "" "Return a list of widgets that are currently busy. If *pattern* is given, " "only busy widgets whose path names match the pattern are returned." msgstr "" -#: ../../../library/tkinter.rst:2088 +#: ../../../library/tkinter.rst:2074 msgid ":meth:`busy_current` is an alias of :meth:`!tk_busy_current`." msgstr "" -#: ../../../library/tkinter.rst:2094 +#: ../../../library/tkinter.rst:2078 +msgid "" +"The methods with the ``winfo_`` prefix retrieve information about windows " +"managed by Tk." +msgstr "" + +#: ../../../library/tkinter.rst:2083 msgid "" "Return the integer identifier for the atom whose name is *name*, creating a " "new atom if none exists. If *displayof* is given, the atom is looked up on " @@ -2793,7 +2765,7 @@ msgid "" "application's main window." msgstr "" -#: ../../../library/tkinter.rst:2102 +#: ../../../library/tkinter.rst:2091 msgid "" "Return the textual name for the atom whose integer identifier is *id*. This " "is the inverse of :meth:`winfo_atom`. If *displayof* is given, the " @@ -2801,28 +2773,28 @@ msgid "" "looked up on the display of the application's main window." msgstr "" -#: ../../../library/tkinter.rst:2110 +#: ../../../library/tkinter.rst:2099 msgid "Return the number of cells in the colormap for the widget." msgstr "" -#: ../../../library/tkinter.rst:2114 +#: ../../../library/tkinter.rst:2103 msgid "" "Return a list containing the widgets that are children of the widget, in " "stacking order from lowest to highest. Toplevel windows are returned as " "children of their logical parents." msgstr "" -#: ../../../library/tkinter.rst:2120 +#: ../../../library/tkinter.rst:2109 msgid "Return the class name of the widget." msgstr "" -#: ../../../library/tkinter.rst:2124 +#: ../../../library/tkinter.rst:2113 msgid "" "Return ``True`` if the colormap for the widget is known to be full, " "``False`` otherwise." msgstr "" -#: ../../../library/tkinter.rst:2129 +#: ../../../library/tkinter.rst:2118 msgid "" "Return the widget containing the point given by *rootX* and *rootY*, or " "``None`` if no window in this application contains the point. The " @@ -2831,15 +2803,15 @@ msgid "" "window; otherwise they refer to the screen of the application's main window." msgstr "" -#: ../../../library/tkinter.rst:2139 +#: ../../../library/tkinter.rst:2128 msgid "Return the depth of the widget, that is, the number of bits per pixel." msgstr "" -#: ../../../library/tkinter.rst:2143 -msgid "Return ``1`` if the widget exists, ``0`` otherwise." +#: ../../../library/tkinter.rst:2132 +msgid "Return ``True`` if the widget exists, ``False`` otherwise." msgstr "" -#: ../../../library/tkinter.rst:2147 +#: ../../../library/tkinter.rst:2136 msgid "" "Return a floating-point value giving the number of pixels in the widget " "corresponding to the screen distance *number* (for example, ``\"2.0c\"`` or " @@ -2847,26 +2819,27 @@ msgid "" "meth:`winfo_pixels`." msgstr "" -#: ../../../library/tkinter.rst:2155 +#: ../../../library/tkinter.rst:2144 msgid "" "Return the geometry of the widget, in the form ``widthxheight+x+y``. All " -"dimensions are in pixels." +"dimensions are in pixels. An offset can be negative; see :meth:`~Wm." +"geometry`." msgstr "" -#: ../../../library/tkinter.rst:2160 +#: ../../../library/tkinter.rst:2150 msgid "" "Return the height of the widget in pixels. When a window is first created " "its height is 1 pixel; it is eventually changed by a geometry manager. See " "also :meth:`winfo_reqheight`." msgstr "" -#: ../../../library/tkinter.rst:2167 +#: ../../../library/tkinter.rst:2157 msgid "" "Return a low-level platform-specific identifier for the widget. On Unix this " "is the X window identifier, and on Windows it is the window handle." msgstr "" -#: ../../../library/tkinter.rst:2173 +#: ../../../library/tkinter.rst:2163 msgid "" "Return a tuple of the names of all Tcl interpreters currently registered for " "a particular display. If *displayof* is given, the return value refers to " @@ -2874,45 +2847,45 @@ msgid "" "application's main window." msgstr "" -#: ../../../library/tkinter.rst:2181 +#: ../../../library/tkinter.rst:2171 msgid "" "On macOS and Windows, return ``True`` if the widget is in \"dark mode\", and " "``False`` otherwise. Always return ``False`` on X11." msgstr "" -#: ../../../library/tkinter.rst:2187 +#: ../../../library/tkinter.rst:2177 msgid "Requires Tk 9.1 or newer." msgstr "" -#: ../../../library/tkinter.rst:2191 -msgid "Return ``1`` if the widget is currently mapped, ``0`` otherwise." +#: ../../../library/tkinter.rst:2181 +msgid "Return ``True`` if the widget is currently mapped, ``False`` otherwise." msgstr "" -#: ../../../library/tkinter.rst:2195 +#: ../../../library/tkinter.rst:2185 msgid "" "Return the name of the geometry manager currently responsible for the " "widget, or an empty string if it is not managed by any geometry manager." msgstr "" -#: ../../../library/tkinter.rst:2200 +#: ../../../library/tkinter.rst:2190 msgid "" "Return the widget's name within its parent, as opposed to its full path name." msgstr "" -#: ../../../library/tkinter.rst:2205 +#: ../../../library/tkinter.rst:2195 msgid "" "Return the path name of the widget's parent, or an empty string if the " "widget is the main window of the application." msgstr "" -#: ../../../library/tkinter.rst:2210 +#: ../../../library/tkinter.rst:2200 msgid "" "Return the path name of the window whose identifier is *id*. If *displayof* " "is given, the identifier is looked up on the display of that window; " "otherwise it is looked up on the display of the application's main window." msgstr "" -#: ../../../library/tkinter.rst:2217 +#: ../../../library/tkinter.rst:2207 msgid "" "Return the number of pixels in the widget corresponding to the screen " "distance *number* (for example, ``\"2.0c\"`` or ``\"1i\"``). The result is " @@ -2920,14 +2893,14 @@ msgid "" "`winfo_fpixels`." msgstr "" -#: ../../../library/tkinter.rst:2224 +#: ../../../library/tkinter.rst:2214 msgid "" "Return the pointer's *x* coordinate, in pixels, relative to the screen's " "root window (or virtual root, if one is in use). Return ``-1`` if the " "pointer is not on the same screen as the widget." msgstr "" -#: ../../../library/tkinter.rst:2230 +#: ../../../library/tkinter.rst:2220 msgid "" "Return the pointer's coordinates as an ``(x, y)`` tuple, in pixels, relative " "to the screen's root window (or virtual root, if one is in use). Both " @@ -2935,116 +2908,116 @@ msgid "" "widget." msgstr "" -#: ../../../library/tkinter.rst:2237 +#: ../../../library/tkinter.rst:2227 msgid "" "Return the pointer's *y* coordinate, in pixels, relative to the screen's " "root window (or virtual root, if one is in use). Return ``-1`` if the " "pointer is not on the same screen as the widget." msgstr "" -#: ../../../library/tkinter.rst:2243 +#: ../../../library/tkinter.rst:2233 msgid "" "Return the widget's requested height in pixels. This is the value used by " "the widget's geometry manager to compute its geometry." msgstr "" -#: ../../../library/tkinter.rst:2249 +#: ../../../library/tkinter.rst:2239 msgid "" "Return the widget's requested width in pixels. This is the value used by the " "widget's geometry manager to compute its geometry." msgstr "" -#: ../../../library/tkinter.rst:2255 +#: ../../../library/tkinter.rst:2245 msgid "" "Return an ``(r, g, b)`` tuple of the red, green, and blue intensities, in " "the range 0 to 65535, that correspond to *color* in the widget. *color* may " "be specified in any of the forms acceptable for a color option." msgstr "" -#: ../../../library/tkinter.rst:2262 +#: ../../../library/tkinter.rst:2252 msgid "" "Return the *x* coordinate, in the root window of the screen, of the upper-" "left corner of the widget's border (or of the widget itself if it has no " "border)." msgstr "" -#: ../../../library/tkinter.rst:2268 +#: ../../../library/tkinter.rst:2258 msgid "" "Return the *y* coordinate, in the root window of the screen, of the upper-" "left corner of the widget's border (or of the widget itself if it has no " "border)." msgstr "" -#: ../../../library/tkinter.rst:2274 +#: ../../../library/tkinter.rst:2264 msgid "" "Return the name of the screen associated with the widget, in the form " "``displayName.screenIndex``." msgstr "" -#: ../../../library/tkinter.rst:2279 +#: ../../../library/tkinter.rst:2269 msgid "" "Return the number of cells in the default colormap for the widget's screen." msgstr "" -#: ../../../library/tkinter.rst:2284 +#: ../../../library/tkinter.rst:2274 msgid "" "Return the depth of the root window of the widget's screen, that is, the " "number of bits per pixel." msgstr "" -#: ../../../library/tkinter.rst:2289 +#: ../../../library/tkinter.rst:2279 msgid "Return the height of the widget's screen in pixels." msgstr "" -#: ../../../library/tkinter.rst:2293 +#: ../../../library/tkinter.rst:2283 msgid "Return the height of the widget's screen in millimeters." msgstr "" -#: ../../../library/tkinter.rst:2297 +#: ../../../library/tkinter.rst:2287 msgid "Return the width of the widget's screen in millimeters." msgstr "" -#: ../../../library/tkinter.rst:2301 +#: ../../../library/tkinter.rst:2291 msgid "" "Return the default visual class for the widget's screen, one of " "``\"directcolor\"``, ``\"grayscale\"``, ``\"pseudocolor\"``, " "``\"staticcolor\"``, ``\"staticgray\"``, or ``\"truecolor\"``." msgstr "" -#: ../../../library/tkinter.rst:2307 +#: ../../../library/tkinter.rst:2297 msgid "Return the width of the widget's screen in pixels." msgstr "" -#: ../../../library/tkinter.rst:2311 +#: ../../../library/tkinter.rst:2301 msgid "" "Return a string containing information about the server for the widget's " "display. The exact format of this string may vary from platform to platform." msgstr "" -#: ../../../library/tkinter.rst:2317 +#: ../../../library/tkinter.rst:2307 msgid "" "Return the top-of-hierarchy window containing the widget. In standard Tk " "this is always a :class:`Toplevel` widget." msgstr "" -#: ../../../library/tkinter.rst:2322 +#: ../../../library/tkinter.rst:2312 msgid "" -"Return ``1`` if the widget and all of its ancestors up through the nearest " -"toplevel window are mapped, ``0`` otherwise." +"Return ``True`` if the widget and all of its ancestors up through the " +"nearest toplevel window are mapped, ``False`` otherwise." msgstr "" -#: ../../../library/tkinter.rst:2327 +#: ../../../library/tkinter.rst:2317 msgid "" "Return the visual class for the widget, one of ``\"directcolor\"``, " "``\"grayscale\"``, ``\"pseudocolor\"``, ``\"staticcolor\"``, " "``\"staticgray\"``, or ``\"truecolor\"``." msgstr "" -#: ../../../library/tkinter.rst:2333 +#: ../../../library/tkinter.rst:2323 msgid "Return the X identifier for the visual for the widget." msgstr "" -#: ../../../library/tkinter.rst:2337 +#: ../../../library/tkinter.rst:2327 msgid "" "Return a list describing the visuals available for the widget's screen. Each " "item consists of a visual class (see :meth:`winfo_visual`) followed by an " @@ -3052,52 +3025,52 @@ msgid "" "also included." msgstr "" -#: ../../../library/tkinter.rst:2345 +#: ../../../library/tkinter.rst:2335 msgid "" "Return the height of the virtual root window associated with the widget if " "there is one; otherwise return the height of the widget's screen." msgstr "" -#: ../../../library/tkinter.rst:2350 +#: ../../../library/tkinter.rst:2340 msgid "" "Return the width of the virtual root window associated with the widget if " "there is one; otherwise return the width of the widget's screen." msgstr "" -#: ../../../library/tkinter.rst:2355 +#: ../../../library/tkinter.rst:2345 msgid "" "Return the *x* offset of the virtual root window associated with the widget, " "relative to the root window of its screen. This is normally zero or " "negative, and is ``0`` if there is no virtual root window." msgstr "" -#: ../../../library/tkinter.rst:2362 +#: ../../../library/tkinter.rst:2352 msgid "" "Return the *y* offset of the virtual root window associated with the widget, " "relative to the root window of its screen. This is normally zero or " "negative, and is ``0`` if there is no virtual root window." msgstr "" -#: ../../../library/tkinter.rst:2369 +#: ../../../library/tkinter.rst:2359 msgid "" "Return the width of the widget in pixels. When a window is first created its " "width is 1 pixel; it is eventually changed by a geometry manager. See also :" "meth:`winfo_reqwidth`." msgstr "" -#: ../../../library/tkinter.rst:2376 +#: ../../../library/tkinter.rst:2366 msgid "" "Return the *x* coordinate, in the widget's parent, of the upper-left corner " "of the widget's border (or of the widget itself if it has no border)." msgstr "" -#: ../../../library/tkinter.rst:2382 +#: ../../../library/tkinter.rst:2372 msgid "" "Return the *y* coordinate, in the widget's parent, of the upper-left corner " "of the widget's border (or of the widget itself if it has no border)." msgstr "" -#: ../../../library/tkinter.rst:2388 +#: ../../../library/tkinter.rst:2378 msgid "" "Return the Tcl/Tk patch level as a named tuple with the same five fields as :" "data:`sys.version_info`: *major*, *minor*, *micro*, *releaselevel* and " @@ -3106,7 +3079,7 @@ msgid "" "for example ``'9.0.3'`` for a final release or ``'9.1b2'`` for a pre-release." msgstr "" -#: ../../../library/tkinter.rst:2402 +#: ../../../library/tkinter.rst:2392 msgid "" "The :class:`!Wm` mixin provides access to the window manager, allowing an " "application to control such things as the title, geometry and icon of a top-" @@ -3114,20 +3087,21 @@ msgid "" "protocols. It is mixed into :class:`Tk` and :class:`Toplevel`, so its " "methods are available on every top-level window. Each method has two " "equivalent spellings: a short name and a ``wm_``-prefixed name (for " -"example, :meth:`title` and :meth:`wm_title`)." +"example, :meth:`title` and :meth:`wm_title`). See also :ref:`tkinter-window-" +"manager`." msgstr "" -#: ../../../library/tkinter.rst:2416 +#: ../../../library/tkinter.rst:2407 msgid "" "Constrain the aspect ratio (the ratio of width to height) of the window. If " "all four arguments are given, the window manager keeps the ratio between " "``minNumer/minDenom`` and ``maxNumer/maxDenom``; passing empty strings " "removes any existing restriction. With no arguments, return a tuple of the " -"four current values, or an empty string if no aspect restriction is in " -"effect. :meth:`wm_aspect` is an alias of :meth:`!aspect`." +"four current values, or ``None`` if no aspect restriction is in effect. :" +"meth:`wm_aspect` is an alias of :meth:`!aspect`." msgstr "" -#: ../../../library/tkinter.rst:2429 +#: ../../../library/tkinter.rst:2420 msgid "" "Query or set platform-specific attributes of the window. With no arguments, " "return the platform-specific flags and their values; pass " @@ -3136,201 +3110,201 @@ msgid "" "set using keyword arguments (``alpha=0.5``)." msgstr "" -#: ../../../library/tkinter.rst:2435 +#: ../../../library/tkinter.rst:2426 msgid "The available attributes differ by platform. All platforms support:" msgstr "" -#: ../../../library/tkinter.rst:2438 +#: ../../../library/tkinter.rst:2429 msgid "*alpha*" msgstr "" -#: ../../../library/tkinter.rst:2439 +#: ../../../library/tkinter.rst:2430 msgid "" "The window's opacity, from ``0.0`` (fully transparent) to ``1.0`` (opaque). " "Where transparency is unsupported the value stays at ``1.0``." msgstr "" -#: ../../../library/tkinter.rst:2443 +#: ../../../library/tkinter.rst:2434 msgid "*appearance*" msgstr "" -#: ../../../library/tkinter.rst:2444 +#: ../../../library/tkinter.rst:2435 msgid "" "Whether the window is rendered in dark mode on Windows and macOS: " "``'auto'``, ``'light'`` or ``'dark'`` (this has no effect on X11)." msgstr "" -#: ../../../library/tkinter.rst:2447 +#: ../../../library/tkinter.rst:2438 msgid "*fullscreen*" msgstr "" -#: ../../../library/tkinter.rst:2448 +#: ../../../library/tkinter.rst:2439 msgid "Whether the window takes up the entire screen and has no borders." msgstr "" -#: ../../../library/tkinter.rst:2450 +#: ../../../library/tkinter.rst:2441 msgid "*topmost*" msgstr "" -#: ../../../library/tkinter.rst:2451 +#: ../../../library/tkinter.rst:2442 msgid "Whether the window is displayed above all other windows." msgstr "" -#: ../../../library/tkinter.rst:2453 +#: ../../../library/tkinter.rst:2444 msgid "Windows additionally supports:" msgstr "" -#: ../../../library/tkinter.rst:2455 +#: ../../../library/tkinter.rst:2446 msgid "*disabled*" msgstr "" -#: ../../../library/tkinter.rst:2456 +#: ../../../library/tkinter.rst:2447 msgid "Whether the window is in a disabled state." msgstr "" -#: ../../../library/tkinter.rst:2458 +#: ../../../library/tkinter.rst:2449 msgid "*toolwindow*" msgstr "" -#: ../../../library/tkinter.rst:2459 +#: ../../../library/tkinter.rst:2450 msgid "Whether the window uses the tool window style." msgstr "" -#: ../../../library/tkinter.rst:2461 +#: ../../../library/tkinter.rst:2452 msgid "*transparentcolor*" msgstr "" -#: ../../../library/tkinter.rst:2462 +#: ../../../library/tkinter.rst:2453 msgid "The color that is made fully transparent, or an empty string for none." msgstr "" -#: ../../../library/tkinter.rst:2464 +#: ../../../library/tkinter.rst:2455 msgid "macOS additionally supports:" msgstr "" -#: ../../../library/tkinter.rst:2466 +#: ../../../library/tkinter.rst:2457 msgid "*class*" msgstr "" -#: ../../../library/tkinter.rst:2467 +#: ../../../library/tkinter.rst:2458 msgid "" "Whether the underlying Aqua window is an ``nswindow`` or an ``nspanel``; " "this can only be set before the window is created." msgstr "" -#: ../../../library/tkinter.rst:2470 +#: ../../../library/tkinter.rst:2461 msgid "*modified*" msgstr "" -#: ../../../library/tkinter.rst:2471 +#: ../../../library/tkinter.rst:2462 msgid "" "The modification state shown by the window's close button and proxy icon." msgstr "" -#: ../../../library/tkinter.rst:2474 +#: ../../../library/tkinter.rst:2465 msgid "*notify*" msgstr "" -#: ../../../library/tkinter.rst:2475 +#: ../../../library/tkinter.rst:2466 msgid "Whether the application's dock icon bounces to request attention." msgstr "" -#: ../../../library/tkinter.rst:2477 +#: ../../../library/tkinter.rst:2468 msgid "*stylemask*" msgstr "" -#: ../../../library/tkinter.rst:2478 +#: ../../../library/tkinter.rst:2469 msgid "" "The style mask of the underlying Aqua window, given as a list of bit names " "such as ``titled`` or ``resizable``." msgstr "" -#: ../../../library/tkinter.rst:2481 +#: ../../../library/tkinter.rst:2472 msgid "*tabbingid*" msgstr "" -#: ../../../library/tkinter.rst:2482 +#: ../../../library/tkinter.rst:2473 msgid "The identifier of the tab group that the window belongs to." msgstr "" -#: ../../../library/tkinter.rst:2484 +#: ../../../library/tkinter.rst:2475 msgid "*tabbingmode*" msgstr "" -#: ../../../library/tkinter.rst:2485 +#: ../../../library/tkinter.rst:2476 msgid "" "Whether the window may be opened as a tab: ``'auto'``, ``'preferred'`` or " "``'disallowed'``." msgstr "" -#: ../../../library/tkinter.rst:2488 +#: ../../../library/tkinter.rst:2479 msgid "*titlepath*" msgstr "" -#: ../../../library/tkinter.rst:2489 +#: ../../../library/tkinter.rst:2480 msgid "The path of the file represented by the window's proxy icon." msgstr "" -#: ../../../library/tkinter.rst:2491 +#: ../../../library/tkinter.rst:2482 msgid "*transparent*" msgstr "" -#: ../../../library/tkinter.rst:2492 +#: ../../../library/tkinter.rst:2483 msgid "" "Whether the content area is transparent and the window shadow is turned off." msgstr "" -#: ../../../library/tkinter.rst:2495 +#: ../../../library/tkinter.rst:2486 msgid "X11 additionally supports:" msgstr "" -#: ../../../library/tkinter.rst:2497 +#: ../../../library/tkinter.rst:2488 msgid "*type*" msgstr "" -#: ../../../library/tkinter.rst:2498 +#: ../../../library/tkinter.rst:2489 msgid "" "The window type, or a list of types in order of preference, that the window " "manager should use to interpret the window, such as ``'dialog'`` or " "``'splash'``." msgstr "" -#: ../../../library/tkinter.rst:2502 +#: ../../../library/tkinter.rst:2493 msgid "*zoomed*" msgstr "" -#: ../../../library/tkinter.rst:2503 +#: ../../../library/tkinter.rst:2494 msgid "Whether the window is maximized." msgstr "" -#: ../../../library/tkinter.rst:2507 +#: ../../../library/tkinter.rst:2498 msgid "" "Tk 8.6 added the *type* attribute, and Tk 9.0 added the *appearance*, " "*class*, *stylemask*, *tabbingid* and *tabbingmode* attributes." msgstr "" -#: ../../../library/tkinter.rst:2510 +#: ../../../library/tkinter.rst:2501 msgid "" "On X11 changes are applied asynchronously, so a queried value may not yet " "reflect the most recent request. :meth:`wm_attributes` is an alias of :meth:" "`!attributes`." msgstr "" -#: ../../../library/tkinter.rst:2514 +#: ../../../library/tkinter.rst:2505 msgid "" "A single attribute may now be queried by name without the leading ``-``, and " "attributes may be set using keyword arguments. The *return_python_dict* " "parameter was added." msgstr "" -#: ../../../library/tkinter.rst:2519 +#: ../../../library/tkinter.rst:2510 msgid "" "Setting an attribute by passing the option name (with a leading ``-``) and " "its value as two positional arguments, as in ``w.attributes('-alpha', " "0.5)``, is deprecated; use keyword arguments instead." msgstr "" -#: ../../../library/tkinter.rst:2531 +#: ../../../library/tkinter.rst:2522 msgid "" "Store *name*, which should be the name of the host on which the application " "is running, in the window's ``WM_CLIENT_MACHINE`` property for use by the " @@ -3339,7 +3313,7 @@ msgid "" "an alias of :meth:`!client`." msgstr "" -#: ../../../library/tkinter.rst:2543 +#: ../../../library/tkinter.rst:2534 msgid "" "Manipulate the ``WM_COLORMAP_WINDOWS`` property, which tells the window " "manager about windows that have private colormaps. If *wlist* is given, " @@ -3349,7 +3323,7 @@ msgid "" "meth:`!colormapwindows`." msgstr "" -#: ../../../library/tkinter.rst:2556 +#: ../../../library/tkinter.rst:2547 msgid "" "Store *value* in the window's ``WM_COMMAND`` property for use by the window " "or session manager; it should be a list giving the words of the command used " @@ -3358,7 +3332,7 @@ msgid "" "is an alias of :meth:`!command`." msgstr "" -#: ../../../library/tkinter.rst:2568 +#: ../../../library/tkinter.rst:2559 msgid "" "Display the window in normal (non-iconified) form by mapping it. If the " "window has never been mapped, this ensures it appears de-iconified when it " @@ -3366,7 +3340,7 @@ msgid "" "meth:`wm_deiconify` is an alias of :meth:`!deiconify`." msgstr "" -#: ../../../library/tkinter.rst:2579 +#: ../../../library/tkinter.rst:2570 msgid "" "Set or query the focus model for the window. *model* is either ``'active'`` " "(the window claims the input focus for itself or its descendants, even when " @@ -3377,7 +3351,7 @@ msgid "" "focusmodel`." msgstr "" -#: ../../../library/tkinter.rst:2594 +#: ../../../library/tkinter.rst:2585 msgid "" "Unmap *window* from the screen so that it is no longer managed by the window " "manager. A :class:`Toplevel` is then treated like a :class:`Frame`, although " @@ -3385,11 +3359,11 @@ msgid "" "widget is managed again. :meth:`wm_forget` is an alias of :meth:`!forget`." msgstr "" -#: ../../../library/tkinter.rst:2601 +#: ../../../library/tkinter.rst:2592 msgid "Not to be confused with :meth:`Pack.forget`." msgstr "" -#: ../../../library/tkinter.rst:2610 +#: ../../../library/tkinter.rst:2601 msgid "" "Return the platform-specific window identifier for the outermost decorative " "frame containing the window, if the window manager has reparented it into " @@ -3397,35 +3371,37 @@ msgid "" "`wm_frame` is an alias of :meth:`!frame`." msgstr "" -#: ../../../library/tkinter.rst:2621 +#: ../../../library/tkinter.rst:2612 msgid "" "Set or query the geometry of the window. *newGeometry* has the form " "``=widthxheight+x+y``, where any of ``=``, ``widthxheight`` and the ``+x+y`` " "position may be omitted. *width* and *height* are in pixels (or grid units " "for a gridded window); a position preceded by ``+`` is measured from the " "left or top edge of the screen and one preceded by ``-`` from the right or " -"bottom edge. An empty string cancels any user-specified geometry, letting " -"the window revert to its natural size. With no argument, return the current " -"geometry as a string of the form ``'200x200+10+10'``. :meth:`wm_geometry` is " -"an alias of :meth:`!geometry`." +"bottom edge. An offset can be negative, as in ``'200x100+-9+-8'``, when the " +"window edge is positioned beyond the corresponding screen edge. An empty " +"string cancels any user-specified geometry, letting the window revert to its " +"natural size. With no argument, return the current geometry as a string of " +"the form ``'200x200+10+10'``. :meth:`wm_geometry` is an alias of :meth:`!" +"geometry`." msgstr "" -#: ../../../library/tkinter.rst:2638 +#: ../../../library/tkinter.rst:2631 msgid "" "Manage the window as a gridded window and define the relationship between " "grid units and pixels. *baseWidth* and *baseHeight* are the numbers of grid " "units for the window's internally requested size, and *widthInc* and " "*heightInc* are the pixel sizes of a horizontal and vertical grid unit. " "Empty strings turn off gridded management. With no arguments, return a tuple " -"of the four current values, or an empty string if the window is not " -"gridded. :meth:`wm_grid` is an alias of :meth:`!grid`." +"of the four current values, or ``None`` if the window is not gridded. :meth:" +"`wm_grid` is an alias of :meth:`!grid`." msgstr "" -#: ../../../library/tkinter.rst:2648 +#: ../../../library/tkinter.rst:2641 msgid "Not to be confused with the grid geometry manager :meth:`Grid.grid`." msgstr "" -#: ../../../library/tkinter.rst:2655 +#: ../../../library/tkinter.rst:2648 msgid "" "Set or query the leader of a group of related windows. *pathName* gives the " "path name of the group leader; the window manager may, for example, unmap " @@ -3435,7 +3411,7 @@ msgid "" "of :meth:`!group`." msgstr "" -#: ../../../library/tkinter.rst:2669 +#: ../../../library/tkinter.rst:2662 msgid "" "Set a badge for the window's icon, intended for display in the Dock (macOS), " "taskbar (Windows) or app panel (X11). *badge* may be a positive integer (for " @@ -3446,11 +3422,11 @@ msgid "" "iconbadge`." msgstr "" -#: ../../../library/tkinter.rst:2680 +#: ../../../library/tkinter.rst:2673 msgid "Requires Tk 9.0 or newer." msgstr "" -#: ../../../library/tkinter.rst:2687 +#: ../../../library/tkinter.rst:2680 msgid "" "Set or query the bitmap used by the window manager for the window's icon. " "*bitmap* names a bitmap in one of the standard forms accepted by Tk; an " @@ -3461,14 +3437,14 @@ msgid "" "is an alias of :meth:`!iconbitmap`." msgstr "" -#: ../../../library/tkinter.rst:2701 +#: ../../../library/tkinter.rst:2694 msgid "" "Iconify the window. If the window has not yet been mapped for the first " "time, arrange for it to appear in the iconified state when it is eventually " "mapped. :meth:`wm_iconify` is an alias of :meth:`!iconify`." msgstr "" -#: ../../../library/tkinter.rst:2711 +#: ../../../library/tkinter.rst:2704 msgid "" "Set or query the bitmap used as a mask for the icon (see :meth:" "`iconbitmap`). Where the mask is zero no icon is displayed; where it is one, " @@ -3478,7 +3454,7 @@ msgid "" "iconmask`." msgstr "" -#: ../../../library/tkinter.rst:2725 +#: ../../../library/tkinter.rst:2718 msgid "" "Set or query the name displayed by the window manager inside the window's " "icon. With no argument, return the current icon name, or an empty string if " @@ -3486,7 +3462,7 @@ msgid "" "window's title). :meth:`wm_iconname` is an alias of :meth:`!iconname`." msgstr "" -#: ../../../library/tkinter.rst:2737 +#: ../../../library/tkinter.rst:2730 msgid "" "Set the titlebar icon for the window from one or more :class:`PhotoImage` " "objects given in *images*. Several images of different sizes (for example " @@ -3498,16 +3474,15 @@ msgid "" "meth:`!iconphoto`." msgstr "" -#: ../../../library/tkinter.rst:2755 +#: ../../../library/tkinter.rst:2748 msgid "" "Set or query a hint to the window manager about where the window's icon " "should be positioned. Empty strings cancel an existing hint. With no " -"arguments, return a tuple of the two current values, or an empty string if " -"no hint is in effect. :meth:`wm_iconposition` is an alias of :meth:`!" -"iconposition`." +"arguments, return a tuple of the two current values, or ``None`` if no hint " +"is in effect. :meth:`wm_iconposition` is an alias of :meth:`!iconposition`." msgstr "" -#: ../../../library/tkinter.rst:2767 +#: ../../../library/tkinter.rst:2760 msgid "" "Set or query the window used as the icon for the window. When the window is " "iconified, *pathName* is mapped to serve as its icon and unmapped again when " @@ -3518,15 +3493,16 @@ msgid "" "`!iconwindow`." msgstr "" -#: ../../../library/tkinter.rst:2782 +#: ../../../library/tkinter.rst:2775 msgid "" "Make *widget* a stand-alone top-level window, decorated by the window " "manager with a title bar and so on. Only :class:`Frame`, :class:`LabelFrame` " -"and :class:`Toplevel` widgets may be used; passing any other widget type " -"raises an error. :meth:`wm_manage` is an alias of :meth:`!manage`." +"and :class:`Toplevel` widgets may be used (the :mod:`tkinter.ttk` versions " +"are **not** accepted); passing any other widget type raises an error. :meth:" +"`wm_manage` is an alias of :meth:`!manage`." msgstr "" -#: ../../../library/tkinter.rst:2795 +#: ../../../library/tkinter.rst:2789 msgid "" "Set or query the maximum permissible dimensions of the window, in pixels (or " "grid units for a gridded window). The window manager restricts the window to " @@ -3535,7 +3511,7 @@ msgid "" "of the screen. :meth:`wm_maxsize` is an alias of :meth:`!maxsize`." msgstr "" -#: ../../../library/tkinter.rst:2809 +#: ../../../library/tkinter.rst:2803 msgid "" "Set or query the minimum permissible dimensions of the window, in pixels (or " "grid units for a gridded window). The window manager restricts the window to " @@ -3544,18 +3520,19 @@ msgid "" "pixel in each dimension. :meth:`wm_minsize` is an alias of :meth:`!minsize`." msgstr "" -#: ../../../library/tkinter.rst:2823 +#: ../../../library/tkinter.rst:2817 msgid "" "Set or query the override-redirect flag for the window. When this flag is " "set, the window is ignored by the window manager: it is not reparented into " "a decorative frame and the user cannot manipulate it through the usual " "window manager controls. With no argument, return a boolean indicating " -"whether the flag is set. The flag is reliably honored only when the window " -"is first mapped or remapped from the withdrawn state. :meth:" -"`wm_overrideredirect` is an alias of :meth:`!overrideredirect`." +"whether the flag is set, or ``None`` if it has not been set. The flag is " +"reliably honored only when the window is first mapped or remapped from the " +"withdrawn state. :meth:`wm_overrideredirect` is an alias of :meth:`!" +"overrideredirect`." msgstr "" -#: ../../../library/tkinter.rst:2837 +#: ../../../library/tkinter.rst:2832 msgid "" "Set or query the source of the window's current position. *who* is either " "``'program'`` or ``'user'`` and indicates whether the position was requested " @@ -3566,7 +3543,7 @@ msgid "" "meth:`wm_positionfrom` is an alias of :meth:`!positionfrom`." msgstr "" -#: ../../../library/tkinter.rst:2852 +#: ../../../library/tkinter.rst:2847 msgid "" "Register *func* as the handler for the window manager protocol *name*, an " "atom such as ``'WM_DELETE_WINDOW'``, ``'WM_SAVE_YOURSELF'`` or " @@ -3580,7 +3557,7 @@ msgid "" "meth:`wm_protocol` is an alias of :meth:`!protocol`." msgstr "" -#: ../../../library/tkinter.rst:2870 +#: ../../../library/tkinter.rst:2865 msgid "" "Control whether the user may interactively resize the window. *width* and " "*height* are boolean values that determine whether the window's width and " @@ -3590,7 +3567,7 @@ msgid "" "of :meth:`!resizable`." msgstr "" -#: ../../../library/tkinter.rst:2883 +#: ../../../library/tkinter.rst:2878 msgid "" "Set or query the source of the window's current size. *who* is either " "``'program'`` or ``'user'`` and indicates whether the size was requested by " @@ -3599,7 +3576,7 @@ msgid "" "set. :meth:`wm_sizefrom` is an alias of :meth:`!sizefrom`." msgstr "" -#: ../../../library/tkinter.rst:2896 +#: ../../../library/tkinter.rst:2891 msgid "" "Query the stacking order of top-level windows. With no arguments, return a " "list of the mapped top-level widgets in stacking order, from lowest to " @@ -3610,7 +3587,7 @@ msgid "" "`wm_stackorder` is an alias of :meth:`!stackorder`." msgstr "" -#: ../../../library/tkinter.rst:2912 +#: ../../../library/tkinter.rst:2907 msgid "" "Set or query the state of the window. With no argument, return the current " "state: one of ``'normal'``, ``'iconic'``, ``'withdrawn'``, ``'icon'`` or, on " @@ -3620,12 +3597,12 @@ msgid "" "set. :meth:`wm_state` is an alias of :meth:`!state`." msgstr "" -#: ../../../library/tkinter.rst:2921 +#: ../../../library/tkinter.rst:2916 msgid "" "Not to be confused with :meth:`ttk.Widget.state `." msgstr "" -#: ../../../library/tkinter.rst:2929 +#: ../../../library/tkinter.rst:2924 msgid "" "Set or query the title for the window, which the window manager should " "display in the window's title bar. With no argument, return the current " @@ -3633,7 +3610,7 @@ msgid "" "of :meth:`!title`." msgstr "" -#: ../../../library/tkinter.rst:2940 +#: ../../../library/tkinter.rst:2935 msgid "" "Mark the window as a transient window (such as a pull-down menu or dialog) " "working on behalf of *master*, the path name of another top-level window. An " @@ -3644,7 +3621,7 @@ msgid "" "`wm_transient` is an alias of :meth:`!transient`." msgstr "" -#: ../../../library/tkinter.rst:2956 +#: ../../../library/tkinter.rst:2951 msgid "" "Withdraw the window from the screen, unmapping it and causing the window " "manager to forget about it. If the window has never been mapped, it is " @@ -3654,15 +3631,16 @@ msgid "" "`wm_withdraw` is an alias of :meth:`!withdraw`." msgstr "" -#: ../../../library/tkinter.rst:2968 +#: ../../../library/tkinter.rst:2963 msgid "" "Geometry manager that arranges widgets by packing them against the sides of " "their container. The :class:`!Pack` mix-in is inherited by all widgets " "(through :class:`Widget`) and provides the methods for managing a widget " -"with the *pack* geometry manager. See also :ref:`pack-the-packer`." +"with the *pack* geometry manager. See also :ref:`tkinter-geometry-" +"management`." msgstr "" -#: ../../../library/tkinter.rst:2977 +#: ../../../library/tkinter.rst:2972 msgid "" ":class:`Pack`, :class:`Place` and :class:`Grid` all define the short method " "names :meth:`!forget`, :meth:`!info`, :meth:`!slaves`, :meth:`!content` and :" @@ -3675,112 +3653,112 @@ msgid "" "``place`` for geometry configuration) to act on a specific geometry manager." msgstr "" -#: ../../../library/tkinter.rst:2999 +#: ../../../library/tkinter.rst:2994 msgid "" "Pack the widget inside its container, positioning it relative to the " "siblings already packed there. The supported options are:" msgstr "" -#: ../../../library/tkinter.rst:3003 +#: ../../../library/tkinter.rst:2998 msgid "*side*" msgstr "" -#: ../../../library/tkinter.rst:3004 +#: ../../../library/tkinter.rst:2999 msgid "" "Which side of the container to pack the widget against: ``'top'`` (the " "default), ``'bottom'``, ``'left'`` or ``'right'``." msgstr "" -#: ../../../library/tkinter.rst:3007 ../../../library/tkinter.rst:3546 +#: ../../../library/tkinter.rst:3002 ../../../library/tkinter.rst:3662 msgid "*fill*" msgstr "" -#: ../../../library/tkinter.rst:3008 +#: ../../../library/tkinter.rst:3003 msgid "" "Whether to stretch the widget to fill its parcel: ``'none'`` (the default), " "``'x'``, ``'y'`` or ``'both'``." msgstr "" -#: ../../../library/tkinter.rst:3011 +#: ../../../library/tkinter.rst:3006 msgid "*expand*" msgstr "" -#: ../../../library/tkinter.rst:3012 +#: ../../../library/tkinter.rst:3007 msgid "" "Whether the widget should expand to consume any extra space in its container " "(a boolean, default false)." msgstr "" -#: ../../../library/tkinter.rst:3015 ../../../library/tkinter.rst:3130 -#: ../../../library/tkinter.rst:3656 ../../../library/tkinter.rst:3675 -#: ../../../library/tkinter.rst:3690 ../../../library/tkinter.rst:3703 +#: ../../../library/tkinter.rst:3010 ../../../library/tkinter.rst:3126 +#: ../../../library/tkinter.rst:3772 ../../../library/tkinter.rst:3791 +#: ../../../library/tkinter.rst:3806 ../../../library/tkinter.rst:3819 msgid "*anchor*" msgstr "" -#: ../../../library/tkinter.rst:3016 +#: ../../../library/tkinter.rst:3011 msgid "" "Where to position the widget in its parcel when the parcel is larger than " "the widget: an anchor such as ``'n'`` or ``'sw'`` (default ``'center'``)." msgstr "" -#: ../../../library/tkinter.rst:3020 ../../../library/tkinter.rst:3232 +#: ../../../library/tkinter.rst:3015 ../../../library/tkinter.rst:3229 msgid "*ipadx*, *ipady*" msgstr "" -#: ../../../library/tkinter.rst:3021 ../../../library/tkinter.rst:3233 +#: ../../../library/tkinter.rst:3016 ../../../library/tkinter.rst:3230 msgid "" "Internal padding added on the left and right (*ipadx*) or top and bottom " "(*ipady*) of the widget, as a screen distance (default ``0``)." msgstr "" -#: ../../../library/tkinter.rst:3024 ../../../library/tkinter.rst:3236 +#: ../../../library/tkinter.rst:3019 ../../../library/tkinter.rst:3233 msgid "*padx*, *pady*" msgstr "" -#: ../../../library/tkinter.rst:3025 ../../../library/tkinter.rst:3237 +#: ../../../library/tkinter.rst:3020 ../../../library/tkinter.rst:3234 msgid "" "External padding left on the left and right (*padx*) or top and bottom " "(*pady*) of the widget, as a screen distance or a pair of two distances for " "the two sides (default ``0``)." msgstr "" -#: ../../../library/tkinter.rst:3029 +#: ../../../library/tkinter.rst:3024 msgid "*after*" msgstr "" -#: ../../../library/tkinter.rst:3030 +#: ../../../library/tkinter.rst:3025 msgid "" "Pack the widget after the given widget in the packing order, using the same " "container." msgstr "" -#: ../../../library/tkinter.rst:3033 +#: ../../../library/tkinter.rst:3028 msgid "*before*" msgstr "" -#: ../../../library/tkinter.rst:3034 +#: ../../../library/tkinter.rst:3029 msgid "" "Pack the widget before the given widget in the packing order, using the same " "container." msgstr "" -#: ../../../library/tkinter.rst:3037 ../../../library/tkinter.rst:3150 -#: ../../../library/tkinter.rst:3241 +#: ../../../library/tkinter.rst:3032 ../../../library/tkinter.rst:3146 +#: ../../../library/tkinter.rst:3238 msgid "*in_*" msgstr "" -#: ../../../library/tkinter.rst:3038 +#: ../../../library/tkinter.rst:3033 msgid "" "The container in which to pack the widget; it defaults to the parent widget." msgstr "" -#: ../../../library/tkinter.rst:3041 +#: ../../../library/tkinter.rst:3036 msgid "" ":meth:`pack`, :meth:`configure` and :meth:`config` are aliases of :meth:`!" "pack_configure`." msgstr "" -#: ../../../library/tkinter.rst:3049 +#: ../../../library/tkinter.rst:3044 msgid "" "Unmap the widget and remove it from the packing order, forgetting its " "packing options. It can be packed again later with :meth:`pack_configure`. :" @@ -3790,63 +3768,63 @@ msgid "" "forget` method." msgstr "" -#: ../../../library/tkinter.rst:3058 +#: ../../../library/tkinter.rst:3053 msgid "Not to be confused with :meth:`Wm.forget`." msgstr "" -#: ../../../library/tkinter.rst:3065 +#: ../../../library/tkinter.rst:3060 msgid "" "Return a dictionary of the widget's current packing options. :meth:`info` is " "an alias of :meth:`!pack_info`." msgstr "" -#: ../../../library/tkinter.rst:3075 +#: ../../../library/tkinter.rst:3070 msgid "" "Same as :meth:`Misc.pack_propagate`, treating this widget as a container: " "enable or disable geometry propagation. :meth:`propagate` is an alias of :" "meth:`!pack_propagate`." msgstr "" -#: ../../../library/tkinter.rst:3084 +#: ../../../library/tkinter.rst:3079 msgid "" "Same as :meth:`Misc.pack_slaves`: return the list of widgets packed in this " "widget. :meth:`slaves` is an alias of :meth:`!pack_slaves`." msgstr "" -#: ../../../library/tkinter.rst:3093 +#: ../../../library/tkinter.rst:3088 msgid "" "Same as :meth:`Misc.pack_content`. :meth:`content` is an alias of :meth:`!" "pack_content`." msgstr "" -#: ../../../library/tkinter.rst:3101 +#: ../../../library/tkinter.rst:3096 msgid "" "Geometry manager that places widgets at explicit positions and sizes within " "their container. The :class:`!Place` mix-in is inherited by all widgets " -"(through :class:`Widget`)." +"(through :class:`Widget`). See also :ref:`tkinter-geometry-management`." msgstr "" -#: ../../../library/tkinter.rst:3115 +#: ../../../library/tkinter.rst:3111 msgid "" "Place the widget inside its container at an absolute or relative position. " "The supported options are:" msgstr "" -#: ../../../library/tkinter.rst:3119 +#: ../../../library/tkinter.rst:3115 msgid "*x*, *y*" msgstr "" -#: ../../../library/tkinter.rst:3120 +#: ../../../library/tkinter.rst:3116 msgid "" "The absolute horizontal and vertical position of the widget's anchor point, " "as a screen distance (default ``0``)." msgstr "" -#: ../../../library/tkinter.rst:3123 +#: ../../../library/tkinter.rst:3119 msgid "*relx*, *rely*" msgstr "" -#: ../../../library/tkinter.rst:3124 +#: ../../../library/tkinter.rst:3120 msgid "" "The horizontal and vertical position of the widget's anchor point as a " "fraction of the container's width and height, where ``0.0`` is the left or " @@ -3854,100 +3832,101 @@ msgid "" "the relative option are given, their values are summed." msgstr "" -#: ../../../library/tkinter.rst:3131 +#: ../../../library/tkinter.rst:3127 msgid "" "Which point of the widget is placed at the given position: an anchor such as " "``'n'`` or ``'se'`` (default ``'nw'``)." msgstr "" -#: ../../../library/tkinter.rst:3134 ../../../library/tkinter.rst:3706 +#: ../../../library/tkinter.rst:3130 ../../../library/tkinter.rst:3822 msgid "*width*, *height*" msgstr "" -#: ../../../library/tkinter.rst:3135 +#: ../../../library/tkinter.rst:3131 msgid "" "The absolute width and height of the widget, as a screen distance. By " "default the widget's requested size is used." msgstr "" -#: ../../../library/tkinter.rst:3138 +#: ../../../library/tkinter.rst:3134 msgid "*relwidth*, *relheight*" msgstr "" -#: ../../../library/tkinter.rst:3139 +#: ../../../library/tkinter.rst:3135 msgid "" "The width and height of the widget as a fraction of the container's width " "and height. If both the absolute and the relative option are given, their " "values are summed." msgstr "" -#: ../../../library/tkinter.rst:3144 +#: ../../../library/tkinter.rst:3140 msgid "*bordermode*" msgstr "" -#: ../../../library/tkinter.rst:3145 +#: ../../../library/tkinter.rst:3141 msgid "" "How the container's border affects placement: ``'inside'`` (the default) " "measures the area inside the border, ``'outside'`` measures the area " "including the border, and ``'ignore'`` uses the official X area." msgstr "" -#: ../../../library/tkinter.rst:3151 +#: ../../../library/tkinter.rst:3147 msgid "" "The container relative to which the widget is placed; it must be the " "widget's parent or a descendant of the parent, and defaults to the parent." msgstr "" -#: ../../../library/tkinter.rst:3155 +#: ../../../library/tkinter.rst:3151 msgid "" ":meth:`place`, :meth:`configure` and :meth:`config` are aliases of :meth:`!" "place_configure`." msgstr "" -#: ../../../library/tkinter.rst:3163 +#: ../../../library/tkinter.rst:3159 msgid "" "Unmap the widget and remove it from the placement, forgetting its place " "options." msgstr "" -#: ../../../library/tkinter.rst:3171 +#: ../../../library/tkinter.rst:3167 msgid "Return a dictionary of the widget's current place options." msgstr "" -#: ../../../library/tkinter.rst:3178 +#: ../../../library/tkinter.rst:3174 msgid "" "Same as :meth:`Misc.place_slaves`: return the list of widgets placed in this " "widget." msgstr "" -#: ../../../library/tkinter.rst:3186 +#: ../../../library/tkinter.rst:3182 msgid "Same as :meth:`Misc.place_content`." msgstr "" -#: ../../../library/tkinter.rst:3193 +#: ../../../library/tkinter.rst:3189 msgid "" "Geometry manager that arranges widgets in a two-dimensional grid of rows and " "columns within their container. The :class:`!Grid` mix-in is inherited by " -"all widgets (through :class:`Widget`)." +"all widgets (through :class:`Widget`). See also :ref:`tkinter-geometry-" +"management`." msgstr "" -#: ../../../library/tkinter.rst:3207 +#: ../../../library/tkinter.rst:3204 msgid "Position the widget in a cell of its container's grid." msgstr "" -#: ../../../library/tkinter.rst:3209 +#: ../../../library/tkinter.rst:3206 msgid "Not to be confused with :meth:`Wm.grid`." msgstr "" -#: ../../../library/tkinter.rst:3211 +#: ../../../library/tkinter.rst:3208 msgid "The supported options are:" msgstr "" -#: ../../../library/tkinter.rst:3213 +#: ../../../library/tkinter.rst:3210 msgid "*row*, *column*" msgstr "" -#: ../../../library/tkinter.rst:3214 +#: ../../../library/tkinter.rst:3211 msgid "" "The row and column of the cell to place the widget in, counting from ``0``. " "*column* defaults to the column after the previous widget placed in the " @@ -3955,19 +3934,19 @@ msgid "" "empty row." msgstr "" -#: ../../../library/tkinter.rst:3220 +#: ../../../library/tkinter.rst:3217 msgid "*rowspan*, *columnspan*" msgstr "" -#: ../../../library/tkinter.rst:3221 +#: ../../../library/tkinter.rst:3218 msgid "The number of rows and columns the widget should span (default ``1``)." msgstr "" -#: ../../../library/tkinter.rst:3223 +#: ../../../library/tkinter.rst:3220 msgid "*sticky*" msgstr "" -#: ../../../library/tkinter.rst:3224 +#: ../../../library/tkinter.rst:3221 msgid "" "How to position or stretch the widget when its cell is larger than the " "widget: a string containing zero or more of the characters ``'n'``, ``'s'``, " @@ -3977,34 +3956,34 @@ msgid "" "the widget at its requested size." msgstr "" -#: ../../../library/tkinter.rst:3242 +#: ../../../library/tkinter.rst:3239 msgid "" "The container in whose grid to place the widget; it defaults to the parent " "widget." msgstr "" -#: ../../../library/tkinter.rst:3245 +#: ../../../library/tkinter.rst:3242 msgid "" ":meth:`grid`, :meth:`configure` and :meth:`config` are aliases of :meth:`!" "grid_configure`." msgstr "" -#: ../../../library/tkinter.rst:3253 +#: ../../../library/tkinter.rst:3250 msgid "" "Unmap the widget and remove it from the grid, forgetting its grid options." msgstr "" -#: ../../../library/tkinter.rst:3258 +#: ../../../library/tkinter.rst:3255 msgid "" "Unmap the widget and remove it from the grid, but remember its grid options " "so that it is restored to the same cell if it is gridded again." msgstr "" -#: ../../../library/tkinter.rst:3266 +#: ../../../library/tkinter.rst:3263 msgid "Return a dictionary of the widget's current grid options." msgstr "" -#: ../../../library/tkinter.rst:3273 +#: ../../../library/tkinter.rst:3270 msgid "" "Same as :meth:`Misc.grid_bbox`. :meth:`bbox` is an alias of :meth:`!" "grid_bbox`, except on :class:`Canvas`, :class:`Listbox`, :class:`Spinbox`, :" @@ -4013,27 +3992,27 @@ msgid "" "method." msgstr "" -#: ../../../library/tkinter.rst:3285 +#: ../../../library/tkinter.rst:3282 msgid "" "Same as :meth:`Misc.grid_columnconfigure`: query or set the options (such as " "*weight*, *minsize*, *pad* and *uniform*) of a grid column. :meth:" "`columnconfigure` is an alias of :meth:`!grid_columnconfigure`." msgstr "" -#: ../../../library/tkinter.rst:3294 +#: ../../../library/tkinter.rst:3291 msgid "" "Same as :meth:`Misc.grid_rowconfigure`: query or set the options of a grid " "row. :meth:`rowconfigure` is an alias of :meth:`!grid_rowconfigure`." msgstr "" -#: ../../../library/tkinter.rst:3303 +#: ../../../library/tkinter.rst:3300 msgid "" "Same as :meth:`Misc.grid_location`: return the ``(column, row)`` of the cell " "that covers the pixel at *x*, *y*. :meth:`location` is an alias of :meth:`!" "grid_location`." msgstr "" -#: ../../../library/tkinter.rst:3312 +#: ../../../library/tkinter.rst:3309 msgid "" "Same as :meth:`Misc.grid_size`: return a ``(columns, rows)`` tuple giving " "the size of the grid. :meth:`size` is an alias of :meth:`!grid_size`, except " @@ -4041,21 +4020,21 @@ msgid "" "provide their own :meth:`!size` method." msgstr "" -#: ../../../library/tkinter.rst:3326 +#: ../../../library/tkinter.rst:3323 msgid "Same as :meth:`Misc.grid_propagate`." msgstr "" -#: ../../../library/tkinter.rst:3333 +#: ../../../library/tkinter.rst:3330 msgid "" "Same as :meth:`Misc.grid_slaves`: return the widgets managed in the grid, " "optionally restricted to a *row* and/or *column*." msgstr "" -#: ../../../library/tkinter.rst:3341 +#: ../../../library/tkinter.rst:3338 msgid "Same as :meth:`Misc.grid_content`." msgstr "" -#: ../../../library/tkinter.rst:3348 +#: ../../../library/tkinter.rst:3345 msgid "" "Mix-in providing the horizontal-scrolling interface shared by widgets such " "as :class:`Entry`, :class:`Canvas`, :class:`Listbox`, :class:`Text` and :" @@ -4063,7 +4042,7 @@ msgid "" "*command* of a horizontal :class:`Scrollbar`." msgstr "" -#: ../../../library/tkinter.rst:3356 +#: ../../../library/tkinter.rst:3353 msgid "" "Query or change the horizontal position of the view. With no arguments, " "return a tuple ``(first, last)`` of two fractions between 0 and 1 giving the " @@ -4073,27 +4052,27 @@ msgid "" "convenient interface." msgstr "" -#: ../../../library/tkinter.rst:3366 +#: ../../../library/tkinter.rst:3363 msgid "" "Adjust the view so that *fraction* of the total width of the document is off-" "screen to the left. *fraction* is a number between 0 and 1." msgstr "" -#: ../../../library/tkinter.rst:3372 +#: ../../../library/tkinter.rst:3369 msgid "" "Shift the view left or right by *number* units. *what* is either ``'units'`` " "or ``'pages'``; a negative *number* scrolls left and a positive one scrolls " "right." msgstr "" -#: ../../../library/tkinter.rst:3379 +#: ../../../library/tkinter.rst:3376 msgid "" "Mix-in providing the vertical-scrolling interface shared by widgets such as :" "class:`Canvas`, :class:`Listbox` and :class:`Text`. A widget's :meth:`yview` " "method is registered as the *command* of a vertical :class:`Scrollbar`." msgstr "" -#: ../../../library/tkinter.rst:3386 +#: ../../../library/tkinter.rst:3383 msgid "" "Query or change the vertical position of the view. With no arguments, return " "a tuple ``(first, last)`` of two fractions between 0 and 1 giving the " @@ -4103,19 +4082,19 @@ msgid "" "convenient interface." msgstr "" -#: ../../../library/tkinter.rst:3396 +#: ../../../library/tkinter.rst:3393 msgid "" "Adjust the view so that *fraction* of the total height of the document is " "off-screen above the top. *fraction* is a number between 0 and 1." msgstr "" -#: ../../../library/tkinter.rst:3402 +#: ../../../library/tkinter.rst:3399 msgid "" "Shift the view up or down by *number* units. *what* is either ``'units'`` or " "``'pages'``; a negative *number* scrolls up and a positive one scrolls down." msgstr "" -#: ../../../library/tkinter.rst:3409 +#: ../../../library/tkinter.rst:3406 msgid "" "Internal base class for all widgets. It inherits from :class:`Misc` and adds " "the machinery that creates the underlying Tk widget; application code " @@ -4123,13 +4102,13 @@ msgid "" "instantiating :class:`!BaseWidget` directly." msgstr "" -#: ../../../library/tkinter.rst:3417 +#: ../../../library/tkinter.rst:3414 msgid "" "Destroy this widget and all of its children, removing the corresponding Tk " "widgets and deleting the associated Tcl commands." msgstr "" -#: ../../../library/tkinter.rst:3423 +#: ../../../library/tkinter.rst:3420 msgid "" "Internal base class for the standard widgets. It combines :class:" "`BaseWidget` with the geometry-manager mix-ins :class:`Pack`, :class:`Place` " @@ -4138,7 +4117,173 @@ msgid "" "`Label`, and so on) derive from :class:`!Widget`." msgstr "" -#: ../../../library/tkinter.rst:3433 +#: ../../../library/tkinter.rst:3429 +msgid "Toplevel widgets" +msgstr "" + +#: ../../../library/tkinter.rst:3433 +msgid "" +"Construct a toplevel Tk widget, which is usually the main window of an " +"application, and initialize a Tcl interpreter for this widget. Each " +"instance has its own associated Tcl interpreter. Inherits from :class:`Misc` " +"and :class:`Wm`." +msgstr "" + +#: ../../../library/tkinter.rst:3438 +msgid "" +"To create a Tcl interpreter without initializing the Tk subsystem, use the :" +"func:`Tcl` factory function instead." +msgstr "" + +#: ../../../library/tkinter.rst:3441 +msgid "" +"The :class:`Tk` class is typically instantiated using all default values. " +"However, the following keyword arguments are currently recognized:" +msgstr "" + +#: ../../../library/tkinter.rst:3444 +msgid "*screenName*" +msgstr "" + +#: ../../../library/tkinter.rst:3445 +msgid "" +"When given (as a string), sets the :envvar:`DISPLAY` environment variable. " +"(X11 only)" +msgstr "" + +#: ../../../library/tkinter.rst:3447 +msgid "*baseName*" +msgstr "" + +#: ../../../library/tkinter.rst:3448 +msgid "" +"Name of the profile file. By default, *baseName* is derived from the " +"program name (``sys.argv[0]``)." +msgstr "" + +#: ../../../library/tkinter.rst:3450 +msgid "*className*" +msgstr "" + +#: ../../../library/tkinter.rst:3451 +msgid "" +"Name of the widget class. Used as a profile file and also as the name with " +"which Tcl is invoked (*argv0* in *interp*)." +msgstr "" + +#: ../../../library/tkinter.rst:3453 +msgid "*useTk*" +msgstr "" + +#: ../../../library/tkinter.rst:3454 +msgid "" +"If ``True``, initialize the Tk subsystem. The :func:`tkinter.Tcl() ` " +"function sets this to ``False``." +msgstr "" + +#: ../../../library/tkinter.rst:3456 +msgid "*sync*" +msgstr "" + +#: ../../../library/tkinter.rst:3457 +msgid "" +"If ``True``, execute all X server commands synchronously, so that errors are " +"reported immediately. Can be used for debugging. (X11 only)" +msgstr "" + +#: ../../../library/tkinter.rst:3459 +msgid "*use*" +msgstr "" + +#: ../../../library/tkinter.rst:3460 +msgid "" +"Specifies the *id* of the window in which to embed the application, instead " +"of it being created as an independent toplevel window. *id* must be " +"specified in the same way as the value for the -use option for toplevel " +"widgets (that is, it has a form like that returned by :meth:`~Misc." +"winfo_id`)." +msgstr "" + +#: ../../../library/tkinter.rst:3466 +msgid "" +"Note that on some platforms this will only work correctly if *id* refers to " +"a Tk frame or toplevel that has its -container option enabled." +msgstr "" + +#: ../../../library/tkinter.rst:3469 +msgid "" +":class:`Tk` reads and interprets profile files, named :file:`.{className}." +"tcl` and :file:`.{baseName}.tcl`, into the Tcl interpreter and calls :func:" +"`exec` on the contents of :file:`.{className}.py` and :file:`.{baseName}." +"py`. The path for the profile files is the :envvar:`HOME` environment " +"variable or, if that isn't defined, then :data:`os.curdir`." +msgstr "" + +#: ../../../library/tkinter.rst:3478 +msgid "" +"On Windows, creating a Tcl interpreter (by instantiating :class:`Tk` or " +"calling :func:`Tcl`) sets the :envvar:`HOME` environment variable for the " +"process, if it is not already set, to ``%HOMEDRIVE%%HOMEPATH%`` (or :envvar:" +"`USERPROFILE`, or ``c:\\``). This is done by Tcl and can affect other code " +"that reads :envvar:`HOME`." +msgstr "" + +#: ../../../library/tkinter.rst:3486 +msgid "" +"The Tk application object created by instantiating :class:`Tk`. This " +"provides access to the Tcl interpreter. Each widget that is attached the " +"same instance of :class:`Tk` has the same value for its :attr:`tk` attribute." +msgstr "" + +#: ../../../library/tkinter.rst:3493 +msgid "" +"The widget object that contains this widget. For :class:`Tk`, the :attr:`!" +"master` is :const:`None` because it is the main window. The terms *master* " +"and *parent* are similar and sometimes used interchangeably as argument " +"names; however, calling :meth:`~Misc.winfo_parent` returns a string of the " +"widget name whereas :attr:`!master` returns the object. *parent*/*child* " +"reflects the tree-like relationship while *master* (or *container*)/" +"*content* reflects the container structure." +msgstr "" + +#: ../../../library/tkinter.rst:3505 +msgid "" +"The immediate descendants of this widget as a :class:`dict` with the child " +"widget names as the keys and the child instance objects as the values." +msgstr "" + +#: ../../../library/tkinter.rst:3511 +msgid "" +"Destroy this and all descendant widgets and, for the main window, end the " +"connection to the underlying Tcl interpreter." +msgstr "" + +#: ../../../library/tkinter.rst:3516 +msgid "" +"Finish loading and initializing the Tk subsystem. This is needed only when " +"the interpreter was created without Tk (for example through :func:`Tcl`); it " +"is called automatically when *useTk* is true." +msgstr "" + +#: ../../../library/tkinter.rst:3523 +msgid "" +"Read and source the user's profile files :file:`.{className}.tcl` and :file:" +"`.{baseName}.tcl` into the Tcl interpreter, and execute the corresponding :" +"file:`.{className}.py` and :file:`.{baseName}.py` files. This is called " +"during initialization; see the description of the constructor above." +msgstr "" + +#: ../../../library/tkinter.rst:3531 +msgid "" +"Report a callback exception. This is called when an exception propagates out " +"of a Tkinter callback; *exc*, *val* and *tb* are the exception type, value " +"and traceback as returned by :func:`sys.exc_info`. The default " +"implementation prints a traceback to :data:`sys.stderr`. It can be " +"overridden to customize error handling, for example to display the traceback " +"in a dialog." +msgstr "" + +#: ../../../library/tkinter.rst:3542 msgid "" "A :class:`!Toplevel` widget is a top-level window, similar to a :class:" "`Frame` except that its X parent is the root window of a screen rather than " @@ -4151,11 +4296,11 @@ msgid "" "options." msgstr "" -#: ../../../library/tkinter.rst:3447 +#: ../../../library/tkinter.rst:3556 msgid "Widget classes" msgstr "" -#: ../../../library/tkinter.rst:3451 +#: ../../../library/tkinter.rst:3560 msgid "" "A :class:`!Button` widget displays a textual string, bitmap or image and " "invokes a command when the user presses it (by clicking mouse button 1 over " @@ -4166,14 +4311,14 @@ msgid "" "*textvariable*, *state* and *default*." msgstr "" -#: ../../../library/tkinter.rst:3461 +#: ../../../library/tkinter.rst:3570 msgid "" "Invoke the command associated with the button, if there is one, and return " "its result, or an empty string if no command is associated with the button. " "This is ignored if the button's state is ``disabled``." msgstr "" -#: ../../../library/tkinter.rst:3468 +#: ../../../library/tkinter.rst:3577 msgid "" "Flash the button by redisplaying it several times, alternating between the " "active and normal colors. At the end of the flash the button is left in the " @@ -4181,7 +4326,7 @@ msgid "" "if the button's state is ``disabled``." msgstr "" -#: ../../../library/tkinter.rst:3477 +#: ../../../library/tkinter.rst:3586 msgid "" "A :class:`!Canvas` widget implements structured graphics. It displays any " "number of *items*, such as arcs, lines, ovals, polygons, rectangles, text, " @@ -4192,7 +4337,7 @@ msgid "" "manual page for the full list of widget and item options." msgstr "" -#: ../../../library/tkinter.rst:3487 +#: ../../../library/tkinter.rst:3596 msgid "" "Each item has a unique integer *id*, assigned when it is created, and zero " "or more string *tags*. A tag is an arbitrary string that does not have the " @@ -4208,7 +4353,7 @@ msgid "" "in the display list." msgstr "" -#: ../../../library/tkinter.rst:3502 +#: ../../../library/tkinter.rst:3611 msgid "" "The items are kept in a *display list* that determines drawing order: items " "later in the list are drawn on top of earlier ones. A newly created item is " @@ -4216,7 +4361,13 @@ msgid "" "`tag_raise` and :meth:`tag_lower`." msgstr "" -#: ../../../library/tkinter.rst:3517 +#: ../../../library/tkinter.rst:3618 +msgid "" +"Print the contents of the canvas using the native print dialog. Requires Tk " +"8.7/9.0 or newer." +msgstr "" + +#: ../../../library/tkinter.rst:3633 msgid "" "Create a new item of the corresponding type and return its integer id. Each " "method is called as ``create_TYPE(coord..., **options)``: the leading " @@ -4229,7 +4380,7 @@ msgid "" "in pixels." msgstr "" -#: ../../../library/tkinter.rst:3527 +#: ../../../library/tkinter.rst:3643 msgid "" "The item types are: ``arc`` (an arc-shaped region that is a section of an " "oval, defined by two diagonally opposite corners ``x1, y1, x2, y2`` of the " @@ -4244,48 +4395,48 @@ msgid "" "*window* option)." msgstr "" -#: ../../../library/tkinter.rst:3539 +#: ../../../library/tkinter.rst:3655 msgid "" "Most item types accept a common set of *standard item options*, plus a few " "options specific to each type. Option names are passed as keyword arguments, " "without the leading hyphen." msgstr "" -#: ../../../library/tkinter.rst:3544 +#: ../../../library/tkinter.rst:3660 msgid "The standard item options are:" msgstr "" -#: ../../../library/tkinter.rst:3547 +#: ../../../library/tkinter.rst:3663 msgid "" "The color used to fill the item's interior, or to draw a *line* item or the " "characters of a *text* item. An empty string (the default for all types " "except *line* and *text*) leaves the item unfilled." msgstr "" -#: ../../../library/tkinter.rst:3552 +#: ../../../library/tkinter.rst:3668 msgid "*outline*" msgstr "" -#: ../../../library/tkinter.rst:3553 +#: ../../../library/tkinter.rst:3669 msgid "" "The color used to draw the item's outline. An empty string draws no outline." msgstr "" -#: ../../../library/tkinter.rst:3556 ../../../library/tkinter.rst:3660 +#: ../../../library/tkinter.rst:3672 ../../../library/tkinter.rst:3776 msgid "*width*" msgstr "" -#: ../../../library/tkinter.rst:3557 +#: ../../../library/tkinter.rst:3673 msgid "" "The width of the outline, defaulting to ``1.0``. Has no effect if *outline* " "is empty." msgstr "" -#: ../../../library/tkinter.rst:3560 +#: ../../../library/tkinter.rst:3676 msgid "*dash*" msgstr "" -#: ../../../library/tkinter.rst:3561 +#: ../../../library/tkinter.rst:3677 msgid "" "A dash pattern for the outline, given either as a sequence of segment " "lengths in pixels or as a string of the characters ``'.'``, ``','``, " @@ -4293,68 +4444,68 @@ msgid "" "outline." msgstr "" -#: ../../../library/tkinter.rst:3566 +#: ../../../library/tkinter.rst:3682 msgid "*dashoffset*" msgstr "" -#: ../../../library/tkinter.rst:3567 +#: ../../../library/tkinter.rst:3683 msgid "" "The starting offset in pixels into the *dash* pattern. Ignored if there is " "no *dash* pattern." msgstr "" -#: ../../../library/tkinter.rst:3570 +#: ../../../library/tkinter.rst:3686 msgid "*stipple*" msgstr "" -#: ../../../library/tkinter.rst:3571 +#: ../../../library/tkinter.rst:3687 msgid "" "A bitmap used as a stipple pattern when filling the item. Only well " "supported on X11." msgstr "" -#: ../../../library/tkinter.rst:3574 +#: ../../../library/tkinter.rst:3690 msgid "*outlinestipple*" msgstr "" -#: ../../../library/tkinter.rst:3575 +#: ../../../library/tkinter.rst:3691 msgid "" "A bitmap used as a stipple pattern when drawing the outline. Has no effect " "if *outline* is empty." msgstr "" -#: ../../../library/tkinter.rst:3578 +#: ../../../library/tkinter.rst:3694 msgid "*offset*, *outlineoffset*" msgstr "" -#: ../../../library/tkinter.rst:3579 +#: ../../../library/tkinter.rst:3695 msgid "" "The offset of the fill and outline stipple patterns, given as ``'x,y'`` or " "as a side such as ``'n'``, ``'se'`` or ``'center'``. Stipple offsets are " "only supported on X11." msgstr "" -#: ../../../library/tkinter.rst:3583 ../../../library/tkinter.rst:4561 +#: ../../../library/tkinter.rst:3699 ../../../library/tkinter.rst:4677 msgid "*state*" msgstr "" -#: ../../../library/tkinter.rst:3584 +#: ../../../library/tkinter.rst:3700 msgid "" "Overrides the canvas state for this item; one of ``'normal'``, " "``'disabled'`` or ``'hidden'``." msgstr "" -#: ../../../library/tkinter.rst:3587 +#: ../../../library/tkinter.rst:3703 msgid "*tags*" msgstr "" -#: ../../../library/tkinter.rst:3588 +#: ../../../library/tkinter.rst:3704 msgid "" "A single tag or a sequence of tags to associate with the item, replacing any " "existing tags." msgstr "" -#: ../../../library/tkinter.rst:3591 +#: ../../../library/tkinter.rst:3707 msgid "" "Many of these options have *active...* and *disabled...* variants (such as " "*activefill*, *disabledfill*, *activewidth*, *disableddash*, " @@ -4363,196 +4514,196 @@ msgid "" "state." msgstr "" -#: ../../../library/tkinter.rst:3597 +#: ../../../library/tkinter.rst:3713 msgid "The following item types support additional options." msgstr "" -#: ../../../library/tkinter.rst:3599 +#: ../../../library/tkinter.rst:3715 msgid "For ``arc`` items:" msgstr "" -#: ../../../library/tkinter.rst:3601 +#: ../../../library/tkinter.rst:3717 msgid "*start*" msgstr "" -#: ../../../library/tkinter.rst:3602 +#: ../../../library/tkinter.rst:3718 msgid "" "The start of the arc's angular range, in degrees measured counter-clockwise " "from the 3-o'clock position." msgstr "" -#: ../../../library/tkinter.rst:3605 +#: ../../../library/tkinter.rst:3721 msgid "*extent*" msgstr "" -#: ../../../library/tkinter.rst:3606 +#: ../../../library/tkinter.rst:3722 msgid "" "The size of the angular range, in degrees counter-clockwise from *start*." msgstr "" -#: ../../../library/tkinter.rst:3609 +#: ../../../library/tkinter.rst:3725 msgid "*style*" msgstr "" -#: ../../../library/tkinter.rst:3610 +#: ../../../library/tkinter.rst:3726 msgid "" "How the arc is drawn: ``'pieslice'`` (the default), ``'chord'`` or ``'arc'``." msgstr "" -#: ../../../library/tkinter.rst:3613 +#: ../../../library/tkinter.rst:3729 msgid "For ``line`` items:" msgstr "" -#: ../../../library/tkinter.rst:3615 +#: ../../../library/tkinter.rst:3731 msgid "*arrow*" msgstr "" -#: ../../../library/tkinter.rst:3616 +#: ../../../library/tkinter.rst:3732 msgid "" "Where to draw arrowheads: ``'none'`` (the default), ``'first'``, ``'last'`` " "or ``'both'``." msgstr "" -#: ../../../library/tkinter.rst:3619 +#: ../../../library/tkinter.rst:3735 msgid "*arrowshape*" msgstr "" -#: ../../../library/tkinter.rst:3620 +#: ../../../library/tkinter.rst:3736 msgid "A sequence of three distances describing the shape of the arrowheads." msgstr "" -#: ../../../library/tkinter.rst:3623 +#: ../../../library/tkinter.rst:3739 msgid "*capstyle*" msgstr "" -#: ../../../library/tkinter.rst:3624 +#: ../../../library/tkinter.rst:3740 msgid "" "How line ends are drawn: ``'butt'`` (the default), ``'projecting'`` or " "``'round'``." msgstr "" -#: ../../../library/tkinter.rst:3627 +#: ../../../library/tkinter.rst:3743 msgid "*joinstyle*" msgstr "" -#: ../../../library/tkinter.rst:3628 +#: ../../../library/tkinter.rst:3744 msgid "" "How line vertices are drawn: ``'round'`` (the default), ``'bevel'`` or " "``'miter'``." msgstr "" -#: ../../../library/tkinter.rst:3631 +#: ../../../library/tkinter.rst:3747 msgid "*smooth*" msgstr "" -#: ../../../library/tkinter.rst:3632 +#: ../../../library/tkinter.rst:3748 msgid "" "The smoothing method: a false value (the default) for no smoothing, or " "``'true'``/``'bezier'`` or ``'raw'`` to draw the line as a curve." msgstr "" -#: ../../../library/tkinter.rst:3635 +#: ../../../library/tkinter.rst:3751 msgid "*splinesteps*" msgstr "" -#: ../../../library/tkinter.rst:3636 +#: ../../../library/tkinter.rst:3752 msgid "" "The number of line segments approximating each spline when *smooth* is " "enabled." msgstr "" -#: ../../../library/tkinter.rst:3639 +#: ../../../library/tkinter.rst:3755 msgid "For ``polygon`` items:" msgstr "" -#: ../../../library/tkinter.rst:3641 +#: ../../../library/tkinter.rst:3757 msgid "*joinstyle*, *smooth*, *splinesteps*" msgstr "" -#: ../../../library/tkinter.rst:3642 +#: ../../../library/tkinter.rst:3758 msgid "As for ``line`` items, applied to the polygon's outline." msgstr "" -#: ../../../library/tkinter.rst:3644 +#: ../../../library/tkinter.rst:3760 msgid "For ``text`` items:" msgstr "" -#: ../../../library/tkinter.rst:3646 +#: ../../../library/tkinter.rst:3762 msgid "*text*" msgstr "" -#: ../../../library/tkinter.rst:3647 +#: ../../../library/tkinter.rst:3763 msgid "The string to display; newline characters start new lines." msgstr "" -#: ../../../library/tkinter.rst:3649 ../../../library/tkinter.rst:4575 -#: ../../../library/tkinter.rst:5470 +#: ../../../library/tkinter.rst:3765 ../../../library/tkinter.rst:4691 +#: ../../../library/tkinter.rst:5608 msgid "*font*" msgstr "" -#: ../../../library/tkinter.rst:3650 +#: ../../../library/tkinter.rst:3766 msgid "The font used for the text." msgstr "" -#: ../../../library/tkinter.rst:3652 ../../../library/tkinter.rst:5510 +#: ../../../library/tkinter.rst:3768 ../../../library/tkinter.rst:5648 msgid "*justify*" msgstr "" -#: ../../../library/tkinter.rst:3653 +#: ../../../library/tkinter.rst:3769 msgid "" "How lines are justified: ``'left'`` (the default), ``'right'`` or " "``'center'``." msgstr "" -#: ../../../library/tkinter.rst:3657 +#: ../../../library/tkinter.rst:3773 msgid "" "How the text is positioned relative to its point, defaulting to ``'center'``." msgstr "" -#: ../../../library/tkinter.rst:3661 +#: ../../../library/tkinter.rst:3777 msgid "The maximum line length; if non-zero, lines are wrapped at spaces." msgstr "" -#: ../../../library/tkinter.rst:3663 +#: ../../../library/tkinter.rst:3779 msgid "*angle*" msgstr "" -#: ../../../library/tkinter.rst:3664 +#: ../../../library/tkinter.rst:3780 msgid "" "How many degrees to rotate the text counter-clockwise about its positioning " "point, from ``0.0`` to ``360.0`` (default ``0.0``)." msgstr "" -#: ../../../library/tkinter.rst:3667 ../../../library/tkinter.rst:4557 -#: ../../../library/tkinter.rst:5495 +#: ../../../library/tkinter.rst:3783 ../../../library/tkinter.rst:4673 +#: ../../../library/tkinter.rst:5633 msgid "*underline*" msgstr "" -#: ../../../library/tkinter.rst:3668 +#: ../../../library/tkinter.rst:3784 msgid "The index of a character to underline, or ``-1`` for none." msgstr "" -#: ../../../library/tkinter.rst:3670 +#: ../../../library/tkinter.rst:3786 msgid "For ``bitmap`` items:" msgstr "" -#: ../../../library/tkinter.rst:3672 ../../../library/tkinter.rst:4572 +#: ../../../library/tkinter.rst:3788 ../../../library/tkinter.rst:4688 msgid "*bitmap*" msgstr "" -#: ../../../library/tkinter.rst:3673 +#: ../../../library/tkinter.rst:3789 msgid "The bitmap to display." msgstr "" -#: ../../../library/tkinter.rst:3676 +#: ../../../library/tkinter.rst:3792 msgid "How the bitmap is positioned relative to its point." msgstr "" -#: ../../../library/tkinter.rst:3678 ../../../library/tkinter.rst:4578 +#: ../../../library/tkinter.rst:3794 ../../../library/tkinter.rst:4694 msgid "*background*, *foreground*" msgstr "" -#: ../../../library/tkinter.rst:3679 +#: ../../../library/tkinter.rst:3795 msgid "" "The colors used for the bitmap's ``0`` and ``1`` pixels; an empty " "*background* makes the ``0`` pixels transparent. Both have *active...* and " @@ -4560,65 +4711,65 @@ msgid "" "variants." msgstr "" -#: ../../../library/tkinter.rst:3684 +#: ../../../library/tkinter.rst:3800 msgid "For ``image`` items:" msgstr "" -#: ../../../library/tkinter.rst:3686 ../../../library/tkinter.rst:4564 +#: ../../../library/tkinter.rst:3802 ../../../library/tkinter.rst:4680 msgid "*image*" msgstr "" -#: ../../../library/tkinter.rst:3687 +#: ../../../library/tkinter.rst:3803 msgid "The Tk image to display, previously created with the image protocols." msgstr "" -#: ../../../library/tkinter.rst:3691 +#: ../../../library/tkinter.rst:3807 msgid "How the image is positioned relative to its point." msgstr "" -#: ../../../library/tkinter.rst:3693 +#: ../../../library/tkinter.rst:3809 msgid "" "Both options have *active...* and *disabled...* variants (*activeimage*, " "*disabledimage*) used in the active and disabled states." msgstr "" -#: ../../../library/tkinter.rst:3697 +#: ../../../library/tkinter.rst:3813 msgid "For ``window`` items:" msgstr "" -#: ../../../library/tkinter.rst:3699 +#: ../../../library/tkinter.rst:3815 msgid "*window*" msgstr "" -#: ../../../library/tkinter.rst:3700 +#: ../../../library/tkinter.rst:3816 msgid "" "The widget to embed; it must be a child of the canvas or of one of its " "ancestors, and may not be a top-level window." msgstr "" -#: ../../../library/tkinter.rst:3704 +#: ../../../library/tkinter.rst:3820 msgid "How the window is positioned relative to its point." msgstr "" -#: ../../../library/tkinter.rst:3707 +#: ../../../library/tkinter.rst:3823 msgid "" "The size to assign to the window; if zero (the default), the window is given " "its requested size." msgstr "" -#: ../../../library/tkinter.rst:3710 +#: ../../../library/tkinter.rst:3826 msgid "" "``oval`` and ``rectangle`` items have no type-specific options; they use " "only the standard item options." msgstr "" -#: ../../../library/tkinter.rst:3715 +#: ../../../library/tkinter.rst:3831 msgid "" "Tk 8.6 added the *angle* option and Tk 9.0 added the *underline* option for " "``text`` items." msgstr "" -#: ../../../library/tkinter.rst:3722 +#: ../../../library/tkinter.rst:3838 msgid "" "Query or modify the coordinates of an item. With only *tagOrId*, return a " "list of the floating-point coordinates of the item given by *tagOrId* (the " @@ -4630,21 +4781,21 @@ msgid "" "ordered left, top, right, bottom." msgstr "" -#: ../../../library/tkinter.rst:3733 +#: ../../../library/tkinter.rst:3849 msgid "" "The arguments are now flattened: the coordinates may be given as separate " "arguments, as a single sequence, or grouped in pairs, like the ``create_*`` " "methods." msgstr "" -#: ../../../library/tkinter.rst:3741 +#: ../../../library/tkinter.rst:3857 msgid "" "Move each of the items given by *tagOrId* in the canvas coordinate space by " "adding *xAmount* to every x-coordinate and *yAmount* to every y-coordinate " "of the item." msgstr "" -#: ../../../library/tkinter.rst:3747 +#: ../../../library/tkinter.rst:3863 msgid "" "Move the items given by *tagOrId* so that the first coordinate pair (the " "upper-left corner of the bounding box) of the lowest matching item is at " @@ -4653,7 +4804,7 @@ msgid "" "positions relative to each other." msgstr "" -#: ../../../library/tkinter.rst:3759 +#: ../../../library/tkinter.rst:3875 msgid "" "Rescale the coordinates of all items given by *tagOrId* in canvas coordinate " "space. Each x-coordinate is adjusted so that its distance from *xOrigin* " @@ -4662,18 +4813,18 @@ msgid "" "the coordinate unchanged)." msgstr "" -#: ../../../library/tkinter.rst:3768 +#: ../../../library/tkinter.rst:3884 msgid "" "Rotate the coordinates of all items given by *tagOrId* in canvas coordinate " "space about the origin (*xOrigin*, *yOrigin*) by *angle* degrees " "anticlockwise. Negative values of *angle* rotate clockwise." msgstr "" -#: ../../../library/tkinter.rst:3777 +#: ../../../library/tkinter.rst:3893 msgid "Delete each of the items given by the *tagOrIds* arguments." msgstr "" -#: ../../../library/tkinter.rst:3782 +#: ../../../library/tkinter.rst:3898 msgid "" "Delete from each of the items given by *tagOrId* the characters (for text " "items) or coordinates (for line and polygon items) in the range from *first* " @@ -4681,14 +4832,14 @@ msgid "" "indexing ignore this operation." msgstr "" -#: ../../../library/tkinter.rst:3789 +#: ../../../library/tkinter.rst:3905 msgid "" "Insert *string* into each of the items given by *tagOrId* just before the " "character or coordinate whose index is *beforeThis*. For line and polygon " "items *string* must be a valid sequence of coordinates." msgstr "" -#: ../../../library/tkinter.rst:3796 +#: ../../../library/tkinter.rst:3912 msgid "" "Replace the characters (for text items) or coordinates (for line and polygon " "items) in the range from *first* to *last* inclusive of each of the items " @@ -4697,14 +4848,14 @@ msgid "" "ignore this operation." msgstr "" -#: ../../../library/tkinter.rst:3807 +#: ../../../library/tkinter.rst:3923 msgid "" "Return the current value of the configuration option *option* for the item " "given by *tagOrId* (the lowest matching item if it matches several). This is " "like :meth:`~Misc.cget` but applies to an individual item." msgstr "" -#: ../../../library/tkinter.rst:3816 +#: ../../../library/tkinter.rst:3932 msgid "" "Query or modify the configuration options of the items given by *tagOrId*. " "This mirrors :meth:`~Misc.configure`, except that it applies to individual " @@ -4715,27 +4866,27 @@ msgid "" "`itemconfig` is an alias of :meth:`!itemconfigure`." msgstr "" -#: ../../../library/tkinter.rst:3829 +#: ../../../library/tkinter.rst:3945 msgid "" "Return the type of the item given by *tagOrId* (the first matching item if " "it matches several), such as ``'rectangle'`` or ``'text'``, or ``None`` if " "*tagOrId* does not match any item." msgstr "" -#: ../../../library/tkinter.rst:3835 +#: ../../../library/tkinter.rst:3951 msgid "" "Return a tuple of the tags associated with the item given by *tagOrId* (the " "first matching item in display-list order if it matches several). Return an " "empty tuple if no item matches or the item has no tags." msgstr "" -#: ../../../library/tkinter.rst:3842 +#: ../../../library/tkinter.rst:3958 msgid "" "Remove the tag *tagToDelete* (which defaults to *tagOrId*) from each of the " "items given by *tagOrId*. Items that do not have that tag are unaffected." msgstr "" -#: ../../../library/tkinter.rst:3848 +#: ../../../library/tkinter.rst:3964 msgid "" "Add the tag *newtag* to each item selected by the search specification " "*searchSpec* (and any further *args*). *searchSpec* is one of ``'above'``, " @@ -4744,23 +4895,23 @@ msgid "" "supply each of these forms." msgstr "" -#: ../../../library/tkinter.rst:3857 +#: ../../../library/tkinter.rst:3973 msgid "" "Add the tag *newtag* to the item just above (after) *tagOrId* in the display " "list." msgstr "" -#: ../../../library/tkinter.rst:3862 +#: ../../../library/tkinter.rst:3978 msgid "Add the tag *newtag* to all items in the canvas." msgstr "" -#: ../../../library/tkinter.rst:3866 +#: ../../../library/tkinter.rst:3982 msgid "" "Add the tag *newtag* to the item just below (before) *tagOrId* in the " "display list." msgstr "" -#: ../../../library/tkinter.rst:3871 +#: ../../../library/tkinter.rst:3987 msgid "" "Add the tag *newtag* to the item closest to the point (*x*, *y*). If *halo* " "is given, any item within that distance of the point is treated as " @@ -4769,23 +4920,23 @@ msgid "" "to step through all the closest items." msgstr "" -#: ../../../library/tkinter.rst:3880 +#: ../../../library/tkinter.rst:3996 msgid "" "Add the tag *newtag* to every item completely enclosed within the rectangle " "(*x1*, *y1*, *x2*, *y2*), where *x1* <= *x2* and *y1* <= *y2*." msgstr "" -#: ../../../library/tkinter.rst:3885 +#: ../../../library/tkinter.rst:4001 msgid "" "Add the tag *newtag* to every item that overlaps or is enclosed within the " "rectangle (*x1*, *y1*, *x2*, *y2*), where *x1* <= *x2* and *y1* <= *y2*." msgstr "" -#: ../../../library/tkinter.rst:3891 +#: ../../../library/tkinter.rst:4007 msgid "Add the tag *newtag* to every item given by *tagOrId*." msgstr "" -#: ../../../library/tkinter.rst:3895 +#: ../../../library/tkinter.rst:4011 msgid "" "Return a tuple of the ids of all items selected by the search specification " "*searchSpec* (and any further *args*), in stacking order with the lowest " @@ -4794,46 +4945,46 @@ msgid "" "it." msgstr "" -#: ../../../library/tkinter.rst:3903 +#: ../../../library/tkinter.rst:4019 msgid "" "Return a tuple containing the id of the item just above *tagOrId* in the " "display list." msgstr "" -#: ../../../library/tkinter.rst:3908 +#: ../../../library/tkinter.rst:4024 msgid "" "Return a tuple of the ids of all items in the canvas, in stacking order." msgstr "" -#: ../../../library/tkinter.rst:3912 +#: ../../../library/tkinter.rst:4028 msgid "" "Return a tuple containing the id of the item just below *tagOrId* in the " "display list." msgstr "" -#: ../../../library/tkinter.rst:3917 +#: ../../../library/tkinter.rst:4033 msgid "" "Return a tuple containing the id of the item closest to the point (*x*, " "*y*). *halo* and *start* are interpreted as for :meth:`addtag_closest`." msgstr "" -#: ../../../library/tkinter.rst:3923 +#: ../../../library/tkinter.rst:4039 msgid "" "Return a tuple of the ids of all items completely enclosed within the " "rectangle (*x1*, *y1*, *x2*, *y2*)." msgstr "" -#: ../../../library/tkinter.rst:3928 +#: ../../../library/tkinter.rst:4044 msgid "" "Return a tuple of the ids of all items that overlap or are enclosed within " "the rectangle (*x1*, *y1*, *x2*, *y2*)." msgstr "" -#: ../../../library/tkinter.rst:3933 +#: ../../../library/tkinter.rst:4049 msgid "Return a tuple of the ids of all items given by *tagOrId*." msgstr "" -#: ../../../library/tkinter.rst:3943 +#: ../../../library/tkinter.rst:4059 msgid "" "Move all items given by *tagOrId* to a new position in the display list just " "above the item given by *aboveThis*, or to the top of the display list if " @@ -4843,7 +4994,7 @@ msgid "" "`lift` and :meth:`tkraise` are aliases of :meth:`!tag_raise`." msgstr "" -#: ../../../library/tkinter.rst:3956 +#: ../../../library/tkinter.rst:4072 msgid "" "Move all items given by *tagOrId* to a new position in the display list just " "below the item given by *belowThis*, or to the bottom of the display list if " @@ -4852,7 +5003,7 @@ msgid "" "alias of :meth:`!tag_lower`." msgstr "" -#: ../../../library/tkinter.rst:3965 +#: ../../../library/tkinter.rst:4081 msgid "" "On a :class:`Canvas`, :meth:`tkraise`/:meth:`lift` and :meth:`lower` restack " "canvas items, shadowing the inherited :meth:`Misc.tkraise`/:meth:`Misc.lift` " @@ -4860,7 +5011,7 @@ msgid "" "therefore not available." msgstr "" -#: ../../../library/tkinter.rst:3973 +#: ../../../library/tkinter.rst:4089 msgid "" "Bind the callback *func* to the event *sequence* for all items given by " "*tagOrId*, so that *func* is invoked whenever that event occurs for one of " @@ -4873,18 +5024,18 @@ msgid "" "be passed to :meth:`tag_unbind`." msgstr "" -#: ../../../library/tkinter.rst:3988 +#: ../../../library/tkinter.rst:4104 msgid "" "Remove for all items given by *tagOrId* the binding for the event " "*sequence*. If *funcid* is given, only that callback (as returned by :meth:" "`tag_bind`) is unbound and deregistered." msgstr "" -#: ../../../library/tkinter.rst:3993 ../../../library/tkinter.rst:5616 +#: ../../../library/tkinter.rst:4109 ../../../library/tkinter.rst:5754 msgid "If *funcid* is given, only that callback is unbound." msgstr "" -#: ../../../library/tkinter.rst:3999 +#: ../../../library/tkinter.rst:4115 msgid "" "Return a 4-tuple ``(x1, y1, x2, y2)`` giving an approximate bounding box, in " "pixels, that encloses all the items given by *tagOrId* and any further " @@ -4893,28 +5044,28 @@ msgid "" "nothing to display." msgstr "" -#: ../../../library/tkinter.rst:4006 ../../../library/tkinter.rst:4407 -#: ../../../library/tkinter.rst:5151 ../../../library/tkinter.rst:5386 +#: ../../../library/tkinter.rst:4122 ../../../library/tkinter.rst:4523 +#: ../../../library/tkinter.rst:5282 ../../../library/tkinter.rst:5524 msgid "" "This shadows the inherited :meth:`!Misc.bbox`; use :meth:`~Misc.grid_bbox` " "for the grid bounding box." msgstr "" -#: ../../../library/tkinter.rst:4011 +#: ../../../library/tkinter.rst:4127 msgid "" "Given a window x-coordinate *screenx*, return the canvas x-coordinate " "displayed at that location. If *gridspacing* is given, the result is rounded " "to the nearest multiple of *gridspacing* units." msgstr "" -#: ../../../library/tkinter.rst:4018 +#: ../../../library/tkinter.rst:4134 msgid "" "Given a window y-coordinate *screeny*, return the canvas y-coordinate " "displayed at that location. If *gridspacing* is given, the result is rounded " "to the nearest multiple of *gridspacing* units." msgstr "" -#: ../../../library/tkinter.rst:4026 +#: ../../../library/tkinter.rst:4142 msgid "" "With *tagOrId*, set the keyboard focus for the canvas to the first item " "given by *tagOrId* that supports the insertion cursor; the focus is left " @@ -4925,13 +5076,13 @@ msgid "" "has the input focus." msgstr "" -#: ../../../library/tkinter.rst:4035 +#: ../../../library/tkinter.rst:4151 msgid "" "This shadows the inherited :meth:`!Misc.focus`; use :meth:`~Misc.focus_set` " "to focus the widget itself." msgstr "" -#: ../../../library/tkinter.rst:4040 +#: ../../../library/tkinter.rst:4156 msgid "" "Set the insertion cursor of the items given by *tagOrId* to just before the " "character given by *index*. Items that do not support an insertion cursor " @@ -4939,7 +5090,7 @@ msgid "" "but its position may be set at any time." msgstr "" -#: ../../../library/tkinter.rst:4048 +#: ../../../library/tkinter.rst:4164 msgid "" "Return as an integer the numerical index within *tagOrId* corresponding to " "*index*, which is a textual description of a position (for text items an " @@ -4948,7 +5099,7 @@ msgid "" "supports indexing is used." msgstr "" -#: ../../../library/tkinter.rst:4057 +#: ../../../library/tkinter.rst:4173 msgid "" "Adjust the end of the selection in *tagOrId* nearest to *index* so that it " "is at *index*, and make the other end the anchor point for future :meth:" @@ -4956,39 +5107,39 @@ msgid "" "behaves like :meth:`select_to`." msgstr "" -#: ../../../library/tkinter.rst:4065 +#: ../../../library/tkinter.rst:4181 msgid "Clear the selection if it is in this canvas; otherwise do nothing." msgstr "" -#: ../../../library/tkinter.rst:4069 +#: ../../../library/tkinter.rst:4185 msgid "" "Set the selection anchor point to just before the character given by *index* " "in the item given by *tagOrId*. This does not change the selection itself; " "it sets the fixed end for future :meth:`select_to` calls." msgstr "" -#: ../../../library/tkinter.rst:4076 +#: ../../../library/tkinter.rst:4192 msgid "" "Return the id of the item that holds the selection, or ``None`` if the " "selection is not in this canvas. Unlike :meth:`find` and the ``find_*`` " "methods, this returns the id as a string rather than an integer." msgstr "" -#: ../../../library/tkinter.rst:4083 +#: ../../../library/tkinter.rst:4199 msgid "" "Set the selection to the characters of *tagOrId* between the selection " "anchor point and *index*, inclusive of *index*. The anchor point is the one " "set by the most recent :meth:`select_adjust` or :meth:`select_from` call." msgstr "" -#: ../../../library/tkinter.rst:4090 ../../../library/tkinter.rst:4503 -#: ../../../library/tkinter.rst:5772 +#: ../../../library/tkinter.rst:4206 ../../../library/tkinter.rst:4619 +#: ../../../library/tkinter.rst:5910 msgid "" "Record *x*, *y* and the current view, for use with later :meth:`scan_dragto` " "calls. This is typically bound to a mouse button press in the widget." msgstr "" -#: ../../../library/tkinter.rst:4096 +#: ../../../library/tkinter.rst:4212 msgid "" "Scroll the canvas by *gain* times the difference between *x*, *y* and the " "coordinates passed to the last :meth:`scan_mark` call. This is typically " @@ -4996,7 +5147,7 @@ msgid "" "the canvas at high speed through its window." msgstr "" -#: ../../../library/tkinter.rst:4103 +#: ../../../library/tkinter.rst:4219 msgid "" "Generate a PostScript (Encapsulated PostScript, version 3.0) representation " "of part or all of the canvas. If the *file* or *channel* option is given, " @@ -5009,7 +5160,7 @@ msgid "" "*width*, *x* and *y*." msgstr "" -#: ../../../library/tkinter.rst:4118 +#: ../../../library/tkinter.rst:4234 msgid "" "A :class:`!Checkbutton` widget displays a textual string, bitmap or image " "together with a square indicator, and toggles a boolean selection when " @@ -5022,7 +5173,7 @@ msgid "" "page, such as *variable*, *onvalue*, *offvalue* and *command*." msgstr "" -#: ../../../library/tkinter.rst:4132 +#: ../../../library/tkinter.rst:4248 msgid "" "Do just what would happen if the user pressed the checkbutton with the " "mouse: toggle the selection state of the button and invoke the associated " @@ -5031,23 +5182,23 @@ msgid "" "the checkbutton's state is ``disabled``." msgstr "" -#: ../../../library/tkinter.rst:4141 +#: ../../../library/tkinter.rst:4257 msgid "" "Select the checkbutton and set the associated variable to its ``onvalue``." msgstr "" -#: ../../../library/tkinter.rst:4146 +#: ../../../library/tkinter.rst:4262 msgid "" "Deselect the checkbutton and set the associated variable to its ``offvalue``." msgstr "" -#: ../../../library/tkinter.rst:4151 +#: ../../../library/tkinter.rst:4267 msgid "" "Toggle the selection state of the button, redisplaying it and modifying its " "associated variable to reflect the new state." msgstr "" -#: ../../../library/tkinter.rst:4156 +#: ../../../library/tkinter.rst:4272 msgid "" "Flash the checkbutton by redisplaying it several times, alternating between " "the active and normal colors. At the end of the flash the checkbutton is " @@ -5055,7 +5206,7 @@ msgid "" "is ignored if the checkbutton's state is ``disabled``." msgstr "" -#: ../../../library/tkinter.rst:4165 +#: ../../../library/tkinter.rst:4281 msgid "" "An :class:`!Entry` widget displays a single line of text and lets the user " "edit it. Inherits from :class:`Widget` and :class:`XView`; since entries can " @@ -5063,7 +5214,7 @@ msgid "" "scrolling through :meth:`~XView.xview`." msgstr "" -#: ../../../library/tkinter.rst:4171 +#: ../../../library/tkinter.rst:4287 msgid "" "In addition to the standard widget options, an entry accepts the options " "documented in the Tk ``entry`` manual page. Notable ones are *textvariable* " @@ -5074,7 +5225,7 @@ msgid "" "``'normal'``, ``'disabled'`` or ``'readonly'``)." msgstr "" -#: ../../../library/tkinter.rst:4180 +#: ../../../library/tkinter.rst:4296 msgid "" "Many of the methods below take an *index* argument that selects a character " "in the entry's string. As described in the Tk ``entry`` manual page, *index* " @@ -5086,32 +5237,32 @@ msgid "" "nearest legal value." msgstr "" -#: ../../../library/tkinter.rst:4192 +#: ../../../library/tkinter.rst:4308 msgid "" "Delete the characters from index *first* up to but not including index " "*last*. If *last* is omitted, only the single character at *first* is " "deleted." msgstr "" -#: ../../../library/tkinter.rst:4198 +#: ../../../library/tkinter.rst:4314 msgid "Return the entry's current string." msgstr "" -#: ../../../library/tkinter.rst:4202 +#: ../../../library/tkinter.rst:4318 msgid "Insert *string* just before the character given by *index*." msgstr "" -#: ../../../library/tkinter.rst:4206 ../../../library/tkinter.rst:5134 +#: ../../../library/tkinter.rst:4322 ../../../library/tkinter.rst:5265 msgid "" "Arrange for the insertion cursor to be displayed just before the character " "given by *index*." msgstr "" -#: ../../../library/tkinter.rst:4211 +#: ../../../library/tkinter.rst:4327 msgid "Return the numerical index corresponding to *index*." msgstr "" -#: ../../../library/tkinter.rst:4218 +#: ../../../library/tkinter.rst:4334 msgid "" "Locate the end of the selection nearest to the character given by *index*, " "and adjust that end to be at *index* (including but not going beyond it); " @@ -5121,33 +5272,33 @@ msgid "" "is an alias of :meth:`!selection_adjust`." msgstr "" -#: ../../../library/tkinter.rst:4231 +#: ../../../library/tkinter.rst:4347 msgid "" "Clear the selection if it is currently in this widget. If the selection is " "not in this widget the method has no effect. :meth:`select_clear` is an " "alias of :meth:`!selection_clear`." msgstr "" -#: ../../../library/tkinter.rst:4237 +#: ../../../library/tkinter.rst:4353 msgid "" "This shadows the inherited :meth:`Misc.selection_clear`, which clears the X " "selection; that method is not available on an :class:`Entry`." msgstr "" -#: ../../../library/tkinter.rst:4246 +#: ../../../library/tkinter.rst:4362 msgid "" "Set the selection anchor point to just before the character given by " "*index*, without changing the selection. :meth:`select_from` is an alias of :" "meth:`!selection_from`." msgstr "" -#: ../../../library/tkinter.rst:4255 +#: ../../../library/tkinter.rst:4371 msgid "" "Return ``True`` if there are characters selected in the entry, ``False`` " "otherwise. :meth:`select_present` is an alias of :meth:`!selection_present`." msgstr "" -#: ../../../library/tkinter.rst:4264 +#: ../../../library/tkinter.rst:4380 msgid "" "Set the selection to include the characters starting with the one indexed by " "*start* and ending with the one just before *end*. If *end* refers to the " @@ -5155,7 +5306,7 @@ msgid "" "`select_range` is an alias of :meth:`!selection_range`." msgstr "" -#: ../../../library/tkinter.rst:4275 +#: ../../../library/tkinter.rst:4391 msgid "" "Set the selection between the anchor point and *index*: if *index* is before " "the anchor point, the selection runs from *index* up to but not including " @@ -5166,14 +5317,14 @@ msgid "" "recent anchor point. :meth:`select_to` is an alias of :meth:`!selection_to`." msgstr "" -#: ../../../library/tkinter.rst:4287 +#: ../../../library/tkinter.rst:4403 msgid "" "Record *x* and the current view in the entry window, for use with later :" "meth:`scan_dragto` calls. Typically associated with a mouse button press in " "the widget." msgstr "" -#: ../../../library/tkinter.rst:4293 +#: ../../../library/tkinter.rst:4409 msgid "" "Compute the difference between *x* and the *x* given to the last :meth:" "`scan_mark` call, and adjust the view left or right by 10 times that " @@ -5181,14 +5332,14 @@ msgid "" "effect of dragging the entry at high speed through the window." msgstr "" -#: ../../../library/tkinter.rst:4301 ../../../library/tkinter.rst:5270 +#: ../../../library/tkinter.rst:4417 ../../../library/tkinter.rst:5401 msgid "" "Force an evaluation of the command given by the *validatecommand* option, " "independently of the conditions specified by the *validate* option, and " "return whether the value is considered valid." msgstr "" -#: ../../../library/tkinter.rst:4310 +#: ../../../library/tkinter.rst:4426 msgid "" "A :class:`!Frame` widget is a simple container. Its primary purpose is to " "act as a spacer or container for complex window layouts; its only features " @@ -5197,7 +5348,7 @@ msgid "" "manual page for the full list of options." msgstr "" -#: ../../../library/tkinter.rst:4320 +#: ../../../library/tkinter.rst:4436 msgid "" "A :class:`!Label` widget displays a non-interactive textual string, bitmap " "or image. The displayed text is set with the *text* option or linked to a " @@ -5208,7 +5359,7 @@ msgid "" "options." msgstr "" -#: ../../../library/tkinter.rst:4332 +#: ../../../library/tkinter.rst:4448 msgid "" "A :class:`!LabelFrame` widget is a container that has the features of a :" "class:`Frame` plus the ability to display a label. The label text is set " @@ -5218,7 +5369,7 @@ msgid "" "for the full list of options." msgstr "" -#: ../../../library/tkinter.rst:4343 +#: ../../../library/tkinter.rst:4459 msgid "" "A :class:`!Listbox` widget displays a list of single-line text items, one " "per line, of which the user can select one or more. The way the selection " @@ -5232,7 +5383,7 @@ msgid "" "the Tk ``listbox`` manual page for the full list of options." msgstr "" -#: ../../../library/tkinter.rst:4355 +#: ../../../library/tkinter.rst:4471 msgid "" "Many of the methods take an *index* argument identifying a particular item. " "As described in the Tk ``listbox`` manual page, *index* may be a numeric " @@ -5244,20 +5395,20 @@ msgid "" "named *first* and *last* are indices of the same forms." msgstr "" -#: ../../../library/tkinter.rst:4366 +#: ../../../library/tkinter.rst:4482 msgid "" "Insert the given *elements* as new items just before the item given by " "*index*. If *index* is ``'end'``, the new items are appended to the end of " "the list." msgstr "" -#: ../../../library/tkinter.rst:4373 +#: ../../../library/tkinter.rst:4489 msgid "" "Delete the items in the range from *first* to *last* inclusive. If *last* is " "omitted, it defaults to *first*, so that a single item is deleted." msgstr "" -#: ../../../library/tkinter.rst:4379 +#: ../../../library/tkinter.rst:4495 msgid "" "If *last* is omitted, return the contents of the item given by *first*, or " "an empty string if *first* refers to a non-existent item. If *last* is " @@ -5265,24 +5416,24 @@ msgid "" "inclusive." msgstr "" -#: ../../../library/tkinter.rst:4386 +#: ../../../library/tkinter.rst:4502 msgid "Return the total number of items in the listbox." msgstr "" -#: ../../../library/tkinter.rst:4388 +#: ../../../library/tkinter.rst:4504 msgid "" "This shadows the inherited :meth:`!Misc.size`; use :meth:`~Misc.grid_size` " "for the grid size." msgstr "" -#: ../../../library/tkinter.rst:4393 +#: ../../../library/tkinter.rst:4509 msgid "" "Return the integer index value corresponding to *index*, or ``None`` if " "*index* is out of range. If *index* is ``'end'``, the result is a count of " "the number of items in the listbox (not the index of the last item)." msgstr "" -#: ../../../library/tkinter.rst:4400 +#: ../../../library/tkinter.rst:4516 msgid "" "Return a tuple ``(x, y, width, height)`` describing the bounding box, in " "pixels relative to the widget, of the text of the item given by *index*. " @@ -5292,13 +5443,13 @@ msgid "" "are not visible." msgstr "" -#: ../../../library/tkinter.rst:4412 +#: ../../../library/tkinter.rst:4528 msgid "" "Given a y-coordinate within the listbox window, return the index of the " "visible item nearest to that y-coordinate." msgstr "" -#: ../../../library/tkinter.rst:4417 +#: ../../../library/tkinter.rst:4533 msgid "" "Adjust the view so that the item given by *index* is visible. If the item is " "already visible the method has no effect; if it is near an edge of the " @@ -5306,7 +5457,7 @@ msgid "" "otherwise the listbox scrolls to center the item." msgstr "" -#: ../../../library/tkinter.rst:4424 +#: ../../../library/tkinter.rst:4540 msgid "" "Set the active item to the one given by *index*. If *index* is outside the " "range of items, the closest item is activated instead. The active item is " @@ -5314,13 +5465,13 @@ msgid "" "focus, and its index may be retrieved with the ``'active'`` index." msgstr "" -#: ../../../library/tkinter.rst:4433 +#: ../../../library/tkinter.rst:4549 msgid "" "Return a tuple containing the numerical indices of all of the items that are " "currently selected, or an empty tuple if no items are selected." msgstr "" -#: ../../../library/tkinter.rst:4441 +#: ../../../library/tkinter.rst:4557 msgid "" "Set the selection anchor to the item given by *index*. If *index* refers to " "a non-existent item, the closest item is used. The selection anchor is the " @@ -5329,40 +5480,40 @@ msgid "" "`select_anchor` is an alias of :meth:`!selection_anchor`." msgstr "" -#: ../../../library/tkinter.rst:4453 +#: ../../../library/tkinter.rst:4569 msgid "" "Deselect any of the items in the range from *first* to *last* inclusive that " "are selected. The selection state of items outside this range is not " "changed. :meth:`select_clear` is an alias of :meth:`!selection_clear`." msgstr "" -#: ../../../library/tkinter.rst:4460 +#: ../../../library/tkinter.rst:4576 msgid "" "This shadows the inherited :meth:`Misc.selection_clear`, which clears the X " "selection; that method is not available on a :class:`Listbox`." msgstr "" -#: ../../../library/tkinter.rst:4469 +#: ../../../library/tkinter.rst:4585 msgid "" "Return ``True`` if the item given by *index* is currently selected, " "``False`` otherwise. :meth:`select_includes` is an alias of :meth:`!" "selection_includes`." msgstr "" -#: ../../../library/tkinter.rst:4478 +#: ../../../library/tkinter.rst:4594 msgid "" "Select all of the items in the range from *first* to *last* inclusive, " "without affecting the selection state of items outside that range. :meth:" "`select_set` is an alias of :meth:`!selection_set`." msgstr "" -#: ../../../library/tkinter.rst:4484 +#: ../../../library/tkinter.rst:4600 msgid "" "Return the current value of the configuration option *option* for the item " "given by *index*." msgstr "" -#: ../../../library/tkinter.rst:4492 +#: ../../../library/tkinter.rst:4608 msgid "" "Query or modify the configuration options of the item given by *index*. This " "mirrors :meth:`~Misc.configure`, except that it applies to an individual " @@ -5373,7 +5524,7 @@ msgid "" "of :meth:`!itemconfigure`." msgstr "" -#: ../../../library/tkinter.rst:4509 +#: ../../../library/tkinter.rst:4625 msgid "" "Scroll the listbox by 10 times the difference between *x*, *y* and the " "coordinates passed to the last :meth:`scan_mark` call. This is typically " @@ -5381,7 +5532,7 @@ msgid "" "the list at high speed through the window." msgstr "" -#: ../../../library/tkinter.rst:4517 +#: ../../../library/tkinter.rst:4633 msgid "" "A :class:`!Menu` widget displays a column of entries, each of which may be a " "command, a checkbutton, a radiobutton, a cascade (which posts an associated " @@ -5390,7 +5541,7 @@ msgid "" "menus. Inherits from :class:`Widget`." msgstr "" -#: ../../../library/tkinter.rst:4524 +#: ../../../library/tkinter.rst:4640 msgid "" "Many of the entry methods take an *index* argument that selects which entry " "to operate on. As described in the Tk ``menu`` manual page, *index* may be a " @@ -5401,7 +5552,7 @@ msgid "" "of the entries from the top down." msgstr "" -#: ../../../library/tkinter.rst:4535 +#: ../../../library/tkinter.rst:4651 msgid "" "Add a new entry to the bottom of the menu. *itemType* is one of " "``'command'``, ``'cascade'``, ``'checkbutton'``, ``'radiobutton'`` or " @@ -5411,177 +5562,177 @@ msgid "" "convenience methods call this method with the corresponding *itemType*." msgstr "" -#: ../../../library/tkinter.rst:4543 +#: ../../../library/tkinter.rst:4659 msgid "" "The entry is configured by the following options, although not every option " "applies to every entry type (a separator accepts none of them):" msgstr "" -#: ../../../library/tkinter.rst:4546 +#: ../../../library/tkinter.rst:4662 msgid "*label*" msgstr "" -#: ../../../library/tkinter.rst:4547 +#: ../../../library/tkinter.rst:4663 msgid "The text to display in the entry." msgstr "" -#: ../../../library/tkinter.rst:4549 +#: ../../../library/tkinter.rst:4665 msgid "*command*" msgstr "" -#: ../../../library/tkinter.rst:4550 +#: ../../../library/tkinter.rst:4666 msgid "" "The function to call when the entry is invoked (command, checkbutton and " "radiobutton entries)." msgstr "" -#: ../../../library/tkinter.rst:4553 +#: ../../../library/tkinter.rst:4669 msgid "*accelerator*" msgstr "" -#: ../../../library/tkinter.rst:4554 +#: ../../../library/tkinter.rst:4670 msgid "" "A string displayed at the right of the entry to advertise an accelerator " "keystroke; it does not itself create the binding." msgstr "" -#: ../../../library/tkinter.rst:4558 +#: ../../../library/tkinter.rst:4674 msgid "" "The index of a character in the label to underline for keyboard traversal." msgstr "" -#: ../../../library/tkinter.rst:4562 +#: ../../../library/tkinter.rst:4678 msgid "One of ``'normal'``, ``'active'`` or ``'disabled'``." msgstr "" -#: ../../../library/tkinter.rst:4565 +#: ../../../library/tkinter.rst:4681 msgid "An image to display instead of, or together with, the text label." msgstr "" -#: ../../../library/tkinter.rst:4567 +#: ../../../library/tkinter.rst:4683 msgid "*compound*" msgstr "" -#: ../../../library/tkinter.rst:4568 +#: ../../../library/tkinter.rst:4684 msgid "" "Where to show the image relative to the text: ``'none'`` (the default), " "``'text'``, ``'image'``, ``'top'``, ``'bottom'``, ``'left'`` or ``'right'``." msgstr "" -#: ../../../library/tkinter.rst:4573 +#: ../../../library/tkinter.rst:4689 msgid "A bitmap to display instead of the text label." msgstr "" -#: ../../../library/tkinter.rst:4576 ../../../library/tkinter.rst:5471 +#: ../../../library/tkinter.rst:4692 ../../../library/tkinter.rst:5609 msgid "The font to use for the text." msgstr "" -#: ../../../library/tkinter.rst:4579 +#: ../../../library/tkinter.rst:4695 msgid "" "The entry's background and foreground colors in its normal state (ignored on " "macOS)." msgstr "" -#: ../../../library/tkinter.rst:4582 +#: ../../../library/tkinter.rst:4698 msgid "*activebackground*, *activeforeground*" msgstr "" -#: ../../../library/tkinter.rst:4583 +#: ../../../library/tkinter.rst:4699 msgid "" "The background and foreground colors used when the entry is active (ignored " "on macOS)." msgstr "" -#: ../../../library/tkinter.rst:4586 +#: ../../../library/tkinter.rst:4702 msgid "*columnbreak*" msgstr "" -#: ../../../library/tkinter.rst:4587 +#: ../../../library/tkinter.rst:4703 msgid "" "If true, the entry starts a new column instead of being placed below the " "previous entry." msgstr "" -#: ../../../library/tkinter.rst:4590 +#: ../../../library/tkinter.rst:4706 msgid "*hidemargin*" msgstr "" -#: ../../../library/tkinter.rst:4591 +#: ../../../library/tkinter.rst:4707 msgid "" "If true, the standard margin around the entry is omitted, which is useful " "when a menu is used as a palette." msgstr "" -#: ../../../library/tkinter.rst:4594 +#: ../../../library/tkinter.rst:4710 msgid "*menu*" msgstr "" -#: ../../../library/tkinter.rst:4595 +#: ../../../library/tkinter.rst:4711 msgid "The submenu posted by a cascade entry; it must be a child of this menu." msgstr "" -#: ../../../library/tkinter.rst:4598 +#: ../../../library/tkinter.rst:4714 msgid "*variable*" msgstr "" -#: ../../../library/tkinter.rst:4599 +#: ../../../library/tkinter.rst:4715 msgid "The variable associated with a checkbutton or radiobutton entry." msgstr "" -#: ../../../library/tkinter.rst:4601 +#: ../../../library/tkinter.rst:4717 msgid "*onvalue*, *offvalue*" msgstr "" -#: ../../../library/tkinter.rst:4602 +#: ../../../library/tkinter.rst:4718 msgid "" "The values stored in *variable* when a checkbutton entry is selected or " "cleared." msgstr "" -#: ../../../library/tkinter.rst:4605 +#: ../../../library/tkinter.rst:4721 msgid "*value*" msgstr "" -#: ../../../library/tkinter.rst:4606 +#: ../../../library/tkinter.rst:4722 msgid "The value stored in *variable* when a radiobutton entry is selected." msgstr "" -#: ../../../library/tkinter.rst:4608 +#: ../../../library/tkinter.rst:4724 msgid "*indicatoron*" msgstr "" -#: ../../../library/tkinter.rst:4609 +#: ../../../library/tkinter.rst:4725 msgid "Whether to display the indicator of a checkbutton or radiobutton entry." msgstr "" -#: ../../../library/tkinter.rst:4612 +#: ../../../library/tkinter.rst:4728 msgid "*selectcolor*" msgstr "" -#: ../../../library/tkinter.rst:4613 +#: ../../../library/tkinter.rst:4729 msgid "" "The color of the indicator of a checkbutton or radiobutton entry when it is " "selected." msgstr "" -#: ../../../library/tkinter.rst:4616 +#: ../../../library/tkinter.rst:4732 msgid "*selectimage*" msgstr "" -#: ../../../library/tkinter.rst:4617 +#: ../../../library/tkinter.rst:4733 msgid "" "The image displayed when a checkbutton or radiobutton entry is selected and " "*image* is also given." msgstr "" -#: ../../../library/tkinter.rst:4622 +#: ../../../library/tkinter.rst:4738 msgid "" "Add a new cascade entry to the bottom of the menu. A cascade entry has an " "associated submenu, given by its *menu* option, which must be a child of " "this menu; posting the entry posts the submenu next to it." msgstr "" -#: ../../../library/tkinter.rst:4629 +#: ../../../library/tkinter.rst:4745 msgid "" "Add a new checkbutton entry to the bottom of the menu. When invoked, a " "checkbutton entry toggles between its *onvalue* and *offvalue*, storing the " @@ -5589,27 +5740,27 @@ msgid "" "whether it is selected." msgstr "" -#: ../../../library/tkinter.rst:4636 +#: ../../../library/tkinter.rst:4752 msgid "" "Add a new command entry to the bottom of the menu. A command entry behaves " "much like a button: when it is invoked, the callback given by its *command* " "option is called." msgstr "" -#: ../../../library/tkinter.rst:4642 +#: ../../../library/tkinter.rst:4758 msgid "" "Add a new radiobutton entry to the bottom of the menu. Radiobutton entries " "sharing the same *variable* form a group of which only one may be selected " "at a time; selecting an entry stores its *value* in the variable." msgstr "" -#: ../../../library/tkinter.rst:4649 +#: ../../../library/tkinter.rst:4765 msgid "" "Add a separator to the bottom of the menu. A separator is displayed as a " "horizontal dividing line and cannot be activated or invoked." msgstr "" -#: ../../../library/tkinter.rst:4655 +#: ../../../library/tkinter.rst:4771 msgid "" "Same as :meth:`add`, except that the new entry is inserted just before the " "entry given by *index* instead of being appended to the end of the menu. " @@ -5620,37 +5771,37 @@ msgid "" "corresponding *itemType*." msgstr "" -#: ../../../library/tkinter.rst:4667 +#: ../../../library/tkinter.rst:4783 msgid "" "Insert a new cascade entry before the entry given by *index* (see :meth:" "`add_cascade`)." msgstr "" -#: ../../../library/tkinter.rst:4672 +#: ../../../library/tkinter.rst:4788 msgid "" "Insert a new checkbutton entry before the entry given by *index* (see :meth:" "`add_checkbutton`)." msgstr "" -#: ../../../library/tkinter.rst:4677 +#: ../../../library/tkinter.rst:4793 msgid "" "Insert a new command entry before the entry given by *index* (see :meth:" "`add_command`)." msgstr "" -#: ../../../library/tkinter.rst:4682 +#: ../../../library/tkinter.rst:4798 msgid "" "Insert a new radiobutton entry before the entry given by *index* (see :meth:" "`add_radiobutton`)." msgstr "" -#: ../../../library/tkinter.rst:4687 +#: ../../../library/tkinter.rst:4803 msgid "" "Insert a separator before the entry given by *index* (see :meth:" "`add_separator`)." msgstr "" -#: ../../../library/tkinter.rst:4692 +#: ../../../library/tkinter.rst:4808 msgid "" "Delete all of the menu entries between *index1* and *index2* inclusive. If " "*index2* is omitted, it defaults to *index1*, so that a single entry is " @@ -5658,13 +5809,13 @@ msgid "" "changing the *tearoff* option instead." msgstr "" -#: ../../../library/tkinter.rst:4700 +#: ../../../library/tkinter.rst:4816 msgid "" "Return the current value of the configuration option *option* for the entry " "given by *index*." msgstr "" -#: ../../../library/tkinter.rst:4708 +#: ../../../library/tkinter.rst:4824 msgid "" "Query or modify the configuration options of the entry given by *index*. " "This mirrors :meth:`~Misc.configure`, except that it applies to an " @@ -5675,20 +5826,20 @@ msgid "" "entryconfigure`." msgstr "" -#: ../../../library/tkinter.rst:4719 +#: ../../../library/tkinter.rst:4835 msgid "" "Return the numerical index corresponding to *index*, or ``None`` if *index* " "selects no entry." msgstr "" -#: ../../../library/tkinter.rst:4724 +#: ../../../library/tkinter.rst:4840 msgid "" "Return the type of the entry given by *index*: one of ``'command'``, " "``'cascade'``, ``'checkbutton'``, ``'radiobutton'``, ``'separator'`` or " "``'tearoff'`` (for the tear-off entry)." msgstr "" -#: ../../../library/tkinter.rst:4730 +#: ../../../library/tkinter.rst:4846 msgid "" "Make the entry given by *index* the active entry, redisplaying it with its " "active colors, and deactivate any previously active entry. If *index* " @@ -5696,7 +5847,7 @@ msgid "" "no active entry." msgstr "" -#: ../../../library/tkinter.rst:4737 +#: ../../../library/tkinter.rst:4853 msgid "" "Invoke the action of the entry given by *index*, as if it had been clicked. " "Nothing happens if the entry is disabled. If the entry has a *command* " @@ -5704,7 +5855,7 @@ msgid "" "result is an empty string." msgstr "" -#: ../../../library/tkinter.rst:4745 +#: ../../../library/tkinter.rst:4861 msgid "" "Display the menu on the screen at the root-window coordinates *x* and *y*, " "adjusting them if necessary so that the whole menu is visible. If the " @@ -5712,40 +5863,40 @@ msgid "" "posted." msgstr "" -#: ../../../library/tkinter.rst:4752 +#: ../../../library/tkinter.rst:4868 msgid "" "Post the submenu associated with the cascade entry given by *index*, " "unposting any previously posted submenu. This has no effect if *index* does " "not name a cascade entry or if the menu itself is not posted." msgstr "" -#: ../../../library/tkinter.rst:4761 +#: ../../../library/tkinter.rst:4877 msgid "" "Post the menu as a popup at the root-window coordinates *x* and *y*. If " "*entry* is given, the menu is positioned so that this entry is displayed " "under the pointer." msgstr "" -#: ../../../library/tkinter.rst:4767 +#: ../../../library/tkinter.rst:4883 msgid "" "Unmap the menu so that it is no longer displayed, also unposting any posted " "lower-level cascaded submenu. This has no effect on Windows and macOS, which " "manage the unposting of menus themselves." msgstr "" -#: ../../../library/tkinter.rst:4774 +#: ../../../library/tkinter.rst:4890 msgid "" "Return the x-coordinate, within the menu window, of the leftmost pixel of " "the entry given by *index*." msgstr "" -#: ../../../library/tkinter.rst:4781 +#: ../../../library/tkinter.rst:4897 msgid "" "Return the y-coordinate, within the menu window, of the topmost pixel of the " "entry given by *index*." msgstr "" -#: ../../../library/tkinter.rst:4787 +#: ../../../library/tkinter.rst:4903 msgid "" "A :class:`!Menubutton` widget displays a textual string, bitmap or image and " "posts an associated :class:`Menu`, given by its *menu* option, when the user " @@ -5755,7 +5906,7 @@ msgid "" "``menubutton`` manual page for the full list of options." msgstr "" -#: ../../../library/tkinter.rst:4799 +#: ../../../library/tkinter.rst:4915 msgid "" "A :class:`!Message` widget displays a non-interactive textual string, given " "by the *text* option or linked to a variable through *textvariable*. Unlike " @@ -5766,25 +5917,31 @@ msgid "" "options." msgstr "" -#: ../../../library/tkinter.rst:4810 +#: ../../../library/tkinter.rst:4926 msgid "" "A helper subclass of :class:`Menubutton` that displays a pop-up menu of " "mutually exclusive choices. *variable* is a :class:`Variable` kept in sync " "with the selection, *value* is the initial choice, and *values* are the " "remaining menu entries. The keyword argument *command* may be given a " "callback that is invoked with the selected value, and the keyword argument " -"*name* sets the Tk widget name." +"*name* sets the Tk widget name. Other keyword arguments are passed to the " +"underlying :class:`Menubutton` and may override its default appearance." msgstr "" -#: ../../../library/tkinter.rst:4819 +#: ../../../library/tkinter.rst:4937 msgid "Destroy the widget, also cleaning up the associated pop-up menu." msgstr "" -#: ../../../library/tkinter.rst:4821 +#: ../../../library/tkinter.rst:4939 msgid "Added support for the *name* keyword argument." msgstr "" -#: ../../../library/tkinter.rst:4828 +#: ../../../library/tkinter.rst:4942 +msgid "" +"Other :class:`Menubutton` options can now be passed as keyword arguments." +msgstr "" + +#: ../../../library/tkinter.rst:4949 msgid "" "A :class:`!PanedWindow` is a geometry-manager widget that arranges any " "number of child *panes* in a row (when *orient* is ``'horizontal'``) or a " @@ -5794,7 +5951,7 @@ msgid "" "from :class:`Widget`." msgstr "" -#: ../../../library/tkinter.rst:4836 +#: ../../../library/tkinter.rst:4957 msgid "" "The *orient* option selects the layout direction, *sashwidth* sets the width " "of each sash and *sashrelief* its relief. When *showhandle* is true a small " @@ -5802,14 +5959,14 @@ msgid "" "Tk ``panedwindow`` manual page for the full list of options." msgstr "" -#: ../../../library/tkinter.rst:4844 +#: ../../../library/tkinter.rst:4965 msgid "" "Add *child* to the panedwindow as a new pane, placed after any existing " "panes. The keyword arguments specify per-pane management options for " "*child*; they may be any of the options accepted by :meth:`paneconfigure`." msgstr "" -#: ../../../library/tkinter.rst:4854 +#: ../../../library/tkinter.rst:4975 msgid "" "Remove the pane containing *child* from the panedwindow. All geometry " "management options for *child* are forgotten. :meth:`forget` is an alias of :" @@ -5818,23 +5975,23 @@ msgid "" "place_forget` to remove the widget itself from its manager." msgstr "" -#: ../../../library/tkinter.rst:4863 +#: ../../../library/tkinter.rst:4984 msgid "" "Return a tuple of the widgets managed by the panedwindow, one per pane, in " "order." msgstr "" -#: ../../../library/tkinter.rst:4868 +#: ../../../library/tkinter.rst:4989 msgid "" "Return the current value of the management option *option* for the pane " "containing *child*. *option* may be any value allowed by :meth:" "`paneconfigure`." msgstr "" -#: ../../../library/tkinter.rst:4877 +#: ../../../library/tkinter.rst:4998 msgid "" "Query or modify the management options of the pane containing the widget " -"*tagOrId*. With no options, it returns a dictionary describing all of the " +"*child*. With no options, it returns a dictionary describing all of the " "available options for the pane; given a single option name as a string, it " "returns a description of that one option; otherwise it sets the given " "options. The supported options include *after* and *before* (insert the pane " @@ -5849,7 +6006,13 @@ msgid "" "an alias of :meth:`!paneconfigure`." msgstr "" -#: ../../../library/tkinter.rst:4895 +#: ../../../library/tkinter.rst:5014 +msgid "" +"The first parameter was renamed from *tagOrId* to *child*. The old name is " +"still accepted as a keyword argument." +msgstr "" + +#: ../../../library/tkinter.rst:5020 msgid "" "Identify the panedwindow component underneath the point given by *x* and " "*y*, in window coordinates. If the point is over a sash or a sash handle, " @@ -5859,7 +6022,7 @@ msgid "" "panedwindow, the result is an empty string." msgstr "" -#: ../../../library/tkinter.rst:4906 +#: ../../../library/tkinter.rst:5031 msgid "" "Query or change the position of the sashes in the panedwindow. This is a " "thin wrapper around the Tk ``sash`` subcommand; the convenience methods :" @@ -5867,7 +6030,7 @@ msgid "" "be used instead." msgstr "" -#: ../../../library/tkinter.rst:4913 +#: ../../../library/tkinter.rst:5038 msgid "" "Return the current x and y coordinate pair for the sash given by *index*, " "which must be an integer between 0 and one less than the number of panes in " @@ -5875,17 +6038,17 @@ msgid "" "of the region containing the sash." msgstr "" -#: ../../../library/tkinter.rst:4921 +#: ../../../library/tkinter.rst:5046 msgid "" "Record the current mouse position for the sash given by *index*, for use " "together with later sash-drag operations to move the sash." msgstr "" -#: ../../../library/tkinter.rst:4926 +#: ../../../library/tkinter.rst:5051 msgid "Place the sash given by *index* at the coordinates *x* and *y*." msgstr "" -#: ../../../library/tkinter.rst:4930 +#: ../../../library/tkinter.rst:5055 msgid "" "Query or change the position of the sash proxy, the \"ghost\" sash shown " "while a sash is being dragged with non-opaque resizing. This is a thin " @@ -5894,21 +6057,21 @@ msgid "" "be used instead." msgstr "" -#: ../../../library/tkinter.rst:4938 +#: ../../../library/tkinter.rst:5063 msgid "" "Return a tuple containing the x and y coordinates of the most recent proxy " "location." msgstr "" -#: ../../../library/tkinter.rst:4943 +#: ../../../library/tkinter.rst:5068 msgid "Remove the proxy from the display." msgstr "" -#: ../../../library/tkinter.rst:4947 +#: ../../../library/tkinter.rst:5072 msgid "Place the proxy at the coordinates *x* and *y*." msgstr "" -#: ../../../library/tkinter.rst:4952 +#: ../../../library/tkinter.rst:5077 msgid "" "A :class:`!Radiobutton` widget displays a textual string, bitmap or image " "together with a diamond or circular indicator, and selects one choice out of " @@ -5922,7 +6085,7 @@ msgid "" "*variable*, *value* and *command*." msgstr "" -#: ../../../library/tkinter.rst:4967 +#: ../../../library/tkinter.rst:5092 msgid "" "Do just what would happen if the user pressed the radiobutton with the " "mouse: select the button and invoke the associated command, if there is one. " @@ -5931,19 +6094,19 @@ msgid "" "is ``disabled``." msgstr "" -#: ../../../library/tkinter.rst:4976 +#: ../../../library/tkinter.rst:5101 msgid "" "Select the radiobutton and set the associated variable to the value " "corresponding to this widget." msgstr "" -#: ../../../library/tkinter.rst:4981 +#: ../../../library/tkinter.rst:5106 msgid "" "Deselect the radiobutton and set the associated variable to an empty string. " "If this radiobutton was not currently selected, this has no effect." msgstr "" -#: ../../../library/tkinter.rst:4987 +#: ../../../library/tkinter.rst:5112 msgid "" "Flash the radiobutton by redisplaying it several times, alternating between " "the active and normal colors. At the end of the flash the radiobutton is " @@ -5951,7 +6114,7 @@ msgid "" "is ignored if the radiobutton's state is ``disabled``." msgstr "" -#: ../../../library/tkinter.rst:4996 +#: ../../../library/tkinter.rst:5121 msgid "" "A :class:`!Scale` widget lets the user select a numerical value by moving a " "slider along a trough. It can be oriented vertically or horizontally and can " @@ -5959,7 +6122,7 @@ msgid "" "`Widget`." msgstr "" -#: ../../../library/tkinter.rst:5002 +#: ../../../library/tkinter.rst:5127 msgid "" "In addition to the standard widget options, a scale accepts the options " "documented in the Tk ``scale`` manual page, such as *from_*, *to*, " @@ -5969,26 +6132,32 @@ msgid "" "keyword." msgstr "" -#: ../../../library/tkinter.rst:5011 +#: ../../../library/tkinter.rst:5134 +msgid "" +"With a non-integer *resolution*, see :ref:`numeric values and the locale " +"`." +msgstr "" + +#: ../../../library/tkinter.rst:5139 msgid "" "Return the current value of the scale. The result is an integer if the " "scale's *resolution* yields whole numbers, and a float otherwise." msgstr "" -#: ../../../library/tkinter.rst:5017 +#: ../../../library/tkinter.rst:5145 msgid "" "Set the scale to *value*, moving the slider accordingly. This has no effect " "if the scale is disabled." msgstr "" -#: ../../../library/tkinter.rst:5022 +#: ../../../library/tkinter.rst:5150 msgid "" "Return a tuple ``(x, y)`` giving the pixel coordinates, relative to the " "widget, of the point on the centerline of the trough that corresponds to " "*value*. If *value* is omitted, the scale's current value is used." msgstr "" -#: ../../../library/tkinter.rst:5029 +#: ../../../library/tkinter.rst:5157 msgid "" "Return a string describing the part of the scale at the pixel coordinates " "*x*, *y*: ``'slider'``, ``'trough1'`` (the part of the trough above or to " @@ -5996,7 +6165,7 @@ msgid "" "slider), or an empty string if the point is not over any of these elements." msgstr "" -#: ../../../library/tkinter.rst:5038 +#: ../../../library/tkinter.rst:5166 msgid "" "A :class:`!Scrollbar` widget displays a slider and two arrows that let the " "user scroll an associated widget, such as a :class:`Listbox`, :class:" @@ -6007,14 +6176,14 @@ msgid "" "method. Inherits from :class:`Widget`." msgstr "" -#: ../../../library/tkinter.rst:5049 +#: ../../../library/tkinter.rst:5177 msgid "" "Return the current scrollbar settings as a tuple ``(first, last)`` of two " "fractions between 0 and 1, describing the portion of the document that is " "currently visible, as last passed to :meth:`set`." msgstr "" -#: ../../../library/tkinter.rst:5055 +#: ../../../library/tkinter.rst:5183 msgid "" "Set the scrollbar. *first* and *last* are fractions between 0 and 1 giving " "the positions of the start and end of the visible portion of the associated " @@ -6022,7 +6191,7 @@ msgid "" "*xscrollcommand* or *yscrollcommand* and called by that widget." msgstr "" -#: ../../../library/tkinter.rst:5063 +#: ../../../library/tkinter.rst:5191 msgid "" "Mark the element *index* (one of ``'arrow1'``, ``'slider'`` or ``'arrow2'``) " "as active, displaying it according to the *activebackground* and " @@ -6030,11 +6199,11 @@ msgid "" "currently active element, or ``None`` if no element is active." msgstr "" -#: ../../../library/tkinter.rst:5069 +#: ../../../library/tkinter.rst:5197 msgid "The *index* argument is now optional." msgstr "" -#: ../../../library/tkinter.rst:5074 +#: ../../../library/tkinter.rst:5202 msgid "" "Return a float indicating the fractional change in the scrollbar setting " "that corresponds to moving the slider by *deltax* pixels horizontally (for " @@ -6042,21 +6211,21 @@ msgid "" "scrollbars)." msgstr "" -#: ../../../library/tkinter.rst:5081 +#: ../../../library/tkinter.rst:5209 msgid "" "Return a float between 0 and 1 indicating where the point at pixel " "coordinates *x*, *y* lies in the trough: 0 corresponds to the top or left of " "the trough and 1 to the bottom or right." msgstr "" -#: ../../../library/tkinter.rst:5087 +#: ../../../library/tkinter.rst:5215 msgid "" "Return the name of the element under the pixel coordinates *x*, *y* (such as " "``'arrow1'``), or an empty string if the point does not lie in any element " "of the scrollbar." msgstr "" -#: ../../../library/tkinter.rst:5094 +#: ../../../library/tkinter.rst:5222 msgid "" "A :class:`!Spinbox` widget is an :class:`Entry`-like widget with a pair of " "up/down arrow buttons that let the user step through a range of values in " @@ -6070,7 +6239,13 @@ msgid "" "of the entered text. Inherits from :class:`Widget` and :class:`XView`." msgstr "" -#: ../../../library/tkinter.rst:5107 +#: ../../../library/tkinter.rst:5235 +msgid "" +"With a non-integer *increment*, see :ref:`numeric values and the locale " +"`." +msgstr "" + +#: ../../../library/tkinter.rst:5238 msgid "" "Many of the methods take an *index* argument identifying a character in the " "spinbox's string. As described in the Tk ``spinbox`` manual page, *index* " @@ -6081,17 +6256,17 @@ msgid "" "x-coordinate *x* in the window)." msgstr "" -#: ../../../library/tkinter.rst:5118 +#: ../../../library/tkinter.rst:5249 msgid "Return the spinbox's string." msgstr "" -#: ../../../library/tkinter.rst:5122 +#: ../../../library/tkinter.rst:5253 msgid "" "Insert the characters of the string *s* just before the character given by " "*index*." msgstr "" -#: ../../../library/tkinter.rst:5127 +#: ../../../library/tkinter.rst:5258 msgid "" "Delete one or more characters of the spinbox. *first* is the index of the " "first character to delete, and *last* is the index of the character just " @@ -6099,11 +6274,11 @@ msgid "" "*first* is deleted." msgstr "" -#: ../../../library/tkinter.rst:5139 +#: ../../../library/tkinter.rst:5270 msgid "Return the numerical index corresponding to *index*, as a string." msgstr "" -#: ../../../library/tkinter.rst:5143 +#: ../../../library/tkinter.rst:5274 msgid "" "Return a tuple of four integers ``(x, y, width, height)`` describing the " "bounding box of the character given by *index*. *x* and *y* are the pixel " @@ -6112,19 +6287,19 @@ msgid "" "may refer to a region outside the visible area of the window." msgstr "" -#: ../../../library/tkinter.rst:5156 +#: ../../../library/tkinter.rst:5287 msgid "" "Return the name of the window element at the pixel coordinates *x*, *y*: one " "of ``'buttondown'``, ``'buttonup'``, ``'entry'`` or ``'none'``." msgstr "" -#: ../../../library/tkinter.rst:5161 +#: ../../../library/tkinter.rst:5292 msgid "" "Invoke the spin button given by *element*, either ``'buttonup'`` or " "``'buttondown'``, triggering the action associated with it." msgstr "" -#: ../../../library/tkinter.rst:5166 +#: ../../../library/tkinter.rst:5297 msgid "" "A thin wrapper around the Tk ``scan`` widget subcommand, used to implement " "fast dragging of the view: ``scan('mark', x)`` records *x* and the current " @@ -6132,14 +6307,14 @@ msgid "" "meth:`scan_mark` and :meth:`scan_dragto` methods wrap the two forms." msgstr "" -#: ../../../library/tkinter.rst:5174 +#: ../../../library/tkinter.rst:5305 msgid "" "Record *x* and the current view in the spinbox window, for use with a later :" "meth:`scan_dragto` call. This is typically associated with a mouse button " "press in the widget." msgstr "" -#: ../../../library/tkinter.rst:5180 +#: ../../../library/tkinter.rst:5311 msgid "" "Adjust the view by 10 times the difference between *x* and the *x* passed to " "the last :meth:`scan_mark` call. This is typically associated with mouse " @@ -6147,7 +6322,7 @@ msgid "" "through the window." msgstr "" -#: ../../../library/tkinter.rst:5187 +#: ../../../library/tkinter.rst:5318 msgid "" "A thin wrapper around the Tk ``selection`` widget subcommand, used to adjust " "the selection within the spinbox. It has several forms depending on the " @@ -6160,7 +6335,7 @@ msgid "" "methods wrap these forms." msgstr "" -#: ../../../library/tkinter.rst:5201 +#: ../../../library/tkinter.rst:5332 msgid "" "Locate the end of the selection nearest to the character given by *index* " "and adjust that end of the selection to be at *index* (including but not " @@ -6170,19 +6345,19 @@ msgid "" "most recent anchor point, inclusive." msgstr "" -#: ../../../library/tkinter.rst:5212 +#: ../../../library/tkinter.rst:5343 msgid "" "Clear the selection if it is currently in this widget. If the selection is " "not in this widget, the method has no effect." msgstr "" -#: ../../../library/tkinter.rst:5217 +#: ../../../library/tkinter.rst:5348 msgid "" "This shadows the inherited :meth:`Misc.selection_clear`, which clears the X " "selection; that method is not available on a :class:`Spinbox`." msgstr "" -#: ../../../library/tkinter.rst:5223 +#: ../../../library/tkinter.rst:5354 msgid "" "Set or get the currently selected element. If *element* (one of " "``'buttonup'``, ``'buttondown'`` or ``'none'``) is given, that spin button " @@ -6190,26 +6365,26 @@ msgid "" "selected element is returned." msgstr "" -#: ../../../library/tkinter.rst:5230 +#: ../../../library/tkinter.rst:5361 msgid "" "Set the selection anchor point to just before the character given by " "*index*, without changing the selection itself." msgstr "" -#: ../../../library/tkinter.rst:5238 +#: ../../../library/tkinter.rst:5369 msgid "" "Return ``True`` if there are characters selected in the spinbox, ``False`` " "otherwise." msgstr "" -#: ../../../library/tkinter.rst:5246 +#: ../../../library/tkinter.rst:5377 msgid "" "Set the selection to include the characters starting with the one indexed by " "*start* and ending with the one just before *end*. If *end* refers to the " "same character as *start* or an earlier one, the selection is cleared." msgstr "" -#: ../../../library/tkinter.rst:5256 +#: ../../../library/tkinter.rst:5387 msgid "" "Set the selection between *index* and the anchor point. If *index* is before " "the anchor point, the selection runs from *index* up to but not including " @@ -6220,7 +6395,7 @@ msgid "" "selection is created using the most recent anchor point." msgstr "" -#: ../../../library/tkinter.rst:5280 +#: ../../../library/tkinter.rst:5411 msgid "" "A :class:`!Text` widget displays and edits multi-line text. Portions of the " "text may be styled with **tags**, particular positions may be annotated with " @@ -6233,7 +6408,7 @@ msgid "" "options." msgstr "" -#: ../../../library/tkinter.rst:5291 +#: ../../../library/tkinter.rst:5422 msgid "" "Most of the methods take one or more *index* arguments that identify a " "position within the text. As described in the Tk ``text`` manual page, an " @@ -6251,7 +6426,13 @@ msgid "" "right, for example ``'insert wordstart - 1 c'``." msgstr "" -#: ../../../library/tkinter.rst:5309 +#: ../../../library/tkinter.rst:5440 +msgid "" +"Print the contents of the text widget using the native print dialog. " +"Requires Tk 8.7/9.0 or newer." +msgstr "" + +#: ../../../library/tkinter.rst:5447 msgid "" "Insert the string *chars* just before the character at *index* (if *index* " "is ``'end'``, just before the final newline). By default the new text " @@ -6261,7 +6442,7 @@ msgid "" "name or a sequence of names), overriding the surrounding tags." msgstr "" -#: ../../../library/tkinter.rst:5320 +#: ../../../library/tkinter.rst:5458 msgid "" "Delete the range of characters from *index1* up to but not including " "*index2*. If *index2* is omitted, the single character at *index1* is " @@ -6269,34 +6450,34 @@ msgid "" "deletion that would remove it is adjusted accordingly." msgstr "" -#: ../../../library/tkinter.rst:5328 +#: ../../../library/tkinter.rst:5466 msgid "" "Replace the range of characters from *index1* up to but not including " "*index2* with *chars*. This is equivalent to a :meth:`delete` followed by " "an :meth:`insert` at *index1*; *args* is interpreted as for :meth:`insert`." msgstr "" -#: ../../../library/tkinter.rst:5337 +#: ../../../library/tkinter.rst:5475 msgid "" "Return the text from *index1* up to but not including *index2* as a string. " "If *index2* is omitted, return the single character at *index1*. Embedded " "images and windows are omitted from the result." msgstr "" -#: ../../../library/tkinter.rst:5344 +#: ../../../library/tkinter.rst:5482 msgid "" "Return the position corresponding to *index* in the canonical ``'line." "char'`` form." msgstr "" -#: ../../../library/tkinter.rst:5349 +#: ../../../library/tkinter.rst:5487 msgid "" "Compare the positions of *index1* and *index2* using the relational operator " "*op*, which must be one of ``'<'``, ``'<='``, ``'=='``, ``'>='``, ``'>'`` or " "``'!='``, and return the boolean result." msgstr "" -#: ../../../library/tkinter.rst:5355 +#: ../../../library/tkinter.rst:5493 msgid "" "Count the number of items of the requested kinds between *index1* and " "*index2*; the count is negative if *index1* is after *index2*. Each of " @@ -6310,11 +6491,11 @@ msgid "" "counting option (or ``None`` if the result is empty)." msgstr "" -#: ../../../library/tkinter.rst:5369 +#: ../../../library/tkinter.rst:5507 msgid "Added the *return_ints* parameter." msgstr "" -#: ../../../library/tkinter.rst:5375 +#: ../../../library/tkinter.rst:5513 msgid "" "Adjust the view so that the character given by *index* is visible. If it is " "already visible the method has no effect; if it is a short distance out of " @@ -6322,14 +6503,14 @@ msgid "" "otherwise it scrolls to center *index* in the window." msgstr "" -#: ../../../library/tkinter.rst:5382 +#: ../../../library/tkinter.rst:5520 msgid "" "Return a tuple ``(x, y, width, height)`` giving the bounding box, in pixels, " "of the visible part of the character at *index*, or ``None`` if that " "character is not visible on the screen." msgstr "" -#: ../../../library/tkinter.rst:5391 +#: ../../../library/tkinter.rst:5529 msgid "" "Return a tuple ``(x, y, width, height, baseline)`` describing the display " "line that contains *index*: the first four values give the bounding box of " @@ -6338,24 +6519,24 @@ msgid "" "visible on the screen." msgstr "" -#: ../../../library/tkinter.rst:5399 +#: ../../../library/tkinter.rst:5537 msgid "" "Set the mark named *markName* to the position just before the character at " "*index*, creating the mark if it does not already exist. A mark created this " "way has right gravity by default." msgstr "" -#: ../../../library/tkinter.rst:5405 +#: ../../../library/tkinter.rst:5543 msgid "" "Remove each of the marks named in *markNames*. The special ``insert`` and " "``current`` marks may not be removed." msgstr "" -#: ../../../library/tkinter.rst:5410 +#: ../../../library/tkinter.rst:5548 msgid "Return a tuple of the names of all marks currently set in the widget." msgstr "" -#: ../../../library/tkinter.rst:5414 +#: ../../../library/tkinter.rst:5552 msgid "" "If *direction* is omitted, return the gravity of mark *markName*, either " "``'left'`` or ``'right'``. Otherwise set its gravity to *direction*. The " @@ -6364,21 +6545,21 @@ msgid "" "of such text." msgstr "" -#: ../../../library/tkinter.rst:5423 +#: ../../../library/tkinter.rst:5561 msgid "" "Return the name of the first mark at or after *index*, or ``None`` if there " "is none. When *index* is the name of a mark, the search starts just after " "that mark." msgstr "" -#: ../../../library/tkinter.rst:5430 +#: ../../../library/tkinter.rst:5568 msgid "" "Return the name of the last mark at or before *index*, or ``None`` if there " "is none. When *index* is the name of a mark, the search starts just before " "that mark." msgstr "" -#: ../../../library/tkinter.rst:5437 +#: ../../../library/tkinter.rst:5575 msgid "" "Add the tag *tagName* to the range of characters from *index1* up to but not " "including the next index in *args*. Further pairs of indices may follow in " @@ -6386,20 +6567,20 @@ msgid "" "character at that index." msgstr "" -#: ../../../library/tkinter.rst:5444 +#: ../../../library/tkinter.rst:5582 msgid "" "Remove the tag *tagName* from the characters from *index1* up to but not " "including *index2* (or from the single character at *index1* if *index2* is " "omitted). The tag itself continues to exist even if no characters carry it." msgstr "" -#: ../../../library/tkinter.rst:5451 +#: ../../../library/tkinter.rst:5589 msgid "" "Delete each of the tags named in *tagNames*, removing them from all " "characters and discarding their options and bindings." msgstr "" -#: ../../../library/tkinter.rst:5459 +#: ../../../library/tkinter.rst:5597 msgid "" "Query or modify the configuration options of the tag *tagName*. This " "mirrors :meth:`~Misc.configure`, except that it applies to a tag rather than " @@ -6408,226 +6589,226 @@ msgid "" "this way also gives it a priority higher than any existing tag." msgstr "" -#: ../../../library/tkinter.rst:5467 +#: ../../../library/tkinter.rst:5605 msgid "" "The supported tag options, all controlling the appearance of the tagged " "text, are:" msgstr "" -#: ../../../library/tkinter.rst:5473 +#: ../../../library/tkinter.rst:5611 msgid "*foreground*" msgstr "" -#: ../../../library/tkinter.rst:5474 +#: ../../../library/tkinter.rst:5612 msgid "The color to use for the text." msgstr "" -#: ../../../library/tkinter.rst:5476 +#: ../../../library/tkinter.rst:5614 msgid "*background*" msgstr "" -#: ../../../library/tkinter.rst:5477 +#: ../../../library/tkinter.rst:5615 msgid "The color to use for the area behind the text." msgstr "" -#: ../../../library/tkinter.rst:5479 +#: ../../../library/tkinter.rst:5617 msgid "*fgstipple*, *bgstipple*" msgstr "" -#: ../../../library/tkinter.rst:5480 +#: ../../../library/tkinter.rst:5618 msgid "" "Bitmaps used to stipple the foreground (text) and the background; only well " "supported on X11." msgstr "" -#: ../../../library/tkinter.rst:5483 +#: ../../../library/tkinter.rst:5621 msgid "*borderwidth*" msgstr "" -#: ../../../library/tkinter.rst:5484 +#: ../../../library/tkinter.rst:5622 msgid "" "The width of the border drawn around the text according to *relief* (default " "``0``)." msgstr "" -#: ../../../library/tkinter.rst:5487 +#: ../../../library/tkinter.rst:5625 msgid "*relief*" msgstr "" -#: ../../../library/tkinter.rst:5488 +#: ../../../library/tkinter.rst:5626 msgid "" "The 3-D appearance of the text's border: ``'flat'`` (the default), " "``'raised'``, ``'sunken'``, ``'ridge'``, ``'groove'`` or ``'solid'``." msgstr "" -#: ../../../library/tkinter.rst:5491 +#: ../../../library/tkinter.rst:5629 msgid "*offset*" msgstr "" -#: ../../../library/tkinter.rst:5492 +#: ../../../library/tkinter.rst:5630 msgid "" "How far the text is raised above (or, if negative, lowered below) the " "baseline, for superscripts and subscripts." msgstr "" -#: ../../../library/tkinter.rst:5496 +#: ../../../library/tkinter.rst:5634 msgid "Whether to underline the text." msgstr "" -#: ../../../library/tkinter.rst:5498 +#: ../../../library/tkinter.rst:5636 msgid "*underlinefg*" msgstr "" -#: ../../../library/tkinter.rst:5499 +#: ../../../library/tkinter.rst:5637 msgid "The color of the underline; it defaults to the text color." msgstr "" -#: ../../../library/tkinter.rst:5501 +#: ../../../library/tkinter.rst:5639 msgid "*overstrike*" msgstr "" -#: ../../../library/tkinter.rst:5502 +#: ../../../library/tkinter.rst:5640 msgid "Whether to draw a line through the middle of the text." msgstr "" -#: ../../../library/tkinter.rst:5504 +#: ../../../library/tkinter.rst:5642 msgid "*overstrikefg*" msgstr "" -#: ../../../library/tkinter.rst:5505 +#: ../../../library/tkinter.rst:5643 msgid "The color of the overstrike line; it defaults to the text color." msgstr "" -#: ../../../library/tkinter.rst:5507 +#: ../../../library/tkinter.rst:5645 msgid "*elide*" msgstr "" -#: ../../../library/tkinter.rst:5508 +#: ../../../library/tkinter.rst:5646 msgid "Whether the text is elided (hidden)." msgstr "" -#: ../../../library/tkinter.rst:5511 +#: ../../../library/tkinter.rst:5649 msgid "" "How to justify the first character of a display line: ``'left'`` (the " "default), ``'right'`` or ``'center'``." msgstr "" -#: ../../../library/tkinter.rst:5514 +#: ../../../library/tkinter.rst:5652 msgid "*wrap*" msgstr "" -#: ../../../library/tkinter.rst:5515 +#: ../../../library/tkinter.rst:5653 msgid "" "How to wrap lines that are too long: ``'char'``, ``'word'`` or ``'none'``." msgstr "" -#: ../../../library/tkinter.rst:5518 +#: ../../../library/tkinter.rst:5656 msgid "*lmargin1*, *lmargin2*" msgstr "" -#: ../../../library/tkinter.rst:5519 +#: ../../../library/tkinter.rst:5657 msgid "" "The indentation, in pixels, of the first display line of a logical line and " "of the remaining display lines." msgstr "" -#: ../../../library/tkinter.rst:5522 +#: ../../../library/tkinter.rst:5660 msgid "*lmargincolor*" msgstr "" -#: ../../../library/tkinter.rst:5523 +#: ../../../library/tkinter.rst:5661 msgid "The color of the left margin area." msgstr "" -#: ../../../library/tkinter.rst:5525 +#: ../../../library/tkinter.rst:5663 msgid "*rmargin*" msgstr "" -#: ../../../library/tkinter.rst:5526 +#: ../../../library/tkinter.rst:5664 msgid "The right-hand margin, in pixels." msgstr "" -#: ../../../library/tkinter.rst:5528 +#: ../../../library/tkinter.rst:5666 msgid "*rmargincolor*" msgstr "" -#: ../../../library/tkinter.rst:5529 +#: ../../../library/tkinter.rst:5667 msgid "The color of the right margin area." msgstr "" -#: ../../../library/tkinter.rst:5531 +#: ../../../library/tkinter.rst:5669 msgid "*spacing1*, *spacing2*, *spacing3*" msgstr "" -#: ../../../library/tkinter.rst:5532 +#: ../../../library/tkinter.rst:5670 msgid "" "Extra space, in pixels, above the first display line of a logical line, " "between its display lines, and below its last display line." msgstr "" -#: ../../../library/tkinter.rst:5535 +#: ../../../library/tkinter.rst:5673 msgid "*tabs*" msgstr "" -#: ../../../library/tkinter.rst:5536 +#: ../../../library/tkinter.rst:5674 msgid "The set of tab stops, in the same form as the widget's *tabs* option." msgstr "" -#: ../../../library/tkinter.rst:5538 +#: ../../../library/tkinter.rst:5676 msgid "*tabstyle*" msgstr "" -#: ../../../library/tkinter.rst:5539 +#: ../../../library/tkinter.rst:5677 msgid "How tab stops are interpreted: ``'tabular'`` or ``'wordprocessor'``." msgstr "" -#: ../../../library/tkinter.rst:5541 +#: ../../../library/tkinter.rst:5679 msgid "*selectbackground*, *selectforeground*" msgstr "" -#: ../../../library/tkinter.rst:5542 +#: ../../../library/tkinter.rst:5680 msgid "" "The background and foreground colors used for the text while it is selected." msgstr "" -#: ../../../library/tkinter.rst:5547 +#: ../../../library/tkinter.rst:5685 msgid "" "Tk 8.6 added the *lmargincolor*, *overstrikefg*, *rmargincolor*, " "*selectbackground*, *selectforeground* and *underlinefg* options." msgstr "" -#: ../../../library/tkinter.rst:5550 +#: ../../../library/tkinter.rst:5688 msgid ":meth:`tag_config` is an alias of :meth:`!tag_configure`." msgstr "" -#: ../../../library/tkinter.rst:5554 +#: ../../../library/tkinter.rst:5692 msgid "" "Return the current value of the configuration option *option* for the tag " "*tagName*." msgstr "" -#: ../../../library/tkinter.rst:5559 +#: ../../../library/tkinter.rst:5697 msgid "" "If *index* is omitted, return a tuple of the names of all tags defined in " "the widget; otherwise return only the names of the tags applied to the " "character at *index*. The names are ordered from lowest to highest priority." msgstr "" -#: ../../../library/tkinter.rst:5566 +#: ../../../library/tkinter.rst:5704 msgid "" "Return a tuple of indices describing all ranges of text tagged with " "*tagName*. The result alternates start and end indices, so that elements " "``2*i`` and ``2*i+1`` bound the *i*-th range." msgstr "" -#: ../../../library/tkinter.rst:5573 +#: ../../../library/tkinter.rst:5711 msgid "" "Search forward from *index1* (up to *index2* if given) for the first range " "of characters tagged with *tagName*, and return a two-element tuple of its " "start and end indices, or an empty tuple if there is no such range." msgstr "" -#: ../../../library/tkinter.rst:5580 +#: ../../../library/tkinter.rst:5718 msgid "" "Search backward from *index1* (down to *index2* if given) for the nearest " "preceding range of characters tagged with *tagName*, and return a two-" @@ -6635,7 +6816,7 @@ msgid "" "such range." msgstr "" -#: ../../../library/tkinter.rst:5587 +#: ../../../library/tkinter.rst:5725 msgid "" "Raise the priority of tag *tagName* so that it is just above the priority of " "*aboveThis*, or to the highest priority of all tags if *aboveThis* is " @@ -6643,13 +6824,13 @@ msgid "" "priority tag wins." msgstr "" -#: ../../../library/tkinter.rst:5595 +#: ../../../library/tkinter.rst:5733 msgid "" "Lower the priority of tag *tagName* so that it is just below the priority of " "*belowThis*, or to the lowest priority of all tags if *belowThis* is omitted." msgstr "" -#: ../../../library/tkinter.rst:5601 +#: ../../../library/tkinter.rst:5739 msgid "" "Bind the event *sequence* on characters tagged with *tagName* to the " "callback *func*, so that *func* is invoked when that event occurs over such " @@ -6658,14 +6839,14 @@ msgid "" "bind` and returns the identifier of the new binding." msgstr "" -#: ../../../library/tkinter.rst:5611 +#: ../../../library/tkinter.rst:5749 msgid "" "Remove the bindings of the event *sequence* on characters tagged with " "*tagName*. If *funcid* is given, only that binding (as returned by :meth:" "`tag_bind`) is removed and its callback is unregistered." msgstr "" -#: ../../../library/tkinter.rst:5622 +#: ../../../library/tkinter.rst:5760 msgid "" "Embed an image at *index* and return the name assigned to this image " "instance, which may then be used as an index or passed to the other " @@ -6674,30 +6855,30 @@ msgid "" "*padx* and *pady*." msgstr "" -#: ../../../library/tkinter.rst:5631 +#: ../../../library/tkinter.rst:5769 msgid "" "Return the current value of the configuration option *option* for the " "embedded image at *index*." msgstr "" -#: ../../../library/tkinter.rst:5636 +#: ../../../library/tkinter.rst:5774 msgid "" "Query or modify the configuration options of the embedded image at *index*, " "like :meth:`~Misc.configure` but applied to that image." msgstr "" -#: ../../../library/tkinter.rst:5641 +#: ../../../library/tkinter.rst:5779 msgid "Return a tuple of the names of all images embedded in the widget." msgstr "" -#: ../../../library/tkinter.rst:5645 +#: ../../../library/tkinter.rst:5783 msgid "" "This shadows the inherited :meth:`Misc.image_names`, which returns the names " "of all images in the Tcl interpreter; that method is not available on a :" "class:`Text`." msgstr "" -#: ../../../library/tkinter.rst:5651 +#: ../../../library/tkinter.rst:5789 msgid "" "Embed a window (any widget) at *index*. The options, given in *cnf* and " "*kw*, include *window* (the widget to embed), *create* (a callback that " @@ -6705,27 +6886,27 @@ msgid "" "embedded widget must be a descendant of the text widget's parent." msgstr "" -#: ../../../library/tkinter.rst:5659 +#: ../../../library/tkinter.rst:5797 msgid "" "Return the current value of the configuration option *option* for the " "embedded window at *index*." msgstr "" -#: ../../../library/tkinter.rst:5667 +#: ../../../library/tkinter.rst:5805 msgid "" "Query or modify the configuration options of the embedded window at *index*, " "like :meth:`~Misc.configure` but applied to that window." msgstr "" -#: ../../../library/tkinter.rst:5670 +#: ../../../library/tkinter.rst:5808 msgid ":meth:`window_config` is an alias of :meth:`!window_configure`." msgstr "" -#: ../../../library/tkinter.rst:5674 +#: ../../../library/tkinter.rst:5812 msgid "Return a tuple of the names of all windows embedded in the widget." msgstr "" -#: ../../../library/tkinter.rst:5678 +#: ../../../library/tkinter.rst:5816 msgid "" "Low-level wrapper around the Tk ``edit`` widget command that controls the " "undo/redo mechanism and the modified flag; *args* is the ``edit`` subcommand " @@ -6733,26 +6914,26 @@ msgid "" "around it and are usually more convenient." msgstr "" -#: ../../../library/tkinter.rst:5686 +#: ../../../library/tkinter.rst:5824 msgid "" -"If *arg* is omitted, return the current state of the modified flag as ``0`` " -"or ``1``; the flag is set automatically whenever the text is inserted or " +"If *arg* is omitted, return the current state of the modified flag as a :" +"class:`bool`; the flag is set automatically whenever the text is inserted or " "deleted. Otherwise set the flag to the boolean *arg*." msgstr "" -#: ../../../library/tkinter.rst:5693 +#: ../../../library/tkinter.rst:5831 msgid "" "Return ``True`` if there is an edit action on the undo stack that can be " "undone, and ``False`` otherwise." msgstr "" -#: ../../../library/tkinter.rst:5700 +#: ../../../library/tkinter.rst:5838 msgid "" "Return ``True`` if there is an edit action on the redo stack that can be " "reapplied, and ``False`` otherwise." msgstr "" -#: ../../../library/tkinter.rst:5707 +#: ../../../library/tkinter.rst:5845 msgid "" "Undo the most recent edit action, that is, all the inserts and deletes " "recorded on the undo stack since the previous separator, and move it to the " @@ -6761,7 +6942,7 @@ msgid "" "delimiting the ranges of text that were changed." msgstr "" -#: ../../../library/tkinter.rst:5717 +#: ../../../library/tkinter.rst:5855 msgid "" "Reapply the most recently undone edit action, provided no further edits have " "been made since, and move it back to the undo stack. Raises :exc:`TclError` " @@ -6770,11 +6951,11 @@ msgid "" "were changed." msgstr "" -#: ../../../library/tkinter.rst:5726 +#: ../../../library/tkinter.rst:5864 msgid "Clear the undo and redo stacks." msgstr "" -#: ../../../library/tkinter.rst:5730 +#: ../../../library/tkinter.rst:5868 msgid "" "Push a separator onto the undo stack, marking a boundary between edit " "actions for undo and redo. Has no effect unless the *undo* option is true. " @@ -6782,7 +6963,7 @@ msgid "" "true." msgstr "" -#: ../../../library/tkinter.rst:5738 +#: ../../../library/tkinter.rst:5876 msgid "" "Search for *pattern* starting at *index* and return the index of the first " "character of the first match, or an empty string if there is no match. " @@ -6798,11 +6979,11 @@ msgid "" "in it." msgstr "" -#: ../../../library/tkinter.rst:5753 +#: ../../../library/tkinter.rst:5891 msgid "Added the *nolinestop* and *strictlimits* parameters." msgstr "" -#: ../../../library/tkinter.rst:5759 +#: ../../../library/tkinter.rst:5897 msgid "" "Like :meth:`search`, but find every match in the searched range and return a " "tuple of the starting indices of all matches (empty if there are none). By " @@ -6811,7 +6992,7 @@ msgid "" "a :class:`Variable`, it receives a list with one element per match." msgstr "" -#: ../../../library/tkinter.rst:5778 +#: ../../../library/tkinter.rst:5916 msgid "" "Scroll the widget by 10 times the difference between *x*, *y* and the " "coordinates passed to the last :meth:`scan_mark` call. This is typically " @@ -6819,7 +7000,7 @@ msgid "" "high speed through the window." msgstr "" -#: ../../../library/tkinter.rst:5785 +#: ../../../library/tkinter.rst:5923 msgid "" "If *boolean* is omitted, return whether internal consistency checks of the B-" "tree data structure are enabled. Otherwise enable or disable them. The " @@ -6827,7 +7008,7 @@ msgid "" "holding large amounts of text." msgstr "" -#: ../../../library/tkinter.rst:5793 +#: ../../../library/tkinter.rst:5931 msgid "" "Return the contents of the widget from *index1* up to but not including " "*index2* (or just the segment at *index1* if *index2* is omitted), including " @@ -6840,7 +7021,7 @@ msgid "" "three values as arguments and nothing is returned." msgstr "" -#: ../../../library/tkinter.rst:5807 +#: ../../../library/tkinter.rst:5945 msgid "" "Create a peer text widget with the path name *newPathName* that shares this " "widget's underlying data (text, marks, tags, images and the undo stack). " @@ -6849,13 +7030,13 @@ msgid "" "*startline* and *endline*, may be given to override this." msgstr "" -#: ../../../library/tkinter.rst:5819 +#: ../../../library/tkinter.rst:5957 msgid "" "Return a tuple of the path names of this widget's peers, not including the " "widget itself." msgstr "" -#: ../../../library/tkinter.rst:5826 +#: ../../../library/tkinter.rst:5964 msgid "" "Control the synchronization of the displayed view with the underlying text, " "which may lag behind when line heights have not yet been computed (for " @@ -6867,24 +7048,24 @@ msgid "" "immediately." msgstr "" -#: ../../../library/tkinter.rst:5840 +#: ../../../library/tkinter.rst:5978 msgid "" "Return ``True`` if the line height calculations are not up to date, and " "``False`` otherwise. The ``<>`` virtual event fires whenever " "this state changes, with the *detail* field set to the new value." msgstr "" -#: ../../../library/tkinter.rst:5849 +#: ../../../library/tkinter.rst:5987 msgid "" "Adjust the view so that the location given by *what* is visible. This is an " "obsolete equivalent of :meth:`see`, which should be used instead." msgstr "" -#: ../../../library/tkinter.rst:5855 +#: ../../../library/tkinter.rst:5993 msgid "Variable classes" msgstr "" -#: ../../../library/tkinter.rst:5859 +#: ../../../library/tkinter.rst:5997 msgid "" "The base class for the Tk variable wrappers. A Tk variable is a value stored " "in the Tcl interpreter that can be linked to widgets through their " @@ -6893,7 +7074,7 @@ msgid "" "widget bound to it, and a user editing such a widget updates the variable." msgstr "" -#: ../../../library/tkinter.rst:5866 +#: ../../../library/tkinter.rst:6004 msgid "" "*master* is the widget whose Tcl interpreter owns the variable; if omitted, " "the default root window is used. *value* is the initial value; if omitted, a " @@ -6903,70 +7084,79 @@ msgid "" "the existing value is retained." msgstr "" -#: ../../../library/tkinter.rst:5874 +#: ../../../library/tkinter.rst:6012 msgid "" "In most cases you should use one of the typed subclasses below -- :class:" "`StringVar`, :class:`IntVar`, :class:`DoubleVar` or :class:`BooleanVar` -- " "rather than :class:`!Variable` directly." msgstr "" -#: ../../../library/tkinter.rst:5878 +#: ../../../library/tkinter.rst:6018 +msgid "" +"When a :class:`!Variable` is garbage collected, its Tcl variable is unset. " +"Keep a reference to it for as long as a widget is linked to it, for example " +"by storing it as an attribute rather than in a local variable. Otherwise Tk " +"recreates the Tcl variable to keep the widget working, but it is never unset " +"again, leaking one Tcl variable per dropped wrapper." +msgstr "" + +#: ../../../library/tkinter.rst:6024 msgid "" "Two variables now compare equal (``==``) only when they have the same name, " "are of the same class, and belong to the same Tcl interpreter." msgstr "" -#: ../../../library/tkinter.rst:5884 +#: ../../../library/tkinter.rst:6030 msgid "" "Return the current value of the variable. For the base class the value is " "returned as a string; the typed subclasses convert it to the appropriate " "Python type." msgstr "" -#: ../../../library/tkinter.rst:5893 +#: ../../../library/tkinter.rst:6039 msgid "" "Set the variable to *value*. :meth:`initialize` is an alias of :meth:`!set`." msgstr "" -#: ../../../library/tkinter.rst:5896 ../../../library/tkinter.rst:6015 +#: ../../../library/tkinter.rst:6042 ../../../library/tkinter.rst:6173 msgid "The *initialize* spelling." msgstr "" -#: ../../../library/tkinter.rst:5901 +#: ../../../library/tkinter.rst:6047 msgid "" "Register *callback* to be called when the variable is accessed according to " "*mode*. *mode* is one of the strings ``'array'``, ``'read'``, ``'write'`` or " "``'unset'``, or a list or tuple of such strings." msgstr "" -#: ../../../library/tkinter.rst:5906 +#: ../../../library/tkinter.rst:6052 msgid "" "When triggered, *callback* is called with three arguments: the name of the " "Tcl variable, an index (or an empty string if the variable is not an element " "of an array), and the *mode* that triggered the call." msgstr "" -#: ../../../library/tkinter.rst:5910 +#: ../../../library/tkinter.rst:6056 msgid "" "Return the internal name of the registered callback, which can be passed to :" "meth:`trace_remove`." msgstr "" -#: ../../../library/tkinter.rst:5917 +#: ../../../library/tkinter.rst:6063 msgid "" "Remove a trace callback from the variable. *mode* must match the *mode* that " "was passed to :meth:`trace_add`, and *cbname* is the callback name returned " "by :meth:`trace_add`." msgstr "" -#: ../../../library/tkinter.rst:5925 +#: ../../../library/tkinter.rst:6071 msgid "" "Return a list of ``(modes, cbname)`` pairs describing all traces currently " "set on the variable, where *modes* is a tuple of mode strings and *cbname* " "is the internal callback name." msgstr "" -#: ../../../library/tkinter.rst:5936 +#: ../../../library/tkinter.rst:6082 msgid "" "Register *callback* to be called when the variable is accessed according to " "*mode*. *mode* is one of the strings ``'r'``, ``'w'`` or ``'u'``, for read, " @@ -6974,89 +7164,99 @@ msgid "" "`trace` is an alias of :meth:`!trace_variable`." msgstr "" -#: ../../../library/tkinter.rst:5943 +#: ../../../library/tkinter.rst:6089 msgid "" "Use :meth:`trace_add` instead. This method wraps a Tcl feature that was " "removed in Tcl 9.0." msgstr "" -#: ../../../library/tkinter.rst:5949 +#: ../../../library/tkinter.rst:6095 msgid "" "Remove the trace callback named *cbname* registered for *mode* with :meth:" "`trace_variable`." msgstr "" -#: ../../../library/tkinter.rst:5952 +#: ../../../library/tkinter.rst:6098 msgid "" "Use :meth:`trace_remove` instead. This method wraps a Tcl feature that was " "removed in Tcl 9.0." msgstr "" -#: ../../../library/tkinter.rst:5958 +#: ../../../library/tkinter.rst:6104 msgid "" "Return a list of ``(mode, cbname)`` pairs for all traces set on the variable " "with :meth:`trace_variable`." msgstr "" -#: ../../../library/tkinter.rst:5961 +#: ../../../library/tkinter.rst:6107 msgid "" "Use :meth:`trace_info` instead. This method wraps a Tcl feature that was " "removed in Tcl 9.0." msgstr "" -#: ../../../library/tkinter.rst:5968 +#: ../../../library/tkinter.rst:6114 msgid "" "A :class:`Variable` subclass that holds a string. The default value is " "``''``." msgstr "" -#: ../../../library/tkinter.rst:5973 +#: ../../../library/tkinter.rst:6119 msgid "Return the value of the variable as a :class:`str`." msgstr "" -#: ../../../library/tkinter.rst:5978 +#: ../../../library/tkinter.rst:6124 msgid "" "A :class:`Variable` subclass that holds an integer. The default value is " "``0``." msgstr "" -#: ../../../library/tkinter.rst:5983 +#: ../../../library/tkinter.rst:6129 msgid "Return the value of the variable as an :class:`int`." msgstr "" -#: ../../../library/tkinter.rst:5988 +#: ../../../library/tkinter.rst:6134 msgid "" "A :class:`Variable` subclass that holds a float. The default value is " "``0.0``." msgstr "" -#: ../../../library/tkinter.rst:5993 +#: ../../../library/tkinter.rst:6139 msgid "Return the value of the variable as a :class:`float`." msgstr "" -#: ../../../library/tkinter.rst:5998 +#: ../../../library/tkinter.rst:6145 +msgid "" +"A floating-point value is always parsed with a period (``.``) as the decimal " +"separator, but :class:`Spinbox`, :class:`Scale` and :class:`ttk.Spinbox " +"` format it according to the ``LC_NUMERIC`` locale. " +"Under a locale that uses a comma they produce a value that :meth:`get` " +"cannot read, raising :exc:`TclError`. Set ``LC_NUMERIC`` to a locale that " +"uses a period (such as ``'C'``) to avoid this." +msgstr "" + +#: ../../../library/tkinter.rst:6156 msgid "" "A :class:`Variable` subclass that holds a boolean. The default value is " "``False``." msgstr "" -#: ../../../library/tkinter.rst:6003 +#: ../../../library/tkinter.rst:6161 msgid "" "Return the value of the variable as a :class:`bool`. Raise a :exc:" "`ValueError` if the value cannot be interpreted as a boolean." msgstr "" -#: ../../../library/tkinter.rst:6012 +#: ../../../library/tkinter.rst:6170 msgid "" "Set the variable to *value*, converting it to a boolean. :meth:`initialize` " "is an alias of :meth:`!set`." msgstr "" -#: ../../../library/tkinter.rst:6020 +#: ../../../library/tkinter.rst:6178 msgid "Image classes" msgstr "" -#: ../../../library/tkinter.rst:6024 +#: ../../../library/tkinter.rst:6182 msgid "" "Base class for Tk images. *imgtype* is the Tk image type, one of ``'photo'`` " "or ``'bitmap'``. An image is a named object that can be displayed by widgets " @@ -7065,35 +7265,35 @@ msgid "" "`PhotoImage` or :class:`BitmapImage` rather than an :class:`!Image` directly." msgstr "" -#: ../../../library/tkinter.rst:6032 +#: ../../../library/tkinter.rst:6190 msgid "" "The image's configuration options are given by *cnf* and *kw* and may be " "queried and changed later with the mapping protocol (using ``image[key]``) " "or with the :meth:`configure` method." msgstr "" -#: ../../../library/tkinter.rst:6041 +#: ../../../library/tkinter.rst:6199 msgid "" "Modify one or more configuration options of the image. The valid options " "depend on the image type; see :class:`PhotoImage` and :class:`BitmapImage`. :" "meth:`config` is an alias of :meth:`!configure`." msgstr "" -#: ../../../library/tkinter.rst:6048 +#: ../../../library/tkinter.rst:6206 msgid "Return the height of the image, in pixels." msgstr "" -#: ../../../library/tkinter.rst:6052 +#: ../../../library/tkinter.rst:6210 msgid "Return the width of the image, in pixels." msgstr "" -#: ../../../library/tkinter.rst:6056 +#: ../../../library/tkinter.rst:6214 msgid "" "Return the type of the image, that is the value of *imgtype* with which it " "was created (for example ``'photo'`` or ``'bitmap'``)." msgstr "" -#: ../../../library/tkinter.rst:6062 +#: ../../../library/tkinter.rst:6220 msgid "" "A full-color image (the Tk ``photo`` image type), stored internally with a " "varying degree of transparency per pixel. It can read and write GIF, PPM/PGM " @@ -7101,7 +7301,7 @@ msgid "" "and be drawn in widgets. Inherits from :class:`Image`." msgstr "" -#: ../../../library/tkinter.rst:6068 +#: ../../../library/tkinter.rst:6226 msgid "" "The configuration options include *data* (the image contents as a string), " "*file* (the name of a file to read the contents from), *format* (the name of " @@ -7109,22 +7309,29 @@ msgid "" "when building it up piece by piece), *gamma* and *palette*." msgstr "" -#: ../../../library/tkinter.rst:6075 +#: ../../../library/tkinter.rst:6233 msgid "" "Blank the image; that is, set the entire image to have no data, so that it " "is displayed as transparent and the background of whatever window it is " "displayed in shows through." msgstr "" -#: ../../../library/tkinter.rst:6081 +#: ../../../library/tkinter.rst:6239 +msgid "" +"Recalculate the dithered image in each window where it is displayed. This is " +"useful when the image data was supplied in pieces, in which case the " +"dithered image may not be exactly correct." +msgstr "" + +#: ../../../library/tkinter.rst:6247 msgid "Return the current value of the configuration option *option*." msgstr "" -#: ../../../library/tkinter.rst:6085 +#: ../../../library/tkinter.rst:6251 msgid "Return a new :class:`PhotoImage` with a copy of this image." msgstr "" -#: ../../../library/tkinter.rst:6087 +#: ../../../library/tkinter.rst:6253 msgid "" "*from_coords* specifies a rectangular sub-region of the source image to be " "copied. It must be a tuple or a list of 1 to 4 integers ``(x1, y1, x2, " @@ -7135,18 +7342,18 @@ msgid "" "*from_coords* is not given, the whole source image is copied." msgstr "" -#: ../../../library/tkinter.rst:6098 ../../../library/tkinter.rst:6130 +#: ../../../library/tkinter.rst:6264 ../../../library/tkinter.rst:6296 msgid "" "If *zoom* or *subsample* are specified, the image is transformed as in the :" "meth:`zoom` or :meth:`subsample` methods. The value must be a single integer " "or a pair of integers." msgstr "" -#: ../../../library/tkinter.rst:6102 +#: ../../../library/tkinter.rst:6268 msgid "Added the *from_coords*, *zoom* and *subsample* parameters." msgstr "" -#: ../../../library/tkinter.rst:6110 +#: ../../../library/tkinter.rst:6276 msgid "" "Copy a region from *sourceImage* (which must be a :class:`PhotoImage`) into " "this image, possibly with pixel zooming and/or subsampling. If no options " @@ -7154,14 +7361,14 @@ msgid "" "starting at coordinates ``(0, 0)``." msgstr "" -#: ../../../library/tkinter.rst:6115 ../../../library/tkinter.rst:6227 -#: ../../../library/tkinter.rst:6283 +#: ../../../library/tkinter.rst:6281 ../../../library/tkinter.rst:6419 +#: ../../../library/tkinter.rst:6481 msgid "" "*from_coords* specifies a rectangular sub-region of the source image to be " "copied, as in the :meth:`copy` method." msgstr "" -#: ../../../library/tkinter.rst:6118 +#: ../../../library/tkinter.rst:6284 msgid "" "*to* specifies a rectangular sub-region of the destination image to be " "affected. It must be a tuple or a list of 1 to 4 integers ``(x1, y1, x2, " @@ -7171,14 +7378,14 @@ msgid "" "to fill the destination region in a tiled fashion." msgstr "" -#: ../../../library/tkinter.rst:6126 +#: ../../../library/tkinter.rst:6292 msgid "" "If *shrink* is true, the size of the destination image is reduced, if " "necessary, so that the region being copied into is at the bottom-right " "corner of the image." msgstr "" -#: ../../../library/tkinter.rst:6134 +#: ../../../library/tkinter.rst:6300 msgid "" "*compositingrule* specifies how transparent pixels in the source image are " "combined with the destination image. With ``'overlay'`` (the default), the " @@ -7188,11 +7395,11 @@ msgid "" "discarded and the source image is used as-is." msgstr "" -#: ../../../library/tkinter.rst:6148 +#: ../../../library/tkinter.rst:6314 msgid "Return the image data." msgstr "" -#: ../../../library/tkinter.rst:6150 +#: ../../../library/tkinter.rst:6316 msgid "" "*format* specifies the name of the image file format handler to use. If it " "is not given, the data is returned as a tuple (one element per row) of " @@ -7200,7 +7407,7 @@ msgid "" "``#RRGGBB`` format." msgstr "" -#: ../../../library/tkinter.rst:6155 +#: ../../../library/tkinter.rst:6321 msgid "" "*from_coords* specifies a rectangular region of the image to be returned. It " "must be a tuple or a list of 1 to 4 integers ``(x1, y1, x2, y2)``. If only " @@ -7211,34 +7418,51 @@ msgid "" "is returned." msgstr "" -#: ../../../library/tkinter.rst:6163 ../../../library/tkinter.rst:6266 +#: ../../../library/tkinter.rst:6329 ../../../library/tkinter.rst:6458 msgid "" "If *background* is specified, the data does not contain any transparency " "information; in all transparent pixels the color is replaced by the " "specified color." msgstr "" -#: ../../../library/tkinter.rst:6167 ../../../library/tkinter.rst:6270 +#: ../../../library/tkinter.rst:6333 ../../../library/tkinter.rst:6462 msgid "" "If *grayscale* is true, the data does not contain color information; all " "pixel data is transformed into grayscale." msgstr "" -#: ../../../library/tkinter.rst:6175 +#: ../../../library/tkinter.rst:6336 ../../../library/tkinter.rst:6372 +#: ../../../library/tkinter.rst:6385 ../../../library/tkinter.rst:6465 +msgid "" +"*metadata* is a dictionary passed to the image format driver. It requires " +"Tcl/Tk 9.0 or newer." +msgstr "" + +#: ../../../library/tkinter.rst:6341 ../../../library/tkinter.rst:6408 +#: ../../../library/tkinter.rst:6471 +msgid "Added the *metadata* parameter." +msgstr "" + +#: ../../../library/tkinter.rst:6347 msgid "" "Return the color of the pixel at coordinates (*x*, *y*) as an ``(r, g, b)`` " "tuple of three integers between 0 and 255, representing the red, green and " -"blue components respectively." +"blue components respectively. If *withalpha* is true, the returned tuple has " +"a fourth element giving the alpha (opacity) value of the pixel." +msgstr "" + +#: ../../../library/tkinter.rst:6353 +msgid "Added the *withalpha* parameter, which requires Tcl/Tk 9.0 or newer." msgstr "" -#: ../../../library/tkinter.rst:6181 +#: ../../../library/tkinter.rst:6358 msgid "" "Set pixels of the image to the colors given in *data*, which must be a " "string or a nested sequence of horizontal rows of pixel colors (for example " "``\"{red green} {blue yellow}\"``)." msgstr "" -#: ../../../library/tkinter.rst:6185 +#: ../../../library/tkinter.rst:6362 msgid "" "*to* specifies the coordinates of the region of the image into which the " "data are copied. It must be a tuple or a list of 2 or 4 integers ``(x1, " @@ -7246,15 +7470,25 @@ msgid "" "bottom-right corner, of the region. The default position is ``(0, 0)``." msgstr "" -#: ../../../library/tkinter.rst:6195 +#: ../../../library/tkinter.rst:6369 +msgid "" +"*format* specifies the format of the image *data*, so that only image file " +"format handlers whose names begin with it are tried." +msgstr "" + +#: ../../../library/tkinter.rst:6375 +msgid "Added the *format* and *metadata* parameters." +msgstr "" + +#: ../../../library/tkinter.rst:6381 msgid "Read image data from the file named *filename* into the image." msgstr "" -#: ../../../library/tkinter.rst:6197 +#: ../../../library/tkinter.rst:6383 msgid "*format* specifies the format of the image data in the file." msgstr "" -#: ../../../library/tkinter.rst:6199 +#: ../../../library/tkinter.rst:6388 msgid "" "*from_coords* specifies a rectangular sub-region of the image file data to " "be copied to the destination image. It must be a tuple or a list of 1 to 4 " @@ -7265,53 +7499,53 @@ msgid "" "the image in the file is read." msgstr "" -#: ../../../library/tkinter.rst:6209 +#: ../../../library/tkinter.rst:6398 msgid "" "*to* specifies the coordinates of the top-left corner of the region of the " "image into which the data are read. The default is ``(0, 0)``." msgstr "" -#: ../../../library/tkinter.rst:6213 +#: ../../../library/tkinter.rst:6402 msgid "" "If *shrink* is true, the size of the image is reduced, if necessary, so that " "the region into which the file data are read is at the bottom-right corner " "of the image." msgstr "" -#: ../../../library/tkinter.rst:6222 +#: ../../../library/tkinter.rst:6414 msgid "" "Return a new :class:`PhotoImage` based on this image but using only every " "*x*-th pixel in the X direction and every *y*-th pixel in the Y direction. " "If *y* is not given, it defaults to the same value as *x*." msgstr "" -#: ../../../library/tkinter.rst:6230 ../../../library/tkinter.rst:6286 +#: ../../../library/tkinter.rst:6422 ../../../library/tkinter.rst:6484 msgid "Added the *from_coords* parameter." msgstr "" -#: ../../../library/tkinter.rst:6236 +#: ../../../library/tkinter.rst:6428 msgid "" "Return ``True`` if the pixel at coordinates (*x*, *y*) is fully transparent, " "``False`` otherwise." msgstr "" -#: ../../../library/tkinter.rst:6244 +#: ../../../library/tkinter.rst:6436 msgid "" "Make the pixel at coordinates (*x*, *y*) fully transparent if *boolean* is " "true, fully opaque otherwise." msgstr "" -#: ../../../library/tkinter.rst:6253 +#: ../../../library/tkinter.rst:6445 msgid "Write image data from the image to the file named *filename*." msgstr "" -#: ../../../library/tkinter.rst:6255 +#: ../../../library/tkinter.rst:6447 msgid "" "*format* specifies the name of the image file format handler to use. If it " "is not given, the format is guessed from the file extension." msgstr "" -#: ../../../library/tkinter.rst:6258 +#: ../../../library/tkinter.rst:6450 msgid "" "*from_coords* specifies a rectangular region of the image to be written. It " "must be a tuple or a list of 1 to 4 integers ``(x1, y1, x2, y2)``. If only " @@ -7321,25 +7555,25 @@ msgid "" "given, the whole image is written." msgstr "" -#: ../../../library/tkinter.rst:6273 +#: ../../../library/tkinter.rst:6468 msgid "Added the *background* and *grayscale* parameters." msgstr "" -#: ../../../library/tkinter.rst:6279 +#: ../../../library/tkinter.rst:6477 msgid "" "Return a new :class:`PhotoImage` with this image magnified by a factor of " "*x* in the X direction and *y* in the Y direction. If *y* is not given, it " "defaults to the same value as *x*." msgstr "" -#: ../../../library/tkinter.rst:6293 +#: ../../../library/tkinter.rst:6491 msgid "" "A two-color image (the Tk ``bitmap`` image type) created from an X11 bitmap. " "Each pixel displays a foreground color, a background color, or nothing " "(producing a transparent effect). Inherits from :class:`Image`." msgstr "" -#: ../../../library/tkinter.rst:6298 +#: ../../../library/tkinter.rst:6496 msgid "" "The configuration options are *data* or *file* (the source bitmap, given as " "a string in X11 bitmap format or as the name of a file in that format), " @@ -7351,17 +7585,17 @@ msgid "" "transparent." msgstr "" -#: ../../../library/tkinter.rst:6308 +#: ../../../library/tkinter.rst:6506 msgid "" ":class:`!BitmapImage` has no methods of its own beyond those inherited from :" "class:`Image`." msgstr "" -#: ../../../library/tkinter.rst:6313 +#: ../../../library/tkinter.rst:6511 msgid "Other classes" msgstr "" -#: ../../../library/tkinter.rst:6317 +#: ../../../library/tkinter.rst:6515 msgid "" "A container for the attributes of an event passed to a callback bound with :" "meth:`Misc.bind`. An :class:`!Event` instance has the following attributes, " @@ -7370,90 +7604,90 @@ msgid "" "that they are not meaningful. See :ref:`bindings-and-events`." msgstr "" -#: ../../../library/tkinter.rst:6327 +#: ../../../library/tkinter.rst:6525 msgid "The serial number of the event." msgstr "" -#: ../../../library/tkinter.rst:6331 +#: ../../../library/tkinter.rst:6529 msgid "The mouse button that was pressed or released (for button events)." msgstr "" -#: ../../../library/tkinter.rst:6335 +#: ../../../library/tkinter.rst:6533 msgid "Whether the window has the focus (for ``Enter`` and ``Leave`` events)." msgstr "" -#: ../../../library/tkinter.rst:6340 +#: ../../../library/tkinter.rst:6538 msgid "" "The new height and width of the window (for ``Configure`` and ``Expose`` " "events)." msgstr "" -#: ../../../library/tkinter.rst:6345 +#: ../../../library/tkinter.rst:6543 msgid "The keycode of the key that was pressed or released." msgstr "" -#: ../../../library/tkinter.rst:6349 +#: ../../../library/tkinter.rst:6547 msgid "" "The state of the event, as a number (for most events) or a string (for " "``Visibility`` events)." msgstr "" -#: ../../../library/tkinter.rst:6354 +#: ../../../library/tkinter.rst:6552 msgid "The timestamp of the event, in milliseconds." msgstr "" -#: ../../../library/tkinter.rst:6359 +#: ../../../library/tkinter.rst:6557 msgid "The pointer position relative to the widget, in pixels." msgstr "" -#: ../../../library/tkinter.rst:6364 +#: ../../../library/tkinter.rst:6562 msgid "" "The pointer position relative to the top-left corner of the screen, in " "pixels." msgstr "" -#: ../../../library/tkinter.rst:6369 +#: ../../../library/tkinter.rst:6567 msgid "The character typed, as a string (for key events)." msgstr "" -#: ../../../library/tkinter.rst:6373 +#: ../../../library/tkinter.rst:6571 msgid "``True`` if the event was sent by another application." msgstr "" -#: ../../../library/tkinter.rst:6377 +#: ../../../library/tkinter.rst:6575 msgid "The symbolic name of the key that was pressed or released." msgstr "" -#: ../../../library/tkinter.rst:6381 +#: ../../../library/tkinter.rst:6579 msgid "The numeric value of :attr:`keysym`." msgstr "" -#: ../../../library/tkinter.rst:6385 +#: ../../../library/tkinter.rst:6583 msgid "The :class:`EventType` of the event." msgstr "" -#: ../../../library/tkinter.rst:6389 +#: ../../../library/tkinter.rst:6587 msgid "The widget on which the event occurred." msgstr "" -#: ../../../library/tkinter.rst:6393 +#: ../../../library/tkinter.rst:6591 msgid "The amount the mouse wheel was rotated (for ``MouseWheel`` events)." msgstr "" -#: ../../../library/tkinter.rst:6397 +#: ../../../library/tkinter.rst:6595 msgid "" "The data string of a virtual event, as passed to the *data* option of :meth:" "`Misc.event_generate`. It is ``'??'`` for non-virtual events." msgstr "" -#: ../../../library/tkinter.rst:6405 +#: ../../../library/tkinter.rst:6603 msgid "" "A fixed detail string for ``Enter``, ``Leave``, ``FocusIn``, ``FocusOut`` " "and ``ConfigureRequest`` events (see the Tcl/Tk documentation). It is " "``'??'`` for other events." msgstr "" -#: ../../../library/tkinter.rst:6414 +#: ../../../library/tkinter.rst:6612 msgid "" "An :class:`enum.StrEnum` enumerating the Tk event types, used as the value " "of :attr:`Event.type`. Its members include, among others, ``KeyPress``, " @@ -7462,7 +7696,7 @@ msgid "" "``Expose``, ``Destroy`` and ``MouseWheel``." msgstr "" -#: ../../../library/tkinter.rst:6427 +#: ../../../library/tkinter.rst:6625 msgid "" "Internal helper that wraps a Python callback so that it can be invoked from " "Tcl. *func* is the Python function, *subst* is an optional function that pre-" @@ -7471,11 +7705,23 @@ msgid "" "this class is not normally used directly." msgstr "" -#: ../../../library/tkinter.rst:6437 +#: ../../../library/tkinter.rst:6635 msgid "Module-level functions" msgstr "" -#: ../../../library/tkinter.rst:6441 +#: ../../../library/tkinter.rst:6639 +msgid "" +"The :func:`Tcl` function is a factory function which creates an object much " +"like that created by the :class:`Tk` class, except that it does not " +"initialize the Tk subsystem. This is most often useful when driving the Tcl " +"interpreter in an environment where one doesn't want to create extraneous " +"toplevel windows, or where one cannot (such as Unix/Linux systems without an " +"X server). An object created by the :func:`Tcl` object can have a Toplevel " +"window created (and the Tk subsystem initialized) by calling its :meth:`~Tk." +"loadtk` method." +msgstr "" + +#: ../../../library/tkinter.rst:6651 msgid "" "Inhibit the creation of an implicit default root window. Afterwards :mod:`!" "tkinter` no longer creates a shared default root automatically, and " @@ -7484,102 +7730,145 @@ msgid "" "applications to make the root window explicit." msgstr "" -#: ../../../library/tkinter.rst:6449 +#: ../../../library/tkinter.rst:6659 msgid "" "Run the Tk main event loop on the default root window until all windows are " "destroyed. Equivalent to calling :meth:`Misc.mainloop` on the default root." msgstr "" -#: ../../../library/tkinter.rst:6455 +#: ../../../library/tkinter.rst:6665 msgid "" "Convert the Tcl boolean string *s* (one of ``'1'``, ``'true'``, ``'yes'``, " "``'on'`` and similar, or their false counterparts) to a Python :class:" "`bool`. Raise :exc:`TclError` for an invalid value." msgstr "" -#: ../../../library/tkinter.rst:6462 +#: ../../../library/tkinter.rst:6672 msgid "" "Convert *s* to a floating-point number. This is the built-in :class:`float`." msgstr "" -#: ../../../library/tkinter.rst:6467 +#: ../../../library/tkinter.rst:6677 msgid "Convert *s* to an integer. This is the built-in :class:`int`." msgstr "" -#: ../../../library/tkinter.rst:6472 +#: ../../../library/tkinter.rst:6682 msgid "" "Return the names of all existing images in the default root's interpreter." msgstr "" -#: ../../../library/tkinter.rst:6476 +#: ../../../library/tkinter.rst:6686 msgid "" "Return the available image types (such as ``'photo'`` and ``'bitmap'``) in " "the default root's interpreter." msgstr "" -#: ../../../library/tkinter.rst:6480 +#: ../../../library/tkinter.rst:6693 +msgid "File handlers" +msgstr "" + +#: ../../../library/tkinter.rst:6695 +msgid "" +"Tk allows you to register and unregister a callback function which will be " +"called from the Tk mainloop when I/O is possible on a file descriptor. Only " +"one handler may be registered per file descriptor. Example code::" +msgstr "" + +#: ../../../library/tkinter.rst:6706 +msgid "This feature is not available on Windows." +msgstr "" + +#: ../../../library/tkinter.rst:6708 +msgid "" +"Since you don't know how many bytes are available for reading, you may not " +"want to use the :class:`~io.BufferedIOBase` or :class:`~io.TextIOBase` :meth:" +"`~io.BufferedIOBase.read` or :meth:`~io.IOBase.readline` methods, since " +"these will insist on reading a predefined number of bytes. For sockets, the :" +"meth:`~socket.socket.recv` or :meth:`~socket.socket.recvfrom` methods will " +"work fine; for other files, use raw reads or ``os.read(file.fileno(), " +"maxbytecount)``." +msgstr "" + +#: ../../../library/tkinter.rst:6719 +msgid "" +"Registers the file handler callback function *func*. The *file* argument may " +"either be an object with a :meth:`~io.IOBase.fileno` method (such as a file " +"or socket object), or an integer file descriptor. The *mask* argument is an " +"ORed combination of any of the three constants below. The callback is called " +"as follows::" +msgstr "" + +#: ../../../library/tkinter.rst:6730 +msgid "Unregisters a file handler." +msgstr "" + +#: ../../../library/tkinter.rst:6737 +msgid "Constants used in the *mask* arguments." +msgstr "" + +#: ../../../library/tkinter.rst:6741 msgid "Constants" msgstr "" -#: ../../../library/tkinter.rst:6482 +#: ../../../library/tkinter.rst:6743 msgid "" "The following symbolic constants are available in both the :mod:`!tkinter` " "and :mod:`!tkinter.constants` namespaces." msgstr "" -#: ../../../library/tkinter.rst:6489 +#: ../../../library/tkinter.rst:6750 msgid "Truthy values, all equal to the integer ``1``." msgstr "" -#: ../../../library/tkinter.rst:6495 +#: ../../../library/tkinter.rst:6756 msgid "Falsy values, all equal to the integer ``0``." msgstr "" -#: ../../../library/tkinter.rst:6510 +#: ../../../library/tkinter.rst:6771 msgid "" "Compass directions (``'n'``, ``'s'``, ``'e'``, ``'w'`` and the diagonals and " "edges) plus ``CENTER`` (``'center'``), used as values for the *anchor* and " "*sticky* options and by methods such as :meth:`Misc.grid_anchor`." msgstr "" -#: ../../../library/tkinter.rst:6519 +#: ../../../library/tkinter.rst:6780 msgid "" "Sides for the *side* option of the packer (see :meth:`Pack.pack_configure`)." msgstr "" -#: ../../../library/tkinter.rst:6526 +#: ../../../library/tkinter.rst:6787 msgid "" "Values for the *fill* option of the packer: ``'x'``, ``'y'``, ``'both'`` or " "``'none'``." msgstr "" -#: ../../../library/tkinter.rst:6536 +#: ../../../library/tkinter.rst:6797 msgid "Values for the *relief* option, which controls a widget's 3-D border." msgstr "" -#: ../../../library/tkinter.rst:6541 +#: ../../../library/tkinter.rst:6802 msgid "" "Values for the *orient* option of widgets such as :class:`Scale`, :class:" "`Scrollbar` and :class:`PanedWindow`." msgstr "" -#: ../../../library/tkinter.rst:6547 +#: ../../../library/tkinter.rst:6808 msgid "" "Values for the *wrap* option of the :class:`Text` widget, selecting line " "wrapping on character or word boundaries." msgstr "" -#: ../../../library/tkinter.rst:6552 +#: ../../../library/tkinter.rst:6813 msgid "The text-alignment value ``'baseline'``." msgstr "" -#: ../../../library/tkinter.rst:6557 +#: ../../../library/tkinter.rst:6818 msgid "" "Values for the *bordermode* option of the placer (see :meth:`Place." "place_configure`)." msgstr "" -#: ../../../library/tkinter.rst:6568 +#: ../../../library/tkinter.rst:6829 msgid "" "Symbolic indices used by the :class:`Text`, :class:`Entry`, :class:`Listbox` " "and :class:`Canvas` widgets, such as ``'insert'`` (the insertion cursor), " @@ -7587,75 +7876,79 @@ msgid "" "(``'sel.first'`` and ``'sel.last'``)." msgstr "" -#: ../../../library/tkinter.rst:6575 +#: ../../../library/tkinter.rst:6836 msgid "" "The special tag ``'all'``, which matches every item of a :class:`Canvas` or " "every character of a :class:`Text` (for example ``canvas.delete(ALL)``)." msgstr "" -#: ../../../library/tkinter.rst:6583 +#: ../../../library/tkinter.rst:6844 msgid "Values for the *state* option of various widgets and items." msgstr "" -#: ../../../library/tkinter.rst:6591 +#: ../../../library/tkinter.rst:6852 msgid "" "Menu entry types, used as the *itemType* argument of :meth:`Menu.add` and :" "meth:`Menu.insert`." msgstr "" -#: ../../../library/tkinter.rst:6599 +#: ../../../library/tkinter.rst:6860 msgid "Values for the *selectmode* option of the :class:`Listbox` widget." msgstr "" -#: ../../../library/tkinter.rst:6605 +#: ../../../library/tkinter.rst:6866 msgid "Values for the *style* option of :class:`Canvas` arc items." msgstr "" -#: ../../../library/tkinter.rst:6613 +#: ../../../library/tkinter.rst:6874 msgid "" "Values for the *capstyle* (``'butt'``, ``'projecting'``, ``'round'``) and " "*joinstyle* (``'round'``, ``'bevel'``, ``'miter'``) options of :class:" "`Canvas` line items." msgstr "" -#: ../../../library/tkinter.rst:6620 +#: ../../../library/tkinter.rst:6881 msgid "" "Values for the *arrow* option of :class:`Canvas` line items, indicating " "which ends have arrowheads." msgstr "" -#: ../../../library/tkinter.rst:6626 +#: ../../../library/tkinter.rst:6887 msgid "" "The first argument passed by a :class:`Scrollbar` to the :meth:`XView.xview` " "or :meth:`YView.yview` method of the scrolled widget." msgstr "" -#: ../../../library/tkinter.rst:6632 +#: ../../../library/tkinter.rst:6893 msgid "" "Values for the *what* argument of :meth:`XView.xview_scroll` and :meth:" "`YView.yview_scroll`." msgstr "" -#: ../../../library/tkinter.rst:6639 +#: ../../../library/tkinter.rst:6900 msgid "Other option values: ``'underline'``, ``'numeric'`` and ``'dotbox'``." msgstr "" -#: ../../../library/tkinter.rst:687 +#: ../../../library/tkinter.rst:595 +msgid "geometry management (widgets)" +msgstr "" + +#: ../../../library/tkinter.rst:595 msgid "packing (widgets)" msgstr "" -#: ../../../library/tkinter.rst:804 +#: ../../../library/tkinter.rst:734 msgid "window manager (widgets)" msgstr "" -#: ../../../library/tkinter.rst:850 +#: ../../../library/tkinter.rst:772 msgid "Tk Option Data Types" msgstr "" -#: ../../../library/tkinter.rst:929 +#: ../../../library/tkinter.rst:870 msgid "bind (widgets)" msgstr "" -#: ../../../library/tkinter.rst:929 +#: ../../../library/tkinter.rst:870 msgid "events (widgets)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/tkinter.scrolledtext.pot b/main/locale/pot/LC_MESSAGES/library/tkinter.scrolledtext.pot index 01a19f42a3c..bae3e717753 100644 --- a/main/locale/pot/LC_MESSAGES/library/tkinter.scrolledtext.pot +++ b/main/locale/pot/LC_MESSAGES/library/tkinter.scrolledtext.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -48,10 +48,25 @@ msgid "" "available:" msgstr "" -#: ../../../library/tkinter.scrolledtext.rst:31 +#: ../../../library/tkinter.scrolledtext.rst:28 +msgid "The keyword arguments are passed to the :class:`~tkinter.Text` widget." +msgstr "" + +#: ../../../library/tkinter.scrolledtext.rst:30 +msgid "" +"When *use_ttk* is true, the surrounding frame and the scroll bar are the " +"themed :mod:`tkinter.ttk` widgets; the default is the classic :mod:`tkinter` " +"widgets." +msgstr "" + +#: ../../../library/tkinter.scrolledtext.rst:34 +msgid "Added the *use_ttk* parameter." +msgstr "" + +#: ../../../library/tkinter.scrolledtext.rst:40 msgid "The frame which surrounds the text and scroll bar widgets." msgstr "" -#: ../../../library/tkinter.scrolledtext.rst:36 +#: ../../../library/tkinter.scrolledtext.rst:45 msgid "The scroll bar widget." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/tkinter.systray.pot b/main/locale/pot/LC_MESSAGES/library/tkinter.systray.pot new file mode 100644 index 00000000000..1e9ca527589 --- /dev/null +++ b/main/locale/pot/LC_MESSAGES/library/tkinter.systray.pot @@ -0,0 +1,106 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 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.16\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-07-20 11:48+0000\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" + +#: ../../../library/tkinter.systray.rst:2 +msgid ":mod:`!tkinter.systray` --- System tray icon and notifications" +msgstr "" + +#: ../../../library/tkinter.systray.rst:7 +msgid "**Source code:** :source:`Lib/tkinter/systray.py`" +msgstr "" + +#: ../../../library/tkinter.systray.rst:13 +msgid "" +"The :mod:`!tkinter.systray` module provides the :class:`SysTrayIcon` class " +"as an interface to the system tray (or taskbar) icon, and the :func:`notify` " +"function which sends a desktop notification. They require Tk 8.7/9.0 or " +"newer." +msgstr "" + +#: ../../../library/tkinter.systray.rst:18 +msgid "Only one system tray icon is supported per Tcl interpreter." +msgstr "" + +#: ../../../library/tkinter.systray.rst:22 +msgid "The class implementing the system tray icon." +msgstr "" + +#: ../../../library/tkinter.systray.rst:24 +msgid "" +"With *exists* false (the default), a new icon is created; creating a second " +"one raises :exc:`~tkinter.TclError`. With *exists* true, the instance refers " +"to the already-existing icon instead of creating one, reconfiguring it with " +"any given options." +msgstr "" + +#: ../../../library/tkinter.systray.rst:29 +msgid "The supported configuration options are:" +msgstr "" + +#: ../../../library/tkinter.systray.rst:31 +msgid "" +"*image* --- the image displayed in the system tray (required when creating " +"an icon). On Windows, it must be a :class:`!PhotoImage`." +msgstr "" + +#: ../../../library/tkinter.systray.rst:34 +msgid "*text* --- the text displayed in the tooltip of the icon." +msgstr "" + +#: ../../../library/tkinter.systray.rst:35 +msgid "" +"*button1* --- a callback that is called without arguments when the icon is " +"clicked with the left mouse button." +msgstr "" + +#: ../../../library/tkinter.systray.rst:37 +msgid "" +"*button3* --- a callback that is called without arguments when the icon is " +"clicked with the right mouse button." +msgstr "" + +#: ../../../library/tkinter.systray.rst:43 +msgid "" +"Query or modify the options of the system tray icon. With no arguments, " +"return a dict of all option values. With a string argument, return the value " +"of that option. Otherwise, set the given options." +msgstr "" + +#: ../../../library/tkinter.systray.rst:50 +msgid "Return the value of the given option of the system tray icon." +msgstr "" + +#: ../../../library/tkinter.systray.rst:54 +msgid "Return whether the system tray icon exists." +msgstr "" + +#: ../../../library/tkinter.systray.rst:58 +msgid "Destroy the system tray icon. A new icon can be created afterwards." +msgstr "" + +#: ../../../library/tkinter.systray.rst:63 +msgid "Send a desktop notification with the given title and message." +msgstr "" + +#: ../../../library/tkinter.systray.rst:68 +msgid "" +"Send a desktop notification with the given title and message without " +"creating a system tray icon first. On Windows, sending a notification " +"requires an existing system tray icon, which is also displayed in the " +"notification; use the :meth:`SysTrayIcon.notify` method instead." +msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/tkinter.ttk.pot b/main/locale/pot/LC_MESSAGES/library/tkinter.ttk.pot index 13ae10bf041..a773693988d 100644 --- a/main/locale/pot/LC_MESSAGES/library/tkinter.ttk.pot +++ b/main/locale/pot/LC_MESSAGES/library/tkinter.ttk.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.16\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-22 14:16+0000\n" +"POT-Creation-Date: 2026-07-20 11:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -28,76 +28,82 @@ msgstr "" #: ../../../library/tkinter.ttk.rst:13 msgid "" "The :mod:`!tkinter.ttk` module provides access to the Tk themed widget set, " -"introduced in Tk 8.5. It provides additional benefits including anti-aliased " -"font rendering under X11 and window transparency (requiring a composition " -"window manager on X11)." +"introduced in Tk 8.5. Its widgets adapt their appearance to the platform's " +"native theme, giving an application a better and more consistent look and " +"feel than the classic :mod:`tkinter` widgets, whose appearance is fixed." msgstr "" -#: ../../../library/tkinter.ttk.rst:18 +#: ../../../library/tkinter.ttk.rst:19 msgid "" "The basic idea for :mod:`!tkinter.ttk` is to separate, to the extent " "possible, the code implementing a widget's behavior from the code " "implementing its appearance." msgstr "" -#: ../../../library/tkinter.ttk.rst:27 +#: ../../../library/tkinter.ttk.rst:23 msgid "" -"`Tk Widget Styling Support `_" +"Ttk widgets are used just like the classic :mod:`tkinter` widgets and share " +"the same machinery: the widget hierarchy, the geometry managers, variable " +"coupling and event binding. Those foundational concepts are covered in the :" +"mod:`tkinter` documentation and are not repeated here." msgstr "" -#: ../../../library/tkinter.ttk.rst:28 -msgid "A document introducing theming support for Tk" +#: ../../../library/tkinter.ttk.rst:34 +msgid "" +"`Tk Widget Styling Support (TIP #48) `_" +msgstr "" + +#: ../../../library/tkinter.ttk.rst:35 +msgid "" +"The Tcl Improvement Proposal that introduced the themed widget styling " +"engine." msgstr "" -#: ../../../library/tkinter.ttk.rst:32 +#: ../../../library/tkinter.ttk.rst:39 msgid "Using Ttk" msgstr "" -#: ../../../library/tkinter.ttk.rst:34 +#: ../../../library/tkinter.ttk.rst:41 msgid "To start using Ttk, import its module::" msgstr "" -#: ../../../library/tkinter.ttk.rst:38 +#: ../../../library/tkinter.ttk.rst:45 msgid "" "To override the basic Tk widgets, the import should follow the Tk import::" msgstr "" -#: ../../../library/tkinter.ttk.rst:43 +#: ../../../library/tkinter.ttk.rst:50 msgid "" "That code causes several :mod:`!tkinter.ttk` widgets (:class:`Button`, :" "class:`Checkbutton`, :class:`Entry`, :class:`Frame`, :class:`Label`, :class:" -"`LabelFrame`, :class:`Menubutton`, :class:`PanedWindow`, :class:" -"`Radiobutton`, :class:`Scale` and :class:`Scrollbar`) to automatically " -"replace the Tk widgets." +"`LabelFrame`, :class:`Menubutton`, :class:`OptionMenu`, :class:" +"`PanedWindow`, :class:`Radiobutton`, :class:`Scale`, :class:`Scrollbar` and :" +"class:`Spinbox`) to automatically replace the Tk widgets." msgstr "" -#: ../../../library/tkinter.ttk.rst:49 +#: ../../../library/tkinter.ttk.rst:59 +msgid "" +"Overriding the classic widgets with ``from tkinter.ttk import *`` is " +"convenient for adapting existing code, but new code is usually clearer if it " +"imports the module as ``from tkinter import ttk`` and refers to the themed " +"widgets explicitly, such as ``ttk.Button``." +msgstr "" + +#: ../../../library/tkinter.ttk.rst:65 msgid "" "This has the direct benefit of using the new widgets which gives a better " "look and feel across platforms; however, the replacement widgets are not " "completely compatible. The main difference is that widget options such as " -"\"fg\", \"bg\" and others related to widget styling are no longer present in " +"``fg``, ``bg`` and others related to widget styling are no longer present in " "Ttk widgets. Instead, use the :class:`ttk.Style